diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index de7fab45..cc495521 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -7,8 +7,8 @@ curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/instal rmdir samples || true mkdir samples -npm install -npm install -g ts-node +npm install --ignore-scripts +npm install -g ts-node --ignore-scripts npm link npm link opal-mcp TS_CONFIG_CONTENT=$(cat <", "item_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "stages": [{"stage": 421013, "operator": "OR", "reviewers": []}]}]}} getResources: "": parameters: @@ -2634,137 +6865,1373 @@ examples: speakeasy-default-remove-resource-tag: parameters: path: - tag_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" - resource_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" - get_message_channels: - speakeasy-default-get-message-channels: + tag_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" + resource_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" + get_message_channels: + speakeasy-default-get-message-channels: + responses: + "200": + application/json: {"channels": [{"message_channel_id": "7870617d-e72a-47f5-a84c-693817ab4567", "third_party_provider": "SLACK", "remote_id": "C03FJR97276", "name": "api-team-audit-channel", "is_private": false}, {"message_channel_id": "1520617d-e72a-47f5-a84c-693817ab48ad2", "third_party_provider": "SLACK", "remote_id": "A4FJR97365D", "name": "api-team-monitor-channel", "is_private": false}]} + create_message_channel: + speakeasy-default-create-message-channel: + requestBody: + application/json: {"third_party_provider": "SLACK", "remote_id": "C03FJR97276"} + responses: + "200": + application/json: {"message_channel_id": "6670617d-e72a-47f5-a84c-693817ab4860", "third_party_provider": "SLACK", "remote_id": "C03FJR97276", "name": "api-team-audit-channel", "is_private": false} + get_message_channel: + "": + parameters: + path: + message_channel_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + responses: + "200": + application/json: {"message_channel_id": "6670617d-e72a-47f5-a84c-693817ab4860", "third_party_provider": "SLACK", "remote_id": "C03FJR97276", "name": "api-team-audit-channel", "is_private": false} + speakeasy-default-get-message-channel: + parameters: + path: + message_channel_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + responses: + "200": + application/json: {"message_channel_id": "6670617d-e72a-47f5-a84c-693817ab4860", "third_party_provider": "SLACK", "remote_id": "C03FJR97276", "name": "api-team-audit-channel", "is_private": false} + get_on_call_schedules: + speakeasy-default-get-on-call-schedules: + responses: + "200": + application/json: {"on_call_schedules": [{"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e", "third_party_provider": "PAGER_DUTY", "remote_id": "P7OWH2R", "name": "Customer Support On-Call"}, {"on_call_schedule_id": "4d61592c-ed61-4b13-8f22-2fac1c49f574", "third_party_provider": "OPSGENIE", "remote_id": "72a8cb04-9e25-465d-a932-992f72077c61", "name": "Opal Backend On-Call"}]} + create_on_call_schedule: + speakeasy-default-create-on-call-schedule: + requestBody: + application/json: {"third_party_provider": "PAGER_DUTY", "remote_id": "PNZNINN"} + responses: + "200": + application/json: {"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e", "third_party_provider": "PAGER_DUTY", "remote_id": "P7OWH2R", "name": "Customer Support On-Call"} + get_on_call_schedule: + "": + parameters: + path: + on_call_schedule_id: "9546209c-42c2-4801-96d7-9ec42df0f59c" + responses: + "200": + application/json: {"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e", "third_party_provider": "PAGER_DUTY", "remote_id": "P7OWH2R", "name": "Customer Support On-Call"} + speakeasy-default-get-on-call-schedule: + parameters: + path: + on_call_schedule_id: "9546209c-42c2-4801-96d7-9ec42df0f59c" + responses: + "200": + application/json: {"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e", "third_party_provider": "PAGER_DUTY", "remote_id": "P7OWH2R", "name": "Customer Support On-Call"} + getUARs: + "": + parameters: + query: + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + page_size: 200 + responses: + "200": + application/json: {"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "results": [{"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}}, {"uar_id": "39a4d283-ca87-4a8a-bdbb-df212eca5fdb", "name": "Monthly UAR (August)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": true, "deadline": "2022-08-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}}]} + speakeasy-default-get-UA-rs: + parameters: + query: + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + page_size: 200 + responses: + "200": + application/json: {"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "results": [{"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "instantly_action_reviews": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}}, {"uar_id": "39a4d283-ca87-4a8a-bdbb-df212eca5fdb", "name": "Monthly UAR (August)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": true, "deadline": "2022-08-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "instantly_action_reviews": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}}]} + create_uar: + speakeasy-default-create-uar: + requestBody: + application/json: {"name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "reminder_schedule": [7, 3, 1, 0], "reminder_include_manager": true, "uar_scope": {"group_visibility": "STRICT", "admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}} + responses: + "200": + application/json: {"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "instantly_action_reviews": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}} + get_uar: + "": + parameters: + path: + uar_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + responses: + "200": + application/json: {"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}} + speakeasy-default-get-uar: + parameters: + path: + uar_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + responses: + "200": + application/json: {"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "instantly_action_reviews": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}} + update_group_user: + speakeasy-default-update-group-user: + parameters: + path: + group_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + user_id: "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" + requestBody: + application/json: {"duration_minutes": 60, "access_level_remote_id": "arn:aws:iam::590304332660:role/AdministratorAccess"} + responses: + "200": + application/json: {"group_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3", "group_name": "API Group", "description": "Group required to request API's", "user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac", "full_name": "Jake Barnes", "email": "jake@company.dev", "expiration_date": "2022-01-23T04:56:07Z"} + getRequest: + speakeasy-default-get-request: + parameters: + path: + id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + responses: + "200": + application/json: {"id": "7c86c85d-0651-43e2-a748-d69d658418e8", "created_at": "2021-01-06T20:00:00Z", "updated_at": "2021-01-06T20:00:00Z", "requester_id": "c86c85d-0651-43e2-a748-d69d658418e8", "target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8", "target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8", "status": "APPROVED", "reason": "I need this resource.", "duration_minutes": 1440, "reviewer_stages": []} + get_resource_scoped_role_permissions: + speakeasy-default-get-resource-scoped-role-permissions: + parameters: + path: + resource_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" + responses: + "200": + application/json: {"permissions": [{"target_ids": ["a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1", "8294e9c9-deb6-48e9-9c99-da2a1e04a87f"], "target_type": "RESOURCE", "permission_name": "READ", "allow_all": true}]} + set_resource_scoped_role_permissions: + speakeasy-default-set-resource-scoped-role-permissions: + parameters: + path: + resource_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" + requestBody: + application/json: {"permissions": [{"target_ids": ["a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1", "8294e9c9-deb6-48e9-9c99-da2a1e04a87f"], "target_type": "RESOURCE", "permission_name": "READ", "allow_all": false}]} + responses: + "200": + application/json: {"permissions": [{"target_ids": ["a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1", "8294e9c9-deb6-48e9-9c99-da2a1e04a87f"], "target_type": "RESOURCE", "permission_name": "READ", "allow_all": false}]} + getCampaigns: + speakeasy-default-get-campaigns: + parameters: + query: + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + page_size: 200 + name: "Q3 Access Review" + status: "ONGOING" + created_at_after: "2026-01-01T00:00:00Z" + created_at_before: "2026-12-31T23:59:59Z" + started_at_after: "2026-01-01T00:00:00Z" + started_at_before: "2026-12-31T23:59:59Z" + ended_at_after: "2026-01-01T00:00:00Z" + ended_at_before: "2026-12-31T23:59:59Z" + stopped_at_after: "2026-01-01T00:00:00Z" + stopped_at_before: "2026-12-31T23:59:59Z" + responses: + "200": + application/json: {"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "results": [{"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Q3 Access Review", "status": "DRAFT", "is_template": false, "created_at": "2026-07-01T00:00:00Z", "updated_at": "2026-07-01T00:00:00Z", "created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1"}]} + createCampaign: + speakeasy-default-create-campaign: + requestBody: + application/json: {"name": "Q3 Access Review", "configuration": {"query": {"principalFilter": {"entityTypes": ["USER"]}}, "end_date": "2026-09-30T00:00:00Z", "timezone": "America/Los_Angeles"}} + responses: + "201": + application/json: {"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Q3 Access Review", "status": "DRAFT", "is_template": false, "created_at": "2026-07-01T00:00:00Z", "updated_at": "2026-07-01T00:00:00Z", "created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "configuration": null, "started_at": null, "started_by_user_id": null, "stopped_at": null, "stopped_by_user_id": null, "ended_at": null, "ended_by_user_id": null} + getCampaign: + speakeasy-default-get-campaign: + parameters: + path: + campaign_id: "f454d283-ca87-4a8a-bdbb-df212eca5353" + responses: + "200": + application/json: {"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Q3 Access Review", "status": "DRAFT", "is_template": false, "created_at": "2026-07-01T00:00:00Z", "updated_at": "2026-07-01T00:00:00Z", "created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "configuration": null, "started_at": null, "started_by_user_id": null, "stopped_at": null, "stopped_by_user_id": null, "ended_at": null, "ended_by_user_id": null} + updateCampaign: + speakeasy-default-update-campaign: + parameters: + path: + campaign_id: "f454d283-ca87-4a8a-bdbb-df212eca5353" + requestBody: + application/json: {"name": "Q3 Access Review (Updated)", "configuration": {"end_date": "2026-09-30T00:00:00Z", "timezone": "America/Los_Angeles"}} + responses: + "200": + application/json: {"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Q3 Access Review", "status": "DRAFT", "is_template": false, "created_at": "2026-07-01T00:00:00Z", "updated_at": "2026-07-01T00:00:00Z", "created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "configuration": null, "started_at": null, "started_by_user_id": null, "stopped_at": null, "stopped_by_user_id": null, "ended_at": null, "ended_by_user_id": null} + startCampaign: + speakeasy-default-start-campaign: + parameters: + path: + campaign_id: "f454d283-ca87-4a8a-bdbb-df212eca5353" + responses: + "200": + application/json: {"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Q3 Access Review", "status": "DRAFT", "is_template": false, "created_at": "2026-07-01T00:00:00Z", "updated_at": "2026-07-01T00:00:00Z", "created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "configuration": null, "started_at": null, "started_by_user_id": null, "stopped_at": null, "stopped_by_user_id": null, "ended_at": null, "ended_by_user_id": null} + stopCampaign: + speakeasy-default-stop-campaign: + parameters: + path: + campaign_id: "f454d283-ca87-4a8a-bdbb-df212eca5353" + responses: + "200": + application/json: {"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Q3 Access Review", "status": "DRAFT", "is_template": false, "created_at": "2026-07-01T00:00:00Z", "updated_at": "2026-07-01T00:00:00Z", "created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "configuration": null, "started_at": null, "started_by_user_id": null, "stopped_at": null, "stopped_by_user_id": null, "ended_at": null, "ended_by_user_id": null} + endCampaign: + speakeasy-default-end-campaign: + parameters: + path: + campaign_id: "f454d283-ca87-4a8a-bdbb-df212eca5353" + responses: + "200": + application/json: {"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Q3 Access Review", "status": "DRAFT", "is_template": false, "created_at": "2026-07-01T00:00:00Z", "updated_at": "2026-07-01T00:00:00Z", "created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "configuration": null, "started_at": null, "started_by_user_id": null, "stopped_at": null, "stopped_by_user_id": null, "ended_at": null, "ended_by_user_id": null} + getEventStreams: + speakeasy-default-get-event-streams: + responses: + "200": + application/json: {"event_streams": [{"event_stream_id": "0b074544-bb75-4453-aa48-e2668d577be2", "connection": {"name": "", "connection_type": "WEBHOOK", "enabled": false}}]} + createEventStream: + speakeasy-default-create-event-stream: + requestBody: + application/json: {"name": "", "connection_type": "WEBHOOK"} + responses: + "200": + application/json: {"event_stream_id": "486fe32c-27fe-4ce9-ad5f-935cd2716689", "connection": {"name": "", "connection_type": "WEBHOOK", "enabled": true}} + updateEventStream: + speakeasy-default-update-event-stream: + parameters: + path: + event_stream_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + requestBody: + application/json: {} + responses: + "200": + application/json: {"event_stream_id": "bcf1b3c9-04db-4c42-941e-5a57deb1826d", "connection": {"name": "", "connection_type": "WEBHOOK", "enabled": true}} + deleteEventStream: + speakeasy-default-delete-event-stream: + parameters: + path: + event_stream_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + getEvent: + speakeasy-default-get-event: + parameters: + path: + event_id: "29827fb8-f2dd-4e80-9576-28e31e9934ac" + responses: + "200": + application/json: {"event_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac", "actor_user_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3", "actor_name": "John Smith", "event_type": "USERS_CREATED", "created_at": "2022-01-23T04:56:07Z"} + get_user_groups: + speakeasy-default-get-user-groups: + parameters: + path: + user_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" + query: + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + page_size: 200 + responses: + "200": + application/json: {"results": [{"group_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3", "group_name": "API Group", "description": "Group required to request API's", "user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac", "full_name": "Jake Barnes", "email": "jake@company.dev", "expiration_date": "2022-01-23T04:56:07Z"}, {"group_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3", "group_name": "API Group", "description": "Group required to request API's", "user_id": "7646aa9a-e2ee-4eb5-8c62-91f29038a373", "full_name": "Brett Ashley", "email": "brett@company.dev", "expiration_date": "2022-02-03T12:33:02Z"}], "next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ"} + getIdpGroupMapping: + speakeasy-default-get-idp-group-mapping: + parameters: + path: + app_resource_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + group_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + responses: + "200": + application/json: {"app_resource_id": "1520617d-e72a-47f5-a84c-693817ab48ad2", "group_id": "6f99639b-7928-4043-8184-47cbc6766145", "alias": "finance-team", "hidden_from_end_user": false} + createIdpGroupMapping: + speakeasy-default-create-idp-group-mapping: + parameters: + path: + app_resource_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + group_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + responses: + "200": + application/json: {"app_resource_id": "1520617d-e72a-47f5-a84c-693817ab48ad2", "group_id": "6f99639b-7928-4043-8184-47cbc6766145", "alias": "finance-team", "hidden_from_end_user": false} + denyRequest: + speakeasy-default-deny-request: + parameters: + path: + id: "83015915-58ae-4cce-b92d-608ff073ece1" + requestBody: + application/json: {"comment": "Denied due to insufficient justification", "level": "REGULAR"} + responses: + "200": + application/json: {"request": {"id": "7c86c85d-0651-43e2-a748-d69d658418e8", "created_at": "2021-01-06T20:00:00Z", "updated_at": "2021-01-06T20:00:00Z", "requester_id": "c86c85d-0651-43e2-a748-d69d658418e8", "target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8", "target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8", "status": "CANCELED", "reason": "I need this resource.", "duration_minutes": 1440, "reviewer_stages": ""}} + getRequestComments: + speakeasy-default-get-request-comments: + parameters: + path: + id: "bfb1ef34-8ecf-46e5-bdf4-38abe7c6da89" responses: "200": - application/json: {"channels": [{"message_channel_id": "7870617d-e72a-47f5-a84c-693817ab4567", "third_party_provider": "SLACK", "remote_id": "C03FJR97276", "name": "api-team-audit-channel", "is_private": false}, {"message_channel_id": "1520617d-e72a-47f5-a84c-693817ab48ad2", "third_party_provider": "SLACK", "remote_id": "A4FJR97365D", "name": "api-team-monitor-channel", "is_private": false}]} - create_message_channel: - speakeasy-default-create-message-channel: + application/json: {"comments": [{"created_at": "2021-01-06T20:00:00Z", "request_id": "4c86c85d-0651-43e2-a748-d69d658418e8", "user_id": "c86c85d-0651-43e2-a748-d69d658418e8", "comment": "This is a comment."}]} + createRequestComment: + speakeasy-default-create-request-comment: + parameters: + path: + id: "4a929b40-a2e3-4dca-b8ec-1af35bdc7e43" requestBody: - application/json: {"third_party_provider": "SLACK", "remote_id": "C03FJR97276"} + application/json: {"comment": "The Apollotech B340 is an affordable wireless mouse with reliable connectivity, 12 months battery life and modern design"} responses: "200": - application/json: {"message_channel_id": "6670617d-e72a-47f5-a84c-693817ab4860", "third_party_provider": "SLACK", "remote_id": "C03FJR97276", "name": "api-team-audit-channel", "is_private": false} - get_message_channel: - "": + application/json: {"request": {"id": "7c86c85d-0651-43e2-a748-d69d658418e8", "created_at": "2021-01-06T20:00:00Z", "updated_at": "2021-01-06T20:00:00Z", "requester_id": "c86c85d-0651-43e2-a748-d69d658418e8", "target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8", "target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8", "status": "DENIED", "reason": "I need this resource.", "duration_minutes": 1440, "reviewer_stages": ""}} + get_user_resources: + speakeasy-default-get-user-resources: parameters: path: - message_channel_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + user_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + query: + limit: 200 + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + include_unmanaged: false responses: "200": - application/json: {"message_channel_id": "6670617d-e72a-47f5-a84c-693817ab4860", "third_party_provider": "SLACK", "remote_id": "C03FJR97276", "name": "api-team-audit-channel", "is_private": false} - speakeasy-default-get-message-channel: + application/json: {"results": [{"resource_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3", "user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac", "access_level": {"access_level_name": "AdminRole", "access_level_remote_id": "arn:aws:iam::590304332660:role/AdministratorAccess"}, "full_name": "Jake Barnes", "email": "jake@company.dev", "expiration_date": "2022-01-23T04:56:07Z", "has_direct_access": true, "num_access_paths": 2}, {"resource_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3", "user_id": "7646aa9a-e2ee-4eb5-8c62-91f29038a373", "access_level": {"access_level_name": "AdminRole", "access_level_remote_id": "arn:aws:iam::590304332660:role/AdministratorAccess"}, "full_name": "Brett Ashley", "email": "brett@company.dev", "expiration_date": "2022-02-03T12:33:02Z", "has_direct_access": true, "num_access_paths": 3}]} + get_resource_groups: + speakeasy-default-get-resource-groups: parameters: path: - message_channel_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + resource_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" responses: "200": - application/json: {"message_channel_id": "6670617d-e72a-47f5-a84c-693817ab4860", "third_party_provider": "SLACK", "remote_id": "C03FJR97276", "name": "api-team-audit-channel", "is_private": false} - get_on_call_schedules: - speakeasy-default-get-on-call-schedules: + application/json: {"group_resources": [{"group_id": "7870617d-e72a-47f5-a84c-693817ab4567", "resource_id": "1520617d-e72a-47f5-a84c-693817ab48ad2", "access_level": {"access_level_name": "AdminRole", "access_level_remote_id": "arn:aws:iam::590304332660:role/AdministratorAccess"}}, {"group_id": "50333e67-73ce-47ab-b049-d8abcd45f7a1", "resource_id": "6f99639b-7928-4043-8184-47cbc6766145", "access_level": {"access_level_name": "AdminRole", "access_level_remote_id": "arn:aws:iam::590304332660:role/AdministratorAccess"}}]} + createPaladin: + speakeasy-default-create-paladin: + requestBody: + application/json: {"name": "paladin-agent-1", "owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "monitor_mode": true, "admin_view_only": false} responses: "200": - application/json: {"on_call_schedules": [{"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e", "third_party_provider": "PAGER_DUTY", "remote_id": "P7OWH2R", "name": "Customer Support On-Call"}, {"on_call_schedule_id": "4d61592c-ed61-4b13-8f22-2fac1c49f574", "third_party_provider": "OPSGENIE", "remote_id": "72a8cb04-9e25-465d-a932-992f72077c61", "name": "Opal Backend On-Call"}]} - create_on_call_schedule: - speakeasy-default-create-on-call-schedule: + application/json: {"paladin_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "name": "paladin-agent-1", "owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "monitor_mode": true, "admin_view_only": false, "enabled_connectors": ["SLACK"], "instructions": "Approve read-only access; escalate anything that grants write access."} + getPaladin: + speakeasy-default-get-paladin: + parameters: + path: + paladin_id: "32acc112-21ff-4669-91c2-21e27683eaa1" + responses: + "200": + application/json: {"paladin_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "name": "paladin-agent-1", "owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "monitor_mode": true, "admin_view_only": false, "enabled_connectors": ["SLACK"], "instructions": "Approve read-only access; escalate anything that grants write access."} + updatePaladin: + speakeasy-default-update-paladin: + parameters: + path: + paladin_id: "32acc112-21ff-4669-91c2-21e27683eaa1" requestBody: - application/json: {"third_party_provider": "PAGER_DUTY", "remote_id": "PNZNINN"} + application/json: {"name": "paladin-agent-1"} responses: "200": - application/json: {"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e", "third_party_provider": "PAGER_DUTY", "remote_id": "P7OWH2R", "name": "Customer Support On-Call"} - get_on_call_schedule: - "": + application/json: {"paladin_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "name": "paladin-agent-1", "owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "monitor_mode": true, "admin_view_only": false, "enabled_connectors": ["SLACK"], "instructions": "Approve read-only access; escalate anything that grants write access."} + deletePaladin: + speakeasy-default-delete-paladin: parameters: path: - on_call_schedule_id: "9546209c-42c2-4801-96d7-9ec42df0f59c" + paladin_id: "32acc112-21ff-4669-91c2-21e27683eaa1" + getPaladinFromName: + speakeasy-default-get-paladin-from-name: + parameters: + path: + paladin_name: "paladin-agent-1" responses: "200": - application/json: {"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e", "third_party_provider": "PAGER_DUTY", "remote_id": "P7OWH2R", "name": "Customer Support On-Call"} - speakeasy-default-get-on-call-schedule: + application/json: {"results": [{"paladin_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "name": "paladin-agent-1", "owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "monitor_mode": true, "admin_view_only": false, "enabled_connectors": ["SLACK"], "instructions": "Approve read-only access; escalate anything that grants write access."}]} + listPaladinContextSources: + speakeasy-default-list-paladin-context-sources: parameters: path: - on_call_schedule_id: "9546209c-42c2-4801-96d7-9ec42df0f59c" + paladin_id: "32acc112-21ff-4669-91c2-21e27683eaa1" responses: "200": - application/json: {"on_call_schedule_id": "50d5e9f6-f23f-4d5a-ae91-b2640cf3975e", "third_party_provider": "PAGER_DUTY", "remote_id": "P7OWH2R", "name": "Customer Support On-Call"} - getUARs: - "": + application/json: {"results": [{"id": "8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8", "paladin_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "source_kind": "SLACK_CHANNEL", "third_party_provider": "SLACK", "remote_id": "C0123456789", "name": "#access-requests", "url": "https://example.slack.com/archives/C0123456789"}]} + createPaladinContextSource: + speakeasy-default-create-paladin-context-source: + parameters: + path: + paladin_id: "32acc112-21ff-4669-91c2-21e27683eaa1" + requestBody: + application/json: {"source_kind": "SLACK_CHANNEL", "third_party_provider": "SLACK", "remote_id": "C0123456789", "name": "#access-requests"} + responses: + "200": + application/json: {"id": "8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8", "paladin_id": "32acc112-21ff-4669-91c2-21e27683eaa1", "source_kind": "SLACK_CHANNEL", "third_party_provider": "SLACK", "remote_id": "C0123456789", "name": "#access-requests", "url": "https://example.slack.com/archives/C0123456789"} + deletePaladinContextSource: + speakeasy-default-delete-paladin-context-source: + parameters: + path: + paladin_id: "32acc112-21ff-4669-91c2-21e27683eaa1" + context_source_id: "8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8" + getRemoteUsers: + speakeasy-default-get-remote-users: parameters: query: + third_party_provider: ["GIT_HUB"] + user_id: ["32acc112-21ff-4669-91c2-21e27683eaa1"] + remote_id: ["1234567890"] cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" page_size: 200 responses: "200": - application/json: {"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "results": [{"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}}, {"uar_id": "39a4d283-ca87-4a8a-bdbb-df212eca5fdb", "name": "Monthly UAR (August)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": true, "deadline": "2022-08-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}}]} - speakeasy-default-get-UA-rs: + application/json: {"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "results": [{"user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac", "remote_id": "1234567890", "third_party_provider": "GIT_LAB"}, {"user_id": "29827fb8-f2dd-4e80-9576-238979927392", "remote_id": "remoteid123", "third_party_provider": "GIT_HUB"}]} + getUserWhoami: + speakeasy-default-get-user-whoami: + responses: + "200": + application/json: {"user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac", "email": "john.doe@company.dev", "full_name": "John Doe", "first_name": "John", "last_name": "Doe", "position": "Engineer"} + get_access_rules: + speakeasy-default-get-access-rules: parameters: query: cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" page_size: 200 responses: "200": - application/json: {"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "results": [{"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}}, {"uar_id": "39a4d283-ca87-4a8a-bdbb-df212eca5fdb", "name": "Monthly UAR (August)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": true, "deadline": "2022-08-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}}]} - create_uar: - speakeasy-default-create-uar: + application/json: {"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "results": []} + runOpalQuery: + speakeasy-default-run-opal-query: requestBody: - application/json: {"name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "reminder_schedule": [7, 3, 1, 0], "reminder_include_manager": true, "uar_scope": {"group_visibility": "STRICT", "admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}} + application/json: {"type": "NODE", "query": {"nodeFilters": {"entityTypes": ["RESOURCE"], "entityTag": {"key": "env", "value": "prod"}}, "accessFilters": {"isAccessibleBy": {"entityTypes": ["USER"], "entityTag": {"key": "contractor"}}}}, "first": 50} responses: "200": - application/json: {"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}} - get_uar: - "": + application/json: {"type": "ACCESS_PATH", "edges": [], "pageInfo": {"hasNextPage": true, "endCursor": "", "hasPreviousPage": false, "startCursor": ""}} + getTokens: + speakeasy-default-get-tokens: parameters: - path: - uar_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + query: + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + page_size: 200 + user_id: "29827fb8-f2dd-4e80-9576-28e31e9934ac" responses: "200": - application/json: {"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}} - speakeasy-default-get-uar: + application/json: {"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "results": [{"token_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "created_at": "2022-01-23T04:56:07Z", "token_label": "My API Token", "creator_user_id": "d4a7d928-783e-4599-8ec6-088d635a5bcc", "user_id": "d4a7d928-783e-4599-8ec6-088d635a5bcc", "access_level": "READ_ONLY"}]} + deleteToken: + speakeasy-default-delete-token: parameters: path: - uar_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" - responses: - "200": - application/json: {"uar_id": "f454d283-ca87-4a8a-bdbb-df212eca5353", "name": "Monthly UAR (July)", "reviewer_assignment_policy": "MANUALLY", "send_reviewer_assignment_notification": false, "deadline": "2022-07-14T06:59:59Z", "time_zone": "America/Los_Angeles", "self_review_allowed": false, "uar_scope": {"admins": ["f454d283-ca87-4a8a-bdbb-df212eca5353", "8763d283-ca87-4a8a-bdbb-df212ecab139"], "tags": [{"key": "uar_scope", "value": "high_priority"}], "names": ["demo", "api"]}} - update_group_user: - speakeasy-default-update-group-user: + token_id: "f454d283-ca87-4a8a-bdbb-df212eca5353" + getDelegations: + speakeasy-default-get-delegations: parameters: - path: - group_id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" - user_id: "f92aa855-cea9-4814-b9d8-f2a60d3e4a06" - requestBody: - application/json: {"duration_minutes": 60, "access_level_remote_id": "arn:aws:iam::590304332660:role/AdministratorAccess"} + query: + delegator_user_id: "29827fb8-f2dd-4e80-9576-28e31e9934ac" + delegate_user_id: "29827fb8-f2dd-4e80-9576-28e31e9934ac" + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + page_size: 200 responses: "200": - application/json: {"group_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3", "user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac", "full_name": "Jake Barnes", "email": "jake@company.dev", "expiration_date": "2022-01-23T04:56:07Z"} - getRequest: - speakeasy-default-get-request: - parameters: - path: - id: "4baf8423-db0a-4037-a4cf-f79c60cb67a5" + application/json: {"results": [{"id": "4aed3e8a-727b-4d72-8010-3b8710c50bec", "delegator_user_id": "123e4567-e89b-12d3-a456-426614174000", "delegate_user_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "start_time": "2023-10-01T12:00:00Z", "end_time": "2023-10-01T12:00:00Z", "reason": "I need to be out of the office", "created_at": "2023-10-01T12:00:00Z", "updated_at": "2023-10-01T12:00:00Z"}], "next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", "total_count": 2} + createDelegation: + speakeasy-default-create-delegation: + requestBody: + application/json: {"delegator_user_id": "123e4567-e89b-12d3-a456-426614174000", "delegate_user_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "start_time": "2023-10-01T12:00:00Z", "end_time": "2023-10-01T12:00:00Z", "reason": "I need to be out of the office"} responses: "200": - application/json: {"id": "7c86c85d-0651-43e2-a748-d69d658418e8", "created_at": "2021-01-06T20:00:00Z", "updated_at": "2021-01-06T20:00:00Z", "requester_id": "c86c85d-0651-43e2-a748-d69d658418e8", "target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8", "target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8", "status": "APPROVED", "reason": "I need this resource.", "duration_minutes": 1440, "stages": {"requestedRoleName": "Admin", "requestedItemName": "AWS Production Account", "stages": [{"stage": 1, "operator": "AND", "reviewers": [{"id": "7c86c85d-0651-43e2-a748-d69d658418e8", "status": "PENDING"}]}, {"stage": 2, "operator": "OR", "reviewers": [{"id": "8d86c85d-0651-43e2-a748-d69d658418e9", "status": "APPROVED"}]}]}} - get_resource_scoped_role_permissions: - speakeasy-default-get-resource-scoped-role-permissions: + application/json: {"id": "4aed3e8a-727b-4d72-8010-3b8710c50bec", "delegator_user_id": "123e4567-e89b-12d3-a456-426614174000", "delegate_user_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "start_time": "2023-10-01T12:00:00Z", "end_time": "2023-10-01T12:00:00Z", "reason": "I need to be out of the office", "created_at": "2023-10-01T12:00:00Z", "updated_at": "2023-10-01T12:00:00Z"} + getDelegation: + speakeasy-default-get-delegation: parameters: path: - resource_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" + delegation_id: "32acc112-21ff-4669-91c2-21e27683eaa1" responses: "200": - application/json: {"permissions": [{"target_ids": ["a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1", "8294e9c9-deb6-48e9-9c99-da2a1e04a87f"], "target_type": "RESOURCE", "permission_name": "READ", "allow_all": true}]} - set_resource_scoped_role_permissions: - speakeasy-default-set-resource-scoped-role-permissions: + application/json: {"id": "4aed3e8a-727b-4d72-8010-3b8710c50bec", "delegator_user_id": "123e4567-e89b-12d3-a456-426614174000", "delegate_user_id": "7c86c85d-0651-43e2-a748-d69d658418e8", "start_time": "2023-10-01T12:00:00Z", "end_time": "2023-10-01T12:00:00Z", "reason": "I need to be out of the office", "created_at": "2023-10-01T12:00:00Z", "updated_at": "2023-10-01T12:00:00Z"} + deleteDelegation: + speakeasy-default-delete-delegation: parameters: path: - resource_id: "1b978423-db0a-4037-a4cf-f79c60cb67b3" - requestBody: - application/json: {"permissions": [{"target_ids": ["a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1", "8294e9c9-deb6-48e9-9c99-da2a1e04a87f"], "target_type": "RESOURCE", "permission_name": "READ", "allow_all": false}]} - responses: - "200": - application/json: {"permissions": [{"target_ids": ["a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1", "8294e9c9-deb6-48e9-9c99-da2a1e04a87f"], "target_type": "RESOURCE", "permission_name": "READ", "allow_all": false}]} + delegation_id: "32acc112-21ff-4669-91c2-21e27683eaa1" examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Typescript SDK Changes:\n* `opalmcp.apps.getApps()`: \n * `request.appTypeFilter` **Changed**\n * `response.apps[].appType` **Changed** (Breaking ⚠️)\n* `opalmcp.apps.getApp()`: `response.appType` **Changed** (Breaking ⚠️)\n* `opalmcp.groups.getGroups()`: \n * `request` **Changed**\n * `response.results[]` **Changed** (Breaking ⚠️)\n* `opalmcp.groups.createGroup()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `opalmcp.groups.getGroup()`: `response` **Changed** (Breaking ⚠️)\n* `opalmcp.uars.getUar()`: `response` **Changed** (Breaking ⚠️)\n* `opalmcp.uars.createUar()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `opalmcp.uars.getUaRs()`: `response.results[]` **Changed** (Breaking ⚠️)\n* `opalmcp.nonHumanIdentities.getNhis()`: `response.results[]` **Changed** (Breaking ⚠️)\n* `opalmcp.resources.setResourceScopedRolePermissions()`: \n * `request.scopedRolePermissionList.permissions[].targetType.enum(owner)` **Added**\n * `response.permissions[].targetType.enum(owner)` **Added** (Breaking ⚠️)\n* `opalmcp.resources.getResourceScopedRolePermissions()`: `response.permissions[].targetType.enum(owner)` **Added** (Breaking ⚠️)\n* `opalmcp.resources.getResourceUsers()`: `response` **Changed** (Breaking ⚠️)\n* `opalmcp.resources.getResource()`: `response` **Changed** (Breaking ⚠️)\n* `opalmcp.resources.createResource()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `opalmcp.resources.getResources()`: \n * `request` **Changed**\n * `response.results[]` **Changed** (Breaking ⚠️)\n* `opalmcp.requests.approveRequest()`: `response` **Changed** (Breaking ⚠️)\n* `opalmcp.groupBindings.getGroupBinding()`: `response.groups[].groupType` **Changed** (Breaking ⚠️)\n* `opalmcp.groupBindings.createGroupBinding()`: `response.groups[].groupType` **Changed** (Breaking ⚠️)\n* `opalmcp.groupBindings.getGroupBindings()`: `response.results[].groups[].groupType` **Changed** (Breaking ⚠️)\n* `opalmcp.groups.addGroupUser()`: `response` **Changed** (Breaking ⚠️)\n* `opalmcp.groups.updateGroupUser()`: `response` **Changed** (Breaking ⚠️)\n* `opalmcp.groups.getGroupUsers()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `opalmcp.delegations.deleteDelegation()`: **Added**\n* `opalmcp.groups.setGroupReviewerStages()`: \n * `request.reviewerStageList.stages[].serviceUserIds` **Added**\n * `response.[].serviceUserIds` **Added**\n* `opalmcp.resources.getResourceGroups()`: **Added**\n* `opalmcp.paladin.createPaladin()`: **Added**\n* `opalmcp.paladin.getPaladin()`: **Added**\n* `opalmcp.paladin.updatePaladin()`: **Added**\n* `opalmcp.paladin.deletePaladin()`: **Added**\n* `opalmcp.paladin.getPaladinFromName()`: **Added**\n* `opalmcp.paladin.listPaladinContextSources()`: **Added**\n* `opalmcp.paladin.createPaladinContextSource()`: **Added**\n* `opalmcp.paladin.deletePaladinContextSource()`: **Added**\n* `opalmcp.users.getRemoteUsers()`: **Added**\n* `opalmcp.users.getUserWhoami()`: **Added**\n* `opalmcp.accessRules.getAccessRules()`: **Added**\n* `opalmcp.opalQueries.runOpalQuery()`: **Added**\n* `opalmcp.tokens.getTokens()`: **Added**\n* `opalmcp.tokens.deleteToken()`: **Added**\n* `opalmcp.delegations.getDelegations()`: **Added**\n* `opalmcp.delegations.createDelegation()`: **Added**\n* `opalmcp.delegations.getDelegation()`: **Added**\n* `opalmcp.requests.createRequestComment()`: **Added**\n* `opalmcp.scopedRolePermissions.getResourceScopedRolePermissions()`: **Removed** (Breaking ⚠️)\n* `opalmcp.scopedRolePermissions.setResourceScopedRolePermissions()`: **Removed** (Breaking ⚠️)\n* `opalmcp.configurationTemplates.createConfigurationTemplate()`: \n * `request.requestConfigurations[]` **Changed**\n* `opalmcp.configurationTemplates.updateConfigurationTemplate()`: \n * `request.requestConfigurations[]` **Changed**\n* `opalmcp.groups.updateGroups()`: \n * `request.groups[]` **Changed**\n * `response.groups[]` **Changed**\n* `opalmcp.groups.getGroupResources()`: `response.groupResources[]` **Changed**\n* `opalmcp.groups.getGroupContainingGroups()`: \n * `request.accessLevelRemoteId` **Added**\n * `response.containingGroups[]` **Changed**\n* `opalmcp.groups.addGroupContainingGroup()`: \n * `request.groupContainingGroup` **Changed**\n * `response` **Changed**\n* `opalmcp.groups.getGroupContainingGroup()`: `response` **Changed**\n* `opalmcp.groups.removeGroupContainingGroup()`: \n * `request.accessLevelRemoteId` **Added**\n* `opalmcp.groups.addGroupResource()`: `response` **Changed**\n* `opalmcp.groups.getGroupReviewerStages()`: `response.[].serviceUserIds` **Added**\n* `opalmcp.resources.getUserResources()`: **Added**\n* `opalmcp.requests.getRequestComments()`: **Added**\n* `opalmcp.requests.denyRequest()`: **Added**\n* `opalmcp.idpGroupMappings.createIdpGroupMapping()`: **Added**\n* `opalmcp.idpGroupMappings.getIdpGroupMapping()`: **Added**\n* `opalmcp.groups.getUserGroups()`: **Added**\n* `opalmcp.events.getEvent()`: **Added**\n* `opalmcp.idpGroupMappings.getIdpGroupMappings()`: `response.mappings[].appResourceId` **Added**\n* `opalmcp.requests.getRequests()`: \n * `request` **Changed**\n * `response.requests[]` **Changed**\n* `opalmcp.requests.getRequestsRelay()`: `response.edges[].node` **Changed**\n* `opalmcp.requests.getRequest()`: `response` **Changed**\n* `opalmcp.eventStreams.deleteEventStream()`: **Added**\n* `opalmcp.eventStreams.updateEventStream()`: **Added**\n* `opalmcp.resources.updateResources()`: \n * `request.resources[]` **Changed**\n * `response.resources[]` **Changed**\n* `opalmcp.eventStreams.createEventStream()`: **Added**\n* `opalmcp.eventStreams.getEventStreams()`: **Added**\n* `opalmcp.resources.getResourceReviewerStages()`: `response.[].serviceUserIds` **Added**\n* `opalmcp.resources.setResourceReviewerStages()`: \n * `request.reviewerStageList.stages[].serviceUserIds` **Added**\n * `response.[].serviceUserIds` **Added**\n* `opalmcp.campaigns.endCampaign()`: **Added**\n* `opalmcp.campaigns.stopCampaign()`: **Added**\n* `opalmcp.campaigns.startCampaign()`: **Added**\n* `opalmcp.campaigns.updateCampaign()`: **Added**\n* `opalmcp.users.getUsers()`: \n * `request.tagIds` **Added**\n* `opalmcp.accessRules.createAccessRule()`: \n * `request.ruleClauses.when.clauses[].attributeSelectors` **Added**\n * `response.ruleClauses.when.clauses[].attributeSelectors` **Added**\n* `opalmcp.accessRules.getAccessRule()`: `response.ruleClauses.when.clauses[].attributeSelectors` **Added**\n* `opalmcp.accessRules.updateAccessRule()`: \n * `request.updateAccessRuleInfo.ruleClauses.when.clauses[].attributeSelectors` **Added**\n * `response.ruleClauses.when.clauses[].attributeSelectors` **Added**\n* `opalmcp.uars.getUaRs()`: **Deprecated**\n* `opalmcp.campaigns.getCampaign()`: **Added**\n* `opalmcp.uars.createUar()`: **Deprecated**\n* `opalmcp.campaigns.createCampaign()`: **Added**\n* `opalmcp.uars.getUar()`: **Deprecated**\n* `opalmcp.campaigns.getCampaigns()`: **Added**\n" +generatedFiles: + - .devcontainer/README.md + - .devcontainer/devcontainer.json + - .devcontainer/setup.sh + - .gitattributes + - .npmignore + - FUNCTIONS.md + - RUNTIMES.md + - USAGE.md + - docs/lib/utils/retryconfig.md + - docs/models/components/access.md + - docs/models/components/accesslist.md + - docs/models/components/accessrule.md + - docs/models/components/accessrulestatus.md + - docs/models/components/activedirectorygroup.md + - docs/models/components/app.md + - docs/models/components/appslist.md + - docs/models/components/apptypeenum.md + - docs/models/components/appvalidation.md + - docs/models/components/appvalidationseverityenum.md + - docs/models/components/appvalidationstatusenum.md + - docs/models/components/awsaccount.md + - docs/models/components/awsec2instance.md + - docs/models/components/awsekscluster.md + - docs/models/components/awsiamrole.md + - docs/models/components/awsorganizationalunit.md + - docs/models/components/awspermissionset.md + - docs/models/components/awsrdsinstance.md + - docs/models/components/azureadmicrosoft365group.md + - docs/models/components/azureadsecuritygroup.md + - docs/models/components/bundle.md + - docs/models/components/bundlegroup.md + - docs/models/components/bundleinput.md + - docs/models/components/bundleresource.md + - docs/models/components/condition.md + - docs/models/components/configurationtemplate.md + - docs/models/components/createbundleinfo.md + - docs/models/components/createconfigurationtemplateinfo.md + - docs/models/components/creategroupbindinginfo.md + - docs/models/components/creategroupbindinginfogroup.md + - docs/models/components/creategroupinfo.md + - docs/models/components/createmessagechannelinfo.md + - docs/models/components/createoncallscheduleinfo.md + - docs/models/components/createownerinfo.md + - docs/models/components/createrequestconfigurationinfolist.md + - docs/models/components/createrequestinfo.md + - docs/models/components/createrequestinfogroup.md + - docs/models/components/createrequestinforesource.md + - docs/models/components/createresourceinfo.md + - docs/models/components/createtaginfo.md + - docs/models/components/createuarinfo.md + - docs/models/components/customconnector.md + - docs/models/components/custommetadatum.md + - docs/models/components/duogroup.md + - docs/models/components/entitytypeenum.md + - docs/models/components/event.md + - docs/models/components/fieldvalue.md + - docs/models/components/filteroperator.md + - docs/models/components/gcpbigquerydataset.md + - docs/models/components/gcpbigquerytable.md + - docs/models/components/gcpbucket.md + - docs/models/components/gcpcomputeinstance.md + - docs/models/components/gcpfolder.md + - docs/models/components/gcpgkecluster.md + - docs/models/components/gcporganization.md + - docs/models/components/gcpproject.md + - docs/models/components/gcpserviceaccount.md + - docs/models/components/gcpsqlinstance.md + - docs/models/components/githubrepo.md + - docs/models/components/githubteam.md + - docs/models/components/gitlabgroup.md + - docs/models/components/gitlabproject.md + - docs/models/components/googlegroup.md + - docs/models/components/googleworkspacerole.md + - docs/models/components/group.md + - docs/models/components/groupaccesslevel.md + - docs/models/components/groupbinding.md + - docs/models/components/groupbindinggroup.md + - docs/models/components/groupcontaininggroup.md + - docs/models/components/groupcontaininggrouplist.md + - docs/models/components/groupremoteinfo.md + - docs/models/components/groupresource.md + - docs/models/components/groupresourcelist.md + - docs/models/components/grouprisksensitivity.md + - docs/models/components/grouptypeenum.md + - docs/models/components/groupuser.md + - docs/models/components/groupuserlist.md + - docs/models/components/groupvisibility.md + - docs/models/components/idpgroupmapping.md + - docs/models/components/idpgroupmappinglist.md + - docs/models/components/ldapgroup.md + - docs/models/components/messagechannel.md + - docs/models/components/messagechannelidlist.md + - docs/models/components/messagechannellist.md + - docs/models/components/messagechannelproviderenum.md + - docs/models/components/oktaapp.md + - docs/models/components/oktacustomrole.md + - docs/models/components/oktagroup.md + - docs/models/components/oktagrouprule.md + - docs/models/components/oktastandardrole.md + - docs/models/components/oncallschedule.md + - docs/models/components/oncallscheduleidlist.md + - docs/models/components/oncallschedulelist.md + - docs/models/components/oncallscheduleproviderenum.md + - docs/models/components/operator.md + - docs/models/components/owner.md + - docs/models/components/pageinfo.md + - docs/models/components/pagerdutyrole.md + - docs/models/components/paginatedbundlegrouplist.md + - docs/models/components/paginatedbundlelist.md + - docs/models/components/paginatedbundleresourcelist.md + - docs/models/components/paginatedconfigurationtemplatelist.md + - docs/models/components/paginatedeventlist.md + - docs/models/components/paginatedgroupbindingslist.md + - docs/models/components/paginatedgroupslist.md + - docs/models/components/paginatedownerslist.md + - docs/models/components/paginatedresourceslist.md + - docs/models/components/paginatedtagslist.md + - docs/models/components/paginateduarslist.md + - docs/models/components/paginateduserslist.md + - docs/models/components/propagationstatus.md + - docs/models/components/propagationstatusenum.md + - docs/models/components/requestconfiguration.md + - docs/models/components/requestconnection.md + - docs/models/components/requestcustomfieldresponse.md + - docs/models/components/requestedge.md + - docs/models/components/requesteditem.md + - docs/models/components/requestitemstages.md + - docs/models/components/requestlist.md + - docs/models/components/requestreviewer.md + - docs/models/components/requestreviewerstatus.md + - docs/models/components/requeststage.md + - docs/models/components/requeststatusenum.md + - docs/models/components/requestt.md + - docs/models/components/requesttemplatecustomfieldtypeenum.md + - docs/models/components/resource.md + - docs/models/components/resourceaccesslevel.md + - docs/models/components/resourceaccessuser.md + - docs/models/components/resourceaccessuserlist.md + - docs/models/components/resourcenhi.md + - docs/models/components/resourceremoteinfo.md + - docs/models/components/resourcerisksensitivity.md + - docs/models/components/resourcetypeenum.md + - docs/models/components/resourceuser.md + - docs/models/components/resourceuseraccessstatus.md + - docs/models/components/resourceuseraccessstatusenum.md + - docs/models/components/resourcewithaccesslevel.md + - docs/models/components/revieweridlist.md + - docs/models/components/reviewerstage.md + - docs/models/components/reviewerstagelist.md + - docs/models/components/reviewstageoperator.md + - docs/models/components/risksensitivityenum.md + - docs/models/components/rolepermissionnameenum.md + - docs/models/components/rolepermissiontargettypeenum.md + - docs/models/components/ruleclauses.md + - docs/models/components/ruleconjunction.md + - docs/models/components/ruledisjunction.md + - docs/models/components/salesforcepermissionset.md + - docs/models/components/salesforceprofile.md + - docs/models/components/salesforcerole.md + - docs/models/components/scopedrolepermission.md + - docs/models/components/scopedrolepermissionlist.md + - docs/models/components/security.md + - docs/models/components/session.md + - docs/models/components/sessionslist.md + - docs/models/components/snowflakerole.md + - docs/models/components/subevent.md + - docs/models/components/supportticket.md + - docs/models/components/syncerror.md + - docs/models/components/syncerrorlist.md + - docs/models/components/tag.md + - docs/models/components/tagfilter.md + - docs/models/components/tagselector.md + - docs/models/components/tagslist.md + - docs/models/components/teleportrole.md + - docs/models/components/ticketingproviderenum.md + - docs/models/components/ticketpropagationconfiguration.md + - docs/models/components/uar.md + - docs/models/components/uarreviewerassignmentpolicyenum.md + - docs/models/components/uarscope.md + - docs/models/components/updateaccessruleinfo.md + - docs/models/components/updateaccessruleinfostatus.md + - docs/models/components/updateconfigurationtemplateinfo.md + - docs/models/components/updategroupbindinginfo.md + - docs/models/components/updategroupbindinginfogroup.md + - docs/models/components/updategroupbindinginfolist.md + - docs/models/components/updategroupinfo.md + - docs/models/components/updategroupinfolist.md + - docs/models/components/updategroupresourcesinfo.md + - docs/models/components/updateownerinfo.md + - docs/models/components/updateownerinfolist.md + - docs/models/components/updateresourceinfo.md + - docs/models/components/updateresourceinfolist.md + - docs/models/components/user.md + - docs/models/components/userhridpstatusenum.md + - docs/models/components/useridlist.md + - docs/models/components/userlist.md + - docs/models/components/visibilityinfo.md + - docs/models/components/visibilitytypeenum.md + - docs/models/components/workdayusersecuritygroup.md + - docs/models/operations/addbundlegrouprequest.md + - docs/models/operations/addbundlegrouprequestbody.md + - docs/models/operations/addbundleresourcerequest.md + - docs/models/operations/addbundleresourcerequestbody.md + - docs/models/operations/addgroupcontaininggrouprequest.md + - docs/models/operations/addgroupresourcerequest.md + - docs/models/operations/addgroupresourcerequestbody.md + - docs/models/operations/addgrouptagrequest.md + - docs/models/operations/addgroupuserrequest.md + - docs/models/operations/addgroupuserrequestbody.md + - docs/models/operations/addresourcenhirequest.md + - docs/models/operations/addresourcenhirequestbody.md + - docs/models/operations/addresourcetagrequest.md + - docs/models/operations/addresourceuserrequest.md + - docs/models/operations/addresourceuserrequestbody.md + - docs/models/operations/addusertagrequest.md + - docs/models/operations/addusertagrequestbody.md + - docs/models/operations/approverequestrequest.md + - docs/models/operations/approverequestrequestbody.md + - docs/models/operations/approverequestresponse.md + - docs/models/operations/createrequestresponse.md + - docs/models/operations/createtagrequest.md + - docs/models/operations/deletebundlerequest.md + - docs/models/operations/deleteconfigurationtemplaterequest.md + - docs/models/operations/deletegroupbindingrequest.md + - docs/models/operations/deletegrouprequest.md + - docs/models/operations/deletegroupuserrequest.md + - docs/models/operations/deleteidpgroupmappingsrequest.md + - docs/models/operations/deleteownerrequest.md + - docs/models/operations/deleteresourcenhirequest.md + - docs/models/operations/deleteresourcerequest.md + - docs/models/operations/deleteresourceuserrequest.md + - docs/models/operations/deletetagbyidrequest.md + - docs/models/operations/eventsrequest.md + - docs/models/operations/eventsresponse.md + - docs/models/operations/getaccessrulerequest.md + - docs/models/operations/getapprequest.md + - docs/models/operations/getappsrequest.md + - docs/models/operations/getbundlegroupsrequest.md + - docs/models/operations/getbundlegroupsresponse.md + - docs/models/operations/getbundlerequest.md + - docs/models/operations/getbundleresourcesrequest.md + - docs/models/operations/getbundleresourcesresponse.md + - docs/models/operations/getbundlesrequest.md + - docs/models/operations/getbundlesresponse.md + - docs/models/operations/getbundlevisibilityrequest.md + - docs/models/operations/getgroupbindingrequest.md + - docs/models/operations/getgroupbindingsrequest.md + - docs/models/operations/getgroupbindingsresponse.md + - docs/models/operations/getgroupcontaininggrouprequest.md + - docs/models/operations/getgroupcontaininggroupsrequest.md + - docs/models/operations/getgroupmessagechannelsrequest.md + - docs/models/operations/getgrouponcallschedulesrequest.md + - docs/models/operations/getgrouprequest.md + - docs/models/operations/getgroupresourcesrequest.md + - docs/models/operations/getgroupreviewersrequest.md + - docs/models/operations/getgroupreviewerstagesrequest.md + - docs/models/operations/getgroupsrequest.md + - docs/models/operations/getgroupsresponse.md + - docs/models/operations/getgrouptagsrequest.md + - docs/models/operations/getgroupusersrequest.md + - docs/models/operations/getgroupvisibilityrequest.md + - docs/models/operations/getidpgroupmappingsrequest.md + - docs/models/operations/getmessagechannelrequest.md + - docs/models/operations/getnhisrequest.md + - docs/models/operations/getnhisresponse.md + - docs/models/operations/getoncallschedulerequest.md + - docs/models/operations/getownerfromnamerequest.md + - docs/models/operations/getownerrequest.md + - docs/models/operations/getownersrequest.md + - docs/models/operations/getownersresponse.md + - docs/models/operations/getownerusersrequest.md + - docs/models/operations/getrequestrequest.md + - docs/models/operations/getrequestsrelayrequest.md + - docs/models/operations/getrequestsrequest.md + - docs/models/operations/getrequestsresponse.md + - docs/models/operations/getresourcemessagechannelsrequest.md + - docs/models/operations/getresourcenhisrequest.md + - docs/models/operations/getresourcerequest.md + - docs/models/operations/getresourcereviewersrequest.md + - docs/models/operations/getresourcereviewerstagesrequest.md + - docs/models/operations/getresourcescopedrolepermissionsrequest.md + - docs/models/operations/getresourcesrequest.md + - docs/models/operations/getresourcesresponse.md + - docs/models/operations/getresourcetagsrequest.md + - docs/models/operations/getresourceuserrequest.md + - docs/models/operations/getresourceuserresponse.md + - docs/models/operations/getresourceusersrequest.md + - docs/models/operations/getresourcevisibilityrequest.md + - docs/models/operations/getsyncerrorsrequest.md + - docs/models/operations/gettagbyidrequest.md + - docs/models/operations/gettagrequest.md + - docs/models/operations/gettagsrequest.md + - docs/models/operations/gettagsresponse.md + - docs/models/operations/getuarrequest.md + - docs/models/operations/getuarsrequest.md + - docs/models/operations/getuarsresponse.md + - docs/models/operations/getusersrequest.md + - docs/models/operations/getusersresponse.md + - docs/models/operations/getusertagsrequest.md + - docs/models/operations/level.md + - docs/models/operations/mapping.md + - docs/models/operations/removebundlegrouprequest.md + - docs/models/operations/removebundleresourcerequest.md + - docs/models/operations/removegroupcontaininggrouprequest.md + - docs/models/operations/removegrouptagrequest.md + - docs/models/operations/removeresourcetagrequest.md + - docs/models/operations/removeusertagrequest.md + - docs/models/operations/resourceuseraccessstatusretrieverequest.md + - docs/models/operations/sessionsrequest.md + - docs/models/operations/setbundlevisibilityrequest.md + - docs/models/operations/setgroupmessagechannelsrequest.md + - docs/models/operations/setgrouponcallschedulesrequest.md + - docs/models/operations/setgroupresourcesrequest.md + - docs/models/operations/setgroupreviewersrequest.md + - docs/models/operations/setgroupreviewerstagesrequest.md + - docs/models/operations/setgroupvisibilityrequest.md + - docs/models/operations/setownerusersrequest.md + - docs/models/operations/setresourcemessagechannelsrequest.md + - docs/models/operations/setresourcereviewersrequest.md + - docs/models/operations/setresourcereviewerstagesrequest.md + - docs/models/operations/setresourcescopedrolepermissionsrequest.md + - docs/models/operations/setresourcevisibilityrequest.md + - docs/models/operations/updateaccessrulerequest.md + - docs/models/operations/updatebundlerequest.md + - docs/models/operations/updategroupuserrequest.md + - docs/models/operations/updategroupuserrequestbody.md + - docs/models/operations/updateidpgroupmappingsrequest.md + - docs/models/operations/updateidpgroupmappingsrequestbody.md + - docs/models/operations/updateresourceuserrequest.md + - docs/models/operations/updateresourceuserrequestbody.md + - docs/models/operations/userrequest.md + - docs/sdks/accessrules/README.md + - docs/sdks/apps/README.md + - docs/sdks/bundles/README.md + - docs/sdks/configurationtemplates/README.md + - docs/sdks/events/README.md + - docs/sdks/groupbindings/README.md + - docs/sdks/groups/README.md + - docs/sdks/idpgroupmappings/README.md + - docs/sdks/messagechannels/README.md + - docs/sdks/nonhumanidentities/README.md + - docs/sdks/oncallschedules/README.md + - docs/sdks/opalmcp/README.md + - docs/sdks/owners/README.md + - docs/sdks/requests/README.md + - docs/sdks/resources/README.md + - docs/sdks/scopedrolepermissions/README.md + - docs/sdks/sessions/README.md + - docs/sdks/tags/README.md + - docs/sdks/uars/README.md + - docs/sdks/users/README.md + - eslint.config.mjs + - examples/.env.template + - examples/README.md + - examples/appsGetApps.example.ts + - examples/package.json + - jsr.json + - package.json + - src/core.ts + - src/funcs/accessRulesCreateAccessRule.ts + - src/funcs/accessRulesGetAccessRule.ts + - src/funcs/accessRulesUpdateAccessRule.ts + - src/funcs/appsGetApp.ts + - src/funcs/appsGetApps.ts + - src/funcs/appsGetSyncErrors.ts + - src/funcs/bundlesAddBundleGroup.ts + - src/funcs/bundlesAddBundleResource.ts + - src/funcs/bundlesCreateBundle.ts + - src/funcs/bundlesDeleteBundle.ts + - src/funcs/bundlesGetBundle.ts + - src/funcs/bundlesGetBundleGroups.ts + - src/funcs/bundlesGetBundleResources.ts + - src/funcs/bundlesGetBundleVisibility.ts + - src/funcs/bundlesGetBundles.ts + - src/funcs/bundlesRemoveBundleGroup.ts + - src/funcs/bundlesRemoveBundleResource.ts + - src/funcs/bundlesSetBundleVisibility.ts + - src/funcs/bundlesUpdateBundle.ts + - src/funcs/configurationTemplatesCreateConfigurationTemplate.ts + - src/funcs/configurationTemplatesDeleteConfigurationTemplate.ts + - src/funcs/configurationTemplatesGetConfigurationTemplates.ts + - src/funcs/configurationTemplatesUpdateConfigurationTemplate.ts + - src/funcs/eventsEvents.ts + - src/funcs/groupBindingsCreateGroupBinding.ts + - src/funcs/groupBindingsDeleteGroupBinding.ts + - src/funcs/groupBindingsGetGroupBinding.ts + - src/funcs/groupBindingsGetGroupBindings.ts + - src/funcs/groupBindingsUpdateGroupBindings.ts + - src/funcs/groupsAddGroupContainingGroup.ts + - src/funcs/groupsAddGroupResource.ts + - src/funcs/groupsAddGroupUser.ts + - src/funcs/groupsCreateGroup.ts + - src/funcs/groupsDeleteGroup.ts + - src/funcs/groupsDeleteGroupUser.ts + - src/funcs/groupsGetGroup.ts + - src/funcs/groupsGetGroupContainingGroup.ts + - src/funcs/groupsGetGroupContainingGroups.ts + - src/funcs/groupsGetGroupMessageChannels.ts + - src/funcs/groupsGetGroupOnCallSchedules.ts + - src/funcs/groupsGetGroupResources.ts + - src/funcs/groupsGetGroupReviewerStages.ts + - src/funcs/groupsGetGroupReviewers.ts + - src/funcs/groupsGetGroupTags.ts + - src/funcs/groupsGetGroupUsers.ts + - src/funcs/groupsGetGroupVisibility.ts + - src/funcs/groupsGetGroups.ts + - src/funcs/groupsRemoveGroupContainingGroup.ts + - src/funcs/groupsSetGroupMessageChannels.ts + - src/funcs/groupsSetGroupOnCallSchedules.ts + - src/funcs/groupsSetGroupResources.ts + - src/funcs/groupsSetGroupReviewerStages.ts + - src/funcs/groupsSetGroupReviewers.ts + - src/funcs/groupsSetGroupVisibility.ts + - src/funcs/groupsUpdateGroupUser.ts + - src/funcs/groupsUpdateGroups.ts + - src/funcs/idpGroupMappingsDeleteIdpGroupMappings.ts + - src/funcs/idpGroupMappingsGetIdpGroupMappings.ts + - src/funcs/idpGroupMappingsUpdateIdpGroupMappings.ts + - src/funcs/messageChannelsCreateMessageChannel.ts + - src/funcs/messageChannelsGetMessageChannel.ts + - src/funcs/messageChannelsGetMessageChannels.ts + - src/funcs/nonHumanIdentitiesGetNhis.ts + - src/funcs/onCallSchedulesCreateOnCallSchedule.ts + - src/funcs/onCallSchedulesGetOnCallSchedule.ts + - src/funcs/onCallSchedulesGetOnCallSchedules.ts + - src/funcs/ownersCreateOwner.ts + - src/funcs/ownersDeleteOwner.ts + - src/funcs/ownersGetOwner.ts + - src/funcs/ownersGetOwnerFromName.ts + - src/funcs/ownersGetOwnerUsers.ts + - src/funcs/ownersGetOwners.ts + - src/funcs/ownersSetOwnerUsers.ts + - src/funcs/ownersUpdateOwners.ts + - src/funcs/requestsApproveRequest.ts + - src/funcs/requestsCreateRequest.ts + - src/funcs/requestsGetRequest.ts + - src/funcs/requestsGetRequests.ts + - src/funcs/requestsGetRequestsRelay.ts + - src/funcs/resourcesAddResourceNhi.ts + - src/funcs/resourcesAddResourceUser.ts + - src/funcs/resourcesCreateResource.ts + - src/funcs/resourcesDeleteResource.ts + - src/funcs/resourcesDeleteResourceNhi.ts + - src/funcs/resourcesDeleteResourceUser.ts + - src/funcs/resourcesGetResource.ts + - src/funcs/resourcesGetResourceMessageChannels.ts + - src/funcs/resourcesGetResourceNhis.ts + - src/funcs/resourcesGetResourceReviewerStages.ts + - src/funcs/resourcesGetResourceReviewers.ts + - src/funcs/resourcesGetResourceScopedRolePermissions.ts + - src/funcs/resourcesGetResourceTags.ts + - src/funcs/resourcesGetResourceUser.ts + - src/funcs/resourcesGetResourceUsers.ts + - src/funcs/resourcesGetResourceVisibility.ts + - src/funcs/resourcesGetResources.ts + - src/funcs/resourcesResourceUserAccessStatusRetrieve.ts + - src/funcs/resourcesSetResourceMessageChannels.ts + - src/funcs/resourcesSetResourceReviewerStages.ts + - src/funcs/resourcesSetResourceReviewers.ts + - src/funcs/resourcesSetResourceScopedRolePermissions.ts + - src/funcs/resourcesSetResourceVisibility.ts + - src/funcs/resourcesUpdateResourceUser.ts + - src/funcs/resourcesUpdateResources.ts + - src/funcs/sessionsSessions.ts + - src/funcs/tagsAddGroupTag.ts + - src/funcs/tagsAddResourceTag.ts + - src/funcs/tagsAddUserTag.ts + - src/funcs/tagsCreateTag.ts + - src/funcs/tagsDeleteTagByID.ts + - src/funcs/tagsGetTag.ts + - src/funcs/tagsGetTagByID.ts + - src/funcs/tagsGetTags.ts + - src/funcs/tagsRemoveGroupTag.ts + - src/funcs/tagsRemoveResourceTag.ts + - src/funcs/tagsRemoveUserTag.ts + - src/funcs/uarsCreateUar.ts + - src/funcs/uarsGetUARs.ts + - src/funcs/uarsGetUar.ts + - src/funcs/usersGetUserTags.ts + - src/funcs/usersGetUsers.ts + - src/funcs/usersUser.ts + - src/hooks/hooks.ts + - src/hooks/index.ts + - src/hooks/types.ts + - src/index.ts + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/dlv.ts + - src/lib/encodings.ts + - src/lib/env.ts + - src/lib/files.ts + - src/lib/http.ts + - src/lib/is-plain-object.ts + - src/lib/logger.ts + - src/lib/matchers.ts + - src/lib/primitives.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/mcp-server/build.mts + - src/mcp-server/cli.ts + - src/mcp-server/cli/start/command.ts + - src/mcp-server/cli/start/impl.ts + - src/mcp-server/console-logger.ts + - src/mcp-server/extensions.ts + - src/mcp-server/mcp-server.ts + - src/mcp-server/prompts.ts + - src/mcp-server/resources.ts + - src/mcp-server/scopes.ts + - src/mcp-server/server.ts + - src/mcp-server/shared.ts + - src/mcp-server/tools.ts + - src/mcp-server/tools/accessRulesCreateAccessRule.ts + - src/mcp-server/tools/accessRulesGetAccessRule.ts + - src/mcp-server/tools/accessRulesUpdateAccessRule.ts + - src/mcp-server/tools/appsGetApp.ts + - src/mcp-server/tools/appsGetApps.ts + - src/mcp-server/tools/appsGetSyncErrors.ts + - src/mcp-server/tools/bundlesAddBundleGroup.ts + - src/mcp-server/tools/bundlesAddBundleResource.ts + - src/mcp-server/tools/bundlesCreateBundle.ts + - src/mcp-server/tools/bundlesDeleteBundle.ts + - src/mcp-server/tools/bundlesGetBundle.ts + - src/mcp-server/tools/bundlesGetBundleGroups.ts + - src/mcp-server/tools/bundlesGetBundleResources.ts + - src/mcp-server/tools/bundlesGetBundleVisibility.ts + - src/mcp-server/tools/bundlesGetBundles.ts + - src/mcp-server/tools/bundlesRemoveBundleGroup.ts + - src/mcp-server/tools/bundlesRemoveBundleResource.ts + - src/mcp-server/tools/bundlesSetBundleVisibility.ts + - src/mcp-server/tools/bundlesUpdateBundle.ts + - src/mcp-server/tools/configurationTemplatesCreateConfigurationTemplate.ts + - src/mcp-server/tools/configurationTemplatesDeleteConfigurationTemplate.ts + - src/mcp-server/tools/configurationTemplatesGetConfigurationTemplates.ts + - src/mcp-server/tools/configurationTemplatesUpdateConfigurationTemplate.ts + - src/mcp-server/tools/eventsEvents.ts + - src/mcp-server/tools/groupBindingsCreateGroupBinding.ts + - src/mcp-server/tools/groupBindingsDeleteGroupBinding.ts + - src/mcp-server/tools/groupBindingsGetGroupBinding.ts + - src/mcp-server/tools/groupBindingsGetGroupBindings.ts + - src/mcp-server/tools/groupBindingsUpdateGroupBindings.ts + - src/mcp-server/tools/groupsAddGroupContainingGroup.ts + - src/mcp-server/tools/groupsAddGroupResource.ts + - src/mcp-server/tools/groupsAddGroupUser.ts + - src/mcp-server/tools/groupsCreateGroup.ts + - src/mcp-server/tools/groupsDeleteGroup.ts + - src/mcp-server/tools/groupsDeleteGroupUser.ts + - src/mcp-server/tools/groupsGetGroup.ts + - src/mcp-server/tools/groupsGetGroupContainingGroup.ts + - src/mcp-server/tools/groupsGetGroupContainingGroups.ts + - src/mcp-server/tools/groupsGetGroupMessageChannels.ts + - src/mcp-server/tools/groupsGetGroupOnCallSchedules.ts + - src/mcp-server/tools/groupsGetGroupResources.ts + - src/mcp-server/tools/groupsGetGroupReviewerStages.ts + - src/mcp-server/tools/groupsGetGroupReviewers.ts + - src/mcp-server/tools/groupsGetGroupTags.ts + - src/mcp-server/tools/groupsGetGroupUsers.ts + - src/mcp-server/tools/groupsGetGroupVisibility.ts + - src/mcp-server/tools/groupsGetGroups.ts + - src/mcp-server/tools/groupsRemoveGroupContainingGroup.ts + - src/mcp-server/tools/groupsSetGroupMessageChannels.ts + - src/mcp-server/tools/groupsSetGroupOnCallSchedules.ts + - src/mcp-server/tools/groupsSetGroupResources.ts + - src/mcp-server/tools/groupsSetGroupReviewerStages.ts + - src/mcp-server/tools/groupsSetGroupReviewers.ts + - src/mcp-server/tools/groupsSetGroupVisibility.ts + - src/mcp-server/tools/groupsUpdateGroupUser.ts + - src/mcp-server/tools/groupsUpdateGroups.ts + - src/mcp-server/tools/idpGroupMappingsDeleteIdpGroupMappings.ts + - src/mcp-server/tools/idpGroupMappingsGetIdpGroupMappings.ts + - src/mcp-server/tools/idpGroupMappingsUpdateIdpGroupMappings.ts + - src/mcp-server/tools/messageChannelsCreateMessageChannel.ts + - src/mcp-server/tools/messageChannelsGetMessageChannel.ts + - src/mcp-server/tools/messageChannelsGetMessageChannels.ts + - src/mcp-server/tools/nonHumanIdentitiesGetNhis.ts + - src/mcp-server/tools/onCallSchedulesCreateOnCallSchedule.ts + - src/mcp-server/tools/onCallSchedulesGetOnCallSchedule.ts + - src/mcp-server/tools/onCallSchedulesGetOnCallSchedules.ts + - src/mcp-server/tools/ownersCreateOwner.ts + - src/mcp-server/tools/ownersDeleteOwner.ts + - src/mcp-server/tools/ownersGetOwner.ts + - src/mcp-server/tools/ownersGetOwnerFromName.ts + - src/mcp-server/tools/ownersGetOwnerUsers.ts + - src/mcp-server/tools/ownersGetOwners.ts + - src/mcp-server/tools/ownersSetOwnerUsers.ts + - src/mcp-server/tools/ownersUpdateOwners.ts + - src/mcp-server/tools/requestsApproveRequest.ts + - src/mcp-server/tools/requestsCreateRequest.ts + - src/mcp-server/tools/requestsGetRequest.ts + - src/mcp-server/tools/requestsGetRequests.ts + - src/mcp-server/tools/requestsGetRequestsRelay.ts + - src/mcp-server/tools/resourcesAddResourceNhi.ts + - src/mcp-server/tools/resourcesAddResourceUser.ts + - src/mcp-server/tools/resourcesCreateResource.ts + - src/mcp-server/tools/resourcesDeleteResource.ts + - src/mcp-server/tools/resourcesDeleteResourceNhi.ts + - src/mcp-server/tools/resourcesDeleteResourceUser.ts + - src/mcp-server/tools/resourcesGetResource.ts + - src/mcp-server/tools/resourcesGetResourceMessageChannels.ts + - src/mcp-server/tools/resourcesGetResourceNhis.ts + - src/mcp-server/tools/resourcesGetResourceReviewerStages.ts + - src/mcp-server/tools/resourcesGetResourceReviewers.ts + - src/mcp-server/tools/resourcesGetResourceScopedRolePermissions.ts + - src/mcp-server/tools/resourcesGetResourceTags.ts + - src/mcp-server/tools/resourcesGetResourceUser.ts + - src/mcp-server/tools/resourcesGetResourceUsers.ts + - src/mcp-server/tools/resourcesGetResourceVisibility.ts + - src/mcp-server/tools/resourcesGetResources.ts + - src/mcp-server/tools/resourcesResourceUserAccessStatusRetrieve.ts + - src/mcp-server/tools/resourcesSetResourceMessageChannels.ts + - src/mcp-server/tools/resourcesSetResourceReviewerStages.ts + - src/mcp-server/tools/resourcesSetResourceReviewers.ts + - src/mcp-server/tools/resourcesSetResourceScopedRolePermissions.ts + - src/mcp-server/tools/resourcesSetResourceVisibility.ts + - src/mcp-server/tools/resourcesUpdateResourceUser.ts + - src/mcp-server/tools/resourcesUpdateResources.ts + - src/mcp-server/tools/sessionsSessions.ts + - src/mcp-server/tools/tagsAddGroupTag.ts + - src/mcp-server/tools/tagsAddResourceTag.ts + - src/mcp-server/tools/tagsAddUserTag.ts + - src/mcp-server/tools/tagsCreateTag.ts + - src/mcp-server/tools/tagsDeleteTagByID.ts + - src/mcp-server/tools/tagsGetTag.ts + - src/mcp-server/tools/tagsGetTagByID.ts + - src/mcp-server/tools/tagsGetTags.ts + - src/mcp-server/tools/tagsRemoveGroupTag.ts + - src/mcp-server/tools/tagsRemoveResourceTag.ts + - src/mcp-server/tools/tagsRemoveUserTag.ts + - src/mcp-server/tools/uarsCreateUar.ts + - src/mcp-server/tools/uarsGetUARs.ts + - src/mcp-server/tools/uarsGetUar.ts + - src/mcp-server/tools/usersGetUserTags.ts + - src/mcp-server/tools/usersGetUsers.ts + - src/mcp-server/tools/usersUser.ts + - src/models/components/access.ts + - src/models/components/accesslist.ts + - src/models/components/accessrule.ts + - src/models/components/app.ts + - src/models/components/appslist.ts + - src/models/components/apptypeenum.ts + - src/models/components/appvalidation.ts + - src/models/components/appvalidationseverityenum.ts + - src/models/components/appvalidationstatusenum.ts + - src/models/components/bundle.ts + - src/models/components/bundlegroup.ts + - src/models/components/bundleinput.ts + - src/models/components/bundleresource.ts + - src/models/components/condition.ts + - src/models/components/configurationtemplate.ts + - src/models/components/createbundleinfo.ts + - src/models/components/createconfigurationtemplateinfo.ts + - src/models/components/creategroupbindinginfo.ts + - src/models/components/creategroupinfo.ts + - src/models/components/createmessagechannelinfo.ts + - src/models/components/createoncallscheduleinfo.ts + - src/models/components/createownerinfo.ts + - src/models/components/createrequestconfigurationinfolist.ts + - src/models/components/createrequestinfo.ts + - src/models/components/createresourceinfo.ts + - src/models/components/createtaginfo.ts + - src/models/components/createuarinfo.ts + - src/models/components/entitytypeenum.ts + - src/models/components/event.ts + - src/models/components/group.ts + - src/models/components/groupaccesslevel.ts + - src/models/components/groupbinding.ts + - src/models/components/groupbindinggroup.ts + - src/models/components/groupcontaininggroup.ts + - src/models/components/groupcontaininggrouplist.ts + - src/models/components/groupremoteinfo.ts + - src/models/components/groupresource.ts + - src/models/components/groupresourcelist.ts + - src/models/components/grouptypeenum.ts + - src/models/components/groupuser.ts + - src/models/components/groupuserlist.ts + - src/models/components/idpgroupmapping.ts + - src/models/components/idpgroupmappinglist.ts + - src/models/components/index.ts + - src/models/components/messagechannel.ts + - src/models/components/messagechannelidlist.ts + - src/models/components/messagechannellist.ts + - src/models/components/messagechannelproviderenum.ts + - src/models/components/oncallschedule.ts + - src/models/components/oncallscheduleidlist.ts + - src/models/components/oncallschedulelist.ts + - src/models/components/oncallscheduleproviderenum.ts + - src/models/components/owner.ts + - src/models/components/pageinfo.ts + - src/models/components/paginatedbundlegrouplist.ts + - src/models/components/paginatedbundlelist.ts + - src/models/components/paginatedbundleresourcelist.ts + - src/models/components/paginatedconfigurationtemplatelist.ts + - src/models/components/paginatedeventlist.ts + - src/models/components/paginatedgroupbindingslist.ts + - src/models/components/paginatedgroupslist.ts + - src/models/components/paginatedownerslist.ts + - src/models/components/paginatedresourceslist.ts + - src/models/components/paginatedtagslist.ts + - src/models/components/paginateduarslist.ts + - src/models/components/paginateduserslist.ts + - src/models/components/propagationstatus.ts + - src/models/components/propagationstatusenum.ts + - src/models/components/request.ts + - src/models/components/requestconfiguration.ts + - src/models/components/requestconnection.ts + - src/models/components/requestcustomfieldresponse.ts + - src/models/components/requestedge.ts + - src/models/components/requesteditem.ts + - src/models/components/requestitemstages.ts + - src/models/components/requestlist.ts + - src/models/components/requestreviewer.ts + - src/models/components/requeststage.ts + - src/models/components/requeststatusenum.ts + - src/models/components/requesttemplatecustomfieldtypeenum.ts + - src/models/components/resource.ts + - src/models/components/resourceaccesslevel.ts + - src/models/components/resourceaccessuser.ts + - src/models/components/resourceaccessuserlist.ts + - src/models/components/resourcenhi.ts + - src/models/components/resourceremoteinfo.ts + - src/models/components/resourcetypeenum.ts + - src/models/components/resourceuser.ts + - src/models/components/resourceuseraccessstatus.ts + - src/models/components/resourceuseraccessstatusenum.ts + - src/models/components/resourcewithaccesslevel.ts + - src/models/components/revieweridlist.ts + - src/models/components/reviewerstage.ts + - src/models/components/reviewerstagelist.ts + - src/models/components/reviewstageoperator.ts + - src/models/components/risksensitivityenum.ts + - src/models/components/rolepermissionnameenum.ts + - src/models/components/rolepermissiontargettypeenum.ts + - src/models/components/ruleclauses.ts + - src/models/components/ruleconjunction.ts + - src/models/components/ruledisjunction.ts + - src/models/components/scopedrolepermission.ts + - src/models/components/scopedrolepermissionlist.ts + - src/models/components/security.ts + - src/models/components/session.ts + - src/models/components/sessionslist.ts + - src/models/components/subevent.ts + - src/models/components/syncerror.ts + - src/models/components/syncerrorlist.ts + - src/models/components/tag.ts + - src/models/components/tagfilter.ts + - src/models/components/tagselector.ts + - src/models/components/tagslist.ts + - src/models/components/ticketingproviderenum.ts + - src/models/components/ticketpropagationconfiguration.ts + - src/models/components/uar.ts + - src/models/components/uarreviewerassignmentpolicyenum.ts + - src/models/components/uarscope.ts + - src/models/components/updateaccessruleinfo.ts + - src/models/components/updateconfigurationtemplateinfo.ts + - src/models/components/updategroupbindinginfo.ts + - src/models/components/updategroupbindinginfolist.ts + - src/models/components/updategroupinfo.ts + - src/models/components/updategroupinfolist.ts + - src/models/components/updategroupresourcesinfo.ts + - src/models/components/updateownerinfo.ts + - src/models/components/updateownerinfolist.ts + - src/models/components/updateresourceinfo.ts + - src/models/components/updateresourceinfolist.ts + - src/models/components/user.ts + - src/models/components/userhridpstatusenum.ts + - src/models/components/useridlist.ts + - src/models/components/userlist.ts + - src/models/components/visibilityinfo.ts + - src/models/components/visibilitytypeenum.ts + - src/models/errors/apierror.ts + - src/models/errors/httpclienterrors.ts + - src/models/errors/index.ts + - src/models/errors/opalmcperror.ts + - src/models/errors/responsevalidationerror.ts + - src/models/errors/sdkvalidationerror.ts + - src/models/operations/addbundlegroup.ts + - src/models/operations/addbundleresource.ts + - src/models/operations/addgroupcontaininggroup.ts + - src/models/operations/addgroupresource.ts + - src/models/operations/addgrouptag.ts + - src/models/operations/addgroupuser.ts + - src/models/operations/addresourcenhi.ts + - src/models/operations/addresourcetag.ts + - src/models/operations/addresourceuser.ts + - src/models/operations/addusertag.ts + - src/models/operations/approverequest.ts + - src/models/operations/createrequest.ts + - src/models/operations/createtag.ts + - src/models/operations/deletebundle.ts + - src/models/operations/deleteconfigurationtemplate.ts + - src/models/operations/deletegroup.ts + - src/models/operations/deletegroupbinding.ts + - src/models/operations/deletegroupuser.ts + - src/models/operations/deleteidpgroupmappings.ts + - src/models/operations/deleteowner.ts + - src/models/operations/deleteresource.ts + - src/models/operations/deleteresourcenhi.ts + - src/models/operations/deleteresourceuser.ts + - src/models/operations/deletetagbyid.ts + - src/models/operations/events.ts + - src/models/operations/getaccessrule.ts + - src/models/operations/getapp.ts + - src/models/operations/getapps.ts + - src/models/operations/getbundle.ts + - src/models/operations/getbundlegroups.ts + - src/models/operations/getbundleresources.ts + - src/models/operations/getbundles.ts + - src/models/operations/getbundlevisibility.ts + - src/models/operations/getgroup.ts + - src/models/operations/getgroupbinding.ts + - src/models/operations/getgroupbindings.ts + - src/models/operations/getgroupcontaininggroup.ts + - src/models/operations/getgroupcontaininggroups.ts + - src/models/operations/getgroupmessagechannels.ts + - src/models/operations/getgrouponcallschedules.ts + - src/models/operations/getgroupresources.ts + - src/models/operations/getgroupreviewers.ts + - src/models/operations/getgroupreviewerstages.ts + - src/models/operations/getgroups.ts + - src/models/operations/getgrouptags.ts + - src/models/operations/getgroupusers.ts + - src/models/operations/getgroupvisibility.ts + - src/models/operations/getidpgroupmappings.ts + - src/models/operations/getmessagechannel.ts + - src/models/operations/getnhis.ts + - src/models/operations/getoncallschedule.ts + - src/models/operations/getowner.ts + - src/models/operations/getownerfromname.ts + - src/models/operations/getowners.ts + - src/models/operations/getownerusers.ts + - src/models/operations/getrequest.ts + - src/models/operations/getrequests.ts + - src/models/operations/getrequestsrelay.ts + - src/models/operations/getresource.ts + - src/models/operations/getresourcemessagechannels.ts + - src/models/operations/getresourcenhis.ts + - src/models/operations/getresourcereviewers.ts + - src/models/operations/getresourcereviewerstages.ts + - src/models/operations/getresources.ts + - src/models/operations/getresourcescopedrolepermissions.ts + - src/models/operations/getresourcetags.ts + - src/models/operations/getresourceuser.ts + - src/models/operations/getresourceusers.ts + - src/models/operations/getresourcevisibility.ts + - src/models/operations/getsyncerrors.ts + - src/models/operations/gettag.ts + - src/models/operations/gettagbyid.ts + - src/models/operations/gettags.ts + - src/models/operations/getuar.ts + - src/models/operations/getuars.ts + - src/models/operations/getusers.ts + - src/models/operations/getusertags.ts + - src/models/operations/index.ts + - src/models/operations/removebundlegroup.ts + - src/models/operations/removebundleresource.ts + - src/models/operations/removegroupcontaininggroup.ts + - src/models/operations/removegrouptag.ts + - src/models/operations/removeresourcetag.ts + - src/models/operations/removeusertag.ts + - src/models/operations/resourceuseraccessstatusretrieve.ts + - src/models/operations/sessions.ts + - src/models/operations/setbundlevisibility.ts + - src/models/operations/setgroupmessagechannels.ts + - src/models/operations/setgrouponcallschedules.ts + - src/models/operations/setgroupresources.ts + - src/models/operations/setgroupreviewers.ts + - src/models/operations/setgroupreviewerstages.ts + - src/models/operations/setgroupvisibility.ts + - src/models/operations/setownerusers.ts + - src/models/operations/setresourcemessagechannels.ts + - src/models/operations/setresourcereviewers.ts + - src/models/operations/setresourcereviewerstages.ts + - src/models/operations/setresourcescopedrolepermissions.ts + - src/models/operations/setresourcevisibility.ts + - src/models/operations/updateaccessrule.ts + - src/models/operations/updatebundle.ts + - src/models/operations/updategroupuser.ts + - src/models/operations/updateidpgroupmappings.ts + - src/models/operations/updateresourceuser.ts + - src/models/operations/user.ts + - src/sdk/accessrules.ts + - src/sdk/apps.ts + - src/sdk/bundles.ts + - src/sdk/configurationtemplates.ts + - src/sdk/events.ts + - src/sdk/groupbindings.ts + - src/sdk/groups.ts + - src/sdk/idpgroupmappings.ts + - src/sdk/index.ts + - src/sdk/messagechannels.ts + - src/sdk/nonhumanidentities.ts + - src/sdk/oncallschedules.ts + - src/sdk/owners.ts + - src/sdk/requests.ts + - src/sdk/resources.ts + - src/sdk/scopedrolepermissions.ts + - src/sdk/sdk.ts + - src/sdk/sessions.ts + - src/sdk/tags.ts + - src/sdk/uars.ts + - src/sdk/users.ts + - src/types/async.ts + - src/types/blobs.ts + - src/types/constdatetime.ts + - src/types/enums.ts + - src/types/fp.ts + - src/types/index.ts + - src/types/operations.ts + - src/types/rfcdate.ts + - src/types/streams.ts + - tsconfig.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a24b0698..be3fee11 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -16,32 +16,51 @@ generation: requestResponseComponentNamesFeb2024: true securityFeb2025: true sharedErrorComponentsApr2025: false + sharedNestedComponentsJan2026: false + nameOverrideFeb2026: false auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true + hoistGlobalSecurity: true + schemas: + allOfMergeStrategy: shallowMerge + requestBodyFieldName: "" + versioningStrategy: automatic + persistentEdits: {} tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 0.7.0 + version: 0.8.0 + acceptHeaderEnum: true additionalDependencies: dependencies: {} devDependencies: {} peerDependencies: {} additionalPackageJSON: {} + additionalScripts: {} + alwaysIncludeInboundAndOutbound: false + apiPromiseHelpers: false author: Speakeasy baseErrorName: OpalMcpError clientServerStatusCodesAsErrors: true - constFieldsAlwaysOptional: true + constFieldsAlwaysOptional: false defaultErrorName: APIError enableCustomCodeRegions: false enableMCPServer: true enableReactQuery: false enumFormat: union envVarPrefix: OPALMCP + eventStreamClassName: EventStream + exportZodModelNamespace: false + fixEnumNameSanitization: false + flatAdditionalProperties: false flattenGlobalSecurity: true flatteningOrder: parameters-first + formStringArrayEncodeMode: encoded-string + forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" generateExamples: true imports: option: openapi @@ -51,13 +70,28 @@ typescript: operations: models/operations shared: models/components webhooks: models/webhooks + inferUnionDiscriminators: true inputModelSuffix: input jsonpath: rfc9535 + laxMode: strict + legacyFileNaming: true maxMethodParams: 0 methodArguments: require-security-and-request + modelPropertyCasing: camel moduleFormat: dual + multipartArrayFormat: legacy outputModelSuffix: output packageName: opal-mcp + preApplyUnionDiscriminators: true + preserveModelFieldNames: false + privateIdentifierPrefix: '#' + requestExtras: false responseFormat: flat + sseFlatResponse: false templateVersion: v2 + unionStrategy: left-to-right + usageSDKInitImports: [] useIndexModules: true + useOxlint: false + useTsgo: false + zodVersion: v3 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 6a21e8ee..643f4c72 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.592.1 +speakeasyVersion: 1.795.0 sources: Opal API: sourceNamespace: opal-api - sourceRevisionDigest: sha256:4a4bd5ee1457eec63bff5d655817c4b617e109ead6e9f1132644d856d9ff2209 - sourceBlobDigest: sha256:353c5629289a76065ee83e77014e064454e57c4eb73955c10c6b018b9da09623 + sourceRevisionDigest: sha256:7b02fd6f87014fb8d807f2fa0a476744f55cbd0c13e0ac7f63eb489cba9810ca + sourceBlobDigest: sha256:4f1481fbcc9463f90f4c9d74c71885230286078a8b0352a29649d5fe59dc30cd tags: - latest - "1.0" @@ -11,10 +11,10 @@ targets: opal-mcp: source: Opal API sourceNamespace: opal-api - sourceRevisionDigest: sha256:4a4bd5ee1457eec63bff5d655817c4b617e109ead6e9f1132644d856d9ff2209 - sourceBlobDigest: sha256:353c5629289a76065ee83e77014e064454e57c4eb73955c10c6b018b9da09623 + sourceRevisionDigest: sha256:7b02fd6f87014fb8d807f2fa0a476744f55cbd0c13e0ac7f63eb489cba9810ca + sourceBlobDigest: sha256:4f1481fbcc9463f90f4c9d74c71885230286078a8b0352a29649d5fe59dc30cd codeSamplesNamespace: opal-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:744f37e853a8eda4f41141b669cc712de2583e769c3ab8d2dae7ab10f54b390f + codeSamplesRevisionDigest: sha256:058839633ba46ebe65a8b25a80e4d026d3e092f24a538cd7edff60ff014b0c99 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/FUNCTIONS.md b/FUNCTIONS.md index f84cf36b..bcb2326c 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -1,11 +1,11 @@ # Standalone Functions > [!NOTE] -> This section is useful if you are using a bundler and targetting browsers and +> This section is useful if you are using a bundler and targeting browsers and > runtimes where the size of an application affects performance and load times. Every method in this SDK is also available as a standalone function. This -alternative API is suitable when targetting the browser or serverless runtimes +alternative API is suitable when targeting the browser or serverless runtimes and using a bundler to build your application since all unused functionality will be tree-shaken away. This includes code for unused methods, Zod schemas, encoding helpers and response handlers. The result is dramatically smaller diff --git a/README.md b/README.md index f7ec7254..c54a39f3 100644 --- a/README.md +++ b/README.md @@ -283,23 +283,24 @@ For additional help, you can:
Available methods -### [accessRules](docs/sdks/accessrules/README.md) +### [AccessRules](docs/sdks/accessrules/README.md) +* [getAccessRules](docs/sdks/accessrules/README.md#getaccessrules) - Returns a list of access rules for your organization. * [createAccessRule](docs/sdks/accessrules/README.md#createaccessrule) - Creates a new access rule config for the given group_id. * [getAccessRule](docs/sdks/accessrules/README.md#getaccessrule) - Returns a list of access rule config given the group_id of the access rule. * [updateAccessRule](docs/sdks/accessrules/README.md#updateaccessrule) - Updates the access rule config for the given group_id. -### [apps](docs/sdks/apps/README.md) +### [Apps](docs/sdks/apps/README.md) -* [getApps](docs/sdks/apps/README.md#getapps) - Returns a list of `App` objects. -* [getApp](docs/sdks/apps/README.md#getapp) - Returns an `App` object. +* [getApps](docs/sdks/apps/README.md#getapps) - Get apps +* [getApp](docs/sdks/apps/README.md#getapp) - Get app by ID * [getSyncErrors](docs/sdks/apps/README.md#getsyncerrors) - Returns a list of recent sync errors that have occurred since the last successful sync. -### [bundles](docs/sdks/bundles/README.md) +### [Bundles](docs/sdks/bundles/README.md) -* [getBundles](docs/sdks/bundles/README.md#getbundles) - Returns a list of `Bundle` objects. +* [getBundles](docs/sdks/bundles/README.md#getbundles) - Get bundles * [createBundle](docs/sdks/bundles/README.md#createbundle) - Creates a bundle. -* [getBundle](docs/sdks/bundles/README.md#getbundle) - Returns a `Bundle` object. +* [getBundle](docs/sdks/bundles/README.md#getbundle) - Get bundle by ID * [deleteBundle](docs/sdks/bundles/README.md#deletebundle) - Deletes a bundle. * [updateBundle](docs/sdks/bundles/README.md#updatebundle) - Updates a bundle. * [getBundleResources](docs/sdks/bundles/README.md#getbundleresources) - Returns a list of `Resource` objects in a given bundle. @@ -311,31 +312,59 @@ For additional help, you can: * [getBundleVisibility](docs/sdks/bundles/README.md#getbundlevisibility) - Gets the visibility of the bundle. * [setBundleVisibility](docs/sdks/bundles/README.md#setbundlevisibility) - Sets the visibility of the bundle. -### [configurationTemplates](docs/sdks/configurationtemplates/README.md) +### [Campaigns](docs/sdks/campaigns/README.md) + +* [getCampaigns](docs/sdks/campaigns/README.md#getcampaigns) - Returns a list of `Campaign` objects. +* [createCampaign](docs/sdks/campaigns/README.md#createcampaign) - Creates a campaign. Campaign scope only supports direct access edges: +`configuration.query.edgeFilter.directOnly` defaults to `true`, is +always stored as `true`, and passing `false` returns 400. + +* [getCampaign](docs/sdks/campaigns/README.md#getcampaign) - Get campaign by ID +* [updateCampaign](docs/sdks/campaigns/README.md#updatecampaign) - Update campaign +* [startCampaign](docs/sdks/campaigns/README.md#startcampaign) - Start campaign +* [stopCampaign](docs/sdks/campaigns/README.md#stopcampaign) - Stop campaign +* [endCampaign](docs/sdks/campaigns/README.md#endcampaign) - End campaign + +### [ConfigurationTemplates](docs/sdks/configurationtemplates/README.md) * [getConfigurationTemplates](docs/sdks/configurationtemplates/README.md#getconfigurationtemplates) - Returns a list of `ConfigurationTemplate` objects. * [createConfigurationTemplate](docs/sdks/configurationtemplates/README.md#createconfigurationtemplate) - Creates a configuration template. * [updateConfigurationTemplate](docs/sdks/configurationtemplates/README.md#updateconfigurationtemplate) - Update a configuration template. * [deleteConfigurationTemplate](docs/sdks/configurationtemplates/README.md#deleteconfigurationtemplate) - Deletes a configuration template. -### [events](docs/sdks/events/README.md) +### [Delegations](docs/sdks/delegations/README.md) + +* [getDelegations](docs/sdks/delegations/README.md#getdelegations) - Get delegations +* [createDelegation](docs/sdks/delegations/README.md#createdelegation) - Creates a new request reviewer delegation to delegate access review requests from one user to another. +* [getDelegation](docs/sdks/delegations/README.md#getdelegation) - Get delegation by ID +* [deleteDelegation](docs/sdks/delegations/README.md#deletedelegation) - Deletes a delegation by its ID. + +### [EventStreams](docs/sdks/eventstreams/README.md) + +* [getEventStreams](docs/sdks/eventstreams/README.md#geteventstreams) - Get event streams +* [createEventStream](docs/sdks/eventstreams/README.md#createeventstream) - Create event stream +* [updateEventStream](docs/sdks/eventstreams/README.md#updateeventstream) - Update event stream +* [deleteEventStream](docs/sdks/eventstreams/README.md#deleteeventstream) - Delete event stream + +### [Events](docs/sdks/events/README.md) * [events](docs/sdks/events/README.md#events) - Returns a list of `Event` objects. +* [getEvent](docs/sdks/events/README.md#getevent) - Get event by ID -### [groupBindings](docs/sdks/groupbindings/README.md) +### [GroupBindings](docs/sdks/groupbindings/README.md) -* [getGroupBindings](docs/sdks/groupbindings/README.md#getgroupbindings) - Returns a list of `GroupBinding` objects. +* [getGroupBindings](docs/sdks/groupbindings/README.md#getgroupbindings) - Get group bindings * [createGroupBinding](docs/sdks/groupbindings/README.md#creategroupbinding) - Creates a group binding. * [updateGroupBindings](docs/sdks/groupbindings/README.md#updategroupbindings) - Bulk updates a list of group bindings. -* [getGroupBinding](docs/sdks/groupbindings/README.md#getgroupbinding) - Returns a `GroupBinding` object. +* [getGroupBinding](docs/sdks/groupbindings/README.md#getgroupbinding) - Get group binding by ID * [deleteGroupBinding](docs/sdks/groupbindings/README.md#deletegroupbinding) - Deletes a group binding. -### [groups](docs/sdks/groups/README.md) +### [Groups](docs/sdks/groups/README.md) -* [getGroups](docs/sdks/groups/README.md#getgroups) - Returns a list of groups for your organization. +* [getGroups](docs/sdks/groups/README.md#getgroups) - Get groups * [updateGroups](docs/sdks/groups/README.md#updategroups) - Bulk updates a list of groups. * [createGroup](docs/sdks/groups/README.md#creategroup) - Creates an Opal group or [imports a remote group](https://docs.opal.dev/reference/end-system-objects). -* [getGroup](docs/sdks/groups/README.md#getgroup) - Returns a `Group` object. +* [getGroup](docs/sdks/groups/README.md#getgroup) - Get group by ID * [deleteGroup](docs/sdks/groups/README.md#deletegroup) - Deletes a group. * [getGroupMessageChannels](docs/sdks/groups/README.md#getgroupmessagechannels) - Gets the list of audit and reviewer message channels attached to a group. * [setGroupMessageChannels](docs/sdks/groups/README.md#setgroupmessagechannels) - Sets the list of audit message channels attached to a group. @@ -343,9 +372,9 @@ For additional help, you can: * [setGroupOnCallSchedules](docs/sdks/groups/README.md#setgrouponcallschedules) - Sets the list of on call schedules attached to a group. * [getGroupResources](docs/sdks/groups/README.md#getgroupresources) - Gets the list of resources that the group gives access to. * [setGroupResources](docs/sdks/groups/README.md#setgroupresources) - Sets the list of resources that the group gives access to. -* [getGroupContainingGroups](docs/sdks/groups/README.md#getgroupcontaininggroups) - Gets the list of groups that the group gives access to. +* [getGroupContainingGroups](docs/sdks/groups/README.md#getgroupcontaininggroups) - Get nested groups * [addGroupContainingGroup](docs/sdks/groups/README.md#addgroupcontaininggroup) - Creates a new containing group. -* [getGroupContainingGroup](docs/sdks/groups/README.md#getgroupcontaininggroup) - Gets a specific containing group for a group. +* [getGroupContainingGroup](docs/sdks/groups/README.md#getgroupcontaininggroup) - Get nested group by ID * [removeGroupContainingGroup](docs/sdks/groups/README.md#removegroupcontaininggroup) - Removes a containing group from a group. * [addGroupResource](docs/sdks/groups/README.md#addgroupresource) - Adds a resource to a group. * [getGroupVisibility](docs/sdks/groups/README.md#getgroupvisibility) - Gets the visibility of this group. @@ -359,55 +388,80 @@ For additional help, you can: * [updateGroupUser](docs/sdks/groups/README.md#updategroupuser) - Updates a user's access level or duration in this group. * [addGroupUser](docs/sdks/groups/README.md#addgroupuser) - Adds a user to this group. * [deleteGroupUser](docs/sdks/groups/README.md#deletegroupuser) - Removes a user's access from this group. +* [getUserGroups](docs/sdks/groups/README.md#getusergroups) - Returns all groups that the user is a member of. -### [idpGroupMappings](docs/sdks/idpgroupmappings/README.md) +### [IdpGroupMappings](docs/sdks/idpgroupmappings/README.md) * [getIdpGroupMappings](docs/sdks/idpgroupmappings/README.md#getidpgroupmappings) - Returns the configured set of available `IdpGroupMapping` objects for an Okta app. * [updateIdpGroupMappings](docs/sdks/idpgroupmappings/README.md#updateidpgroupmappings) - Updates the list of available `IdpGroupMapping` objects for an Okta app. +* [getIdpGroupMapping](docs/sdks/idpgroupmappings/README.md#getidpgroupmapping) - Gets an `IdpGroupMapping` object for an Okta app and group. +* [createIdpGroupMapping](docs/sdks/idpgroupmappings/README.md#createidpgroupmapping) - Creates or updates an individual `IdpGroupMapping` object (upsert operation). + +**Behavior:** +- If the mapping doesn't exist, it will be created with the provided values +- If the mapping exists, only the fields provided in the request will be updated + * [deleteIdpGroupMappings](docs/sdks/idpgroupmappings/README.md#deleteidpgroupmappings) - Deletes an `IdpGroupMapping` object. -### [messageChannels](docs/sdks/messagechannels/README.md) +### [MessageChannels](docs/sdks/messagechannels/README.md) -* [getMessageChannels](docs/sdks/messagechannels/README.md#getmessagechannels) - Returns a list of `MessageChannel` objects. +* [getMessageChannels](docs/sdks/messagechannels/README.md#getmessagechannels) - Get message channels * [createMessageChannel](docs/sdks/messagechannels/README.md#createmessagechannel) - Creates a `MessageChannel` objects. -* [getMessageChannel](docs/sdks/messagechannels/README.md#getmessagechannel) - Gets a `MessageChannel` object. +* [getMessageChannel](docs/sdks/messagechannels/README.md#getmessagechannel) - Get message channel by ID -### [nonHumanIdentities](docs/sdks/nonhumanidentities/README.md) +### [NonHumanIdentities](docs/sdks/nonhumanidentities/README.md) * [getNhis](docs/sdks/nonhumanidentities/README.md#getnhis) - Returns a list of non-human identities for your organization. -### [onCallSchedules](docs/sdks/oncallschedules/README.md) +### [OnCallSchedules](docs/sdks/oncallschedules/README.md) -* [getOnCallSchedules](docs/sdks/oncallschedules/README.md#getoncallschedules) - Returns a list of `OnCallSchedule` objects. +* [getOnCallSchedules](docs/sdks/oncallschedules/README.md#getoncallschedules) - Get on call schedules * [createOnCallSchedule](docs/sdks/oncallschedules/README.md#createoncallschedule) - Creates a `OnCallSchedule` objects. -* [getOnCallSchedule](docs/sdks/oncallschedules/README.md#getoncallschedule) - Gets a `OnCallSchedule` object. +* [getOnCallSchedule](docs/sdks/oncallschedules/README.md#getoncallschedule) - Get on call schedule by ID + +### [OpalQueries](docs/sdks/opalqueries/README.md) +* [runOpalQuery](docs/sdks/opalqueries/README.md#runopalquery) - Run an ad-hoc OpalQuery -### [owners](docs/sdks/owners/README.md) +### [Owners](docs/sdks/owners/README.md) -* [getOwners](docs/sdks/owners/README.md#getowners) - Returns a list of `Owner` objects. +* [getOwners](docs/sdks/owners/README.md#getowners) - Get owners * [createOwner](docs/sdks/owners/README.md#createowner) - Creates an owner. * [updateOwners](docs/sdks/owners/README.md#updateowners) - Bulk updates a list of owners. -* [getOwner](docs/sdks/owners/README.md#getowner) - Returns an `Owner` object. +* [getOwner](docs/sdks/owners/README.md#getowner) - Get owner by ID * [deleteOwner](docs/sdks/owners/README.md#deleteowner) - Deletes an owner. * [getOwnerFromName](docs/sdks/owners/README.md#getownerfromname) - Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead. * [getOwnerUsers](docs/sdks/owners/README.md#getownerusers) - Gets the list of users for this owner, in escalation priority order if applicable. * [setOwnerUsers](docs/sdks/owners/README.md#setownerusers) - Sets the list of users for this owner. If escalation is enabled, the order of this list is the escalation priority order of the users. If the owner has a source group, adding or removing users from this list won't be possible. -### [requests](docs/sdks/requests/README.md) +### [Paladin](docs/sdks/paladin/README.md) + +* [createPaladin](docs/sdks/paladin/README.md#createpaladin) - Create Paladin +* [getPaladin](docs/sdks/paladin/README.md#getpaladin) - Get Paladin by ID +* [updatePaladin](docs/sdks/paladin/README.md#updatepaladin) - Update Paladin +* [deletePaladin](docs/sdks/paladin/README.md#deletepaladin) - Delete Paladin +* [getPaladinFromName](docs/sdks/paladin/README.md#getpaladinfromname) - Get Paladins by name +* [listPaladinContextSources](docs/sdks/paladin/README.md#listpaladincontextsources) - List Paladin context sources +* [createPaladinContextSource](docs/sdks/paladin/README.md#createpaladincontextsource) - Add a Paladin context source +* [deletePaladinContextSource](docs/sdks/paladin/README.md#deletepaladincontextsource) - Remove a Paladin context source + +### [Requests](docs/sdks/requests/README.md) -* [getRequests](docs/sdks/requests/README.md#getrequests) - Returns a list of requests for your organization that is visible by the admin. +* [getRequests](docs/sdks/requests/README.md#getrequests) - Get requests * [createRequest](docs/sdks/requests/README.md#createrequest) - Create an access request -* [~~getRequestsRelay~~](docs/sdks/requests/README.md#getrequestsrelay) - Returns a paginated list of requests using Relay-style cursor pagination. :warning: **Deprecated** -* [getRequest](docs/sdks/requests/README.md#getrequest) - Returns a request by ID. +* [~~getRequestsRelay~~](docs/sdks/requests/README.md#getrequestsrelay) - Get requests via Relay :warning: **Deprecated** +* [getRequest](docs/sdks/requests/README.md#getrequest) - Get request by ID * [approveRequest](docs/sdks/requests/README.md#approverequest) - Approve an access request +* [denyRequest](docs/sdks/requests/README.md#denyrequest) - Deny an access request +* [getRequestComments](docs/sdks/requests/README.md#getrequestcomments) - Returns a list of comments for a specific request. +* [createRequestComment](docs/sdks/requests/README.md#createrequestcomment) - Comment on an access request -### [resources](docs/sdks/resources/README.md) +### [Resources](docs/sdks/resources/README.md) -* [getResources](docs/sdks/resources/README.md#getresources) - Returns a list of resources for your organization. +* [getResources](docs/sdks/resources/README.md#getresources) - Get resources * [updateResources](docs/sdks/resources/README.md#updateresources) - Bulk updates a list of resources. * [createResource](docs/sdks/resources/README.md#createresource) - Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources. -* [getResource](docs/sdks/resources/README.md#getresource) - Retrieves a resource. +* [getResource](docs/sdks/resources/README.md#getresource) - Get resource by ID * [deleteResource](docs/sdks/resources/README.md#deleteresource) - Deletes a resource. * [getResourceMessageChannels](docs/sdks/resources/README.md#getresourcemessagechannels) - Gets the list of audit message channels attached to a resource. * [setResourceMessageChannels](docs/sdks/resources/README.md#setresourcemessagechannels) - Sets the list of audit message channels attached to a resource. @@ -418,34 +472,31 @@ For additional help, you can: * [getResourceReviewerStages](docs/sdks/resources/README.md#getresourcereviewerstages) - Gets the list reviewer stages for a resource. * [setResourceReviewerStages](docs/sdks/resources/README.md#setresourcereviewerstages) - Sets the list of reviewer stages for a resource. * [getResourceNhis](docs/sdks/resources/README.md#getresourcenhis) - Gets the list of non-human identities with access to this resource. -* [getResourceUsers](docs/sdks/resources/README.md#getresourceusers) - Gets the list of users for this resource. +* [getResourceUsers](docs/sdks/resources/README.md#getresourceusers) - Get resource users * [addResourceNhi](docs/sdks/resources/README.md#addresourcenhi) - Gives a non-human identity access to this resource. * [deleteResourceNhi](docs/sdks/resources/README.md#deleteresourcenhi) - Removes a non-human identity's direct access from this resource. * [addResourceUser](docs/sdks/resources/README.md#addresourceuser) - Adds a user to this resource. * [updateResourceUser](docs/sdks/resources/README.md#updateresourceuser) - Updates a user's access level or duration on this resource. * [deleteResourceUser](docs/sdks/resources/README.md#deleteresourceuser) - Removes a user's direct access from this resource. -* [getResourceUser](docs/sdks/resources/README.md#getresourceuser) - Returns information about a specific user's access to a resource. +* [getResourceUser](docs/sdks/resources/README.md#getresourceuser) - Get resource user * [~~resourceUserAccessStatusRetrieve~~](docs/sdks/resources/README.md#resourceuseraccessstatusretrieve) - Get user's access status to a resource. :warning: **Deprecated** * [getResourceTags](docs/sdks/resources/README.md#getresourcetags) - Returns all tags applied to the resource. * [getResourceScopedRolePermissions](docs/sdks/resources/README.md#getresourcescopedrolepermissions) - Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. * [setResourceScopedRolePermissions](docs/sdks/resources/README.md#setresourcescopedrolepermissions) - Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. +* [getUserResources](docs/sdks/resources/README.md#getuserresources) - Gets the list of resources for this user. +* [getResourceGroups](docs/sdks/resources/README.md#getresourcegroups) - Returns a list of groups that grant access to the resource -### [scopedRolePermissions](docs/sdks/scopedrolepermissions/README.md) - -* [getResourceScopedRolePermissions](docs/sdks/scopedrolepermissions/README.md#getresourcescopedrolepermissions) - Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. -* [setResourceScopedRolePermissions](docs/sdks/scopedrolepermissions/README.md#setresourcescopedrolepermissions) - Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. - -### [sessions](docs/sdks/sessions/README.md) +### [Sessions](docs/sdks/sessions/README.md) * [sessions](docs/sdks/sessions/README.md#sessions) - Returns a list of `Session` objects. -### [tags](docs/sdks/tags/README.md) +### [Tags](docs/sdks/tags/README.md) -* [getTagByID](docs/sdks/tags/README.md#gettagbyid) - UNSTABLE. May be removed at any time. Gets a tag with the given id. +* [getTagByID](docs/sdks/tags/README.md#gettagbyid) - Get tag by ID * [deleteTagByID](docs/sdks/tags/README.md#deletetagbyid) - UNSTABLE. May be removed at any time. Deletes a tag with the given id. * [getTag](docs/sdks/tags/README.md#gettag) - Gets a tag with the given key and value. * [createTag](docs/sdks/tags/README.md#createtag) - Creates a tag with the given key and value. -* [getTags](docs/sdks/tags/README.md#gettags) - Returns a list of tags created by your organization. +* [getTags](docs/sdks/tags/README.md#gettags) - Get tags * [addUserTag](docs/sdks/tags/README.md#addusertag) - Applies a tag to a user. * [removeUserTag](docs/sdks/tags/README.md#removeusertag) - Removes a tag from a user. * [addGroupTag](docs/sdks/tags/README.md#addgrouptag) - Applies a tag to a group. @@ -453,13 +504,18 @@ For additional help, you can: * [addResourceTag](docs/sdks/tags/README.md#addresourcetag) - Applies a tag to a resource. * [removeResourceTag](docs/sdks/tags/README.md#removeresourcetag) - Removes a tag from a resource. -### [uars](docs/sdks/uars/README.md) +### [Tokens](docs/sdks/tokens/README.md) + +* [getTokens](docs/sdks/tokens/README.md#gettokens) - Get tokens +* [deleteToken](docs/sdks/tokens/README.md#deletetoken) - Delete token + +### [~~Uars~~](docs/sdks/uars/README.md) -* [getUARs](docs/sdks/uars/README.md#getuars) - Returns a list of `UAR` objects. -* [createUar](docs/sdks/uars/README.md#createuar) - Starts a User Access Review. -* [getUar](docs/sdks/uars/README.md#getuar) - Retrieves a specific UAR. +* [~~getUARs~~](docs/sdks/uars/README.md#getuars) - Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. :warning: **Deprecated** +* [~~createUar~~](docs/sdks/uars/README.md#createuar) - Starts a User Access Review. Deprecated in favor of `POST /campaigns`. :warning: **Deprecated** +* [~~getUar~~](docs/sdks/uars/README.md#getuar) - Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. :warning: **Deprecated** -### [users](docs/sdks/users/README.md) +### [Users](docs/sdks/users/README.md) * [user](docs/sdks/users/README.md#user) - Retrieves detailed user information from Opal. This endpoint is designed to fetch user details by either user ID (UUID) or email address. The endpoint follows a strict precedence rule where @@ -476,6 +532,8 @@ Authentication: - Respects standard Opal authorization rules * [getUsers](docs/sdks/users/README.md#getusers) - Returns a list of users for your organization. +* [getRemoteUsers](docs/sdks/users/README.md#getremoteusers) - Returns a list of remote users for your organization. +* [getUserWhoami](docs/sdks/users/README.md#getuserwhoami) - Returns the user that the provided API token authenticates as. * [getUserTags](docs/sdks/users/README.md#getusertags) - Returns all tags applied to the user.
diff --git a/RELEASES.md b/RELEASES.md index 0e75e08f..2c0d7f07 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -18,4 +18,14 @@ Based on: ### Generated - [typescript v0.1.0] . ### Releases -- [NPM v0.1.0] https://www.npmjs.com/package/opal-mcp/v/0.1.0 - . \ No newline at end of file +- [NPM v0.1.0] https://www.npmjs.com/package/opal-mcp/v/0.1.0 - . + +## 2026-08-20 00:06:31 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.795.0 (2.931.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.8.0] . +### Releases +- [NPM v0.8.0] https://www.npmjs.com/package/opal-mcp/v/0.8.0 - . \ No newline at end of file diff --git a/RUNTIMES.md b/RUNTIMES.md index db7ea942..27731c3b 100644 --- a/RUNTIMES.md +++ b/RUNTIMES.md @@ -2,9 +2,9 @@ This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features: -* [Web Fetch API][web-fetch] -* [Web Streams API][web-streams] and in particular `ReadableStream` -* [Async iterables][async-iter] using `Symbol.asyncIterator` +- [Web Fetch API][web-fetch] +- [Web Streams API][web-streams] and in particular `ReadableStream` +- [Async iterables][async-iter] using `Symbol.asyncIterator` [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API @@ -25,7 +25,7 @@ Runtime environments that are explicitly supported are: The following `tsconfig.json` options are recommended for projects using this SDK in order to get static type support for features like async iterables, -streams and `fetch`-related APIs ([`for await...of`][for-await-of], +streams and `fetch`-related APIs ([`for await...of`][for-await-of], [`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and so on): @@ -38,11 +38,11 @@ so on): { "compilerOptions": { "target": "es2020", // or higher - "lib": ["es2020", "dom", "dom.iterable"], + "lib": ["es2020", "dom", "dom.iterable"] } } ``` While `target` can be set to older ECMAScript versions, it may result in extra, unnecessary compatibility code being generated if you are not targeting old -runtimes. \ No newline at end of file +runtimes. diff --git a/docs/models/components/accessdurationtype.md b/docs/models/components/accessdurationtype.md new file mode 100644 index 00000000..19997d17 --- /dev/null +++ b/docs/models/components/accessdurationtype.md @@ -0,0 +1,17 @@ +# AccessDurationType + +Constrain results by whether the terminal access expires. + +## Example Usage + +```typescript +import { AccessDurationType } from "opal-mcp/models/components"; + +let value: AccessDurationType = "EXPIRING_ONLY"; +``` + +## Values + +```typescript +"EXPIRING_ONLY" | "PERMANENT_ONLY" +``` \ No newline at end of file diff --git a/docs/models/components/accessentityfilters.md b/docs/models/components/accessentityfilters.md new file mode 100644 index 00000000..83f380eb --- /dev/null +++ b/docs/models/components/accessentityfilters.md @@ -0,0 +1,106 @@ +# AccessEntityFilters + +Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + +## Example Usage + +```typescript +import { AccessEntityFilters } from "opal-mcp/models/components"; + +let value: AccessEntityFilters = { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + allOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + anyOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + ], + }, + ], + anyOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `entityTypes` | [components.AccessEntityFiltersEntityType](../../models/components/accessentityfiltersentitytype.md)[] | :heavy_minus_sign: | Filter by entity type. Only RESOURCE, GROUP, and USER are queryable via OpalQuery. | +| `entityItemTypes` | [components.EntityItemTypeEnum](../../models/components/entityitemtypeenum.md)[] | :heavy_minus_sign: | Filter by entity item types. | +| `entityName` | [components.EntityNameFilter](../../models/components/entitynamefilter.md) | :heavy_minus_sign: | Filters entities by name using a string match strategy. | +| `entityTag` | [components.EntityTagFilter](../../models/components/entitytagfilter.md) | :heavy_minus_sign: | Filters entities by a tag key/value pair, optionally scoped to a connection. | +| `hrIdpStatus` | [components.IdpStatusFilter](../../models/components/idpstatusfilter.md) | :heavy_minus_sign: | Filters USER entities by their HR/IDP lifecycle status. Only applies to USER entities; GROUP and RESOURCE entities never match, in either polarity. `statuses` combine with OR. `not` inverts the match within the user domain (e.g. "IDP status is NOT active"), so it still returns only users rather than sweeping in groups/resources.
| +| `entityAdminOwner` | [components.EntityAdminFilter](../../models/components/entityadminfilter.md) | :heavy_minus_sign: | Filters GROUP and RESOURCE entities by their admin owner. USER entities never match, in either polarity. `not` inverts the match within the resource/group domain (self-negating, like IdpStatusFilter): omit it (or false) to include entities owned by the given owners, set it true to exclude them.
| +| `entityIDs` | *string*[] | :heavy_minus_sign: | Filter by specific entity UUIDs. | +| `importedFromApp` | *string*[] | :heavy_minus_sign: | Filter by app IDs from which returned nodes will be imported from. | +| `roleRemoteIds` | *string*[] | :heavy_minus_sign: | Filter by role remote IDs. Can only be applied within a hasAccessTo clause. | +| `roleNames` | *string*[] | :heavy_minus_sign: | Filter by role display names (e.g. "Admin", "Read"). Can only be applied within a hasAccessTo clause. | +| `allOf` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md)[] | :heavy_minus_sign: | A list of nested filters that must all match (logical AND). Each



item has the same shape as this object — scalar fields like
`entityTypes` or `entityTag`, and can further nest `allOf`,
`anyOf`, or `not`.
| +| `anyOf` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md)[] | :heavy_minus_sign: | A list of nested filters where at least one must match (logical



OR). Each item has the same shape as this object.
| +| `not` | [components.Not](../../models/components/not.md) | :heavy_minus_sign: | Excludes entities matching the embedded filter (logical NOT). Pass a filter object with the same shape as this one — typically a single scalar field, like `{not: {entityTypes: ["RESOURCE"]}}` to exclude resources.
| \ No newline at end of file diff --git a/docs/models/components/accessentityfiltersentitytype.md b/docs/models/components/accessentityfiltersentitytype.md new file mode 100644 index 00000000..6b63fa8c --- /dev/null +++ b/docs/models/components/accessentityfiltersentitytype.md @@ -0,0 +1,15 @@ +# AccessEntityFiltersEntityType + +## Example Usage + +```typescript +import { AccessEntityFiltersEntityType } from "opal-mcp/models/components"; + +let value: AccessEntityFiltersEntityType = "GROUP"; +``` + +## Values + +```typescript +"RESOURCE" | "GROUP" | "USER" +``` \ No newline at end of file diff --git a/docs/models/components/accessrelationshipfilters.md b/docs/models/components/accessrelationshipfilters.md new file mode 100644 index 00000000..dae1548d --- /dev/null +++ b/docs/models/components/accessrelationshipfilters.md @@ -0,0 +1,56 @@ +# AccessRelationshipFilters + +Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously. + + +## Example Usage + +```typescript +import { AccessRelationshipFilters } from "opal-mcp/models/components"; + +let value: AccessRelationshipFilters = { + isAccessibleBy: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + hasAccessTo: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `isAccessibleBy` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md) | :heavy_minus_sign: | Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. | +| `hasAccessTo` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md) | :heavy_minus_sign: | Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. | \ No newline at end of file diff --git a/docs/models/components/accessrule.md b/docs/models/components/accessrule.md index a91e52eb..fa80081e 100644 --- a/docs/models/components/accessrule.md +++ b/docs/models/components/accessrule.md @@ -5,7 +5,7 @@ The `AccessRule` object is used to represent an access rule configuration. ### Usage Example -Get access rule configurations from the `GET Access Rule Configs` endpoint. +List access rules from the `GET /access-rules` endpoint, or retrieve a single access rule from the `GET /access-rules/{access_rule_id}` endpoint. ## Example Usage @@ -21,7 +21,11 @@ let value: AccessRule = { status: "ACTIVE", ruleClauses: { when: { - clauses: [], + clauses: [ + { + selectors: [], + }, + ], }, }, }; diff --git a/docs/models/components/alicloudecsinstance.md b/docs/models/components/alicloudecsinstance.md new file mode 100644 index 00000000..90ad806b --- /dev/null +++ b/docs/models/components/alicloudecsinstance.md @@ -0,0 +1,19 @@ +# AlicloudEcsInstance + +Remote info for AliCloud ECS instance. + +## Example Usage + +```typescript +import { AlicloudEcsInstance } from "opal-mcp/models/components"; + +let value: AlicloudEcsInstance = { + instanceId: "i-bp1a1234567890abcd", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `instanceId` | *string* | :heavy_check_mark: | The ID of the ECS instance. | i-bp1a1234567890abcd | \ No newline at end of file diff --git a/docs/models/components/alicloudramrole.md b/docs/models/components/alicloudramrole.md new file mode 100644 index 00000000..3137407f --- /dev/null +++ b/docs/models/components/alicloudramrole.md @@ -0,0 +1,19 @@ +# AlicloudRamRole + +Remote info for AliCloud RAM role. + +## Example Usage + +```typescript +import { AlicloudRamRole } from "opal-mcp/models/components"; + +let value: AlicloudRamRole = { + roleArn: "acs:ram::1234567890:role/MyRole", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `roleArn` | *string* | :heavy_check_mark: | The ARN of the AliCloud RAM role. | acs:ram::1234567890:role/MyRole | \ No newline at end of file diff --git a/docs/models/components/anthropicworkspace.md b/docs/models/components/anthropicworkspace.md new file mode 100644 index 00000000..fff0a1e2 --- /dev/null +++ b/docs/models/components/anthropicworkspace.md @@ -0,0 +1,19 @@ +# AnthropicWorkspace + +Remote info for Anthropic workspace. + +## Example Usage + +```typescript +import { AnthropicWorkspace } from "opal-mcp/models/components"; + +let value: AnthropicWorkspace = { + workspaceId: "ws-123456", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `workspaceId` | *string* | :heavy_check_mark: | The id of the workspace. | ws-123456 | \ No newline at end of file diff --git a/docs/models/components/apiaccesslevelenum.md b/docs/models/components/apiaccesslevelenum.md new file mode 100644 index 00000000..96b51a28 --- /dev/null +++ b/docs/models/components/apiaccesslevelenum.md @@ -0,0 +1,17 @@ +# ApiAccessLevelEnum + +The access level of an API token. + +## Example Usage + +```typescript +import { ApiAccessLevelEnum } from "opal-mcp/models/components"; + +let value: ApiAccessLevelEnum = "FULL_ACCESS"; +``` + +## Values + +```typescript +"READ_ONLY" | "FULL_ACCESS" +``` \ No newline at end of file diff --git a/docs/models/components/apptypeenum.md b/docs/models/components/apptypeenum.md index cee14b18..a25e9d77 100644 --- a/docs/models/components/apptypeenum.md +++ b/docs/models/components/apptypeenum.md @@ -13,5 +13,5 @@ let value: AppTypeEnum = "OKTA_DIRECTORY"; ## Values ```typescript -"ACTIVE_DIRECTORY" | "AZURE_AD" | "AWS" | "AWS_SSO" | "CUSTOM" | "DUO" | "GCP" | "GIT_HUB" | "GIT_LAB" | "GOOGLE_GROUPS" | "GOOGLE_WORKSPACE" | "LDAP" | "MARIADB" | "MONGO" | "MONGO_ATLAS" | "MYSQL" | "OKTA_DIRECTORY" | "OPAL" | "PAGERDUTY" | "SALESFORCE" | "TAILSCALE" | "TELEPORT" | "WORKDAY" +"ACTIVE_DIRECTORY" | "ANTHROPIC" | "AZURE_AD" | "AWS" | "AWS_SSO" | "CLICKHOUSE" | "COUPA" | "CURSOR" | "CUSTOM" | "CONFLUENCE" | "CUSTOM_CONNECTOR" | "DATABRICKS" | "DATASTAX_ASTRA" | "ALICLOUD" | "DEVIN" | "DOCUSIGN" | "DUO" | "GCP" | "GIT_HUB" | "GIT_LAB" | "GOOGLE_GROUPS" | "GOOGLE_WORKSPACE" | "GRAFANA" | "HUBSPOT" | "ILEVEL" | "INCIDENTIO" | "JIRA" | "LDAP" | "MARIADB" | "MONGO" | "MONGO_ATLAS" | "MYSQL" | "NETSUITE" | "DATADOG" | "OKTA_CIAM" | "OKTA_DIRECTORY" | "OPENAI_PLATFORM" | "OPAL" | "ORACLE_FUSION" | "PAGERDUTY" | "POSTGRES" | "ROOTLY" | "SALESFORCE" | "SNOWFLAKE" | "SLACK" | "TABLEAU" | "TAILSCALE" | "TELEPORT" | "TWINGATE" | "VAULT" | "WORKDAY" | "ZENDESK" | "ZOOM" ``` \ No newline at end of file diff --git a/docs/models/components/attribute.md b/docs/models/components/attribute.md new file mode 100644 index 00000000..2a05936b --- /dev/null +++ b/docs/models/components/attribute.md @@ -0,0 +1,15 @@ +# Attribute + +## Example Usage + +```typescript +import { Attribute } from "opal-mcp/models/components"; + +let value: Attribute = "HR_IDP_STATUS"; +``` + +## Values + +```typescript +"HR_IDP_STATUS" +``` \ No newline at end of file diff --git a/docs/models/components/awsrdscluster.md b/docs/models/components/awsrdscluster.md new file mode 100644 index 00000000..b968a84b --- /dev/null +++ b/docs/models/components/awsrdscluster.md @@ -0,0 +1,29 @@ +# AwsRdsCluster + +Remote info for AWS RDS cluster. + +## Example Usage + +```typescript +import { AwsRdsCluster } from "opal-mcp/models/components"; + +let value: AwsRdsCluster = { + clusterId: "demo-mysql-cluster", + region: "us-east-2", + resourceId: "cluster-AOO8V0XUCNU13XLZXQDQRSN0NQ", + accountId: "234234234234", + databaseName: "mydatabase", + engine: "POSTGRESQL", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `clusterId` | *string* | :heavy_check_mark: | The clusterId of the RDS cluster. | demo-mysql-cluster | +| `region` | *string* | :heavy_check_mark: | The region of the RDS cluster. | us-east-2 | +| `resourceId` | *string* | :heavy_check_mark: | The resourceId of the RDS cluster. | cluster-AOO8V0XUCNU13XLZXQDQRSN0NQ | +| `accountId` | *string* | :heavy_check_mark: | The id of the AWS account. Required for AWS Organizations. | 234234234234 | +| `databaseName` | *string* | :heavy_check_mark: | The name of the database in the RDS cluster. This can be the value of the tag `opal:database-name` or the database name. | mydatabase | +| `engine` | [components.RDSEngineEnum](../../models/components/rdsengineenum.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/awsssogroup.md b/docs/models/components/awsssogroup.md new file mode 100644 index 00000000..0e6ad360 --- /dev/null +++ b/docs/models/components/awsssogroup.md @@ -0,0 +1,19 @@ +# AwsSsoGroup + +Remote info for AWS SSO group. + +## Example Usage + +```typescript +import { AwsSsoGroup } from "opal-mcp/models/components"; + +let value: AwsSsoGroup = { + groupId: "898931321", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The id of the AWS SSO group. | 898931321 | \ No newline at end of file diff --git a/docs/models/components/azureenterpriseapp.md b/docs/models/components/azureenterpriseapp.md new file mode 100644 index 00000000..5a8fed8f --- /dev/null +++ b/docs/models/components/azureenterpriseapp.md @@ -0,0 +1,19 @@ +# AzureEnterpriseApp + +Remote info for Azure Enterprise App. + +## Example Usage + +```typescript +import { AzureEnterpriseApp } from "opal-mcp/models/components"; + +let value: AzureEnterpriseApp = { + resourceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The remote application identifier (service principal or application object ID). | aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | \ No newline at end of file diff --git a/docs/models/components/azureentraidrole.md b/docs/models/components/azureentraidrole.md new file mode 100644 index 00000000..f7b3cd78 --- /dev/null +++ b/docs/models/components/azureentraidrole.md @@ -0,0 +1,19 @@ +# AzureEntraIdRole + +Remote info for Azure Entra ID role. + +## Example Usage + +```typescript +import { AzureEntraIdRole } from "opal-mcp/models/components"; + +let value: AzureEntraIdRole = { + resourceId: "11111111-2222-3333-4444-555555555555", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The remote role identifier from Entra (object ID). | 11111111-2222-3333-4444-555555555555 | \ No newline at end of file diff --git a/docs/models/components/azuremanagementgroup.md b/docs/models/components/azuremanagementgroup.md new file mode 100644 index 00000000..7ed5417a --- /dev/null +++ b/docs/models/components/azuremanagementgroup.md @@ -0,0 +1,19 @@ +# AzureManagementGroup + +Remote info for Azure management group. + +## Example Usage + +```typescript +import { AzureManagementGroup } from "opal-mcp/models/components"; + +let value: AzureManagementGroup = { + resourceId: "/providers/Microsoft.Management/managementGroups/my-mg", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the management group. | /providers/Microsoft.Management/managementGroups/my-mg | \ No newline at end of file diff --git a/docs/models/components/azureresourcegroup.md b/docs/models/components/azureresourcegroup.md new file mode 100644 index 00000000..6d8e6ad7 --- /dev/null +++ b/docs/models/components/azureresourcegroup.md @@ -0,0 +1,20 @@ +# AzureResourceGroup + +Remote info for Azure resource group. + +## Example Usage + +```typescript +import { AzureResourceGroup } from "opal-mcp/models/components"; + +let value: AzureResourceGroup = { + resourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the resource group. | /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg | \ No newline at end of file diff --git a/docs/models/components/azuresqldatabase.md b/docs/models/components/azuresqldatabase.md new file mode 100644 index 00000000..54c6647a --- /dev/null +++ b/docs/models/components/azuresqldatabase.md @@ -0,0 +1,20 @@ +# AzureSqlDatabase + +Remote info for Azure SQL database. + +## Example Usage + +```typescript +import { AzureSqlDatabase } from "opal-mcp/models/components"; + +let value: AzureSqlDatabase = { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/servers/sqldev01/databases/db01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the SQL database. | /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/servers/sqldev01/databases/db01 | \ No newline at end of file diff --git a/docs/models/components/azuresqlmanageddatabase.md b/docs/models/components/azuresqlmanageddatabase.md new file mode 100644 index 00000000..02eb65a2 --- /dev/null +++ b/docs/models/components/azuresqlmanageddatabase.md @@ -0,0 +1,20 @@ +# AzureSqlManagedDatabase + +Remote info for Azure SQL managed database. + +## Example Usage + +```typescript +import { AzureSqlManagedDatabase } from "opal-mcp/models/components"; + +let value: AzureSqlManagedDatabase = { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/managedInstances/mi01/databases/midb01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the SQL managed database. | /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/managedInstances/mi01/databases/midb01 | \ No newline at end of file diff --git a/docs/models/components/azuresqlmanagedinstance.md b/docs/models/components/azuresqlmanagedinstance.md new file mode 100644 index 00000000..8f3bf84a --- /dev/null +++ b/docs/models/components/azuresqlmanagedinstance.md @@ -0,0 +1,20 @@ +# AzureSqlManagedInstance + +Remote info for Azure SQL managed instance. + +## Example Usage + +```typescript +import { AzureSqlManagedInstance } from "opal-mcp/models/components"; + +let value: AzureSqlManagedInstance = { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/managedInstances/mi01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the SQL managed instance. | /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/managedInstances/mi01 | \ No newline at end of file diff --git a/docs/models/components/azuresqlserver.md b/docs/models/components/azuresqlserver.md new file mode 100644 index 00000000..22ec9dc7 --- /dev/null +++ b/docs/models/components/azuresqlserver.md @@ -0,0 +1,20 @@ +# AzureSqlServer + +Remote info for Azure SQL server. + +## Example Usage + +```typescript +import { AzureSqlServer } from "opal-mcp/models/components"; + +let value: AzureSqlServer = { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/servers/sqldev01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the SQL server. | /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/servers/sqldev01 | \ No newline at end of file diff --git a/docs/models/components/azurestorageaccount.md b/docs/models/components/azurestorageaccount.md new file mode 100644 index 00000000..1001aed5 --- /dev/null +++ b/docs/models/components/azurestorageaccount.md @@ -0,0 +1,20 @@ +# AzureStorageAccount + +Remote info for Azure storage account. + +## Example Usage + +```typescript +import { AzureStorageAccount } from "opal-mcp/models/components"; + +let value: AzureStorageAccount = { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/sa01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the storage account. | /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/sa01 | \ No newline at end of file diff --git a/docs/models/components/azurestoragecontainer.md b/docs/models/components/azurestoragecontainer.md new file mode 100644 index 00000000..50cde8a4 --- /dev/null +++ b/docs/models/components/azurestoragecontainer.md @@ -0,0 +1,20 @@ +# AzureStorageContainer + +Remote info for Azure storage container. + +## Example Usage + +```typescript +import { AzureStorageContainer } from "opal-mcp/models/components"; + +let value: AzureStorageContainer = { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/sa01/blobServices/default/containers/c01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the storage container. | /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/sa01/blobServices/default/containers/c01 | \ No newline at end of file diff --git a/docs/models/components/azuresubscription.md b/docs/models/components/azuresubscription.md new file mode 100644 index 00000000..095d721d --- /dev/null +++ b/docs/models/components/azuresubscription.md @@ -0,0 +1,19 @@ +# AzureSubscription + +Remote info for Azure subscription. + +## Example Usage + +```typescript +import { AzureSubscription } from "opal-mcp/models/components"; + +let value: AzureSubscription = { + resourceId: "/subscriptions/00000000-0000-0000-0000-000000000000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the subscription. | /subscriptions/00000000-0000-0000-0000-000000000000 | \ No newline at end of file diff --git a/docs/models/components/azureuserassignedmanagedidentity.md b/docs/models/components/azureuserassignedmanagedidentity.md new file mode 100644 index 00000000..8be1a9ae --- /dev/null +++ b/docs/models/components/azureuserassignedmanagedidentity.md @@ -0,0 +1,20 @@ +# AzureUserAssignedManagedIdentity + +Remote info for Azure user assigned managed identity. + +## Example Usage + +```typescript +import { AzureUserAssignedManagedIdentity } from "opal-mcp/models/components"; + +let value: AzureUserAssignedManagedIdentity = { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the user assigned managed identity. | /subscriptions/0000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id01 | \ No newline at end of file diff --git a/docs/models/components/azurevirtualmachine.md b/docs/models/components/azurevirtualmachine.md new file mode 100644 index 00000000..ec9b9ee4 --- /dev/null +++ b/docs/models/components/azurevirtualmachine.md @@ -0,0 +1,20 @@ +# AzureVirtualMachine + +Remote info for Azure virtual machine. + +## Example Usage + +```typescript +import { AzureVirtualMachine } from "opal-mcp/models/components"; + +let value: AzureVirtualMachine = { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/vm01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ARM resource ID of the virtual machine. | /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/vm01 | \ No newline at end of file diff --git a/docs/models/components/campaign.md b/docs/models/components/campaign.md new file mode 100644 index 00000000..20fa5f74 --- /dev/null +++ b/docs/models/components/campaign.md @@ -0,0 +1,45 @@ +# Campaign + +An access review campaign. + +## Example Usage + +```typescript +import { Campaign } from "opal-mcp/models/components"; + +let value: Campaign = { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + name: "Q3 Access Review", + status: "DRAFT", + isTemplate: false, + createdAt: new Date("2026-07-01T00:00:00Z"), + updatedAt: new Date("2026-07-01T00:00:00Z"), + createdByUserId: "32acc112-21ff-4669-91c2-21e27683eaa1", + configuration: null, + startedAt: null, + startedByUserId: null, + stoppedAt: null, + stoppedByUserId: null, + endedAt: null, + endedByUserId: null, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `campaignId` | *string* | :heavy_check_mark: | The ID of the campaign. | f454d283-ca87-4a8a-bdbb-df212eca5353 | +| `name` | *string* | :heavy_check_mark: | The name of the campaign. | Q3 Access Review | +| `status` | [components.CampaignStatusEnum](../../models/components/campaignstatusenum.md) | :heavy_check_mark: | The current status of a campaign. | ONGOING | +| `isTemplate` | *boolean* | :heavy_check_mark: | Whether this campaign is a recurring schedule template. Templates spawn draft campaigns on schedule rather than being reviewed directly. | false | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The creation time of the campaign. | 2026-07-01 00:00:00 +0000 UTC | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The last updated time of the campaign. | 2026-07-01 00:00:00 +0000 UTC | +| `createdByUserId` | *string* | :heavy_check_mark: | The ID of the user who created the campaign. | 32acc112-21ff-4669-91c2-21e27683eaa1 | +| `configuration` | [components.Configuration](../../models/components/configuration.md) | :heavy_minus_sign: | The campaign's configuration, if set. | {
"configuration_id": "39a4d283-ca87-4a8a-bdbb-df212eca5fdb",
"created_at": "2026-07-01T00:00:00Z",
"updated_at": "2026-07-01T00:00:00Z",
"query": null,
"reviewer_assignment_policy": "MANUALLY",
"allow_self_review": false,
"send_reviewer_assignment_notification": true,
"allow_reviewer_reassignment": false,
"start_date": null,
"end_date": "2026-09-30T00:00:00Z",
"timezone": "America/Los_Angeles",
"revoke_on": "END",
"reminder_schedule": [
7,
3,
1
],
"reminder_include_manager": true,
"require_reason_on_denial": false,
"hide_ai_suggestions": false,
"custom_start_message": null,
"group_asset_visibility_policy": "STRICT",
"is_template": false,
"cron_expression": null,
"next_scheduled_run": null,
"last_scheduled_run": null,
"recurring_duration_days": null
} | +| `startedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the campaign was started, if started. | 2026-07-02 00:00:00 +0000 UTC | +| `startedByUserId` | *string* | :heavy_minus_sign: | The ID of the user who started the campaign, if started. | 32acc112-21ff-4669-91c2-21e27683eaa1 | +| `stoppedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the campaign was manually stopped, if stopped. | 2026-07-10 00:00:00 +0000 UTC | +| `stoppedByUserId` | *string* | :heavy_minus_sign: | The ID of the user who stopped the campaign, if stopped. | 32acc112-21ff-4669-91c2-21e27683eaa1 | +| `endedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the campaign reached its scheduled end, if ended. | 2026-07-14 00:00:00 +0000 UTC | +| `endedByUserId` | *string* | :heavy_minus_sign: | The ID of the user who ended the campaign, if ended. | 32acc112-21ff-4669-91c2-21e27683eaa1 | \ No newline at end of file diff --git a/docs/models/components/campaigngroupassetvisibilitypolicyenum.md b/docs/models/components/campaigngroupassetvisibilitypolicyenum.md new file mode 100644 index 00000000..9915041b --- /dev/null +++ b/docs/models/components/campaigngroupassetvisibilitypolicyenum.md @@ -0,0 +1,17 @@ +# CampaignGroupAssetVisibilityPolicyEnum + +Controls what group assets reviewers can see during the campaign. + +## Example Usage + +```typescript +import { CampaignGroupAssetVisibilityPolicyEnum } from "opal-mcp/models/components"; + +let value: CampaignGroupAssetVisibilityPolicyEnum = "STRICT"; +``` + +## Values + +```typescript +"STRICT" | "VIEW_VISIBLE_AND_ASSIGNED" | "VIEW_ALL" +``` \ No newline at end of file diff --git a/docs/models/components/campaignrevokeonenum.md b/docs/models/components/campaignrevokeonenum.md new file mode 100644 index 00000000..3bf23404 --- /dev/null +++ b/docs/models/components/campaignrevokeonenum.md @@ -0,0 +1,17 @@ +# CampaignRevokeOnEnum + +When access decisions take effect during a campaign. + +## Example Usage + +```typescript +import { CampaignRevokeOnEnum } from "opal-mcp/models/components"; + +let value: CampaignRevokeOnEnum = "END"; +``` + +## Values + +```typescript +"ACTION" | "END" | "NONE" +``` \ No newline at end of file diff --git a/docs/models/components/campaignstatusenum.md b/docs/models/components/campaignstatusenum.md new file mode 100644 index 00000000..d8f58cb4 --- /dev/null +++ b/docs/models/components/campaignstatusenum.md @@ -0,0 +1,17 @@ +# CampaignStatusEnum + +The current status of a campaign. + +## Example Usage + +```typescript +import { CampaignStatusEnum } from "opal-mcp/models/components"; + +let value: CampaignStatusEnum = "ONGOING"; +``` + +## Values + +```typescript +"DRAFT" | "ONGOING" | "COMPLETED" | "STOPPED" | "ENDED" +``` \ No newline at end of file diff --git a/docs/models/components/clickhousedatabase.md b/docs/models/components/clickhousedatabase.md new file mode 100644 index 00000000..fc68d02a --- /dev/null +++ b/docs/models/components/clickhousedatabase.md @@ -0,0 +1,19 @@ +# ClickhouseDatabase + +Remote info for ClickHouse database. + +## Example Usage + +```typescript +import { ClickhouseDatabase } from "opal-mcp/models/components"; + +let value: ClickhouseDatabase = { + databaseName: "my_database", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `databaseName` | *string* | :heavy_check_mark: | The name of the ClickHouse database. | my_database | \ No newline at end of file diff --git a/docs/models/components/clickhouserole.md b/docs/models/components/clickhouserole.md new file mode 100644 index 00000000..1367c416 --- /dev/null +++ b/docs/models/components/clickhouserole.md @@ -0,0 +1,19 @@ +# ClickhouseRole + +Remote info for ClickHouse role. + +## Example Usage + +```typescript +import { ClickhouseRole } from "opal-mcp/models/components"; + +let value: ClickhouseRole = { + roleId: "my_clickhouse_role", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `roleId` | *string* | :heavy_check_mark: | The name of the ClickHouse role. | my_clickhouse_role | \ No newline at end of file diff --git a/docs/models/components/clickhousetable.md b/docs/models/components/clickhousetable.md new file mode 100644 index 00000000..36c62bd9 --- /dev/null +++ b/docs/models/components/clickhousetable.md @@ -0,0 +1,21 @@ +# ClickhouseTable + +Remote info for ClickHouse table. + +## Example Usage + +```typescript +import { ClickhouseTable } from "opal-mcp/models/components"; + +let value: ClickhouseTable = { + databaseName: "my_database", + tableName: "my_table", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `databaseName` | *string* | :heavy_check_mark: | The name of the ClickHouse database containing the table. | my_database | +| `tableName` | *string* | :heavy_check_mark: | The name of the ClickHouse table. | my_table | \ No newline at end of file diff --git a/docs/models/components/configuration.md b/docs/models/components/configuration.md new file mode 100644 index 00000000..5d206907 --- /dev/null +++ b/docs/models/components/configuration.md @@ -0,0 +1,67 @@ +# Configuration + +The campaign's configuration, if set. + +## Example Usage + +```typescript +import { Configuration } from "opal-mcp/models/components"; + +let value: Configuration = { + configurationId: "39a4d283-ca87-4a8a-bdbb-df212eca5fdb", + createdAt: new Date("2026-07-01T00:00:00Z"), + updatedAt: new Date("2026-07-01T00:00:00Z"), + query: null, + reviewerAssignmentPolicy: "MANUALLY", + allowSelfReview: false, + sendReviewerAssignmentNotification: true, + allowReviewerReassignment: false, + startDate: null, + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", + revokeOn: "END", + reminderSchedule: [ + 7, + 3, + 1, + ], + reminderIncludeManager: true, + requireReasonOnDenial: false, + hideAiSuggestions: false, + customStartMessage: null, + groupAssetVisibilityPolicy: "STRICT", + isTemplate: false, + cronExpression: null, + nextScheduledRun: null, + lastScheduledRun: null, + recurringDurationDays: null, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `configurationId` | *string* | :heavy_check_mark: | The ID of the campaign configuration. | 39a4d283-ca87-4a8a-bdbb-df212eca5fdb | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The creation time of the configuration. | 2026-07-01 00:00:00 +0000 UTC | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The last updated time of the configuration. | 2026-07-01 00:00:00 +0000 UTC | +| `query` | [components.Query](../../models/components/query.md) | :heavy_minus_sign: | Access-path query defining the scope of access to review. Uses the same principalFilter / entitlementFilter shape as ACCESS_PATH OpalQuery. | | +| `reviewerAssignmentPolicy` | [components.UARReviewerAssignmentPolicyEnum](../../models/components/uarreviewerassignmentpolicyenum.md) | :heavy_check_mark: | A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. | MANUALLY | +| `allowSelfReview` | *boolean* | :heavy_check_mark: | Whether reviewers can review their own access. | false | +| `sendReviewerAssignmentNotification` | *boolean* | :heavy_check_mark: | Whether to notify reviewers upon assignment. | true | +| `allowReviewerReassignment` | *boolean* | :heavy_check_mark: | Whether reviewers may reassign their reviews to another user. | false | +| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Scheduled start date of the campaign. | 2026-07-02 00:00:00 +0000 UTC | +| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Scheduled end date of the campaign. | 2026-09-30 00:00:00 +0000 UTC | +| `timezone` | *string* | :heavy_check_mark: | IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). | America/Los_Angeles | +| `revokeOn` | [components.CampaignRevokeOnEnum](../../models/components/campaignrevokeonenum.md) | :heavy_check_mark: | When access decisions take effect during a campaign. | END | +| `reminderSchedule` | *number*[] | :heavy_minus_sign: | Days before end date to send reminder notifications. | [
7,
3,
1
] | +| `reminderIncludeManager` | *boolean* | :heavy_check_mark: | Whether to include the reviewer's manager in reminders. | true | +| `requireReasonOnDenial` | *boolean* | :heavy_check_mark: | Whether reviewers must provide a reason when denying (revoking) access. | false | +| `hideAiSuggestions` | *boolean* | :heavy_check_mark: | Whether AI suggestions are hidden from reviewers. | false | +| `customStartMessage` | *string* | :heavy_minus_sign: | Optional custom message included when notifying reviewers that the campaign started. | Please complete your reviews by Friday. | +| `groupAssetVisibilityPolicy` | [components.CampaignGroupAssetVisibilityPolicyEnum](../../models/components/campaigngroupassetvisibilitypolicyenum.md) | :heavy_check_mark: | Controls what group assets reviewers can see during the campaign. | STRICT | +| `isTemplate` | *boolean* | :heavy_check_mark: | Whether this configuration is a recurring schedule template. | false | +| `cronExpression` | *string* | :heavy_minus_sign: | Cron expression driving the recurring schedule. Null for one-off campaigns. | 0 9 1 * * | +| `nextScheduledRun` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Next time a draft will be generated from this template. | 2026-08-01 16:00:00 +0000 UTC | +| `lastScheduledRun` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Most recent time a draft was generated from this template. | 2026-07-01 16:00:00 +0000 UTC | +| `recurringDurationDays` | *number* | :heavy_minus_sign: | Deadline window in days applied to each draft generated from this template. | 14 | \ No newline at end of file diff --git a/docs/models/components/confluencegroup.md b/docs/models/components/confluencegroup.md new file mode 100644 index 00000000..d460db78 --- /dev/null +++ b/docs/models/components/confluencegroup.md @@ -0,0 +1,19 @@ +# ConfluenceGroup + +Remote info for Confluence group. + +## Example Usage + +```typescript +import { ConfluenceGroup } from "opal-mcp/models/components"; + +let value: ConfluenceGroup = { + groupId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `groupId` | *string* | :heavy_check_mark: | The ID of the Confluence group. | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | \ No newline at end of file diff --git a/docs/models/components/connectorgroup.md b/docs/models/components/connectorgroup.md new file mode 100644 index 00000000..942ae6c4 --- /dev/null +++ b/docs/models/components/connectorgroup.md @@ -0,0 +1,19 @@ +# ConnectorGroup + +Remote info for Connector group. + +## Example Usage + +```typescript +import { ConnectorGroup } from "opal-mcp/models/components"; + +let value: ConnectorGroup = { + groupId: "898931321", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `groupId` | *string* | :heavy_check_mark: | The id of the Connector group. | 898931321 | \ No newline at end of file diff --git a/docs/models/components/couparole.md b/docs/models/components/couparole.md new file mode 100644 index 00000000..9c8e6a6b --- /dev/null +++ b/docs/models/components/couparole.md @@ -0,0 +1,19 @@ +# CoupaRole + +Remote info for Coupa role. + +## Example Usage + +```typescript +import { CoupaRole } from "opal-mcp/models/components"; + +let value: CoupaRole = { + roleId: "999", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | 999 | \ No newline at end of file diff --git a/docs/models/components/createcampaignconfigurationinfo.md b/docs/models/components/createcampaignconfigurationinfo.md new file mode 100644 index 00000000..a0dc926a --- /dev/null +++ b/docs/models/components/createcampaignconfigurationinfo.md @@ -0,0 +1,46 @@ +# CreateCampaignConfigurationInfo + +Configuration to apply when creating a campaign. `query` is required; other omitted fields use defaults. + +## Example Usage + +```typescript +import { CreateCampaignConfigurationInfo } from "opal-mcp/models/components"; + +let value: CreateCampaignConfigurationInfo = { + query: { + principalFilter: { + entityTypes: [ + "USER", + ], + }, + }, + allowSelfReview: false, + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `query` | [components.OpalAccessPathQueryBody](../../models/components/opalaccesspathquerybody.md) | :heavy_check_mark: | Access-path query defining the scope of access to review. Required.
Uses the same principalFilter / entitlementFilter shape as
ACCESS_PATH OpalQuery. Must include at least one of
principalFilter or entitlementFilter.

Campaign scope only supports direct access edges:
`edgeFilter.directOnly` defaults to `true`, is always stored as
`true`, and passing `false` returns 400.
| | +| `reviewerAssignmentPolicy` | [components.UARReviewerAssignmentPolicyEnum](../../models/components/uarreviewerassignmentpolicyenum.md) | :heavy_minus_sign: | A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. | MANUALLY | +| `allowSelfReview` | *boolean* | :heavy_minus_sign: | Whether reviewers can review their own access. | false | +| `sendReviewerAssignmentNotification` | *boolean* | :heavy_minus_sign: | Whether to notify reviewers upon assignment. | true | +| `allowReviewerReassignment` | *boolean* | :heavy_minus_sign: | Whether reviewers may reassign their reviews to another user. | false | +| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Scheduled start date of the campaign. | 2026-07-02 00:00:00 +0000 UTC | +| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Scheduled end date of the campaign. | 2026-09-30 00:00:00 +0000 UTC | +| `timezone` | *string* | :heavy_minus_sign: | IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). | America/Los_Angeles | +| `revokeOn` | [components.CampaignRevokeOnEnum](../../models/components/campaignrevokeonenum.md) | :heavy_minus_sign: | When access decisions take effect during a campaign. | END | +| `reminderSchedule` | *number*[] | :heavy_minus_sign: | Days before end date to send reminder notifications. | [
7,
3,
1
] | +| `reminderIncludeManager` | *boolean* | :heavy_minus_sign: | Whether to include the reviewer's manager in reminders. | true | +| `requireReasonOnDenial` | *boolean* | :heavy_minus_sign: | Whether reviewers must provide a reason when denying (revoking) access. | false | +| `hideAiSuggestions` | *boolean* | :heavy_minus_sign: | Whether AI suggestions are hidden from reviewers. | false | +| `customStartMessage` | *string* | :heavy_minus_sign: | Optional custom message included when notifying reviewers that the campaign started. | Please complete your reviews by Friday. | +| `groupAssetVisibilityPolicy` | [components.CampaignGroupAssetVisibilityPolicyEnum](../../models/components/campaigngroupassetvisibilitypolicyenum.md) | :heavy_minus_sign: | Controls what group assets reviewers can see during the campaign. | STRICT | +| `isTemplate` | *boolean* | :heavy_minus_sign: | Whether this configuration is a recurring schedule template. | false | +| `cronExpression` | *string* | :heavy_minus_sign: | Cron expression driving the recurring schedule. Null for one-off campaigns. | 0 9 1 * * | +| `recurringDurationDays` | *number* | :heavy_minus_sign: | Deadline window in days applied to each draft generated from this template. | 14 | +| `excludedRoleAssignmentIds` | *string*[] | :heavy_minus_sign: | Role assignment IDs to exclude from the campaign scope during population. | | \ No newline at end of file diff --git a/docs/models/components/createcampaigninfo.md b/docs/models/components/createcampaigninfo.md new file mode 100644 index 00000000..4a0a87da --- /dev/null +++ b/docs/models/components/createcampaigninfo.md @@ -0,0 +1,36 @@ +# CreateCampaignInfo + +# CreateCampaignInfo Object +### Description +The `CreateCampaignInfo` object is used to create a campaign. + +### Usage Example +Use in the `POST Campaigns` endpoint. + +## Example Usage + +```typescript +import { CreateCampaignInfo } from "opal-mcp/models/components"; + +let value: CreateCampaignInfo = { + name: "Q3 Access Review", + configuration: { + query: { + principalFilter: { + entityTypes: [ + "USER", + ], + }, + }, + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The name of the campaign. | Q3 Access Review | +| `configuration` | [components.CreateCampaignConfigurationInfo](../../models/components/createcampaignconfigurationinfo.md) | :heavy_check_mark: | Configuration for the campaign. Required; must include a query. Other omitted fields use defaults. | {
"query": {
"principalFilter": {
"entityTypes": [
"USER"
]
}
},
"end_date": "2026-09-30T00:00:00Z",
"timezone": "America/Los_Angeles",
"allow_self_review": false
} | \ No newline at end of file diff --git a/docs/models/components/createdelegationrequest.md b/docs/models/components/createdelegationrequest.md new file mode 100644 index 00000000..90a7cda6 --- /dev/null +++ b/docs/models/components/createdelegationrequest.md @@ -0,0 +1,27 @@ +# CreateDelegationRequest + +Request body for creating a new delegation of access review requests from one user to another. + +## Example Usage + +```typescript +import { CreateDelegationRequest } from "opal-mcp/models/components"; + +let value: CreateDelegationRequest = { + delegatorUserId: "123e4567-e89b-12d3-a456-426614174000", + delegateUserId: "7c86c85d-0651-43e2-a748-d69d658418e8", + startTime: new Date("2023-10-01T12:00:00Z"), + endTime: new Date("2023-10-01T12:00:00Z"), + reason: "I need to be out of the office", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `delegatorUserId` | *string* | :heavy_check_mark: | The ID of the user delegating their access review requests. | 123e4567-e89b-12d3-a456-426614174000 | +| `delegateUserId` | *string* | :heavy_check_mark: | The ID of the user being delegated to. | 7c86c85d-0651-43e2-a748-d69d658418e8 | +| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The start time of the delegation. | 2023-10-01 12:00:00 +0000 UTC | +| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The end time of the delegation. | 2023-10-01 12:00:00 +0000 UTC | +| `reason` | *string* | :heavy_check_mark: | The reason for the delegation. | I need to be out of the office | \ No newline at end of file diff --git a/docs/models/components/createeventstreaminfo.md b/docs/models/components/createeventstreaminfo.md new file mode 100644 index 00000000..14be64c2 --- /dev/null +++ b/docs/models/components/createeventstreaminfo.md @@ -0,0 +1,23 @@ +# CreateEventStreamInfo + +Information needed to create an event stream. + +## Example Usage + +```typescript +import { CreateEventStreamInfo } from "opal-mcp/models/components"; + +let value: CreateEventStreamInfo = { + name: "", + connectionType: "WEBHOOK", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The name for the event stream. | +| `connectionType` | [components.EventStreamConnectionTypeEnum](../../models/components/eventstreamconnectiontypeenum.md) | :heavy_check_mark: | The type of event stream connection. | +| `webhookUrl` | *string* | :heavy_minus_sign: | The webhook URL. Required when connection_type is WEBHOOK. | +| `credentials` | [components.WebhookCredentials](../../models/components/webhookcredentials.md) | :heavy_minus_sign: | Authentication credentials for a webhook connection. | \ No newline at end of file diff --git a/docs/models/components/creategroupinfo.md b/docs/models/components/creategroupinfo.md index 57a3229f..57f9f0b8 100644 --- a/docs/models/components/creategroupinfo.md +++ b/docs/models/components/creategroupinfo.md @@ -31,8 +31,10 @@ let value: CreateGroupInfo = { | `description` | *string* | :heavy_minus_sign: | A description of the remote group. | Engineering team Okta group. | | `groupType` | [components.GroupTypeEnum](../../models/components/grouptypeenum.md) | :heavy_check_mark: | The type of the group. | OPAL_GROUP | | `appId` | *string* | :heavy_check_mark: | The ID of the app for the group. | f454d283-ca87-4a8a-bdbb-df212eca5353 | -| `remoteInfo` | [components.GroupRemoteInfo](../../models/components/groupremoteinfo.md) | :heavy_minus_sign: | Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. | | +| `remoteInfo` | [components.GroupRemoteInfo](../../models/components/groupremoteinfo.md) | :heavy_minus_sign: | Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. If remote_info is provided, a group will be imported into Opal. For group types that support group creation through Opal, a new group will be created if remote_info is not provided. | | | ~~`remoteGroupId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated - use remote_info instead. The ID of the group on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. | 00g4fixjd6Bc9w012345 | | ~~`metadata`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated - use remote_info instead.

JSON metadata about the remote group. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field.
The required format is dependent on group_type and should have the following schema:

```json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Group Metadata",
"properties": {
"ad_group": {
"properties": {
"object_guid": {
"type": "string"
}
},
"required": ["object_guid"],
"additionalProperties": false,
"type": "object",
"title": "Active Directory Group"
},
"duo_group": {
"properties": {
"group_id": {
"type": "string"
}
},
"required": ["group_id"],
"additionalProperties": false,
"type": "object",
"title": "Duo Group"
},
"git_hub_team": {
"properties": {
"org_name": {
"type": "string"
},
"team_slug": {
"type": "string"
}
},
"required": ["org_name", "team_slug"],
"additionalProperties": false,
"type": "object",
"title": "GitHub Team"
},
"google_groups_group": {
"properties": {
"group_id": {
"type": "string"
}
},
"required": ["group_id"],
"additionalProperties": false,
"type": "object",
"title": "Google Groups Group"
},
"ldap_group": {
"properties": {
"group_uid": {
"type": "string"
}
},
"required": ["group_uid"],
"additionalProperties": false,
"type": "object",
"title": "LDAP Group"
},
"okta_directory_group": {
"properties": {
"group_id": {
"type": "string"
}
},
"required": ["group_id"],
"additionalProperties": false,
"type": "object",
"title": "Okta Directory Group"
}
},
"additionalProperties": false,
"minProperties": 1,
"maxProperties": 1,
"type": "object"
}
``` | { "okta_directory_group": { "group_id": "00g4bs66kwtpe1g12345" } } | | `customRequestNotification` | *string* | :heavy_minus_sign: | Custom request notification sent upon request approval. | Check your email to register your account. | -| `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | +| `matchRemoteName` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false. | false | +| `matchRemoteDescription` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false. | false | \ No newline at end of file diff --git a/docs/models/components/createpaladincontextsourceinfo.md b/docs/models/components/createpaladincontextsourceinfo.md new file mode 100644 index 00000000..fff037bf --- /dev/null +++ b/docs/models/components/createpaladincontextsourceinfo.md @@ -0,0 +1,26 @@ +# CreatePaladinContextSourceInfo + +Information for adding a context source to a Paladin. + +## Example Usage + +```typescript +import { CreatePaladinContextSourceInfo } from "opal-mcp/models/components"; + +let value: CreatePaladinContextSourceInfo = { + sourceKind: "SLACK_CHANNEL", + thirdPartyProvider: "SLACK", + remoteId: "C0123456789", + name: "#access-requests", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `sourceKind` | [components.PaladinContextSourceKind](../../models/components/paladincontextsourcekind.md) | :heavy_check_mark: | The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page. | +| `thirdPartyProvider` | [components.PaladinContextSourceProvider](../../models/components/paladincontextsourceprovider.md) | :heavy_check_mark: | The integration a Paladin context source comes from. | +| `remoteId` | *string* | :heavy_check_mark: | The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID for a document. | +| `name` | *string* | :heavy_minus_sign: | An optional human-readable name for the source. | +| `url` | *string* | :heavy_minus_sign: | An optional link to the source. | \ No newline at end of file diff --git a/docs/models/components/createpaladininfo.md b/docs/models/components/createpaladininfo.md new file mode 100644 index 00000000..0ea3fa03 --- /dev/null +++ b/docs/models/components/createpaladininfo.md @@ -0,0 +1,25 @@ +# CreatePaladinInfo + +Information for creating a Paladin. + +## Example Usage + +```typescript +import { CreatePaladinInfo } from "opal-mcp/models/components"; + +let value: CreatePaladinInfo = { + name: "paladin-agent-1", + ownerId: "7c86c85d-0651-43e2-a748-d69d658418e8", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The name of the Paladin. | paladin-agent-1 | +| `ownerId` | *string* | :heavy_check_mark: | The ID of the owner of the Paladin. | 7c86c85d-0651-43e2-a748-d69d658418e8 | +| `monitorMode` | *boolean* | :heavy_minus_sign: | When true, the Paladin reasons about requests but takes no action. Defaults to true. | | +| `adminViewOnly` | *boolean* | :heavy_minus_sign: | When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. Defaults to false. | | +| `enabledConnectors` | [components.PaladinConnector](../../models/components/paladinconnector.md)[] | :heavy_minus_sign: | The connectors the Paladin is allowed to use. | | +| `instructions` | *string* | :heavy_minus_sign: | The free-form instructions that guide the Paladin's decisions. Optional; if omitted the Paladin is created without instructions. | | \ No newline at end of file diff --git a/docs/models/components/createrequestinfo.md b/docs/models/components/createrequestinfo.md index d48f16a9..5b65a916 100644 --- a/docs/models/components/createrequestinfo.md +++ b/docs/models/components/createrequestinfo.md @@ -12,7 +12,6 @@ let value: CreateRequestInfo = { { id: "group283-ca87-4a8a-bdbb-df212eca5353", accessLevelRemoteId: "arn:aws:iam::490306337630:role/SupportUser", - accessLevelName: "arn:aws:iam::490306337630:role/SupportUser", }, ], groups: [ diff --git a/docs/models/components/createrequestinforesource.md b/docs/models/components/createrequestinforesource.md index 1b121079..0b0516b2 100644 --- a/docs/models/components/createrequestinforesource.md +++ b/docs/models/components/createrequestinforesource.md @@ -8,14 +8,13 @@ import { CreateRequestInfoResource } from "opal-mcp/models/components"; let value: CreateRequestInfoResource = { id: "group283-ca87-4a8a-bdbb-df212eca5353", accessLevelRemoteId: "arn:aws:iam::490306337630:role/SupportUser", - accessLevelName: "arn:aws:iam::490306337630:role/SupportUser", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | The ID of the resource requested. Should not be specified if group_id is specified. | group283-ca87-4a8a-bdbb-df212eca5353 | -| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | The ID of the access level requested on the remote system. | arn:aws:iam::490306337630:role/SupportUser | -| `accessLevelName` | *string* | :heavy_minus_sign: | The ID of the access level requested on the remote system. | arn:aws:iam::490306337630:role/SupportUser | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | The ID of the resource requested. Should not be specified if group_id is specified. | group283-ca87-4a8a-bdbb-df212eca5353 | +| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | The ID of the access level requested on the remote system. | arn:aws:iam::490306337630:role/SupportUser | +| ~~`accessLevelName`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the access level requested on the remote system. This field is deprecated and no longer required. We will populate based on the access_level_remote_id. | arn:aws:iam::490306337630:role/SupportUser | \ No newline at end of file diff --git a/docs/models/components/createresourceinfo.md b/docs/models/components/createresourceinfo.md index 7a35bf3b..ad224f30 100644 --- a/docs/models/components/createresourceinfo.md +++ b/docs/models/components/createresourceinfo.md @@ -19,13 +19,8 @@ let value: CreateResourceInfo = { appId: "f454d283-ca87-4a8a-bdbb-df212eca5353", remoteResourceId: "API_ACCESS_MANAGEMENT_ADMIN-51d203da-313a-4fd9-8fcf-420ce6312345", - metadata: "{\n" - + " \"okta_directory_role\":\n" - + " {\n" - + " \"role_id\": \"SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345\",\n" - + " \"role_type\": \"SUPER_ADMIN\",\n" - + " },\n" - + "}", + metadata: + "{\n \"okta_directory_role\":\n {\n \"role_id\": \"SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345\",\n \"role_type\": \"SUPER_ADMIN\",\n },\n}", }; ``` @@ -41,4 +36,6 @@ let value: CreateResourceInfo = { | ~~`remoteResourceId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated - use remote_info instead. The ID of the resource on the remote system. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field. | API_ACCESS_MANAGEMENT_ADMIN-51d203da-313a-4fd9-8fcf-420ce6312345 | | ~~`metadata`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated - use remote_info instead.

JSON metadata about the remote resource. Include only for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details on how to specify this field.
The required format is dependent on resource_type and should have the following schema:

```json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Resource Metadata",
"properties": {
"aws_ec2_instance": {
"properties": {
"instance_id": {
"type": "string"
},
"region": {
"type": "string"
}
},
"required": ["instance_id", "region"],
"additionalProperties": false,
"type": "object",
"title": "AWS EC2 Instance"
},
"aws_eks_cluster": {
"properties": {
"cluster_name": {
"type": "string"
},
"cluster_region": {
"type": "string"
},
"cluster_arn": {
"type": "string"
}
},
"required": ["cluster_name", "cluster_region", "cluster_arn"],
"additionalProperties": false,
"type": "object",
"title": "AWS EKS Cluster"
},
"aws_rds_instance": {
"properties": {
"instance_id": {
"type": "string"
},
"engine": {
"type": "string"
},
"region": {
"type": "string"
},
"resource_id": {
"type": "string"
},
"database_name": {
"type": "string"
}
},
"required": [
"instance_id",
"engine",
"region",
"resource_id",
"database_name"
],
"additionalProperties": false,
"type": "object",
"title": "AWS RDS Instance"
},
"aws_role": {
"properties": {
"arn": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": ["arn", "name"],
"additionalProperties": false,
"type": "object",
"title": "AWS Role"
},
"gcp_bucket": {
"properties": {
"bucket_id": {
"type": "string"
}
},
"required": ["bucket_id"],
"additionalProperties": false,
"type": "object",
"title": "GCP Bucket"
},
"gcp_compute_instance": {
"properties": {
"instance_id": {
"type": "string"
},
"project_id": {
"type": "string"
},
"zone": {
"type": "string"
}
},
"required": ["instance_id", "project_id", "zone"],
"additionalProperties": false,
"type": "object",
"title": "GCP Compute Instance"
},
"gcp_folder": {
"properties": {
"folder_id": {
"type": "string"
}
},
"required": ["folder_id"],
"additionalProperties": false,
"type": "object",
"title": "GCP Folder"
},
"gcp_gke_cluster": {
"properties": {
"cluster_name": {
"type": "string"
}
},
"required": ["cluster_name"],
"additionalProperties": false,
"type": "object",
"title": "GCP GKE Cluster"
},
"gcp_project": {
"properties": {
"project_id": {
"type": "string"
}
},
"required": ["project_id"],
"additionalProperties": false,
"type": "object",
"title": "GCP Project"
},
"gcp_sql_instance": {
"properties": {
"instance_id": {
"type": "string"
},
"project_id": {
"type": "string"
}
},
"required": ["instance_id", "project_id"],
"additionalProperties": false,
"type": "object",
"title": "GCP SQL Instance"
},
"git_hub_repo": {
"properties": {
"org_name": {
"type": "string"
},
"repo_name": {
"type": "string"
}
},
"required": ["org_name", "repo_name"],
"additionalProperties": false,
"type": "object",
"title": "GitHub Repo"
},
"okta_directory_app": {
"properties": {
"app_id": {
"type": "string"
},
"logo_url": {
"type": "string"
}
},
"required": ["app_id", "logo_url"],
"additionalProperties": false,
"type": "object",
"title": "Okta Directory App"
},
"okta_directory_role": {
"properties": {
"role_type": {
"type": "string"
},
"role_id": {
"type": "string"
}
},
"required": ["role_type", "role_id"],
"additionalProperties": false,
"type": "object",
"title": "Okta Directory Role"
},
"salesforce_profile": {
"properties": {
"user_license": {
"type": "string"
}
},
"required": ["user_license"],
"additionalProperties": false,
"type": "object",
"title": "Salesforce Profile"
}
},
"additionalProperties": false,
"minProperties": 1,
"maxProperties": 1,
"type": "object"
}
``` | {
"okta_directory_role":
{
"role_id": "SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345",
"role_type": "SUPER_ADMIN",
},
} | | `customRequestNotification` | *string* | :heavy_minus_sign: | Custom request notification sent upon request approval. | Check your email to register your account. | -| `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | +| `matchRemoteName` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false. | false | +| `matchRemoteDescription` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false. | false | \ No newline at end of file diff --git a/docs/models/components/createuarinfo.md b/docs/models/components/createuarinfo.md index ef8c54ac..45872391 100644 --- a/docs/models/components/createuarinfo.md +++ b/docs/models/components/createuarinfo.md @@ -46,11 +46,12 @@ let value: CreateUARInfo = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *string* | :heavy_check_mark: | The name of the UAR. | Monthly UAR (July) | -| `reviewerAssignmentPolicy` | [components.UARReviewerAssignmentPolicyEnum](../../models/components/uarreviewerassignmentpolicyenum.md) | :heavy_check_mark: | A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. | MANUALLY | +| `reviewerAssignmentPolicy` | [components.UARReviewerAssignmentPolicyEnum](../../models/components/uarreviewerassignmentpolicyenum.md) | :heavy_check_mark: | A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. | MANUALLY | | `sendReviewerAssignmentNotification` | *boolean* | :heavy_check_mark: | A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False. | false | | `deadline` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The last day for reviewers to complete their access reviews. | 2022-07-14 06:59:59 +0000 UTC | | `timeZone` | *string* | :heavy_check_mark: | The time zone name (as defined by the IANA Time Zone database) used in the access review deadline and exported audit report. Default is America/Los_Angeles. | America/Los_Angeles | | `selfReviewAllowed` | *boolean* | :heavy_check_mark: | A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. | false | +| `instantlyActionReviews` | *boolean* | :heavy_minus_sign: | A bool representing whether to instantly action changes when reviewers submit their decision. Default is False. | false | | `reminderSchedule` | *number*[] | :heavy_minus_sign: | N/A | | | `reminderIncludeManager` | *boolean* | :heavy_minus_sign: | N/A | false | | `uarScope` | [components.UARScope](../../models/components/uarscope.md) | :heavy_minus_sign: | If set, the access review will only contain resources and groups that match at least one of the filters in scope. | {
"filter_operator": "ANY",
"users": [
"userd283-ca87-4a8a-bdbb-df212eca5353"
],
"include_group_bindings": true,
"tags": [
{
"key": "uar_scope",
"value": "high_priority"
}
],
"names": [
"demo",
"api"
],
"admins": [
"f454d283-ca87-4a8a-bdbb-df212eca5353",
"8763d283-ca87-4a8a-bdbb-df212ecab139"
],
"resource_types": [
"GCP_CLOUD_SQL_POSTGRES_INSTANCE"
],
"group_types": [
"AWS_SSO_GROUP"
],
"apps": [
"pas2d283-ca87-4a8a-bdbb-df212eca5353",
"apss2d283-ca87-4a8a-bdbb-df212eca5353"
],
"entities": [
"f454d283-as87-4a8a-bdbb-df212eca5353",
"f454d283-as87-4a8a-bdbb-df212eca5329"
]
} | \ No newline at end of file diff --git a/docs/models/components/cursororganization.md b/docs/models/components/cursororganization.md new file mode 100644 index 00000000..cbf0359d --- /dev/null +++ b/docs/models/components/cursororganization.md @@ -0,0 +1,19 @@ +# CursorOrganization + +Remote info for a Cursor organization. + +## Example Usage + +```typescript +import { CursorOrganization } from "opal-mcp/models/components"; + +let value: CursorOrganization = { + orgId: "123e4567-e89b-12d3-a456-426614174000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `orgId` | *string* | :heavy_check_mark: | The id of the organization. | 123e4567-e89b-12d3-a456-426614174000 | \ No newline at end of file diff --git a/docs/models/components/databricksaccountgroup.md b/docs/models/components/databricksaccountgroup.md new file mode 100644 index 00000000..be59ba17 --- /dev/null +++ b/docs/models/components/databricksaccountgroup.md @@ -0,0 +1,19 @@ +# DatabricksAccountGroup + +Remote info for Databricks account group. + +## Example Usage + +```typescript +import { DatabricksAccountGroup } from "opal-mcp/models/components"; + +let value: DatabricksAccountGroup = { + groupId: "898931321", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The id of the Databricks account group. | 898931321 | \ No newline at end of file diff --git a/docs/models/components/databricksaccountserviceprincipal.md b/docs/models/components/databricksaccountserviceprincipal.md new file mode 100644 index 00000000..8ea6fb4d --- /dev/null +++ b/docs/models/components/databricksaccountserviceprincipal.md @@ -0,0 +1,21 @@ +# DatabricksAccountServicePrincipal + +Remote info for Databricks account service principal. + +## Example Usage + +```typescript +import { DatabricksAccountServicePrincipal } from "opal-mcp/models/components"; + +let value: DatabricksAccountServicePrincipal = { + applicationId: "00000000-0000-0000-0000-000000000000", + resourceId: "00000000-0000-0000-0000-000000000000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `applicationId` | *string* | :heavy_check_mark: | The application ID of the service principal. | 00000000-0000-0000-0000-000000000000 | +| `resourceId` | *string* | :heavy_check_mark: | The resource ID of the service principal. | 00000000-0000-0000-0000-000000000000 | \ No newline at end of file diff --git a/docs/models/components/datadogrole.md b/docs/models/components/datadogrole.md new file mode 100644 index 00000000..e9dd1109 --- /dev/null +++ b/docs/models/components/datadogrole.md @@ -0,0 +1,19 @@ +# DatadogRole + +Remote info for Datadog role. + +## Example Usage + +```typescript +import { DatadogRole } from "opal-mcp/models/components"; + +let value: DatadogRole = { + roleId: "123e4567-e89b-12d3-a456-426614174000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | 123e4567-e89b-12d3-a456-426614174000 | \ No newline at end of file diff --git a/docs/models/components/datastaxastrarole.md b/docs/models/components/datastaxastrarole.md new file mode 100644 index 00000000..e872697c --- /dev/null +++ b/docs/models/components/datastaxastrarole.md @@ -0,0 +1,19 @@ +# DatastaxAstraRole + +Remote info for an Astra role. + +## Example Usage + +```typescript +import { DatastaxAstraRole } from "opal-mcp/models/components"; + +let value: DatastaxAstraRole = { + roleId: "123e4567-e89b-12d3-a456-426614174000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | 123e4567-e89b-12d3-a456-426614174000 | \ No newline at end of file diff --git a/docs/models/components/delegation.md b/docs/models/components/delegation.md new file mode 100644 index 00000000..633c74e0 --- /dev/null +++ b/docs/models/components/delegation.md @@ -0,0 +1,39 @@ +# Delegation + +# Delegation Object +### Description +The `Delegation` object represents a delegation of access review requests from one user to another. + +### Usage Example +List from the `GET Delegations` endpoint. +Get from the `GET Delegation` endpoint. + +## Example Usage + +```typescript +import { Delegation } from "opal-mcp/models/components"; + +let value: Delegation = { + id: "4aed3e8a-727b-4d72-8010-3b8710c50bec", + delegatorUserId: "123e4567-e89b-12d3-a456-426614174000", + delegateUserId: "7c86c85d-0651-43e2-a748-d69d658418e8", + startTime: new Date("2023-10-01T12:00:00Z"), + endTime: new Date("2023-10-01T12:00:00Z"), + reason: "I need to be out of the office", + createdAt: new Date("2023-10-01T12:00:00Z"), + updatedAt: new Date("2023-10-01T12:00:00Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the delegation. | 4aed3e8a-727b-4d72-8010-3b8710c50bec | +| `delegatorUserId` | *string* | :heavy_check_mark: | The ID of the user delegating their access review requests. | 123e4567-e89b-12d3-a456-426614174000 | +| `delegateUserId` | *string* | :heavy_check_mark: | The ID of the user being delegated to. | 7c86c85d-0651-43e2-a748-d69d658418e8 | +| `startTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The start time of the delegation. | 2023-10-01 12:00:00 +0000 UTC | +| `endTime` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The end time of the delegation. | 2023-10-01 12:00:00 +0000 UTC | +| `reason` | *string* | :heavy_check_mark: | The reason for the delegation. | I need to be out of the office | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The creation time of the delegation. | 2023-10-01 12:00:00 +0000 UTC | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The last updated time of the delegation. | 2023-10-01 12:00:00 +0000 UTC | \ No newline at end of file diff --git a/docs/models/components/devingroup.md b/docs/models/components/devingroup.md new file mode 100644 index 00000000..24b41103 --- /dev/null +++ b/docs/models/components/devingroup.md @@ -0,0 +1,19 @@ +# DevinGroup + +Remote info for Devin group. + +## Example Usage + +```typescript +import { DevinGroup } from "opal-mcp/models/components"; + +let value: DevinGroup = { + groupName: "devin-group-01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `groupName` | *string* | :heavy_check_mark: | The name of the Devin group. | devin-group-01 | \ No newline at end of file diff --git a/docs/models/components/devinorganization.md b/docs/models/components/devinorganization.md new file mode 100644 index 00000000..32afd9ba --- /dev/null +++ b/docs/models/components/devinorganization.md @@ -0,0 +1,19 @@ +# DevinOrganization + +Remote info for Devin organization. + +## Example Usage + +```typescript +import { DevinOrganization } from "opal-mcp/models/components"; + +let value: DevinOrganization = { + orgId: "devin-org-01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `orgId` | *string* | :heavy_check_mark: | The id of the organization. | devin-org-01 | \ No newline at end of file diff --git a/docs/models/components/devinrole.md b/docs/models/components/devinrole.md new file mode 100644 index 00000000..1b52eef0 --- /dev/null +++ b/docs/models/components/devinrole.md @@ -0,0 +1,19 @@ +# DevinRole + +Remote info for Devin role. + +## Example Usage + +```typescript +import { DevinRole } from "opal-mcp/models/components"; + +let value: DevinRole = { + roleId: "devin-role-01", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | devin-role-01 | \ No newline at end of file diff --git a/docs/models/components/docusigngroup.md b/docs/models/components/docusigngroup.md new file mode 100644 index 00000000..f3c749f5 --- /dev/null +++ b/docs/models/components/docusigngroup.md @@ -0,0 +1,19 @@ +# DocusignGroup + +Remote info for Docusign group. + +## Example Usage + +```typescript +import { DocusignGroup } from "opal-mcp/models/components"; + +let value: DocusignGroup = { + groupId: "12345", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The ID of the Docusign group. | 12345 | \ No newline at end of file diff --git a/docs/models/components/docusignpermissionprofile.md b/docs/models/components/docusignpermissionprofile.md new file mode 100644 index 00000000..23208f99 --- /dev/null +++ b/docs/models/components/docusignpermissionprofile.md @@ -0,0 +1,19 @@ +# DocusignPermissionProfile + +Remote info for Docusign permission profile. + +## Example Usage + +```typescript +import { DocusignPermissionProfile } from "opal-mcp/models/components"; + +let value: DocusignPermissionProfile = { + permissionProfileId: "12345", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `permissionProfileId` | *string* | :heavy_check_mark: | The ID of the Docusign permission profile. | 12345 | \ No newline at end of file diff --git a/docs/models/components/docusignsigninggroup.md b/docs/models/components/docusignsigninggroup.md new file mode 100644 index 00000000..d9e186cf --- /dev/null +++ b/docs/models/components/docusignsigninggroup.md @@ -0,0 +1,19 @@ +# DocusignSigningGroup + +Remote info for Docusign signing group. + +## Example Usage + +```typescript +import { DocusignSigningGroup } from "opal-mcp/models/components"; + +let value: DocusignSigningGroup = { + signingGroupId: "12345", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `signingGroupId` | *string* | :heavy_check_mark: | The ID of the Docusign signing group. | 12345 | \ No newline at end of file diff --git a/docs/models/components/entityadminfilter.md b/docs/models/components/entityadminfilter.md new file mode 100644 index 00000000..056af28a --- /dev/null +++ b/docs/models/components/entityadminfilter.md @@ -0,0 +1,24 @@ +# EntityAdminFilter + +Filters GROUP and RESOURCE entities by their admin owner. USER entities never match, in either polarity. `not` inverts the match within the resource/group domain (self-negating, like IdpStatusFilter): omit it (or false) to include entities owned by the given owners, set it true to exclude them. + + +## Example Usage + +```typescript +import { EntityAdminFilter } from "opal-mcp/models/components"; + +let value: EntityAdminFilter = { + ownerIDs: [ + "417aeb98-121a-4844-8c4c-ad7b7121dddf", + "e1ab04ef-a809-4835-a54e-29444044fa12", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `ownerIDs` | *string*[] | :heavy_check_mark: | The owner (group) UUIDs to match entities against. | +| `not` | *boolean* | :heavy_minus_sign: | Invert the match — return resources/groups NOT owned by the given owners. | \ No newline at end of file diff --git a/docs/models/components/entityitemtypeenum.md b/docs/models/components/entityitemtypeenum.md new file mode 100644 index 00000000..858be1a2 --- /dev/null +++ b/docs/models/components/entityitemtypeenum.md @@ -0,0 +1,17 @@ +# EntityItemTypeEnum + +Granular subtype of an entity. + +## Example Usage + +```typescript +import { EntityItemTypeEnum } from "opal-mcp/models/components"; + +let value: EntityItemTypeEnum = "OPAL_ROLE"; +``` + +## Values + +```typescript +"USER" | "SERVICE_USER" | "ACTIVE_DIRECTORY_GROUP" | "AWS_SSO_GROUP" | "DUO_GROUP" | "GIT_HUB_TEAM" | "GIT_LAB_GROUP" | "GOOGLE_GROUPS_GROUP" | "GOOGLE_GROUPS_GKE_GROUP" | "LDAP_GROUP" | "OKTA_GROUP" | "OKTA_GROUP_RULE" | "TAILSCALE_GROUP" | "TWINGATE_GROUP" | "TWINGATE_GROUP_SYNCED" | "OPAL_GROUP" | "OPAL_ACCESS_RULE" | "AZURE_AD_SECURITY_GROUP" | "AZURE_AD_MICROSOFT_365_GROUP" | "CONNECTOR_GROUP" | "SNOWFLAKE_ROLE" | "WORKDAY_USER_SECURITY_GROUP" | "DATABRICKS_ACCOUNT_GROUP" | "AWS_IAM_ROLE" | "AWS_EC2_INSTANCE" | "AWS_EKS_CLUSTER" | "AWS_RDS_POSTGRES_INSTANCE" | "AWS_RDS_POSTGRES_CLUSTER" | "AWS_RDS_MYSQL_INSTANCE" | "AWS_RDS_MYSQL_CLUSTER" | "AWS_ACCOUNT" | "AWS_SSO_PERMISSION_SET" | "AZURE_MANAGEMENT_GROUP" | "AZURE_RESOURCE_GROUP" | "AZURE_SUBSCRIPTION" | "AZURE_VIRTUAL_MACHINE" | "AZURE_STORAGE_ACCOUNT" | "AZURE_STORAGE_CONTAINER" | "AZURE_SQL_SERVER" | "AZURE_SQL_MANAGED_INSTANCE" | "AZURE_SQL_DATABASE" | "AZURE_SQL_MANAGED_DATABASE" | "AZURE_USER_ASSIGNED_MANAGED_Identity" | "AZURE_ENTRA_ID_ROLE" | "AZURE_ENTERPRISE_APP" | "CUSTOM" | "CUSTOM_CONNECTOR" | "GCP_ORGANIZATION" | "GCP_BUCKET" | "GCP_COMPUTE_INSTANCE" | "GCP_BIG_QUERY_DATASET" | "GCP_BIG_QUERY_TABLE" | "GCP_FOLDER" | "GCP_GKE_CLUSTER" | "GCP_PROJECT" | "GCP_CLOUD_SQL_POSTGRES_INSTANCE" | "GCP_CLOUD_SQL_MYSQL_INSTANCE" | "GCP_SERVICE_ACCOUNT" | "GIT_HUB_REPO" | "GIT_HUB_ORG_ROLE" | "GIT_LAB_PROJECT" | "GOOGLE_WORKSPACE_ROLE" | "MONGO_INSTANCE" | "MONGO_ATLAS_INSTANCE" | "OKTA_APP" | "OKTA_ROLE" | "OPAL_ROLE" | "OPAL_SCOPED_ROLE" | "PAGERDUTY_ROLE" | "TAILSCALE_SSH" | "TWINGATE_RESOURCE" | "SALESFORCE_PERMISSION_SET" | "SALESFORCE_PROFILE" | "SALESFORCE_ROLE" | "SNOWFLAKE_DATABASE" | "SNOWFLAKE_SCHEMA" | "SNOWFLAKE_TABLE" | "WORKDAY_ROLE" | "MYSQL_INSTANCE" | "MARIADB_INSTANCE" | "POSTGRES_INSTANCE" | "TELEPORT_ROLE" | "DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL" | "ILEVEL_ADVANCED_ROLE" +``` \ No newline at end of file diff --git a/docs/models/components/entitynamefilter.md b/docs/models/components/entitynamefilter.md new file mode 100644 index 00000000..4205a6a3 --- /dev/null +++ b/docs/models/components/entitynamefilter.md @@ -0,0 +1,21 @@ +# EntityNameFilter + +Filters entities by name using a string match strategy. + +## Example Usage + +```typescript +import { EntityNameFilter } from "opal-mcp/models/components"; + +let value: EntityNameFilter = { + stringMatchType: "REGEX", + string: "engineering", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `stringMatchType` | [components.StringMatchType](../../models/components/stringmatchtype.md) | :heavy_check_mark: | How to match a string value against entity names. REGEX matches the value as a case-insensitive regular expression. | | +| `string` | *string* | :heavy_check_mark: | The string value to match against the entity name. | engineering | \ No newline at end of file diff --git a/docs/models/components/entitytagfilter.md b/docs/models/components/entitytagfilter.md new file mode 100644 index 00000000..348d4297 --- /dev/null +++ b/docs/models/components/entitytagfilter.md @@ -0,0 +1,22 @@ +# EntityTagFilter + +Filters entities by a tag key/value pair, optionally scoped to a connection. + +## Example Usage + +```typescript +import { EntityTagFilter } from "opal-mcp/models/components"; + +let value: EntityTagFilter = { + key: "team", + value: "platform", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `key` | *string* | :heavy_check_mark: | The tag key to filter by. | team | +| `value` | *string* | :heavy_minus_sign: | The tag value to filter by. If omitted, matches any value for the given key. | platform | +| `connectionId` | *string* | :heavy_minus_sign: | If specified, filters by tags associated with this connection. | | \ No newline at end of file diff --git a/docs/models/components/eventstream.md b/docs/models/components/eventstream.md new file mode 100644 index 00000000..798f90a1 --- /dev/null +++ b/docs/models/components/eventstream.md @@ -0,0 +1,25 @@ +# EventStream + +An event streaming connection that publishes events to an external system. + +## Example Usage + +```typescript +import { EventStream } from "opal-mcp/models/components"; + +let value: EventStream = { + eventStreamId: "d07a6c09-a381-4abd-b5d6-5ec0df150a5a", + connection: { + name: "", + connectionType: "WEBHOOK", + enabled: false, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `eventStreamId` | *string* | :heavy_check_mark: | The ID of the event stream. | +| `connection` | [components.EventStreamConnection](../../models/components/eventstreamconnection.md) | :heavy_check_mark: | The connection configuration for an event stream. | \ No newline at end of file diff --git a/docs/models/components/eventstreamconnection.md b/docs/models/components/eventstreamconnection.md new file mode 100644 index 00000000..07245b93 --- /dev/null +++ b/docs/models/components/eventstreamconnection.md @@ -0,0 +1,25 @@ +# EventStreamConnection + +The connection configuration for an event stream. + +## Example Usage + +```typescript +import { EventStreamConnection } from "opal-mcp/models/components"; + +let value: EventStreamConnection = { + name: "", + connectionType: "WEBHOOK", + enabled: true, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The name of the connection. | +| `connectionType` | [components.EventStreamConnectionTypeEnum](../../models/components/eventstreamconnectiontypeenum.md) | :heavy_check_mark: | The type of event stream connection. | +| `enabled` | *boolean* | :heavy_check_mark: | Whether the connection is enabled. | +| `webhookUrl` | *string* | :heavy_minus_sign: | The webhook URL, present when connection_type is WEBHOOK. | +| `credentials` | [components.WebhookCredentials](../../models/components/webhookcredentials.md) | :heavy_minus_sign: | Authentication credentials for a webhook connection. | \ No newline at end of file diff --git a/docs/models/components/eventstreamconnectiontypeenum.md b/docs/models/components/eventstreamconnectiontypeenum.md new file mode 100644 index 00000000..4621b94f --- /dev/null +++ b/docs/models/components/eventstreamconnectiontypeenum.md @@ -0,0 +1,17 @@ +# EventStreamConnectionTypeEnum + +The type of event stream connection. + +## Example Usage + +```typescript +import { EventStreamConnectionTypeEnum } from "opal-mcp/models/components"; + +let value: EventStreamConnectionTypeEnum = "WEBHOOK"; +``` + +## Values + +```typescript +"WEBHOOK" +``` \ No newline at end of file diff --git a/docs/models/components/eventstreamlist.md b/docs/models/components/eventstreamlist.md new file mode 100644 index 00000000..ac9e7a15 --- /dev/null +++ b/docs/models/components/eventstreamlist.md @@ -0,0 +1,28 @@ +# EventStreamList + +A list of event streams. + +## Example Usage + +```typescript +import { EventStreamList } from "opal-mcp/models/components"; + +let value: EventStreamList = { + eventStreams: [ + { + eventStreamId: "c0b5c1d3-fab4-4571-a628-ad4624482bbb", + connection: { + name: "", + connectionType: "WEBHOOK", + enabled: false, + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `eventStreams` | [components.EventStream](../../models/components/eventstream.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/githubenterpriserole.md b/docs/models/components/githubenterpriserole.md new file mode 100644 index 00000000..d8c70fff --- /dev/null +++ b/docs/models/components/githubenterpriserole.md @@ -0,0 +1,19 @@ +# GithubEnterpriseRole + +Remote info for GitHub Enterprise role. + +## Example Usage + +```typescript +import { GithubEnterpriseRole } from "opal-mcp/models/components"; + +let value: GithubEnterpriseRole = { + roleId: "112233", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | 112233 | \ No newline at end of file diff --git a/docs/models/components/githubenterpriseteam.md b/docs/models/components/githubenterpriseteam.md new file mode 100644 index 00000000..df3adae9 --- /dev/null +++ b/docs/models/components/githubenterpriseteam.md @@ -0,0 +1,19 @@ +# GithubEnterpriseTeam + +Remote info for GitHub Enterprise team. + +## Example Usage + +```typescript +import { GithubEnterpriseTeam } from "opal-mcp/models/components"; + +let value: GithubEnterpriseTeam = { + teamSlug: "opal-security", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `teamSlug` | *string* | :heavy_check_mark: | The slug of the GitHub Enterprise team. | opal-security | \ No newline at end of file diff --git a/docs/models/components/githuborg.md b/docs/models/components/githuborg.md new file mode 100644 index 00000000..9c379aa8 --- /dev/null +++ b/docs/models/components/githuborg.md @@ -0,0 +1,19 @@ +# GithubOrg + +Remote info for GitHub organization. + +## Example Usage + +```typescript +import { GithubOrg } from "opal-mcp/models/components"; + +let value: GithubOrg = { + orgName: "Opal Security", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `orgName` | *string* | :heavy_check_mark: | The name of the organization. | Opal Security | \ No newline at end of file diff --git a/docs/models/components/githuborgrole.md b/docs/models/components/githuborgrole.md new file mode 100644 index 00000000..adbb30bd --- /dev/null +++ b/docs/models/components/githuborgrole.md @@ -0,0 +1,20 @@ +# GithubOrgRole + +Remote info for GitHub organization role. + +## Example Usage + +```typescript +import { GithubOrgRole } from "opal-mcp/models/components"; + +let value: GithubOrgRole = { + roleId: "112233", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | 112233 | +| `orgName` | *string* | :heavy_minus_sign: | GitHub org role's org name, required only for Enterprise. | | \ No newline at end of file diff --git a/docs/models/components/githubrepo.md b/docs/models/components/githubrepo.md index 27847d62..13cbcdb8 100644 --- a/docs/models/components/githubrepo.md +++ b/docs/models/components/githubrepo.md @@ -17,4 +17,5 @@ let value: GithubRepo = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | ~~`repoId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The id of the repository. | 898931321 | -| `repoName` | *string* | :heavy_check_mark: | The name of the repository. | Opal Security | \ No newline at end of file +| `repoName` | *string* | :heavy_check_mark: | The name of the repository. | Opal Security | +| `orgName` | *string* | :heavy_minus_sign: | GitHub repo's org name, required only for Enterprise. | | \ No newline at end of file diff --git a/docs/models/components/githubteam.md b/docs/models/components/githubteam.md index b3f7e13a..e50cf2b9 100644 --- a/docs/models/components/githubteam.md +++ b/docs/models/components/githubteam.md @@ -17,4 +17,5 @@ let value: GithubTeam = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | ~~`teamId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The id of the GitHub team. | 898931321 | -| `teamSlug` | *string* | :heavy_check_mark: | The slug of the GitHub team. | opal-security | \ No newline at end of file +| `teamSlug` | *string* | :heavy_check_mark: | The slug of the GitHub team. | opal-security | +| `orgName` | *string* | :heavy_minus_sign: | GitHub team's org name, required only for Enterprise | | \ No newline at end of file diff --git a/docs/models/components/grafanadashboard.md b/docs/models/components/grafanadashboard.md new file mode 100644 index 00000000..54e48d09 --- /dev/null +++ b/docs/models/components/grafanadashboard.md @@ -0,0 +1,19 @@ +# GrafanaDashboard + +Remote info for Grafana dashboard. + +## Example Usage + +```typescript +import { GrafanaDashboard } from "opal-mcp/models/components"; + +let value: GrafanaDashboard = { + dashboardUid: "dddRTXX", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `dashboardUid` | *string* | :heavy_check_mark: | The UID of the Grafana dashboard. | dddRTXX | \ No newline at end of file diff --git a/docs/models/components/grafanafolder.md b/docs/models/components/grafanafolder.md new file mode 100644 index 00000000..ced30949 --- /dev/null +++ b/docs/models/components/grafanafolder.md @@ -0,0 +1,19 @@ +# GrafanaFolder + +Remote info for Grafana folder. + +## Example Usage + +```typescript +import { GrafanaFolder } from "opal-mcp/models/components"; + +let value: GrafanaFolder = { + folderUid: "fffRTXX", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `folderUid` | *string* | :heavy_check_mark: | The UID of the Grafana folder. | fffRTXX | \ No newline at end of file diff --git a/docs/models/components/grafanarole.md b/docs/models/components/grafanarole.md new file mode 100644 index 00000000..f15b5a64 --- /dev/null +++ b/docs/models/components/grafanarole.md @@ -0,0 +1,19 @@ +# GrafanaRole + +Remote info for Grafana role(fixed or custom). + +## Example Usage + +```typescript +import { GrafanaRole } from "opal-mcp/models/components"; + +let value: GrafanaRole = { + roleUid: "rrfRTXX", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `roleUid` | *string* | :heavy_check_mark: | The UID of the Grafana role. | rrfRTXX | \ No newline at end of file diff --git a/docs/models/components/grafanateam.md b/docs/models/components/grafanateam.md new file mode 100644 index 00000000..6574cb88 --- /dev/null +++ b/docs/models/components/grafanateam.md @@ -0,0 +1,19 @@ +# GrafanaTeam + +Remote info for Grafana team. + +## Example Usage + +```typescript +import { GrafanaTeam } from "opal-mcp/models/components"; + +let value: GrafanaTeam = { + teamId: "2323", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `teamId` | *string* | :heavy_check_mark: | The ID of the team. | 2323 | \ No newline at end of file diff --git a/docs/models/components/group.md b/docs/models/components/group.md index 10d52a50..88468966 100644 --- a/docs/models/components/group.md +++ b/docs/models/components/group.md @@ -15,14 +15,25 @@ import { Group } from "opal-mcp/models/components"; let value: Group = { groupId: "f454d283-ca87-4a8a-bdbb-df212eca5353", appId: "b5a5ca27-0ea3-4d86-9199-2126d57d1fbd", + name: "Payments Production Admin", description: "This group represents Active Directory group \"Payments Production Admin\". We use this AD group to facilitate staging deployments and qualifying new releases.", adminOwnerId: "7c86c85d-0651-43e2-a748-d69d658418e8", + groupLeaderUserIds: [ + "7c86c85d-0651-43e2-a748-d69d658418e8", + ], remoteId: "037m2jsg218b2wb", remoteName: "Finance Team", + groupType: "ACTIVE_DIRECTORY_GROUP", maxDuration: 120, + recommendedDuration: 60, + extensionsDurationInMinutes: 60, requireManagerApproval: false, requireSupportTicket: false, + requireMfaToApprove: false, + requireMfaToRequest: false, + autoApproval: false, + isRequestable: true, }; ``` @@ -41,6 +52,7 @@ let value: Group = { | `groupType` | [components.GroupTypeEnum](../../models/components/grouptypeenum.md) | :heavy_minus_sign: | The type of the group. | OPAL_GROUP | | `maxDuration` | *number* | :heavy_minus_sign: | The maximum duration for which the group can be requested (in minutes). | 120 | | `recommendedDuration` | *number* | :heavy_minus_sign: | The recommended duration for which the group should be requested (in minutes). -1 represents an indefinite duration. | 120 | +| `extensionsDurationInMinutes` | *number* | :heavy_minus_sign: | The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. | 120 | | ~~`requireManagerApproval`~~ | *boolean* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

A bool representing whether or not access requests to the group require manager approval. | false | | `requireSupportTicket` | *boolean* | :heavy_minus_sign: | A bool representing whether or not access requests to the group require an access ticket. | false | | `requireMfaToApprove` | *boolean* | :heavy_minus_sign: | A bool representing whether or not to require MFA for reviewers to approve requests for this group. | false | @@ -53,7 +65,10 @@ let value: Group = { | `requestConfigurations` | [components.RequestConfiguration](../../models/components/requestconfiguration.md)[] | :heavy_minus_sign: | A list of request configurations for this group. | [] | | ~~`requestConfigurationList`~~ | [components.RequestConfiguration](../../models/components/requestconfiguration.md)[] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

A list of request configurations for this group. Deprecated in favor of `request_configurations`. | [] | | ~~`metadata`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

JSON metadata about the remote group. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details. | { "okta_directory_group": { "group_id": "00g4bs66kwtpe1g12345" } } | -| `remoteInfo` | [components.GroupRemoteInfo](../../models/components/groupremoteinfo.md) | :heavy_minus_sign: | Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. | | +| `remoteInfo` | [components.GroupRemoteInfo](../../models/components/groupremoteinfo.md) | :heavy_minus_sign: | Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. If remote_info is provided, a group will be imported into Opal. For group types that support group creation through Opal, a new group will be created if remote_info is not provided. | | | `customRequestNotification` | *string* | :heavy_minus_sign: | Custom request notification sent to the requester when the request is approved. | Check your email to register your account. | | `riskSensitivity` | [components.GroupRiskSensitivity](../../models/components/grouprisksensitivity.md) | :heavy_minus_sign: | The risk sensitivity level for the group. When an override is set, this field will match that. | | -| `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | +| `matchRemoteName` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the group's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false. | false | +| `matchRemoteDescription` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the group's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false. | false | +| `lastSuccessfulSync` | [components.SyncTask](../../models/components/synctask.md) | :heavy_minus_sign: | Represents a sync task that has been completed, either successfully or with errors. | {
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"completed_at": "2023-10-01T12:00:00Z"
} | \ No newline at end of file diff --git a/docs/models/components/groupcontaininggroup.md b/docs/models/components/groupcontaininggroup.md index 67f334e7..98752187 100644 --- a/docs/models/components/groupcontaininggroup.md +++ b/docs/models/components/groupcontaininggroup.md @@ -16,6 +16,8 @@ let value: GroupContainingGroup = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `containingGroupId` | *string* | :heavy_check_mark: | The groupID of the containing group. | f454d283-ca87-4a8a-bdbb-df212eca5353 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `containingGroupId` | *string* | :heavy_check_mark: | The groupID of the containing group. | f454d283-ca87-4a8a-bdbb-df212eca5353 | +| `durationMinutes` | *number* | :heavy_minus_sign: | The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. | 120 | +| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | The updated remote ID of the access level granted to this group. | arn:aws:iam::590304332660:role/ReadOnlyAccess | \ No newline at end of file diff --git a/docs/models/components/groupremoteinfo.md b/docs/models/components/groupremoteinfo.md index bbbe6b4d..2b0e051d 100644 --- a/docs/models/components/groupremoteinfo.md +++ b/docs/models/components/groupremoteinfo.md @@ -1,6 +1,6 @@ # GroupRemoteInfo -Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. +Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. If remote_info is provided, a group will be imported into Opal. For group types that support group creation through Opal, a new group will be created if remote_info is not provided. ## Example Usage @@ -11,9 +11,30 @@ let value: GroupRemoteInfo = { activeDirectoryGroup: { groupId: "01fa7402-01d8-103b-8deb-5f3a0ab7884", }, + tailscaleGroup: { + groupId: "898931321", + }, + twingateGroup: { + groupId: "R3JvdXA6MTIzNA==", + }, + twingateGroupSynced: { + groupId: "R3JvdXA6MTIzNA==", + }, + awsSsoGroup: { + groupId: "898931321", + }, + databricksAccountGroup: { + groupId: "898931321", + }, + connectorGroup: { + groupId: "898931321", + }, githubTeam: { teamSlug: "opal-security", }, + githubEnterpriseTeam: { + teamSlug: "opal-security", + }, gitlabGroup: { groupId: "898931321", }, @@ -44,6 +65,54 @@ let value: GroupRemoteInfo = { workdayUserSecurityGroup: { groupId: "123abc456def", }, + pagerdutyOnCallSchedule: { + scheduleId: "PNZNINN", + }, + incidentioOnCallSchedule: { + scheduleId: "01HZ8XQM9ZQX8RKMZQ8ZQX8RK", + }, + rootlyOnCallSchedule: { + scheduleId: "01HZ8XQM9ZQX8RKMZQ8ZQX8RK", + }, + devinGroup: { + groupName: "devin-group-01", + }, + clickhouseRole: { + roleId: "my_clickhouse_role", + }, + grafanaTeam: { + teamId: "2323", + }, + zendeskGroup: { + groupId: "12345", + }, + slackUserGroup: { + groupId: "S0614TZR7", + }, + zendeskOrganization: { + organizationId: "67890", + }, + hubspotTeam: { + teamId: "12345", + }, + tableauGroup: { + groupId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + }, + confluenceGroup: { + groupId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + }, + jiraGroup: { + groupId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + }, + docusignGroup: { + groupId: "12345", + }, + zoomGroup: { + groupId: "SoBVexyrQjqCkcxjpBWi6w", + }, + docusignSigningGroup: { + signingGroupId: "12345", + }, }; ``` @@ -52,7 +121,14 @@ let value: GroupRemoteInfo = { | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `activeDirectoryGroup` | [components.ActiveDirectoryGroup](../../models/components/activedirectorygroup.md) | :heavy_minus_sign: | Remote info for Active Directory group. | +| `tailscaleGroup` | [components.TailscaleGroup](../../models/components/tailscalegroup.md) | :heavy_minus_sign: | Remote info for Tailscale group. | +| `twingateGroup` | [components.TwingateGroup](../../models/components/twingategroup.md) | :heavy_minus_sign: | Remote info for Twingate group. | +| `twingateGroupSynced` | [components.TwingateGroupSynced](../../models/components/twingategroupsynced.md) | :heavy_minus_sign: | Remote info for Twingate synced group. | +| `awsSsoGroup` | [components.AwsSsoGroup](../../models/components/awsssogroup.md) | :heavy_minus_sign: | Remote info for AWS SSO group. | +| `databricksAccountGroup` | [components.DatabricksAccountGroup](../../models/components/databricksaccountgroup.md) | :heavy_minus_sign: | Remote info for Databricks account group. | +| `connectorGroup` | [components.ConnectorGroup](../../models/components/connectorgroup.md) | :heavy_minus_sign: | Remote info for Connector group. | | `githubTeam` | [components.GithubTeam](../../models/components/githubteam.md) | :heavy_minus_sign: | Remote info for GitHub team. | +| `githubEnterpriseTeam` | [components.GithubEnterpriseTeam](../../models/components/githubenterpriseteam.md) | :heavy_minus_sign: | Remote info for GitHub Enterprise team. | | `gitlabGroup` | [components.GitlabGroup](../../models/components/gitlabgroup.md) | :heavy_minus_sign: | Remote info for Gitlab group. | | `googleGroup` | [components.GoogleGroup](../../models/components/googlegroup.md) | :heavy_minus_sign: | Remote info for Google group. | | `ldapGroup` | [components.LdapGroup](../../models/components/ldapgroup.md) | :heavy_minus_sign: | Remote info for LDAP group. | @@ -62,4 +138,20 @@ let value: GroupRemoteInfo = { | `azureAdMicrosoft365Group` | [components.AzureAdMicrosoft365Group](../../models/components/azureadmicrosoft365group.md) | :heavy_minus_sign: | Remote info for Microsoft Entra ID Microsoft 365 group. | | `snowflakeRole` | [components.SnowflakeRole](../../models/components/snowflakerole.md) | :heavy_minus_sign: | Remote info for Snowflake role. | | `oktaGroupRule` | [components.OktaGroupRule](../../models/components/oktagrouprule.md) | :heavy_minus_sign: | Remote info for Okta Directory group rule. | -| `workdayUserSecurityGroup` | [components.WorkdayUserSecurityGroup](../../models/components/workdayusersecuritygroup.md) | :heavy_minus_sign: | Remote info for Workday User Security group. | \ No newline at end of file +| `workdayUserSecurityGroup` | [components.WorkdayUserSecurityGroup](../../models/components/workdayusersecuritygroup.md) | :heavy_minus_sign: | Remote info for Workday User Security group. | +| `pagerdutyOnCallSchedule` | [components.PagerdutyOnCallSchedule](../../models/components/pagerdutyoncallschedule.md) | :heavy_minus_sign: | Remote info for PagerDuty on-call schedule group. | +| `incidentioOnCallSchedule` | [components.IncidentioOnCallSchedule](../../models/components/incidentiooncallschedule.md) | :heavy_minus_sign: | Remote info for Incident.io on-call schedule group. | +| `rootlyOnCallSchedule` | [components.RootlyOnCallSchedule](../../models/components/rootlyoncallschedule.md) | :heavy_minus_sign: | Remote info for Rootly on-call schedule group. | +| `devinGroup` | [components.DevinGroup](../../models/components/devingroup.md) | :heavy_minus_sign: | Remote info for Devin group. | +| `clickhouseRole` | [components.ClickhouseRole](../../models/components/clickhouserole.md) | :heavy_minus_sign: | Remote info for ClickHouse role. | +| `grafanaTeam` | [components.GrafanaTeam](../../models/components/grafanateam.md) | :heavy_minus_sign: | Remote info for Grafana team. | +| `zendeskGroup` | [components.ZendeskGroup](../../models/components/zendeskgroup.md) | :heavy_minus_sign: | Remote info for Zendesk group. | +| `slackUserGroup` | [components.SlackUserGroup](../../models/components/slackusergroup.md) | :heavy_minus_sign: | Remote info for Slack user group. | +| `zendeskOrganization` | [components.ZendeskOrganization](../../models/components/zendeskorganization.md) | :heavy_minus_sign: | Remote info for Zendesk organization. | +| `hubspotTeam` | [components.HubspotTeam](../../models/components/hubspotteam.md) | :heavy_minus_sign: | Remote info for HubSpot team. | +| `tableauGroup` | [components.TableauGroup](../../models/components/tableaugroup.md) | :heavy_minus_sign: | Remote info for Tableau group. | +| `confluenceGroup` | [components.ConfluenceGroup](../../models/components/confluencegroup.md) | :heavy_minus_sign: | Remote info for Confluence group. | +| `jiraGroup` | [components.JiraGroup](../../models/components/jiragroup.md) | :heavy_minus_sign: | Remote info for Jira group. | +| `docusignGroup` | [components.DocusignGroup](../../models/components/docusigngroup.md) | :heavy_minus_sign: | Remote info for Docusign group. | +| `zoomGroup` | [components.ZoomGroup](../../models/components/zoomgroup.md) | :heavy_minus_sign: | Remote info for Zoom group. | +| `docusignSigningGroup` | [components.DocusignSigningGroup](../../models/components/docusignsigninggroup.md) | :heavy_minus_sign: | Remote info for Docusign signing group. | \ No newline at end of file diff --git a/docs/models/components/groupresource.md b/docs/models/components/groupresource.md index 5fa518e1..9065d220 100644 --- a/docs/models/components/groupresource.md +++ b/docs/models/components/groupresource.md @@ -25,4 +25,7 @@ let value: GroupResource = { | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `groupId` | *string* | :heavy_check_mark: | The ID of the group. | f454d283-ca87-4a87-bdbb-df212eca5353 | | `resourceId` | *string* | :heavy_check_mark: | The ID of the resource. | b5a5ca27-0ea3-4d86-9199-2126d57d1fbd | +| `groupName` | *string* | :heavy_minus_sign: | The name of the group | API Group | +| `resourceName` | *string* | :heavy_minus_sign: | The name of the resource | API Group | +| `expirationDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The day and time the group's access will expire. | 2022-01-23 04:56:07 +0000 UTC | | `accessLevel` | [components.ResourceAccessLevel](../../models/components/resourceaccesslevel.md) | :heavy_check_mark: | # Access Level Object
### Description
The `AccessLevel` object is used to represent the level of access that a principal has. The "default" access
level is a `AccessLevel` object whose fields are all empty strings.

### Usage Example
View the `AccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource. | {
"access_level_name": "AdminRole",
"access_level_remote_id": "arn:aws:iam::590304332660:role/AdministratorAccess"
} | \ No newline at end of file diff --git a/docs/models/components/grouptypeenum.md b/docs/models/components/grouptypeenum.md index 128d99ad..131360c1 100644 --- a/docs/models/components/grouptypeenum.md +++ b/docs/models/components/grouptypeenum.md @@ -13,5 +13,5 @@ let value: GroupTypeEnum = "OPAL_GROUP"; ## Values ```typescript -"ACTIVE_DIRECTORY_GROUP" | "AWS_SSO_GROUP" | "DATABRICKS_ACCOUNT_GROUP" | "DUO_GROUP" | "GIT_HUB_TEAM" | "GIT_LAB_GROUP" | "GOOGLE_GROUPS_GROUP" | "GOOGLE_GROUPS_GKE_GROUP" | "LDAP_GROUP" | "OKTA_GROUP" | "OKTA_GROUP_RULE" | "TAILSCALE_GROUP" | "OPAL_GROUP" | "OPAL_ACCESS_RULE" | "AZURE_AD_SECURITY_GROUP" | "AZURE_AD_MICROSOFT_365_GROUP" | "CONNECTOR_GROUP" | "SNOWFLAKE_ROLE" | "WORKDAY_USER_SECURITY_GROUP" +"ACTIVE_DIRECTORY_GROUP" | "AWS_SSO_GROUP" | "DATABRICKS_ACCOUNT_GROUP" | "DUO_GROUP" | "GIT_HUB_TEAM" | "GIT_LAB_GROUP" | "GOOGLE_GROUPS_GROUP" | "GOOGLE_GROUPS_GKE_GROUP" | "LDAP_GROUP" | "OKTA_GROUP" | "OKTA_GROUP_RULE" | "TAILSCALE_GROUP" | "OPAL_GROUP" | "OPAL_ACCESS_RULE" | "AZURE_AD_SECURITY_GROUP" | "AZURE_AD_MICROSOFT_365_GROUP" | "CONNECTOR_GROUP" | "SNOWFLAKE_ROLE" | "WORKDAY_USER_SECURITY_GROUP" | "PAGERDUTY_ON_CALL_SCHEDULE" | "INCIDENTIO_ON_CALL_SCHEDULE" | "ROOTLY_ON_CALL_SCHEDULE" | "DEVIN_GROUP" | "GIT_HUB_ENTERPRISE_TEAM" | "GRAFANA_TEAM" | "CLICKHOUSE_ROLE" | "SLACK_USER_GROUP" | "TWINGATE_GROUP" | "TWINGATE_GROUP_SYNCED" | "ZENDESK_GROUP" | "ZENDESK_ORGANIZATION" | "HUBSPOT_TEAM" | "TABLEAU_GROUP" | "CONFLUENCE_GROUP" | "JIRA_GROUP" | "DOCUSIGN_GROUP" | "ZOOM_GROUP" ``` \ No newline at end of file diff --git a/docs/models/components/groupuser.md b/docs/models/components/groupuser.md index 0af73787..10f4bd7d 100644 --- a/docs/models/components/groupuser.md +++ b/docs/models/components/groupuser.md @@ -14,6 +14,8 @@ import { GroupUser } from "opal-mcp/models/components"; let value: GroupUser = { groupId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + groupName: "API Group", + description: "Group required to request API's", userId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", fullName: "Jake Barnes", email: "jake@company.dev", @@ -26,6 +28,8 @@ let value: GroupUser = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 1b978423-db0a-4037-a4cf-f79c60cb67b3 | +| `groupName` | *string* | :heavy_check_mark: | The name of the group. | API Group | +| `description` | *string* | :heavy_check_mark: | The description of the group. | Group required to request API's | | `userId` | *string* | :heavy_check_mark: | The ID of the user. | 29827fb8-f2dd-4e80-9576-28e31e9934ac | | `accessLevel` | [components.GroupAccessLevel](../../models/components/groupaccesslevel.md) | :heavy_minus_sign: | # Access Level Object
### Description
The `GroupAccessLevel` object is used to represent the level of access that a user has to a group or a group has to a group. The "default" access
level is a `GroupAccessLevel` object whose fields are all empty strings.

### Usage Example
View the `GroupAccessLevel` of a group/user or group/group pair to see the level of access granted to the group. | {
"access_level_name": "Developer",
"access_level_remote_id": 20
} | | `fullName` | *string* | :heavy_check_mark: | The user's full name. | Jake Barnes | diff --git a/docs/models/components/groupuserlist.md b/docs/models/components/groupuserlist.md index 93aa5bbd..3efe0502 100644 --- a/docs/models/components/groupuserlist.md +++ b/docs/models/components/groupuserlist.md @@ -9,6 +9,8 @@ let value: GroupUserList = { results: [ { groupId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + groupName: "API Group", + description: "Group required to request API's", userId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", fullName: "Jake Barnes", email: "jake@company.dev", @@ -16,17 +18,23 @@ let value: GroupUserList = { }, { groupId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + groupName: "API Group", + description: "Group required to request API's", userId: "7646aa9a-e2ee-4eb5-8c62-91f29038a373", fullName: "Brett Ashley", email: "brett@company.dev", expirationDate: new Date("2022-02-03T12:33:02Z"), }, ], + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `results` | [components.GroupUser](../../models/components/groupuser.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `results` | [components.GroupUser](../../models/components/groupuser.md)[] | :heavy_minus_sign: | N/A | | +| `next` | *string* | :heavy_minus_sign: | The cursor with which to continue pagination if additional result pages exist. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `previous` | *string* | :heavy_minus_sign: | The cursor used to obtain the current result page. | cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ | \ No newline at end of file diff --git a/docs/models/components/hubspotrole.md b/docs/models/components/hubspotrole.md new file mode 100644 index 00000000..4a9b53fb --- /dev/null +++ b/docs/models/components/hubspotrole.md @@ -0,0 +1,19 @@ +# HubspotRole + +Remote info for HubSpot role. + +## Example Usage + +```typescript +import { HubspotRole } from "opal-mcp/models/components"; + +let value: HubspotRole = { + roleId: "12345", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `roleId` | *string* | :heavy_check_mark: | The ID of the HubSpot role. | 12345 | \ No newline at end of file diff --git a/docs/models/components/hubspotteam.md b/docs/models/components/hubspotteam.md new file mode 100644 index 00000000..be9f4140 --- /dev/null +++ b/docs/models/components/hubspotteam.md @@ -0,0 +1,19 @@ +# HubspotTeam + +Remote info for HubSpot team. + +## Example Usage + +```typescript +import { HubspotTeam } from "opal-mcp/models/components"; + +let value: HubspotTeam = { + teamId: "12345", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `teamId` | *string* | :heavy_check_mark: | The ID of the HubSpot team. | 12345 | \ No newline at end of file diff --git a/docs/models/components/idpgroupmapping.md b/docs/models/components/idpgroupmapping.md index 9447bb99..4cd9b7b4 100644 --- a/docs/models/components/idpgroupmapping.md +++ b/docs/models/components/idpgroupmapping.md @@ -8,6 +8,7 @@ Information about a group mapping. import { IdpGroupMapping } from "opal-mcp/models/components"; let value: IdpGroupMapping = { + appResourceId: "1520617d-e72a-47f5-a84c-693817ab48ad2", groupId: "6f99639b-7928-4043-8184-47cbc6766145", alias: "finance-team", hiddenFromEndUser: false, @@ -18,6 +19,7 @@ let value: IdpGroupMapping = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `appResourceId` | *string* | :heavy_minus_sign: | The ID of the app resource. | 1520617d-e72a-47f5-a84c-693817ab48ad2 | | `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 6f99639b-7928-4043-8184-47cbc6766145 | | `alias` | *string* | :heavy_minus_sign: | The alias of the group. | finance-team | | `hiddenFromEndUser` | *boolean* | :heavy_check_mark: | A bool representing whether or not the group is hidden from the end user. | false | \ No newline at end of file diff --git a/docs/models/components/idpstatusfilter.md b/docs/models/components/idpstatusfilter.md new file mode 100644 index 00000000..a53df8fc --- /dev/null +++ b/docs/models/components/idpstatusfilter.md @@ -0,0 +1,23 @@ +# IdpStatusFilter + +Filters USER entities by their HR/IDP lifecycle status. Only applies to USER entities; GROUP and RESOURCE entities never match, in either polarity. `statuses` combine with OR. `not` inverts the match within the user domain (e.g. "IDP status is NOT active"), so it still returns only users rather than sweeping in groups/resources. + + +## Example Usage + +```typescript +import { IdpStatusFilter } from "opal-mcp/models/components"; + +let value: IdpStatusFilter = { + statuses: [ + "ACTIVE", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `statuses` | [components.UserHrIdpStatusEnum](../../models/components/userhridpstatusenum.md)[] | :heavy_minus_sign: | Match users whose HR/IDP status is one of these values. | +| `not` | *boolean* | :heavy_minus_sign: | Invert the match within the user domain (e.g. "IDP status is NOT active"). | \ No newline at end of file diff --git a/docs/models/components/ileveladvancedrole.md b/docs/models/components/ileveladvancedrole.md new file mode 100644 index 00000000..55bd5b7b --- /dev/null +++ b/docs/models/components/ileveladvancedrole.md @@ -0,0 +1,19 @@ +# IlevelAdvancedRole + +Remote info for iLevel Advanced role. + +## Example Usage + +```typescript +import { IlevelAdvancedRole } from "opal-mcp/models/components"; + +let value: IlevelAdvancedRole = { + roleName: "IT User", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------- | --------------------- | --------------------- | --------------------- | --------------------- | +| `roleName` | *string* | :heavy_check_mark: | The name of the role. | IT User | \ No newline at end of file diff --git a/docs/models/components/incidentiooncallschedule.md b/docs/models/components/incidentiooncallschedule.md new file mode 100644 index 00000000..480baa61 --- /dev/null +++ b/docs/models/components/incidentiooncallschedule.md @@ -0,0 +1,19 @@ +# IncidentioOnCallSchedule + +Remote info for Incident.io on-call schedule group. + +## Example Usage + +```typescript +import { IncidentioOnCallSchedule } from "opal-mcp/models/components"; + +let value: IncidentioOnCallSchedule = { + scheduleId: "01HZ8XQM9ZQX8RKMZQ8ZQX8RK", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `scheduleId` | *string* | :heavy_check_mark: | The id of the Incident.io on-call schedule. | 01HZ8XQM9ZQX8RKMZQ8ZQX8RK | \ No newline at end of file diff --git a/docs/models/components/jiragroup.md b/docs/models/components/jiragroup.md new file mode 100644 index 00000000..6919c841 --- /dev/null +++ b/docs/models/components/jiragroup.md @@ -0,0 +1,19 @@ +# JiraGroup + +Remote info for Jira group. + +## Example Usage + +```typescript +import { JiraGroup } from "opal-mcp/models/components"; + +let value: JiraGroup = { + groupId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `groupId` | *string* | :heavy_check_mark: | The ID of the Jira group. | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | \ No newline at end of file diff --git a/docs/models/components/netsuiterole.md b/docs/models/components/netsuiterole.md new file mode 100644 index 00000000..b1577ef9 --- /dev/null +++ b/docs/models/components/netsuiterole.md @@ -0,0 +1,19 @@ +# NetsuiteRole + +Remote info for NetSuite role. + +## Example Usage + +```typescript +import { NetsuiteRole } from "opal-mcp/models/components"; + +let value: NetsuiteRole = { + roleId: "123e4567-e89b-12d3-a456-426614174000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | 123e4567-e89b-12d3-a456-426614174000 | \ No newline at end of file diff --git a/docs/models/components/not.md b/docs/models/components/not.md new file mode 100644 index 00000000..10cfe19b --- /dev/null +++ b/docs/models/components/not.md @@ -0,0 +1,17 @@ +# Not + +Excludes entities matching the embedded filter (logical NOT). Pass a filter object with the same shape as this one — typically a single scalar field, like `{not: {entityTypes: ["RESOURCE"]}}` to exclude resources. + + +## Example Usage + +```typescript +import { Not } from "opal-mcp/models/components"; + +let value: Not = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/opalaccesspathedgefilter.md b/docs/models/components/opalaccesspathedgefilter.md new file mode 100644 index 00000000..92c6c2cf --- /dev/null +++ b/docs/models/components/opalaccesspathedgefilter.md @@ -0,0 +1,21 @@ +# OpalAccessPathEdgeFilter + +Constraints on the access path edges themselves. + +## Example Usage + +```typescript +import { OpalAccessPathEdgeFilter } from "opal-mcp/models/components"; + +let value: OpalAccessPathEdgeFilter = { + directOnly: true, + accessDurationType: "EXPIRING_ONLY", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `directOnly` | *boolean* | :heavy_minus_sign: | When true, only return direct (depth-1) principal-to-entitlement edges. | true | +| `accessDurationType` | [components.AccessDurationType](../../models/components/accessdurationtype.md) | :heavy_minus_sign: | Constrain results by whether the terminal access expires. | EXPIRING_ONLY | \ No newline at end of file diff --git a/docs/models/components/opalaccesspathquery.md b/docs/models/components/opalaccesspathquery.md new file mode 100644 index 00000000..94b98ff1 --- /dev/null +++ b/docs/models/components/opalaccesspathquery.md @@ -0,0 +1,39 @@ +# OpalAccessPathQuery + +Request body for an ACCESS_PATH-type OpalQuery. Returns principal-to- entitlement access paths matching the given edge filters. + +## Example Usage + +```typescript +import { OpalAccessPathQuery } from "opal-mcp/models/components"; + +let value: OpalAccessPathQuery = { + type: "ACCESS_PATH", + query: { + principalFilter: { + entityTypes: [ + "USER", + ], + }, + entitlementFilter: { + entityItemTypes: [ + "AWS_IAM_ROLE", + ], + }, + edgeFilter: { + directOnly: true, + }, + }, + first: 50, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `type` | *"ACCESS_PATH"* | :heavy_check_mark: | N/A | | +| `query` | [components.OpalAccessPathQueryBody](../../models/components/opalaccesspathquerybody.md) | :heavy_minus_sign: | Edge-query filters for an ACCESS_PATH OpalQuery. At least one of principalFilter or entitlementFilter is required. | | +| `first` | *number* | :heavy_minus_sign: | Maximum number of results to return. Defaults to 200. | 200 | +| `after` | *string* | :heavy_minus_sign: | Opaque cursor from a previous ACCESS_PATH response to fetch the next page of results. | | +| `includeCount` | *boolean* | :heavy_minus_sign: | When true, populate totalCount in the response. Defaults to false. | false | \ No newline at end of file diff --git a/docs/models/components/opalaccesspathquerybody.md b/docs/models/components/opalaccesspathquerybody.md new file mode 100644 index 00000000..0b053a44 --- /dev/null +++ b/docs/models/components/opalaccesspathquerybody.md @@ -0,0 +1,180 @@ +# OpalAccessPathQueryBody + +Edge-query filters for an ACCESS_PATH OpalQuery. At least one of principalFilter or entitlementFilter is required. + +## Example Usage + +```typescript +import { OpalAccessPathQueryBody } from "opal-mcp/models/components"; + +let value: OpalAccessPathQueryBody = { + principalFilter: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + allOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + anyOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + ], + }, + ], + }, + entitlementFilter: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + principalAccessFilters: { + isAccessibleBy: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + hasAccessTo: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + }, + entitlementAccessFilters: { + isAccessibleBy: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + hasAccessTo: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + }, + edgeFilter: { + directOnly: true, + accessDurationType: "EXPIRING_ONLY", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `principalFilter` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md) | :heavy_minus_sign: | Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. | +| `entitlementFilter` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md) | :heavy_minus_sign: | Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. | +| `principalAccessFilters` | [components.AccessRelationshipFilters](../../models/components/accessrelationshipfilters.md) | :heavy_minus_sign: | Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously.
| +| `entitlementAccessFilters` | [components.AccessRelationshipFilters](../../models/components/accessrelationshipfilters.md) | :heavy_minus_sign: | Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously.
| +| `accessLevelRemoteIds` | *string*[] | :heavy_minus_sign: | Filter by access-level remote IDs on the terminal edge. | +| `accessLevelNames` | *string*[] | :heavy_minus_sign: | Filter by access-level display names on the terminal edge. | +| `edgeFilter` | [components.OpalAccessPathEdgeFilter](../../models/components/opalaccesspathedgefilter.md) | :heavy_minus_sign: | Constraints on the access path edges themselves. | \ No newline at end of file diff --git a/docs/models/components/opalaccesspathqueryresults.md b/docs/models/components/opalaccesspathqueryresults.md new file mode 100644 index 00000000..20178e01 --- /dev/null +++ b/docs/models/components/opalaccesspathqueryresults.md @@ -0,0 +1,43 @@ +# OpalAccessPathQueryResults + +Paginated results of an ACCESS_PATH-type OpalQuery — one edge per matched principal-to-entitlement access path. + +## Example Usage + +```typescript +import { OpalAccessPathQueryResults } from "opal-mcp/models/components"; + +let value: OpalAccessPathQueryResults = { + type: "ACCESS_PATH", + edges: [ + { + node: { + principalId: "30185e8b-4e98-462b-97c0-ae6875ddc941", + entitlementId: "5d66799f-f32b-42af-a6f4-164bc0863a70", + depth: 865536, + path: [ + "4f62bfe0-74f6-4092-823c-5651405ba9bb", + "ad59c5c1-b743-48a3-85dd-940643fe5a1d", + "32e39d39-9553-40bb-bcc9-d1f70b5f4fc8", + ], + }, + cursor: "", + }, + ], + pageInfo: { + hasNextPage: true, + endCursor: "", + hasPreviousPage: true, + startCursor: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `type` | *"ACCESS_PATH"* | :heavy_check_mark: | N/A | +| `edges` | [components.OpalAccessPathResultEdge](../../models/components/opalaccesspathresultedge.md)[] | :heavy_check_mark: | List of matched access paths. | +| `pageInfo` | [components.PageInfo](../../models/components/pageinfo.md) | :heavy_check_mark: | N/A | +| `totalCount` | *number* | :heavy_minus_sign: | Exact total number of matching paths when includeCount was true on the request; otherwise null. | \ No newline at end of file diff --git a/docs/models/components/opalaccesspathresultedge.md b/docs/models/components/opalaccesspathresultedge.md new file mode 100644 index 00000000..316f75b2 --- /dev/null +++ b/docs/models/components/opalaccesspathresultedge.md @@ -0,0 +1,30 @@ +# OpalAccessPathResultEdge + +A single ACCESS_PATH result edge containing the matched path and its pagination cursor. + +## Example Usage + +```typescript +import { OpalAccessPathResultEdge } from "opal-mcp/models/components"; + +let value: OpalAccessPathResultEdge = { + node: { + principalId: "30185e8b-4e98-462b-97c0-ae6875ddc941", + entitlementId: "5d66799f-f32b-42af-a6f4-164bc0863a70", + depth: 865536, + path: [ + "4f62bfe0-74f6-4092-823c-5651405ba9bb", + "ad59c5c1-b743-48a3-85dd-940643fe5a1d", + "32e39d39-9553-40bb-bcc9-d1f70b5f4fc8", + ], + }, + cursor: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `node` | [components.OpalAccessPathResultNode](../../models/components/opalaccesspathresultnode.md) | :heavy_check_mark: | A matched access path from an ACCESS_PATH OpalQuery. | +| `cursor` | *string* | :heavy_check_mark: | Opaque cursor for this path, used for pagination. | \ No newline at end of file diff --git a/docs/models/components/opalaccesspathresultnode.md b/docs/models/components/opalaccesspathresultnode.md new file mode 100644 index 00000000..9926725c --- /dev/null +++ b/docs/models/components/opalaccesspathresultnode.md @@ -0,0 +1,32 @@ +# OpalAccessPathResultNode + +A matched access path from an ACCESS_PATH OpalQuery. + +## Example Usage + +```typescript +import { OpalAccessPathResultNode } from "opal-mcp/models/components"; + +let value: OpalAccessPathResultNode = { + principalId: "6452070e-bdac-4025-9f85-5151af8dd6b2", + entitlementId: "ca477301-2f5c-4632-8224-b6bf86a827b1", + depth: 737488, + path: [ + "6cf699bf-e253-4887-862a-df18b2dc3278", + "647c952e-7e91-4f56-9d34-b769f465ea43", + "47676a47-2785-4ebb-9a04-d5f51735ce58", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `principalId` | *string* | :heavy_check_mark: | The principal entity ID. | +| `entitlementId` | *string* | :heavy_check_mark: | The entitlement entity ID. | +| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | Remote ID of the terminal access level. | +| `accessLevelName` | *string* | :heavy_minus_sign: | Display name of the terminal access level. | +| `expiration` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Expiration of the terminal access, if any. | +| `depth` | *number* | :heavy_check_mark: | Number of hops from principal to entitlement (path length - 1). | +| `path` | *string*[] | :heavy_check_mark: | Entity IDs along the path from principal to entitlement. | \ No newline at end of file diff --git a/docs/models/components/opalnodequery.md b/docs/models/components/opalnodequery.md new file mode 100644 index 00000000..a666142f --- /dev/null +++ b/docs/models/components/opalnodequery.md @@ -0,0 +1,44 @@ +# OpalNodeQuery + +Request body for a NODE-type OpalQuery. Returns entities (users, resources, groups) matching the given filters. + +## Example Usage + +```typescript +import { OpalNodeQuery } from "opal-mcp/models/components"; + +let value: OpalNodeQuery = { + type: "NODE", + query: { + nodeFilters: { + entityTypes: [ + "RESOURCE", + ], + entityTag: { + key: "env", + value: "prod", + }, + }, + accessFilters: { + isAccessibleBy: { + entityTypes: [ + "USER", + ], + entityTag: { + key: "contractor", + }, + }, + }, + }, + first: 50, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `type` | *"NODE"* | :heavy_check_mark: | N/A | | +| `query` | [components.OpalNodeQueryBody](../../models/components/opalnodequerybody.md) | :heavy_minus_sign: | The filter body for a NODE-type OpalQuery. | | +| `first` | *number* | :heavy_minus_sign: | Maximum number of results to return. Defaults to 200. | 200 | +| `after` | *string* | :heavy_minus_sign: | Cursor from a previous response to fetch the next page of results. | 29827fb8-f2dd-4e80-9576-28e31e9934ac | \ No newline at end of file diff --git a/docs/models/components/opalnodequerybody.md b/docs/models/components/opalnodequerybody.md new file mode 100644 index 00000000..450f339f --- /dev/null +++ b/docs/models/components/opalnodequerybody.md @@ -0,0 +1,135 @@ +# OpalNodeQueryBody + +The filter body for a NODE-type OpalQuery. + +## Example Usage + +```typescript +import { OpalNodeQueryBody } from "opal-mcp/models/components"; + +let value: OpalNodeQueryBody = { + nodeFilters: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + allOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + anyOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + ], + }, + ], + anyOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + ], + }, + accessFilters: { + isAccessibleBy: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + hasAccessTo: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `nodeFilters` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md) | :heavy_minus_sign: | Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. | +| `accessFilters` | [components.AccessRelationshipFilters](../../models/components/accessrelationshipfilters.md) | :heavy_minus_sign: | Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously.
| \ No newline at end of file diff --git a/docs/models/components/opalnodequeryresults.md b/docs/models/components/opalnodequeryresults.md new file mode 100644 index 00000000..b3a9cf18 --- /dev/null +++ b/docs/models/components/opalnodequeryresults.md @@ -0,0 +1,28 @@ +# OpalNodeQueryResults + +Paginated results of a NODE-type OpalQuery — one edge per matched entity (user, resource, or group). + +## Example Usage + +```typescript +import { OpalNodeQueryResults } from "opal-mcp/models/components"; + +let value: OpalNodeQueryResults = { + type: "NODE", + edges: [], + pageInfo: { + hasNextPage: true, + endCursor: "", + hasPreviousPage: true, + startCursor: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `type` | *"NODE"* | :heavy_check_mark: | N/A | +| `edges` | [components.OpalQueryResultEdge](../../models/components/opalqueryresultedge.md)[] | :heavy_check_mark: | List of matched entities. | +| `pageInfo` | [components.PageInfo](../../models/components/pageinfo.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/opalqueryresultedge.md b/docs/models/components/opalqueryresultedge.md new file mode 100644 index 00000000..097153c9 --- /dev/null +++ b/docs/models/components/opalqueryresultedge.md @@ -0,0 +1,26 @@ +# OpalQueryResultEdge + +A single result edge from an OpalQuery, containing the matched entity and its pagination cursor. + +## Example Usage + +```typescript +import { OpalQueryResultEdge } from "opal-mcp/models/components"; + +let value: OpalQueryResultEdge = { + node: { + id: "7742498a-2d93-4a26-8fe7-e03e23c9abb1", + name: "", + entityType: "GROUP", + entityItemType: "OPAL_ROLE", + }, + cursor: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `node` | [components.OpalQueryResultNode](../../models/components/opalqueryresultnode.md) | :heavy_check_mark: | A matched entity from an OpalQuery result. | +| `cursor` | *string* | :heavy_check_mark: | Opaque cursor for this entity, used for pagination. | \ No newline at end of file diff --git a/docs/models/components/opalqueryresultnode.md b/docs/models/components/opalqueryresultnode.md new file mode 100644 index 00000000..9b26fddc --- /dev/null +++ b/docs/models/components/opalqueryresultnode.md @@ -0,0 +1,25 @@ +# OpalQueryResultNode + +A matched entity from an OpalQuery result. + +## Example Usage + +```typescript +import { OpalQueryResultNode } from "opal-mcp/models/components"; + +let value: OpalQueryResultNode = { + id: "71bb2556-0d6b-4d0a-9cf1-c5e65bec706d", + name: "", + entityType: "GROUP", + entityItemType: "OPAL_ROLE", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The entity's unique identifier. | | +| `name` | *string* | :heavy_check_mark: | The display name of the entity. | | +| `entityType` | [components.OpalQueryResultNodeEntityType](../../models/components/opalqueryresultnodeentitytype.md) | :heavy_check_mark: | The top-level entity type. | | +| `entityItemType` | [components.EntityItemTypeEnum](../../models/components/entityitemtypeenum.md) | :heavy_check_mark: | Granular subtype of an entity. | OPAL_ROLE | \ No newline at end of file diff --git a/docs/models/components/opalqueryresultnodeentitytype.md b/docs/models/components/opalqueryresultnodeentitytype.md new file mode 100644 index 00000000..04f54f57 --- /dev/null +++ b/docs/models/components/opalqueryresultnodeentitytype.md @@ -0,0 +1,17 @@ +# OpalQueryResultNodeEntityType + +The top-level entity type. + +## Example Usage + +```typescript +import { OpalQueryResultNodeEntityType } from "opal-mcp/models/components"; + +let value: OpalQueryResultNodeEntityType = "RESOURCE"; +``` + +## Values + +```typescript +"USER" | "GROUP" | "RESOURCE" +``` \ No newline at end of file diff --git a/docs/models/components/opalqueryresults.md b/docs/models/components/opalqueryresults.md new file mode 100644 index 00000000..4b34e3fa --- /dev/null +++ b/docs/models/components/opalqueryresults.md @@ -0,0 +1,51 @@ +# OpalQueryResults + +Paginated results of an OpalQuery. The `type` field discriminates which result schema applies and mirrors the `type` field on the request. + + +## Supported Types + +### `components.OpalNodeQueryResults` + +```typescript +const value: components.OpalNodeQueryResults = { + type: "NODE", + edges: [], + pageInfo: { + hasNextPage: true, + endCursor: "", + hasPreviousPage: true, + startCursor: "", + }, +}; +``` + +### `components.OpalAccessPathQueryResults` + +```typescript +const value: components.OpalAccessPathQueryResults = { + type: "ACCESS_PATH", + edges: [ + { + node: { + principalId: "30185e8b-4e98-462b-97c0-ae6875ddc941", + entitlementId: "5d66799f-f32b-42af-a6f4-164bc0863a70", + depth: 865536, + path: [ + "4f62bfe0-74f6-4092-823c-5651405ba9bb", + "ad59c5c1-b743-48a3-85dd-940643fe5a1d", + "32e39d39-9553-40bb-bcc9-d1f70b5f4fc8", + ], + }, + cursor: "", + }, + ], + pageInfo: { + hasNextPage: true, + endCursor: "", + hasPreviousPage: true, + startCursor: "", + }, +}; +``` + diff --git a/docs/models/components/openaiplatformproject.md b/docs/models/components/openaiplatformproject.md new file mode 100644 index 00000000..54280983 --- /dev/null +++ b/docs/models/components/openaiplatformproject.md @@ -0,0 +1,19 @@ +# OpenaiPlatformProject + +Remote info for OpenAI Platform project. + +## Example Usage + +```typescript +import { OpenaiPlatformProject } from "opal-mcp/models/components"; + +let value: OpenaiPlatformProject = { + projectId: "proj_abc", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `projectId` | *string* | :heavy_check_mark: | The id of the project. | proj_abc | \ No newline at end of file diff --git a/docs/models/components/openaiplatformserviceaccount.md b/docs/models/components/openaiplatformserviceaccount.md new file mode 100644 index 00000000..476cf478 --- /dev/null +++ b/docs/models/components/openaiplatformserviceaccount.md @@ -0,0 +1,21 @@ +# OpenaiPlatformServiceAccount + +Remote info for OpenAI Platform service account. + +## Example Usage + +```typescript +import { OpenaiPlatformServiceAccount } from "opal-mcp/models/components"; + +let value: OpenaiPlatformServiceAccount = { + projectId: "proj_abc", + serviceAccountId: "svc_acct_abc", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `projectId` | *string* | :heavy_check_mark: | The id of the project for the service account. | proj_abc | +| `serviceAccountId` | *string* | :heavy_check_mark: | The id of the service account. | svc_acct_abc | \ No newline at end of file diff --git a/docs/models/components/oraclefusionrole.md b/docs/models/components/oraclefusionrole.md new file mode 100644 index 00000000..780acdc4 --- /dev/null +++ b/docs/models/components/oraclefusionrole.md @@ -0,0 +1,19 @@ +# OracleFusionRole + +Remote info for Oracle Fusion role. + +## Example Usage + +```typescript +import { OracleFusionRole } from "opal-mcp/models/components"; + +let value: OracleFusionRole = { + roleId: "123e4567-e89b-12d3-a456-426614174000", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | 123e4567-e89b-12d3-a456-426614174000 | \ No newline at end of file diff --git a/docs/models/components/pagerdutyoncallschedule.md b/docs/models/components/pagerdutyoncallschedule.md new file mode 100644 index 00000000..53e107a0 --- /dev/null +++ b/docs/models/components/pagerdutyoncallschedule.md @@ -0,0 +1,19 @@ +# PagerdutyOnCallSchedule + +Remote info for PagerDuty on-call schedule group. + +## Example Usage + +```typescript +import { PagerdutyOnCallSchedule } from "opal-mcp/models/components"; + +let value: PagerdutyOnCallSchedule = { + scheduleId: "PNZNINN", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `scheduleId` | *string* | :heavy_check_mark: | The id of the PagerDuty on-call schedule. | PNZNINN | \ No newline at end of file diff --git a/docs/models/components/paginatedaccessruleslist.md b/docs/models/components/paginatedaccessruleslist.md new file mode 100644 index 00000000..83288f8d --- /dev/null +++ b/docs/models/components/paginatedaccessruleslist.md @@ -0,0 +1,39 @@ +# PaginatedAccessRulesList + +## Example Usage + +```typescript +import { PaginatedAccessRulesList } from "opal-mcp/models/components"; + +let value: PaginatedAccessRulesList = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + accessRuleId: "7c86c85d-0651-43e2-a748-d69d658418e8", + name: "Platform Engineering", + description: + "This access rule represents all platform engineers in the company.", + adminOwnerId: "7c86c85d-0651-43e2-a748-d69d658418e8", + status: "ACTIVE", + ruleClauses: { + when: { + clauses: [ + { + selectors: [], + }, + ], + }, + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `next` | *string* | :heavy_minus_sign: | The cursor with which to continue pagination if additional result pages exist. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `previous` | *string* | :heavy_minus_sign: | The cursor used to retrieve the previous page of results. | cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ | +| `results` | [components.AccessRule](../../models/components/accessrule.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/paginatedcampaignslist.md b/docs/models/components/paginatedcampaignslist.md new file mode 100644 index 00000000..106bd31c --- /dev/null +++ b/docs/models/components/paginatedcampaignslist.md @@ -0,0 +1,33 @@ +# PaginatedCampaignsList + +A list of campaigns. + +## Example Usage + +```typescript +import { PaginatedCampaignsList } from "opal-mcp/models/components"; + +let value: PaginatedCampaignsList = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + name: "Q3 Access Review", + status: "DRAFT", + isTemplate: false, + createdAt: new Date("2026-07-01T00:00:00Z"), + updatedAt: new Date("2026-07-01T00:00:00Z"), + createdByUserId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `next` | *string* | :heavy_minus_sign: | The cursor with which to continue pagination if additional result pages exist. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `previous` | *string* | :heavy_minus_sign: | The cursor used to obtain the current result page. | cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ | +| `results` | [components.Campaign](../../models/components/campaign.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/paginateddelegationslist.md b/docs/models/components/paginateddelegationslist.md new file mode 100644 index 00000000..a3dacee4 --- /dev/null +++ b/docs/models/components/paginateddelegationslist.md @@ -0,0 +1,36 @@ +# PaginatedDelegationsList + +A list of delegations for your organization. + +## Example Usage + +```typescript +import { PaginatedDelegationsList } from "opal-mcp/models/components"; + +let value: PaginatedDelegationsList = { + results: [ + { + id: "4aed3e8a-727b-4d72-8010-3b8710c50bec", + delegatorUserId: "123e4567-e89b-12d3-a456-426614174000", + delegateUserId: "7c86c85d-0651-43e2-a748-d69d658418e8", + startTime: new Date("2023-10-01T12:00:00Z"), + endTime: new Date("2023-10-01T12:00:00Z"), + reason: "I need to be out of the office", + createdAt: new Date("2023-10-01T12:00:00Z"), + updatedAt: new Date("2023-10-01T12:00:00Z"), + }, + ], + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + totalCount: 2, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `results` | [components.Delegation](../../models/components/delegation.md)[] | :heavy_minus_sign: | The delegations in the result set. | | +| `next` | *string* | :heavy_minus_sign: | The cursor with which to continue pagination if additional result pages exist. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `previous` | *string* | :heavy_minus_sign: | The cursor used to obtain the current result page. | cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ | +| `totalCount` | *number* | :heavy_minus_sign: | The total number of items in the result set. | 2 | \ No newline at end of file diff --git a/docs/models/components/paginatedgroupslist.md b/docs/models/components/paginatedgroupslist.md index edfc51fc..f1ee12a8 100644 --- a/docs/models/components/paginatedgroupslist.md +++ b/docs/models/components/paginatedgroupslist.md @@ -12,21 +12,46 @@ let value: PaginatedGroupsList = { { groupId: "f454d283-ca87-4a8a-bdbb-df212eca5353", appId: "b5a5ca27-0ea3-4d86-9199-2126d57d1fbd", + name: "Payments Production Admin", description: "This group represents Active Directory group \"Payments Production Admin\". We use this AD group to facilitate staging deployments and qualifying new releases.", adminOwnerId: "7c86c85d-0651-43e2-a748-d69d658418e8", + groupLeaderUserIds: [ + "7c86c85d-0651-43e2-a748-d69d658418e8", + ], + remoteId: "037m2jsg218b2wb", + remoteName: "Finance Team", + groupType: "ACTIVE_DIRECTORY_GROUP", maxDuration: 120, + recommendedDuration: 60, + extensionsDurationInMinutes: 60, requireManagerApproval: false, requireSupportTicket: false, + requireMfaToApprove: false, + requireMfaToRequest: false, + autoApproval: false, + isRequestable: true, }, { groupId: "99d0b81d-14be-4cf6-bd27-348b4af1d11b", + appId: "a7c3e291-1234-4abc-9def-1234567890ab", + name: "Integrations On-Call", description: "Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.", adminOwnerId: "4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3", + groupLeaderUserIds: [], + remoteId: "pagerduty-schedule:P123XYZ", + remoteName: "Integrations On-Call", + groupType: "PAGERDUTY_ON_CALL_SCHEDULE", maxDuration: 360, + recommendedDuration: 120, + extensionsDurationInMinutes: 0, requireManagerApproval: false, requireSupportTicket: true, + requireMfaToApprove: false, + requireMfaToRequest: false, + autoApproval: false, + isRequestable: true, }, ], }; diff --git a/docs/models/components/paginatedremoteuserslist.md b/docs/models/components/paginatedremoteuserslist.md new file mode 100644 index 00000000..d1f1101d --- /dev/null +++ b/docs/models/components/paginatedremoteuserslist.md @@ -0,0 +1,32 @@ +# PaginatedRemoteUsersList + +## Example Usage + +```typescript +import { PaginatedRemoteUsersList } from "opal-mcp/models/components"; + +let value: PaginatedRemoteUsersList = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + userId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + remoteId: "1234567890", + thirdPartyProvider: "GIT_LAB", + }, + { + userId: "29827fb8-f2dd-4e80-9576-238979927392", + remoteId: "remoteid123", + thirdPartyProvider: "GIT_HUB", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `next` | *string* | :heavy_minus_sign: | The cursor with which to continue pagination if additional result pages exist. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `previous` | *string* | :heavy_minus_sign: | The cursor used to obtain the current result page. | cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ | +| `results` | [components.RemoteUser](../../models/components/remoteuser.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/paginatedtokenslist.md b/docs/models/components/paginatedtokenslist.md new file mode 100644 index 00000000..f1899511 --- /dev/null +++ b/docs/models/components/paginatedtokenslist.md @@ -0,0 +1,30 @@ +# PaginatedTokensList + +## Example Usage + +```typescript +import { PaginatedTokensList } from "opal-mcp/models/components"; + +let value: PaginatedTokensList = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + tokenId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + createdAt: new Date("2022-01-23T04:56:07Z"), + tokenLabel: "My API Token", + creatorUserId: "d4a7d928-783e-4599-8ec6-088d635a5bcc", + userId: "d4a7d928-783e-4599-8ec6-088d635a5bcc", + accessLevel: "READ_ONLY", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `next` | *string* | :heavy_minus_sign: | The cursor with which to continue pagination if additional result pages exist. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `previous` | *string* | :heavy_minus_sign: | The cursor used to obtain the current result page. | cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ | +| `results` | [components.Token](../../models/components/token.md)[] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/paginateduarslist.md b/docs/models/components/paginateduarslist.md index 3a2ecf36..79133e00 100644 --- a/docs/models/components/paginateduarslist.md +++ b/docs/models/components/paginateduarslist.md @@ -19,6 +19,7 @@ let value: PaginatedUARsList = { deadline: new Date("2022-07-14T06:59:59Z"), timeZone: "America/Los_Angeles", selfReviewAllowed: false, + instantlyActionReviews: false, uarScope: { admins: [ "f454d283-ca87-4a8a-bdbb-df212eca5353", @@ -44,6 +45,7 @@ let value: PaginatedUARsList = { deadline: new Date("2022-08-14T06:59:59Z"), timeZone: "America/Los_Angeles", selfReviewAllowed: false, + instantlyActionReviews: false, uarScope: { admins: [ "f454d283-ca87-4a8a-bdbb-df212eca5353", diff --git a/docs/models/components/paladin.md b/docs/models/components/paladin.md new file mode 100644 index 00000000..91aafbd6 --- /dev/null +++ b/docs/models/components/paladin.md @@ -0,0 +1,37 @@ +# Paladin + +# Paladin Object +### Description +The `Paladin` object represents a Paladin, Opal's AI access-request +reviewer. + +## Example Usage + +```typescript +import { Paladin } from "opal-mcp/models/components"; + +let value: Paladin = { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + name: "paladin-agent-1", + ownerId: "7c86c85d-0651-43e2-a748-d69d658418e8", + monitorMode: true, + adminViewOnly: false, + enabledConnectors: [ + "SLACK", + ], + instructions: + "Approve read-only access; escalate anything that grants write access.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `paladinId` | *string* | :heavy_check_mark: | The ID of the Paladin. Use this value as a reviewer in a request configuration's service_user_ids. | 32acc112-21ff-4669-91c2-21e27683eaa1 | +| `name` | *string* | :heavy_check_mark: | The name of the Paladin. | paladin-agent-1 | +| `ownerId` | *string* | :heavy_check_mark: | The ID of the owner of the Paladin. | 7c86c85d-0651-43e2-a748-d69d658418e8 | +| `monitorMode` | *boolean* | :heavy_check_mark: | When true, the Paladin reasons about requests but takes no action. Shown as "Monitor mode" in the UI. | | +| `adminViewOnly` | *boolean* | :heavy_check_mark: | When true, the Paladin's recommendations are visible only to admins. Only meaningful when monitor_mode is true. | | +| `enabledConnectors` | [components.PaladinConnector](../../models/components/paladinconnector.md)[] | :heavy_check_mark: | The connectors the Paladin is allowed to use. | | +| `instructions` | *string* | :heavy_check_mark: | The free-form instructions that guide the Paladin's decisions. | Approve read-only access; escalate anything that grants write access. | \ No newline at end of file diff --git a/docs/models/components/paladinconnector.md b/docs/models/components/paladinconnector.md new file mode 100644 index 00000000..c08e375d --- /dev/null +++ b/docs/models/components/paladinconnector.md @@ -0,0 +1,17 @@ +# PaladinConnector + +A connector a Paladin is allowed to use. + +## Example Usage + +```typescript +import { PaladinConnector } from "opal-mcp/models/components"; + +let value: PaladinConnector = "FLEET_DM"; +``` + +## Values + +```typescript +"NOTION" | "JIRA" | "LINEAR" | "SERVICE_NOW" | "NOTION_TICKETS" | "FRESH_SERVICE" | "SHORTCUT" | "SLACK" | "PAGER_DUTY" | "CONFLUENCE" | "FLEET_DM" +``` \ No newline at end of file diff --git a/docs/models/components/paladincontextsource.md b/docs/models/components/paladincontextsource.md new file mode 100644 index 00000000..835684b0 --- /dev/null +++ b/docs/models/components/paladincontextsource.md @@ -0,0 +1,34 @@ +# PaladinContextSource + +# PaladinContextSource Object +### Description +A context source (a Slack channel or a document) that a Paladin is +configured to read during access-request review. + +## Example Usage + +```typescript +import { PaladinContextSource } from "opal-mcp/models/components"; + +let value: PaladinContextSource = { + id: "8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8", + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + sourceKind: "SLACK_CHANNEL", + thirdPartyProvider: "SLACK", + remoteId: "C0123456789", + name: "#access-requests", + url: "https://example.slack.com/archives/C0123456789", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | The ID of the context source. | +| `paladinId` | *string* | :heavy_check_mark: | The ID of the Paladin this source belongs to. | +| `sourceKind` | [components.PaladinContextSourceKind](../../models/components/paladincontextsourcekind.md) | :heavy_check_mark: | The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page. | +| `thirdPartyProvider` | [components.PaladinContextSourceProvider](../../models/components/paladincontextsourceprovider.md) | :heavy_check_mark: | The integration a Paladin context source comes from. | +| `remoteId` | *string* | :heavy_check_mark: | The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID for a document. | +| `name` | *string* | :heavy_check_mark: | A human-readable name for the source. | +| `url` | *string* | :heavy_check_mark: | A link to the source. | \ No newline at end of file diff --git a/docs/models/components/paladincontextsourcekind.md b/docs/models/components/paladincontextsourcekind.md new file mode 100644 index 00000000..0a5a5d92 --- /dev/null +++ b/docs/models/components/paladincontextsourcekind.md @@ -0,0 +1,17 @@ +# PaladinContextSourceKind + +The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page. + +## Example Usage + +```typescript +import { PaladinContextSourceKind } from "opal-mcp/models/components"; + +let value: PaladinContextSourceKind = "DOCUMENT"; +``` + +## Values + +```typescript +"SLACK_CHANNEL" | "DOCUMENT" +``` \ No newline at end of file diff --git a/docs/models/components/paladincontextsourcelist.md b/docs/models/components/paladincontextsourcelist.md new file mode 100644 index 00000000..dfce8fb2 --- /dev/null +++ b/docs/models/components/paladincontextsourcelist.md @@ -0,0 +1,31 @@ +# PaladinContextSourceList + +# PaladinContextSourceList Object +### Description +A list of `PaladinContextSource` objects. + +## Example Usage + +```typescript +import { PaladinContextSourceList } from "opal-mcp/models/components"; + +let value: PaladinContextSourceList = { + results: [ + { + id: "8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8", + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + sourceKind: "SLACK_CHANNEL", + thirdPartyProvider: "SLACK", + remoteId: "C0123456789", + name: "#access-requests", + url: "https://example.slack.com/archives/C0123456789", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `results` | [components.PaladinContextSource](../../models/components/paladincontextsource.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/paladincontextsourceprovider.md b/docs/models/components/paladincontextsourceprovider.md new file mode 100644 index 00000000..fd4358ef --- /dev/null +++ b/docs/models/components/paladincontextsourceprovider.md @@ -0,0 +1,17 @@ +# PaladinContextSourceProvider + +The integration a Paladin context source comes from. + +## Example Usage + +```typescript +import { PaladinContextSourceProvider } from "opal-mcp/models/components"; + +let value: PaladinContextSourceProvider = "CONFLUENCE"; +``` + +## Values + +```typescript +"SLACK" | "NOTION" | "CONFLUENCE" +``` \ No newline at end of file diff --git a/docs/models/components/paladinlist.md b/docs/models/components/paladinlist.md new file mode 100644 index 00000000..b7747c61 --- /dev/null +++ b/docs/models/components/paladinlist.md @@ -0,0 +1,34 @@ +# PaladinList + +# PaladinList Object +### Description +A list of `Paladin` objects. + +## Example Usage + +```typescript +import { PaladinList } from "opal-mcp/models/components"; + +let value: PaladinList = { + results: [ + { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + name: "paladin-agent-1", + ownerId: "7c86c85d-0651-43e2-a748-d69d658418e8", + monitorMode: true, + adminViewOnly: false, + enabledConnectors: [ + "SLACK", + ], + instructions: + "Approve read-only access; escalate anything that grants write access.", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `results` | [components.Paladin](../../models/components/paladin.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/propagationstatusenum.md b/docs/models/components/propagationstatusenum.md index feebb0c8..927b5449 100644 --- a/docs/models/components/propagationstatusenum.md +++ b/docs/models/components/propagationstatusenum.md @@ -13,5 +13,5 @@ let value: PropagationStatusEnum = "SUCCESS"; ## Values ```typescript -"SUCCESS" | "ERR_REMOTE_INTERNAL_ERROR" | "ERR_REMOTE_USER_NOT_FOUND" | "ERR_REMOTE_USER_NOT_LINKED" | "ERR_REMOTE_RESOURCE_NOT_FOUND" | "ERR_REMOTE_THROTTLE" | "ERR_NOT_AUTHORIZED_TO_QUERY_RESOURCE" | "ERR_REMOTE_PROVISIONING_VIA_IDP_FAILED" | "ERR_IDP_EMAIL_UPDATE_CONFLICT" | "ERR_TIMEOUT" | "ERR_UNKNOWN" | "ERR_OPAL_INTERNAL_ERROR" | "ERR_ORG_READ_ONLY" | "ERR_OPERATION_UNSUPPORTED" | "PENDING" | "PENDING_MANUAL_PROPAGATION" | "PENDING_TICKET_CREATION" | "ERR_TICKET_CREATION_SKIPPED" | "ERR_DRY_RUN_MODE_ENABLED" | "ERR_HR_IDP_PROVIDER_NOT_LINKED" | "ERR_REMOTE_UNRECOVERABLE_ERROR" +"SUCCESS" | "ERR_REMOTE_INTERNAL_ERROR" | "ERR_REMOTE_USER_NOT_FOUND" | "ERR_REMOTE_USER_NOT_LINKED" | "ERR_REMOTE_RESOURCE_NOT_FOUND" | "ERR_REMOTE_THROTTLE" | "ERR_NOT_AUTHORIZED_TO_QUERY_RESOURCE" | "ERR_REMOTE_PROVISIONING_VIA_IDP_FAILED" | "ERR_IDP_EMAIL_UPDATE_CONFLICT" | "ERR_TIMEOUT" | "ERR_UNKNOWN" | "ERR_OPAL_INTERNAL_ERROR" | "ERR_ORG_READ_ONLY" | "ERR_OPERATION_UNSUPPORTED" | "PENDING" | "PENDING_MANUAL_PROPAGATION" | "PENDING_TICKET_CREATION" | "ERR_TICKET_CREATION_SKIPPED" | "ERR_DRY_RUN_MODE_ENABLED" | "ERR_HR_IDP_PROVIDER_NOT_LINKED" | "ERR_REMOTE_UNRECOVERABLE_ERROR" | "ERR_REMOTE_TICKET_NOT_FOUND" ``` \ No newline at end of file diff --git a/docs/models/components/query.md b/docs/models/components/query.md new file mode 100644 index 00000000..778212c9 --- /dev/null +++ b/docs/models/components/query.md @@ -0,0 +1,180 @@ +# Query + +Access-path query defining the scope of access to review. Uses the same principalFilter / entitlementFilter shape as ACCESS_PATH OpalQuery. + +## Example Usage + +```typescript +import { Query } from "opal-mcp/models/components"; + +let value: Query = { + principalFilter: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + allOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + anyOf: [ + { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + ], + }, + ], + }, + entitlementFilter: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + principalAccessFilters: { + isAccessibleBy: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + hasAccessTo: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + }, + entitlementAccessFilters: { + isAccessibleBy: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + hasAccessTo: { + entityItemTypes: [ + "OPAL_ROLE", + ], + entityName: { + stringMatchType: "REGEX", + string: "engineering", + }, + entityTag: { + key: "team", + value: "platform", + }, + hrIdpStatus: { + statuses: [ + "ACTIVE", + ], + }, + }, + }, + edgeFilter: { + directOnly: true, + accessDurationType: "EXPIRING_ONLY", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `principalFilter` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md) | :heavy_minus_sign: | Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. | +| `entitlementFilter` | [components.AccessEntityFilters](../../models/components/accessentityfilters.md) | :heavy_minus_sign: | Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. | +| `principalAccessFilters` | [components.AccessRelationshipFilters](../../models/components/accessrelationshipfilters.md) | :heavy_minus_sign: | Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously.
| +| `entitlementAccessFilters` | [components.AccessRelationshipFilters](../../models/components/accessrelationshipfilters.md) | :heavy_minus_sign: | Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously.
| +| `accessLevelRemoteIds` | *string*[] | :heavy_minus_sign: | Filter by access-level remote IDs on the terminal edge. | +| `accessLevelNames` | *string*[] | :heavy_minus_sign: | Filter by access-level display names on the terminal edge. | +| `edgeFilter` | [components.OpalAccessPathEdgeFilter](../../models/components/opalaccesspathedgefilter.md) | :heavy_minus_sign: | Constraints on the access path edges themselves. | \ No newline at end of file diff --git a/docs/models/components/rdsengineenum.md b/docs/models/components/rdsengineenum.md new file mode 100644 index 00000000..1bb19a17 --- /dev/null +++ b/docs/models/components/rdsengineenum.md @@ -0,0 +1,17 @@ +# RDSEngineEnum + +The database engine for the RDS instance. + +## Example Usage + +```typescript +import { RDSEngineEnum } from "opal-mcp/models/components"; + +let value: RDSEngineEnum = "POSTGRESQL"; +``` + +## Values + +```typescript +"MYSQL" | "POSTGRESQL" +``` \ No newline at end of file diff --git a/docs/models/components/remoteuser.md b/docs/models/components/remoteuser.md new file mode 100644 index 00000000..750f367b --- /dev/null +++ b/docs/models/components/remoteuser.md @@ -0,0 +1,25 @@ +# RemoteUser + +# RemoteUser Object +### Description +The `RemoteUser` object is used to represent a remote user. + +## Example Usage + +```typescript +import { RemoteUser } from "opal-mcp/models/components"; + +let value: RemoteUser = { + userId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + remoteId: "1234567890", + thirdPartyProvider: "GIT_HUB", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user. | 29827fb8-f2dd-4e80-9576-28e31e9934ac | +| `remoteId` | *string* | :heavy_check_mark: | The ID of the remote user. | 1234567890 | +| `thirdPartyProvider` | [components.ThirdPartyProviderEnum](../../models/components/thirdpartyproviderenum.md) | :heavy_check_mark: | The third party provider of the remote user. | GIT_HUB | \ No newline at end of file diff --git a/docs/models/components/requestapprovalenum.md b/docs/models/components/requestapprovalenum.md new file mode 100644 index 00000000..8c8d19e2 --- /dev/null +++ b/docs/models/components/requestapprovalenum.md @@ -0,0 +1,17 @@ +# RequestApprovalEnum + +The decision level for the approval + +## Example Usage + +```typescript +import { RequestApprovalEnum } from "opal-mcp/models/components"; + +let value: RequestApprovalEnum = "REGULAR"; +``` + +## Values + +```typescript +"REGULAR" | "ADMIN" +``` \ No newline at end of file diff --git a/docs/models/components/requestcomment.md b/docs/models/components/requestcomment.md new file mode 100644 index 00000000..c8ab84e5 --- /dev/null +++ b/docs/models/components/requestcomment.md @@ -0,0 +1,32 @@ +# RequestComment + +# Request Comment Object +### Description +The `RequestComment` object is used to represent a comment on a request. + +### Usage Example +Returned from the `GET Requests` endpoint as part of a `Request` object. + +## Example Usage + +```typescript +import { RequestComment } from "opal-mcp/models/components"; + +let value: RequestComment = { + createdAt: new Date("2021-01-06T20:00:00Z"), + requestId: "4c86c85d-0651-43e2-a748-d69d658418e8", + userId: "c86c85d-0651-43e2-a748-d69d658418e8", + comment: "This is a comment.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The date and time the comment was created. | 2021-01-06 20:00:00 +0000 UTC | +| `requestId` | *string* | :heavy_check_mark: | The unique identifier of the request the comment is associated with. | 7c86c85d-0651-43e2-a748-d69d658418e8 | +| `userId` | *string* | :heavy_check_mark: | The unique identifier of the user who made the comment. | 7c86c85d-0651-43e2-a748-d69d658418e8 | +| `userFullName` | *string* | :heavy_minus_sign: | The user's full name. | Jake Barnes | +| `userEmail` | *string* | :heavy_minus_sign: | The user's email address. | jake.barnes@company.com | +| `comment` | *string* | :heavy_check_mark: | The content of the comment. | This is a comment. | \ No newline at end of file diff --git a/docs/models/components/requestcommentlist.md b/docs/models/components/requestcommentlist.md new file mode 100644 index 00000000..9d531b48 --- /dev/null +++ b/docs/models/components/requestcommentlist.md @@ -0,0 +1,26 @@ +# RequestCommentList + +A paginated list of request comments + +## Example Usage + +```typescript +import { RequestCommentList } from "opal-mcp/models/components"; + +let value: RequestCommentList = { + comments: [ + { + createdAt: new Date("2021-01-06T20:00:00Z"), + requestId: "4c86c85d-0651-43e2-a748-d69d658418e8", + userId: "c86c85d-0651-43e2-a748-d69d658418e8", + comment: "This is a comment.", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `comments` | [components.RequestComment](../../models/components/requestcomment.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/requestconfiguration.md b/docs/models/components/requestconfiguration.md index d4038ddb..7e889a12 100644 --- a/docs/models/components/requestconfiguration.md +++ b/docs/models/components/requestconfiguration.md @@ -45,6 +45,7 @@ let value: RequestConfiguration = { | `maxDurationMinutes` | *number* | :heavy_minus_sign: | The maximum duration for which the resource can be requested (in minutes). | 120 | | `recommendedDurationMinutes` | *number* | :heavy_minus_sign: | The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. | 120 | | `requireSupportTicket` | *boolean* | :heavy_check_mark: | A bool representing whether or not access requests to the resource require an access ticket. | false | +| `extensionsDurationInMinutes` | *number* | :heavy_minus_sign: | The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. | 120 | | `requestTemplateId` | *string* | :heavy_minus_sign: | The ID of the associated request template. | 06851574-e50d-40ca-8c78-f72ae6ab4304 | | `reviewerStages` | [components.ReviewerStage](../../models/components/reviewerstage.md)[] | :heavy_minus_sign: | The list of reviewer stages for the request configuration. | | | `priority` | *number* | :heavy_check_mark: | The priority of the request configuration. | 1 | \ No newline at end of file diff --git a/docs/models/components/requestconnection.md b/docs/models/components/requestconnection.md index 9044ac01..0afb8a72 100644 --- a/docs/models/components/requestconnection.md +++ b/docs/models/components/requestconnection.md @@ -18,43 +18,18 @@ let value: RequestConnection = { status: "CANCELED", reason: "I need this resource.", durationMinutes: 1440, - stages: { - requestedRoleName: "Admin", - requestedItemName: "AWS Production Account", - stages: [ - { - stage: 1, - operator: "AND", - reviewers: [ - { - id: "7c86c85d-0651-43e2-a748-d69d658418e8", - status: "PENDING", - }, - ], - }, - { - stage: 2, - operator: "OR", - reviewers: [ - { - id: "8d86c85d-0651-43e2-a748-d69d658418e9", - status: "APPROVED", - }, - ], - }, - ], - }, + reviewerStages: "", }, cursor: "", }, ], pageInfo: { - hasNextPage: false, + hasNextPage: true, endCursor: "", hasPreviousPage: true, startCursor: "", }, - totalCount: 430701, + totalCount: 505727, }; ``` diff --git a/docs/models/components/requestedge.md b/docs/models/components/requestedge.md index 0052b8e6..f5e14f7f 100644 --- a/docs/models/components/requestedge.md +++ b/docs/models/components/requestedge.md @@ -16,32 +16,7 @@ let value: RequestEdge = { status: "APPROVED", reason: "I need this resource.", durationMinutes: 1440, - stages: { - requestedRoleName: "Admin", - requestedItemName: "AWS Production Account", - stages: [ - { - stage: 1, - operator: "AND", - reviewers: [ - { - id: "7c86c85d-0651-43e2-a748-d69d658418e8", - status: "PENDING", - }, - ], - }, - { - stage: 2, - operator: "OR", - reviewers: [ - { - id: "8d86c85d-0651-43e2-a748-d69d658418e9", - status: "APPROVED", - }, - ], - }, - ], - }, + reviewerStages: [], }, cursor: "", }; @@ -49,7 +24,7 @@ let value: RequestEdge = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `node` | [components.RequestT](../../models/components/requestt.md) | :heavy_check_mark: | # Request Object
### Description
The `Request` object is used to represent a request.

### Usage Example
Returned from the `GET Requests` endpoint. | {
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"requester_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"status": "pending",
"reason": "I need this resource.",
"duration_minutes": 1440,
"request_comments": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"request_id": "4c86c85d-0651-43e2-a748-d69d658418e8",
"user_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"comment": "This is a comment."
}
],
"stages": {
"requestedRoleName": "Admin",
"requestedItemName": "AWS Production Account",
"stages": [
{
"stage": 1,
"operator": "AND",
"reviewers": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"status": "PENDING"
}
]
},
{
"stage": 2,
"operator": "OR",
"reviewers": [
{
"id": "8d86c85d-0651-43e2-a748-d69d658418e9",
"status": "APPROVED"
}
]
}
]
}
} | -| `cursor` | *string* | :heavy_check_mark: | The cursor for this request edge | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `node` | [components.RequestT](../../models/components/requestt.md) | :heavy_check_mark: | # Request Object
### Description
The `Request` object is used to represent a request.

### Usage Example
Returned from the `GET Requests` endpoint. | {
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"requester_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"status": "pending",
"reason": "I need this resource.",
"duration_minutes": 1440,
"request_comments": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"request_id": "4c86c85d-0651-43e2-a748-d69d658418e8",
"user_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"comment": "This is a comment."
}
],
"reviewer_stages": [
{
"requestedRoleName": "Admin",
"requestedItemName": "AWS Production Account",
"stages": [
{
"stage": 1,
"operator": "AND",
"reviewers": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"status": "PENDING"
}
]
},
{
"stage": 2,
"operator": "OR",
"reviewers": [
{
"id": "8d86c85d-0651-43e2-a748-d69d658418e9",
"status": "APPROVED"
}
]
}
]
}
]
} | +| `cursor` | *string* | :heavy_check_mark: | The cursor for this request edge | | \ No newline at end of file diff --git a/docs/models/components/requestitemstages.md b/docs/models/components/requestitemstages.md index 0647b37b..4d173698 100644 --- a/docs/models/components/requestitemstages.md +++ b/docs/models/components/requestitemstages.md @@ -1,7 +1,9 @@ -# RequestItemStages +# ~~RequestItemStages~~ The stages configuration for a request item +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + ## Example Usage ```typescript @@ -11,9 +13,15 @@ let value: RequestItemStages = { requestedItemName: "", stages: [ { - stage: 759761, + stage: 506134, operator: "AND", - reviewers: [], + reviewers: [ + { + id: "020729d7-6ef5-4700-aa93-7567afc9c5b0", + fullName: "Jake Barnes", + status: "APPROVED", + }, + ], }, ], }; diff --git a/docs/models/components/requestreviewer.md b/docs/models/components/requestreviewer.md index f28ff3a9..abfebcaf 100644 --- a/docs/models/components/requestreviewer.md +++ b/docs/models/components/requestreviewer.md @@ -9,13 +9,15 @@ import { RequestReviewer } from "opal-mcp/models/components"; let value: RequestReviewer = { id: "3c4ee6ee-b77b-4ca9-97b7-4a5eb181dc00", + fullName: "Jake Barnes", status: "PENDING", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | The unique identifier of the reviewer | -| `status` | [components.RequestReviewerStatus](../../models/components/requestreviewerstatus.md) | :heavy_check_mark: | The status of this reviewer's review | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the reviewer | | +| `fullName` | *string* | :heavy_minus_sign: | The user's full name. | Jake Barnes | +| `status` | [components.RequestReviewerStatus](../../models/components/requestreviewerstatus.md) | :heavy_check_mark: | The status of this reviewer's review | | \ No newline at end of file diff --git a/docs/models/components/requestreviewerstages.md b/docs/models/components/requestreviewerstages.md new file mode 100644 index 00000000..52a96ba0 --- /dev/null +++ b/docs/models/components/requestreviewerstages.md @@ -0,0 +1,27 @@ +# RequestReviewerStages + +The stages configuration for a request item + +## Example Usage + +```typescript +import { RequestReviewerStages } from "opal-mcp/models/components"; + +let value: RequestReviewerStages = { + accessLevelName: "admin", + accessLevelRemoteId: "arn:aws:iam::490306337630:role/SupportUser", + itemName: "", + itemId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + stages: [], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `accessLevelName` | *string* | :heavy_minus_sign: | The name of the access level requested. | admin | +| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | The ID of the access level requested on the remote system. | arn:aws:iam::490306337630:role/SupportUser | +| `itemName` | *string* | :heavy_check_mark: | The name of the requested item | | +| `itemId` | *string* | :heavy_check_mark: | The ID of the resource requested. | f454d283-ca87-4a8a-bdbb-df212eca5353 | +| `stages` | [components.RequestStage](../../models/components/requeststage.md)[] | :heavy_check_mark: | The stages of review for this request | | \ No newline at end of file diff --git a/docs/models/components/requeststage.md b/docs/models/components/requeststage.md index df23e616..c26ec2cf 100644 --- a/docs/models/components/requeststage.md +++ b/docs/models/components/requeststage.md @@ -12,7 +12,8 @@ let value: RequestStage = { operator: "OR", reviewers: [ { - id: "ad49e317-29f3-4a7c-bca4-979dabe188a1", + id: "020729d7-6ef5-4700-aa93-7567afc9c5b0", + fullName: "Jake Barnes", status: "APPROVED", }, ], diff --git a/docs/models/components/requestt.md b/docs/models/components/requestt.md index dcc56f9f..85f13c1c 100644 --- a/docs/models/components/requestt.md +++ b/docs/models/components/requestt.md @@ -22,32 +22,27 @@ let value: RequestT = { status: "DENIED", reason: "I need this resource.", durationMinutes: 1440, - stages: { - requestedRoleName: "Admin", - requestedItemName: "AWS Production Account", - stages: [ - { - stage: 1, - operator: "AND", - reviewers: [ - { - id: "7c86c85d-0651-43e2-a748-d69d658418e8", - status: "PENDING", - }, - ], - }, - { - stage: 2, - operator: "OR", - reviewers: [ - { - id: "8d86c85d-0651-43e2-a748-d69d658418e9", - status: "APPROVED", - }, - ], - }, - ], - }, + reviewerStages: [ + { + accessLevelName: "admin", + accessLevelRemoteId: "arn:aws:iam::490306337630:role/SupportUser", + itemName: "", + itemId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + stages: [ + { + stage: 506134, + operator: "AND", + reviewers: [ + { + id: "020729d7-6ef5-4700-aa93-7567afc9c5b0", + fullName: "Jake Barnes", + status: "APPROVED", + }, + ], + }, + ], + }, + ], }; ``` @@ -66,4 +61,5 @@ let value: RequestT = { | `durationMinutes` | *number* | :heavy_minus_sign: | The duration of the request in minutes. | 120 | | `requestedItemsList` | [components.RequestedItem](../../models/components/requesteditem.md)[] | :heavy_minus_sign: | The list of targets for the request. | | | `customFieldsResponses` | [components.RequestCustomFieldResponse](../../models/components/requestcustomfieldresponse.md)[] | :heavy_minus_sign: | The responses given to the custom fields associated to the request | | -| `stages` | [components.RequestItemStages](../../models/components/requestitemstages.md) | :heavy_minus_sign: | The stages configuration for a request item | | \ No newline at end of file +| ~~`stages`~~ | [components.RequestItemStages](../../models/components/requestitemstages.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The stages configuration for a request item | | +| `reviewerStages` | *components.ReviewerStages* | :heavy_minus_sign: | The configured reviewer stages for every item in this request, or an error message if reviewers could not be loaded | | \ No newline at end of file diff --git a/docs/models/components/resource.md b/docs/models/components/resource.md index 6a70127b..db313911 100644 --- a/docs/models/components/resource.md +++ b/docs/models/components/resource.md @@ -44,6 +44,7 @@ let value: Resource = { | `resourceType` | [components.ResourceTypeEnum](../../models/components/resourcetypeenum.md) | :heavy_minus_sign: | The type of the resource. | AWS_IAM_ROLE | | `maxDuration` | *number* | :heavy_minus_sign: | The maximum duration for which the resource can be requested (in minutes). | 120 | | `recommendedDuration` | *number* | :heavy_minus_sign: | The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. | 120 | +| `extensionsDurationInMinutes` | *number* | :heavy_minus_sign: | The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. | 120 | | ~~`requireManagerApproval`~~ | *boolean* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

A bool representing whether or not access requests to the resource require manager approval. | false | | `requireSupportTicket` | *boolean* | :heavy_minus_sign: | A bool representing whether or not access requests to the resource require an access ticket. | false | | `requireMfaToApprove` | *boolean* | :heavy_minus_sign: | A bool representing whether or not to require MFA for reviewers to approve requests for this resource. | false | @@ -63,4 +64,7 @@ let value: Resource = { | ~~`metadata`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

JSON metadata about the remote resource. Only set for items linked to remote systems. See [this guide](https://docs.opal.dev/reference/end-system-objects) for details. | {
"okta_directory_role":
{
"role_id": "SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345",
"role_type": "SUPER_ADMIN",
},
} | | `remoteInfo` | [components.ResourceRemoteInfo](../../models/components/resourceremoteinfo.md) | :heavy_minus_sign: | Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields. | | | `ancestorResourceIds` | *string*[] | :heavy_minus_sign: | List of resource IDs that are ancestors of this resource. | [
"f454d283-ca67-4a8a-bdbb-df212eca5345",
"f454d283-ca67-4a8a-bdbb-df212eca5346"
] | -| `descendantResourceIds` | *string*[] | :heavy_minus_sign: | List of resource IDs that are descendants of this resource. | [
"f454d283-ca67-4a8a-bdbb-df212eca5347",
"f454d283-ca67-4a8a-bdbb-df212eca5348"
] | \ No newline at end of file +| `descendantResourceIds` | *string*[] | :heavy_minus_sign: | List of resource IDs that are descendants of this resource. | [
"f454d283-ca67-4a8a-bdbb-df212eca5347",
"f454d283-ca67-4a8a-bdbb-df212eca5348"
] | +| `matchRemoteName` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the resource's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false. | false | +| `matchRemoteDescription` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the resource's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false. | false | +| `lastSuccessfulSync` | [components.SyncTask](../../models/components/synctask.md) | :heavy_minus_sign: | Represents a sync task that has been completed, either successfully or with errors. | {
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"completed_at": "2023-10-01T12:00:00Z"
} | \ No newline at end of file diff --git a/docs/models/components/resourceaccessuser.md b/docs/models/components/resourceaccessuser.md index 4b61fd40..ab6d1f59 100644 --- a/docs/models/components/resourceaccessuser.md +++ b/docs/models/components/resourceaccessuser.md @@ -32,6 +32,8 @@ let value: ResourceAccessUser = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `resourceId` | *string* | :heavy_check_mark: | The ID of the resource. | 1b978423-db0a-4037-a4cf-f79c60cb67b3 | +| `resourceName` | *string* | :heavy_minus_sign: | The name of the resource. | AdministratorAccess | +| `description` | *string* | :heavy_minus_sign: | The description of the resource. | Full access to all resources and settings. | | `userId` | *string* | :heavy_check_mark: | The ID of the user. | 29827fb8-f2dd-4e80-9576-28e31e9934ac | | `accessLevel` | [components.ResourceAccessLevel](../../models/components/resourceaccesslevel.md) | :heavy_check_mark: | # Access Level Object
### Description
The `AccessLevel` object is used to represent the level of access that a principal has. The "default" access
level is a `AccessLevel` object whose fields are all empty strings.

### Usage Example
View the `AccessLevel` of a resource/user or resource/group pair to see the level of access granted to the resource. | {
"access_level_name": "AdminRole",
"access_level_remote_id": "arn:aws:iam::590304332660:role/AdministratorAccess"
} | | `fullName` | *string* | :heavy_check_mark: | The user's full name. | Jake Barnes | diff --git a/docs/models/components/resourceaccessuserlist.md b/docs/models/components/resourceaccessuserlist.md index 2fedbbed..5a6e8eaa 100644 --- a/docs/models/components/resourceaccessuserlist.md +++ b/docs/models/components/resourceaccessuserlist.md @@ -41,6 +41,8 @@ let value: ResourceAccessUserList = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `results` | [components.ResourceAccessUser](../../models/components/resourceaccessuser.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `next` | *string* | :heavy_minus_sign: | The cursor with which to continue pagination if additional result pages exist. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `previous` | *string* | :heavy_minus_sign: | The cursor used to obtain the current result page. | cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ | +| `results` | [components.ResourceAccessUser](../../models/components/resourceaccessuser.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/resourceremoteinfo.md b/docs/models/components/resourceremoteinfo.md index 049a20aa..bc909141 100644 --- a/docs/models/components/resourceremoteinfo.md +++ b/docs/models/components/resourceremoteinfo.md @@ -8,6 +8,58 @@ Information that defines the remote resource. This replaces the deprecated remot import { ResourceRemoteInfo } from "opal-mcp/models/components"; let value: ResourceRemoteInfo = { + databricksAccountServicePrincipal: { + applicationId: "00000000-0000-0000-0000-000000000000", + resourceId: "00000000-0000-0000-0000-000000000000", + }, + azureSubscription: { + resourceId: "/subscriptions/00000000-0000-0000-0000-000000000000", + }, + azureResourceGroup: { + resourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg", + }, + azureManagementGroup: { + resourceId: "/providers/Microsoft.Management/managementGroups/my-mg", + }, + azureVirtualMachine: { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/vm01", + }, + azureStorageAccount: { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/sa01", + }, + azureStorageContainer: { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/sa01/blobServices/default/containers/c01", + }, + azureSqlServer: { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/servers/sqldev01", + }, + azureSqlDatabase: { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/servers/sqldev01/databases/db01", + }, + azureSqlManagedInstance: { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/managedInstances/mi01", + }, + azureSqlManagedDatabase: { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/managedInstances/mi01/databases/midb01", + }, + azureUserAssignedManagedIdentity: { + resourceId: + "/subscriptions/0000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id01", + }, + azureEnterpriseApp: { + resourceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + }, + azureEntraIdRole: { + resourceId: "11111111-2222-3333-4444-555555555555", + }, awsOrganizationalUnit: { parentId: "ou-1234", organizationalUnitId: "ou-1234", @@ -29,6 +81,14 @@ let value: ResourceRemoteInfo = { region: "us-east-2", accountId: "234234234234", }, + awsRdsCluster: { + clusterId: "demo-mysql-cluster", + region: "us-east-2", + resourceId: "cluster-AOO8V0XUCNU13XLZXQDQRSN0NQ", + accountId: "234234234234", + databaseName: "mydatabase", + engine: "MYSQL", + }, awsRdsInstance: { instanceId: "demo-mysql-db", region: "us-east-2", @@ -87,6 +147,15 @@ let value: ResourceRemoteInfo = { githubRepo: { repoName: "Opal Security", }, + githubOrgRole: { + roleId: "112233", + }, + githubOrg: { + orgName: "Opal Security", + }, + githubEnterpriseRole: { + roleId: "112233", + }, gitlabProject: { projectId: "898931321", }, @@ -99,9 +168,33 @@ let value: ResourceRemoteInfo = { oktaCustomRole: { roleId: "a9dfas0f678asdf67867", }, + snowflakeDatabase: { + databaseName: "mydatabase", + }, + snowflakeSchema: { + databaseName: "mydatabase", + schemaName: "mycatalogschema", + }, + snowflakeTable: { + databaseName: "mydatabase", + schemaName: "mycatalogschema", + tableName: "myitemstable", + }, + ilevelAdvancedRole: { + roleName: "IT User", + }, + tailscaleSsh: { + tagName: "admin", + }, + twingateResource: { + resourceId: "UmVzb3VyY2U6MTIzNA==", + }, pagerdutyRole: { roleName: "owner", }, + workdayRole: { + roleId: "123abc456def", + }, salesforcePermissionSet: { permissionSetId: "0PS5Y090202wOV7WAM", }, @@ -109,45 +202,164 @@ let value: ResourceRemoteInfo = { profileId: "0PS5Y090202wOV7WAM", userLicenseId: "1005Y030081Qb5XJHS", }, + docusignPermissionProfile: { + permissionProfileId: "12345", + }, salesforceRole: { roleId: "0PS5Y090202wOV7WAM", }, teleportRole: { roleName: "admin_role", }, + datastaxAstraRole: { + roleId: "123e4567-e89b-12d3-a456-426614174000", + }, + coupaRole: { + roleId: "999", + }, + cursorOrganization: { + orgId: "123e4567-e89b-12d3-a456-426614174000", + }, + openaiPlatformProject: { + projectId: "proj_abc", + }, + openaiPlatformServiceAccount: { + projectId: "proj_abc", + serviceAccountId: "svc_acct_abc", + }, + anthropicWorkspace: { + workspaceId: "ws-123456", + }, + oracleFusionRole: { + roleId: "123e4567-e89b-12d3-a456-426614174000", + }, + devinOrganization: { + orgId: "devin-org-01", + }, + devinRole: { + roleId: "devin-role-01", + }, + netsuiteRole: { + roleId: "123e4567-e89b-12d3-a456-426614174000", + }, + datadogRole: { + roleId: "123e4567-e89b-12d3-a456-426614174000", + }, + clickhouseDatabase: { + databaseName: "my_database", + }, + clickhouseTable: { + databaseName: "my_database", + tableName: "my_table", + }, + grafanaFolder: { + folderUid: "fffRTXX", + }, + grafanaDashboard: { + dashboardUid: "dddRTXX", + }, + grafanaRole: { + roleUid: "rrfRTXX", + }, + zendeskRole: { + roleId: "12345", + }, + hubspotRole: { + roleId: "12345", + }, + alicloudRamRole: { + roleArn: "acs:ram::1234567890:role/MyRole", + }, + alicloudEcsInstance: { + instanceId: "i-bp1a1234567890abcd", + }, + zoomRole: { + roleId: "0", + }, + zoomLicense: { + licenseType: "2", + }, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `awsOrganizationalUnit` | [components.AwsOrganizationalUnit](../../models/components/awsorganizationalunit.md) | :heavy_minus_sign: | Remote info for AWS organizational unit. | -| `awsAccount` | [components.AwsAccount](../../models/components/awsaccount.md) | :heavy_minus_sign: | Remote info for AWS account. | -| `awsPermissionSet` | [components.AwsPermissionSet](../../models/components/awspermissionset.md) | :heavy_minus_sign: | Remote info for AWS Identity Center permission set. | -| `awsIamRole` | [components.AwsIamRole](../../models/components/awsiamrole.md) | :heavy_minus_sign: | Remote info for AWS IAM role. | -| `awsEc2Instance` | [components.AwsEc2Instance](../../models/components/awsec2instance.md) | :heavy_minus_sign: | Remote info for AWS EC2 instance. | -| `awsRdsInstance` | [components.AwsRdsInstance](../../models/components/awsrdsinstance.md) | :heavy_minus_sign: | Remote info for AWS RDS instance. | -| `awsEksCluster` | [components.AwsEksCluster](../../models/components/awsekscluster.md) | :heavy_minus_sign: | Remote info for AWS EKS cluster. | -| `customConnector` | [components.CustomConnector](../../models/components/customconnector.md) | :heavy_minus_sign: | Remote info for a custom connector resource. | -| `gcpOrganization` | [components.GcpOrganization](../../models/components/gcporganization.md) | :heavy_minus_sign: | Remote info for GCP organization. | -| `gcpBucket` | [components.GcpBucket](../../models/components/gcpbucket.md) | :heavy_minus_sign: | Remote info for GCP bucket. | -| `gcpComputeInstance` | [components.GcpComputeInstance](../../models/components/gcpcomputeinstance.md) | :heavy_minus_sign: | Remote info for GCP compute instance. | -| `gcpBigQueryDataset` | [components.GcpBigQueryDataset](../../models/components/gcpbigquerydataset.md) | :heavy_minus_sign: | Remote info for GCP BigQuery Dataset. | -| `gcpBigQueryTable` | [components.GcpBigQueryTable](../../models/components/gcpbigquerytable.md) | :heavy_minus_sign: | Remote info for GCP BigQuery Table. | -| `gcpFolder` | [components.GcpFolder](../../models/components/gcpfolder.md) | :heavy_minus_sign: | Remote info for GCP folder. | -| `gcpGkeCluster` | [components.GcpGkeCluster](../../models/components/gcpgkecluster.md) | :heavy_minus_sign: | Remote info for GCP GKE cluster. | -| `gcpProject` | [components.GcpProject](../../models/components/gcpproject.md) | :heavy_minus_sign: | Remote info for GCP project. | -| `gcpSqlInstance` | [components.GcpSqlInstance](../../models/components/gcpsqlinstance.md) | :heavy_minus_sign: | Remote info for GCP SQL instance. | -| `gcpServiceAccount` | [components.GcpServiceAccount](../../models/components/gcpserviceaccount.md) | :heavy_minus_sign: | Remote info for a GCP service account. | -| `googleWorkspaceRole` | [components.GoogleWorkspaceRole](../../models/components/googleworkspacerole.md) | :heavy_minus_sign: | Remote info for GCP workspace role. | -| `githubRepo` | [components.GithubRepo](../../models/components/githubrepo.md) | :heavy_minus_sign: | Remote info for GitHub repository. | -| `gitlabProject` | [components.GitlabProject](../../models/components/gitlabproject.md) | :heavy_minus_sign: | Remote info for Gitlab project. | -| `oktaApp` | [components.OktaApp](../../models/components/oktaapp.md) | :heavy_minus_sign: | Remote info for Okta directory app. | -| `oktaStandardRole` | [components.OktaStandardRole](../../models/components/oktastandardrole.md) | :heavy_minus_sign: | Remote info for Okta directory standard role. | -| `oktaCustomRole` | [components.OktaCustomRole](../../models/components/oktacustomrole.md) | :heavy_minus_sign: | Remote info for Okta directory custom role. | -| `pagerdutyRole` | [components.PagerdutyRole](../../models/components/pagerdutyrole.md) | :heavy_minus_sign: | Remote info for Pagerduty role. | -| `salesforcePermissionSet` | [components.SalesforcePermissionSet](../../models/components/salesforcepermissionset.md) | :heavy_minus_sign: | Remote info for Salesforce permission set. | -| `salesforceProfile` | [components.SalesforceProfile](../../models/components/salesforceprofile.md) | :heavy_minus_sign: | Remote info for Salesforce profile. | -| `salesforceRole` | [components.SalesforceRole](../../models/components/salesforcerole.md) | :heavy_minus_sign: | Remote info for Salesforce role. | -| `teleportRole` | [components.TeleportRole](../../models/components/teleportrole.md) | :heavy_minus_sign: | Remote info for Teleport role. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `databricksAccountServicePrincipal` | [components.DatabricksAccountServicePrincipal](../../models/components/databricksaccountserviceprincipal.md) | :heavy_minus_sign: | Remote info for Databricks account service principal. | +| `azureSubscription` | [components.AzureSubscription](../../models/components/azuresubscription.md) | :heavy_minus_sign: | Remote info for Azure subscription. | +| `azureResourceGroup` | [components.AzureResourceGroup](../../models/components/azureresourcegroup.md) | :heavy_minus_sign: | Remote info for Azure resource group. | +| `azureManagementGroup` | [components.AzureManagementGroup](../../models/components/azuremanagementgroup.md) | :heavy_minus_sign: | Remote info for Azure management group. | +| `azureVirtualMachine` | [components.AzureVirtualMachine](../../models/components/azurevirtualmachine.md) | :heavy_minus_sign: | Remote info for Azure virtual machine. | +| `azureStorageAccount` | [components.AzureStorageAccount](../../models/components/azurestorageaccount.md) | :heavy_minus_sign: | Remote info for Azure storage account. | +| `azureStorageContainer` | [components.AzureStorageContainer](../../models/components/azurestoragecontainer.md) | :heavy_minus_sign: | Remote info for Azure storage container. | +| `azureSqlServer` | [components.AzureSqlServer](../../models/components/azuresqlserver.md) | :heavy_minus_sign: | Remote info for Azure SQL server. | +| `azureSqlDatabase` | [components.AzureSqlDatabase](../../models/components/azuresqldatabase.md) | :heavy_minus_sign: | Remote info for Azure SQL database. | +| `azureSqlManagedInstance` | [components.AzureSqlManagedInstance](../../models/components/azuresqlmanagedinstance.md) | :heavy_minus_sign: | Remote info for Azure SQL managed instance. | +| `azureSqlManagedDatabase` | [components.AzureSqlManagedDatabase](../../models/components/azuresqlmanageddatabase.md) | :heavy_minus_sign: | Remote info for Azure SQL managed database. | +| `azureUserAssignedManagedIdentity` | [components.AzureUserAssignedManagedIdentity](../../models/components/azureuserassignedmanagedidentity.md) | :heavy_minus_sign: | Remote info for Azure user assigned managed identity. | +| `azureEnterpriseApp` | [components.AzureEnterpriseApp](../../models/components/azureenterpriseapp.md) | :heavy_minus_sign: | Remote info for Azure Enterprise App. | +| `azureEntraIdRole` | [components.AzureEntraIdRole](../../models/components/azureentraidrole.md) | :heavy_minus_sign: | Remote info for Azure Entra ID role. | +| `awsOrganizationalUnit` | [components.AwsOrganizationalUnit](../../models/components/awsorganizationalunit.md) | :heavy_minus_sign: | Remote info for AWS organizational unit. | +| `awsAccount` | [components.AwsAccount](../../models/components/awsaccount.md) | :heavy_minus_sign: | Remote info for AWS account. | +| `awsPermissionSet` | [components.AwsPermissionSet](../../models/components/awspermissionset.md) | :heavy_minus_sign: | Remote info for AWS Identity Center permission set. | +| `awsIamRole` | [components.AwsIamRole](../../models/components/awsiamrole.md) | :heavy_minus_sign: | Remote info for AWS IAM role. | +| `awsEc2Instance` | [components.AwsEc2Instance](../../models/components/awsec2instance.md) | :heavy_minus_sign: | Remote info for AWS EC2 instance. | +| `awsRdsCluster` | [components.AwsRdsCluster](../../models/components/awsrdscluster.md) | :heavy_minus_sign: | Remote info for AWS RDS cluster. | +| `awsRdsInstance` | [components.AwsRdsInstance](../../models/components/awsrdsinstance.md) | :heavy_minus_sign: | Remote info for AWS RDS instance. | +| `awsEksCluster` | [components.AwsEksCluster](../../models/components/awsekscluster.md) | :heavy_minus_sign: | Remote info for AWS EKS cluster. | +| `customConnector` | [components.CustomConnector](../../models/components/customconnector.md) | :heavy_minus_sign: | Remote info for a custom connector resource. | +| `gcpOrganization` | [components.GcpOrganization](../../models/components/gcporganization.md) | :heavy_minus_sign: | Remote info for GCP organization. | +| `gcpBucket` | [components.GcpBucket](../../models/components/gcpbucket.md) | :heavy_minus_sign: | Remote info for GCP bucket. | +| `gcpComputeInstance` | [components.GcpComputeInstance](../../models/components/gcpcomputeinstance.md) | :heavy_minus_sign: | Remote info for GCP compute instance. | +| `gcpBigQueryDataset` | [components.GcpBigQueryDataset](../../models/components/gcpbigquerydataset.md) | :heavy_minus_sign: | Remote info for GCP BigQuery Dataset. | +| `gcpBigQueryTable` | [components.GcpBigQueryTable](../../models/components/gcpbigquerytable.md) | :heavy_minus_sign: | Remote info for GCP BigQuery Table. | +| `gcpFolder` | [components.GcpFolder](../../models/components/gcpfolder.md) | :heavy_minus_sign: | Remote info for GCP folder. | +| `gcpGkeCluster` | [components.GcpGkeCluster](../../models/components/gcpgkecluster.md) | :heavy_minus_sign: | Remote info for GCP GKE cluster. | +| `gcpProject` | [components.GcpProject](../../models/components/gcpproject.md) | :heavy_minus_sign: | Remote info for GCP project. | +| `gcpSqlInstance` | [components.GcpSqlInstance](../../models/components/gcpsqlinstance.md) | :heavy_minus_sign: | Remote info for GCP SQL instance. | +| `gcpServiceAccount` | [components.GcpServiceAccount](../../models/components/gcpserviceaccount.md) | :heavy_minus_sign: | Remote info for a GCP service account. | +| `googleWorkspaceRole` | [components.GoogleWorkspaceRole](../../models/components/googleworkspacerole.md) | :heavy_minus_sign: | Remote info for GCP workspace role. | +| `githubRepo` | [components.GithubRepo](../../models/components/githubrepo.md) | :heavy_minus_sign: | Remote info for GitHub repository. | +| `githubOrgRole` | [components.GithubOrgRole](../../models/components/githuborgrole.md) | :heavy_minus_sign: | Remote info for GitHub organization role. | +| `githubOrg` | [components.GithubOrg](../../models/components/githuborg.md) | :heavy_minus_sign: | Remote info for GitHub organization. | +| `githubEnterpriseRole` | [components.GithubEnterpriseRole](../../models/components/githubenterpriserole.md) | :heavy_minus_sign: | Remote info for GitHub Enterprise role. | +| `gitlabProject` | [components.GitlabProject](../../models/components/gitlabproject.md) | :heavy_minus_sign: | Remote info for Gitlab project. | +| `oktaApp` | [components.OktaApp](../../models/components/oktaapp.md) | :heavy_minus_sign: | Remote info for Okta directory app. | +| `oktaStandardRole` | [components.OktaStandardRole](../../models/components/oktastandardrole.md) | :heavy_minus_sign: | Remote info for Okta directory standard role. | +| `oktaCustomRole` | [components.OktaCustomRole](../../models/components/oktacustomrole.md) | :heavy_minus_sign: | Remote info for Okta directory custom role. | +| `snowflakeDatabase` | [components.SnowflakeDatabase](../../models/components/snowflakedatabase.md) | :heavy_minus_sign: | Remote info for Snowflake database. | +| `snowflakeSchema` | [components.SnowflakeSchema](../../models/components/snowflakeschema.md) | :heavy_minus_sign: | Remote info for Snowflake schema. | +| `snowflakeTable` | [components.SnowflakeTable](../../models/components/snowflaketable.md) | :heavy_minus_sign: | Remote info for Snowflake table. | +| `ilevelAdvancedRole` | [components.IlevelAdvancedRole](../../models/components/ileveladvancedrole.md) | :heavy_minus_sign: | Remote info for iLevel Advanced role. | +| `tailscaleSsh` | [components.TailscaleSsh](../../models/components/tailscalessh.md) | :heavy_minus_sign: | Remote info for Tailscale SSH tag. | +| `twingateResource` | [components.TwingateResource](../../models/components/twingateresource.md) | :heavy_minus_sign: | Remote info for Twingate resource. | +| `pagerdutyRole` | [components.PagerdutyRole](../../models/components/pagerdutyrole.md) | :heavy_minus_sign: | Remote info for Pagerduty role. | +| `workdayRole` | [components.WorkdayRole](../../models/components/workdayrole.md) | :heavy_minus_sign: | Remote info for Workday role. | +| `salesforcePermissionSet` | [components.SalesforcePermissionSet](../../models/components/salesforcepermissionset.md) | :heavy_minus_sign: | Remote info for Salesforce permission set. | +| `salesforceProfile` | [components.SalesforceProfile](../../models/components/salesforceprofile.md) | :heavy_minus_sign: | Remote info for Salesforce profile. | +| `docusignPermissionProfile` | [components.DocusignPermissionProfile](../../models/components/docusignpermissionprofile.md) | :heavy_minus_sign: | Remote info for Docusign permission profile. | +| `salesforceRole` | [components.SalesforceRole](../../models/components/salesforcerole.md) | :heavy_minus_sign: | Remote info for Salesforce role. | +| `teleportRole` | [components.TeleportRole](../../models/components/teleportrole.md) | :heavy_minus_sign: | Remote info for Teleport role. | +| `datastaxAstraRole` | [components.DatastaxAstraRole](../../models/components/datastaxastrarole.md) | :heavy_minus_sign: | Remote info for an Astra role. | +| `coupaRole` | [components.CoupaRole](../../models/components/couparole.md) | :heavy_minus_sign: | Remote info for Coupa role. | +| `cursorOrganization` | [components.CursorOrganization](../../models/components/cursororganization.md) | :heavy_minus_sign: | Remote info for a Cursor organization. | +| `openaiPlatformProject` | [components.OpenaiPlatformProject](../../models/components/openaiplatformproject.md) | :heavy_minus_sign: | Remote info for OpenAI Platform project. | +| `openaiPlatformServiceAccount` | [components.OpenaiPlatformServiceAccount](../../models/components/openaiplatformserviceaccount.md) | :heavy_minus_sign: | Remote info for OpenAI Platform service account. | +| `anthropicWorkspace` | [components.AnthropicWorkspace](../../models/components/anthropicworkspace.md) | :heavy_minus_sign: | Remote info for Anthropic workspace. | +| `oracleFusionRole` | [components.OracleFusionRole](../../models/components/oraclefusionrole.md) | :heavy_minus_sign: | Remote info for Oracle Fusion role. | +| `devinOrganization` | [components.DevinOrganization](../../models/components/devinorganization.md) | :heavy_minus_sign: | Remote info for Devin organization. | +| `devinRole` | [components.DevinRole](../../models/components/devinrole.md) | :heavy_minus_sign: | Remote info for Devin role. | +| `netsuiteRole` | [components.NetsuiteRole](../../models/components/netsuiterole.md) | :heavy_minus_sign: | Remote info for NetSuite role. | +| `datadogRole` | [components.DatadogRole](../../models/components/datadogrole.md) | :heavy_minus_sign: | Remote info for Datadog role. | +| `clickhouseDatabase` | [components.ClickhouseDatabase](../../models/components/clickhousedatabase.md) | :heavy_minus_sign: | Remote info for ClickHouse database. | +| `clickhouseTable` | [components.ClickhouseTable](../../models/components/clickhousetable.md) | :heavy_minus_sign: | Remote info for ClickHouse table. | +| `grafanaFolder` | [components.GrafanaFolder](../../models/components/grafanafolder.md) | :heavy_minus_sign: | Remote info for Grafana folder. | +| `grafanaDashboard` | [components.GrafanaDashboard](../../models/components/grafanadashboard.md) | :heavy_minus_sign: | Remote info for Grafana dashboard. | +| `grafanaRole` | [components.GrafanaRole](../../models/components/grafanarole.md) | :heavy_minus_sign: | Remote info for Grafana role(fixed or custom). | +| `zendeskRole` | [components.ZendeskRole](../../models/components/zendeskrole.md) | :heavy_minus_sign: | Remote info for Zendesk custom role. | +| `hubspotRole` | [components.HubspotRole](../../models/components/hubspotrole.md) | :heavy_minus_sign: | Remote info for HubSpot role. | +| `alicloudRamRole` | [components.AlicloudRamRole](../../models/components/alicloudramrole.md) | :heavy_minus_sign: | Remote info for AliCloud RAM role. | +| `alicloudEcsInstance` | [components.AlicloudEcsInstance](../../models/components/alicloudecsinstance.md) | :heavy_minus_sign: | Remote info for AliCloud ECS instance. | +| `zoomRole` | [components.ZoomRole](../../models/components/zoomrole.md) | :heavy_minus_sign: | Remote info for Zoom role. | +| `zoomLicense` | [components.ZoomLicense](../../models/components/zoomlicense.md) | :heavy_minus_sign: | Remote info for Zoom license (user type). | \ No newline at end of file diff --git a/docs/models/components/resourcetypeenum.md b/docs/models/components/resourcetypeenum.md index 9971d263..b4f83cb4 100644 --- a/docs/models/components/resourcetypeenum.md +++ b/docs/models/components/resourcetypeenum.md @@ -13,5 +13,5 @@ let value: ResourceTypeEnum = "AWS_IAM_ROLE"; ## Values ```typescript -"AWS_IAM_ROLE" | "AWS_EC2_INSTANCE" | "AWS_EKS_CLUSTER" | "AWS_RDS_POSTGRES_CLUSTER" | "AWS_RDS_POSTGRES_INSTANCE" | "AWS_RDS_MYSQL_CLUSTER" | "AWS_RDS_MYSQL_INSTANCE" | "AWS_ACCOUNT" | "AWS_SSO_PERMISSION_SET" | "AWS_ORGANIZATIONAL_UNIT" | "AZURE_MANAGEMENT_GROUP" | "AZURE_RESOURCE_GROUP" | "AZURE_SUBSCRIPTION" | "AZURE_VIRTUAL_MACHINE" | "AZURE_STORAGE_ACCOUNT" | "AZURE_STORAGE_CONTAINER" | "AZURE_SQL_SERVER" | "AZURE_SQL_MANAGED_INSTANCE" | "AZURE_SQL_DATABASE" | "AZURE_SQL_MANAGED_DATABASE" | "AZURE_USER_ASSIGNED_MANAGED_Identity" | "AZURE_ENTRA_ID_ROLE" | "AZURE_ENTERPRISE_APP" | "CUSTOM" | "CUSTOM_CONNECTOR" | "DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL" | "GCP_ORGANIZATION" | "GCP_BUCKET" | "GCP_COMPUTE_INSTANCE" | "GCP_FOLDER" | "GCP_GKE_CLUSTER" | "GCP_PROJECT" | "GCP_CLOUD_SQL_POSTGRES_INSTANCE" | "GCP_CLOUD_SQL_MYSQL_INSTANCE" | "GCP_BIG_QUERY_DATASET" | "GCP_BIG_QUERY_TABLE" | "GCP_SERVICE_ACCOUNT" | "GIT_HUB_REPO" | "GIT_HUB_ORG_ROLE" | "GIT_LAB_PROJECT" | "GOOGLE_WORKSPACE_ROLE" | "MONGO_INSTANCE" | "MONGO_ATLAS_INSTANCE" | "OKTA_APP" | "OKTA_ROLE" | "OPAL_ROLE" | "OPAL_SCOPED_ROLE" | "PAGERDUTY_ROLE" | "TAILSCALE_SSH" | "SALESFORCE_PERMISSION_SET" | "SALESFORCE_PROFILE" | "SALESFORCE_ROLE" | "SNOWFLAKE_DATABASE" | "SNOWFLAKE_SCHEMA" | "SNOWFLAKE_TABLE" | "WORKDAY_ROLE" | "MYSQL_INSTANCE" | "MARIADB_INSTANCE" | "POSTGRES_INSTANCE" | "TELEPORT_ROLE" +"AWS_IAM_ROLE" | "AWS_EC2_INSTANCE" | "AWS_EKS_CLUSTER" | "AWS_RDS_POSTGRES_CLUSTER" | "AWS_RDS_POSTGRES_INSTANCE" | "AWS_RDS_MYSQL_CLUSTER" | "AWS_RDS_MYSQL_INSTANCE" | "AWS_ACCOUNT" | "AWS_SSO_PERMISSION_SET" | "AWS_ORGANIZATIONAL_UNIT" | "AZURE_MANAGEMENT_GROUP" | "AZURE_RESOURCE_GROUP" | "AZURE_SUBSCRIPTION" | "AZURE_VIRTUAL_MACHINE" | "AZURE_STORAGE_ACCOUNT" | "AZURE_STORAGE_CONTAINER" | "AZURE_SQL_SERVER" | "AZURE_SQL_MANAGED_INSTANCE" | "AZURE_SQL_DATABASE" | "AZURE_SQL_MANAGED_DATABASE" | "AZURE_USER_ASSIGNED_MANAGED_Identity" | "AZURE_ENTRA_ID_ROLE" | "AZURE_ENTERPRISE_APP" | "CUSTOM" | "CUSTOM_CONNECTOR" | "DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL" | "GCP_ORGANIZATION" | "GCP_BUCKET" | "GCP_COMPUTE_INSTANCE" | "GCP_FOLDER" | "GCP_GKE_CLUSTER" | "GCP_PROJECT" | "GCP_CLOUD_SQL_POSTGRES_INSTANCE" | "GCP_CLOUD_SQL_MYSQL_INSTANCE" | "GCP_BIG_QUERY_DATASET" | "GCP_BIG_QUERY_TABLE" | "GCP_SERVICE_ACCOUNT" | "GIT_HUB_REPO" | "GIT_HUB_ORG_ROLE" | "GIT_LAB_PROJECT" | "GOOGLE_WORKSPACE_ROLE" | "MONGO_INSTANCE" | "MONGO_ATLAS_INSTANCE" | "NETSUITE_ROLE" | "DATADOG_ROLE" | "OKTA_APP" | "OKTA_ROLE" | "OPAL_ROLE" | "OPAL_SCOPED_ROLE" | "PAGERDUTY_ROLE" | "TAILSCALE_SSH" | "SALESFORCE_PERMISSION_SET" | "SALESFORCE_PROFILE" | "SALESFORCE_ROLE" | "SNOWFLAKE_DATABASE" | "SNOWFLAKE_SCHEMA" | "SNOWFLAKE_TABLE" | "WORKDAY_ROLE" | "MYSQL_INSTANCE" | "MARIADB_INSTANCE" | "POSTGRES_INSTANCE" | "TELEPORT_ROLE" | "ILEVEL_ADVANCED_ROLE" | "DATASTAX_ASTRA_ROLE" | "COUPA_ROLE" | "CURSOR_ORGANIZATION" | "OPENAI_PLATFORM_PROJECT" | "OPENAI_PLATFORM_SERVICE_ACCOUNT" | "ANTHROPIC_WORKSPACE" | "GIT_HUB_ORG" | "ORACLE_FUSION_ROLE" | "DEVIN_ORGANIZATION" | "DEVIN_ROLE" | "VAULT_SECRET" | "VAULT_POLICY" | "VAULT_OIDC_ROLE" | "GIT_HUB_ENTERPRISE_ROLE" | "GRAFANA_FOLDER" | "GRAFANA_DASHBOARD" | "GRAFANA_BASIC_ROLE" | "GRAFANA_ROLE" | "CLICKHOUSE_DATABASE" | "CLICKHOUSE_TABLE" | "TWINGATE_RESOURCE" | "ZENDESK_ROLE" | "HUBSPOT_ROLE" | "ALICLOUD_RAM_ROLE" | "ALICLOUD_ECS_INSTANCE" | "DOCUSIGN_PERMISSION_PROFILE" | "ZOOM_ROLE" | "ZOOM_LICENSE" ``` \ No newline at end of file diff --git a/docs/models/components/reviewerstage.md b/docs/models/components/reviewerstage.md index 9cdcee27..1d4ab9c4 100644 --- a/docs/models/components/reviewerstage.md +++ b/docs/models/components/reviewerstage.md @@ -14,6 +14,9 @@ let value: ReviewerStage = { "7870617d-e72a-47f5-a84c-693817ab4567", "1520617d-e72a-47f5-a84c-693817ab48ad2", ], + serviceUserIds: [ + "7870617d-e72a-47f5-a84c-693817ab4568", + ], }; ``` @@ -24,4 +27,5 @@ let value: ReviewerStage = { | `requireManagerApproval` | *boolean* | :heavy_check_mark: | Whether this reviewer stage should require manager approval. | false | | `requireAdminApproval` | *boolean* | :heavy_minus_sign: | Whether this reviewer stage should require admin approval. | false | | `operator` | [components.Operator](../../models/components/operator.md) | :heavy_check_mark: | The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. | AND | -| `ownerIds` | *string*[] | :heavy_check_mark: | N/A | | \ No newline at end of file +| `ownerIds` | *string*[] | :heavy_check_mark: | The IDs of owners assigned as reviewers for this stage. | | +| `serviceUserIds` | *string*[] | :heavy_minus_sign: | The IDs of service users assigned as reviewers for this stage. | | \ No newline at end of file diff --git a/docs/models/components/reviewerstagelist.md b/docs/models/components/reviewerstagelist.md index be02e658..b41ba4d5 100644 --- a/docs/models/components/reviewerstagelist.md +++ b/docs/models/components/reviewerstagelist.md @@ -14,6 +14,9 @@ let value: ReviewerStageList = { "7870617d-e72a-47f5-a84c-693817ab4567", "1520617d-e72a-47f5-a84c-693817ab48ad2", ], + serviceUserIds: [ + "7870617d-e72a-47f5-a84c-693817ab4568", + ], }, ], }; diff --git a/docs/models/components/reviewerstages.md b/docs/models/components/reviewerstages.md new file mode 100644 index 00000000..15795a5d --- /dev/null +++ b/docs/models/components/reviewerstages.md @@ -0,0 +1,27 @@ +# ReviewerStages + +The configured reviewer stages for every item in this request, or an error message if reviewers could not be loaded + + +## Supported Types + +### `components.RequestReviewerStages[]` + +```typescript +const value: components.RequestReviewerStages[] = [ + { + accessLevelName: "admin", + accessLevelRemoteId: "arn:aws:iam::490306337630:role/SupportUser", + itemName: "", + itemId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + stages: [], + }, +]; +``` + +### `string` + +```typescript +const value: string = ""; +``` + diff --git a/docs/models/components/rolepermissiontargettypeenum.md b/docs/models/components/rolepermissiontargettypeenum.md index 31151f1b..1e52594c 100644 --- a/docs/models/components/rolepermissiontargettypeenum.md +++ b/docs/models/components/rolepermissiontargettypeenum.md @@ -13,5 +13,5 @@ let value: RolePermissionTargetTypeEnum = "RESOURCE"; ## Values ```typescript -"RESOURCE" | "CONNECTION" | "GROUP" | "BUNDLE" | "USER" | "ACCESS_REVIEW" +"RESOURCE" | "CONNECTION" | "GROUP" | "BUNDLE" | "USER" | "ACCESS_REVIEW" | "OWNER" ``` \ No newline at end of file diff --git a/docs/models/components/rootlyoncallschedule.md b/docs/models/components/rootlyoncallschedule.md new file mode 100644 index 00000000..1278fa41 --- /dev/null +++ b/docs/models/components/rootlyoncallschedule.md @@ -0,0 +1,19 @@ +# RootlyOnCallSchedule + +Remote info for Rootly on-call schedule group. + +## Example Usage + +```typescript +import { RootlyOnCallSchedule } from "opal-mcp/models/components"; + +let value: RootlyOnCallSchedule = { + scheduleId: "01HZ8XQM9ZQX8RKMZQ8ZQX8RK", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `scheduleId` | *string* | :heavy_check_mark: | The id of the Rootly on-call schedule. | 01HZ8XQM9ZQX8RKMZQ8ZQX8RK | \ No newline at end of file diff --git a/docs/models/components/ruleclauses.md b/docs/models/components/ruleclauses.md index a4a42c83..026350fb 100644 --- a/docs/models/components/ruleclauses.md +++ b/docs/models/components/ruleclauses.md @@ -7,7 +7,11 @@ import { RuleClauses } from "opal-mcp/models/components"; let value: RuleClauses = { when: { - clauses: [], + clauses: [ + { + selectors: [], + }, + ], }, }; ``` diff --git a/docs/models/components/ruledisjunction.md b/docs/models/components/ruledisjunction.md index 4da720fc..f3ea5c11 100644 --- a/docs/models/components/ruledisjunction.md +++ b/docs/models/components/ruledisjunction.md @@ -18,6 +18,7 @@ let value: RuleDisjunction = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `selectors` | [components.TagSelector](../../models/components/tagselector.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `selectors` | [components.TagSelector](../../models/components/tagselector.md)[] | :heavy_check_mark: | N/A | +| `attributeSelectors` | [components.UserAttributeSelector](../../models/components/userattributeselector.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runopalqueryrequest.md b/docs/models/components/runopalqueryrequest.md new file mode 100644 index 00000000..f24f75b2 --- /dev/null +++ b/docs/models/components/runopalqueryrequest.md @@ -0,0 +1,61 @@ +# RunOpalQueryRequest + +Request body for running an ad-hoc OpalQuery. The `type` field determines which query schema applies. + + +## Supported Types + +### `components.OpalNodeQuery` + +```typescript +const value: components.OpalNodeQuery = { + type: "NODE", + query: { + nodeFilters: { + entityTypes: [ + "RESOURCE", + ], + entityTag: { + key: "env", + value: "prod", + }, + }, + accessFilters: { + isAccessibleBy: { + entityTypes: [ + "USER", + ], + entityTag: { + key: "contractor", + }, + }, + }, + }, + first: 50, +}; +``` + +### `components.OpalAccessPathQuery` + +```typescript +const value: components.OpalAccessPathQuery = { + type: "ACCESS_PATH", + query: { + principalFilter: { + entityTypes: [ + "USER", + ], + }, + entitlementFilter: { + entityItemTypes: [ + "AWS_IAM_ROLE", + ], + }, + edgeFilter: { + directOnly: true, + }, + }, + first: 50, +}; +``` + diff --git a/docs/models/components/slackusergroup.md b/docs/models/components/slackusergroup.md new file mode 100644 index 00000000..e79f9e31 --- /dev/null +++ b/docs/models/components/slackusergroup.md @@ -0,0 +1,19 @@ +# SlackUserGroup + +Remote info for Slack user group. + +## Example Usage + +```typescript +import { SlackUserGroup } from "opal-mcp/models/components"; + +let value: SlackUserGroup = { + groupId: "S0614TZR7", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The id of the Slack user group. | S0614TZR7 | \ No newline at end of file diff --git a/docs/models/components/snowflakedatabase.md b/docs/models/components/snowflakedatabase.md new file mode 100644 index 00000000..690075bc --- /dev/null +++ b/docs/models/components/snowflakedatabase.md @@ -0,0 +1,19 @@ +# SnowflakeDatabase + +Remote info for Snowflake database. + +## Example Usage + +```typescript +import { SnowflakeDatabase } from "opal-mcp/models/components"; + +let value: SnowflakeDatabase = { + databaseName: "mydatabase", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `databaseName` | *string* | :heavy_check_mark: | The name of the database. | mydatabase | \ No newline at end of file diff --git a/docs/models/components/snowflakeschema.md b/docs/models/components/snowflakeschema.md new file mode 100644 index 00000000..453b8cfe --- /dev/null +++ b/docs/models/components/snowflakeschema.md @@ -0,0 +1,21 @@ +# SnowflakeSchema + +Remote info for Snowflake schema. + +## Example Usage + +```typescript +import { SnowflakeSchema } from "opal-mcp/models/components"; + +let value: SnowflakeSchema = { + databaseName: "mydatabase", + schemaName: "mycatalogschema", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `databaseName` | *string* | :heavy_check_mark: | The name of the database the schema is in. | mydatabase | +| `schemaName` | *string* | :heavy_check_mark: | The name of the schema. | mycatalogschema | \ No newline at end of file diff --git a/docs/models/components/snowflaketable.md b/docs/models/components/snowflaketable.md new file mode 100644 index 00000000..9da22664 --- /dev/null +++ b/docs/models/components/snowflaketable.md @@ -0,0 +1,23 @@ +# SnowflakeTable + +Remote info for Snowflake table. + +## Example Usage + +```typescript +import { SnowflakeTable } from "opal-mcp/models/components"; + +let value: SnowflakeTable = { + databaseName: "mydatabase", + schemaName: "mycatalogschema", + tableName: "myitemstable", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `databaseName` | *string* | :heavy_check_mark: | The name of the database the table is in. | mydatabase | +| `schemaName` | *string* | :heavy_check_mark: | The name of the schema the table is in. | mycatalogschema | +| `tableName` | *string* | :heavy_check_mark: | The name of the table. | myitemstable | \ No newline at end of file diff --git a/docs/models/components/stopcampaignrequest.md b/docs/models/components/stopcampaignrequest.md new file mode 100644 index 00000000..445d96d7 --- /dev/null +++ b/docs/models/components/stopcampaignrequest.md @@ -0,0 +1,15 @@ +# StopCampaignRequest + +## Example Usage + +```typescript +import { StopCampaignRequest } from "opal-mcp/models/components"; + +let value: StopCampaignRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `revokeUnreviewed` | *boolean* | :heavy_minus_sign: | Revoke all unreviewed access grants. Access grants with no reviewer decision will be immediately revoked. | \ No newline at end of file diff --git a/docs/models/components/stringmatchtype.md b/docs/models/components/stringmatchtype.md new file mode 100644 index 00000000..7cf41f29 --- /dev/null +++ b/docs/models/components/stringmatchtype.md @@ -0,0 +1,17 @@ +# StringMatchType + +How to match a string value against entity names. REGEX matches the value as a case-insensitive regular expression. + +## Example Usage + +```typescript +import { StringMatchType } from "opal-mcp/models/components"; + +let value: StringMatchType = "ENDS_WITH"; +``` + +## Values + +```typescript +"CONTAINS" | "EQUALS" | "STARTS_WITH" | "ENDS_WITH" | "REGEX" +``` \ No newline at end of file diff --git a/docs/models/components/synctask.md b/docs/models/components/synctask.md new file mode 100644 index 00000000..30d81f31 --- /dev/null +++ b/docs/models/components/synctask.md @@ -0,0 +1,21 @@ +# SyncTask + +Represents a sync task that has been completed, either successfully or with errors. + +## Example Usage + +```typescript +import { SyncTask } from "opal-mcp/models/components"; + +let value: SyncTask = { + id: "7c86c85d-0651-43e2-a748-d69d658418e8", + completedAt: new Date("2023-10-01T12:00:00Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the sync task. | 7c86c85d-0651-43e2-a748-d69d658418e8 | +| `completedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The time when the sync task was completed. | 2023-10-01 12:00:00 +0000 UTC | \ No newline at end of file diff --git a/docs/models/components/tableaugroup.md b/docs/models/components/tableaugroup.md new file mode 100644 index 00000000..a102e75e --- /dev/null +++ b/docs/models/components/tableaugroup.md @@ -0,0 +1,19 @@ +# TableauGroup + +Remote info for Tableau group. + +## Example Usage + +```typescript +import { TableauGroup } from "opal-mcp/models/components"; + +let value: TableauGroup = { + groupId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `groupId` | *string* | :heavy_check_mark: | The ID of the Tableau group. | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | \ No newline at end of file diff --git a/docs/models/components/tailscalegroup.md b/docs/models/components/tailscalegroup.md new file mode 100644 index 00000000..3225d198 --- /dev/null +++ b/docs/models/components/tailscalegroup.md @@ -0,0 +1,19 @@ +# TailscaleGroup + +Remote info for Tailscale group. + +## Example Usage + +```typescript +import { TailscaleGroup } from "opal-mcp/models/components"; + +let value: TailscaleGroup = { + groupId: "898931321", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `groupId` | *string* | :heavy_check_mark: | The id of the Tailscale group. | 898931321 | \ No newline at end of file diff --git a/docs/models/components/tailscalessh.md b/docs/models/components/tailscalessh.md new file mode 100644 index 00000000..57ceebf1 --- /dev/null +++ b/docs/models/components/tailscalessh.md @@ -0,0 +1,19 @@ +# TailscaleSsh + +Remote info for Tailscale SSH tag. + +## Example Usage + +```typescript +import { TailscaleSsh } from "opal-mcp/models/components"; + +let value: TailscaleSsh = { + tagName: "admin", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| `tagName` | *string* | :heavy_check_mark: | The name of the tag. | admin | \ No newline at end of file diff --git a/docs/models/components/thirdpartyproviderenum.md b/docs/models/components/thirdpartyproviderenum.md new file mode 100644 index 00000000..bd797993 --- /dev/null +++ b/docs/models/components/thirdpartyproviderenum.md @@ -0,0 +1,17 @@ +# ThirdPartyProviderEnum + +The third party provider of the remote user. + +## Example Usage + +```typescript +import { ThirdPartyProviderEnum } from "opal-mcp/models/components"; + +let value: ThirdPartyProviderEnum = "GIT_HUB"; +``` + +## Values + +```typescript +"AUTH0" | "SLACK" | "GOOGLE_CHAT" | "JIRA" | "LINEAR" | "SERVICE_NOW" | "FRESH_SERVICE" | "SHORTCUT" | "PAGER_DUTY" | "OPSGENIE" | "GIT_HUB" | "GIT_LAB" | "GIT_LAB_CONNECTION" | "TELEPORT" +``` \ No newline at end of file diff --git a/docs/models/components/token.md b/docs/models/components/token.md new file mode 100644 index 00000000..7e4d3496 --- /dev/null +++ b/docs/models/components/token.md @@ -0,0 +1,31 @@ +# Token + +A first-party API token. + +## Example Usage + +```typescript +import { Token } from "opal-mcp/models/components"; + +let value: Token = { + tokenId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + createdAt: new Date("2022-01-23T04:56:07Z"), + tokenLabel: "My API Token", + creatorUserId: "d4a7d928-783e-4599-8ec6-088d635a5bcc", + userId: "d4a7d928-783e-4599-8ec6-088d635a5bcc", + accessLevel: "READ_ONLY", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `tokenId` | *string* | :heavy_check_mark: | The ID of the API token. | f454d283-ca87-4a8a-bdbb-df212eca5353 | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The date and time the token was created. | 2022-01-23 04:56:07 +0000 UTC | +| `tokenLabel` | *string* | :heavy_check_mark: | A human-readable label for the token. | My API Token | +| `creatorUserId` | *string* | :heavy_check_mark: | The ID of the user who created the token. | d4a7d928-783e-4599-8ec6-088d635a5bcc | +| `userId` | *string* | :heavy_check_mark: | The ID of the user the token authenticates as. | d4a7d928-783e-4599-8ec6-088d635a5bcc | +| `lastUsedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The date and time the token was last used. | 2022-01-23 04:56:07 +0000 UTC | +| `accessLevel` | [components.ApiAccessLevelEnum](../../models/components/apiaccesslevelenum.md) | :heavy_check_mark: | The access level of an API token. | | +| `expiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The date and time the token expires. | 2023-01-23 04:56:07 +0000 UTC | \ No newline at end of file diff --git a/docs/models/components/twingategroup.md b/docs/models/components/twingategroup.md new file mode 100644 index 00000000..1c319ec8 --- /dev/null +++ b/docs/models/components/twingategroup.md @@ -0,0 +1,19 @@ +# TwingateGroup + +Remote info for Twingate group. + +## Example Usage + +```typescript +import { TwingateGroup } from "opal-mcp/models/components"; + +let value: TwingateGroup = { + groupId: "R3JvdXA6MTIzNA==", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The id of the Twingate group. | R3JvdXA6MTIzNA== | \ No newline at end of file diff --git a/docs/models/components/twingategroupsynced.md b/docs/models/components/twingategroupsynced.md new file mode 100644 index 00000000..c5fe5179 --- /dev/null +++ b/docs/models/components/twingategroupsynced.md @@ -0,0 +1,19 @@ +# TwingateGroupSynced + +Remote info for Twingate synced group. + +## Example Usage + +```typescript +import { TwingateGroupSynced } from "opal-mcp/models/components"; + +let value: TwingateGroupSynced = { + groupId: "R3JvdXA6MTIzNA==", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `groupId` | *string* | :heavy_check_mark: | The id of the Twingate synced group. | R3JvdXA6MTIzNA== | \ No newline at end of file diff --git a/docs/models/components/twingateresource.md b/docs/models/components/twingateresource.md new file mode 100644 index 00000000..d796e18b --- /dev/null +++ b/docs/models/components/twingateresource.md @@ -0,0 +1,19 @@ +# TwingateResource + +Remote info for Twingate resource. + +## Example Usage + +```typescript +import { TwingateResource } from "opal-mcp/models/components"; + +let value: TwingateResource = { + resourceId: "UmVzb3VyY2U6MTIzNA==", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The id of the Twingate resource. | UmVzb3VyY2U6MTIzNA== | \ No newline at end of file diff --git a/docs/models/components/uar.md b/docs/models/components/uar.md index 275a122d..587d8164 100644 --- a/docs/models/components/uar.md +++ b/docs/models/components/uar.md @@ -15,6 +15,7 @@ let value: Uar = { deadline: new Date("2022-07-14T06:59:59Z"), timeZone: "America/Los_Angeles", selfReviewAllowed: false, + instantlyActionReviews: false, uarScope: { admins: [ "f454d283-ca87-4a8a-bdbb-df212eca5353", @@ -40,9 +41,10 @@ let value: Uar = { | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `uarId` | *string* | :heavy_check_mark: | The ID of the UAR. | f454d283-ca87-4a8a-bdbb-df212eca5353 | | `name` | *string* | :heavy_check_mark: | The name of the UAR. | Monthly UAR (July) | -| `reviewerAssignmentPolicy` | [components.UARReviewerAssignmentPolicyEnum](../../models/components/uarreviewerassignmentpolicyenum.md) | :heavy_check_mark: | A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. | MANUALLY | +| `reviewerAssignmentPolicy` | [components.UARReviewerAssignmentPolicyEnum](../../models/components/uarreviewerassignmentpolicyenum.md) | :heavy_check_mark: | A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. | MANUALLY | | `sendReviewerAssignmentNotification` | *boolean* | :heavy_check_mark: | A bool representing whether to send a notification to reviewers when they're assigned a new review. Default is False. | false | | `deadline` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | The last day for reviewers to complete their access reviews. | 2022-07-14 06:59:59 +0000 UTC | | `timeZone` | *string* | :heavy_check_mark: | The time zone name (as defined by the IANA Time Zone database) used in the access review deadline and exported audit report. Default is America/Los_Angeles. | America/Los_Angeles | | `selfReviewAllowed` | *boolean* | :heavy_check_mark: | A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. | false | +| `instantlyActionReviews` | *boolean* | :heavy_check_mark: | A bool representing whether to instantly action changes when reviewers submit their decision. Default is False. | false | | `uarScope` | [components.UARScope](../../models/components/uarscope.md) | :heavy_minus_sign: | If set, the access review will only contain resources and groups that match at least one of the filters in scope. | {
"filter_operator": "ANY",
"users": [
"userd283-ca87-4a8a-bdbb-df212eca5353"
],
"include_group_bindings": true,
"tags": [
{
"key": "uar_scope",
"value": "high_priority"
}
],
"names": [
"demo",
"api"
],
"admins": [
"f454d283-ca87-4a8a-bdbb-df212eca5353",
"8763d283-ca87-4a8a-bdbb-df212ecab139"
],
"resource_types": [
"GCP_CLOUD_SQL_POSTGRES_INSTANCE"
],
"group_types": [
"AWS_SSO_GROUP"
],
"apps": [
"pas2d283-ca87-4a8a-bdbb-df212eca5353",
"apss2d283-ca87-4a8a-bdbb-df212eca5353"
],
"entities": [
"f454d283-as87-4a8a-bdbb-df212eca5353",
"f454d283-as87-4a8a-bdbb-df212eca5329"
]
} | \ No newline at end of file diff --git a/docs/models/components/uarreviewerassignmentpolicyenum.md b/docs/models/components/uarreviewerassignmentpolicyenum.md index dea8f73c..3ca4ca2a 100644 --- a/docs/models/components/uarreviewerassignmentpolicyenum.md +++ b/docs/models/components/uarreviewerassignmentpolicyenum.md @@ -1,6 +1,6 @@ # UARReviewerAssignmentPolicyEnum -A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. +A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. ## Example Usage @@ -13,5 +13,5 @@ let value: UARReviewerAssignmentPolicyEnum = "MANUALLY"; ## Values ```typescript -"MANUALLY" | "BY_OWNING_TEAM_ADMIN" | "BY_MANAGER" +"MANUALLY" | "BY_OWNING_TEAM_ADMIN" | "BY_OWNING_TEAM_ADMIN_ALL" | "BY_MANAGER" | "BY_APPROVERS" | "BY_APPROVERS_ALL" ``` \ No newline at end of file diff --git a/docs/models/components/updateaccessruleinfo.md b/docs/models/components/updateaccessruleinfo.md index 7c173b81..06a10bc1 100644 --- a/docs/models/components/updateaccessruleinfo.md +++ b/docs/models/components/updateaccessruleinfo.md @@ -17,7 +17,11 @@ let value: UpdateAccessRuleInfo = { status: "ACTIVE", ruleClauses: { when: { - clauses: [], + clauses: [ + { + selectors: [], + }, + ], }, }, }; diff --git a/docs/models/components/updatecampaignconfigurationinfo.md b/docs/models/components/updatecampaignconfigurationinfo.md new file mode 100644 index 00000000..ebe26e74 --- /dev/null +++ b/docs/models/components/updatecampaignconfigurationinfo.md @@ -0,0 +1,42 @@ +# UpdateCampaignConfigurationInfo + +Configuration fields to update on a campaign. All fields are optional; +omitted fields are left unchanged. `query` and +`reviewer_assignment_policy` are set at create time and cannot be +updated here; including either field returns 400. +`cron_expression` and `recurring_duration_days` may only be set when +the campaign is a template; setting them on a one-off campaign returns +400. `is_template` is immutable and not accepted on update. + + +## Example Usage + +```typescript +import { UpdateCampaignConfigurationInfo } from "opal-mcp/models/components"; + +let value: UpdateCampaignConfigurationInfo = { + allowSelfReview: false, + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowSelfReview` | *boolean* | :heavy_minus_sign: | Whether reviewers can review their own access. | false | +| `sendReviewerAssignmentNotification` | *boolean* | :heavy_minus_sign: | Whether to notify reviewers upon assignment. | true | +| `allowReviewerReassignment` | *boolean* | :heavy_minus_sign: | Whether reviewers may reassign their reviews to another user. | false | +| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Scheduled start date of the campaign. May only be updated while the
campaign has not started (started_at is null). When set, the date's
calendar day in the campaign timezone must be at least tomorrow.
| 2026-07-02 00:00:00 +0000 UTC | +| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Scheduled end date of the campaign. When set, the date's calendar
day in the campaign timezone must be at least tomorrow.
| 2026-09-30 00:00:00 +0000 UTC | +| `timezone` | *string* | :heavy_minus_sign: | IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). | America/Los_Angeles | +| `revokeOn` | [components.CampaignRevokeOnEnum](../../models/components/campaignrevokeonenum.md) | :heavy_minus_sign: | When access decisions take effect during a campaign. | END | +| `reminderSchedule` | *number*[] | :heavy_minus_sign: | Days before end date to send reminder notifications. | [
7,
3,
1
] | +| `reminderIncludeManager` | *boolean* | :heavy_minus_sign: | Whether to include the reviewer's manager in reminders. | true | +| `requireReasonOnDenial` | *boolean* | :heavy_minus_sign: | Whether reviewers must provide a reason when denying (revoking) access. | false | +| `hideAiSuggestions` | *boolean* | :heavy_minus_sign: | Whether AI suggestions are hidden from reviewers. | false | +| `customStartMessage` | *string* | :heavy_minus_sign: | Optional custom message included when notifying reviewers that the campaign started. | Please complete your reviews by Friday. | +| `groupAssetVisibilityPolicy` | [components.CampaignGroupAssetVisibilityPolicyEnum](../../models/components/campaigngroupassetvisibilitypolicyenum.md) | :heavy_minus_sign: | Controls what group assets reviewers can see during the campaign. | STRICT | +| `cronExpression` | *string* | :heavy_minus_sign: | Cron expression driving the recurring schedule. Only valid on template campaigns. Pass an empty string to clear the active months (next_scheduled_run is cleared); the campaign remains a template. | 0 9 1 * * | +| `recurringDurationDays` | *number* | :heavy_minus_sign: | Deadline window in days applied to each draft generated from this template. Only valid on template campaigns. | 14 | \ No newline at end of file diff --git a/docs/models/components/updatecampaigninfo.md b/docs/models/components/updatecampaigninfo.md new file mode 100644 index 00000000..fd258a92 --- /dev/null +++ b/docs/models/components/updatecampaigninfo.md @@ -0,0 +1,30 @@ +# UpdateCampaignInfo + +# UpdateCampaignInfo Object +### Description +The `UpdateCampaignInfo` object is used to partially update a campaign. +Omitted fields are left unchanged. + +### Usage Example +Use in the `PUT Campaign` endpoint. + +## Example Usage + +```typescript +import { UpdateCampaignInfo } from "opal-mcp/models/components"; + +let value: UpdateCampaignInfo = { + name: "Q3 Access Review (Updated)", + configuration: { + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The name of the campaign. | Q3 Access Review (Updated) | +| `configuration` | [components.UpdateCampaignConfigurationInfo](../../models/components/updatecampaignconfigurationinfo.md) | :heavy_minus_sign: | Configuration fields to create or update. | {
"end_date": "2026-09-30T00:00:00Z",
"timezone": "America/Los_Angeles",
"allow_self_review": false
} | \ No newline at end of file diff --git a/docs/models/components/updateeventstreaminfo.md b/docs/models/components/updateeventstreaminfo.md new file mode 100644 index 00000000..b5ab2be9 --- /dev/null +++ b/docs/models/components/updateeventstreaminfo.md @@ -0,0 +1,20 @@ +# UpdateEventStreamInfo + +Information needed to update an event stream. + +## Example Usage + +```typescript +import { UpdateEventStreamInfo } from "opal-mcp/models/components"; + +let value: UpdateEventStreamInfo = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | Updated name for the event stream. | +| `enabled` | *boolean* | :heavy_minus_sign: | Whether the event stream should be enabled. | +| `webhookUrl` | *string* | :heavy_minus_sign: | Updated webhook URL. | +| `credentials` | [components.WebhookCredentials](../../models/components/webhookcredentials.md) | :heavy_minus_sign: | Authentication credentials for a webhook connection. | \ No newline at end of file diff --git a/docs/models/components/updategroupinfo.md b/docs/models/components/updategroupinfo.md index a5df7d51..221ed1ce 100644 --- a/docs/models/components/updategroupinfo.md +++ b/docs/models/components/updategroupinfo.md @@ -41,7 +41,10 @@ let value: UpdateGroupInfo = { | ~~`requestTemplateId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the associated request template. Deprecated in favor of `request_configurations`. | 06851574-e50d-40ca-8c78-f72ae6ab4304 | | ~~`isRequestable`~~ | *boolean* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

A bool representing whether or not to allow access requests to this group. Deprecated in favor of `request_configurations`. | false | | `groupLeaderUserIds` | *string*[] | :heavy_minus_sign: | A list of User IDs for the group leaders of the group | | +| ~~`extensionsDurationInMinutes`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The duration for which access can be extended (in minutes). Deprecated, set the extension duration in the request_configuration you want it to apply to. | 120 | | `requestConfigurations` | [components.RequestConfiguration](../../models/components/requestconfiguration.md)[] | :heavy_minus_sign: | The request configuration list of the configuration template. If not provided, the default request configuration will be used. | | | `requestConfigurationList` | [components.CreateRequestConfigurationInfoList](../../models/components/createrequestconfigurationinfolist.md) | :heavy_minus_sign: | # CreateRequestConfigurationInfoList Object
### Description
The `CreateRequestConfigurationInfoList` object is used as an input to the CreateRequestConfigurations API.

### Formatting Requirements
The `CreateRequestConfigurationInfoList` object must contain a list of `RequestConfiguration` objects.
Exactly one default `RequestConfiguration` must be provided. A default `RequestConfiguration` is one with a `condition` of `null`
and a `priority` of `0`. The default `RequestConfiguration` will be used when no other `RequestConfiguration` matches the request.

Only one `RequestConfiguration` may be provided for each priority, and the priorities must be contiguous. For example, if there are
two `RequestConfigurations` with priorities 0 and 2, there must be a `RequestConfiguration` with priority 1.

To use the `condition` field, the `condition` must be a valid JSON object.

The `condition` must be a JSON object with the key `group_ids` (more options may be added in the future), whose value is a list of
group IDs.
The `condition` will match if the user requesting access is a member of any of the groups in the list. Currently, we only support
using a single group as a condition. | {
"request_configurations": [
{
"request_configuration_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"organization_id": "w86c85d-0651-43e2-a748-d69d658418e8",
"condition": null,
"allow_requests": true,
"auto_approval": false,
"require_mfa_to_request": false,
"max_duration_minutes": 120,
"recommended_duration_minutes": 120,
"require_support_ticket": false,
"reviewer_stages": [
{
"reviewer_stage_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"owner_ids": [
"37cb7e41-12ba-46da-92ff-030abe0450b1",
"37cb7e41-12ba-46da-92ff-030abe0450b2"
],
"stage": 1
}
],
"priority": 0
},
{
"request_configuration_id": "7c86c85d-0651-43e2-a748-d69d658418e9",
"organization_id": "w86c85d-0651-43e2-a748-d69d658418e8",
"condition": {
"group_id": "1b978423-db0a-4037-a4cf-f79c60cb67b4"
},
"allow_requests": true,
"auto_approval": false,
"require_mfa_to_request": false,
"max_duration_minutes": 120,
"recommended_duration_minutes": 120,
"require_support_ticket": false,
"reviewer_stages": [
{
"reviewer_stage_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"owner_ids": [
"37cb7e41-12ba-46da-92ff-030abe0450b1",
"37cb7e41-12ba-46da-92ff-030abe0450b2"
],
"stage": 1
}
],
"priority": 1
}
]
} | | `customRequestNotification` | *string* | :heavy_minus_sign: | Custom request notification sent to the requester when the request is approved. | Check your email to register your account. | -| `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | +| `matchRemoteName` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. | false | +| `matchRemoteDescription` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. | false | \ No newline at end of file diff --git a/docs/models/components/updatepaladininfo.md b/docs/models/components/updatepaladininfo.md new file mode 100644 index 00000000..4390d0a2 --- /dev/null +++ b/docs/models/components/updatepaladininfo.md @@ -0,0 +1,23 @@ +# UpdatePaladinInfo + +Information for updating a Paladin. + +## Example Usage + +```typescript +import { UpdatePaladinInfo } from "opal-mcp/models/components"; + +let value: UpdatePaladinInfo = { + name: "paladin-agent-1", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The name of the Paladin. | paladin-agent-1 | +| `monitorMode` | *boolean* | :heavy_minus_sign: | When true, the Paladin reasons about requests but takes no action. If omitted, the existing value is preserved. | | +| `adminViewOnly` | *boolean* | :heavy_minus_sign: | When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. If omitted, the existing value is preserved. | | +| `enabledConnectors` | [components.PaladinConnector](../../models/components/paladinconnector.md)[] | :heavy_minus_sign: | The connectors the Paladin is allowed to use. If omitted, the existing connectors are preserved. | | +| `instructions` | *string* | :heavy_minus_sign: | The free-form instructions that guide the Paladin's decisions. If omitted, the existing instructions are preserved. | | \ No newline at end of file diff --git a/docs/models/components/updateresourceinfo.md b/docs/models/components/updateresourceinfo.md index 197e3c6b..378737c9 100644 --- a/docs/models/components/updateresourceinfo.md +++ b/docs/models/components/updateresourceinfo.md @@ -40,8 +40,12 @@ let value: UpdateResourceInfo = { | `ticketPropagation` | [components.TicketPropagationConfiguration](../../models/components/ticketpropagationconfiguration.md) | :heavy_minus_sign: | Configuration for ticket propagation, when enabled, a ticket will be created for access changes related to the users in this resource. | | | `customRequestNotification` | *string* | :heavy_minus_sign: | Custom request notification sent upon request approval. | Check your email to register your account. | | `riskSensitivityOverride` | [components.RiskSensitivityEnum](../../models/components/risksensitivityenum.md) | :heavy_minus_sign: | N/A | | +| `matchRemoteName` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. | false | +| `matchRemoteDescription` | *boolean* | :heavy_minus_sign: | A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. | false | | `configurationTemplateId` | *string* | :heavy_minus_sign: | The ID of the associated configuration template. | 06851574-e50d-40ca-8c78-f72ae6ab4304 | | ~~`requestTemplateId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the associated request template. Deprecated in favor of `request_configurations`. | 06851574-e50d-40ca-8c78-f72ae6ab4304 | | ~~`isRequestable`~~ | *boolean* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

A bool representing whether or not to allow access requests to this resource. Deprecated in favor of `request_configurations`. | false | +| ~~`extensionsDurationInMinutes`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The duration for which access can be extended (in minutes). Deprecated, set the extension duration in the request_configuration you want it to apply to. | 120 | +| `parentResourceId` | *string* | :heavy_minus_sign: | The ID of the parent resource. | f454d283-ca67-4a8a-bdbb-df212eca5345 | | `requestConfigurations` | [components.RequestConfiguration](../../models/components/requestconfiguration.md)[] | :heavy_minus_sign: | A list of configurations for requests to this resource. If not provided, the default request configuration will be used. | | | `requestConfigurationList` | [components.CreateRequestConfigurationInfoList](../../models/components/createrequestconfigurationinfolist.md) | :heavy_minus_sign: | # CreateRequestConfigurationInfoList Object
### Description
The `CreateRequestConfigurationInfoList` object is used as an input to the CreateRequestConfigurations API.

### Formatting Requirements
The `CreateRequestConfigurationInfoList` object must contain a list of `RequestConfiguration` objects.
Exactly one default `RequestConfiguration` must be provided. A default `RequestConfiguration` is one with a `condition` of `null`
and a `priority` of `0`. The default `RequestConfiguration` will be used when no other `RequestConfiguration` matches the request.

Only one `RequestConfiguration` may be provided for each priority, and the priorities must be contiguous. For example, if there are
two `RequestConfigurations` with priorities 0 and 2, there must be a `RequestConfiguration` with priority 1.

To use the `condition` field, the `condition` must be a valid JSON object.

The `condition` must be a JSON object with the key `group_ids` (more options may be added in the future), whose value is a list of
group IDs.
The `condition` will match if the user requesting access is a member of any of the groups in the list. Currently, we only support
using a single group as a condition. | {
"request_configurations": [
{
"request_configuration_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"organization_id": "w86c85d-0651-43e2-a748-d69d658418e8",
"condition": null,
"allow_requests": true,
"auto_approval": false,
"require_mfa_to_request": false,
"max_duration_minutes": 120,
"recommended_duration_minutes": 120,
"require_support_ticket": false,
"reviewer_stages": [
{
"reviewer_stage_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"owner_ids": [
"37cb7e41-12ba-46da-92ff-030abe0450b1",
"37cb7e41-12ba-46da-92ff-030abe0450b2"
],
"stage": 1
}
],
"priority": 0
},
{
"request_configuration_id": "7c86c85d-0651-43e2-a748-d69d658418e9",
"organization_id": "w86c85d-0651-43e2-a748-d69d658418e8",
"condition": {
"group_id": "1b978423-db0a-4037-a4cf-f79c60cb67b4"
},
"allow_requests": true,
"auto_approval": false,
"require_mfa_to_request": false,
"max_duration_minutes": 120,
"recommended_duration_minutes": 120,
"require_support_ticket": false,
"reviewer_stages": [
{
"reviewer_stage_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"owner_ids": [
"37cb7e41-12ba-46da-92ff-030abe0450b1",
"37cb7e41-12ba-46da-92ff-030abe0450b2"
],
"stage": 1
}
],
"priority": 1
}
]
} | \ No newline at end of file diff --git a/docs/models/components/userattributeselector.md b/docs/models/components/userattributeselector.md new file mode 100644 index 00000000..a546e10b --- /dev/null +++ b/docs/models/components/userattributeselector.md @@ -0,0 +1,22 @@ +# UserAttributeSelector + +## Example Usage + +```typescript +import { UserAttributeSelector } from "opal-mcp/models/components"; + +let value: UserAttributeSelector = { + attribute: "HR_IDP_STATUS", + values: [ + "", + "", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `attribute` | [components.Attribute](../../models/components/attribute.md) | :heavy_check_mark: | N/A | +| `values` | *string*[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/webhookapikeycredential.md b/docs/models/components/webhookapikeycredential.md new file mode 100644 index 00000000..10334f24 --- /dev/null +++ b/docs/models/components/webhookapikeycredential.md @@ -0,0 +1,25 @@ +# WebhookApiKeyCredential + +An API key credential for webhook authentication. + +## Example Usage + +```typescript +import { WebhookApiKeyCredential } from "opal-mcp/models/components"; + +let value: WebhookApiKeyCredential = { + id: "64b0586f-ebde-47ff-a648-c6384ea2cd52", + name: "", + value: "", + location: "QUERY_PARAM", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier for the credential. | +| `name` | *string* | :heavy_check_mark: | The name of the API key. | +| `value` | *string* | :heavy_check_mark: | The value of the API key. | +| `location` | [components.WebhookApiKeyLocationEnum](../../models/components/webhookapikeylocationenum.md) | :heavy_check_mark: | Where the API key is placed in webhook requests. | \ No newline at end of file diff --git a/docs/models/components/webhookapikeylocationenum.md b/docs/models/components/webhookapikeylocationenum.md new file mode 100644 index 00000000..c3d51074 --- /dev/null +++ b/docs/models/components/webhookapikeylocationenum.md @@ -0,0 +1,17 @@ +# WebhookApiKeyLocationEnum + +Where the API key is placed in webhook requests. + +## Example Usage + +```typescript +import { WebhookApiKeyLocationEnum } from "opal-mcp/models/components"; + +let value: WebhookApiKeyLocationEnum = "HEADER"; +``` + +## Values + +```typescript +"HEADER" | "QUERY_PARAM" +``` \ No newline at end of file diff --git a/docs/models/components/webhookauthtypeenum.md b/docs/models/components/webhookauthtypeenum.md new file mode 100644 index 00000000..56eb0b51 --- /dev/null +++ b/docs/models/components/webhookauthtypeenum.md @@ -0,0 +1,17 @@ +# WebhookAuthTypeEnum + +The authentication type for webhook connections. + +## Example Usage + +```typescript +import { WebhookAuthTypeEnum } from "opal-mcp/models/components"; + +let value: WebhookAuthTypeEnum = "NONE"; +``` + +## Values + +```typescript +"NONE" | "API_KEY" | "HMAC" +``` \ No newline at end of file diff --git a/docs/models/components/webhookcredentials.md b/docs/models/components/webhookcredentials.md new file mode 100644 index 00000000..f8a51f0b --- /dev/null +++ b/docs/models/components/webhookcredentials.md @@ -0,0 +1,22 @@ +# WebhookCredentials + +Authentication credentials for a webhook connection. + +## Example Usage + +```typescript +import { WebhookCredentials } from "opal-mcp/models/components"; + +let value: WebhookCredentials = { + authType: "NONE", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `authType` | [components.WebhookAuthTypeEnum](../../models/components/webhookauthtypeenum.md) | :heavy_check_mark: | The authentication type for webhook connections. | +| `apiKeyCredentials` | [components.WebhookApiKeyCredential](../../models/components/webhookapikeycredential.md)[] | :heavy_minus_sign: | API key credentials, present when auth_type is API_KEY. | +| `hmacCredential1` | [components.WebhookHmacCredential](../../models/components/webhookhmaccredential.md) | :heavy_minus_sign: | An HMAC credential for webhook authentication. | +| `hmacCredential2` | [components.WebhookHmacCredential](../../models/components/webhookhmaccredential.md) | :heavy_minus_sign: | An HMAC credential for webhook authentication. | \ No newline at end of file diff --git a/docs/models/components/webhookhmaccredential.md b/docs/models/components/webhookhmaccredential.md new file mode 100644 index 00000000..98d217ec --- /dev/null +++ b/docs/models/components/webhookhmaccredential.md @@ -0,0 +1,23 @@ +# WebhookHmacCredential + +An HMAC credential for webhook authentication. + +## Example Usage + +```typescript +import { WebhookHmacCredential } from "opal-mcp/models/components"; + +let value: WebhookHmacCredential = { + id: "d0cb4a22-411e-4628-8dd1-d1a8f82812db", + secret: "", + createdAt: new Date("2026-01-25T03:06:49.843Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier for the credential. | +| `secret` | *string* | :heavy_check_mark: | The HMAC secret value. | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | When the credential was created. | \ No newline at end of file diff --git a/docs/models/components/workdayrole.md b/docs/models/components/workdayrole.md new file mode 100644 index 00000000..98846d94 --- /dev/null +++ b/docs/models/components/workdayrole.md @@ -0,0 +1,19 @@ +# WorkdayRole + +Remote info for Workday role. + +## Example Usage + +```typescript +import { WorkdayRole } from "opal-mcp/models/components"; + +let value: WorkdayRole = { + roleId: "123abc456def", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | +| `roleId` | *string* | :heavy_check_mark: | The id of the role. | 123abc456def | \ No newline at end of file diff --git a/docs/models/components/zendeskgroup.md b/docs/models/components/zendeskgroup.md new file mode 100644 index 00000000..c60628ad --- /dev/null +++ b/docs/models/components/zendeskgroup.md @@ -0,0 +1,19 @@ +# ZendeskGroup + +Remote info for Zendesk group. + +## Example Usage + +```typescript +import { ZendeskGroup } from "opal-mcp/models/components"; + +let value: ZendeskGroup = { + groupId: "12345", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The ID of the Zendesk group. | 12345 | \ No newline at end of file diff --git a/docs/models/components/zendeskorganization.md b/docs/models/components/zendeskorganization.md new file mode 100644 index 00000000..d4afceca --- /dev/null +++ b/docs/models/components/zendeskorganization.md @@ -0,0 +1,19 @@ +# ZendeskOrganization + +Remote info for Zendesk organization. + +## Example Usage + +```typescript +import { ZendeskOrganization } from "opal-mcp/models/components"; + +let value: ZendeskOrganization = { + organizationId: "67890", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the Zendesk organization. | 67890 | \ No newline at end of file diff --git a/docs/models/components/zendeskrole.md b/docs/models/components/zendeskrole.md new file mode 100644 index 00000000..e3a9caa3 --- /dev/null +++ b/docs/models/components/zendeskrole.md @@ -0,0 +1,19 @@ +# ZendeskRole + +Remote info for Zendesk custom role. + +## Example Usage + +```typescript +import { ZendeskRole } from "opal-mcp/models/components"; + +let value: ZendeskRole = { + roleId: "12345", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `roleId` | *string* | :heavy_check_mark: | The ID of the Zendesk custom role. | 12345 | \ No newline at end of file diff --git a/docs/models/components/zoomgroup.md b/docs/models/components/zoomgroup.md new file mode 100644 index 00000000..3782d224 --- /dev/null +++ b/docs/models/components/zoomgroup.md @@ -0,0 +1,19 @@ +# ZoomGroup + +Remote info for Zoom group. + +## Example Usage + +```typescript +import { ZoomGroup } from "opal-mcp/models/components"; + +let value: ZoomGroup = { + groupId: "SoBVexyrQjqCkcxjpBWi6w", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The ID of the Zoom group. | SoBVexyrQjqCkcxjpBWi6w | \ No newline at end of file diff --git a/docs/models/components/zoomlicense.md b/docs/models/components/zoomlicense.md new file mode 100644 index 00000000..31e1cb8c --- /dev/null +++ b/docs/models/components/zoomlicense.md @@ -0,0 +1,19 @@ +# ZoomLicense + +Remote info for Zoom license (user type). + +## Example Usage + +```typescript +import { ZoomLicense } from "opal-mcp/models/components"; + +let value: ZoomLicense = { + licenseType: "2", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `licenseType` | *string* | :heavy_check_mark: | The Zoom user type representing the license (e.g. "2" for Licensed). | 2 | \ No newline at end of file diff --git a/docs/models/components/zoomrole.md b/docs/models/components/zoomrole.md new file mode 100644 index 00000000..ea1c785a --- /dev/null +++ b/docs/models/components/zoomrole.md @@ -0,0 +1,19 @@ +# ZoomRole + +Remote info for Zoom role. + +## Example Usage + +```typescript +import { ZoomRole } from "opal-mcp/models/components"; + +let value: ZoomRole = { + roleId: "0", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `roleId` | *string* | :heavy_check_mark: | The ID of the Zoom role. | 0 | \ No newline at end of file diff --git a/docs/models/operations/approverequestrequestbody.md b/docs/models/operations/approverequestrequestbody.md index 2aca0f41..6f650fb8 100644 --- a/docs/models/operations/approverequestrequestbody.md +++ b/docs/models/operations/approverequestrequestbody.md @@ -15,7 +15,7 @@ let value: ApproveRequestRequestBody = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `level` | [operations.Level](../../models/operations/level.md) | :heavy_check_mark: | The decision level for the approval | REGULAR | -| `comment` | *string* | :heavy_minus_sign: | Optional comment for the approval | Approved after security review | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `level` | [components.RequestApprovalEnum](../../models/components/requestapprovalenum.md) | :heavy_check_mark: | The decision level for the approval | REGULAR | +| `comment` | *string* | :heavy_minus_sign: | Optional comment for the approval | Approved after security review | \ No newline at end of file diff --git a/docs/models/operations/approverequestresponse.md b/docs/models/operations/approverequestresponse.md index 162793a6..dd6d9f80 100644 --- a/docs/models/operations/approverequestresponse.md +++ b/docs/models/operations/approverequestresponse.md @@ -18,40 +18,13 @@ let value: ApproveRequestResponse = { status: "DENIED", reason: "I need this resource.", durationMinutes: 1440, - stages: { - requestedRoleName: "Admin", - requestedItemName: "AWS Production Account", - stages: [ - { - stage: 1, - operator: "AND", - reviewers: [ - { - id: "7c86c85d-0651-43e2-a748-d69d658418e8", - status: "PENDING", - }, - ], - }, - { - stage: 2, - operator: "OR", - reviewers: [ - { - id: "8d86c85d-0651-43e2-a748-d69d658418e9", - status: "APPROVED", - }, - ], - }, - ], - }, + reviewerStages: "", }, - taskId: "c6f85bfb-3fe7-4936-a68d-7a5e1e3d0f6a", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.RequestT](../../models/components/requestt.md) | :heavy_minus_sign: | # Request Object
### Description
The `Request` object is used to represent a request.

### Usage Example
Returned from the `GET Requests` endpoint. | {
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"requester_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"status": "pending",
"reason": "I need this resource.",
"duration_minutes": 1440,
"request_comments": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"request_id": "4c86c85d-0651-43e2-a748-d69d658418e8",
"user_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"comment": "This is a comment."
}
],
"stages": {
"requestedRoleName": "Admin",
"requestedItemName": "AWS Production Account",
"stages": [
{
"stage": 1,
"operator": "AND",
"reviewers": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"status": "PENDING"
}
]
},
{
"stage": 2,
"operator": "OR",
"reviewers": [
{
"id": "8d86c85d-0651-43e2-a748-d69d658418e9",
"status": "APPROVED"
}
]
}
]
}
} | -| `taskId` | *string* | :heavy_minus_sign: | ID of the task created for propagating access | c6f85bfb-3fe7-4936-a68d-7a5e1e3d0f6a | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [components.RequestT](../../models/components/requestt.md) | :heavy_minus_sign: | # Request Object
### Description
The `Request` object is used to represent a request.

### Usage Example
Returned from the `GET Requests` endpoint. | {
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"requester_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"status": "pending",
"reason": "I need this resource.",
"duration_minutes": 1440,
"request_comments": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"request_id": "4c86c85d-0651-43e2-a748-d69d658418e8",
"user_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"comment": "This is a comment."
}
],
"reviewer_stages": [
{
"requestedRoleName": "Admin",
"requestedItemName": "AWS Production Account",
"stages": [
{
"stage": 1,
"operator": "AND",
"reviewers": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"status": "PENDING"
}
]
},
{
"stage": 2,
"operator": "OR",
"reviewers": [
{
"id": "8d86c85d-0651-43e2-a748-d69d658418e9",
"status": "APPROVED"
}
]
}
]
}
]
} | \ No newline at end of file diff --git a/docs/models/operations/createidpgroupmappingrequest.md b/docs/models/operations/createidpgroupmappingrequest.md new file mode 100644 index 00000000..c6a6fd42 --- /dev/null +++ b/docs/models/operations/createidpgroupmappingrequest.md @@ -0,0 +1,20 @@ +# CreateIdpGroupMappingRequest + +## Example Usage + +```typescript +import { CreateIdpGroupMappingRequest } from "opal-mcp/models/operations"; + +let value: CreateIdpGroupMappingRequest = { + appResourceId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `appResourceId` | *string* | :heavy_check_mark: | The ID of the Okta app. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `requestBody` | [operations.CreateIdpGroupMappingRequestBody](../../models/operations/createidpgroupmappingrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/createidpgroupmappingrequestbody.md b/docs/models/operations/createidpgroupmappingrequestbody.md new file mode 100644 index 00000000..4b5000bf --- /dev/null +++ b/docs/models/operations/createidpgroupmappingrequestbody.md @@ -0,0 +1,16 @@ +# CreateIdpGroupMappingRequestBody + +## Example Usage + +```typescript +import { CreateIdpGroupMappingRequestBody } from "opal-mcp/models/operations"; + +let value: CreateIdpGroupMappingRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `alias` | *string* | :heavy_minus_sign: | Optional alias for the group mapping | +| `hiddenFromEndUser` | *boolean* | :heavy_minus_sign: | Whether this mapping should be hidden from end users.
- **New mappings**: If not provided, defaults to `false`
- **Existing mappings**: If not provided, existing value is preserved (no change)
- **Explicit values**: If provided, value is updated to the specified boolean
| \ No newline at end of file diff --git a/docs/models/operations/createpaladincontextsourcerequest.md b/docs/models/operations/createpaladincontextsourcerequest.md new file mode 100644 index 00000000..62239fc2 --- /dev/null +++ b/docs/models/operations/createpaladincontextsourcerequest.md @@ -0,0 +1,24 @@ +# CreatePaladinContextSourceRequest + +## Example Usage + +```typescript +import { CreatePaladinContextSourceRequest } from "opal-mcp/models/operations"; + +let value: CreatePaladinContextSourceRequest = { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + createPaladinContextSourceInfo: { + sourceKind: "SLACK_CHANNEL", + thirdPartyProvider: "SLACK", + remoteId: "C0123456789", + name: "#access-requests", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `paladinId` | *string* | :heavy_check_mark: | The ID of the Paladin. | 32acc112-21ff-4669-91c2-21e27683eaa1 | +| `createPaladinContextSourceInfo` | [components.CreatePaladinContextSourceInfo](../../models/components/createpaladincontextsourceinfo.md) | :heavy_check_mark: | N/A | {
"source_kind": "SLACK_CHANNEL",
"third_party_provider": "SLACK",
"remote_id": "C0123456789",
"name": "#access-requests"
} | \ No newline at end of file diff --git a/docs/models/operations/createrequestcommentrequest.md b/docs/models/operations/createrequestcommentrequest.md new file mode 100644 index 00000000..fb20f377 --- /dev/null +++ b/docs/models/operations/createrequestcommentrequest.md @@ -0,0 +1,22 @@ +# CreateRequestCommentRequest + +## Example Usage + +```typescript +import { CreateRequestCommentRequest } from "opal-mcp/models/operations"; + +let value: CreateRequestCommentRequest = { + id: "9041c256-1591-47de-a70d-c7b1c2a85359", + requestBody: { + comment: + "New range of formal shirts are designed keeping you in mind. With fits and styling that will make you stand apart", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the request to comment on | +| `requestBody` | [operations.CreateRequestCommentRequestBody](../../models/operations/createrequestcommentrequestbody.md) | :heavy_check_mark: | Comment parameters | \ No newline at end of file diff --git a/docs/models/operations/createrequestcommentrequestbody.md b/docs/models/operations/createrequestcommentrequestbody.md new file mode 100644 index 00000000..3aec6ab0 --- /dev/null +++ b/docs/models/operations/createrequestcommentrequestbody.md @@ -0,0 +1,20 @@ +# CreateRequestCommentRequestBody + +Comment parameters + +## Example Usage + +```typescript +import { CreateRequestCommentRequestBody } from "opal-mcp/models/operations"; + +let value: CreateRequestCommentRequestBody = { + comment: + "The Nagasaki Lander is the trademarked name of several series of Nagasaki sport bikes, that started with the 1984 ABC800J", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `comment` | *string* | :heavy_check_mark: | comment | \ No newline at end of file diff --git a/docs/models/operations/createrequestcommentresponse.md b/docs/models/operations/createrequestcommentresponse.md new file mode 100644 index 00000000..35014a22 --- /dev/null +++ b/docs/models/operations/createrequestcommentresponse.md @@ -0,0 +1,30 @@ +# CreateRequestCommentResponse + +Request successfully commented + +## Example Usage + +```typescript +import { CreateRequestCommentResponse } from "opal-mcp/models/operations"; + +let value: CreateRequestCommentResponse = { + request: { + id: "7c86c85d-0651-43e2-a748-d69d658418e8", + createdAt: new Date("2021-01-06T20:00:00Z"), + updatedAt: new Date("2021-01-06T20:00:00Z"), + requesterId: "c86c85d-0651-43e2-a748-d69d658418e8", + targetUserId: "r86c85d-0651-43e2-a748-d69d658418e8", + targetGroupId: "r86c85d-0651-43e2-a748-d69d658418e8", + status: "PENDING", + reason: "I need this resource.", + durationMinutes: 1440, + reviewerStages: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [components.RequestT](../../models/components/requestt.md) | :heavy_minus_sign: | # Request Object
### Description
The `Request` object is used to represent a request.

### Usage Example
Returned from the `GET Requests` endpoint. | {
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"requester_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"status": "pending",
"reason": "I need this resource.",
"duration_minutes": 1440,
"request_comments": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"request_id": "4c86c85d-0651-43e2-a748-d69d658418e8",
"user_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"comment": "This is a comment."
}
],
"reviewer_stages": [
{
"requestedRoleName": "Admin",
"requestedItemName": "AWS Production Account",
"stages": [
{
"stage": 1,
"operator": "AND",
"reviewers": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"status": "PENDING"
}
]
},
{
"stage": 2,
"operator": "OR",
"reviewers": [
{
"id": "8d86c85d-0651-43e2-a748-d69d658418e9",
"status": "APPROVED"
}
]
}
]
}
]
} | \ No newline at end of file diff --git a/docs/models/operations/deletedelegationrequest.md b/docs/models/operations/deletedelegationrequest.md new file mode 100644 index 00000000..3f3b2c3c --- /dev/null +++ b/docs/models/operations/deletedelegationrequest.md @@ -0,0 +1,17 @@ +# DeleteDelegationRequest + +## Example Usage + +```typescript +import { DeleteDelegationRequest } from "opal-mcp/models/operations"; + +let value: DeleteDelegationRequest = { + delegationId: "32acc112-21ff-4669-91c2-21e27683eaa1", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `delegationId` | *string* | :heavy_check_mark: | The ID of the delegation to remove. | 32acc112-21ff-4669-91c2-21e27683eaa1 | \ No newline at end of file diff --git a/docs/models/operations/deleteeventstreamrequest.md b/docs/models/operations/deleteeventstreamrequest.md new file mode 100644 index 00000000..f72cc3a7 --- /dev/null +++ b/docs/models/operations/deleteeventstreamrequest.md @@ -0,0 +1,17 @@ +# DeleteEventStreamRequest + +## Example Usage + +```typescript +import { DeleteEventStreamRequest } from "opal-mcp/models/operations"; + +let value: DeleteEventStreamRequest = { + eventStreamId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `eventStreamId` | *string* | :heavy_check_mark: | The ID of the event stream. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | \ No newline at end of file diff --git a/docs/models/operations/deletepaladincontextsourcerequest.md b/docs/models/operations/deletepaladincontextsourcerequest.md new file mode 100644 index 00000000..083b2a81 --- /dev/null +++ b/docs/models/operations/deletepaladincontextsourcerequest.md @@ -0,0 +1,19 @@ +# DeletePaladinContextSourceRequest + +## Example Usage + +```typescript +import { DeletePaladinContextSourceRequest } from "opal-mcp/models/operations"; + +let value: DeletePaladinContextSourceRequest = { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + contextSourceId: "8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `paladinId` | *string* | :heavy_check_mark: | The ID of the Paladin. | 32acc112-21ff-4669-91c2-21e27683eaa1 | +| `contextSourceId` | *string* | :heavy_check_mark: | The ID of the context source. | 8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8 | \ No newline at end of file diff --git a/docs/models/operations/deletepaladinrequest.md b/docs/models/operations/deletepaladinrequest.md new file mode 100644 index 00000000..cd9e6f88 --- /dev/null +++ b/docs/models/operations/deletepaladinrequest.md @@ -0,0 +1,17 @@ +# DeletePaladinRequest + +## Example Usage + +```typescript +import { DeletePaladinRequest } from "opal-mcp/models/operations"; + +let value: DeletePaladinRequest = { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `paladinId` | *string* | :heavy_check_mark: | The ID of the Paladin. | 32acc112-21ff-4669-91c2-21e27683eaa1 | \ No newline at end of file diff --git a/docs/models/operations/deletetokenrequest.md b/docs/models/operations/deletetokenrequest.md new file mode 100644 index 00000000..cf303d9f --- /dev/null +++ b/docs/models/operations/deletetokenrequest.md @@ -0,0 +1,17 @@ +# DeleteTokenRequest + +## Example Usage + +```typescript +import { DeleteTokenRequest } from "opal-mcp/models/operations"; + +let value: DeleteTokenRequest = { + tokenId: "f454d283-ca87-4a8a-bdbb-df212eca5353", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `tokenId` | *string* | :heavy_check_mark: | The ID of the token to delete. | f454d283-ca87-4a8a-bdbb-df212eca5353 | \ No newline at end of file diff --git a/docs/models/operations/denyrequestrequest.md b/docs/models/operations/denyrequestrequest.md new file mode 100644 index 00000000..e422b6d0 --- /dev/null +++ b/docs/models/operations/denyrequestrequest.md @@ -0,0 +1,22 @@ +# DenyRequestRequest + +## Example Usage + +```typescript +import { DenyRequestRequest } from "opal-mcp/models/operations"; + +let value: DenyRequestRequest = { + id: "4a244a1a-389e-4a44-8b66-0fbe2244d954", + requestBody: { + comment: "Denied due to insufficient justification", + level: "REGULAR", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the request to deny | +| `requestBody` | [operations.DenyRequestRequestBody](../../models/operations/denyrequestrequestbody.md) | :heavy_check_mark: | Denial parameters | \ No newline at end of file diff --git a/docs/models/operations/denyrequestrequestbody.md b/docs/models/operations/denyrequestrequestbody.md new file mode 100644 index 00000000..4ac93e4d --- /dev/null +++ b/docs/models/operations/denyrequestrequestbody.md @@ -0,0 +1,21 @@ +# DenyRequestRequestBody + +Denial parameters + +## Example Usage + +```typescript +import { DenyRequestRequestBody } from "opal-mcp/models/operations"; + +let value: DenyRequestRequestBody = { + comment: "Denied due to insufficient justification", + level: "REGULAR", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `comment` | *string* | :heavy_check_mark: | Comment for the denial | Denied due to insufficient justification | +| `level` | [components.RequestApprovalEnum](../../models/components/requestapprovalenum.md) | :heavy_minus_sign: | The decision level for the approval | REGULAR | \ No newline at end of file diff --git a/docs/models/operations/denyrequestresponse.md b/docs/models/operations/denyrequestresponse.md new file mode 100644 index 00000000..1bbd69d0 --- /dev/null +++ b/docs/models/operations/denyrequestresponse.md @@ -0,0 +1,30 @@ +# DenyRequestResponse + +Request successfully denied + +## Example Usage + +```typescript +import { DenyRequestResponse } from "opal-mcp/models/operations"; + +let value: DenyRequestResponse = { + request: { + id: "7c86c85d-0651-43e2-a748-d69d658418e8", + createdAt: new Date("2021-01-06T20:00:00Z"), + updatedAt: new Date("2021-01-06T20:00:00Z"), + requesterId: "c86c85d-0651-43e2-a748-d69d658418e8", + targetUserId: "r86c85d-0651-43e2-a748-d69d658418e8", + targetGroupId: "r86c85d-0651-43e2-a748-d69d658418e8", + status: "PENDING", + reason: "I need this resource.", + durationMinutes: 1440, + reviewerStages: [], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [components.RequestT](../../models/components/requestt.md) | :heavy_minus_sign: | # Request Object
### Description
The `Request` object is used to represent a request.

### Usage Example
Returned from the `GET Requests` endpoint. | {
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"requester_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"target_user_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"target_group_id": "r86c85d-0651-43e2-a748-d69d658418e8",
"status": "pending",
"reason": "I need this resource.",
"duration_minutes": 1440,
"request_comments": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"created_at": "2021-01-06T20:00:00Z",
"updated_at": "2021-01-06T20:00:00Z",
"request_id": "4c86c85d-0651-43e2-a748-d69d658418e8",
"user_id": "c86c85d-0651-43e2-a748-d69d658418e8",
"comment": "This is a comment."
}
],
"reviewer_stages": [
{
"requestedRoleName": "Admin",
"requestedItemName": "AWS Production Account",
"stages": [
{
"stage": 1,
"operator": "AND",
"reviewers": [
{
"id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"status": "PENDING"
}
]
},
{
"stage": 2,
"operator": "OR",
"reviewers": [
{
"id": "8d86c85d-0651-43e2-a748-d69d658418e9",
"status": "APPROVED"
}
]
}
]
}
]
} | \ No newline at end of file diff --git a/docs/models/operations/endcampaignrequest.md b/docs/models/operations/endcampaignrequest.md new file mode 100644 index 00000000..00c05009 --- /dev/null +++ b/docs/models/operations/endcampaignrequest.md @@ -0,0 +1,17 @@ +# EndCampaignRequest + +## Example Usage + +```typescript +import { EndCampaignRequest } from "opal-mcp/models/operations"; + +let value: EndCampaignRequest = { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `campaignId` | *string* | :heavy_check_mark: | The ID of the campaign. | f454d283-ca87-4a8a-bdbb-df212eca5353 | \ No newline at end of file diff --git a/docs/models/operations/getaccessrulesrequest.md b/docs/models/operations/getaccessrulesrequest.md new file mode 100644 index 00000000..a80e9754 --- /dev/null +++ b/docs/models/operations/getaccessrulesrequest.md @@ -0,0 +1,19 @@ +# GetAccessRulesRequest + +## Example Usage + +```typescript +import { GetAccessRulesRequest } from "opal-mcp/models/operations"; + +let value: GetAccessRulesRequest = { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | \ No newline at end of file diff --git a/docs/models/operations/getcampaignrequest.md b/docs/models/operations/getcampaignrequest.md new file mode 100644 index 00000000..49f75a62 --- /dev/null +++ b/docs/models/operations/getcampaignrequest.md @@ -0,0 +1,17 @@ +# GetCampaignRequest + +## Example Usage + +```typescript +import { GetCampaignRequest } from "opal-mcp/models/operations"; + +let value: GetCampaignRequest = { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `campaignId` | *string* | :heavy_check_mark: | The ID of the campaign. | f454d283-ca87-4a8a-bdbb-df212eca5353 | \ No newline at end of file diff --git a/docs/models/operations/getcampaignsrequest.md b/docs/models/operations/getcampaignsrequest.md new file mode 100644 index 00000000..773bfe2d --- /dev/null +++ b/docs/models/operations/getcampaignsrequest.md @@ -0,0 +1,39 @@ +# GetCampaignsRequest + +## Example Usage + +```typescript +import { GetCampaignsRequest } from "opal-mcp/models/operations"; + +let value: GetCampaignsRequest = { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + name: "Q3 Access Review", + status: "ONGOING", + createdAtAfter: new Date("2026-01-01T00:00:00Z"), + createdAtBefore: new Date("2026-12-31T23:59:59Z"), + startedAtAfter: new Date("2026-01-01T00:00:00Z"), + startedAtBefore: new Date("2026-12-31T23:59:59Z"), + endedAtAfter: new Date("2026-01-01T00:00:00Z"), + endedAtBefore: new Date("2026-12-31T23:59:59Z"), + stoppedAtAfter: new Date("2026-01-01T00:00:00Z"), + stoppedAtBefore: new Date("2026-12-31T23:59:59Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | +| `name` | *string* | :heavy_minus_sign: | Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). | Q3 Access Review | +| `status` | [components.CampaignStatusEnum](../../models/components/campaignstatusenum.md) | :heavy_minus_sign: | Filter by campaign status. Status is derived from lifecycle timestamps and review progress. | ONGOING | +| `createdAtAfter` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Include campaigns created after this timestamp (exclusive). ISO 8601 format. | 2026-01-01 00:00:00 +0000 UTC | +| `createdAtBefore` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Include campaigns created before this timestamp (exclusive). ISO 8601 format. | 2026-12-31 23:59:59 +0000 UTC | +| `startedAtAfter` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Include campaigns started after this timestamp (exclusive). ISO 8601 format. | 2026-01-01 00:00:00 +0000 UTC | +| `startedAtBefore` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Include campaigns started before this timestamp (exclusive). ISO 8601 format. | 2026-12-31 23:59:59 +0000 UTC | +| `endedAtAfter` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Include campaigns ended after this timestamp (exclusive). ISO 8601 format. | 2026-01-01 00:00:00 +0000 UTC | +| `endedAtBefore` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Include campaigns ended before this timestamp (exclusive). ISO 8601 format. | 2026-12-31 23:59:59 +0000 UTC | +| `stoppedAtAfter` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. | 2026-01-01 00:00:00 +0000 UTC | +| `stoppedAtBefore` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. | 2026-12-31 23:59:59 +0000 UTC | \ No newline at end of file diff --git a/docs/models/operations/getdelegationrequest.md b/docs/models/operations/getdelegationrequest.md new file mode 100644 index 00000000..39244599 --- /dev/null +++ b/docs/models/operations/getdelegationrequest.md @@ -0,0 +1,17 @@ +# GetDelegationRequest + +## Example Usage + +```typescript +import { GetDelegationRequest } from "opal-mcp/models/operations"; + +let value: GetDelegationRequest = { + delegationId: "32acc112-21ff-4669-91c2-21e27683eaa1", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `delegationId` | *string* | :heavy_check_mark: | The ID of the delegation to retrieve. | 32acc112-21ff-4669-91c2-21e27683eaa1 | \ No newline at end of file diff --git a/docs/models/operations/getdelegationsrequest.md b/docs/models/operations/getdelegationsrequest.md new file mode 100644 index 00000000..884f4127 --- /dev/null +++ b/docs/models/operations/getdelegationsrequest.md @@ -0,0 +1,23 @@ +# GetDelegationsRequest + +## Example Usage + +```typescript +import { GetDelegationsRequest } from "opal-mcp/models/operations"; + +let value: GetDelegationsRequest = { + delegatorUserId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + delegateUserId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `delegatorUserId` | *string* | :heavy_minus_sign: | The delegator user ID to filter delegations by the user delegating their access review requests. | 29827fb8-f2dd-4e80-9576-28e31e9934ac | +| `delegateUserId` | *string* | :heavy_minus_sign: | The delegate user ID to filter delegations by the user being delegated to. | 29827fb8-f2dd-4e80-9576-28e31e9934ac | +| `cursor` | *string* | :heavy_minus_sign: | A cursor to indicate where to start fetching results. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | The maximum number of results to return per page. The default is 200. | 200 | \ No newline at end of file diff --git a/docs/models/operations/geteventrequest.md b/docs/models/operations/geteventrequest.md new file mode 100644 index 00000000..8148f5ec --- /dev/null +++ b/docs/models/operations/geteventrequest.md @@ -0,0 +1,17 @@ +# GetEventRequest + +## Example Usage + +```typescript +import { GetEventRequest } from "opal-mcp/models/operations"; + +let value: GetEventRequest = { + eventId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `eventId` | *string* | :heavy_check_mark: | The ID of the event. | 29827fb8-f2dd-4e80-9576-28e31e9934ac | \ No newline at end of file diff --git a/docs/models/operations/getgroupcontaininggroupsrequest.md b/docs/models/operations/getgroupcontaininggroupsrequest.md index ebbfd1ca..c5f30901 100644 --- a/docs/models/operations/getgroupcontaininggroupsrequest.md +++ b/docs/models/operations/getgroupcontaininggroupsrequest.md @@ -7,11 +7,13 @@ import { GetGroupContainingGroupsRequest } from "opal-mcp/models/operations"; let value: GetGroupContainingGroupsRequest = { groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + accessLevelRemoteId: "arn:aws:iam::590304332660:role/AdministratorAccess", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | The access level's remote ID to filter by. | arn:aws:iam::590304332660:role/AdministratorAccess | \ No newline at end of file diff --git a/docs/models/operations/getgroupsrequest.md b/docs/models/operations/getgroupsrequest.md index d24b4952..97623bae 100644 --- a/docs/models/operations/getgroupsrequest.md +++ b/docs/models/operations/getgroupsrequest.md @@ -19,10 +19,11 @@ let value: GetGroupsRequest = { ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | -| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | -| `groupTypeFilter` | [components.GroupTypeEnum](../../models/components/grouptypeenum.md) | :heavy_minus_sign: | The group type to filter by. | OPAL_GROUP | -| `groupIds` | *string*[] | :heavy_minus_sign: | The group ids to filter by. | [
"4baf8423-db0a-4037-a4cf-f79c60cb67a5",
"1b978423-db0a-4037-a4cf-f79c60cb67b3"
] | -| `groupName` | *string* | :heavy_minus_sign: | Group name. | example-name | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | +| `groupTypeFilter` | [components.GroupTypeEnum](../../models/components/grouptypeenum.md) | :heavy_minus_sign: | The group type to filter by. | OPAL_GROUP | +| `groupIds` | *string*[] | :heavy_minus_sign: | The group ids to filter by. | [
"4baf8423-db0a-4037-a4cf-f79c60cb67a5",
"1b978423-db0a-4037-a4cf-f79c60cb67b3"
] | +| `groupName` | *string* | :heavy_minus_sign: | Group name. | example-name | +| `tagIds` | *string*[] | :heavy_minus_sign: | The IDs of the tags to filter by. Returns only groups that have any of these tags applied. | | \ No newline at end of file diff --git a/docs/models/operations/getgroupsresponse.md b/docs/models/operations/getgroupsresponse.md index a2194fba..cf5b5da8 100644 --- a/docs/models/operations/getgroupsresponse.md +++ b/docs/models/operations/getgroupsresponse.md @@ -13,21 +13,46 @@ let value: GetGroupsResponse = { { groupId: "f454d283-ca87-4a8a-bdbb-df212eca5353", appId: "b5a5ca27-0ea3-4d86-9199-2126d57d1fbd", + name: "Payments Production Admin", description: "This group represents Active Directory group \"Payments Production Admin\". We use this AD group to facilitate staging deployments and qualifying new releases.", adminOwnerId: "7c86c85d-0651-43e2-a748-d69d658418e8", + groupLeaderUserIds: [ + "7c86c85d-0651-43e2-a748-d69d658418e8", + ], + remoteId: "037m2jsg218b2wb", + remoteName: "Finance Team", + groupType: "ACTIVE_DIRECTORY_GROUP", maxDuration: 120, + recommendedDuration: 60, + extensionsDurationInMinutes: 60, requireManagerApproval: false, requireSupportTicket: false, + requireMfaToApprove: false, + requireMfaToRequest: false, + autoApproval: false, + isRequestable: true, }, { groupId: "99d0b81d-14be-4cf6-bd27-348b4af1d11b", + appId: "a7c3e291-1234-4abc-9def-1234567890ab", + name: "Integrations On-Call", description: "Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.", adminOwnerId: "4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3", + groupLeaderUserIds: [], + remoteId: "pagerduty-schedule:P123XYZ", + remoteName: "Integrations On-Call", + groupType: "PAGERDUTY_ON_CALL_SCHEDULE", maxDuration: 360, + recommendedDuration: 120, + extensionsDurationInMinutes: 0, requireManagerApproval: false, requireSupportTicket: true, + requireMfaToApprove: false, + requireMfaToRequest: false, + autoApproval: false, + isRequestable: true, }, ], }, @@ -36,6 +61,6 @@ let value: GetGroupsResponse = { ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `result` | [components.PaginatedGroupsList](../../models/components/paginatedgroupslist.md) | :heavy_check_mark: | N/A | {
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"group_id": "f454d283-ca87-4a8a-bdbb-df212eca5353",
"app_id": "b5a5ca27-0ea3-4d86-9199-2126d57d1fbd",
"description": "This group represents Active Directory group \"Payments Production Admin\". We use this AD group to facilitate staging deployments and qualifying new releases.",
"admin_owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"max_duration": 120,
"require_manager_approval": false,
"require_support_ticket": false
},
{
"group_id": "99d0b81d-14be-4cf6-bd27-348b4af1d11b",
"description": "Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.",
"admin_owner_id": "4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3",
"max_duration": 360,
"require_manager_approval": false,
"require_support_ticket": true
}
]
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `result` | [components.PaginatedGroupsList](../../models/components/paginatedgroupslist.md) | :heavy_check_mark: | N/A | {
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"group_id": "f454d283-ca87-4a8a-bdbb-df212eca5353",
"app_id": "b5a5ca27-0ea3-4d86-9199-2126d57d1fbd",
"name": "Payments Production Admin",
"description": "This group represents Active Directory group \"Payments Production Admin\". We use this AD group to facilitate staging deployments and qualifying new releases.",
"admin_owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"group_leader_user_ids": [
"7c86c85d-0651-43e2-a748-d69d658418e8"
],
"remote_id": "037m2jsg218b2wb",
"remote_name": "Finance Team",
"group_type": "ACTIVE_DIRECTORY_GROUP",
"max_duration": 120,
"recommended_duration": 60,
"extensions_duration_in_minutes": 60,
"require_manager_approval": false,
"require_support_ticket": false,
"require_mfa_to_approve": false,
"require_mfa_to_request": false,
"auto_approval": false,
"is_requestable": true
},
{
"group_id": "99d0b81d-14be-4cf6-bd27-348b4af1d11b",
"app_id": "a7c3e291-1234-4abc-9def-1234567890ab",
"name": "Integrations On-Call",
"description": "Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.",
"admin_owner_id": "4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3",
"group_leader_user_ids": [],
"remote_id": "pagerduty-schedule:P123XYZ",
"remote_name": "Integrations On-Call",
"group_type": "PAGERDUTY_ON_CALL_SCHEDULE",
"max_duration": 360,
"recommended_duration": 120,
"extensions_duration_in_minutes": 0,
"require_manager_approval": false,
"require_support_ticket": true,
"require_mfa_to_approve": false,
"require_mfa_to_request": false,
"auto_approval": false,
"is_requestable": true
}
]
} | \ No newline at end of file diff --git a/docs/models/operations/getgroupusersrequest.md b/docs/models/operations/getgroupusersrequest.md index 6ba47800..c20a5b66 100644 --- a/docs/models/operations/getgroupusersrequest.md +++ b/docs/models/operations/getgroupusersrequest.md @@ -7,11 +7,15 @@ import { GetGroupUsersRequest } from "opal-mcp/models/operations"; let value: GetGroupUsersRequest = { groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`. | 200 | \ No newline at end of file diff --git a/docs/models/operations/getidpgroupmappingrequest.md b/docs/models/operations/getidpgroupmappingrequest.md new file mode 100644 index 00000000..dd7436d8 --- /dev/null +++ b/docs/models/operations/getidpgroupmappingrequest.md @@ -0,0 +1,19 @@ +# GetIdpGroupMappingRequest + +## Example Usage + +```typescript +import { GetIdpGroupMappingRequest } from "opal-mcp/models/operations"; + +let value: GetIdpGroupMappingRequest = { + appResourceId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `appResourceId` | *string* | :heavy_check_mark: | The ID of the Okta app. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | \ No newline at end of file diff --git a/docs/models/operations/getpaladinfromnamerequest.md b/docs/models/operations/getpaladinfromnamerequest.md new file mode 100644 index 00000000..ee569c8c --- /dev/null +++ b/docs/models/operations/getpaladinfromnamerequest.md @@ -0,0 +1,17 @@ +# GetPaladinFromNameRequest + +## Example Usage + +```typescript +import { GetPaladinFromNameRequest } from "opal-mcp/models/operations"; + +let value: GetPaladinFromNameRequest = { + paladinName: "paladin-agent-1", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `paladinName` | *string* | :heavy_check_mark: | The name of the Paladin. | paladin-agent-1 | \ No newline at end of file diff --git a/docs/models/operations/getpaladinrequest.md b/docs/models/operations/getpaladinrequest.md new file mode 100644 index 00000000..b96ce7be --- /dev/null +++ b/docs/models/operations/getpaladinrequest.md @@ -0,0 +1,17 @@ +# GetPaladinRequest + +## Example Usage + +```typescript +import { GetPaladinRequest } from "opal-mcp/models/operations"; + +let value: GetPaladinRequest = { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `paladinId` | *string* | :heavy_check_mark: | The ID of the Paladin. | 32acc112-21ff-4669-91c2-21e27683eaa1 | \ No newline at end of file diff --git a/docs/models/operations/getremoteusersrequest.md b/docs/models/operations/getremoteusersrequest.md new file mode 100644 index 00000000..005848d4 --- /dev/null +++ b/docs/models/operations/getremoteusersrequest.md @@ -0,0 +1,31 @@ +# GetRemoteUsersRequest + +## Example Usage + +```typescript +import { GetRemoteUsersRequest } from "opal-mcp/models/operations"; + +let value: GetRemoteUsersRequest = { + thirdPartyProvider: [ + "GIT_HUB", + ], + userId: [ + "32acc112-21ff-4669-91c2-21e27683eaa1", + ], + remoteId: [ + "1234567890", + ], + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `thirdPartyProvider` | [components.ThirdPartyProviderEnum](../../models/components/thirdpartyproviderenum.md)[] | :heavy_minus_sign: | Filter remote users by their third party provider. | [
"GIT_HUB"
] | +| `userId` | *string*[] | :heavy_minus_sign: | Filter remote users by their user ID. | [
"32acc112-21ff-4669-91c2-21e27683eaa1"
] | +| `remoteId` | *string*[] | :heavy_minus_sign: | Filter remote users by their remote ID. | [
1234567890
] | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | \ No newline at end of file diff --git a/docs/models/operations/getrequestcommentsrequest.md b/docs/models/operations/getrequestcommentsrequest.md new file mode 100644 index 00000000..2187e955 --- /dev/null +++ b/docs/models/operations/getrequestcommentsrequest.md @@ -0,0 +1,17 @@ +# GetRequestCommentsRequest + +## Example Usage + +```typescript +import { GetRequestCommentsRequest } from "opal-mcp/models/operations"; + +let value: GetRequestCommentsRequest = { + id: "cc4736d2-191a-410a-a3dc-851eb2462f1e", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the request to get comments for | \ No newline at end of file diff --git a/docs/models/operations/getrequestsrequest.md b/docs/models/operations/getrequestsrequest.md index fdeaa579..cc46d614 100644 --- a/docs/models/operations/getrequestsrequest.md +++ b/docs/models/operations/getrequestsrequest.md @@ -6,6 +6,10 @@ import { GetRequestsRequest } from "opal-mcp/models/operations"; let value: GetRequestsRequest = { + requesterId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + targetUserId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + resourceId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + groupId: "37cb7e41-12ba-46da-92ff-030abe0450b1", cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", pageSize: 200, }; @@ -17,6 +21,10 @@ let value: GetRequestsRequest = { | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | | `startDateFilter` | *string* | :heavy_minus_sign: | A start date filter for the events. | | | `endDateFilter` | *string* | :heavy_minus_sign: | An end date filter for the events. | | +| `requesterId` | *string* | :heavy_minus_sign: | Filter requests by their requester ID. | 37cb7e41-12ba-46da-92ff-030abe0450b1 | +| `targetUserId` | *string* | :heavy_minus_sign: | Filter requests by their target user ID. | 37cb7e41-12ba-46da-92ff-030abe0450b1 | +| `resourceId` | *string* | :heavy_minus_sign: | Filter requests by the resource ID that was requested. | 37cb7e41-12ba-46da-92ff-030abe0450b1 | +| `groupId` | *string* | :heavy_minus_sign: | Filter requests by the group ID that was requested. | 37cb7e41-12ba-46da-92ff-030abe0450b1 | | `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | | `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | | `showPendingOnly` | *boolean* | :heavy_minus_sign: | Boolean toggle for if it should only show pending requests. | | \ No newline at end of file diff --git a/docs/models/operations/getresourcegroupsrequest.md b/docs/models/operations/getresourcegroupsrequest.md new file mode 100644 index 00000000..19462521 --- /dev/null +++ b/docs/models/operations/getresourcegroupsrequest.md @@ -0,0 +1,17 @@ +# GetResourceGroupsRequest + +## Example Usage + +```typescript +import { GetResourceGroupsRequest } from "opal-mcp/models/operations"; + +let value: GetResourceGroupsRequest = { + resourceId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `resourceId` | *string* | :heavy_check_mark: | The ID of the resource that the groups grant access to. | 1b978423-db0a-4037-a4cf-f79c60cb67b3 | \ No newline at end of file diff --git a/docs/models/operations/getresourcesrequest.md b/docs/models/operations/getresourcesrequest.md index 72e135d2..b91e2b9d 100644 --- a/docs/models/operations/getresourcesrequest.md +++ b/docs/models/operations/getresourcesrequest.md @@ -21,12 +21,14 @@ let value: GetResourcesRequest = { ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | -| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | -| `resourceTypeFilter` | [components.ResourceTypeEnum](../../models/components/resourcetypeenum.md) | :heavy_minus_sign: | The resource type to filter by. | AWS_IAM_ROLE | -| `resourceIds` | *string*[] | :heavy_minus_sign: | The resource ids to filter by. | [
"4baf8423-db0a-4037-a4cf-f79c60cb67a5",
"1b978423-db0a-4037-a4cf-f79c60cb67b3"
] | -| `resourceName` | *string* | :heavy_minus_sign: | Resource name. | example-name | -| `parentResourceId` | *string* | :heavy_minus_sign: | The parent resource id to filter by. | [
"4baf8423-db0a-4037-a4cf-f79c60cb67a5"
] | -| `ancestorResourceId` | *string* | :heavy_minus_sign: | The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. | [
"4baf8423-db0a-4037-a4cf-f79c60cb67a5"
] | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | +| `resourceTypeFilter` | [components.ResourceTypeEnum](../../models/components/resourcetypeenum.md) | :heavy_minus_sign: | The resource type to filter by. Required when remote_id is provided. | AWS_IAM_ROLE | +| `resourceIds` | *string*[] | :heavy_minus_sign: | The resource ids to filter by. | [
"4baf8423-db0a-4037-a4cf-f79c60cb67a5",
"1b978423-db0a-4037-a4cf-f79c60cb67b3"
] | +| `resourceName` | *string* | :heavy_minus_sign: | Resource name. | example-name | +| `parentResourceId` | *string* | :heavy_minus_sign: | The parent resource id to filter by. | [
"4baf8423-db0a-4037-a4cf-f79c60cb67a5"
] | +| `ancestorResourceId` | *string* | :heavy_minus_sign: | The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. | [
"4baf8423-db0a-4037-a4cf-f79c60cb67a5"
] | +| `remoteId` | *string* | :heavy_minus_sign: | Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. | | +| `tagIds` | *string*[] | :heavy_minus_sign: | The IDs of the tags to filter by. Returns only resources that have any of these tags applied. | | \ No newline at end of file diff --git a/docs/models/operations/gettokensrequest.md b/docs/models/operations/gettokensrequest.md new file mode 100644 index 00000000..231129fb --- /dev/null +++ b/docs/models/operations/gettokensrequest.md @@ -0,0 +1,22 @@ +# GetTokensRequest + +## Example Usage + +```typescript +import { GetTokensRequest } from "opal-mcp/models/operations"; + +let value: GetTokensRequest = { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + userId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | +| `tokenIds` | *string*[] | :heavy_minus_sign: | Filter by token IDs. | | +| `userId` | *string* | :heavy_minus_sign: | Filter by user ID. | 29827fb8-f2dd-4e80-9576-28e31e9934ac | \ No newline at end of file diff --git a/docs/models/operations/getuarsresponse.md b/docs/models/operations/getuarsresponse.md index 888f6a72..5a773d7c 100644 --- a/docs/models/operations/getuarsresponse.md +++ b/docs/models/operations/getuarsresponse.md @@ -18,6 +18,7 @@ let value: GetUARsResponse = { deadline: new Date("2022-07-14T06:59:59Z"), timeZone: "America/Los_Angeles", selfReviewAllowed: false, + instantlyActionReviews: false, uarScope: { admins: [ "f454d283-ca87-4a8a-bdbb-df212eca5353", @@ -43,6 +44,7 @@ let value: GetUARsResponse = { deadline: new Date("2022-08-14T06:59:59Z"), timeZone: "America/Los_Angeles", selfReviewAllowed: false, + instantlyActionReviews: false, uarScope: { admins: [ "f454d283-ca87-4a8a-bdbb-df212eca5353", diff --git a/docs/models/operations/getusergroupsrequest.md b/docs/models/operations/getusergroupsrequest.md new file mode 100644 index 00000000..1360566f --- /dev/null +++ b/docs/models/operations/getusergroupsrequest.md @@ -0,0 +1,21 @@ +# GetUserGroupsRequest + +## Example Usage + +```typescript +import { GetUserGroupsRequest } from "opal-mcp/models/operations"; + +let value: GetUserGroupsRequest = { + userId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user whose groups to return. | 1b978423-db0a-4037-a4cf-f79c60cb67b3 | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | \ No newline at end of file diff --git a/docs/models/operations/getuserresourcesrequest.md b/docs/models/operations/getuserresourcesrequest.md new file mode 100644 index 00000000..1f6eeb73 --- /dev/null +++ b/docs/models/operations/getuserresourcesrequest.md @@ -0,0 +1,23 @@ +# GetUserResourcesRequest + +## Example Usage + +```typescript +import { GetUserResourcesRequest } from "opal-mcp/models/operations"; + +let value: GetUserResourcesRequest = { + userId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + limit: 200, + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + includeUnmanaged: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `limit` | *number* | :heavy_minus_sign: | Limit the number of results returned. | 200 | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `includeUnmanaged` | *boolean* | :heavy_minus_sign: | Include user's access to unmanaged resources. | false | \ No newline at end of file diff --git a/docs/models/operations/getusersrequest.md b/docs/models/operations/getusersrequest.md index de36d22d..f48729d4 100644 --- a/docs/models/operations/getusersrequest.md +++ b/docs/models/operations/getusersrequest.md @@ -13,7 +13,8 @@ let value: GetUsersRequest = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | -| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `cursor` | *string* | :heavy_minus_sign: | The pagination cursor value. | cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw | +| `pageSize` | *number* | :heavy_minus_sign: | Number of results to return per page. Default is 200. | 200 | +| `tagIds` | *string*[] | :heavy_minus_sign: | The IDs of the tags to filter by. Returns only users that have any of these tags applied. | | \ No newline at end of file diff --git a/docs/models/operations/level.md b/docs/models/operations/level.md deleted file mode 100644 index 7059a497..00000000 --- a/docs/models/operations/level.md +++ /dev/null @@ -1,17 +0,0 @@ -# Level - -The decision level for the approval - -## Example Usage - -```typescript -import { Level } from "opal-mcp/models/operations"; - -let value: Level = "REGULAR"; -``` - -## Values - -```typescript -"REGULAR" | "ADMIN" -``` \ No newline at end of file diff --git a/docs/models/operations/listpaladincontextsourcesrequest.md b/docs/models/operations/listpaladincontextsourcesrequest.md new file mode 100644 index 00000000..1395197e --- /dev/null +++ b/docs/models/operations/listpaladincontextsourcesrequest.md @@ -0,0 +1,17 @@ +# ListPaladinContextSourcesRequest + +## Example Usage + +```typescript +import { ListPaladinContextSourcesRequest } from "opal-mcp/models/operations"; + +let value: ListPaladinContextSourcesRequest = { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `paladinId` | *string* | :heavy_check_mark: | The ID of the Paladin. | 32acc112-21ff-4669-91c2-21e27683eaa1 | \ No newline at end of file diff --git a/docs/models/operations/removegroupcontaininggrouprequest.md b/docs/models/operations/removegroupcontaininggrouprequest.md index ed6eded1..12d26d5a 100644 --- a/docs/models/operations/removegroupcontaininggrouprequest.md +++ b/docs/models/operations/removegroupcontaininggrouprequest.md @@ -8,12 +8,14 @@ import { RemoveGroupContainingGroupRequest } from "opal-mcp/models/operations"; let value: RemoveGroupContainingGroupRequest = { groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", containingGroupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + accessLevelRemoteId: "arn:aws:iam::590304332660:role/AdministratorAccess", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `groupId` | *string* | :heavy_check_mark: | The ID of the group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | -| `containingGroupId` | *string* | :heavy_check_mark: | The ID of the containing group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `groupId` | *string* | :heavy_check_mark: | The ID of the member group to remove. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `containingGroupId` | *string* | :heavy_check_mark: | The ID of the containing group. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | The remote ID of the member group's access level to filter by. | arn:aws:iam::590304332660:role/AdministratorAccess | \ No newline at end of file diff --git a/docs/models/operations/setgroupreviewerstagesrequest.md b/docs/models/operations/setgroupreviewerstagesrequest.md index 9a0cec8d..c28ccca7 100644 --- a/docs/models/operations/setgroupreviewerstagesrequest.md +++ b/docs/models/operations/setgroupreviewerstagesrequest.md @@ -16,6 +16,9 @@ let value: SetGroupReviewerStagesRequest = { "7870617d-e72a-47f5-a84c-693817ab4567", "1520617d-e72a-47f5-a84c-693817ab48ad2", ], + serviceUserIds: [ + "7870617d-e72a-47f5-a84c-693817ab4568", + ], }, ], }, diff --git a/docs/models/operations/setresourcereviewerstagesrequest.md b/docs/models/operations/setresourcereviewerstagesrequest.md index 2e43f8d8..11f7ff3d 100644 --- a/docs/models/operations/setresourcereviewerstagesrequest.md +++ b/docs/models/operations/setresourcereviewerstagesrequest.md @@ -16,6 +16,9 @@ let value: SetResourceReviewerStagesRequest = { "7870617d-e72a-47f5-a84c-693817ab4567", "1520617d-e72a-47f5-a84c-693817ab48ad2", ], + serviceUserIds: [ + "7870617d-e72a-47f5-a84c-693817ab4568", + ], }, ], }, diff --git a/docs/models/operations/startcampaignrequest.md b/docs/models/operations/startcampaignrequest.md new file mode 100644 index 00000000..c81b9d6b --- /dev/null +++ b/docs/models/operations/startcampaignrequest.md @@ -0,0 +1,17 @@ +# StartCampaignRequest + +## Example Usage + +```typescript +import { StartCampaignRequest } from "opal-mcp/models/operations"; + +let value: StartCampaignRequest = { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `campaignId` | *string* | :heavy_check_mark: | The ID of the campaign. | f454d283-ca87-4a8a-bdbb-df212eca5353 | \ No newline at end of file diff --git a/docs/models/operations/stopcampaignrequest.md b/docs/models/operations/stopcampaignrequest.md new file mode 100644 index 00000000..b65ede60 --- /dev/null +++ b/docs/models/operations/stopcampaignrequest.md @@ -0,0 +1,18 @@ +# StopCampaignRequest + +## Example Usage + +```typescript +import { StopCampaignRequest } from "opal-mcp/models/operations"; + +let value: StopCampaignRequest = { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `campaignId` | *string* | :heavy_check_mark: | The ID of the campaign. | f454d283-ca87-4a8a-bdbb-df212eca5353 | +| `stopCampaignRequest` | [components.StopCampaignRequest](../../models/components/stopcampaignrequest.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/updateaccessrulerequest.md b/docs/models/operations/updateaccessrulerequest.md index 711d0984..d07671cb 100644 --- a/docs/models/operations/updateaccessrulerequest.md +++ b/docs/models/operations/updateaccessrulerequest.md @@ -15,7 +15,11 @@ let value: UpdateAccessRuleRequest = { status: "ACTIVE", ruleClauses: { when: { - clauses: [], + clauses: [ + { + selectors: [], + }, + ], }, }, }, diff --git a/docs/models/operations/updatecampaignrequest.md b/docs/models/operations/updatecampaignrequest.md new file mode 100644 index 00000000..4e16e9c7 --- /dev/null +++ b/docs/models/operations/updatecampaignrequest.md @@ -0,0 +1,25 @@ +# UpdateCampaignRequest + +## Example Usage + +```typescript +import { UpdateCampaignRequest } from "opal-mcp/models/operations"; + +let value: UpdateCampaignRequest = { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + updateCampaignInfo: { + name: "Q3 Access Review (Updated)", + configuration: { + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `campaignId` | *string* | :heavy_check_mark: | The ID of the campaign. | f454d283-ca87-4a8a-bdbb-df212eca5353 | +| `updateCampaignInfo` | [components.UpdateCampaignInfo](../../models/components/updatecampaigninfo.md) | :heavy_check_mark: | N/A | {
"name": "Q3 Access Review (Updated)",
"configuration": {
"end_date": "2026-09-30T00:00:00Z",
"timezone": "America/Los_Angeles"
}
} | \ No newline at end of file diff --git a/docs/models/operations/updateeventstreamrequest.md b/docs/models/operations/updateeventstreamrequest.md new file mode 100644 index 00000000..7b6ae9b4 --- /dev/null +++ b/docs/models/operations/updateeventstreamrequest.md @@ -0,0 +1,19 @@ +# UpdateEventStreamRequest + +## Example Usage + +```typescript +import { UpdateEventStreamRequest } from "opal-mcp/models/operations"; + +let value: UpdateEventStreamRequest = { + eventStreamId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + updateEventStreamInfo: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `eventStreamId` | *string* | :heavy_check_mark: | The ID of the event stream. | 4baf8423-db0a-4037-a4cf-f79c60cb67a5 | +| `updateEventStreamInfo` | [components.UpdateEventStreamInfo](../../models/components/updateeventstreaminfo.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/updategroupuserrequestbody.md b/docs/models/operations/updategroupuserrequestbody.md index ff0b6df9..968895a2 100644 --- a/docs/models/operations/updategroupuserrequestbody.md +++ b/docs/models/operations/updategroupuserrequestbody.md @@ -13,7 +13,7 @@ let value: UpdateGroupUserRequestBody = { ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `durationMinutes` | *number* | :heavy_check_mark: | The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. | 120 | -| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | The updated remote ID of the access level granted to this user. | arn:aws:iam::590304332660:role/ReadOnlyAccess | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `durationMinutes` | *number* | :heavy_check_mark: | The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite, or a negative value to revoke access. | 120 | +| `accessLevelRemoteId` | *string* | :heavy_minus_sign: | The updated remote ID of the access level granted to this user. | arn:aws:iam::590304332660:role/ReadOnlyAccess | \ No newline at end of file diff --git a/docs/models/operations/updatepaladinrequest.md b/docs/models/operations/updatepaladinrequest.md new file mode 100644 index 00000000..fed56905 --- /dev/null +++ b/docs/models/operations/updatepaladinrequest.md @@ -0,0 +1,21 @@ +# UpdatePaladinRequest + +## Example Usage + +```typescript +import { UpdatePaladinRequest } from "opal-mcp/models/operations"; + +let value: UpdatePaladinRequest = { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + updatePaladinInfo: { + name: "paladin-agent-1", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `paladinId` | *string* | :heavy_check_mark: | The ID of the Paladin. | 32acc112-21ff-4669-91c2-21e27683eaa1 | +| `updatePaladinInfo` | [components.UpdatePaladinInfo](../../models/components/updatepaladininfo.md) | :heavy_check_mark: | N/A | {
"name": "paladin-agent-1"
} | \ No newline at end of file diff --git a/docs/sdks/accessrules/README.md b/docs/sdks/accessrules/README.md index 670a3a86..0e94dadc 100644 --- a/docs/sdks/accessrules/README.md +++ b/docs/sdks/accessrules/README.md @@ -1,5 +1,4 @@ # AccessRules -(*accessRules*) ## Overview @@ -7,10 +6,86 @@ Operations related to access rules ### Available Operations +* [getAccessRules](#getaccessrules) - Returns a list of access rules for your organization. * [createAccessRule](#createaccessrule) - Creates a new access rule config for the given group_id. * [getAccessRule](#getaccessrule) - Returns a list of access rule config given the group_id of the access rule. * [updateAccessRule](#updateaccessrule) - Updates the access rule config for the given group_id. +## getAccessRules + +Returns a list of access rules for your organization. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.accessRules.getAccessRules({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { accessRulesGetAccessRules } from "opal-mcp/funcs/accessRulesGetAccessRules.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await accessRulesGetAccessRules(opalMcp, { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accessRulesGetAccessRules failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccessRulesRequest](../../models/operations/getaccessrulesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PaginatedAccessRulesList](../../models/components/paginatedaccessruleslist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + ## createAccessRule Creates a new access rule config for the given group_id. diff --git a/docs/sdks/apps/README.md b/docs/sdks/apps/README.md index 1d6d2745..70fe9501 100644 --- a/docs/sdks/apps/README.md +++ b/docs/sdks/apps/README.md @@ -1,5 +1,4 @@ # Apps -(*apps*) ## Overview @@ -7,8 +6,8 @@ Operations related to apps ### Available Operations -* [getApps](#getapps) - Returns a list of `App` objects. -* [getApp](#getapp) - Returns an `App` object. +* [getApps](#getapps) - Get apps +* [getApp](#getapp) - Get app by ID * [getSyncErrors](#getsyncerrors) - Returns a list of recent sync errors that have occurred since the last successful sync. ## getApps diff --git a/docs/sdks/bundles/README.md b/docs/sdks/bundles/README.md index 4fcf5a91..857d799d 100644 --- a/docs/sdks/bundles/README.md +++ b/docs/sdks/bundles/README.md @@ -1,5 +1,4 @@ # Bundles -(*bundles*) ## Overview @@ -7,9 +6,9 @@ Operations related to bundles ### Available Operations -* [getBundles](#getbundles) - Returns a list of `Bundle` objects. +* [getBundles](#getbundles) - Get bundles * [createBundle](#createbundle) - Creates a bundle. -* [getBundle](#getbundle) - Returns a `Bundle` object. +* [getBundle](#getbundle) - Get bundle by ID * [deleteBundle](#deletebundle) - Deletes a bundle. * [updateBundle](#updatebundle) - Updates a bundle. * [getBundleResources](#getbundleresources) - Returns a list of `Resource` objects in a given bundle. diff --git a/docs/sdks/campaigns/README.md b/docs/sdks/campaigns/README.md new file mode 100644 index 00000000..45549509 --- /dev/null +++ b/docs/sdks/campaigns/README.md @@ -0,0 +1,611 @@ +# Campaigns + +## Overview + +Operations related to access review campaigns + +### Available Operations + +* [getCampaigns](#getcampaigns) - Returns a list of `Campaign` objects. +* [createCampaign](#createcampaign) - Creates a campaign. Campaign scope only supports direct access edges: +`configuration.query.edgeFilter.directOnly` defaults to `true`, is +always stored as `true`, and passing `false` returns 400. + +* [getCampaign](#getcampaign) - Get campaign by ID +* [updateCampaign](#updatecampaign) - Update campaign +* [startCampaign](#startcampaign) - Start campaign +* [stopCampaign](#stopcampaign) - Stop campaign +* [endCampaign](#endcampaign) - End campaign + +## getCampaigns + +Returns a list of `Campaign` objects. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.campaigns.getCampaigns({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + name: "Q3 Access Review", + status: "ONGOING", + createdAtAfter: new Date("2026-01-01T00:00:00Z"), + createdAtBefore: new Date("2026-12-31T23:59:59Z"), + startedAtAfter: new Date("2026-01-01T00:00:00Z"), + startedAtBefore: new Date("2026-12-31T23:59:59Z"), + endedAtAfter: new Date("2026-01-01T00:00:00Z"), + endedAtBefore: new Date("2026-12-31T23:59:59Z"), + stoppedAtAfter: new Date("2026-01-01T00:00:00Z"), + stoppedAtBefore: new Date("2026-12-31T23:59:59Z"), + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { campaignsGetCampaigns } from "opal-mcp/funcs/campaignsGetCampaigns.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await campaignsGetCampaigns(opalMcp, { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + name: "Q3 Access Review", + status: "ONGOING", + createdAtAfter: new Date("2026-01-01T00:00:00Z"), + createdAtBefore: new Date("2026-12-31T23:59:59Z"), + startedAtAfter: new Date("2026-01-01T00:00:00Z"), + startedAtBefore: new Date("2026-12-31T23:59:59Z"), + endedAtAfter: new Date("2026-01-01T00:00:00Z"), + endedAtBefore: new Date("2026-12-31T23:59:59Z"), + stoppedAtAfter: new Date("2026-01-01T00:00:00Z"), + stoppedAtBefore: new Date("2026-12-31T23:59:59Z"), + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("campaignsGetCampaigns failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCampaignsRequest](../../models/operations/getcampaignsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PaginatedCampaignsList](../../models/components/paginatedcampaignslist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createCampaign + +Creates a campaign. Campaign scope only supports direct access edges: +`configuration.query.edgeFilter.directOnly` defaults to `true`, is +always stored as `true`, and passing `false` returns 400. + + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.campaigns.createCampaign({ + name: "Q3 Access Review", + configuration: { + query: { + principalFilter: { + entityTypes: [ + "USER", + ], + }, + }, + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { campaignsCreateCampaign } from "opal-mcp/funcs/campaignsCreateCampaign.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await campaignsCreateCampaign(opalMcp, { + name: "Q3 Access Review", + configuration: { + query: { + principalFilter: { + entityTypes: [ + "USER", + ], + }, + }, + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("campaignsCreateCampaign failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateCampaignInfo](../../models/components/createcampaigninfo.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Campaign](../../models/components/campaign.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getCampaign + +Returns a `Campaign` object. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.campaigns.getCampaign({ + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { campaignsGetCampaign } from "opal-mcp/funcs/campaignsGetCampaign.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await campaignsGetCampaign(opalMcp, { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("campaignsGetCampaign failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCampaignRequest](../../models/operations/getcampaignrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Campaign](../../models/components/campaign.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateCampaign + +Partially updates a campaign. Omitted fields are left unchanged. +`configuration.query` and `configuration.reviewer_assignment_policy` +cannot be updated after create; including either field returns 400. +`configuration.cron_expression` and +`configuration.recurring_duration_days` may only be set on template +campaigns; setting them on a one-off campaign returns 400. +`configuration.is_template` is immutable and not accepted on update. +Configuration updates on a stopped or ended (non-template) campaign +return 400. Name-only updates are still allowed. + + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.campaigns.updateCampaign({ + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + updateCampaignInfo: { + name: "Q3 Access Review (Updated)", + configuration: { + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", + }, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { campaignsUpdateCampaign } from "opal-mcp/funcs/campaignsUpdateCampaign.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await campaignsUpdateCampaign(opalMcp, { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + updateCampaignInfo: { + name: "Q3 Access Review (Updated)", + configuration: { + endDate: new Date("2026-09-30T00:00:00Z"), + timezone: "America/Los_Angeles", + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("campaignsUpdateCampaign failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateCampaignRequest](../../models/operations/updatecampaignrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Campaign](../../models/components/campaign.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## startCampaign + +Starts a draft campaign immediately, setting `started_at` and +`started_by_user_id`. Returns 400 if the campaign is not in draft +state, or if it is a recurring template (`is_template: true`) — +templates spawn draft campaigns on their schedule and cannot be +started directly. + + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.campaigns.startCampaign({ + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { campaignsStartCampaign } from "opal-mcp/funcs/campaignsStartCampaign.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await campaignsStartCampaign(opalMcp, { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("campaignsStartCampaign failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StartCampaignRequest](../../models/operations/startcampaignrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Campaign](../../models/components/campaign.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## stopCampaign + +Stops an ongoing campaign immediately, setting `stopped_at` and +`stopped_by_user_id`. Returns 400 if the campaign has not started or +has already stopped. + + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.campaigns.stopCampaign({ + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { campaignsStopCampaign } from "opal-mcp/funcs/campaignsStopCampaign.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await campaignsStopCampaign(opalMcp, { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("campaignsStopCampaign failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.StopCampaignRequest](../../models/operations/stopcampaignrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Campaign](../../models/components/campaign.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## endCampaign + +Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, +applying pending access changes, and queuing report generation. +Returns 400 unless the campaign is started and stopped and not already +ended. + + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.campaigns.endCampaign({ + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { campaignsEndCampaign } from "opal-mcp/funcs/campaignsEndCampaign.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await campaignsEndCampaign(opalMcp, { + campaignId: "f454d283-ca87-4a8a-bdbb-df212eca5353", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("campaignsEndCampaign failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.EndCampaignRequest](../../models/operations/endcampaignrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Campaign](../../models/components/campaign.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/configurationtemplates/README.md b/docs/sdks/configurationtemplates/README.md index b6e37f0c..1cb7d78d 100644 --- a/docs/sdks/configurationtemplates/README.md +++ b/docs/sdks/configurationtemplates/README.md @@ -1,5 +1,4 @@ # ConfigurationTemplates -(*configurationTemplates*) ## Overview diff --git a/docs/sdks/delegations/README.md b/docs/sdks/delegations/README.md new file mode 100644 index 00000000..79201df0 --- /dev/null +++ b/docs/sdks/delegations/README.md @@ -0,0 +1,318 @@ +# Delegations + +## Overview + +Operations related to request reviewer delegations + +### Available Operations + +* [getDelegations](#getdelegations) - Get delegations +* [createDelegation](#createdelegation) - Creates a new request reviewer delegation to delegate access review requests from one user to another. +* [getDelegation](#getdelegation) - Get delegation by ID +* [deleteDelegation](#deletedelegation) - Deletes a delegation by its ID. + +## getDelegations + +Returns a list of request reviewer delegations configured for your organization. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.delegations.getDelegations({ + delegatorUserId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + delegateUserId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { delegationsGetDelegations } from "opal-mcp/funcs/delegationsGetDelegations.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await delegationsGetDelegations(opalMcp, { + delegatorUserId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + delegateUserId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("delegationsGetDelegations failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDelegationsRequest](../../models/operations/getdelegationsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PaginatedDelegationsList](../../models/components/paginateddelegationslist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createDelegation + +Creates a new request reviewer delegation to delegate access review requests from one user to another. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.delegations.createDelegation({ + delegatorUserId: "123e4567-e89b-12d3-a456-426614174000", + delegateUserId: "7c86c85d-0651-43e2-a748-d69d658418e8", + startTime: new Date("2023-10-01T12:00:00Z"), + endTime: new Date("2023-10-01T12:00:00Z"), + reason: "I need to be out of the office", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { delegationsCreateDelegation } from "opal-mcp/funcs/delegationsCreateDelegation.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await delegationsCreateDelegation(opalMcp, { + delegatorUserId: "123e4567-e89b-12d3-a456-426614174000", + delegateUserId: "7c86c85d-0651-43e2-a748-d69d658418e8", + startTime: new Date("2023-10-01T12:00:00Z"), + endTime: new Date("2023-10-01T12:00:00Z"), + reason: "I need to be out of the office", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("delegationsCreateDelegation failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateDelegationRequest](../../models/components/createdelegationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Delegation](../../models/components/delegation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getDelegation + +Returns a specific delegation by its ID. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.delegations.getDelegation({ + delegationId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { delegationsGetDelegation } from "opal-mcp/funcs/delegationsGetDelegation.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await delegationsGetDelegation(opalMcp, { + delegationId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("delegationsGetDelegation failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDelegationRequest](../../models/operations/getdelegationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Delegation](../../models/components/delegation.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteDelegation + +Deletes a delegation by its ID. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + await opalMcp.delegations.deleteDelegation({ + delegationId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { delegationsDeleteDelegation } from "opal-mcp/funcs/delegationsDeleteDelegation.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await delegationsDeleteDelegation(opalMcp, { + delegationId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("delegationsDeleteDelegation failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteDelegationRequest](../../models/operations/deletedelegationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 8e175f69..307b0745 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -1,5 +1,4 @@ # Events -(*events*) ## Overview @@ -8,14 +7,15 @@ Operations related to events ### Available Operations * [events](#events) - Returns a list of `Event` objects. +* [getEvent](#getevent) - Get event by ID ## events Returns a list of `Event` objects. -### Example Usage +### Example Usage: withDate - + ```typescript import { OpalMcp } from "opal-mcp"; @@ -78,6 +78,73 @@ async function run() { } } +run(); +``` +### Example Usage: withDatetime + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.events.events({ + startDateFilter: "2025-01-01T00:00:00Z", + endDateFilter: "2025-01-01T00:00:00Z", + actorFilter: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + objectFilter: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + eventTypeFilter: "USER_MFA_RESET", + apiTokenFilter: "fullaccess:**************************M_g==", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + + for await (const page of result) { + console.log(page); + } +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { eventsEvents } from "opal-mcp/funcs/eventsEvents.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await eventsEvents(opalMcp, { + startDateFilter: "2025-01-01T00:00:00Z", + endDateFilter: "2025-01-01T00:00:00Z", + actorFilter: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + objectFilter: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + eventTypeFilter: "USER_MFA_RESET", + apiTokenFilter: "fullaccess:**************************M_g==", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + if (res.ok) { + const { value: result } = res; + for await (const page of result) { + console.log(page); + } + } else { + console.log("eventsEvents failed:", res.error); + } +} + run(); ``` @@ -96,6 +163,79 @@ run(); ### Errors +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getEvent + +Returns an `Event` object. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.events.getEvent({ + eventId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { eventsGetEvent } from "opal-mcp/funcs/eventsGetEvent.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await eventsGetEvent(opalMcp, { + eventId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("eventsGetEvent failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetEventRequest](../../models/operations/geteventrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Event](../../models/components/event.md)\>** + +### Errors + | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/eventstreams/README.md b/docs/sdks/eventstreams/README.md new file mode 100644 index 00000000..af258f97 --- /dev/null +++ b/docs/sdks/eventstreams/README.md @@ -0,0 +1,303 @@ +# EventStreams + +## Overview + +Operations related to event streaming connections + +### Available Operations + +* [getEventStreams](#geteventstreams) - Get event streams +* [createEventStream](#createeventstream) - Create event stream +* [updateEventStream](#updateeventstream) - Update event stream +* [deleteEventStream](#deleteeventstream) - Delete event stream + +## getEventStreams + +Returns a list of configured event streaming connections for your organization. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.eventStreams.getEventStreams(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { eventStreamsGetEventStreams } from "opal-mcp/funcs/eventStreamsGetEventStreams.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await eventStreamsGetEventStreams(opalMcp); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("eventStreamsGetEventStreams failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.EventStreamList](../../models/components/eventstreamlist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createEventStream + +Creates a new event streaming connection. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.eventStreams.createEventStream({ + name: "", + connectionType: "WEBHOOK", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { eventStreamsCreateEventStream } from "opal-mcp/funcs/eventStreamsCreateEventStream.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await eventStreamsCreateEventStream(opalMcp, { + name: "", + connectionType: "WEBHOOK", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("eventStreamsCreateEventStream failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateEventStreamInfo](../../models/components/createeventstreaminfo.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.EventStream](../../models/components/eventstream.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateEventStream + +Updates an existing event streaming connection. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.eventStreams.updateEventStream({ + eventStreamId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + updateEventStreamInfo: {}, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { eventStreamsUpdateEventStream } from "opal-mcp/funcs/eventStreamsUpdateEventStream.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await eventStreamsUpdateEventStream(opalMcp, { + eventStreamId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + updateEventStreamInfo: {}, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("eventStreamsUpdateEventStream failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateEventStreamRequest](../../models/operations/updateeventstreamrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.EventStream](../../models/components/eventstream.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteEventStream + +Deletes an event streaming connection. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + await opalMcp.eventStreams.deleteEventStream({ + eventStreamId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { eventStreamsDeleteEventStream } from "opal-mcp/funcs/eventStreamsDeleteEventStream.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await eventStreamsDeleteEventStream(opalMcp, { + eventStreamId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("eventStreamsDeleteEventStream failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteEventStreamRequest](../../models/operations/deleteeventstreamrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/groupbindings/README.md b/docs/sdks/groupbindings/README.md index baff769d..0f9077b1 100644 --- a/docs/sdks/groupbindings/README.md +++ b/docs/sdks/groupbindings/README.md @@ -1,5 +1,4 @@ # GroupBindings -(*groupBindings*) ## Overview @@ -7,10 +6,10 @@ Operations related to group bindings ### Available Operations -* [getGroupBindings](#getgroupbindings) - Returns a list of `GroupBinding` objects. +* [getGroupBindings](#getgroupbindings) - Get group bindings * [createGroupBinding](#creategroupbinding) - Creates a group binding. * [updateGroupBindings](#updategroupbindings) - Bulk updates a list of group bindings. -* [getGroupBinding](#getgroupbinding) - Returns a `GroupBinding` object. +* [getGroupBinding](#getgroupbinding) - Get group binding by ID * [deleteGroupBinding](#deletegroupbinding) - Deletes a group binding. ## getGroupBindings diff --git a/docs/sdks/groups/README.md b/docs/sdks/groups/README.md index 84d4cfe9..3426fe15 100644 --- a/docs/sdks/groups/README.md +++ b/docs/sdks/groups/README.md @@ -1,5 +1,4 @@ # Groups -(*groups*) ## Overview @@ -7,10 +6,10 @@ Operations related to groups ### Available Operations -* [getGroups](#getgroups) - Returns a list of groups for your organization. +* [getGroups](#getgroups) - Get groups * [updateGroups](#updategroups) - Bulk updates a list of groups. * [createGroup](#creategroup) - Creates an Opal group or [imports a remote group](https://docs.opal.dev/reference/end-system-objects). -* [getGroup](#getgroup) - Returns a `Group` object. +* [getGroup](#getgroup) - Get group by ID * [deleteGroup](#deletegroup) - Deletes a group. * [getGroupMessageChannels](#getgroupmessagechannels) - Gets the list of audit and reviewer message channels attached to a group. * [setGroupMessageChannels](#setgroupmessagechannels) - Sets the list of audit message channels attached to a group. @@ -18,9 +17,9 @@ Operations related to groups * [setGroupOnCallSchedules](#setgrouponcallschedules) - Sets the list of on call schedules attached to a group. * [getGroupResources](#getgroupresources) - Gets the list of resources that the group gives access to. * [setGroupResources](#setgroupresources) - Sets the list of resources that the group gives access to. -* [getGroupContainingGroups](#getgroupcontaininggroups) - Gets the list of groups that the group gives access to. +* [getGroupContainingGroups](#getgroupcontaininggroups) - Get nested groups * [addGroupContainingGroup](#addgroupcontaininggroup) - Creates a new containing group. -* [getGroupContainingGroup](#getgroupcontaininggroup) - Gets a specific containing group for a group. +* [getGroupContainingGroup](#getgroupcontaininggroup) - Get nested group by ID * [removeGroupContainingGroup](#removegroupcontaininggroup) - Removes a containing group from a group. * [addGroupResource](#addgroupresource) - Adds a resource to a group. * [getGroupVisibility](#getgroupvisibility) - Gets the visibility of this group. @@ -34,6 +33,7 @@ Operations related to groups * [updateGroupUser](#updategroupuser) - Updates a user's access level or duration in this group. * [addGroupUser](#addgroupuser) - Adds a user to this group. * [deleteGroupUser](#deletegroupuser) - Removes a user's access from this group. +* [getUserGroups](#getusergroups) - Returns all groups that the user is a member of. ## getGroups @@ -961,6 +961,7 @@ const opalMcp = new OpalMcp({ async function run() { const result = await opalMcp.groups.getGroupContainingGroups({ groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + accessLevelRemoteId: "arn:aws:iam::590304332660:role/AdministratorAccess", }); console.log(result); @@ -986,6 +987,7 @@ const opalMcp = new OpalMcpCore({ async function run() { const res = await groupsGetGroupContainingGroups(opalMcp, { groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + accessLevelRemoteId: "arn:aws:iam::590304332660:role/AdministratorAccess", }); if (res.ok) { const { value: result } = res; @@ -1189,6 +1191,7 @@ async function run() { await opalMcp.groups.removeGroupContainingGroup({ groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", containingGroupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + accessLevelRemoteId: "arn:aws:iam::590304332660:role/AdministratorAccess", }); @@ -1215,6 +1218,7 @@ async function run() { const res = await groupsRemoveGroupContainingGroup(opalMcp, { groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", containingGroupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + accessLevelRemoteId: "arn:aws:iam::590304332660:role/AdministratorAccess", }); if (res.ok) { const { value: result } = res; @@ -1917,6 +1921,8 @@ const opalMcp = new OpalMcp({ async function run() { const result = await opalMcp.groups.getGroupUsers({ groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, }); console.log(result); @@ -1942,6 +1948,8 @@ const opalMcp = new OpalMcpCore({ async function run() { const res = await groupsGetGroupUsers(opalMcp, { groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, }); if (res.ok) { const { value: result } = res; @@ -2216,6 +2224,83 @@ run(); ### Errors +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getUserGroups + +Returns all groups that the user is a member of. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.groups.getUserGroups({ + userId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { groupsGetUserGroups } from "opal-mcp/funcs/groupsGetUserGroups.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await groupsGetUserGroups(opalMcp, { + userId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("groupsGetUserGroups failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetUserGroupsRequest](../../models/operations/getusergroupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.GroupUserList](../../models/components/groupuserlist.md)\>** + +### Errors + | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/idpgroupmappings/README.md b/docs/sdks/idpgroupmappings/README.md index f855148b..c496c7bd 100644 --- a/docs/sdks/idpgroupmappings/README.md +++ b/docs/sdks/idpgroupmappings/README.md @@ -1,5 +1,4 @@ # IdpGroupMappings -(*idpGroupMappings*) ## Overview @@ -9,6 +8,13 @@ Operations related to IDP group mappings * [getIdpGroupMappings](#getidpgroupmappings) - Returns the configured set of available `IdpGroupMapping` objects for an Okta app. * [updateIdpGroupMappings](#updateidpgroupmappings) - Updates the list of available `IdpGroupMapping` objects for an Okta app. +* [getIdpGroupMapping](#getidpgroupmapping) - Gets an `IdpGroupMapping` object for an Okta app and group. +* [createIdpGroupMapping](#createidpgroupmapping) - Creates or updates an individual `IdpGroupMapping` object (upsert operation). + +**Behavior:** +- If the mapping doesn't exist, it will be created with the provided values +- If the mapping exists, only the fields provided in the request will be updated + * [deleteIdpGroupMappings](#deleteidpgroupmappings) - Deletes an `IdpGroupMapping` object. ## getIdpGroupMappings @@ -171,13 +177,168 @@ run(); | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | +## getIdpGroupMapping + +Gets an `IdpGroupMapping` object for an Okta app and group. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.idpGroupMappings.getIdpGroupMapping({ + appResourceId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { idpGroupMappingsGetIdpGroupMapping } from "opal-mcp/funcs/idpGroupMappingsGetIdpGroupMapping.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await idpGroupMappingsGetIdpGroupMapping(opalMcp, { + appResourceId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("idpGroupMappingsGetIdpGroupMapping failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetIdpGroupMappingRequest](../../models/operations/getidpgroupmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IdpGroupMapping](../../models/components/idpgroupmapping.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createIdpGroupMapping + +Creates or updates an individual `IdpGroupMapping` object (upsert operation). + +**Behavior:** +- If the mapping doesn't exist, it will be created with the provided values +- If the mapping exists, only the fields provided in the request will be updated + + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.idpGroupMappings.createIdpGroupMapping({ + appResourceId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { idpGroupMappingsCreateIdpGroupMapping } from "opal-mcp/funcs/idpGroupMappingsCreateIdpGroupMapping.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await idpGroupMappingsCreateIdpGroupMapping(opalMcp, { + appResourceId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + groupId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("idpGroupMappingsCreateIdpGroupMapping failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateIdpGroupMappingRequest](../../models/operations/createidpgroupmappingrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IdpGroupMapping](../../models/components/idpgroupmapping.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + ## deleteIdpGroupMappings Deletes an `IdpGroupMapping` object. ### Example Usage - + ```typescript import { OpalMcp } from "opal-mcp"; diff --git a/docs/sdks/messagechannels/README.md b/docs/sdks/messagechannels/README.md index 960ff3e7..9e3c9b5b 100644 --- a/docs/sdks/messagechannels/README.md +++ b/docs/sdks/messagechannels/README.md @@ -1,5 +1,4 @@ # MessageChannels -(*messageChannels*) ## Overview @@ -7,9 +6,9 @@ Operations related to message channels ### Available Operations -* [getMessageChannels](#getmessagechannels) - Returns a list of `MessageChannel` objects. +* [getMessageChannels](#getmessagechannels) - Get message channels * [createMessageChannel](#createmessagechannel) - Creates a `MessageChannel` objects. -* [getMessageChannel](#getmessagechannel) - Gets a `MessageChannel` object. +* [getMessageChannel](#getmessagechannel) - Get message channel by ID ## getMessageChannels diff --git a/docs/sdks/nonhumanidentities/README.md b/docs/sdks/nonhumanidentities/README.md index cdf57761..d9591d64 100644 --- a/docs/sdks/nonhumanidentities/README.md +++ b/docs/sdks/nonhumanidentities/README.md @@ -1,5 +1,4 @@ # NonHumanIdentities -(*nonHumanIdentities*) ## Overview diff --git a/docs/sdks/oncallschedules/README.md b/docs/sdks/oncallschedules/README.md index adfafe08..03aba01a 100644 --- a/docs/sdks/oncallschedules/README.md +++ b/docs/sdks/oncallschedules/README.md @@ -1,5 +1,4 @@ # OnCallSchedules -(*onCallSchedules*) ## Overview @@ -7,9 +6,9 @@ Operations related to on-call schedules ### Available Operations -* [getOnCallSchedules](#getoncallschedules) - Returns a list of `OnCallSchedule` objects. +* [getOnCallSchedules](#getoncallschedules) - Get on call schedules * [createOnCallSchedule](#createoncallschedule) - Creates a `OnCallSchedule` objects. -* [getOnCallSchedule](#getoncallschedule) - Gets a `OnCallSchedule` object. +* [getOnCallSchedule](#getoncallschedule) - Get on call schedule by ID ## getOnCallSchedules diff --git a/docs/sdks/opalmcp/README.md b/docs/sdks/opalmcp/README.md deleted file mode 100644 index fc49f5c9..00000000 --- a/docs/sdks/opalmcp/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# OpalMcp SDK - -## Overview - -Opal API: The Opal API is a RESTful API that allows you to interact with the Opal Security platform programmatically. - -### Available Operations diff --git a/docs/sdks/opalqueries/README.md b/docs/sdks/opalqueries/README.md new file mode 100644 index 00000000..fc437966 --- /dev/null +++ b/docs/sdks/opalqueries/README.md @@ -0,0 +1,126 @@ +# OpalQueries + +## Overview + +Operations related to OpalQuery + +### Available Operations + +* [runOpalQuery](#runopalquery) - Run an ad-hoc OpalQuery + +## runOpalQuery + +Runs an ad-hoc OpalQuery and returns the results. Supports NODE queries (users, resources, groups) and ACCESS_PATH queries (principal-to-entitlement access edges). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.opalQueries.runOpalQuery({ + type: "NODE", + query: { + nodeFilters: { + entityTypes: [ + "RESOURCE", + ], + entityTag: { + key: "env", + value: "prod", + }, + }, + accessFilters: { + isAccessibleBy: { + entityTypes: [ + "USER", + ], + entityTag: { + key: "contractor", + }, + }, + }, + }, + first: 50, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { opalQueriesRunOpalQuery } from "opal-mcp/funcs/opalQueriesRunOpalQuery.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await opalQueriesRunOpalQuery(opalMcp, { + type: "NODE", + query: { + nodeFilters: { + entityTypes: [ + "RESOURCE", + ], + entityTag: { + key: "env", + value: "prod", + }, + }, + accessFilters: { + isAccessibleBy: { + entityTypes: [ + "USER", + ], + entityTag: { + key: "contractor", + }, + }, + }, + }, + first: 50, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("opalQueriesRunOpalQuery failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.RunOpalQueryRequest](../../models/components/runopalqueryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.OpalQueryResults](../../models/components/opalqueryresults.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/owners/README.md b/docs/sdks/owners/README.md index aa0ea47c..cc539bea 100644 --- a/docs/sdks/owners/README.md +++ b/docs/sdks/owners/README.md @@ -1,5 +1,4 @@ # Owners -(*owners*) ## Overview @@ -7,10 +6,10 @@ Operations related to owners ### Available Operations -* [getOwners](#getowners) - Returns a list of `Owner` objects. +* [getOwners](#getowners) - Get owners * [createOwner](#createowner) - Creates an owner. * [updateOwners](#updateowners) - Bulk updates a list of owners. -* [getOwner](#getowner) - Returns an `Owner` object. +* [getOwner](#getowner) - Get owner by ID * [deleteOwner](#deleteowner) - Deletes an owner. * [getOwnerFromName](#getownerfromname) - Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead. * [getOwnerUsers](#getownerusers) - Gets the list of users for this owner, in escalation priority order if applicable. diff --git a/docs/sdks/paladin/README.md b/docs/sdks/paladin/README.md new file mode 100644 index 00000000..a6c5a2ee --- /dev/null +++ b/docs/sdks/paladin/README.md @@ -0,0 +1,622 @@ +# Paladin + +## Overview + +Operations related to Paladin + +### Available Operations + +* [createPaladin](#createpaladin) - Create Paladin +* [getPaladin](#getpaladin) - Get Paladin by ID +* [updatePaladin](#updatepaladin) - Update Paladin +* [deletePaladin](#deletepaladin) - Delete Paladin +* [getPaladinFromName](#getpaladinfromname) - Get Paladins by name +* [listPaladinContextSources](#listpaladincontextsources) - List Paladin context sources +* [createPaladinContextSource](#createpaladincontextsource) - Add a Paladin context source +* [deletePaladinContextSource](#deletepaladincontextsource) - Remove a Paladin context source + +## createPaladin + +Creates a new `Paladin`. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.paladin.createPaladin({ + name: "paladin-agent-1", + ownerId: "7c86c85d-0651-43e2-a748-d69d658418e8", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { paladinCreatePaladin } from "opal-mcp/funcs/paladinCreatePaladin.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await paladinCreatePaladin(opalMcp, { + name: "paladin-agent-1", + ownerId: "7c86c85d-0651-43e2-a748-d69d658418e8", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("paladinCreatePaladin failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreatePaladinInfo](../../models/components/createpaladininfo.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Paladin](../../models/components/paladin.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getPaladin + +Returns a `Paladin` object. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.paladin.getPaladin({ + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { paladinGetPaladin } from "opal-mcp/funcs/paladinGetPaladin.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await paladinGetPaladin(opalMcp, { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("paladinGetPaladin failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPaladinRequest](../../models/operations/getpaladinrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Paladin](../../models/components/paladin.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updatePaladin + +Updates a `Paladin` object. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.paladin.updatePaladin({ + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + updatePaladinInfo: { + name: "paladin-agent-1", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { paladinUpdatePaladin } from "opal-mcp/funcs/paladinUpdatePaladin.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await paladinUpdatePaladin(opalMcp, { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + updatePaladinInfo: { + name: "paladin-agent-1", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("paladinUpdatePaladin failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdatePaladinRequest](../../models/operations/updatepaladinrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.Paladin](../../models/components/paladin.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deletePaladin + +Deletes a Paladin, removing the underlying service user. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + await opalMcp.paladin.deletePaladin({ + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { paladinDeletePaladin } from "opal-mcp/funcs/paladinDeletePaladin.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await paladinDeletePaladin(opalMcp, { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("paladinDeletePaladin failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePaladinRequest](../../models/operations/deletepaladinrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getPaladinFromName + +Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.paladin.getPaladinFromName({ + paladinName: "paladin-agent-1", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { paladinGetPaladinFromName } from "opal-mcp/funcs/paladinGetPaladinFromName.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await paladinGetPaladinFromName(opalMcp, { + paladinName: "paladin-agent-1", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("paladinGetPaladinFromName failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPaladinFromNameRequest](../../models/operations/getpaladinfromnamerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PaladinList](../../models/components/paladinlist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listPaladinContextSources + +Returns the context sources (Slack channels and documents) configured for a Paladin. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.paladin.listPaladinContextSources({ + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { paladinListPaladinContextSources } from "opal-mcp/funcs/paladinListPaladinContextSources.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await paladinListPaladinContextSources(opalMcp, { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("paladinListPaladinContextSources failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPaladinContextSourcesRequest](../../models/operations/listpaladincontextsourcesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PaladinContextSourceList](../../models/components/paladincontextsourcelist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createPaladinContextSource + +Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.paladin.createPaladinContextSource({ + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + createPaladinContextSourceInfo: { + sourceKind: "SLACK_CHANNEL", + thirdPartyProvider: "SLACK", + remoteId: "C0123456789", + name: "#access-requests", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { paladinCreatePaladinContextSource } from "opal-mcp/funcs/paladinCreatePaladinContextSource.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await paladinCreatePaladinContextSource(opalMcp, { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + createPaladinContextSourceInfo: { + sourceKind: "SLACK_CHANNEL", + thirdPartyProvider: "SLACK", + remoteId: "C0123456789", + name: "#access-requests", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("paladinCreatePaladinContextSource failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreatePaladinContextSourceRequest](../../models/operations/createpaladincontextsourcerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PaladinContextSource](../../models/components/paladincontextsource.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deletePaladinContextSource + +Removes a context source from a Paladin. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + await opalMcp.paladin.deletePaladinContextSource({ + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + contextSourceId: "8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { paladinDeletePaladinContextSource } from "opal-mcp/funcs/paladinDeletePaladinContextSource.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await paladinDeletePaladinContextSource(opalMcp, { + paladinId: "32acc112-21ff-4669-91c2-21e27683eaa1", + contextSourceId: "8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8", + }); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("paladinDeletePaladinContextSource failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeletePaladinContextSourceRequest](../../models/operations/deletepaladincontextsourcerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/requests/README.md b/docs/sdks/requests/README.md index e561ae60..4404d687 100644 --- a/docs/sdks/requests/README.md +++ b/docs/sdks/requests/README.md @@ -1,5 +1,4 @@ # Requests -(*requests*) ## Overview @@ -7,19 +6,22 @@ Operations related to requests ### Available Operations -* [getRequests](#getrequests) - Returns a list of requests for your organization that is visible by the admin. +* [getRequests](#getrequests) - Get requests * [createRequest](#createrequest) - Create an access request -* [~~getRequestsRelay~~](#getrequestsrelay) - Returns a paginated list of requests using Relay-style cursor pagination. :warning: **Deprecated** -* [getRequest](#getrequest) - Returns a request by ID. +* [~~getRequestsRelay~~](#getrequestsrelay) - Get requests via Relay :warning: **Deprecated** +* [getRequest](#getrequest) - Get request by ID * [approveRequest](#approverequest) - Approve an access request +* [denyRequest](#denyrequest) - Deny an access request +* [getRequestComments](#getrequestcomments) - Returns a list of comments for a specific request. +* [createRequestComment](#createrequestcomment) - Comment on an access request ## getRequests Returns a list of requests for your organization that is visible by the admin. -### Example Usage +### Example Usage: withDate - + ```typescript import { OpalMcp } from "opal-mcp"; @@ -31,6 +33,10 @@ async function run() { const result = await opalMcp.requests.getRequests({ startDateFilter: "2021-11-01T00:00:00Z", endDateFilter: "2021-11-12T00:00:00Z", + requesterId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + targetUserId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + resourceId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + groupId: "37cb7e41-12ba-46da-92ff-030abe0450b1", cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", pageSize: 200, }); @@ -61,6 +67,77 @@ async function run() { const res = await requestsGetRequests(opalMcp, { startDateFilter: "2021-11-01T00:00:00Z", endDateFilter: "2021-11-12T00:00:00Z", + requesterId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + targetUserId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + resourceId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + groupId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + if (res.ok) { + const { value: result } = res; + for await (const page of result) { + console.log(page); + } + } else { + console.log("requestsGetRequests failed:", res.error); + } +} + +run(); +``` +### Example Usage: withDatetime + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.requests.getRequests({ + startDateFilter: "2025-01-01T00:00:00Z", + endDateFilter: "2025-01-01T00:00:00Z", + requesterId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + targetUserId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + resourceId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + groupId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + + for await (const page of result) { + console.log(page); + } +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { requestsGetRequests } from "opal-mcp/funcs/requestsGetRequests.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await requestsGetRequests(opalMcp, { + startDateFilter: "2025-01-01T00:00:00Z", + endDateFilter: "2025-01-01T00:00:00Z", + requesterId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + targetUserId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + resourceId: "37cb7e41-12ba-46da-92ff-030abe0450b1", + groupId: "37cb7e41-12ba-46da-92ff-030abe0450b1", cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", pageSize: 200, }); @@ -460,6 +537,239 @@ run(); ### Errors +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## denyRequest + +Deny an access request + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.requests.denyRequest({ + id: "83015915-58ae-4cce-b92d-608ff073ece1", + requestBody: { + comment: "Denied due to insufficient justification", + level: "REGULAR", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { requestsDenyRequest } from "opal-mcp/funcs/requestsDenyRequest.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await requestsDenyRequest(opalMcp, { + id: "83015915-58ae-4cce-b92d-608ff073ece1", + requestBody: { + comment: "Denied due to insufficient justification", + level: "REGULAR", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("requestsDenyRequest failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DenyRequestRequest](../../models/operations/denyrequestrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.DenyRequestResponse](../../models/operations/denyrequestresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getRequestComments + +Returns a list of comments for a specific request. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.requests.getRequestComments({ + id: "bfb1ef34-8ecf-46e5-bdf4-38abe7c6da89", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { requestsGetRequestComments } from "opal-mcp/funcs/requestsGetRequestComments.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await requestsGetRequestComments(opalMcp, { + id: "bfb1ef34-8ecf-46e5-bdf4-38abe7c6da89", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("requestsGetRequestComments failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetRequestCommentsRequest](../../models/operations/getrequestcommentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.RequestCommentList](../../models/components/requestcommentlist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createRequestComment + +Comment on an access request + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.requests.createRequestComment({ + id: "4a929b40-a2e3-4dca-b8ec-1af35bdc7e43", + requestBody: { + comment: "The Apollotech B340 is an affordable wireless mouse with reliable connectivity, 12 months battery life and modern design", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { requestsCreateRequestComment } from "opal-mcp/funcs/requestsCreateRequestComment.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await requestsCreateRequestComment(opalMcp, { + id: "4a929b40-a2e3-4dca-b8ec-1af35bdc7e43", + requestBody: { + comment: "The Apollotech B340 is an affordable wireless mouse with reliable connectivity, 12 months battery life and modern design", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("requestsCreateRequestComment failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateRequestCommentRequest](../../models/operations/createrequestcommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateRequestCommentResponse](../../models/operations/createrequestcommentresponse.md)\>** + +### Errors + | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/resources/README.md b/docs/sdks/resources/README.md index a794cac1..64be49b8 100644 --- a/docs/sdks/resources/README.md +++ b/docs/sdks/resources/README.md @@ -1,5 +1,4 @@ # Resources -(*resources*) ## Overview @@ -7,10 +6,10 @@ Operations related to resources ### Available Operations -* [getResources](#getresources) - Returns a list of resources for your organization. +* [getResources](#getresources) - Get resources * [updateResources](#updateresources) - Bulk updates a list of resources. * [createResource](#createresource) - Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources. -* [getResource](#getresource) - Retrieves a resource. +* [getResource](#getresource) - Get resource by ID * [deleteResource](#deleteresource) - Deletes a resource. * [getResourceMessageChannels](#getresourcemessagechannels) - Gets the list of audit message channels attached to a resource. * [setResourceMessageChannels](#setresourcemessagechannels) - Sets the list of audit message channels attached to a resource. @@ -21,17 +20,19 @@ Operations related to resources * [getResourceReviewerStages](#getresourcereviewerstages) - Gets the list reviewer stages for a resource. * [setResourceReviewerStages](#setresourcereviewerstages) - Sets the list of reviewer stages for a resource. * [getResourceNhis](#getresourcenhis) - Gets the list of non-human identities with access to this resource. -* [getResourceUsers](#getresourceusers) - Gets the list of users for this resource. +* [getResourceUsers](#getresourceusers) - Get resource users * [addResourceNhi](#addresourcenhi) - Gives a non-human identity access to this resource. * [deleteResourceNhi](#deleteresourcenhi) - Removes a non-human identity's direct access from this resource. * [addResourceUser](#addresourceuser) - Adds a user to this resource. * [updateResourceUser](#updateresourceuser) - Updates a user's access level or duration on this resource. * [deleteResourceUser](#deleteresourceuser) - Removes a user's direct access from this resource. -* [getResourceUser](#getresourceuser) - Returns information about a specific user's access to a resource. +* [getResourceUser](#getresourceuser) - Get resource user * [~~resourceUserAccessStatusRetrieve~~](#resourceuseraccessstatusretrieve) - Get user's access status to a resource. :warning: **Deprecated** * [getResourceTags](#getresourcetags) - Returns all tags applied to the resource. * [getResourceScopedRolePermissions](#getresourcescopedrolepermissions) - Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. * [setResourceScopedRolePermissions](#setresourcescopedrolepermissions) - Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. +* [getUserResources](#getuserresources) - Gets the list of resources for this user. +* [getResourceGroups](#getresourcegroups) - Returns a list of groups that grant access to the resource ## getResources @@ -260,13 +261,7 @@ async function run() { resourceType: "OKTA_ROLE", appId: "f454d283-ca87-4a8a-bdbb-df212eca5353", remoteResourceId: "API_ACCESS_MANAGEMENT_ADMIN-51d203da-313a-4fd9-8fcf-420ce6312345", - metadata: "{\n" + - " \"okta_directory_role\":\n" + - " {\n" + - " \"role_id\": \"SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345\",\n" + - " \"role_type\": \"SUPER_ADMIN\",\n" + - " },\n" + - "}", + metadata: "{\n \"okta_directory_role\":\n {\n \"role_id\": \"SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345\",\n \"role_type\": \"SUPER_ADMIN\",\n },\n}", }); console.log(result); @@ -296,13 +291,7 @@ async function run() { resourceType: "OKTA_ROLE", appId: "f454d283-ca87-4a8a-bdbb-df212eca5353", remoteResourceId: "API_ACCESS_MANAGEMENT_ADMIN-51d203da-313a-4fd9-8fcf-420ce6312345", - metadata: "{\n" + - " \"okta_directory_role\":\n" + - " {\n" + - " \"role_id\": \"SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345\",\n" + - " \"role_type\": \"SUPER_ADMIN\",\n" + - " },\n" + - "}", + metadata: "{\n \"okta_directory_role\":\n {\n \"role_id\": \"SUPER_ADMIN-b52aa037-4a35-4ac3-9350-f6260fd12345\",\n \"role_type\": \"SUPER_ADMIN\",\n },\n}", }); if (res.ok) { const { value: result } = res; @@ -2084,6 +2073,158 @@ run(); ### Errors +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getUserResources + +Gets the list of resources for this user. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.resources.getUserResources({ + userId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + limit: 200, + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + includeUnmanaged: false, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { resourcesGetUserResources } from "opal-mcp/funcs/resourcesGetUserResources.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await resourcesGetUserResources(opalMcp, { + userId: "4baf8423-db0a-4037-a4cf-f79c60cb67a5", + limit: 200, + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + includeUnmanaged: false, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("resourcesGetUserResources failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetUserResourcesRequest](../../models/operations/getuserresourcesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ResourceAccessUserList](../../models/components/resourceaccessuserlist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getResourceGroups + +Returns a list of groups that grant access to the resource + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.resources.getResourceGroups({ + resourceId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { resourcesGetResourceGroups } from "opal-mcp/funcs/resourcesGetResourceGroups.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await resourcesGetResourceGroups(opalMcp, { + resourceId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("resourcesGetResourceGroups failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetResourceGroupsRequest](../../models/operations/getresourcegroupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.GroupResourceList](../../models/components/groupresourcelist.md)\>** + +### Errors + | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 39af1d93..3a39346f 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -1,5 +1,4 @@ # Sessions -(*sessions*) ## Overview diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index 215eebe0..189eaf5f 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -1,5 +1,4 @@ # Tags -(*tags*) ## Overview @@ -7,11 +6,11 @@ Operations related to tags ### Available Operations -* [getTagByID](#gettagbyid) - UNSTABLE. May be removed at any time. Gets a tag with the given id. +* [getTagByID](#gettagbyid) - Get tag by ID * [deleteTagByID](#deletetagbyid) - UNSTABLE. May be removed at any time. Deletes a tag with the given id. * [getTag](#gettag) - Gets a tag with the given key and value. * [createTag](#createtag) - Creates a tag with the given key and value. -* [getTags](#gettags) - Returns a list of tags created by your organization. +* [getTags](#gettags) - Get tags * [addUserTag](#addusertag) - Applies a tag to a user. * [removeUserTag](#removeusertag) - Removes a tag from a user. * [addGroupTag](#addgrouptag) - Applies a tag to a group. diff --git a/docs/sdks/scopedrolepermissions/README.md b/docs/sdks/tokens/README.md similarity index 75% rename from docs/sdks/scopedrolepermissions/README.md rename to docs/sdks/tokens/README.md index 0486633b..fde21c8b 100644 --- a/docs/sdks/scopedrolepermissions/README.md +++ b/docs/sdks/tokens/README.md @@ -1,22 +1,21 @@ -# ScopedRolePermissions -(*scopedRolePermissions*) +# Tokens ## Overview -Operations related to scoped role permissions +Operations related to API tokens ### Available Operations -* [getResourceScopedRolePermissions](#getresourcescopedrolepermissions) - Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. -* [setResourceScopedRolePermissions](#setresourcescopedrolepermissions) - Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. +* [getTokens](#gettokens) - Get tokens +* [deleteToken](#deletetoken) - Delete token -## getResourceScopedRolePermissions +## getTokens -Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. +Returns a list of first-party API tokens for your organization. Requires admin access. ### Example Usage - + ```typescript import { OpalMcp } from "opal-mcp"; @@ -25,8 +24,10 @@ const opalMcp = new OpalMcp({ }); async function run() { - const result = await opalMcp.scopedRolePermissions.getResourceScopedRolePermissions({ - resourceId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + const result = await opalMcp.tokens.getTokens({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + userId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", }); console.log(result); @@ -41,7 +42,7 @@ The standalone function version of this method: ```typescript import { OpalMcpCore } from "opal-mcp/core.js"; -import { resourcesGetResourceScopedRolePermissions } from "opal-mcp/funcs/resourcesGetResourceScopedRolePermissions.js"; +import { tokensGetTokens } from "opal-mcp/funcs/tokensGetTokens.js"; // Use `OpalMcpCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -50,14 +51,16 @@ const opalMcp = new OpalMcpCore({ }); async function run() { - const res = await resourcesGetResourceScopedRolePermissions(opalMcp, { - resourceId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", + const res = await tokensGetTokens(opalMcp, { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + userId: "29827fb8-f2dd-4e80-9576-28e31e9934ac", }); if (res.ok) { const { value: result } = res; console.log(result); } else { - console.log("resourcesGetResourceScopedRolePermissions failed:", res.error); + console.log("tokensGetTokens failed:", res.error); } } @@ -68,14 +71,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetResourceScopedRolePermissionsRequest](../../models/operations/getresourcescopedrolepermissionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetTokensRequest](../../models/operations/gettokensrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ScopedRolePermissionList](../../models/components/scopedrolepermissionlist.md)\>** +**Promise\<[components.PaginatedTokensList](../../models/components/paginatedtokenslist.md)\>** ### Errors @@ -83,13 +86,13 @@ run(); | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | -## setResourceScopedRolePermissions +## deleteToken -Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. +Deletes a first-party API token. Admins can delete any token. Non-admins can only delete their own tokens when the organization allows all users to create API tokens. ### Example Usage - + ```typescript import { OpalMcp } from "opal-mcp"; @@ -98,24 +101,11 @@ const opalMcp = new OpalMcp({ }); async function run() { - const result = await opalMcp.scopedRolePermissions.setResourceScopedRolePermissions({ - resourceId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", - scopedRolePermissionList: { - permissions: [ - { - targetIds: [ - "a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1", - "8294e9c9-deb6-48e9-9c99-da2a1e04a87f", - ], - targetType: "RESOURCE", - permissionName: "READ", - allowAll: false, - }, - ], - }, + await opalMcp.tokens.deleteToken({ + tokenId: "f454d283-ca87-4a8a-bdbb-df212eca5353", }); - console.log(result); + } run(); @@ -127,7 +117,7 @@ The standalone function version of this method: ```typescript import { OpalMcpCore } from "opal-mcp/core.js"; -import { resourcesSetResourceScopedRolePermissions } from "opal-mcp/funcs/resourcesSetResourceScopedRolePermissions.js"; +import { tokensDeleteToken } from "opal-mcp/funcs/tokensDeleteToken.js"; // Use `OpalMcpCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -136,27 +126,14 @@ const opalMcp = new OpalMcpCore({ }); async function run() { - const res = await resourcesSetResourceScopedRolePermissions(opalMcp, { - resourceId: "1b978423-db0a-4037-a4cf-f79c60cb67b3", - scopedRolePermissionList: { - permissions: [ - { - targetIds: [ - "a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1", - "8294e9c9-deb6-48e9-9c99-da2a1e04a87f", - ], - targetType: "RESOURCE", - permissionName: "READ", - allowAll: false, - }, - ], - }, + const res = await tokensDeleteToken(opalMcp, { + tokenId: "f454d283-ca87-4a8a-bdbb-df212eca5353", }); if (res.ok) { const { value: result } = res; - console.log(result); + } else { - console.log("resourcesSetResourceScopedRolePermissions failed:", res.error); + console.log("tokensDeleteToken failed:", res.error); } } @@ -167,14 +144,14 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SetResourceScopedRolePermissionsRequest](../../models/operations/setresourcescopedrolepermissionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteTokenRequest](../../models/operations/deletetokenrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ScopedRolePermissionList](../../models/components/scopedrolepermissionlist.md)\>** +**Promise\** ### Errors diff --git a/docs/sdks/uars/README.md b/docs/sdks/uars/README.md index d37b6dd0..889d19e9 100644 --- a/docs/sdks/uars/README.md +++ b/docs/sdks/uars/README.md @@ -1,19 +1,23 @@ -# Uars -(*uars*) +# ~~Uars~~ + +> [!WARNING] +> This SDK is **DEPRECATED** ## Overview -Operations related to UARs +Operations related to UARs. Deprecated in favor of the `campaigns` API. ### Available Operations -* [getUARs](#getuars) - Returns a list of `UAR` objects. -* [createUar](#createuar) - Starts a User Access Review. -* [getUar](#getuar) - Retrieves a specific UAR. +* [~~getUARs~~](#getuars) - Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. :warning: **Deprecated** +* [~~createUar~~](#createuar) - Starts a User Access Review. Deprecated in favor of `POST /campaigns`. :warning: **Deprecated** +* [~~getUar~~](#getuar) - Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. :warning: **Deprecated** + +## ~~getUARs~~ -## getUARs +Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. -Returns a list of `UAR` objects. +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ### Example Usage @@ -90,9 +94,11 @@ run(); | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | -## createUar +## ~~createUar~~ -Starts a User Access Review. +Starts a User Access Review. Deprecated in favor of `POST /campaigns`. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ### Example Usage @@ -221,9 +227,11 @@ run(); | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | -## getUar +## ~~getUar~~ + +Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. -Retrieves a specific UAR. +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ### Example Usage diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index cbf16f89..317ae257 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -1,5 +1,4 @@ # Users -(*users*) ## Overview @@ -22,6 +21,8 @@ Authentication: - Respects standard Opal authorization rules * [getUsers](#getusers) - Returns a list of users for your organization. +* [getRemoteUsers](#getremoteusers) - Returns a list of remote users for your organization. +* [getUserWhoami](#getuserwhoami) - Returns the user that the provided API token authenticates as. * [getUserTags](#getusertags) - Returns all tags applied to the user. ## user @@ -191,6 +192,167 @@ run(); | --------------- | --------------- | --------------- | | errors.APIError | 4XX, 5XX | \*/\* | +## getRemoteUsers + +Returns a list of remote users for your organization. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.users.getRemoteUsers({ + thirdPartyProvider: [ + "GIT_HUB", + ], + userId: [ + "32acc112-21ff-4669-91c2-21e27683eaa1", + ], + remoteId: [ + "1234567890", + ], + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { usersGetRemoteUsers } from "opal-mcp/funcs/usersGetRemoteUsers.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await usersGetRemoteUsers(opalMcp, { + thirdPartyProvider: [ + "GIT_HUB", + ], + userId: [ + "32acc112-21ff-4669-91c2-21e27683eaa1", + ], + remoteId: [ + "1234567890", + ], + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + pageSize: 200, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("usersGetRemoteUsers failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetRemoteUsersRequest](../../models/operations/getremoteusersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PaginatedRemoteUsersList](../../models/components/paginatedremoteuserslist.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getUserWhoami + +Returns the user that the provided API token authenticates as. + +### Example Usage + + +```typescript +import { OpalMcp } from "opal-mcp"; + +const opalMcp = new OpalMcp({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const result = await opalMcp.users.getUserWhoami(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpalMcpCore } from "opal-mcp/core.js"; +import { usersGetUserWhoami } from "opal-mcp/funcs/usersGetUserWhoami.js"; + +// Use `OpalMcpCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const opalMcp = new OpalMcpCore({ + bearerAuth: process.env["OPALMCP_BEARER_AUTH"] ?? "", +}); + +async function run() { + const res = await usersGetUserWhoami(opalMcp); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("usersGetUserWhoami failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.User](../../models/components/user.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + ## getUserTags Returns all tags applied to the user. diff --git a/examples/.env.template b/examples/.env.template new file mode 100644 index 00000000..a9aace7c --- /dev/null +++ b/examples/.env.template @@ -0,0 +1,14 @@ +# opal-mcp SDK Environment Variables +# Copy this file to .env and fill in your actual values +# DO NOT commit the .env file to version control + +# Security Configuration +# The SDK supports loading security credentials from environment variables +# with the prefix: OPALMCP_ +# +# Security environment variables: +OPALMCP_BEARER_AUTH=your_bearer_auth_here + +# Debug Configuration +# Enable HTTP request/response logging for debugging +OPALMCP_DEBUG=true diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..7cac3d43 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,31 @@ +# opal-mcp Examples + +This directory contains example scripts demonstrating how to use the opal-mcp SDK. + +## Prerequisites + +- Node.js (v18 or higher) +- npm + +## Setup + +1. Copy `.env.template` to `.env`: + ```bash + cp .env.template .env + ``` + +2. Edit `.env` and add your actual credentials (API keys, tokens, etc.) + +## Running the Examples + +To run an example file from the examples directory: + +```bash +npm run build && npx tsx example.ts +``` + +## Creating new examples + +Duplicate an existing example file, they won't be overwritten by the generation process. + + diff --git a/examples/appsGetApps.example.ts b/examples/appsGetApps.example.ts index fe722e28..6dc74b48 100644 --- a/examples/appsGetApps.example.ts +++ b/examples/appsGetApps.example.ts @@ -8,7 +8,7 @@ dotenv.config(); * Example usage of the opal-mcp SDK * * To run this example from the examples directory: - * npm run build && npx tsx appsGetApps.ts + * npm run build && npx tsx appsGetApps.example.ts */ import { OpalMcp } from "opal-mcp"; @@ -18,7 +18,7 @@ const opalMcp = new OpalMcp({ }); async function main() { - const result = await opalMcp.getApps({ + const result = await opalMcp.apps.getApps({ appTypeFilter: [ "OKTA_DIRECTORY", "GIT_HUB", diff --git a/examples/package-lock.json b/examples/package-lock.json new file mode 100644 index 00000000..368a3315 --- /dev/null +++ b/examples/package-lock.json @@ -0,0 +1,596 @@ +{ + "name": "opal-mcp-examples", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "opal-mcp-examples", + "version": "1.0.0", + "dependencies": { + "opal-mcp": "file:.." + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + } + }, + "..": { + "name": "opal-mcp", + "version": "0.8.0", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.26.0", + "zod": "^3.25.0 || ^4.0.0" + }, + "bin": { + "mcp": "bin/mcp-server.js" + }, + "devDependencies": { + "@eslint/js": "^9.26.0", + "@stricli/core": "^1.1.1", + "@types/express": "^4.17.21", + "bun": "1.2.17", + "bun-types": "1.2.17", + "eslint": "^9.26.0", + "express": "^4.21.2", + "globals": "^15.14.0", + "tshy": "^3.3.2", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/node": { + "version": "20.19.43", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.43.tgz", + "integrity": "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/opal-mcp": { + "resolved": "..", + "link": true + }, + "node_modules/tsx": { + "version": "4.23.12", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.12.tgz", + "integrity": "sha512-FDf4L4sYzKtzWYhU/Xm0AQFdTjdIxNo9ElTf2mxXM6k8YMHXzYUe4yODVaXP4V9uMFbVg8c0qyBccK2OOxb45Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/examples/package.json b/examples/package.json new file mode 100644 index 00000000..d673d443 --- /dev/null +++ b/examples/package.json @@ -0,0 +1,18 @@ +{ + "name": "opal-mcp-examples", + "version": "1.0.0", + "private": true, + "scripts": { + "build:parent": "cd .. && npm i && npm run build && cd -", + "build:examples": "npm i", + "build": "npm run build:parent && npm run build:examples" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + }, + "dependencies": { + "opal-mcp": "file:.." + } +} \ No newline at end of file diff --git a/jsr.json b/jsr.json index dea80953..df021389 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "opal-mcp", - "version": "0.7.0", + "version": "0.8.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/openapi.yaml b/openapi.yaml index d68e77aa..fd3a3cd1 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -18,8 +18,14 @@ tags: description: Operations related to apps - name: bundles description: Operations related to bundles + - name: campaigns + description: Operations related to access review campaigns - name: configuration-templates description: Operations related to configuration templates + - name: delegations + description: Operations related to request reviewer delegations + - name: event-streams + description: Operations related to event streaming connections - name: events description: Operations related to events - name: groups @@ -34,25 +40,30 @@ tags: description: Operations related to non-human identities - name: on-call-schedules description: Operations related to on-call schedules + - name: opal-queries + description: Operations related to OpalQuery - name: owners description: Operations related to owners - name: requests description: Operations related to requests - name: resources description: Operations related to resources - - name: scoped-role-permissions - description: Operations related to scoped role permissions + - name: paladin + description: Operations related to Paladin - name: sessions description: Operations related to sessions - name: tags description: Operations related to tags + - name: tokens + description: Operations related to API tokens - name: uars - description: Operations related to UARs + description: Operations related to UARs. Deprecated in favor of the `campaigns` API. - name: users description: Operations related to users paths: /apps: get: + summary: Get apps description: Returns a list of `App` objects. operationId: getApps parameters: @@ -95,6 +106,7 @@ paths: disabled: false /apps/{app_id}: get: + summary: Get app by ID description: Returns an `App` object. operationId: getApp parameters: @@ -124,6 +136,7 @@ paths: disabled: false /bundles: get: + summary: Get bundles description: Returns a list of `Bundle` objects. operationId: getBundles parameters: @@ -205,6 +218,7 @@ paths: disabled: false /bundles/{bundle_id}: get: + summary: Get bundle by ID description: Returns a `Bundle` object. operationId: getBundle parameters: @@ -638,382 +652,258 @@ paths: x-speakeasy-mcp: scopes: [write] disabled: false - /configuration-templates: - get: - description: Returns a list of `ConfigurationTemplate` objects. - operationId: getConfigurationTemplates - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/PaginatedConfigurationTemplateList" - description: One page worth of configuration templates for your organization. - security: - - BearerAuth: [] - tags: - - configuration-templates - x-speakeasy-mcp: - scopes: [read] - disabled: false - post: - description: Creates a configuration template. - operationId: createConfigurationTemplate - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateConfigurationTemplateInfo" - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ConfigurationTemplate" - description: The configuration template just created. - security: - - BearerAuth: [] - tags: - - configuration-templates - x-speakeasy-mcp: - scopes: [write] - disabled: false - put: - description: Update a configuration template. - operationId: updateConfigurationTemplate - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ConfigurationTemplate" - description: The configuration template just updated. - requestBody: - description: Configuration template to be updated - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateConfigurationTemplateInfo" - security: - - BearerAuth: [] - tags: - - configuration-templates - x-speakeasy-mcp: - scopes: [write] - disabled: false - /configuration-templates/{configuration_template_id}: - delete: - description: Deletes a configuration template. - operationId: deleteConfigurationTemplate - parameters: - - description: The ID of the configuration template. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: configuration_template_id - required: true - schema: - format: uuid - type: string - style: simple - responses: - "200": - description: The configuration template was successfully deleted. - security: - - BearerAuth: [] - tags: - - configuration-templates - x-speakeasy-mcp: - scopes: [write] - disabled: false - /events: + /campaigns: get: - description: Returns a list of `Event` objects. - operationId: events + description: Returns a list of `Campaign` objects. + operationId: getCampaigns parameters: - - description: A start date filter for the events. - examples: - withDate: - summary: Example with date - value: 2021-11-01 - withDatetime: - summary: Example with date and time in ISO 8601 datetime format. - value: 2025-01-01T00:00:00Z + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query - name: start_date_filter + name: cursor required: false schema: type: string style: form - - description: An end date filter for the events. - examples: - withDate: - summary: Example with date - value: 2021-11-12 - withDatetime: - summary: Example with date and time in ISO 8601 datetime format. - value: 2025-01-01T00:00:00Z + - description: Number of results to return per page. Default is 200. + example: 200 explode: true in: query - name: end_date_filter + name: page_size required: false schema: - type: string + type: integer + maximum: 1000 style: form - - description: An actor filter for the events. Supply the ID of the actor. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + - description: Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). + example: Q3 Access Review explode: true in: query - name: actor_filter + name: name required: false schema: - format: uuid type: string style: form - - description: An object filter for the events. Supply the ID of the object. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + - description: Filter by campaign status. Status is derived from lifecycle timestamps and review progress. + example: ONGOING explode: true in: query - name: object_filter + name: status required: false schema: - format: uuid - type: string + $ref: "#/components/schemas/CampaignStatusEnum" style: form - - description: An event type filter for the events. - example: USER_MFA_RESET + - description: Include campaigns created after this timestamp (exclusive). ISO 8601 format. + example: 2026-01-01T00:00:00Z explode: true in: query - name: event_type_filter + name: created_at_after required: false schema: type: string + format: date-time style: form - - description: An API filter for the events. Supply the name and preview of the API token. - example: fullaccess:**************************M_g== + - description: Include campaigns created before this timestamp (exclusive). ISO 8601 format. + example: 2026-12-31T23:59:59Z explode: true in: query - name: api_token_filter + name: created_at_before required: false schema: type: string + format: date-time style: form - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + - description: Include campaigns started after this timestamp (exclusive). ISO 8601 format. + example: 2026-01-01T00:00:00Z explode: true in: query - name: cursor + name: started_at_after required: false schema: type: string + format: date-time style: form - - description: Number of results to return per page. Default is 200. - example: 200 + - description: Include campaigns started before this timestamp (exclusive). ISO 8601 format. + example: 2026-12-31T23:59:59Z explode: true in: query - name: page_size + name: started_at_before required: false schema: - type: integer - maximum: 1000 + type: string + format: date-time style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/PaginatedEventList" - description: One page worth of events with the appropriate filters applied. - security: - - BearerAuth: [] - tags: - - events - x-speakeasy-mcp: - scopes: [read] - disabled: false - x-speakeasy-pagination: - type: cursor - inputs: - - name: cursor - in: parameters - type: cursor - - name: page_size - in: parameters - type: limit - outputs: - results: $.results - nextCursor: $.next - /groups: - get: - description: Returns a list of groups for your organization. - operationId: getGroups - parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + - description: Include campaigns ended after this timestamp (exclusive). ISO 8601 format. + example: 2026-01-01T00:00:00Z explode: true in: query - name: cursor + name: ended_at_after required: false schema: type: string + format: date-time style: form - - description: Number of results to return per page. Default is 200. - example: 200 + - description: Include campaigns ended before this timestamp (exclusive). ISO 8601 format. + example: 2026-12-31T23:59:59Z explode: true in: query - name: page_size + name: ended_at_before required: false schema: - type: integer - maximum: 1000 + type: string + format: date-time style: form - - description: The group type to filter by. - example: OPAL_GROUP + - description: Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. + example: 2026-01-01T00:00:00Z explode: true in: query - name: group_type_filter - required: false - schema: - $ref: "#/components/schemas/GroupTypeEnum" - style: form - - description: The group ids to filter by. - example: - - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - - 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: query - name: group_ids + name: stopped_at_after required: false schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array + type: string + format: date-time style: form - - description: Group name. - example: example-name + - description: Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. + example: 2026-12-31T23:59:59Z explode: true in: query - name: group_name + name: stopped_at_before required: false schema: type: string + format: date-time style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedGroupsList" - description: One page worth groups associated with your organization. + $ref: "#/components/schemas/PaginatedCampaignsList" + description: A list of campaigns for your organization. security: - BearerAuth: [] tags: - - groups + - campaigns x-speakeasy-mcp: scopes: [read] disabled: false - x-speakeasy-pagination: - type: cursor - inputs: - - name: cursor - in: parameters - type: cursor - - name: page_size - in: parameters - type: limit - outputs: - results: $.results - nextCursor: $.next - put: - description: Bulk updates a list of groups. - operationId: updateGroups + post: + description: | + Creates a campaign. Campaign scope only supports direct access edges: + `configuration.query.edgeFilter.directOnly` defaults to `true`, is + always stored as `true`, and passing `false` returns 400. + operationId: createCampaign requestBody: - description: Groups to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateGroupInfoList" + $ref: "#/components/schemas/CreateCampaignInfo" responses: - "200": + "201": + description: The campaign successfully created. content: application/json: schema: - $ref: "#/components/schemas/UpdateGroupInfoList" - description: The resulting updated group infos. + $ref: "#/components/schemas/Campaign" security: - BearerAuth: [] tags: - - groups + - campaigns x-speakeasy-mcp: scopes: [write] disabled: false - post: - description: Creates an Opal group or [imports a remote group](https://docs.opal.dev/reference/end-system-objects). - operationId: createGroup - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateGroupInfo" + /campaigns/{campaign_id}: + get: + summary: Get campaign by ID + description: Returns a `Campaign` object. + operationId: getCampaign + parameters: + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true + in: path + name: campaign_id + required: true + schema: + format: uuid + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Group" - description: The group just created. + $ref: "#/components/schemas/Campaign" + description: The requested `Campaign`. security: - BearerAuth: [] tags: - - groups + - campaigns x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false - /groups/{group_id}: - get: - description: Returns a `Group` object. - operationId: getGroup + put: + summary: Update campaign + description: | + Partially updates a campaign. Omitted fields are left unchanged. + `configuration.query` and `configuration.reviewer_assignment_policy` + cannot be updated after create; including either field returns 400. + `configuration.cron_expression` and + `configuration.recurring_duration_days` may only be set on template + campaigns; setting them on a one-off campaign returns 400. + `configuration.is_template` is immutable and not accepted on update. + Configuration updates on a stopped or ended (non-template) campaign + return 400. Name-only updates are still allowed. + operationId: updateCampaign parameters: - - description: The ID of the group. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 explode: true in: path - name: group_id + name: campaign_id required: true schema: format: uuid type: string style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateCampaignInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Group" - description: The requested `Group`. + $ref: "#/components/schemas/Campaign" + description: The updated `Campaign`. security: - BearerAuth: [] tags: - - groups + - campaigns x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - delete: - description: Deletes a group. - operationId: delete_group + /campaigns/{campaign_id}/start: + post: + summary: Start campaign + description: | + Starts a draft campaign immediately, setting `started_at` and + `started_by_user_id`. Returns 400 if the campaign is not in draft + state, or if it is a recurring template (`is_template: true`) — + templates spawn draft campaigns on their schedule and cannot be + started directly. + operationId: startCampaign parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true in: path - name: group_id + name: campaign_id required: true schema: format: uuid @@ -1021,422 +911,414 @@ paths: style: simple responses: "200": - description: The group was successfully deleted. + content: + application/json: + schema: + $ref: "#/components/schemas/Campaign" + description: The started `Campaign`. security: - BearerAuth: [] tags: - - groups + - campaigns x-speakeasy-mcp: scopes: [write] disabled: false - /groups/{group_id}/message-channels: - get: - description: Gets the list of audit and reviewer message channels attached to a group. - operationId: get_group_message_channels + /campaigns/{campaign_id}/stop: + post: + summary: Stop campaign + description: | + Stops an ongoing campaign immediately, setting `stopped_at` and + `stopped_by_user_id`. Returns 400 if the campaign has not started or + has already stopped. + operationId: stopCampaign parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true in: path - name: group_id + name: campaign_id required: true schema: format: uuid type: string style: simple + requestBody: + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/StopCampaignRequest" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/MessageChannelList" - description: The audit and reviewer message channels attached to the group. + $ref: "#/components/schemas/Campaign" + description: The stopped `Campaign`. security: - BearerAuth: [] tags: - - groups + - campaigns x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - put: - description: Sets the list of audit message channels attached to a group. - operationId: set_group_message_channels + /campaigns/{campaign_id}/end: + post: + summary: End campaign + description: | + Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, + applying pending access changes, and queuing report generation. + Returns 400 unless the campaign is started and stopped and not already + ended. + operationId: endCampaign parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: true in: path - name: group_id + name: campaign_id required: true schema: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/MessageChannelIDList" responses: "200": content: application/json: schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The updated audit message channel IDs for the group. + $ref: "#/components/schemas/Campaign" + description: The ended `Campaign`. security: - BearerAuth: [] tags: - - groups + - campaigns x-speakeasy-mcp: scopes: [write] disabled: false - /groups/{group_id}/on-call-schedules: + /configuration-templates: get: - description: Gets the list of on call schedules attached to a group. - operationId: get_group_on_call_schedules - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + description: Returns a list of `ConfigurationTemplate` objects. + operationId: getConfigurationTemplates responses: "200": content: application/json: schema: - $ref: "#/components/schemas/OnCallScheduleList" - description: The on call schedules attached to the group. + $ref: "#/components/schemas/PaginatedConfigurationTemplateList" + description: One page worth of configuration templates for your organization. security: - BearerAuth: [] tags: - - groups + - configuration-templates x-speakeasy-mcp: scopes: [read] disabled: false - put: - description: Sets the list of on call schedules attached to a group. - operationId: set_group_on_call_schedules - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + post: + description: Creates a configuration template. + operationId: createConfigurationTemplate requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/OnCallScheduleIDList" + $ref: "#/components/schemas/CreateConfigurationTemplateInfo" responses: "200": content: application/json: schema: - items: - example: bb0197c0-5ea5-45d9-b3b7-b6c439be6435 - format: uuid - type: string - type: array - description: The updated on call schedule IDs for the group. + $ref: "#/components/schemas/ConfigurationTemplate" + description: The configuration template just created. security: - BearerAuth: [] tags: - - groups + - configuration-templates x-speakeasy-mcp: scopes: [write] disabled: false - /groups/{group_id}/resources: - get: - description: Gets the list of resources that the group gives access to. - operationId: get_group_resources - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + put: + description: Update a configuration template. + operationId: updateConfigurationTemplate responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupResourceList" - description: The resources that the group gives access to. + $ref: "#/components/schemas/ConfigurationTemplate" + description: The configuration template just updated. + requestBody: + description: Configuration template to be updated + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateConfigurationTemplateInfo" security: - BearerAuth: [] tags: - - groups + - configuration-templates x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - put: - description: Sets the list of resources that the group gives access to. - operationId: set_group_resources + /configuration-templates/{configuration_template_id}: + delete: + description: Deletes a configuration template. + operationId: deleteConfigurationTemplate parameters: - - description: The ID of the group. + - description: The ID of the configuration template. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: group_id + name: configuration_template_id required: true schema: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateGroupResourcesInfo" responses: "200": - description: The group resource were successfully set. + description: The configuration template was successfully deleted. security: - BearerAuth: [] tags: - - groups + - configuration-templates x-speakeasy-mcp: scopes: [write] disabled: false - /groups/{group_id}/containing-groups: + /event-streams: get: - description: Gets the list of groups that the group gives access to. - operationId: get_group_containing_groups - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + summary: Get event streams + description: Returns a list of configured event streaming connections for your organization. + operationId: getEventStreams responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupContainingGroupList" - description: The resources that the group gives access to. + $ref: "#/components/schemas/EventStreamList" + description: A list of event streams for your organization. security: - BearerAuth: [] tags: - - groups + - event-streams x-speakeasy-mcp: scopes: [read] disabled: false post: - description: Creates a new containing group. - operationId: add_group_containing_group - parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple + summary: Create event stream + description: Creates a new event streaming connection. + operationId: createEventStream requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/GroupContainingGroup" + $ref: "#/components/schemas/CreateEventStreamInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupContainingGroup" - description: The created `GroupContainingGroup` object. + $ref: "#/components/schemas/EventStream" + description: The event stream just created. Credentials are returned in clear text only on creation. security: - BearerAuth: [] tags: - - groups + - event-streams x-speakeasy-mcp: scopes: [write] disabled: false - /groups/{group_id}/containing-groups/{containing_group_id}: - get: - description: Gets a specific containing group for a group. - operationId: get_group_containing_group + /event-streams/{event_stream_id}: + put: + summary: Update event stream + description: Updates an existing event streaming connection. + operationId: updateEventStream parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the containing group. + - description: The ID of the event stream. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: containing_group_id + name: event_stream_id required: true schema: format: uuid type: string style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateEventStreamInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupContainingGroup" - description: The created `GroupContainingGroup` object. + $ref: "#/components/schemas/EventStream" + description: The updated event stream. security: - BearerAuth: [] tags: - - groups + - event-streams x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false delete: - description: Removes a containing group from a group. - operationId: remove_group_containing_group + summary: Delete event stream + description: Deletes an event streaming connection. + operationId: deleteEventStream parameters: - - description: The ID of the group. + - description: The ID of the event stream. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: group_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the containing group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: containing_group_id + name: event_stream_id required: true schema: format: uuid type: string style: simple responses: - "204": - description: The containing group was successfully removed from the group. + "200": + description: The event stream was successfully deleted. security: - BearerAuth: [] tags: - - groups + - event-streams x-speakeasy-mcp: scopes: [write] disabled: false - /groups/{group_id}/resources/{resource_id}: - post: - description: Adds a resource to a group. - operationId: add_group_resource + /events: + get: + description: Returns a list of `Event` objects. + operationId: events parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: group_id - required: true + - description: A start date filter for the events. + examples: + withDate: + summary: Example with date + value: 2021-11-01 + withDatetime: + summary: Example with date and time in ISO 8601 datetime format. + value: 2025-01-01T00:00:00Z + explode: true + in: query + name: start_date_filter + required: false + schema: + type: string + style: form + - description: An end date filter for the events. + examples: + withDate: + summary: Example with date + value: 2021-11-12 + withDatetime: + summary: Example with date and time in ISO 8601 datetime format. + value: 2025-01-01T00:00:00Z + explode: true + in: query + name: end_date_filter + required: false + schema: + type: string + style: form + - description: An actor filter for the events. Supply the ID of the actor. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: actor_filter + required: false schema: format: uuid type: string - style: simple - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true + style: form + - description: An object filter for the events. Supply the ID of the object. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: object_filter + required: false schema: format: uuid type: string - style: simple - - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess + style: form + - description: An event type filter for the events. + example: USER_MFA_RESET explode: true in: query - name: access_level_remote_id + name: event_type_filter required: false schema: type: string style: form - deprecated: true - requestBody: - required: false - content: - application/json: - schema: - example: - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - duration_minutes: 60 - properties: - access_level_remote_id: - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - type: string - duration_minutes: - description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. - example: 60 - type: integer - maximum: 525960 # One year - minimum: 0 - type: object + - description: An API filter for the events. Supply the name and preview of the API token. + example: fullaccess:**************************M_g== + explode: true + in: query + name: api_token_filter + required: false + schema: + type: string + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupResource" - description: The created `GroupResource` object. + $ref: "#/components/schemas/PaginatedEventList" + description: One page worth of events with the appropriate filters applied. security: - BearerAuth: [] tags: - - groups + - events x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false - /groups/{group_id}/visibility: + x-speakeasy-pagination: + type: cursor + inputs: + - name: cursor + in: parameters + type: cursor + - name: page_size + in: parameters + type: limit + outputs: + results: $.results + nextCursor: $.next + /events/{event_id}: get: - description: Gets the visibility of this group. - operationId: get_group_visibility + summary: Get event by ID + description: Returns an `Event` object. + operationId: getEvent parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the event. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true in: path - name: group_id + name: event_id required: true schema: format: uuid @@ -1447,58 +1329,166 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/VisibilityInfo" - description: The visibility info of this group. + $ref: "#/components/schemas/Event" + description: The requested `Event`. + "404": + description: Event not found. security: - BearerAuth: [] tags: - - groups + - events x-speakeasy-mcp: scopes: [read] disabled: false - put: - description: Sets the visibility of this group. - operationId: set_group_visibility + /groups: + get: + summary: Get groups + description: Returns a list of groups for your organization. + operationId: getGroups parameters: - - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: The group type to filter by. + example: OPAL_GROUP + explode: true + in: query + name: group_type_filter + required: false + schema: + $ref: "#/components/schemas/GroupTypeEnum" + style: form + - description: The group ids to filter by. + example: + - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + - 1b978423-db0a-4037-a4cf-f79c60cb67b3 explode: false - in: path - name: group_id - required: true + in: query + name: group_ids + required: false + schema: + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + style: form + - description: Group name. + example: example-name + explode: true + in: query + name: group_name + required: false schema: - format: uuid type: string - style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/VisibilityInfo" + style: form + - description: The IDs of the tags to filter by. Returns only groups that have any of these tags applied. + in: query + name: tag_ids + required: false + schema: + type: array + items: + format: uuid + type: string responses: "200": content: application/json: schema: - $ref: "#/components/schemas/VisibilityInfo" - description: The visibility info of this group. + $ref: "#/components/schemas/PaginatedGroupsList" + description: One page worth groups associated with your organization. security: - BearerAuth: [] tags: - groups x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false - /groups/{group_id}/reviewers: - get: - deprecated: true - description: Gets the list of owner IDs of the reviewers for a group. - operationId: get_group_reviewers + x-speakeasy-pagination: + type: cursor + inputs: + - name: cursor + in: parameters + type: cursor + - name: page_size + in: parameters + type: limit + outputs: + results: $.results + nextCursor: $.next + put: + description: Bulk updates a list of groups. + operationId: updateGroups + requestBody: + description: Groups to be updated + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateGroupInfoList" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateGroupInfoList" + description: The resulting updated group infos. + security: + - BearerAuth: [] + tags: + - groups + x-speakeasy-mcp: + scopes: [write] + disabled: false + post: + description: Creates an Opal group or [imports a remote group](https://docs.opal.dev/reference/end-system-objects). + operationId: createGroup + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateGroupInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Group" + description: The group just created. + security: + - BearerAuth: [] + tags: + - groups + x-speakeasy-mcp: + scopes: [write] + disabled: false + /groups/{group_id}: + get: + summary: Get group by ID + description: Returns a `Group` object. + operationId: getGroup parameters: - description: The ID of the group. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true in: path name: group_id required: true @@ -1511,12 +1501,8 @@ paths: content: application/json: schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The IDs of owners that are reviewers for this group. + $ref: "#/components/schemas/Group" + description: The requested `Group`. security: - BearerAuth: [] tags: @@ -1524,10 +1510,9 @@ paths: x-speakeasy-mcp: scopes: [read] disabled: false - put: - deprecated: true - description: Sets the list of reviewers for a group. - operationId: set_group_reviewers + delete: + description: Deletes a group. + operationId: delete_group parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1539,23 +1524,9 @@ paths: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/ReviewerIDList" responses: "200": - content: - application/json: - schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The updated IDs of owners that are reviewers for this group + description: The group was successfully deleted. security: - BearerAuth: [] tags: @@ -1563,11 +1534,10 @@ paths: x-speakeasy-mcp: scopes: [write] disabled: false - /groups/{group_id}/reviewer-stages: + /groups/{group_id}/message-channels: get: - deprecated: true - description: Gets the list of reviewer stages for a group. - operationId: get_group_reviewer_stages + description: Gets the list of audit and reviewer message channels attached to a group. + operationId: get_group_message_channels parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1584,11 +1554,8 @@ paths: content: application/json: schema: - description: A list of reviewer stages. - items: - $ref: "#/components/schemas/ReviewerStage" - type: array - description: The reviewer stages for this group. + $ref: "#/components/schemas/MessageChannelList" + description: The audit and reviewer message channels attached to the group. security: - BearerAuth: [] tags: @@ -1597,9 +1564,8 @@ paths: scopes: [read] disabled: false put: - deprecated: true - description: Sets the list of reviewer stages for a group. - operationId: set_group_reviewer_stages + description: Sets the list of audit message channels attached to a group. + operationId: set_group_message_channels parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1616,17 +1582,18 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ReviewerStageList" + $ref: "#/components/schemas/MessageChannelIDList" responses: "200": content: application/json: schema: - description: A list of reviewer stages. items: - $ref: "#/components/schemas/ReviewerStage" + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string type: array - description: The updated reviewer stages for this group. + description: The updated audit message channel IDs for the group. security: - BearerAuth: [] tags: @@ -1634,16 +1601,16 @@ paths: x-speakeasy-mcp: scopes: [write] disabled: false - /groups/{group_id}/tags: + /groups/{group_id}/on-call-schedules: get: - description: Returns all tags applied to the group. - operationId: get_group_tags + description: Gets the list of on call schedules attached to a group. + operationId: get_group_on_call_schedules parameters: - - description: The ID of the group whose tags to return. - name: group_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path + name: group_id required: true schema: format: uuid @@ -1654,8 +1621,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/TagsList" - description: The tags applied to the group. + $ref: "#/components/schemas/OnCallScheduleList" + description: The on call schedules attached to the group. security: - BearerAuth: [] tags: @@ -1663,10 +1630,9 @@ paths: x-speakeasy-mcp: scopes: [read] disabled: false - /groups/{group_id}/users: - get: - description: Gets the list of users for this group. - operationId: get_group_users + put: + description: Sets the list of on call schedules attached to a group. + operationId: set_group_on_call_schedules parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1678,27 +1644,38 @@ paths: format: uuid type: string style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/OnCallScheduleIDList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupUserList" - description: List of users with access to this group. + items: + example: bb0197c0-5ea5-45d9-b3b7-b6c439be6435 + format: uuid + type: string + type: array + description: The updated on call schedule IDs for the group. security: - BearerAuth: [] tags: - groups x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - /groups/{group_id}/users/{user_id}: - put: - description: Updates a user's access level or duration in this group. - operationId: update_group_user + /groups/{group_id}/resources: + get: + description: Gets the list of resources that the group gives access to. + operationId: get_group_resources parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path name: group_id required: true @@ -1706,10 +1683,29 @@ paths: format: uuid type: string style: simple - - description: The ID of the user whose access is being updated. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupResourceList" + description: The resources that the group gives access to. + security: + - BearerAuth: [] + tags: + - groups + x-speakeasy-mcp: + scopes: [read] + disabled: false + put: + description: Sets the list of resources that the group gives access to. + operationId: set_group_resources + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: user_id + name: group_id required: true schema: format: uuid @@ -1720,29 +1716,10 @@ paths: content: application/json: schema: - type: object - example: - duration_minutes: 60 - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - properties: - duration_minutes: - description: The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. - type: integer - maximum: 525960 # One year - example: 120 - access_level_remote_id: - description: The updated remote ID of the access level granted to this user. - type: string - example: arn:aws:iam::590304332660:role/ReadOnlyAccess - required: - - duration_minutes + $ref: "#/components/schemas/UpdateGroupResourcesInfo" responses: "200": - description: The GroupUser was successfully updated. - content: - application/json: - schema: - $ref: "#/components/schemas/GroupUser" + description: The group resource were successfully set. security: - BearerAuth: [] tags: @@ -1750,9 +1727,11 @@ paths: x-speakeasy-mcp: scopes: [write] disabled: false - post: - description: Adds a user to this group. - operationId: add_group_user + /groups/{group_id}/containing-groups: + get: + summary: Get nested groups + description: Gets the list of groups that the group gives access to. + operationId: get_group_containing_groups parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1764,28 +1743,7 @@ paths: format: uuid type: string style: simple - - description: The ID of the user to add. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false - in: path - name: user_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. - example: 60 - explode: true - in: query - name: duration_minutes - required: false - schema: - type: integer - maximum: 525960 # One year - style: form - deprecated: true - - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. + - description: The access level's remote ID to filter by. example: arn:aws:iam::590304332660:role/AdministratorAccess explode: true in: query @@ -1794,44 +1752,23 @@ paths: schema: type: string style: form - deprecated: true - requestBody: - required: false - content: - application/json: - schema: - example: - duration_minutes: 60 - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - properties: - duration_minutes: - description: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. - example: 60 - type: integer - access_level_remote_id: - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - type: string - required: - - duration_minutes - type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupUser" - description: The GroupUser that was created. + $ref: "#/components/schemas/GroupContainingGroupList" + description: The groups that the group gives access to. security: - BearerAuth: [] tags: - groups x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false - delete: - description: Removes a user's access from this group. - operationId: delete_group_user + post: + description: Creates a new containing group. + operationId: add_group_containing_group parameters: - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 @@ -1843,137 +1780,47 @@ paths: format: uuid type: string style: simple - - description: The ID of a user to remove from this group. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false - in: path - name: user_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - example: 30 - explode: true - in: query - name: access_level_remote_id - required: false - schema: - type: string - style: form - responses: - "200": - description: This user's access was successfully removed from this group. - security: - - BearerAuth: [] - tags: - - groups - x-speakeasy-mcp: - scopes: [write] - disabled: false - /group-bindings: - get: - description: Returns a list of `GroupBinding` objects. - operationId: getGroupBindings - parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - schema: - type: integer - maximum: 1000 - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/PaginatedGroupBindingsList" - description: One page worth of group bindings for your organization. - security: - - BearerAuth: [] - tags: - - group-bindings - x-speakeasy-mcp: - scopes: [read] - disabled: false - x-speakeasy-pagination: - type: cursor - inputs: - - name: cursor - in: parameters - type: cursor - - name: page_size - in: parameters - type: limit - outputs: - results: $.results - nextCursor: $.next - post: - description: Creates a group binding. - operationId: createGroupBinding requestBody: required: true content: application/json: schema: - $ref: "#/components/schemas/CreateGroupBindingInfo" + $ref: "#/components/schemas/GroupContainingGroup" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/GroupBinding" - description: The group binding just created. - security: - - BearerAuth: [] - tags: - - group-bindings - x-speakeasy-mcp: - scopes: [write] - disabled: false - put: - description: Bulk updates a list of group bindings. - operationId: updateGroupBindings - requestBody: - description: Group bindings to be updated - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateGroupBindingInfoList" - responses: - "200": - description: The group bindings were successfully updated. + $ref: "#/components/schemas/GroupContainingGroup" + description: The created `GroupContainingGroup` object. security: - BearerAuth: [] tags: - - group-bindings + - groups x-speakeasy-mcp: scopes: [write] disabled: false - /group-bindings/{group_binding_id}: + /groups/{group_id}/containing-groups/{containing_group_id}: get: - description: Returns a `GroupBinding` object. - operationId: getGroupBinding + summary: Get nested group by ID + description: Gets a specific containing group for a group. + operationId: get_group_containing_group parameters: - - description: The ID of the group binding. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: group_binding_id + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the containing group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: containing_group_id required: true schema: format: uuid @@ -1984,128 +1831,132 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/GroupBinding" - description: The requested `GroupBinding`. + $ref: "#/components/schemas/GroupContainingGroup" + description: The created `GroupContainingGroup` object. security: - BearerAuth: [] tags: - - group-bindings + - groups x-speakeasy-mcp: scopes: [read] disabled: false delete: - description: Deletes a group binding. - operationId: deleteGroupBinding + description: Removes a containing group from a group. + operationId: remove_group_containing_group parameters: - - description: The ID of the group binding. + - description: The ID of the member group to remove. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: group_binding_id + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the containing group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: containing_group_id required: true schema: format: uuid type: string style: simple + - description: The remote ID of the member group's access level to filter by. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form responses: - "200": - description: The group binding was successfully deleted. + "204": + description: The member group was successfully removed from the containing group. security: - BearerAuth: [] tags: - - group-bindings + - groups x-speakeasy-mcp: scopes: [write] disabled: false - /idp-group-mappings/{app_resource_id}: - get: - description: Returns the configured set of available `IdpGroupMapping` objects for an Okta app. - operationId: getIdpGroupMappings + /groups/{group_id}/resources/{resource_id}: + post: + description: Adds a resource to a group. + operationId: add_group_resource parameters: - - description: The ID of the Okta app. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: app_resource_id + name: group_id required: true schema: format: uuid type: string style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/IdpGroupMappingList" - description: The configured set of available `IdpGroupMapping` objects for an Okta app. - security: - - BearerAuth: [] - tags: - - idp-group-mappings - x-speakeasy-mcp: - scopes: [read] - disabled: false - put: - description: Updates the list of available `IdpGroupMapping` objects for an Okta app. - operationId: updateIdpGroupMappings - parameters: - - description: The ID of the Okta app. + - description: The ID of the resource. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: app_resource_id + name: resource_id required: true schema: format: uuid type: string style: simple + - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + deprecated: true requestBody: - required: true + required: false content: application/json: schema: + example: + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + duration_minutes: 60 properties: - mappings: - type: array - items: - properties: - group_id: - type: string - format: uuid - alias: - type: string - hidden_from_end_user: - type: boolean - type: object - required: - - mappings + access_level_remote_id: + description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + type: string + duration_minutes: + description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. + example: 60 + type: integer + maximum: 525960 # One year + minimum: 0 type: object responses: "200": - description: The updated set of available `IdpGroupMapping` objects for an Okta app. + content: + application/json: + schema: + $ref: "#/components/schemas/GroupResource" + description: The created `GroupResource` object. security: - BearerAuth: [] tags: - - idp-group-mappings + - groups x-speakeasy-mcp: scopes: [write] disabled: false - /idp-group-mappings/{app_resource_id}/{group_id}/: - delete: - description: Deletes an `IdpGroupMapping` object. - operationId: delete_idp_group_mappings + /groups/{group_id}/visibility: + get: + description: Gets the visibility of this group. + operationId: get_group_visibility parameters: - - description: The ID of the Okta app. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: app_resource_id - required: true - schema: - format: uuid - type: string - style: simple - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false @@ -2116,132 +1967,65 @@ paths: format: uuid type: string style: simple - responses: - "200": - description: The IDP group mapping was successfully deleted. - security: - - BearerAuth: [] - tags: - - idp-group-mappings - x-speakeasy-mcp: - scopes: [write] - disabled: false - /owners: - get: - description: Returns a list of `Owner` objects. - operationId: get_owners - parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form - - description: Owner name to filter by. - example: 200 - explode: true - in: query - name: name - required: false - schema: - type: string - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedOwnersList" - description: One page worth of owners in your organization. + $ref: "#/components/schemas/VisibilityInfo" + description: The visibility info of this group. security: - BearerAuth: [] tags: - - owners + - groups x-speakeasy-mcp: scopes: [read] disabled: false - x-speakeasy-pagination: - type: cursor - inputs: - - name: cursor - in: parameters - type: cursor - - name: page_size - in: parameters - type: limit - outputs: - results: $.results - nextCursor: $.next - post: - description: Creates an owner. - operationId: createOwner - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateOwnerInfo" - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Owner" - description: The owner just created. - security: - - BearerAuth: [] - tags: - - owners - x-speakeasy-mcp: - scopes: [write] - disabled: false put: - description: Bulk updates a list of owners. - operationId: updateOwners + description: Sets the visibility of this group. + operationId: set_group_visibility + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple requestBody: - description: Owners to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateOwnerInfoList" + $ref: "#/components/schemas/VisibilityInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UpdateOwnerInfoList" - description: The resulting updated owner infos. + $ref: "#/components/schemas/VisibilityInfo" + description: The visibility info of this group. security: - BearerAuth: [] tags: - - owners + - groups x-speakeasy-mcp: scopes: [write] disabled: false - /owners/{owner_id}: + /groups/{group_id}/reviewers: get: - description: Returns an `Owner` object. - operationId: getOwner + deprecated: true + description: Gets the list of owner IDs of the reviewers for a group. + operationId: get_group_reviewers parameters: - - description: The ID of the owner. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: owner_id + name: group_id required: true schema: format: uuid @@ -2252,77 +2036,69 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Owner" - description: The owner object associated with the passed-in ID. + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The IDs of owners that are reviewers for this group. security: - BearerAuth: [] tags: - - owners + - groups x-speakeasy-mcp: scopes: [read] disabled: false - delete: - description: Deletes an owner. - operationId: delete_owner + put: + deprecated: true + description: Sets the list of reviewers for a group. + operationId: set_group_reviewers parameters: - - description: The ID of the owner. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: owner_id + name: group_id required: true schema: format: uuid type: string style: simple - responses: - "200": - description: The owner was successfully deleted. - security: - - BearerAuth: [] - tags: - - owners - x-speakeasy-mcp: - scopes: [write] - disabled: false - /owners/name/{owner_name}: - get: - description: Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead. - operationId: getOwnerFromName - parameters: - - description: The name of the owner. - example: MyOwner - explode: true - in: path - name: owner_name - required: true - schema: - type: string - style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ReviewerIDList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Owner" - description: The owner object associated with the passed-in name. + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The updated IDs of owners that are reviewers for this group security: - BearerAuth: [] tags: - - owners + - groups x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - /owners/{owner_id}/users: + /groups/{group_id}/reviewer-stages: get: - description: Gets the list of users for this owner, in escalation priority order if applicable. - operationId: get_owner_users + deprecated: true + description: Gets the list of reviewer stages for a group. + operationId: get_group_reviewer_stages parameters: - - description: The ID of the owner. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: owner_id + name: group_id required: true schema: format: uuid @@ -2333,24 +2109,28 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UserList" - description: The users for this owner. + description: A list of reviewer stages. + items: + $ref: "#/components/schemas/ReviewerStage" + type: array + description: The reviewer stages for this group. security: - BearerAuth: [] tags: - - owners + - groups x-speakeasy-mcp: scopes: [read] disabled: false put: - description: Sets the list of users for this owner. If escalation is enabled, the order of this list is the escalation priority order of the users. If the owner has a source group, adding or removing users from this list won't be possible. - operationId: set_owner_users + deprecated: true + description: Sets the list of reviewer stages for a group. + operationId: set_group_reviewer_stages parameters: - - description: The ID of the owner. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: owner_id + name: group_id required: true schema: format: uuid @@ -2361,56 +2141,68 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UserIDList" + $ref: "#/components/schemas/ReviewerStageList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UserList" - description: The updated users for the owner. + description: A list of reviewer stages. + items: + $ref: "#/components/schemas/ReviewerStage" + type: array + description: The updated reviewer stages for this group. security: - BearerAuth: [] tags: - - owners + - groups x-speakeasy-mcp: scopes: [write] disabled: false - /requests: + /groups/{group_id}/tags: get: - description: Returns a list of requests for your organization that is visible by the admin. - operationId: getRequests + description: Returns all tags applied to the group. + operationId: get_group_tags parameters: - - description: A start date filter for the events. - examples: - withDate: - summary: Example with date - value: 2021-11-01 - withDatetime: - summary: Example with date and time in ISO 8601 datetime format. - value: 2025-01-01T00:00:00Z - explode: true - in: query - name: start_date_filter - required: false + - description: The ID of the group whose tags to return. + name: group_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true schema: + format: uuid type: string - style: form - - description: An end date filter for the events. - examples: - withDate: - summary: Example with date - value: 2021-11-12 - withDatetime: - summary: Example with date and time in ISO 8601 datetime format. - value: 2025-01-01T00:00:00Z - explode: true - in: query - name: end_date_filter - required: false + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TagsList" + description: The tags applied to the group. + security: + - BearerAuth: [] + tags: + - groups + x-speakeasy-mcp: + scopes: [read] + disabled: false + /groups/{group_id}/users: + get: + description: Gets the list of users for this group. + operationId: get_group_users + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true schema: + format: uuid type: string - style: form + style: simple - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true @@ -2420,7 +2212,7 @@ paths: schema: type: string style: form - - description: Number of results to return per page. Default is 200. + - description: Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`. example: 200 explode: true in: query @@ -2430,230 +2222,215 @@ paths: type: integer maximum: 1000 style: form - - description: Boolean toggle for if it should only show pending requests. - explode: true - in: query - name: show_pending_only - required: false - schema: - type: boolean - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/RequestList" - description: The list of requests. + $ref: "#/components/schemas/GroupUserList" + description: List of users with access to this group. security: - BearerAuth: [] tags: - - requests + - groups x-speakeasy-mcp: scopes: [read] disabled: false - x-speakeasy-pagination: - type: cursor - inputs: - - name: cursor - in: parameters - type: cursor - - name: page_size - in: parameters - type: limit - outputs: - results: $.requests - nextCursor: $.cursor - post: - description: "Create an access request" - operationId: "createRequest" + /groups/{group_id}/users/{user_id}: + put: + description: Updates a user's access level or duration in this group. + operationId: update_group_user + parameters: + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user whose access is being updated. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple requestBody: - description: Resources to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/CreateRequestInfo" + type: object + example: + duration_minutes: 60 + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + properties: + duration_minutes: + description: The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite, or a negative value to revoke access. + type: integer + maximum: 525960 # One year + example: 120 + access_level_remote_id: + description: The updated remote ID of the access level granted to this user. + type: string + example: arn:aws:iam::590304332660:role/ReadOnlyAccess + required: + - duration_minutes responses: "200": + description: The GroupUser was successfully updated. content: application/json: schema: - properties: - id: - format: uuid - type: string - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - description: The resulting request. + $ref: "#/components/schemas/GroupUser" security: - BearerAuth: [] tags: - - requests + - groups x-speakeasy-mcp: scopes: [write] disabled: false - /requests/relay: - get: - description: Returns a paginated list of requests using Relay-style cursor pagination. - operationId: getRequestsRelay - deprecated: true + post: + description: Adds a user to this group. + operationId: add_group_user parameters: - - description: Number of results to return after the cursor. Use either first/after or last/before, not both. - example: 10 - in: query - name: first - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - - description: Cursor to fetch results after. Used with 'first' for forward pagination. - example: "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N2ZhNjFhYjk4Nw==" - in: query - name: after - required: false + - description: The ID of the group. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: group_id + required: true schema: + format: uuid type: string - - description: Number of results to return before the cursor. Use either first/after or last/before, not both. - example: 10 - in: query - name: last - required: false - schema: - type: integer - minimum: 1 - maximum: 100 - - description: Cursor to fetch results before. Used with 'last' for backward pagination. - example: "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N2ZhNjFhYjk4Nw==" - in: query - name: before - required: false + style: simple + - description: The ID of the user to add. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: user_id + required: true schema: + format: uuid type: string - - description: Filter requests by their status. - example: PENDING - in: query - name: status - required: false - schema: - $ref: "#/components/schemas/RequestStatusEnum" - - description: Filter requests assigned to a specific user ID. - example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + style: simple + - description: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. + example: 60 + explode: true in: query - name: to + name: duration_minutes required: false schema: - format: uuid - type: string - - description: Filter requests made by a specific user ID. - example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + type: integer + maximum: 525960 # One year + style: form + deprecated: true + - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true in: query - name: from + name: access_level_remote_id required: false schema: - format: uuid type: string + style: form + deprecated: true + requestBody: + required: false + content: + application/json: + schema: + example: + duration_minutes: 60 + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + properties: + duration_minutes: + description: The duration for which the group can be accessed (in minutes). Use 0 to set to indefinite. + example: 60 + type: integer + access_level_remote_id: + description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + type: string + required: + - duration_minutes + type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/RequestConnection" - description: A paginated list of requests using Relay-style cursor pagination. + $ref: "#/components/schemas/GroupUser" + description: The GroupUser that was created. security: - BearerAuth: [] tags: - - requests + - groups x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - /requests/{id}: - get: - description: Returns a request by ID. - operationId: getRequest + delete: + description: Removes a user's access from this group. + operationId: delete_group_user parameters: - - description: The ID of the request. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: id + name: group_id required: true schema: format: uuid type: string style: simple - responses: - "200": - description: The requested request object. - content: - application/json: - schema: - $ref: "#/components/schemas/Request" - security: - - BearerAuth: [] - tags: - - requests - x-speakeasy-mcp: - scopes: [read] - disabled: false - /requests/{id}/approve: - post: - description: "Approve an access request" - operationId: "approveRequest" - parameters: - - description: "The ID of the request to approve" + - description: The ID of a user to remove from this group. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false in: path - name: id + name: user_id required: true schema: - type: string format: uuid - requestBody: - description: Approval parameters - required: true - content: - application/json: - schema: - type: object - properties: - level: - type: string - enum: [REGULAR, ADMIN] - description: "The decision level for the approval" - example: "REGULAR" - comment: - type: string - description: "Optional comment for the approval" - example: "Approved after security review" - required: - - level + type: string + style: simple + - description: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + example: 30 + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form responses: "200": - description: "Request successfully approved" - content: - application/json: - schema: - type: object - properties: - request: - $ref: "#/components/schemas/Request" - taskId: - type: string - format: uuid - description: "ID of the task created for propagating access" - example: "c6f85bfb-3fe7-4936-a68d-7a5e1e3d0f6a" + description: This user's access was successfully removed from this group. security: - BearerAuth: [] tags: - - requests + - groups x-speakeasy-mcp: scopes: [write] disabled: false - /resources: + /groups/users/{user_id}: get: - description: Returns a list of resources for your organization. - operationId: getResources + description: Returns all groups that the user is a member of. + operationId: get_user_groups parameters: + - description: The ID of the user whose groups to return. + name: user_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true @@ -2673,72 +2450,55 @@ paths: type: integer maximum: 1000 style: form - - description: The resource type to filter by. - example: AWS_IAM_ROLE - explode: true - in: query - name: resource_type_filter - required: false - schema: - $ref: "#/components/schemas/ResourceTypeEnum" - style: form - - description: The resource ids to filter by. - example: - - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - - 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: query - name: resource_ids - required: false - schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - style: form - - description: Resource name. - example: example-name + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupUserList" + description: The groups that the user is a member of. + security: + - BearerAuth: [] + tags: + - groups + x-speakeasy-mcp: + scopes: [read] + disabled: false + /group-bindings: + get: + summary: Get group bindings + description: Returns a list of `GroupBinding` objects. + operationId: getGroupBindings + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw explode: true in: query - name: resource_name - required: false - schema: - type: string - style: form - - description: The parent resource id to filter by. - example: - - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: query - name: parent_resource_id + name: cursor required: false schema: - format: uuid type: string style: form - - description: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. - example: - - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true in: query - name: ancestor_resource_id - required: false + name: page_size schema: - format: uuid - type: string + type: integer + maximum: 1000 style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedResourcesList" - description: One page worth resources associated with your organization. + $ref: "#/components/schemas/PaginatedGroupBindingsList" + description: One page worth of group bindings for your organization. security: - BearerAuth: [] tags: - - resources + - group-bindings x-speakeasy-mcp: scopes: [read] disabled: false @@ -2754,63 +2514,60 @@ paths: outputs: results: $.results nextCursor: $.next - put: - description: Bulk updates a list of resources. - operationId: updateResources + post: + description: Creates a group binding. + operationId: createGroupBinding requestBody: - description: Resources to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateResourceInfoList" + $ref: "#/components/schemas/CreateGroupBindingInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UpdateResourceInfoList" - description: The resulting updated resource infos. + $ref: "#/components/schemas/GroupBinding" + description: The group binding just created. security: - BearerAuth: [] tags: - - resources + - group-bindings x-speakeasy-mcp: scopes: [write] disabled: false - post: - description: Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources. - operationId: createResource + put: + description: Bulk updates a list of group bindings. + operationId: updateGroupBindings requestBody: + description: Group bindings to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/CreateResourceInfo" + $ref: "#/components/schemas/UpdateGroupBindingInfoList" responses: "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Resource" - description: The resource just created. + description: The group bindings were successfully updated. security: - BearerAuth: [] tags: - - resources + - group-bindings x-speakeasy-mcp: scopes: [write] disabled: false - /resources/{resource_id}: + /group-bindings/{group_binding_id}: get: - description: Retrieves a resource. - operationId: get_resource + summary: Get group binding by ID + description: Returns a `GroupBinding` object. + operationId: getGroupBinding parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The ID of the group binding. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true in: path - name: resource_id + name: group_binding_id required: true schema: format: uuid @@ -2818,27 +2575,27 @@ paths: style: simple responses: "200": - description: The requested resource. content: application/json: schema: - $ref: "#/components/schemas/Resource" + $ref: "#/components/schemas/GroupBinding" + description: The requested `GroupBinding`. security: - BearerAuth: [] tags: - - resources + - group-bindings x-speakeasy-mcp: scopes: [read] disabled: false delete: - description: Deletes a resource. - operationId: delete_resource + description: Deletes a group binding. + operationId: deleteGroupBinding parameters: - - description: The ID of the resource. + - description: The ID of the group binding. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: group_binding_id required: true schema: format: uuid @@ -2846,24 +2603,24 @@ paths: style: simple responses: "200": - description: The resource was successfully deleted. + description: The group binding was successfully deleted. security: - BearerAuth: [] tags: - - resources + - group-bindings x-speakeasy-mcp: scopes: [write] disabled: false - /resources/{resource_id}/message-channels: + /idp-group-mappings/{app_resource_id}: get: - description: Gets the list of audit message channels attached to a resource. - operationId: get_resource_message_channels + description: Returns the configured set of available `IdpGroupMapping` objects for an Okta app. + operationId: getIdpGroupMappings parameters: - - description: The ID of the resource. + - description: The ID of the Okta app. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: app_resource_id required: true schema: format: uuid @@ -2874,24 +2631,24 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/MessageChannelList" - description: The audit message channels attached to the resource. + $ref: "#/components/schemas/IdpGroupMappingList" + description: The configured set of available `IdpGroupMapping` objects for an Okta app. security: - BearerAuth: [] tags: - - resources + - idp-group-mappings x-speakeasy-mcp: scopes: [read] disabled: false put: - description: Sets the list of audit message channels attached to a resource. - operationId: set_resource_message_channels + description: Updates the list of available `IdpGroupMapping` objects for an Okta app. + operationId: updateIdpGroupMappings parameters: - - description: The ID of the resource. + - description: The ID of the Okta app. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: app_resource_id required: true schema: format: uuid @@ -2902,232 +2659,172 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/MessageChannelIDList" + properties: + mappings: + type: array + items: + properties: + group_id: + type: string + format: uuid + alias: + type: string + hidden_from_end_user: + type: boolean + type: object + required: + - mappings + type: object responses: "200": - content: - application/json: - schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The updated audit message channel IDs for the resource. + description: The updated set of available `IdpGroupMapping` objects for an Okta app. security: - BearerAuth: [] tags: - - resources + - idp-group-mappings x-speakeasy-mcp: scopes: [write] disabled: false - /resources/{resource_id}/visibility: + /idp-group-mappings/{app_resource_id}/groups/{group_id}: get: - description: Gets the visibility of this resource. - operationId: get_resource_visibility + description: Gets an `IdpGroupMapping` object for an Okta app and group. + operationId: getIdpGroupMapping parameters: - - description: The ID of the resource. + - description: The ID of the Okta app. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: app_resource_id required: true schema: format: uuid type: string style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/VisibilityInfo" - description: The visibility info of this resource. - security: - - BearerAuth: [] - tags: - - resources - x-speakeasy-mcp: - scopes: [read] - disabled: false - put: - description: Sets the visibility of this resource. - operationId: set_resource_visibility - parameters: - - description: The ID of the resource. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: group_id required: true schema: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/VisibilityInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/VisibilityInfo" - description: The visibility info of this resource. + $ref: "#/components/schemas/IdpGroupMapping" + description: The `IdpGroupMapping` object for the Okta app and group. security: - BearerAuth: [] tags: - - resources + - idp-group-mappings x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false - /resources/{resource_id}/reviewers: - get: - description: Gets the list of owner IDs of the reviewers for a resource. - operationId: get_resource_reviewers + post: + description: | + Creates or updates an individual `IdpGroupMapping` object (upsert operation). + + **Behavior:** + - If the mapping doesn't exist, it will be created with the provided values + - If the mapping exists, only the fields provided in the request will be updated + operationId: createIdpGroupMapping parameters: - - description: The ID of the resource. + - description: The ID of the Okta app. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: app_resource_id required: true schema: format: uuid type: string style: simple - responses: - "200": - content: - application/json: - schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The IDs of owners that are reviewers for this resource. - security: - - BearerAuth: [] - tags: - - resources - x-speakeasy-mcp: - scopes: [read] - disabled: false - put: - description: Sets the list of reviewers for a resource. - operationId: set_resource_reviewers - parameters: - - description: The ID of the resource. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: group_id required: true schema: format: uuid type: string style: simple requestBody: - required: true + required: false content: application/json: schema: - $ref: "#/components/schemas/ReviewerIDList" + properties: + alias: + description: Optional alias for the group mapping + type: string + nullable: true + hidden_from_end_user: + description: | + Whether this mapping should be hidden from end users. + - **New mappings**: If not provided, defaults to `false` + - **Existing mappings**: If not provided, existing value is preserved (no change) + - **Explicit values**: If provided, value is updated to the specified boolean + type: boolean + nullable: true + type: object responses: "200": + description: The IDP group mapping was successfully created or updated. content: application/json: schema: - items: - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid - type: string - type: array - description: The updated IDs of owners that are reviewers for this resource + $ref: "#/components/schemas/IdpGroupMapping" security: - BearerAuth: [] tags: - - resources + - idp-group-mappings x-speakeasy-mcp: scopes: [write] disabled: false - /resources/{resource_id}/reviewer-stages: - get: - description: Gets the list reviewer stages for a resource. - operationId: get_resource_reviewer_stages + delete: + description: Deletes an `IdpGroupMapping` object. + operationId: delete_idp_group_mappings parameters: - - description: The ID of the resource. + - description: The ID of the Okta app. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: app_resource_id required: true schema: format: uuid type: string style: simple - responses: - "200": - content: - application/json: - schema: - description: A list of reviewer stages. - items: - $ref: "#/components/schemas/ReviewerStage" - type: array - description: The reviewer stages for this resource. - security: - - BearerAuth: [] - tags: - - resources - x-speakeasy-mcp: - scopes: [read] - disabled: false - put: - description: Sets the list of reviewer stages for a resource. - operationId: set_resource_reviewer_stages - parameters: - - description: The ID of the resource. + - description: The ID of the group. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id + name: group_id required: true schema: format: uuid type: string style: simple - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/ReviewerStageList" responses: "200": - content: - application/json: - schema: - description: A list of reviewer stages. - items: - $ref: "#/components/schemas/ReviewerStage" - type: array - description: The updated reviewer stages for this resource. + description: The IDP group mapping was successfully deleted. security: - BearerAuth: [] tags: - - resources + - idp-group-mappings x-speakeasy-mcp: scopes: [write] disabled: false - /non-human-identities: + /owners: get: - description: Returns a list of non-human identities for your organization. - operationId: get_nhis + summary: Get owners + description: Returns a list of `Owner` objects. + operationId: get_owners parameters: - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -3148,17 +2845,26 @@ paths: type: integer maximum: 1000 style: form + - description: Owner name to filter by. + example: 200 + explode: true + in: query + name: name + required: false + schema: + type: string + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedResourcesList" - description: One page worth non-human identities in your organization. + $ref: "#/components/schemas/PaginatedOwnersList" + description: One page worth of owners in your organization. security: - BearerAuth: [] tags: - - non-human-identities + - owners x-speakeasy-mcp: scopes: [read] disabled: false @@ -3174,283 +2880,173 @@ paths: outputs: results: $.results nextCursor: $.next - /resources/{resource_id}/non-human-identities: - get: - description: Gets the list of non-human identities with access to this resource. - operationId: get_resource_nhis - parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: Limit the number of results returned. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form + post: + description: Creates an owner. + operationId: createOwner + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateOwnerInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/AccessList" - description: List of non-human identities with access to this resource. + $ref: "#/components/schemas/Owner" + description: The owner just created. security: - BearerAuth: [] tags: - - resources + - owners x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - /resources/{resource_id}/users: - get: - description: Gets the list of users for this resource. - operationId: get_resource_users - parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: Limit the number of results returned. - example: 200 - explode: true - in: query - name: limit - required: false - schema: - type: integer - style: form + put: + description: Bulk updates a list of owners. + operationId: updateOwners + requestBody: + description: Owners to be updated + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateOwnerInfoList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ResourceAccessUserList" - description: List of users with access to this resource. + $ref: "#/components/schemas/UpdateOwnerInfoList" + description: The resulting updated owner infos. security: - BearerAuth: [] tags: - - resources + - owners x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - /resources/{resource_id}/non-human-identities/{non_human_identity_id}: - post: - description: Gives a non-human identity access to this resource. - operationId: add_resource_nhi + /owners/{owner_id}: + get: + summary: Get owner by ID + description: Returns an `Owner` object. + operationId: getOwner parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The resource ID of the non-human identity to add. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false + - description: The ID of the owner. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true in: path - name: non_human_identity_id + name: owner_id required: true schema: format: uuid type: string style: simple - requestBody: - required: false - content: - application/json: - schema: - example: - duration_minutes: 60 - access_level_remote_id: roles/cloudsql.instanceUser - properties: - duration_minutes: - description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. - example: 60 - type: integer - maximum: 525960 # One year - access_level_remote_id: - description: The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used. - example: roles/cloudsql.instanceUser - type: string - required: - - duration_minutes - type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ResourceNHI" - description: Details about the access that the non-human identity was granted to the resource. + $ref: "#/components/schemas/Owner" + description: The owner object associated with the passed-in ID. security: - BearerAuth: [] tags: - - resources + - owners x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false delete: - description: Removes a non-human identity's direct access from this resource. - operationId: delete_resource_nhi + description: Deletes an owner. + operationId: delete_owner parameters: - - description: The ID of the resource. + - description: The ID of the owner. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The resource ID of the non-human identity to remove from this resource. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false - in: path - name: non_human_identity_id + name: owner_id required: true schema: format: uuid type: string style: simple - - description: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - example: roles/cloudsql.instanceUser - explode: true - in: query - name: access_level_remote_id - required: false - schema: - type: string - style: form responses: "200": - description: This non-human identity's access was successfully removed from this resource. + description: The owner was successfully deleted. security: - BearerAuth: [] tags: - - resources + - owners x-speakeasy-mcp: scopes: [write] disabled: false - /resources/{resource_id}/users/{user_id}: - post: - description: Adds a user to this resource. - operationId: add_resource_user + /owners/name/{owner_name}: + get: + description: Returns an `Owner` object. Does not support owners with `/` in their name, use /owners?name=... instead. + operationId: getOwnerFromName parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false + - description: The name of the owner. + example: MyOwner + explode: true in: path - name: resource_id + name: owner_name required: true schema: - format: uuid type: string style: simple - - description: The ID of the user to add. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Owner" + description: The owner object associated with the passed-in name. + security: + - BearerAuth: [] + tags: + - owners + x-speakeasy-mcp: + scopes: [read] + disabled: false + /owners/{owner_id}/users: + get: + description: Gets the list of users for this owner, in escalation priority order if applicable. + operationId: get_owner_users + parameters: + - description: The ID of the owner. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: user_id + name: owner_id required: true schema: format: uuid type: string style: simple - - description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. - example: 60 - explode: true - in: query - name: duration_minutes - required: false - schema: - type: integer - maximum: 525960 # One year - style: form - deprecated: true - - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - explode: true - in: query - name: access_level_remote_id - required: false - schema: - type: string - style: form - deprecated: true - requestBody: - required: false - content: - application/json: - schema: - example: - duration_minutes: 60 - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - properties: - duration_minutes: - description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. - example: 60 - type: integer - maximum: 525960 # One year - access_level_remote_id: - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - type: string - required: - - duration_minutes - type: object responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ResourceUser" - description: The ResourceUser that was created. + $ref: "#/components/schemas/UserList" + description: The users for this owner. security: - BearerAuth: [] tags: - - resources + - owners x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false put: - description: Updates a user's access level or duration on this resource. - operationId: update_resource_user + description: Sets the list of users for this owner. If escalation is enabled, the order of this list is the escalation priority order of the users. If the owner has a source group, adding or removing users from this list won't be possible. + operationId: set_owner_users parameters: - - description: The ID of the resource. + - description: The ID of the owner. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the user whose access is being updated. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - in: path - name: user_id + name: owner_id required: true schema: format: uuid @@ -3461,174 +3057,91 @@ paths: content: application/json: schema: - type: object - example: - duration_minutes: 60 - access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess - properties: - duration_minutes: - description: The updated duration for which the resource can be accessed (in minutes). Use 0 for indefinite. - type: integer - maximum: 525960 # One year - example: 120 - access_level_remote_id: - description: The updated remote ID of the access level granted to this user. - type: string - example: arn:aws:iam::590304332660:role/ReadOnlyAccess - required: - - duration_minutes + $ref: "#/components/schemas/UserIDList" responses: "200": - description: The ResourceUser was successfully updated. content: application/json: schema: - $ref: "#/components/schemas/ResourceUser" + $ref: "#/components/schemas/UserList" + description: The updated users for the owner. security: - BearerAuth: [] tags: - - resources + - owners x-speakeasy-mcp: scopes: [write] disabled: false - delete: - description: Removes a user's direct access from this resource. - operationId: delete_resource_user + /requests: + get: + summary: Get requests + description: Returns a list of requests for your organization that is visible by the admin. + operationId: getRequests parameters: - - description: The ID of the resource. - example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 - explode: false - in: path - name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of a user to remove from this resource. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 - explode: false - in: path - name: user_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. - example: arn:aws:iam::590304332660:role/AdministratorAccess + - description: A start date filter for the events. + examples: + withDate: + summary: Example with date + value: 2021-11-01 + withDatetime: + summary: Example with date and time in ISO 8601 datetime format. + value: 2025-01-01T00:00:00Z explode: true in: query - name: access_level_remote_id + name: start_date_filter required: false schema: type: string style: form - responses: - "200": - description: This user's access was successfully removed from this resource. - security: - - BearerAuth: [] - tags: - - resources - x-speakeasy-mcp: - scopes: [write] - disabled: false - get: - description: Returns information about a specific user's access to a resource. - operationId: getResourceUser - parameters: - - description: The ID of the resource. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - in: path - name: resource_id - required: true + - description: An end date filter for the events. + examples: + withDate: + summary: Example with date + value: 2021-11-12 + withDatetime: + summary: Example with date and time in ISO 8601 datetime format. + value: 2025-01-01T00:00:00Z + explode: true + in: query + name: end_date_filter + required: false schema: - format: uuid type: string - style: simple - - description: The ID of the user. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - in: path - name: user_id - required: true + style: form + - description: Filter requests by their requester ID. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query + name: requester_id + required: false schema: format: uuid type: string - style: simple - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true + style: form + - description: Filter requests by their target user ID. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 in: query - name: cursor + name: target_user_id required: false schema: + format: uuid type: string style: form - responses: - "200": - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/ResourceUser" - cursor: - type: string - description: Pagination cursor for the next page of results - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - total_count: - type: integer - description: Total number of results - example: 120 - required: - - data - description: List of ResourceUser records for the user's access to the resource. - "404": - description: Resource or user not found. - security: - - BearerAuth: [] - tags: - - resources - x-speakeasy-mcp: - scopes: [read] - disabled: false - /resource-user-access-status/{resource_id}/{user_id}: - get: - deprecated: true - description: Get user's access status to a resource. - operationId: resource_user_access_status_retrieve - parameters: - - description: The ID of the resource. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path + - description: Filter requests by the resource ID that was requested. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query name: resource_id - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the user. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - explode: false - in: path - name: user_id - required: true + required: false schema: format: uuid type: string - style: simple - - description: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. - example: arn:aws:iam::590304332660:role/AdministratorAccess - explode: true + style: form + - description: Filter requests by the group ID that was requested. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 in: query - name: access_level_remote_id + name: group_id required: false schema: + format: uuid type: string style: form - description: The pagination cursor value. @@ -3650,548 +3163,439 @@ paths: type: integer maximum: 1000 style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ResourceUserAccessStatus" - description: The access status reflecting the user's access to the resource. - security: - - BearerAuth: [] - tags: - - resources - x-speakeasy-mcp: - scopes: [read] - disabled: false - /resources/{resource_id}/tags: - get: - description: Returns all tags applied to the resource. - operationId: get_resource_tags - parameters: - - description: The ID of the resource whose tags to return. - name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/TagsList" - description: The tags applied to the resource. - security: - - BearerAuth: [] - tags: - - resources - x-speakeasy-mcp: - scopes: [read] - disabled: false - /resources/{resource_id}/scoped-role-permissions: - get: - description: Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. - operationId: get_resource_scoped_role_permissions - parameters: - - description: The ID of the resource whose scoped role permissions belong to. - name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true + - description: Boolean toggle for if it should only show pending requests. + explode: true + in: query + name: show_pending_only + required: false schema: - format: uuid - type: string - style: simple + type: boolean + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ScopedRolePermissionList" - description: The role permissions that this Opal Scoped Role has. + $ref: "#/components/schemas/RequestList" + description: The list of requests. security: - BearerAuth: [] tags: - - resources - - scoped-role-permissions + - requests x-speakeasy-mcp: scopes: [read] disabled: false - put: - description: Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. - operationId: set_resource_scoped_role_permissions - parameters: - - description: The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. - name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple + x-speakeasy-pagination: + type: cursor + inputs: + - name: cursor + in: parameters + type: cursor + - name: page_size + in: parameters + type: limit + outputs: + results: $.requests + nextCursor: $.cursor + post: + description: "Create an access request" + operationId: "createRequest" requestBody: + description: Resources to be updated required: true content: application/json: schema: - $ref: "#/components/schemas/ScopedRolePermissionList" + $ref: "#/components/schemas/CreateRequestInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/ScopedRolePermissionList" - description: The role permissions that this Opal Scoped Role has. + properties: + id: + format: uuid + type: string + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + description: The resulting request. security: - BearerAuth: [] tags: - - resources - - scoped-role-permissions + - requests x-speakeasy-mcp: scopes: [write] disabled: false - /sessions: + /requests/relay: get: - description: Returns a list of `Session` objects. - operationId: sessions + summary: Get requests via Relay + description: Returns a paginated list of requests using Relay-style cursor pagination. + operationId: getRequestsRelay + deprecated: true parameters: - - description: The ID of the resource. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: true + - description: Number of results to return after the cursor. Use either first/after or last/before, not both. + example: 10 in: query - name: resource_id - required: true + name: first + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + - description: Cursor to fetch results after. Used with 'first' for forward pagination. + example: "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N2ZhNjFhYjk4Nw==" + in: query + name: after + required: false schema: - format: uuid type: string - style: form - - description: The ID of the user you wish to query sessions for. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true + - description: Number of results to return before the cursor. Use either first/after or last/before, not both. + example: 10 in: query - name: user_id + name: last + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + - description: Cursor to fetch results before. Used with 'last' for backward pagination. + example: "Y3Vyc29yOnYyOpK5MjAyMS0wMS0wN1QwNzo0MToyNy4xMTlaFjYwZmM2YmJlZjk4YzE1N2ZhNjFhYjk4Nw==" + in: query + name: before required: false schema: type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/SessionsList" - description: The sessions associated with a resource. - security: - - BearerAuth: [] - tags: - - sessions - x-speakeasy-mcp: - scopes: [read] - disabled: false - /user: - get: - description: | - Retrieves detailed user information from Opal. This endpoint is designed to fetch user details by - either user ID (UUID) or email address. The endpoint follows a strict precedence rule where - user_id takes priority over email if both are provided. - - Key Implementation Notes: - - Exactly one identifier (user_id OR email) must be provided - - Returns a complete User object with all associated metadata - - Suitable for user verification and profile data retrieval - - Recommended for MCP user synchronization workflows - - Authentication: - - Requires valid API authentication - - Respects standard Opal authorization rules - operationId: user - parameters: - - description: The user ID of the user. - example: 32acc112-21ff-4669-91c2-21e27683eaa1 - explode: true + - description: Filter requests by their status. + example: PENDING in: query - name: user_id + name: status + required: false + schema: + $ref: "#/components/schemas/RequestStatusEnum" + - description: Filter requests assigned to a specific user ID. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 + in: query + name: to required: false schema: format: uuid type: string - style: form - - description: The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. - example: johndoe@domain.org - explode: true + - description: Filter requests made by a specific user ID. + example: 37cb7e41-12ba-46da-92ff-030abe0450b1 in: query - name: email + name: from required: false schema: + format: uuid type: string - style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/User" - description: The user object associated with the passed-in email or ID. + $ref: "#/components/schemas/RequestConnection" + description: A paginated list of requests using Relay-style cursor pagination. security: - BearerAuth: [] tags: - - users + - requests x-speakeasy-mcp: scopes: [read] disabled: false - /users: + /requests/{id}: get: - description: Returns a list of users for your organization. - operationId: getUsers + summary: Get request by ID + description: Returns a request by ID. + operationId: getRequest parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true - in: query - name: cursor - required: false + - description: The ID of the request. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: id + required: true schema: + format: uuid type: string - style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true - in: query - name: page_size - required: false - schema: - type: integer - maximum: 1000 - style: form + style: simple responses: "200": + description: The requested request object. content: application/json: schema: - $ref: "#/components/schemas/PaginatedUsersList" - description: One page worth users in your organization. + $ref: "#/components/schemas/Request" security: - BearerAuth: [] tags: - - users + - requests x-speakeasy-mcp: scopes: [read] disabled: false - x-speakeasy-pagination: - type: cursor - inputs: - - name: cursor - in: parameters - type: cursor - - name: page_size - in: parameters - type: limit - outputs: - results: $.results - nextCursor: $.next - /users/{user_id}/tags: - get: - description: Returns all tags applied to the user. - operationId: get_user_tags + /requests/{id}/approve: + post: + description: "Approve an access request" + operationId: "approveRequest" parameters: - - description: The ID of the user whose tags to return. - name: user_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false + - description: "The ID of the request to approve" in: path + name: id required: true schema: - format: uuid type: string - style: simple + format: uuid + requestBody: + description: Approval parameters + required: true + content: + application/json: + schema: + type: object + properties: + level: + $ref: "#/components/schemas/RequestApprovalEnum" + comment: + type: string + description: "Optional comment for the approval" + example: "Approved after security review" + required: + - level responses: "200": + description: "Request successfully approved" content: application/json: schema: - $ref: "#/components/schemas/TagsList" - description: The tags applied to the user. + type: object + properties: + request: + $ref: "#/components/schemas/Request" security: - BearerAuth: [] tags: - - users + - requests x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false - /access-rules: + /requests/{id}/deny: post: - description: Creates a new access rule config for the given group_id. - operationId: create_access_rule + description: "Deny an access request" + operationId: "denyRequest" + parameters: + - description: "The ID of the request to deny" + in: path + name: id + required: true + schema: + type: string + format: uuid requestBody: + description: Denial parameters required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateAccessRuleInfo" + type: object + properties: + comment: + type: string + description: "Comment for the denial" + example: "Denied due to insufficient justification" + level: + $ref: "#/components/schemas/RequestApprovalEnum" + required: + - comment responses: - "201": + "200": + description: "Request successfully denied" content: application/json: schema: - $ref: "#/components/schemas/AccessRule" - description: The created access rule config for the group. + type: object + properties: + request: + $ref: "#/components/schemas/Request" security: - BearerAuth: [] tags: - - access-rules + - requests x-speakeasy-mcp: scopes: [write] disabled: false - /access-rules/{access_rule_id}: + /requests/{id}/comments: get: - description: Returns a list of access rule config given the group_id of the access rule. - operationId: get_access_rule + description: Returns a list of comments for a specific request. + operationId: getRequestComments parameters: - - description: The access rule ID (group ID) of the access rule. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false + - description: "The ID of the request to get comments for" in: path - name: access_rule_id + name: id required: true schema: - format: uuid type: string - style: simple + format: uuid responses: "200": + description: A list of comments associated with the specified request. content: application/json: schema: - $ref: "#/components/schemas/AccessRule" - description: The access rules for the group. + $ref: "#/components/schemas/RequestCommentList" security: - BearerAuth: [] tags: - - access-rules + - requests x-speakeasy-mcp: scopes: [read] disabled: false - put: - description: Updates the access rule config for the given group_id. - operationId: update_access_rule + post: + description: "Comment on an access request" + operationId: "createRequestComment" parameters: - - description: The access rule ID (group ID) of the access rule. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false + - description: "The ID of the request to comment on" in: path - name: access_rule_id + name: id required: true schema: - format: uuid type: string - style: simple + format: uuid requestBody: + description: Comment parameters required: true content: application/json: schema: - $ref: "#/components/schemas/UpdateAccessRuleInfo" - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/AccessRule" - description: The updated access rule config for the group. - security: - - BearerAuth: [] - tags: - - access-rules - x-speakeasy-mcp: - scopes: [write] - disabled: false - /tag/{tag_id}: - get: - description: UNSTABLE. May be removed at any time. Gets a tag with the given id. - operationId: get_tag_by_ID - parameters: - - description: The tag ID - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - name: tag_id - required: true - schema: - type: string - format: uuid - style: simple + type: object + properties: + comment: + type: string + description: "comment" + required: + - comment responses: "200": + description: "Request successfully commented" content: application/json: schema: - $ref: "#/components/schemas/Tag" - description: The tag requested. - security: - - BearerAuth: [] - tags: - - tags - x-speakeasy-mcp: - scopes: [read] - disabled: false - delete: - description: UNSTABLE. May be removed at any time. Deletes a tag with the given id. - operationId: delete_tag_by_ID - parameters: - - description: The tag ID - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - name: tag_id - required: true - schema: - type: string - format: uuid - style: simple - responses: - "200": - description: Tag was deleted. + type: object + properties: + request: + $ref: "#/components/schemas/Request" security: - BearerAuth: [] tags: - - tags + - requests x-speakeasy-mcp: scopes: [write] disabled: false - /tag: + /resources: get: - description: Gets a tag with the given key and value. - operationId: get_tag + summary: Get resources + description: Returns a list of resources for your organization. + operationId: getResources parameters: - - description: The key of the tag to get. - example: api-scope - explode: false + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true in: query - name: tag_key - required: true + name: cursor + required: false schema: type: string style: form - - description: The value of the tag to get. - example: production - explode: false + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true in: query - name: tag_value + name: page_size required: false schema: - type: string + type: integer + maximum: 1000 style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Tag" - description: The tag requested. - security: - - BearerAuth: [] - tags: - - tags - x-speakeasy-mcp: - scopes: [read] - disabled: false - post: - description: Creates a tag with the given key and value. - operationId: create_tag - parameters: - - description: The key of the tag to create. - example: api-scope + - description: The resource type to filter by. Required when remote_id is provided. + example: AWS_IAM_ROLE + explode: true + in: query + name: resource_type_filter + required: false + schema: + $ref: "#/components/schemas/ResourceTypeEnum" + style: form + - description: The resource ids to filter by. + example: + - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + - 1b978423-db0a-4037-a4cf-f79c60cb67b3 explode: false in: query - name: tag_key + name: resource_ids + required: false + schema: + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + style: form + - description: Resource name. + example: example-name + explode: true + in: query + name: resource_name required: false schema: type: string style: form - deprecated: true - - description: The value of the tag to create. - example: production + - description: The parent resource id to filter by. + example: + - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: query - name: tag_value + name: parent_resource_id required: false schema: + format: uuid type: string style: form - deprecated: true - - description: The ID of the owner that manages the tag. - example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + - description: The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. + example: + - 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: query - name: admin_owner_id + name: ancestor_resource_id + required: false schema: format: uuid type: string style: form - deprecated: true - requestBody: - required: false - content: - application/json: - schema: - $ref: "#/components/schemas/CreateTagInfo" - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Tag" - description: The tag that was created. - security: - - BearerAuth: [] - tags: - - tags - x-speakeasy-mcp: - scopes: [write] - disabled: false - /tags: - get: - description: Returns a list of tags created by your organization. - operationId: getTags - parameters: - - description: The pagination cursor value. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - explode: true + - description: Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. in: query - name: cursor + name: remote_id required: false schema: type: string style: form - - description: Number of results to return per page. Default is 200. - example: 200 - explode: true + - description: The IDs of the tags to filter by. Returns only resources that have any of these tags applied. in: query - name: page_size + name: tag_ids required: false schema: - type: integer - maximum: 1000 + type: array + items: + format: uuid + type: string style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/PaginatedTagsList" - description: A list of tags created by your organization. + $ref: "#/components/schemas/PaginatedResourcesList" + description: One page worth resources associated with your organization. security: - BearerAuth: [] tags: - - tags + - resources x-speakeasy-mcp: scopes: [read] disabled: false @@ -4207,101 +3611,64 @@ paths: outputs: results: $.results nextCursor: $.next - /tags/{tag_id}/users/{user_id}: - post: - description: Applies a tag to a user. - operationId: add_user_tag - parameters: - - description: The ID of the tag to apply. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the user to apply the tag to. - name: user_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple + put: + description: Bulk updates a list of resources. + operationId: updateResources requestBody: - required: false + description: Resources to be updated + required: true content: application/json: schema: - type: object + $ref: "#/components/schemas/UpdateResourceInfoList" responses: "200": - description: Tag applied to user successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateResourceInfoList" + description: The resulting updated resource infos. security: - BearerAuth: [] tags: - - tags + - resources x-speakeasy-mcp: scopes: [write] disabled: false - delete: - description: Removes a tag from a user. - operationId: remove_user_tag - parameters: - - description: The ID of the tag to remove. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the user to remove the tag from. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - name: user_id - required: true - schema: - format: uuid - type: string - style: simple + post: + description: Creates a resource. See [here](https://docs.opal.dev/reference/end-system-objects) for details about importing resources. + operationId: createResource + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateResourceInfo" responses: "200": - description: Tag removed from user successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/Resource" + description: The resource just created. security: - BearerAuth: [] tags: - - tags + - resources x-speakeasy-mcp: scopes: [write] disabled: false - /tags/{tag_id}/groups/{group_id}: - post: - description: Applies a tag to a group. - operationId: add_group_tag + /resources/{resource_id}: + get: + summary: Get resource by ID + description: Retrieves a resource. + operationId: get_resource parameters: - - description: The ID of the tag to apply. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the group to apply the tag to. - name: group_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path + name: resource_id required: true schema: format: uuid @@ -4309,33 +3676,27 @@ paths: style: simple responses: "200": - description: Tag applied to group successfully. + description: The requested resource. + content: + application/json: + schema: + $ref: "#/components/schemas/Resource" security: - BearerAuth: [] tags: - - tags + - resources x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false delete: - description: Removes a tag from a group. - operationId: remove_group_tag + description: Deletes a resource. + operationId: delete_resource parameters: - - description: The ID of the tag to remove. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the group to remove the tag from. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: group_id + name: resource_id required: true schema: format: uuid @@ -4343,34 +3704,24 @@ paths: style: simple responses: "200": - description: Tag removed from group successfully. + description: The resource was successfully deleted. security: - BearerAuth: [] tags: - - tags + - resources x-speakeasy-mcp: scopes: [write] disabled: false - /tags/{tag_id}/resources/{resource_id}: - post: - description: Applies a tag to a resource. - operationId: add_resource_tag + /resources/{resource_id}/message-channels: + get: + description: Gets the list of audit message channels attached to a resource. + operationId: get_resource_message_channels parameters: - - description: The ID of the tag to apply. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the resource to apply the tag to. name: resource_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path required: true schema: format: uuid @@ -4378,30 +3729,24 @@ paths: style: simple responses: "200": - description: Tag applied to resource successfully. + content: + application/json: + schema: + $ref: "#/components/schemas/MessageChannelList" + description: The audit message channels attached to the resource. security: - BearerAuth: [] tags: - - tags + - resources x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false - delete: - description: Removes a tag from a resource. - operationId: remove_resource_tag + put: + description: Sets the list of audit message channels attached to a resource. + operationId: set_resource_message_channels parameters: - - description: The ID of the tag to remove. - name: tag_id - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - explode: false - in: path - required: true - schema: - format: uuid - type: string - style: simple - - description: The ID of the resource to remove the tag from. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path name: resource_id @@ -4410,68 +3755,40 @@ paths: format: uuid type: string style: simple - responses: - "200": - description: Tag removed from resource successfully. - security: - - BearerAuth: [] - tags: - - tags - x-speakeasy-mcp: - scopes: [write] - disabled: false - /message-channels: - get: - description: Returns a list of `MessageChannel` objects. - operationId: get_message_channels - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/MessageChannelList" - description: A list of message channels for your organization. - security: - - BearerAuth: [] - tags: - - message-channels - x-speakeasy-mcp: - scopes: [read] - disabled: false - post: - description: Creates a `MessageChannel` objects. - operationId: create_message_channel requestBody: - description: The `MessageChannel` object to be created. required: true content: application/json: schema: - $ref: "#/components/schemas/CreateMessageChannelInfo" + $ref: "#/components/schemas/MessageChannelIDList" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/MessageChannel" - description: The message channel that was created. + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The updated audit message channel IDs for the resource. security: - BearerAuth: [] tags: - - message-channels + - resources x-speakeasy-mcp: scopes: [write] disabled: false - /message-channels/{message_channel_id}: + /resources/{resource_id}/visibility: get: - description: Gets a `MessageChannel` object. - operationId: get_message_channel + description: Gets the visibility of this resource. + operationId: get_resource_visibility parameters: - - description: The ID of the message_channel. + - description: The ID of the resource. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: message_channel_id + name: resource_id required: true schema: format: uuid @@ -4482,67 +3799,59 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/MessageChannel" - description: The requested message channel. - security: - - BearerAuth: [] - tags: - - message-channels - x-speakeasy-mcp: - scopes: [read] - disabled: false - /on-call-schedules: - get: - description: Returns a list of `OnCallSchedule` objects. - operationId: get_on_call_schedules - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/OnCallScheduleList" - description: A list of on call schedules for your organization. + $ref: "#/components/schemas/VisibilityInfo" + description: The visibility info of this resource. security: - BearerAuth: [] tags: - - on-call-schedules + - resources x-speakeasy-mcp: scopes: [read] disabled: false - post: - description: Creates a `OnCallSchedule` objects. - operationId: create_on_call_schedule + put: + description: Sets the visibility of this resource. + operationId: set_resource_visibility + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple requestBody: - description: The `OnCallSchedule` object to be created. required: true content: application/json: schema: - $ref: "#/components/schemas/CreateOnCallScheduleInfo" + $ref: "#/components/schemas/VisibilityInfo" responses: "200": content: application/json: schema: - $ref: "#/components/schemas/OnCallSchedule" - description: The on call schedule that was created. + $ref: "#/components/schemas/VisibilityInfo" + description: The visibility info of this resource. security: - BearerAuth: [] tags: - - on-call-schedules + - resources x-speakeasy-mcp: scopes: [write] disabled: false - /on-call-schedules/{on_call_schedule_id}: + /resources/{resource_id}/reviewers: get: - description: Gets a `OnCallSchedule` object. - operationId: get_on_call_schedule + description: Gets the list of owner IDs of the reviewers for a resource. + operationId: get_resource_reviewers parameters: - - description: The ID of the on_call_schedule. - example: 9546209c-42c2-4801-96d7-9ec42df0f59c + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: on_call_schedule_id + name: resource_id required: true schema: format: uuid @@ -4553,19 +3862,130 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/OnCallSchedule" - description: The requested on call schedule. + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The IDs of owners that are reviewers for this resource. security: - BearerAuth: [] tags: - - on-call-schedules + - resources x-speakeasy-mcp: scopes: [read] disabled: false - /uars: + put: + description: Sets the list of reviewers for a resource. + operationId: set_resource_reviewers + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ReviewerIDList" + responses: + "200": + content: + application/json: + schema: + items: + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + type: array + description: The updated IDs of owners that are reviewers for this resource + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [write] + disabled: false + /resources/{resource_id}/reviewer-stages: get: - description: Returns a list of `UAR` objects. - operationId: getUARs + description: Gets the list reviewer stages for a resource. + operationId: get_resource_reviewer_stages + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + description: A list of reviewer stages. + items: + $ref: "#/components/schemas/ReviewerStage" + type: array + description: The reviewer stages for this resource. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [read] + disabled: false + put: + description: Sets the list of reviewer stages for a resource. + operationId: set_resource_reviewer_stages + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ReviewerStageList" + responses: + "200": + content: + application/json: + schema: + description: A list of reviewer stages. + items: + $ref: "#/components/schemas/ReviewerStage" + type: array + description: The updated reviewer stages for this resource. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [write] + disabled: false + /non-human-identities: + get: + description: Returns a list of non-human identities for your organization. + operationId: get_nhis parameters: - description: The pagination cursor value. example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -4591,12 +4011,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PaginatedUARsList" - description: A list of UARs for your organization. + $ref: "#/components/schemas/PaginatedResourcesList" + description: One page worth non-human identities in your organization. security: - BearerAuth: [] tags: - - uars + - non-human-identities x-speakeasy-mcp: scopes: [read] disabled: false @@ -4612,260 +4032,3409 @@ paths: outputs: results: $.results nextCursor: $.next - /uar: - post: - description: Starts a User Access Review. - operationId: create_uar - requestBody: - description: The settings of the UAR. - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/CreateUARInfo" + /resources/{resource_id}/non-human-identities: + get: + description: Gets the list of non-human identities with access to this resource. + operationId: get_resource_nhis + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: Limit the number of results returned. + example: 200 + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UAR" - description: The UAR that was started. + $ref: "#/components/schemas/AccessList" + description: List of non-human identities with access to this resource. security: - BearerAuth: [] tags: - - uars + - resources x-speakeasy-mcp: - scopes: [write] + scopes: [read] disabled: false - /uar/{uar_id}: + /resources/{resource_id}/users: get: - description: Retrieves a specific UAR. - operationId: get_uar + summary: Get resource users + description: Gets the list of users for this resource. + operationId: get_resource_users parameters: - - description: The ID of the UAR. + - description: The ID of the resource. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false in: path - name: uar_id + name: resource_id required: true schema: format: uuid type: string style: simple + - description: Limit the number of results returned. + example: 200 + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/UAR" - description: The UAR that was requested. + $ref: "#/components/schemas/ResourceAccessUserList" + description: List of users with access to this resource. security: - BearerAuth: [] tags: - - uars + - resources x-speakeasy-mcp: scopes: [read] disabled: false - /sync_errors: - get: - description: Returns a list of recent sync errors that have occurred since the last successful sync. - operationId: getSyncErrors + /resources/{resource_id}/non-human-identities/{non_human_identity_id}: + post: + description: Gives a non-human identity access to this resource. + operationId: add_resource_nhi parameters: - - description: The ID of the app to list sync errors for. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac - explode: false - in: query - name: app_id - required: false - schema: - format: uuid - type: string - style: form - - description: The ID of the resource to list sync errors for. + - description: The ID of the resource. example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 explode: false - in: query + in: path name: resource_id - required: false + required: true schema: format: uuid type: string - style: form - - description: The ID of the group to list sync errors for. - example: 9546209c-42c2-4801-96d7-9ec42df0f59c + style: simple + - description: The resource ID of the non-human identity to add. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 explode: false - in: query - name: group_id - required: false + in: path + name: non_human_identity_id + required: true schema: format: uuid type: string - style: form + style: simple + requestBody: + required: false + content: + application/json: + schema: + example: + duration_minutes: 60 + access_level_remote_id: roles/cloudsql.instanceUser + properties: + duration_minutes: + description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. + example: 60 + type: integer + maximum: 525960 # One year + access_level_remote_id: + description: The remote ID of the access level to grant. If omitted, the default access level remote ID value (empty string) is used. + example: roles/cloudsql.instanceUser + type: string + required: + - duration_minutes + type: object responses: "200": content: application/json: schema: - items: - $ref: "#/components/schemas/SyncErrorList" - type: array - description: A list of sync errors. - security: + $ref: "#/components/schemas/ResourceNHI" + description: Details about the access that the non-human identity was granted to the resource. + security: - BearerAuth: [] tags: - - apps + - resources x-speakeasy-mcp: - scopes: [read] + scopes: [write] disabled: false -components: - schemas: - PaginatedAssignedRequestList: + delete: + description: Removes a non-human identity's direct access from this resource. + operationId: delete_resource_nhi + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The resource ID of the non-human identity to remove from this resource. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: non_human_identity_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The remote ID of the access level for which this non-human identity has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + example: roles/cloudsql.instanceUser + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + responses: + "200": + description: This non-human identity's access was successfully removed from this resource. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [write] + disabled: false + /resources/{resource_id}/users/{user_id}: + post: + description: Adds a user to this resource. + operationId: add_resource_user + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user to add. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. + example: 60 + explode: true + in: query + name: duration_minutes + required: false + schema: + type: integer + maximum: 525960 # One year + style: form + deprecated: true + - description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + deprecated: true + requestBody: + required: false + content: + application/json: + schema: + example: + duration_minutes: 60 + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + properties: + duration_minutes: + description: The duration for which the resource can be accessed (in minutes). Use 0 to set to indefinite. + example: 60 + type: integer + maximum: 525960 # One year + access_level_remote_id: + description: The remote ID of the access level to grant to this user. If omitted, the default access level remote ID value (empty string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + type: string + required: + - duration_minutes + type: object + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceUser" + description: The ResourceUser that was created. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [write] + disabled: false + put: + description: Updates a user's access level or duration on this resource. + operationId: update_resource_user + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user whose access is being updated. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + type: object + example: + duration_minutes: 60 + access_level_remote_id: arn:aws:iam::590304332660:role/AdministratorAccess + properties: + duration_minutes: + description: The updated duration for which the resource can be accessed (in minutes). Use 0 for indefinite. + type: integer + maximum: 525960 # One year + example: 120 + access_level_remote_id: + description: The updated remote ID of the access level granted to this user. + type: string + example: arn:aws:iam::590304332660:role/ReadOnlyAccess + required: + - duration_minutes + responses: + "200": + description: The ResourceUser was successfully updated. + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceUser" + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [write] + disabled: false + delete: + description: Removes a user's direct access from this resource. + operationId: delete_resource_user + parameters: + - description: The ID of the resource. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of a user to remove from this resource. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The remote ID of the access level for which this user has direct access. If omitted, the default access level remote ID value (empty string) is assumed. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + responses: + "200": + description: This user's access was successfully removed from this resource. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [write] + disabled: false + get: + summary: Get resource user + description: Returns information about a specific user's access to a resource. + operationId: getResourceUser + parameters: + - description: The ID of the resource. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ResourceUser" + cursor: + type: string + description: Pagination cursor for the next page of results + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + total_count: + type: integer + description: Total number of results + example: 120 + required: + - data + description: List of ResourceUser records for the user's access to the resource. + "404": + description: Resource or user not found. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [read] + disabled: false + /resource-user-access-status/{resource_id}/{user_id}: + get: + deprecated: true + description: Get user's access status to a resource. + operationId: resource_user_access_status_retrieve + parameters: + - description: The ID of the resource. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The remote ID of the access level that you wish to query for the resource. If omitted, the default access level remote ID value (empty string) is used. + example: arn:aws:iam::590304332660:role/AdministratorAccess + explode: true + in: query + name: access_level_remote_id + required: false + schema: + type: string + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceUserAccessStatus" + description: The access status reflecting the user's access to the resource. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [read] + disabled: false + /resources/{resource_id}/tags: + get: + description: Returns all tags applied to the resource. + operationId: get_resource_tags + parameters: + - description: The ID of the resource whose tags to return. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TagsList" + description: The tags applied to the resource. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [read] + disabled: false + /resources/{resource_id}/scoped-role-permissions: + get: + description: Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. + operationId: get_resource_scoped_role_permissions + parameters: + - description: The ID of the resource whose scoped role permissions belong to. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ScopedRolePermissionList" + description: The role permissions that this Opal Scoped Role has. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [read] + disabled: false + put: + description: Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. + operationId: set_resource_scoped_role_permissions + parameters: + - description: The ID of the resource whose scoped role permissions belong to. Must be of OPAL_SCOPED_ROLE resource type. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ScopedRolePermissionList" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ScopedRolePermissionList" + description: The role permissions that this Opal Scoped Role has. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [write] + disabled: false + /resources/users/{user_id}: + get: + description: Gets the list of resources for this user. + operationId: get_user_resources + parameters: + - description: The ID of the user. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + - description: Limit the number of results returned. + example: 200 + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Include user's access to unmanaged resources. + example: false + explode: true + in: query + name: include_unmanaged + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceAccessUserList" + description: List of resources user has access to. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [read] + disabled: false + /resources/{resource_id}/groups: + get: + description: Returns a list of groups that grant access to the resource + operationId: get_resource_groups + parameters: + - description: The ID of the resource that the groups grant access to. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GroupResourceList" + description: The groups that grant access to the resource. + security: + - BearerAuth: [] + tags: + - resources + x-speakeasy-mcp: + scopes: [read] + disabled: false + /paladin: + post: + summary: Create Paladin + description: Creates a new `Paladin`. + operationId: createPaladin + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreatePaladinInfo" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Paladin" + description: The created Paladin. + security: + - BearerAuth: [] + tags: + - paladin + x-speakeasy-mcp: + scopes: [write] + disabled: false + /paladin/{paladin_id}: + get: + summary: Get Paladin by ID + description: Returns a `Paladin` object. + operationId: getPaladin + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Paladin" + description: The Paladin associated with the passed-in ID. + security: + - BearerAuth: [] + tags: + - paladin + x-speakeasy-mcp: + scopes: [read] + disabled: false + put: + summary: Update Paladin + description: Updates a `Paladin` object. + operationId: updatePaladin + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdatePaladinInfo" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Paladin" + description: The updated Paladin. + security: + - BearerAuth: [] + tags: + - paladin + x-speakeasy-mcp: + scopes: [write] + disabled: false + delete: + summary: Delete Paladin + description: Deletes a Paladin, removing the underlying service user. + operationId: deletePaladin + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The Paladin was deleted. + security: + - BearerAuth: [] + tags: + - paladin + x-speakeasy-mcp: + scopes: [write] + disabled: false + /paladin/name/{paladin_name}: + get: + summary: Get Paladins by name + description: Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty. + operationId: getPaladinFromName + parameters: + - description: The name of the Paladin. + example: paladin-agent-1 + explode: true + in: path + name: paladin_name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaladinList" + description: The list of Paladins matching the passed-in name. + security: + - BearerAuth: [] + tags: + - paladin + x-speakeasy-mcp: + scopes: [read] + disabled: false + /paladin/{paladin_id}/context-sources: + get: + summary: List Paladin context sources + description: Returns the context sources (Slack channels and documents) configured for a Paladin. + operationId: listPaladinContextSources + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaladinContextSourceList" + description: The context sources configured for the Paladin. + security: + - BearerAuth: [] + tags: + - paladin + x-speakeasy-mcp: + scopes: [read] + disabled: false + post: + summary: Add a Paladin context source + description: Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it. + operationId: createPaladinContextSource + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreatePaladinContextSourceInfo" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaladinContextSource" + description: The configured context source. + security: + - BearerAuth: [] + tags: + - paladin + x-speakeasy-mcp: + scopes: [write] + disabled: false + /paladin/{paladin_id}/context-sources/{context_source_id}: + delete: + summary: Remove a Paladin context source + description: Removes a context source from a Paladin. + operationId: deletePaladinContextSource + parameters: + - description: The ID of the Paladin. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: paladin_id + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the context source. + example: 8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8 + explode: true + in: path + name: context_source_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The context source was removed. + security: + - BearerAuth: [] + tags: + - paladin + x-speakeasy-mcp: + scopes: [write] + disabled: false + /sessions: + get: + description: Returns a list of `Session` objects. + operationId: sessions + parameters: + - description: The ID of the resource. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: true + in: query + name: resource_id + required: true + schema: + format: uuid + type: string + style: form + - description: The ID of the user you wish to query sessions for. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: query + name: user_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SessionsList" + description: The sessions associated with a resource. + security: + - BearerAuth: [] + tags: + - sessions + x-speakeasy-mcp: + scopes: [read] + disabled: false + /user: + get: + description: | + Retrieves detailed user information from Opal. This endpoint is designed to fetch user details by + either user ID (UUID) or email address. The endpoint follows a strict precedence rule where + user_id takes priority over email if both are provided. + + Key Implementation Notes: + - Exactly one identifier (user_id OR email) must be provided + - Returns a complete User object with all associated metadata + - Suitable for user verification and profile data retrieval + - Recommended for MCP user synchronization workflows + + Authentication: + - Requires valid API authentication + - Respects standard Opal authorization rules + operationId: user + parameters: + - description: The user ID of the user. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: query + name: user_id + required: false + schema: + format: uuid + type: string + style: form + - description: The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. + example: johndoe@domain.org + explode: true + in: query + name: email + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The user object associated with the passed-in email or ID. + security: + - BearerAuth: [] + tags: + - users + x-speakeasy-mcp: + scopes: [read] + disabled: false + /users: + get: + description: Returns a list of users for your organization. + operationId: getUsers + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: The IDs of the tags to filter by. Returns only users that have any of these tags applied. + in: query + name: tag_ids + required: false + schema: + type: array + items: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedUsersList" + description: One page worth users in your organization. + security: + - BearerAuth: [] + tags: + - users + x-speakeasy-mcp: + scopes: [read] + disabled: false + x-speakeasy-pagination: + type: cursor + inputs: + - name: cursor + in: parameters + type: cursor + - name: page_size + in: parameters + type: limit + outputs: + results: $.results + nextCursor: $.next + /users/remote_users: + get: + description: Returns a list of remote users for your organization. + operationId: getRemoteUsers + parameters: + - description: Filter remote users by their third party provider. + example: [GIT_HUB] + in: query + name: third_party_provider + required: false + schema: + type: array + items: + $ref: "#/components/schemas/ThirdPartyProviderEnum" + style: form + - description: Filter remote users by their user ID. + example: [32acc112-21ff-4669-91c2-21e27683eaa1] + in: query + name: user_id + required: false + schema: + type: array + items: + type: string + format: uuid + style: form + - description: Filter remote users by their remote ID. + example: [1234567890] + in: query + name: remote_id + required: false + schema: + type: array + items: + type: string + style: form + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedRemoteUsersList" + description: One page worth users in your organization. + security: + - BearerAuth: [] + tags: + - users + x-speakeasy-mcp: + scopes: [read] + disabled: false + /users/whoami: + get: + description: Returns the user that the provided API token authenticates as. + operationId: getUserWhoami + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: The user that the API token authenticates as. + security: + - BearerAuth: [] + tags: + - users + x-speakeasy-mcp: + scopes: [read] + disabled: false + /users/{user_id}/tags: + get: + description: Returns all tags applied to the user. + operationId: get_user_tags + parameters: + - description: The ID of the user whose tags to return. + name: user_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TagsList" + description: The tags applied to the user. + security: + - BearerAuth: [] + tags: + - users + x-speakeasy-mcp: + scopes: [read] + disabled: false + /access-rules: + get: + description: Returns a list of access rules for your organization. + operationId: get_access_rules + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedAccessRulesList" + description: One page of access rules for your organization. + security: + - BearerAuth: [] + tags: + - access-rules + x-speakeasy-mcp: + scopes: [read] + disabled: false + post: + description: Creates a new access rule config for the given group_id. + operationId: create_access_rule + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateAccessRuleInfo" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/AccessRule" + description: The created access rule config for the group. + security: + - BearerAuth: [] + tags: + - access-rules + x-speakeasy-mcp: + scopes: [write] + disabled: false + /access-rules/{access_rule_id}: + get: + description: Returns a list of access rule config given the group_id of the access rule. + operationId: get_access_rule + parameters: + - description: The access rule ID (group ID) of the access rule. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: access_rule_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccessRule" + description: The access rules for the group. + security: + - BearerAuth: [] + tags: + - access-rules + x-speakeasy-mcp: + scopes: [read] + disabled: false + put: + description: Updates the access rule config for the given group_id. + operationId: update_access_rule + parameters: + - description: The access rule ID (group ID) of the access rule. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: access_rule_id + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateAccessRuleInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccessRule" + description: The updated access rule config for the group. + security: + - BearerAuth: [] + tags: + - access-rules + x-speakeasy-mcp: + scopes: [write] + disabled: false + /tag/{tag_id}: + get: + summary: Get tag by ID + description: UNSTABLE. May be removed at any time. Gets a tag with the given id. + operationId: get_tag_by_ID + parameters: + - description: The tag ID + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: tag_id + required: true + schema: + type: string + format: uuid + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Tag" + description: The tag requested. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [read] + disabled: false + delete: + description: UNSTABLE. May be removed at any time. Deletes a tag with the given id. + operationId: delete_tag_by_ID + parameters: + - description: The tag ID + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: tag_id + required: true + schema: + type: string + format: uuid + style: simple + responses: + "200": + description: Tag was deleted. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [write] + disabled: false + /tag: + get: + description: Gets a tag with the given key and value. + operationId: get_tag + parameters: + - description: The key of the tag to get. + example: api-scope + explode: false + in: query + name: tag_key + required: true + schema: + type: string + style: form + - description: The value of the tag to get. + example: production + explode: false + in: query + name: tag_value + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Tag" + description: The tag requested. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [read] + disabled: false + post: + description: Creates a tag with the given key and value. + operationId: create_tag + parameters: + - description: The key of the tag to create. + example: api-scope + explode: false + in: query + name: tag_key + required: false + schema: + type: string + style: form + deprecated: true + - description: The value of the tag to create. + example: production + explode: false + in: query + name: tag_value + required: false + schema: + type: string + style: form + deprecated: true + - description: The ID of the owner that manages the tag. + example: f92aa855-cea9-4814-b9d8-f2a60d3e4a06 + explode: false + in: query + name: admin_owner_id + schema: + format: uuid + type: string + style: form + deprecated: true + requestBody: + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTagInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Tag" + description: The tag that was created. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [write] + disabled: false + /tags: + get: + summary: Get tags + description: Returns a list of tags created by your organization. + operationId: getTags + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedTagsList" + description: A list of tags created by your organization. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [read] + disabled: false + x-speakeasy-pagination: + type: cursor + inputs: + - name: cursor + in: parameters + type: cursor + - name: page_size + in: parameters + type: limit + outputs: + results: $.results + nextCursor: $.next + /tags/{tag_id}/users/{user_id}: + post: + description: Applies a tag to a user. + operationId: add_user_tag + parameters: + - description: The ID of the tag to apply. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user to apply the tag to. + name: user_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + requestBody: + required: false + content: + application/json: + schema: + type: object + responses: + "200": + description: Tag applied to user successfully. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [write] + disabled: false + delete: + description: Removes a tag from a user. + operationId: remove_user_tag + parameters: + - description: The ID of the tag to remove. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the user to remove the tag from. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: user_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag removed from user successfully. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [write] + disabled: false + /tags/{tag_id}/groups/{group_id}: + post: + description: Applies a tag to a group. + operationId: add_group_tag + parameters: + - description: The ID of the tag to apply. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the group to apply the tag to. + name: group_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag applied to group successfully. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [write] + disabled: false + delete: + description: Removes a tag from a group. + operationId: remove_group_tag + parameters: + - description: The ID of the tag to remove. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the group to remove the tag from. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: group_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag removed from group successfully. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [write] + disabled: false + /tags/{tag_id}/resources/{resource_id}: + post: + description: Applies a tag to a resource. + operationId: add_resource_tag + parameters: + - description: The ID of the tag to apply. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the resource to apply the tag to. + name: resource_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag applied to resource successfully. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [write] + disabled: false + delete: + description: Removes a tag from a resource. + operationId: remove_resource_tag + parameters: + - description: The ID of the tag to remove. + name: tag_id + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + required: true + schema: + format: uuid + type: string + style: simple + - description: The ID of the resource to remove the tag from. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + explode: false + in: path + name: resource_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Tag removed from resource successfully. + security: + - BearerAuth: [] + tags: + - tags + x-speakeasy-mcp: + scopes: [write] + disabled: false + /message-channels: + get: + summary: Get message channels + description: Returns a list of `MessageChannel` objects. + operationId: get_message_channels + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MessageChannelList" + description: A list of message channels for your organization. + security: + - BearerAuth: [] + tags: + - message-channels + x-speakeasy-mcp: + scopes: [read] + disabled: false + post: + description: Creates a `MessageChannel` objects. + operationId: create_message_channel + requestBody: + description: The `MessageChannel` object to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateMessageChannelInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MessageChannel" + description: The message channel that was created. + security: + - BearerAuth: [] + tags: + - message-channels + x-speakeasy-mcp: + scopes: [write] + disabled: false + /message-channels/{message_channel_id}: + get: + summary: Get message channel by ID + description: Gets a `MessageChannel` object. + operationId: get_message_channel + parameters: + - description: The ID of the message_channel. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: message_channel_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MessageChannel" + description: The requested message channel. + security: + - BearerAuth: [] + tags: + - message-channels + x-speakeasy-mcp: + scopes: [read] + disabled: false + /on-call-schedules: + get: + summary: Get on call schedules + description: Returns a list of `OnCallSchedule` objects. + operationId: get_on_call_schedules + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OnCallScheduleList" + description: A list of on call schedules for your organization. + security: + - BearerAuth: [] + tags: + - on-call-schedules + x-speakeasy-mcp: + scopes: [read] + disabled: false + post: + description: Creates a `OnCallSchedule` objects. + operationId: create_on_call_schedule + requestBody: + description: The `OnCallSchedule` object to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateOnCallScheduleInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OnCallSchedule" + description: The on call schedule that was created. + security: + - BearerAuth: [] + tags: + - on-call-schedules + x-speakeasy-mcp: + scopes: [write] + disabled: false + /on-call-schedules/{on_call_schedule_id}: + get: + summary: Get on call schedule by ID + description: Gets a `OnCallSchedule` object. + operationId: get_on_call_schedule + parameters: + - description: The ID of the on_call_schedule. + example: 9546209c-42c2-4801-96d7-9ec42df0f59c + explode: false + in: path + name: on_call_schedule_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OnCallSchedule" + description: The requested on call schedule. + security: + - BearerAuth: [] + tags: + - on-call-schedules + x-speakeasy-mcp: + scopes: [read] + disabled: false + /queries/run: + post: + summary: Run an ad-hoc OpalQuery + description: Runs an ad-hoc OpalQuery and returns the results. Supports NODE queries (users, resources, groups) and ACCESS_PATH queries (principal-to-entitlement access edges). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta. + operationId: runOpalQuery + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/RunOpalQueryRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/OpalQueryResults" + description: The results of the OpalQuery. + security: + - BearerAuth: [] + tags: + - opal-queries + x-speakeasy-mcp: + scopes: [write] + disabled: false + /tokens: + get: + summary: Get tokens + description: Returns a list of first-party API tokens for your organization. Requires admin access. + operationId: getTokens + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + - description: Filter by token IDs. + explode: false + in: query + name: token_ids + required: false + schema: + items: + format: uuid + type: string + type: array + style: form + - description: Filter by user ID. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: user_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedTokensList" + description: A list of API tokens for your organization. + security: + - BearerAuth: [] + tags: + - tokens + x-speakeasy-mcp: + scopes: [read] + disabled: false + /tokens/{token_id}: + delete: + summary: Delete token + description: Deletes a first-party API token. Admins can delete any token. Non-admins can only delete their own tokens when the organization allows all users to create API tokens. + operationId: deleteToken + parameters: + - description: The ID of the token to delete. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + explode: false + in: path + name: token_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: The token was successfully deleted. + "403": + description: Not authorized to delete this token. + "404": + description: Token not found. + security: + - BearerAuth: [] + tags: + - tokens + x-speakeasy-mcp: + scopes: [write] + disabled: false + /uars: + get: + deprecated: true + description: Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. + operationId: getUARs + parameters: + - description: The pagination cursor value. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Number of results to return per page. Default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedUARsList" + description: A list of UARs for your organization. + security: + - BearerAuth: [] + tags: + - uars + x-speakeasy-mcp: + scopes: [read] + disabled: false + x-speakeasy-pagination: + type: cursor + inputs: + - name: cursor + in: parameters + type: cursor + - name: page_size + in: parameters + type: limit + outputs: + results: $.results + nextCursor: $.next + /uar: + post: + deprecated: true + description: Starts a User Access Review. Deprecated in favor of `POST /campaigns`. + operationId: create_uar + requestBody: + description: The settings of the UAR. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateUARInfo" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/UAR" + description: The UAR that was started. + security: + - BearerAuth: [] + tags: + - uars + x-speakeasy-mcp: + scopes: [write] + disabled: false + /uar/{uar_id}: + get: + deprecated: true + description: Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. + operationId: get_uar + parameters: + - description: The ID of the UAR. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: path + name: uar_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/UAR" + description: The UAR that was requested. + security: + - BearerAuth: [] + tags: + - uars + x-speakeasy-mcp: + scopes: [read] + disabled: false + /sync_errors: + get: + description: Returns a list of recent sync errors that have occurred since the last successful sync. + operationId: getSyncErrors + parameters: + - description: The ID of the app to list sync errors for. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: false + in: query + name: app_id + required: false + schema: + format: uuid + type: string + style: form + - description: The ID of the resource to list sync errors for. + example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5 + explode: false + in: query + name: resource_id + required: false + schema: + format: uuid + type: string + style: form + - description: The ID of the group to list sync errors for. + example: 9546209c-42c2-4801-96d7-9ec42df0f59c + explode: false + in: query + name: group_id + required: false + schema: + format: uuid + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/SyncErrorList" + type: array + description: A list of sync errors. + security: + - BearerAuth: [] + tags: + - apps + x-speakeasy-mcp: + scopes: [read] + disabled: false + /delegations: + get: + summary: Get delegations + description: Returns a list of request reviewer delegations configured for your organization. + operationId: getDelegations + parameters: + - description: The delegator user ID to filter delegations by the user delegating their access review requests. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: delegator_user_id + required: false + schema: + format: uuid + type: string + style: form + - description: The delegate user ID to filter delegations by the user being delegated to. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + explode: true + in: query + name: delegate_user_id + required: false + schema: + format: uuid + type: string + style: form + - description: A cursor to indicate where to start fetching results. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: The maximum number of results to return per page. The default is 200. + example: 200 + explode: true + in: query + name: page_size + required: false + schema: + type: integer + maximum: 1000 + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedDelegationsList" + description: A list of delegations for your organization. + security: + - BearerAuth: [] + tags: + - delegations + x-speakeasy-mcp: + scopes: [read] + disabled: false + post: + description: Creates a new request reviewer delegation to delegate access review requests from one user to another. + operationId: createDelegation + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/CreateDelegationRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Delegation" + description: Delegation created successfully. + security: + - BearerAuth: [] + tags: + - delegations + x-speakeasy-mcp: + scopes: [write] + disabled: false + /delegations/{delegation_id}: + get: + summary: Get delegation by ID + description: Returns a specific delegation by its ID. + operationId: getDelegation + parameters: + - description: The ID of the delegation to retrieve. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: delegation_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Delegation" + description: The requested delegation. + security: + - BearerAuth: [] + tags: + - delegations + x-speakeasy-mcp: + scopes: [read] + disabled: false + delete: + description: Deletes a delegation by its ID. + operationId: deleteDelegation + parameters: + - description: The ID of the delegation to remove. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + explode: true + in: path + name: delegation_id + required: true + schema: + format: uuid + type: string + style: simple + responses: + "200": + description: Delegation removed successfully + security: + - BearerAuth: [] + tags: + - delegations + x-speakeasy-mcp: + scopes: [write] + disabled: false +components: + schemas: + AccessEntityFilters: + type: object + description: Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + properties: + entityTypes: + type: array + description: Filter by entity type. Only RESOURCE, GROUP, and USER are queryable via OpalQuery. + items: + type: string + enum: [RESOURCE, GROUP, USER] + entityItemTypes: + type: array + description: Filter by entity item types. + items: + $ref: "#/components/schemas/EntityItemTypeEnum" + entityName: + $ref: "#/components/schemas/EntityNameFilter" + entityTag: + $ref: "#/components/schemas/EntityTagFilter" + hrIdpStatus: + $ref: "#/components/schemas/IdpStatusFilter" + entityAdminOwner: + $ref: "#/components/schemas/EntityAdminFilter" + entityIDs: + type: array + description: Filter by specific entity UUIDs. + items: + type: string + format: uuid + importedFromApp: + type: array + description: Filter by app IDs from which returned nodes will be imported from. + items: + type: string + format: uuid + roleRemoteIds: + type: array + description: Filter by role remote IDs. Can only be applied within a hasAccessTo clause. + items: + type: string + roleNames: + type: array + description: Filter by role display names (e.g. "Admin", "Read"). Can only be applied within a hasAccessTo clause. + items: + type: string + allOf: + type: array + description: > + A list of nested filters that must all match (logical AND). Each + + + + item has the same shape as this object — scalar fields like + `entityTypes` or `entityTag`, and can further nest `allOf`, + `anyOf`, or `not`. + items: + $ref: "#/components/schemas/AccessEntityFilters" + anyOf: + type: array + description: > + A list of nested filters where at least one must match (logical + + + + OR). Each item has the same shape as this object. + items: + $ref: "#/components/schemas/AccessEntityFilters" + not: + description: > + Excludes entities matching the embedded filter (logical NOT). Pass a filter object with the same shape as this one — typically a single scalar field, like `{not: {entityTypes: ["RESOURCE"]}}` to exclude resources. + + type: object + x-go-type: AccessEntityFilters + RunOpalQueryRequest: + description: Request body for running an ad-hoc OpalQuery. The `type` field determines which query schema applies. + oneOf: + - $ref: "#/components/schemas/OpalNodeQuery" + - $ref: "#/components/schemas/OpalAccessPathQuery" + discriminator: + propertyName: type + mapping: + NODE: "#/components/schemas/OpalNodeQuery" + ACCESS_PATH: "#/components/schemas/OpalAccessPathQuery" + # example: + # type: NODE + # query: + # nodeFilters: + # entityTypes: [RESOURCE] + # allOf: + # - entityTag: + # key: env + # value: prod + # - entityTag: + # key: team + # value: platform + # not: + # entityItemTypes: [AWS_IAM_ROLE] + # accessFilters: + # isAccessibleBy: + # entityTypes: [USER] + # entityTag: + # key: contractor + # first: 50 + OpalNodeQuery: + type: object + required: + - type + description: Request body for a NODE-type OpalQuery. Returns entities (users, resources, groups) matching the given filters. + example: + type: NODE + query: + nodeFilters: + entityTypes: [RESOURCE] + entityTag: + key: env + value: prod + accessFilters: + isAccessibleBy: + entityTypes: [USER] + entityTag: + key: contractor + first: 50 + properties: + type: + type: string + enum: + - NODE + query: + $ref: "#/components/schemas/OpalNodeQueryBody" + first: + type: integer + description: Maximum number of results to return. Defaults to 200. + example: 200 + after: + type: string + description: Cursor from a previous response to fetch the next page of results. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + OpalNodeQueryBody: + type: object + description: The filter body for a NODE-type OpalQuery. + properties: + nodeFilters: + $ref: "#/components/schemas/AccessEntityFilters" + accessFilters: + $ref: "#/components/schemas/AccessRelationshipFilters" + OpalQueryResultNode: + type: object + required: + - id + - name + - entityType + - entityItemType + description: A matched entity from an OpalQuery result. + properties: + id: + type: string + format: uuid + description: The entity's unique identifier. + name: + type: string + description: The display name of the entity. + entityType: + type: string + enum: + - USER + - GROUP + - RESOURCE + description: The top-level entity type. + entityItemType: + $ref: "#/components/schemas/EntityItemTypeEnum" + OpalQueryResultEdge: + type: object + required: + - node + - cursor + description: A single result edge from an OpalQuery, containing the matched entity and its pagination cursor. + properties: + node: + $ref: "#/components/schemas/OpalQueryResultNode" + cursor: + type: string + description: Opaque cursor for this entity, used for pagination. + OpalQueryResults: + description: Paginated results of an OpalQuery. The `type` field discriminates which result schema applies and mirrors the `type` field on the request. + oneOf: + - $ref: "#/components/schemas/OpalNodeQueryResults" + - $ref: "#/components/schemas/OpalAccessPathQueryResults" + discriminator: + propertyName: type + mapping: + NODE: "#/components/schemas/OpalNodeQueryResults" + ACCESS_PATH: "#/components/schemas/OpalAccessPathQueryResults" + OpalNodeQueryResults: + type: object + required: + - type + - edges + - pageInfo + description: Paginated results of a NODE-type OpalQuery — one edge per matched entity (user, resource, or group). + properties: + type: + type: string + enum: + - NODE + edges: + type: array + description: List of matched entities. + items: + $ref: "#/components/schemas/OpalQueryResultEdge" + pageInfo: + $ref: "#/components/schemas/PageInfo" + OpalAccessPathQuery: + type: object + required: + - type + description: Request body for an ACCESS_PATH-type OpalQuery. Returns principal-to- entitlement access paths matching the given edge filters. + example: + type: ACCESS_PATH + query: + principalFilter: + entityTypes: [USER] + entitlementFilter: + entityItemTypes: [AWS_IAM_ROLE] + edgeFilter: + directOnly: true + first: 50 + properties: + type: + type: string + enum: + - ACCESS_PATH + query: + $ref: "#/components/schemas/OpalAccessPathQueryBody" + first: + type: integer + description: Maximum number of results to return. Defaults to 200. + example: 200 + after: + type: string + description: Opaque cursor from a previous ACCESS_PATH response to fetch the next page of results. + includeCount: + type: boolean + description: When true, populate totalCount in the response. Defaults to false. + example: false + OpalAccessPathQueryBody: + type: object + description: Edge-query filters for an ACCESS_PATH OpalQuery. At least one of principalFilter or entitlementFilter is required. + properties: + principalFilter: + $ref: "#/components/schemas/AccessEntityFilters" + entitlementFilter: + $ref: "#/components/schemas/AccessEntityFilters" + principalAccessFilters: + description: > + Advanced access filter on the principal side of each path. Restricts results to principals that additionally satisfy these access-edge constraints: `hasAccessTo` keeps only principals that also have access to a matching entity; `isAccessibleBy` keeps only principals that are also accessible by a matching entity. Only takes effect when `principalFilter` is also supplied (it refines that filter); on its own it has no effect. + + $ref: "#/components/schemas/AccessRelationshipFilters" + entitlementAccessFilters: + description: > + Advanced access filter on the entitlement side of each path. Restricts results to entitlements that additionally satisfy these access-edge constraints: `hasAccessTo` keeps only entitlements that also have access to a matching entity; `isAccessibleBy` keeps only entitlements that are also accessible by a matching entity. Only takes effect when `entitlementFilter` is also supplied (it refines that filter); on its own it has no effect. + + $ref: "#/components/schemas/AccessRelationshipFilters" + accessLevelRemoteIds: + type: array + description: Filter by access-level remote IDs on the terminal edge. + items: + type: string + accessLevelNames: + type: array + description: Filter by access-level display names on the terminal edge. + items: + type: string + edgeFilter: + $ref: "#/components/schemas/OpalAccessPathEdgeFilter" + OpalAccessPathEdgeFilter: + type: object + description: Constraints on the access path edges themselves. + properties: + directOnly: + type: boolean + description: When true, only return direct (depth-1) principal-to-entitlement edges. + example: true + accessDurationType: + type: string + description: Constrain results by whether the terminal access expires. + enum: + - EXPIRING_ONLY + - PERMANENT_ONLY + example: EXPIRING_ONLY + OpalAccessPathResultNode: + type: object + required: + - principalId + - entitlementId + - depth + - path + description: A matched access path from an ACCESS_PATH OpalQuery. + properties: + principalId: + type: string + format: uuid + description: The principal entity ID. + entitlementId: + type: string + format: uuid + description: The entitlement entity ID. + accessLevelRemoteId: + type: string + nullable: true + description: Remote ID of the terminal access level. + accessLevelName: + type: string + nullable: true + description: Display name of the terminal access level. + expiration: + type: string + format: date-time + nullable: true + description: Expiration of the terminal access, if any. + depth: + type: integer + description: Number of hops from principal to entitlement (path length - 1). + path: + type: array + description: Entity IDs along the path from principal to entitlement. + items: + type: string + format: uuid + OpalAccessPathResultEdge: + type: object + required: + - node + - cursor + description: A single ACCESS_PATH result edge containing the matched path and its pagination cursor. + properties: + node: + $ref: "#/components/schemas/OpalAccessPathResultNode" + cursor: + type: string + description: Opaque cursor for this path, used for pagination. + OpalAccessPathQueryResults: + type: object + required: + - type + - edges + - pageInfo + description: Paginated results of an ACCESS_PATH-type OpalQuery — one edge per matched principal-to-entitlement access path. + properties: + type: + type: string + enum: + - ACCESS_PATH + edges: + type: array + description: List of matched access paths. + items: + $ref: "#/components/schemas/OpalAccessPathResultEdge" + pageInfo: + $ref: "#/components/schemas/PageInfo" + totalCount: + type: integer + nullable: true + description: Exact total number of matching paths when includeCount was true on the request; otherwise null. + AccessRelationshipFilters: + type: object + description: > + Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously. + + properties: + isAccessibleBy: + description: Inbound-edge filter. The returned node must be accessible by at least one entity matching this filter. + $ref: "#/components/schemas/AccessEntityFilters" + hasAccessTo: + description: Outbound-edge filter. The returned node must have access to at least one entity matching this filter. + $ref: "#/components/schemas/AccessEntityFilters" + EntityNameFilter: + type: object + required: + - stringMatchType + - string + description: Filters entities by name using a string match strategy. + properties: + stringMatchType: + $ref: "#/components/schemas/StringMatchType" + string: + type: string + description: The string value to match against the entity name. + example: engineering + EntityTagFilter: + type: object + required: + - key + description: Filters entities by a tag key/value pair, optionally scoped to a connection. + properties: + key: + type: string + description: The tag key to filter by. + example: team + value: + type: string + description: The tag value to filter by. If omitted, matches any value for the given key. + example: platform + connectionId: + type: string + format: uuid + description: If specified, filters by tags associated with this connection. + IdpStatusFilter: + type: object + description: > + Filters USER entities by their HR/IDP lifecycle status. Only applies to USER entities; GROUP and RESOURCE entities never match, in either polarity. `statuses` combine with OR. `not` inverts the match within the user domain (e.g. "IDP status is NOT active"), so it still returns only users rather than sweeping in groups/resources. + + properties: + statuses: + type: array + description: Match users whose HR/IDP status is one of these values. + items: + $ref: "#/components/schemas/UserHrIdpStatusEnum" + not: + type: boolean + description: Invert the match within the user domain (e.g. "IDP status is NOT active"). + EntityAdminFilter: + type: object + required: + - ownerIDs + description: > + Filters GROUP and RESOURCE entities by their admin owner. USER entities never match, in either polarity. `not` inverts the match within the resource/group domain (self-negating, like IdpStatusFilter): omit it (or false) to include entities owned by the given owners, set it true to exclude them. + + properties: + ownerIDs: + type: array + description: The owner (group) UUIDs to match entities against. + items: + type: string + format: uuid + not: + type: boolean + description: Invert the match — return resources/groups NOT owned by the given owners. + StringMatchType: + type: string + description: >- + How to match a string value against entity names. REGEX matches the value as a case-insensitive regular expression. + enum: + - CONTAINS + - EQUALS + - STARTS_WITH + - ENDS_WITH + - REGEX + PaginatedAssignedRequestList: + type: object + required: + - requests + - cursor + properties: + requests: + type: array + items: + $ref: "#/components/schemas/Request" + cursor: + type: string + description: The cursor to continue pagination + PageInfo: + type: object + required: + - hasNextPage + - endCursor + - hasPreviousPage + - startCursor + properties: + hasNextPage: + type: boolean + description: Whether there are more items after the end cursor + endCursor: + type: string + description: The cursor to continue pagination forwards + hasPreviousPage: + type: boolean + description: Whether there are more items before the start cursor + startCursor: + type: string + description: The cursor to continue pagination backwards + RequestEdge: + type: object + required: + - node + - cursor + properties: + node: + $ref: "#/components/schemas/Request" + cursor: + type: string + description: The cursor for this request edge + RequestConnection: + type: object + required: + - edges + - pageInfo + - totalCount + properties: + edges: + type: array + items: + $ref: "#/components/schemas/RequestEdge" + pageInfo: + $ref: "#/components/schemas/PageInfo" + totalCount: + type: integer + description: The total number of items available + UARScope: + description: If set, the access review will only contain resources and groups that match at least one of the filters in scope. + example: + filter_operator: ANY + users: + - userd283-ca87-4a8a-bdbb-df212eca5353 + include_group_bindings: True + tags: + - key: uar_scope + value: high_priority + names: + - demo + - api + admins: + - f454d283-ca87-4a8a-bdbb-df212eca5353 + - 8763d283-ca87-4a8a-bdbb-df212ecab139 + resource_types: + - GCP_CLOUD_SQL_POSTGRES_INSTANCE + group_types: + - AWS_SSO_GROUP + apps: + - pas2d283-ca87-4a8a-bdbb-df212eca5353 + - apss2d283-ca87-4a8a-bdbb-df212eca5353 + entities: + - f454d283-as87-4a8a-bdbb-df212eca5353 + - f454d283-as87-4a8a-bdbb-df212eca5329 + properties: + group_visibility: + description: Specifies what users can see during an Access Review + type: string + enum: [STRICT, VIEW_VISIBLE_AND_ASSIGNED, VIEW_ALL] + users: + description: The access review will only include the following users. If any users are selected, any entity filters will be applied to only the entities that the selected users have access to. + items: + example: userd283-ca87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + filter_operator: + description: Specifies whether entities must match all (AND) or any (OR) of the filters. + type: string + enum: [ANY, ALL] + entities: + description: This access review will include resources and groups with ids in the given strings. + items: + example: f454d283-as87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + apps: + description: This access review will include items in the specified applications + items: + example: pas2d283-ca87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + admins: + description: This access review will include resources and groups who are owned by one of the owners corresponding to the given IDs. + items: + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + type: string + format: uuid + type: array + group_types: + description: This access review will include items of the specified group types + type: array + items: + $ref: "#/components/schemas/GroupTypeEnum" + resource_types: + description: This access review will include items of the specified resource types + type: array + items: + $ref: "#/components/schemas/ResourceTypeEnum" + include_group_bindings: + type: boolean + example: False + tags: + description: This access review will include resources and groups who are tagged with one of the given tags. + items: + $ref: "#/components/schemas/TagFilter" + type: array + names: + description: This access review will include resources and groups whose name contains one of the given strings. + items: + example: demo + type: string + type: array type: object - required: - - requests - - cursor + CampaignStatusEnum: + description: The current status of a campaign. + enum: + - DRAFT + - ONGOING + - COMPLETED + - STOPPED + - ENDED + example: ONGOING + type: string + CampaignRevokeOnEnum: + description: When access decisions take effect during a campaign. + enum: + - ACTION + - END + - NONE + example: END + type: string + CampaignGroupAssetVisibilityPolicyEnum: + description: Controls what group assets reviewers can see during the campaign. + enum: + - STRICT + - VIEW_VISIBLE_AND_ASSIGNED + - VIEW_ALL + example: STRICT + type: string + CampaignConfiguration: + description: Configuration for an access review campaign. + example: + configuration_id: 39a4d283-ca87-4a8a-bdbb-df212eca5fdb + created_at: 2026-07-01T00:00:00Z + updated_at: 2026-07-01T00:00:00Z + query: null + reviewer_assignment_policy: MANUALLY + allow_self_review: false + send_reviewer_assignment_notification: true + allow_reviewer_reassignment: false + start_date: null + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles + revoke_on: END + reminder_schedule: [7, 3, 1] + reminder_include_manager: true + require_reason_on_denial: false + hide_ai_suggestions: false + custom_start_message: null + group_asset_visibility_policy: STRICT + is_template: false + cron_expression: null + next_scheduled_run: null + last_scheduled_run: null + recurring_duration_days: null properties: - requests: - type: array + configuration_id: + description: The ID of the campaign configuration. + example: 39a4d283-ca87-4a8a-bdbb-df212eca5fdb + format: uuid + type: string + created_at: + description: The creation time of the configuration. + example: 2026-07-01T00:00:00Z + format: date-time + type: string + updated_at: + description: The last updated time of the configuration. + example: 2026-07-01T00:00:00Z + format: date-time + type: string + query: + description: Access-path query defining the scope of access to review. Uses the same principalFilter / entitlementFilter shape as ACCESS_PATH OpalQuery. + allOf: + - $ref: "#/components/schemas/OpalAccessPathQueryBody" + nullable: true + reviewer_assignment_policy: + $ref: "#/components/schemas/UARReviewerAssignmentPolicyEnum" + allow_self_review: + description: Whether reviewers can review their own access. + example: false + type: boolean + send_reviewer_assignment_notification: + description: Whether to notify reviewers upon assignment. + example: true + type: boolean + allow_reviewer_reassignment: + description: Whether reviewers may reassign their reviews to another user. + example: false + type: boolean + start_date: + description: Scheduled start date of the campaign. + example: 2026-07-02T00:00:00Z + format: date-time + nullable: true + type: string + end_date: + description: Scheduled end date of the campaign. + example: 2026-09-30T00:00:00Z + format: date-time + nullable: true + type: string + timezone: + description: IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). + example: America/Los_Angeles + type: string + revoke_on: + $ref: "#/components/schemas/CampaignRevokeOnEnum" + reminder_schedule: + description: Days before end date to send reminder notifications. + example: [7, 3, 1] items: - $ref: "#/components/schemas/Request" - cursor: + type: integer + type: array + reminder_include_manager: + description: Whether to include the reviewer's manager in reminders. + example: true + type: boolean + require_reason_on_denial: + description: Whether reviewers must provide a reason when denying (revoking) access. + example: false + type: boolean + hide_ai_suggestions: + description: Whether AI suggestions are hidden from reviewers. + example: false + type: boolean + custom_start_message: + description: Optional custom message included when notifying reviewers that the campaign started. + example: Please complete your reviews by Friday. + nullable: true type: string - description: The cursor to continue pagination - PageInfo: - type: object + group_asset_visibility_policy: + $ref: "#/components/schemas/CampaignGroupAssetVisibilityPolicyEnum" + is_template: + description: Whether this configuration is a recurring schedule template. + example: false + type: boolean + cron_expression: + description: Cron expression driving the recurring schedule. Null for one-off campaigns. + example: 0 9 1 * * + nullable: true + type: string + next_scheduled_run: + description: Next time a draft will be generated from this template. + example: 2026-08-01T16:00:00Z + format: date-time + nullable: true + type: string + last_scheduled_run: + description: Most recent time a draft was generated from this template. + example: 2026-07-01T16:00:00Z + format: date-time + nullable: true + type: string + recurring_duration_days: + description: Deadline window in days applied to each draft generated from this template. + example: 14 + nullable: true + type: integer required: - - hasNextPage - - endCursor - - hasPreviousPage - - startCursor + - configuration_id + - created_at + - updated_at + - reviewer_assignment_policy + - allow_self_review + - send_reviewer_assignment_notification + - allow_reviewer_reassignment + - timezone + - revoke_on + - reminder_include_manager + - require_reason_on_denial + - hide_ai_suggestions + - group_asset_visibility_policy + - is_template + type: object + CreateCampaignConfigurationInfo: + description: Configuration to apply when creating a campaign. `query` is required; other omitted fields use defaults. + example: + query: + principalFilter: + entityTypes: [USER] + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles + allow_self_review: false properties: - hasNextPage: + query: + description: | + Access-path query defining the scope of access to review. Required. + Uses the same principalFilter / entitlementFilter shape as + ACCESS_PATH OpalQuery. Must include at least one of + principalFilter or entitlementFilter. + + Campaign scope only supports direct access edges: + `edgeFilter.directOnly` defaults to `true`, is always stored as + `true`, and passing `false` returns 400. + allOf: + - $ref: "#/components/schemas/OpalAccessPathQueryBody" + reviewer_assignment_policy: + $ref: "#/components/schemas/UARReviewerAssignmentPolicyEnum" + allow_self_review: + description: Whether reviewers can review their own access. + example: false type: boolean - description: Whether there are more items after the end cursor - endCursor: + send_reviewer_assignment_notification: + description: Whether to notify reviewers upon assignment. + example: true + type: boolean + allow_reviewer_reassignment: + description: Whether reviewers may reassign their reviews to another user. + example: false + type: boolean + start_date: + description: Scheduled start date of the campaign. + example: 2026-07-02T00:00:00Z + format: date-time + nullable: true type: string - description: The cursor to continue pagination forwards - hasPreviousPage: + end_date: + description: Scheduled end date of the campaign. + example: 2026-09-30T00:00:00Z + format: date-time + nullable: true + type: string + timezone: + description: IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). + example: America/Los_Angeles + type: string + revoke_on: + $ref: "#/components/schemas/CampaignRevokeOnEnum" + reminder_schedule: + description: Days before end date to send reminder notifications. + example: [7, 3, 1] + items: + type: integer + type: array + reminder_include_manager: + description: Whether to include the reviewer's manager in reminders. + example: true type: boolean - description: Whether there are more items before the start cursor - startCursor: + require_reason_on_denial: + description: Whether reviewers must provide a reason when denying (revoking) access. + example: false + type: boolean + hide_ai_suggestions: + description: Whether AI suggestions are hidden from reviewers. + example: false + type: boolean + custom_start_message: + description: Optional custom message included when notifying reviewers that the campaign started. + example: Please complete your reviews by Friday. + nullable: true type: string - description: The cursor to continue pagination backwards - RequestEdge: - type: object + group_asset_visibility_policy: + $ref: "#/components/schemas/CampaignGroupAssetVisibilityPolicyEnum" + is_template: + description: Whether this configuration is a recurring schedule template. + example: false + type: boolean + cron_expression: + description: Cron expression driving the recurring schedule. Null for one-off campaigns. + example: 0 9 1 * * + nullable: true + type: string + recurring_duration_days: + description: Deadline window in days applied to each draft generated from this template. + example: 14 + nullable: true + type: integer + excluded_role_assignment_ids: + description: Role assignment IDs to exclude from the campaign scope during population. + items: + format: uuid + type: string + type: array required: - - node - - cursor + - query + type: object + CreateCampaignInfo: + description: |- + # CreateCampaignInfo Object + ### Description + The `CreateCampaignInfo` object is used to create a campaign. + + ### Usage Example + Use in the `POST Campaigns` endpoint. + example: + name: Q3 Access Review + configuration: + query: + principalFilter: + entityTypes: [USER] + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles properties: - node: - $ref: "#/components/schemas/Request" - cursor: + name: + description: The name of the campaign. + example: Q3 Access Review type: string - description: The cursor for this request edge - RequestConnection: - type: object + configuration: + description: Configuration for the campaign. Required; must include a query. Other omitted fields use defaults. + allOf: + - $ref: "#/components/schemas/CreateCampaignConfigurationInfo" required: - - edges - - pageInfo - - totalCount + - name + - configuration + type: object + UpdateCampaignConfigurationInfo: + description: | + Configuration fields to update on a campaign. All fields are optional; + omitted fields are left unchanged. `query` and + `reviewer_assignment_policy` are set at create time and cannot be + updated here; including either field returns 400. + `cron_expression` and `recurring_duration_days` may only be set when + the campaign is a template; setting them on a one-off campaign returns + 400. `is_template` is immutable and not accepted on update. + example: + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles + allow_self_review: false properties: - edges: - type: array + allow_self_review: + description: Whether reviewers can review their own access. + example: false + type: boolean + send_reviewer_assignment_notification: + description: Whether to notify reviewers upon assignment. + example: true + type: boolean + allow_reviewer_reassignment: + description: Whether reviewers may reassign their reviews to another user. + example: false + type: boolean + start_date: + description: | + Scheduled start date of the campaign. May only be updated while the + campaign has not started (started_at is null). When set, the date's + calendar day in the campaign timezone must be at least tomorrow. + example: 2026-07-02T00:00:00Z + format: date-time + nullable: true + type: string + end_date: + description: | + Scheduled end date of the campaign. When set, the date's calendar + day in the campaign timezone must be at least tomorrow. + example: 2026-09-30T00:00:00Z + format: date-time + nullable: true + type: string + timezone: + description: IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). + example: America/Los_Angeles + type: string + revoke_on: + $ref: "#/components/schemas/CampaignRevokeOnEnum" + reminder_schedule: + description: Days before end date to send reminder notifications. + example: [7, 3, 1] items: - $ref: "#/components/schemas/RequestEdge" - pageInfo: - $ref: "#/components/schemas/PageInfo" - totalCount: + type: integer + type: array + reminder_include_manager: + description: Whether to include the reviewer's manager in reminders. + example: true + type: boolean + require_reason_on_denial: + description: Whether reviewers must provide a reason when denying (revoking) access. + example: false + type: boolean + hide_ai_suggestions: + description: Whether AI suggestions are hidden from reviewers. + example: false + type: boolean + custom_start_message: + description: Optional custom message included when notifying reviewers that the campaign started. + example: Please complete your reviews by Friday. + nullable: true + type: string + group_asset_visibility_policy: + $ref: "#/components/schemas/CampaignGroupAssetVisibilityPolicyEnum" + cron_expression: + description: Cron expression driving the recurring schedule. Only valid on template campaigns. Pass an empty string to clear the active months (next_scheduled_run is cleared); the campaign remains a template. + example: 0 9 1 * * + nullable: true + type: string + recurring_duration_days: + description: Deadline window in days applied to each draft generated from this template. Only valid on template campaigns. + example: 14 + nullable: true type: integer - description: The total number of items available - UARScope: - description: If set, the access review will only contain resources and groups that match at least one of the filters in scope. + type: object + UpdateCampaignInfo: + description: |- + # UpdateCampaignInfo Object + ### Description + The `UpdateCampaignInfo` object is used to partially update a campaign. + Omitted fields are left unchanged. + + ### Usage Example + Use in the `PUT Campaign` endpoint. + example: + name: Q3 Access Review (Updated) + configuration: + end_date: 2026-09-30T00:00:00Z + timezone: America/Los_Angeles + properties: + name: + description: The name of the campaign. + example: Q3 Access Review (Updated) + type: string + configuration: + description: Configuration fields to create or update. + allOf: + - $ref: "#/components/schemas/UpdateCampaignConfigurationInfo" + type: object + Campaign: + description: An access review campaign. + example: + campaign_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + name: Q3 Access Review + status: DRAFT + is_template: false + created_at: 2026-07-01T00:00:00Z + updated_at: 2026-07-01T00:00:00Z + created_by_user_id: 32acc112-21ff-4669-91c2-21e27683eaa1 + configuration: null + started_at: null + started_by_user_id: null + stopped_at: null + stopped_by_user_id: null + ended_at: null + ended_by_user_id: null + properties: + campaign_id: + description: The ID of the campaign. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + name: + description: The name of the campaign. + example: Q3 Access Review + type: string + status: + $ref: "#/components/schemas/CampaignStatusEnum" + is_template: + description: Whether this campaign is a recurring schedule template. Templates spawn draft campaigns on schedule rather than being reviewed directly. + example: false + type: boolean + created_at: + description: The creation time of the campaign. + example: 2026-07-01T00:00:00Z + format: date-time + type: string + updated_at: + description: The last updated time of the campaign. + example: 2026-07-01T00:00:00Z + format: date-time + type: string + created_by_user_id: + description: The ID of the user who created the campaign. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + type: string + configuration: + description: The campaign's configuration, if set. + allOf: + - $ref: "#/components/schemas/CampaignConfiguration" + nullable: true + started_at: + description: The time the campaign was started, if started. + example: 2026-07-02T00:00:00Z + format: date-time + nullable: true + type: string + started_by_user_id: + description: The ID of the user who started the campaign, if started. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + nullable: true + type: string + stopped_at: + description: The time the campaign was manually stopped, if stopped. + example: 2026-07-10T00:00:00Z + format: date-time + nullable: true + type: string + stopped_by_user_id: + description: The ID of the user who stopped the campaign, if stopped. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + nullable: true + type: string + ended_at: + description: The time the campaign reached its scheduled end, if ended. + example: 2026-07-14T00:00:00Z + format: date-time + nullable: true + type: string + ended_by_user_id: + description: The ID of the user who ended the campaign, if ended. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + nullable: true + type: string + required: + - campaign_id + - name + - status + - is_template + - created_at + - updated_at + - created_by_user_id + type: object + PaginatedCampaignsList: + description: A list of campaigns. example: - filter_operator: ANY - users: - - userd283-ca87-4a8a-bdbb-df212eca5353 - include_group_bindings: True - tags: - - key: uar_scope - value: high_priority - names: - - demo - - api - admins: - - f454d283-ca87-4a8a-bdbb-df212eca5353 - - 8763d283-ca87-4a8a-bdbb-df212ecab139 - resource_types: - - GCP_CLOUD_SQL_POSTGRES_INSTANCE - group_types: - - AWS_SSO_GROUP - apps: - - pas2d283-ca87-4a8a-bdbb-df212eca5353 - - apss2d283-ca87-4a8a-bdbb-df212eca5353 - entities: - - f454d283-as87-4a8a-bdbb-df212eca5353 - - f454d283-as87-4a8a-bdbb-df212eca5329 + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - campaign_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + name: Q3 Access Review + status: DRAFT + is_template: false + created_at: 2026-07-01T00:00:00Z + updated_at: 2026-07-01T00:00:00Z + created_by_user_id: 32acc112-21ff-4669-91c2-21e27683eaa1 properties: - group_visibility: - description: Specifies what users can see during an Access Review + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true type: string - enum: [STRICT, VIEW_VISIBLE_AND_ASSIGNED, VIEW_ALL] - users: - description: The access review will only include the following users. If any users are selected, any entity filters will be applied to only the entities that the selected users have access to. - items: - example: userd283-ca87-4a8a-bdbb-df212eca5353 - type: string - format: uuid - type: array - filter_operator: - description: Specifies whether entities must match all (AND) or any (OR) of the filters. + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true type: string - enum: [ANY, ALL] - entities: - description: This access review will include resources and groups with ids in the given strings. - items: - example: f454d283-as87-4a8a-bdbb-df212eca5353 - type: string - format: uuid - type: array - apps: - description: This access review will include items in the specified applications - items: - example: pas2d283-ca87-4a8a-bdbb-df212eca5353 - type: string - format: uuid - type: array - admins: - description: This access review will include resources and groups who are owned by one of the owners corresponding to the given IDs. - items: - example: f454d283-ca87-4a8a-bdbb-df212eca5353 - type: string - format: uuid - type: array - group_types: - description: This access review will include items of the specified group types - type: array - items: - $ref: "#/components/schemas/GroupTypeEnum" - resource_types: - description: This access review will include items of the specified resource types - type: array - items: - $ref: "#/components/schemas/ResourceTypeEnum" - include_group_bindings: - type: boolean - example: False - tags: - description: This access review will include resources and groups who are tagged with one of the given tags. - items: - $ref: "#/components/schemas/TagFilter" - type: array - names: - description: This access review will include resources and groups whose name contains one of the given strings. + results: items: - example: demo - type: string + $ref: "#/components/schemas/Campaign" type: array + required: + - results type: object PaginatedUARsList: description: A list of UARs. @@ -4971,6 +7540,10 @@ components: description: A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. example: False type: boolean + instantly_action_reviews: + description: A bool representing whether to instantly action changes when reviewers submit their decision. Default is False. + type: boolean + example: False uar_scope: $ref: "#/components/schemas/UARScope" required: @@ -4981,6 +7554,7 @@ components: - send_reviewer_assignment_notification - time_zone - self_review_allowed + - instantly_action_reviews type: object CreateUARInfo: description: Information needed to start a user access review. @@ -5027,6 +7601,10 @@ components: description: A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. example: False type: boolean + instantly_action_reviews: + description: A bool representing whether to instantly action changes when reviewers submit their decision. Default is False. + type: boolean + example: False reminder_schedule: items: type: integer @@ -5045,11 +7623,14 @@ components: - self_review_allowed type: object UARReviewerAssignmentPolicyEnum: - description: A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. + description: A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. enum: - MANUALLY - BY_OWNING_TEAM_ADMIN + - BY_OWNING_TEAM_ADMIN_ALL - BY_MANAGER + - BY_APPROVERS + - BY_APPROVERS_ALL example: MANUALLY type: string TagFilter: @@ -5141,28 +7722,58 @@ components: description: The type of an app. enum: - ACTIVE_DIRECTORY + - ANTHROPIC - AZURE_AD - AWS - AWS_SSO + - CLICKHOUSE + - COUPA + - CURSOR - CUSTOM + - CONFLUENCE + - CUSTOM_CONNECTOR + - DATABRICKS + - DATASTAX_ASTRA + - ALICLOUD + - DEVIN + - DOCUSIGN - DUO - GCP - GIT_HUB - GIT_LAB - GOOGLE_GROUPS - GOOGLE_WORKSPACE + - GRAFANA + - HUBSPOT + - ILEVEL + - INCIDENTIO + - JIRA - LDAP - MARIADB - MONGO - MONGO_ATLAS - MYSQL + - NETSUITE + - DATADOG + - OKTA_CIAM - OKTA_DIRECTORY + - OPENAI_PLATFORM - OPAL + - ORACLE_FUSION - PAGERDUTY + - POSTGRES + - ROOTLY - SALESFORCE + - SNOWFLAKE + - SLACK + - TABLEAU - TAILSCALE - TELEPORT + - TWINGATE + - VAULT - WORKDAY + - ZENDESK + - ZOOM example: OKTA_DIRECTORY type: string EntityTypeEnum: @@ -5370,6 +7981,16 @@ components: has_direct_access: true num_access_paths: 3 properties: + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string results: items: $ref: "#/components/schemas/ResourceAccessUser" @@ -5512,6 +8133,14 @@ components: example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 format: uuid type: string + resource_name: + description: The name of the resource. + example: AdministratorAccess + type: string + description: + description: The description of the resource. + example: Full access to all resources and settings. + type: string user_id: description: The ID of the user. example: 29827fb8-f2dd-4e80-9576-28e31e9934ac @@ -5638,60 +8267,299 @@ components: ### Description This object is used to represent a non-human identity with direct access to a resource. example: - non_human_identity_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac - resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - expiration_date: 2022-01-23T04:56:07Z + non_human_identity_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + expiration_date: 2022-01-23T04:56:07Z + properties: + resource_id: + description: The ID of the resource. + example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + format: uuid + type: string + non_human_identity_id: + description: The resource ID of the non-human identity. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + format: uuid + type: string + access_level: + $ref: "#/components/schemas/ResourceAccessLevel" + expiration_date: + description: The day and time the non-human identity's access will expire. + example: 2022-01-23T04:56:07Z + format: date-time + nullable: true + type: string + required: + - resource_id + - non_human_identity_id + type: object + SessionsList: + example: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - connection_id: h0z968412-2451-4bbd-42h4-057l715d917m + user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 + expiration_date: 2022-01-23T04:56:07Z + - connection_id: 6e6b5597-bd36-4f4c-a629-01e3fa791932 + user_id: b031c922-b84f-4424-9f4f-c49c05871bfe + resource_id: 77eb1ab7-2c27-4fc4-afdb-137e1265cddd + expiration_date: 2022-03-12T07:22:18Z + properties: + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Session" + type: array + type: object + Paladin: + description: |- + # Paladin Object + ### Description + The `Paladin` object represents a Paladin, Opal's AI access-request + reviewer. + example: + paladin_id: 32acc112-21ff-4669-91c2-21e27683eaa1 + name: paladin-agent-1 + owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + monitor_mode: true + admin_view_only: false + enabled_connectors: + - SLACK + properties: + paladin_id: + description: The ID of the Paladin. Use this value as a reviewer in a request configuration's service_user_ids. + example: 32acc112-21ff-4669-91c2-21e27683eaa1 + format: uuid + type: string + name: + description: The name of the Paladin. + example: paladin-agent-1 + type: string + owner_id: + description: The ID of the owner of the Paladin. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + monitor_mode: + description: When true, the Paladin reasons about requests but takes no action. Shown as "Monitor mode" in the UI. + type: boolean + admin_view_only: + description: When true, the Paladin's recommendations are visible only to admins. Only meaningful when monitor_mode is true. + type: boolean + enabled_connectors: + description: The connectors the Paladin is allowed to use. + type: array + items: + $ref: "#/components/schemas/PaladinConnector" + instructions: + description: The free-form instructions that guide the Paladin's decisions. + example: Approve read-only access; escalate anything that grants write access. + type: string + required: + - paladin_id + - name + - owner_id + - monitor_mode + - admin_view_only + - enabled_connectors + - instructions + type: object + PaladinList: + description: |- + # PaladinList Object + ### Description + A list of `Paladin` objects. + properties: + results: + items: + $ref: "#/components/schemas/Paladin" + type: array + required: + - results + type: object + PaladinConnector: + description: A connector a Paladin is allowed to use. + enum: + - NOTION + - JIRA + - LINEAR + - SERVICE_NOW + - NOTION_TICKETS + - FRESH_SERVICE + - SHORTCUT + - SLACK + - PAGER_DUTY + - CONFLUENCE + - FLEET_DM + type: string + PaladinContextSourceKind: + description: The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page. + enum: + - SLACK_CHANNEL + - DOCUMENT + type: string + PaladinContextSourceProvider: + description: The integration a Paladin context source comes from. + enum: + - SLACK + - NOTION + - CONFLUENCE + type: string + PaladinContextSource: + description: |- + # PaladinContextSource Object + ### Description + A context source (a Slack channel or a document) that a Paladin is + configured to read during access-request review. + example: + id: 8a1f2c3d-4b5e-6f70-8192-a3b4c5d6e7f8 + paladin_id: 32acc112-21ff-4669-91c2-21e27683eaa1 + source_kind: SLACK_CHANNEL + third_party_provider: SLACK + remote_id: C0123456789 + name: "#access-requests" + url: https://example.slack.com/archives/C0123456789 + properties: + id: + description: The ID of the context source. + format: uuid + type: string + paladin_id: + description: The ID of the Paladin this source belongs to. + format: uuid + type: string + source_kind: + $ref: "#/components/schemas/PaladinContextSourceKind" + third_party_provider: + $ref: "#/components/schemas/PaladinContextSourceProvider" + remote_id: + description: The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID for a document. + type: string + name: + description: A human-readable name for the source. + type: string + url: + description: A link to the source. + type: string + required: + - id + - paladin_id + - source_kind + - third_party_provider + - remote_id + - name + - url + type: object + PaladinContextSourceList: + description: |- + # PaladinContextSourceList Object + ### Description + A list of `PaladinContextSource` objects. + properties: + results: + items: + $ref: "#/components/schemas/PaladinContextSource" + type: array + required: + - results + type: object + CreatePaladinContextSourceInfo: + description: Information for adding a context source to a Paladin. + example: + source_kind: SLACK_CHANNEL + third_party_provider: SLACK + remote_id: C0123456789 + name: "#access-requests" + properties: + source_kind: + $ref: "#/components/schemas/PaladinContextSourceKind" + third_party_provider: + $ref: "#/components/schemas/PaladinContextSourceProvider" + remote_id: + description: The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID for a document. + type: string + name: + description: An optional human-readable name for the source. + type: string + url: + description: An optional link to the source. + type: string + required: + - source_kind + - third_party_provider + - remote_id + type: object + CreatePaladinInfo: + description: Information for creating a Paladin. + example: + name: paladin-agent-1 + owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 properties: - resource_id: - description: The ID of the resource. - example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - format: uuid + name: + description: The name of the Paladin. + example: paladin-agent-1 type: string - non_human_identity_id: - description: The resource ID of the non-human identity. - example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + owner_id: + description: The ID of the owner of the Paladin. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 format: uuid type: string - access_level: - $ref: "#/components/schemas/ResourceAccessLevel" - expiration_date: - description: The day and time the non-human identity's access will expire. - example: 2022-01-23T04:56:07Z - format: date-time - nullable: true + monitor_mode: + description: When true, the Paladin reasons about requests but takes no action. Defaults to true. + type: boolean + default: true + admin_view_only: + description: When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. Defaults to false. + type: boolean + default: false + enabled_connectors: + description: The connectors the Paladin is allowed to use. + type: array + items: + $ref: "#/components/schemas/PaladinConnector" + instructions: + description: The free-form instructions that guide the Paladin's decisions. Optional; if omitted the Paladin is created without instructions. type: string required: - - resource_id - - non_human_identity_id + - name + - owner_id type: object - SessionsList: + UpdatePaladinInfo: + description: Information for updating a Paladin. example: - next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - results: - - connection_id: h0z968412-2451-4bbd-42h4-057l715d917m - user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac - resource_id: 1b978423-db0a-4037-a4cf-f79c60cb67b3 - expiration_date: 2022-01-23T04:56:07Z - - connection_id: 6e6b5597-bd36-4f4c-a629-01e3fa791932 - user_id: b031c922-b84f-4424-9f4f-c49c05871bfe - resource_id: 77eb1ab7-2c27-4fc4-afdb-137e1265cddd - expiration_date: 2022-03-12T07:22:18Z + name: paladin-agent-1 properties: - next: - description: The cursor with which to continue pagination if additional result pages exist. - example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw - nullable: true - type: string - previous: - description: The cursor used to obtain the current result page. - example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ - nullable: true + name: + description: The name of the Paladin. + example: paladin-agent-1 type: string - results: - items: - $ref: "#/components/schemas/Session" + monitor_mode: + description: When true, the Paladin reasons about requests but takes no action. If omitted, the existing value is preserved. + type: boolean + admin_view_only: + description: When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. If omitted, the existing value is preserved. + type: boolean + enabled_connectors: + description: The connectors the Paladin is allowed to use. If omitted, the existing connectors are preserved. type: array + items: + $ref: "#/components/schemas/PaladinConnector" + instructions: + description: The free-form instructions that guide the Paladin's decisions. If omitted, the existing instructions are preserved. + type: string + required: + - name type: object Session: description: |- @@ -5768,6 +8636,63 @@ components: type: object required: - results + PaginatedRemoteUsersList: + example: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + remote_id: 1234567890 + third_party_provider: GIT_LAB + - user_id: 29827fb8-f2dd-4e80-9576-238979927392 + remote_id: remoteid123 + third_party_provider: GIT_HUB + properties: + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/RemoteUser" + type: array + type: object + required: + - results + RemoteUser: + description: |- + # RemoteUser Object + ### Description + The `RemoteUser` object is used to represent a remote user. + example: + user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac + remote_id: 1234567890 + third_party_provider: GIT_HUB + properties: + user_id: + description: The ID of the user. + example: 29827fb8-f2dd-4e80-9576-28e31e9934ac + format: uuid + type: string + remote_id: + description: The ID of the remote user. + example: 1234567890 + type: string + third_party_provider: + description: The third party provider of the remote user. + example: GIT_HUB + $ref: "#/components/schemas/ThirdPartyProviderEnum" + required: + - user_id + - remote_id + - third_party_provider + type: object User: description: | # User Object @@ -5893,6 +8818,25 @@ components: - NOT_FOUND example: ACTIVE type: string + ThirdPartyProviderEnum: + description: The third party provider of the remote user. + enum: + - AUTH0 + - SLACK + - GOOGLE_CHAT + - JIRA + - LINEAR + - SERVICE_NOW + - FRESH_SERVICE + - SHORTCUT + - PAGER_DUTY + - OPSGENIE + - GIT_HUB + - GIT_LAB + - GIT_LAB_CONNECTION + - TELEPORT + example: GIT_HUB + type: string PaginatedGroupsList: example: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -5900,17 +8844,41 @@ components: results: - group_id: f454d283-ca87-4a8a-bdbb-df212eca5353 app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd + name: Payments Production Admin description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases. admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + group_leader_user_ids: + - 7c86c85d-0651-43e2-a748-d69d658418e8 + remote_id: 037m2jsg218b2wb + remote_name: Finance Team + group_type: ACTIVE_DIRECTORY_GROUP max_duration: 120 + recommended_duration: 60 + extensions_duration_in_minutes: 60 require_manager_approval: False require_support_ticket: False + require_mfa_to_approve: False + require_mfa_to_request: False + auto_approval: False + is_requestable: True - group_id: 99d0b81d-14be-4cf6-bd27-348b4af1d11b + app_id: a7c3e291-1234-4abc-9def-1234567890ab + name: Integrations On-Call description: Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty. admin_owner_id: 4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3 + group_leader_user_ids: [] + remote_id: pagerduty-schedule:P123XYZ + remote_name: Integrations On-Call + group_type: PAGERDUTY_ON_CALL_SCHEDULE max_duration: 360 + recommended_duration: 120 + extensions_duration_in_minutes: 0 require_manager_approval: False require_support_ticket: True + require_mfa_to_approve: False + require_mfa_to_request: False + auto_approval: False + is_requestable: True properties: next: description: The cursor with which to continue pagination if additional result pages exist. @@ -5949,6 +8917,20 @@ components: example: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd format: uuid type: string + group_name: + description: The name of the group + example: API Group + type: string + resource_name: + description: The name of the resource + example: API Group + type: string + expiration_date: + description: The day and time the group's access will expire. + example: 2022-01-23T04:56:07Z + format: date-time + nullable: true + type: string access_level: $ref: "#/components/schemas/ResourceAccessLevel" required: @@ -5969,6 +8951,15 @@ components: example: f454d283-ca87-4a8a-bdbb-df212eca5353 format: uuid type: string + duration_minutes: + description: The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. + type: integer + maximum: 525960 # One year + example: 120 + access_level_remote_id: + description: The updated remote ID of the access level granted to this group. + type: string + example: arn:aws:iam::590304332660:role/ReadOnlyAccess required: - containing_group_id type: object @@ -5983,13 +8974,23 @@ components: example: group_id: f454d283-ca87-4a8a-bdbb-df212eca5353 app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd - remote_id: 037m2jsg218b2wb - remote_name: Finance Team + name: Payments Production Admin description: This group represents Active Directory group "Payments Production Admin". We use this AD group to facilitate staging deployments and qualifying new releases. admin_owner_id: 7c86c85d-0651-43e2-a748-d69d658418e8 + group_leader_user_ids: + - 7c86c85d-0651-43e2-a748-d69d658418e8 + remote_id: 037m2jsg218b2wb + remote_name: Finance Team + group_type: ACTIVE_DIRECTORY_GROUP max_duration: 120 + recommended_duration: 60 + extensions_duration_in_minutes: 60 require_manager_approval: False require_support_ticket: False + require_mfa_to_approve: False + require_mfa_to_request: False + auto_approval: False + is_requestable: True properties: group_id: description: The ID of the group. @@ -6038,6 +9039,10 @@ components: description: The recommended duration for which the group should be requested (in minutes). -1 represents an indefinite duration. type: integer example: 120 + extensions_duration_in_minutes: + description: The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. + type: integer + example: 120 require_manager_approval: description: A bool representing whether or not access requests to the group require manager approval. example: False @@ -6113,11 +9118,25 @@ components: risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: A bool representing whether or not the group's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false. + example: False + type: boolean + match_remote_description: + description: A bool representing whether or not the group's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false. + example: False + type: boolean + last_successful_sync: + readOnly: true + description: Information about the last successful sync of this group. + $ref: "#/components/schemas/SyncTask" required: - group_id type: object GroupUserList: example: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ results: - full_name: Jake Barnes user_id: 29827fb8-f2dd-4e80-9576-28e31e9934ac @@ -6134,6 +9153,16 @@ components: items: $ref: "#/components/schemas/GroupUser" type: array + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string type: object GroupAccessLevel: description: |- @@ -6180,6 +9209,14 @@ components: example: 1b978423-db0a-4037-a4cf-f79c60cb67b3 format: uuid type: string + group_name: + description: The name of the group. + example: API Group + type: string + description: + description: The description of the group. + example: Group required to request API's + type: string user_id: description: The ID of the user. example: 29827fb8-f2dd-4e80-9576-28e31e9934ac @@ -6209,6 +9246,8 @@ components: - full_name - group_id - user_id + - group_name + - description type: object PropagationStatus: description: The state of whether the push action was propagated to the remote system. If this is null, the access was synced from the remote system. @@ -6241,6 +9280,7 @@ components: - ERR_DRY_RUN_MODE_ENABLED - ERR_HR_IDP_PROVIDER_NOT_LINKED - ERR_REMOTE_UNRECOVERABLE_ERROR + - ERR_REMOTE_TICKET_NOT_FOUND example: - SUCCESS type: string @@ -6364,6 +9404,11 @@ components: type: string format: uuid type: array + extensions_duration_in_minutes: + description: The duration for which access can be extended (in minutes). Deprecated, set the extension duration in the request_configuration you want it to apply to. + type: integer + example: 120 + deprecated: true request_configurations: type: array items: @@ -6417,6 +9462,14 @@ components: risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. + example: False + type: boolean + match_remote_description: + description: A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. + example: False + type: boolean required: - group_id type: object @@ -6442,6 +9495,24 @@ components: - CONNECTOR_GROUP - SNOWFLAKE_ROLE - WORKDAY_USER_SECURITY_GROUP + - PAGERDUTY_ON_CALL_SCHEDULE + - INCIDENTIO_ON_CALL_SCHEDULE + - ROOTLY_ON_CALL_SCHEDULE + - DEVIN_GROUP + - GIT_HUB_ENTERPRISE_TEAM + - GRAFANA_TEAM + - CLICKHOUSE_ROLE + - SLACK_USER_GROUP + - TWINGATE_GROUP + - TWINGATE_GROUP_SYNCED + - ZENDESK_GROUP + - ZENDESK_ORGANIZATION + - HUBSPOT_TEAM + - TABLEAU_GROUP + - CONFLUENCE_GROUP + - JIRA_GROUP + - DOCUSIGN_GROUP + - ZOOM_GROUP example: OPAL_GROUP type: string ResourceTypeEnum: @@ -6481,8 +9552,125 @@ components: - GCP_PROJECT - GCP_CLOUD_SQL_POSTGRES_INSTANCE - GCP_CLOUD_SQL_MYSQL_INSTANCE - - GCP_BIG_QUERY_DATASET - - GCP_BIG_QUERY_TABLE + - GCP_BIG_QUERY_DATASET + - GCP_BIG_QUERY_TABLE + - GCP_SERVICE_ACCOUNT + - GIT_HUB_REPO + - GIT_HUB_ORG_ROLE + - GIT_LAB_PROJECT + - GOOGLE_WORKSPACE_ROLE + - MONGO_INSTANCE + - MONGO_ATLAS_INSTANCE + - NETSUITE_ROLE + - DATADOG_ROLE + - OKTA_APP + - OKTA_ROLE + - OPAL_ROLE + - OPAL_SCOPED_ROLE + - PAGERDUTY_ROLE + - TAILSCALE_SSH + - SALESFORCE_PERMISSION_SET + - SALESFORCE_PROFILE + - SALESFORCE_ROLE + - SNOWFLAKE_DATABASE + - SNOWFLAKE_SCHEMA + - SNOWFLAKE_TABLE + - WORKDAY_ROLE + - MYSQL_INSTANCE + - MARIADB_INSTANCE + - POSTGRES_INSTANCE + - TELEPORT_ROLE + - ILEVEL_ADVANCED_ROLE + - DATASTAX_ASTRA_ROLE + - COUPA_ROLE + - CURSOR_ORGANIZATION + - OPENAI_PLATFORM_PROJECT + - OPENAI_PLATFORM_SERVICE_ACCOUNT + - ANTHROPIC_WORKSPACE + - GIT_HUB_ORG + - ORACLE_FUSION_ROLE + - DEVIN_ORGANIZATION + - DEVIN_ROLE + - VAULT_SECRET + - VAULT_POLICY + - VAULT_OIDC_ROLE + - GIT_HUB_ENTERPRISE_ROLE + - GRAFANA_FOLDER + - GRAFANA_DASHBOARD + - GRAFANA_BASIC_ROLE + - GRAFANA_ROLE + - CLICKHOUSE_DATABASE + - CLICKHOUSE_TABLE + - TWINGATE_RESOURCE + - ZENDESK_ROLE + - HUBSPOT_ROLE + - ALICLOUD_RAM_ROLE + - ALICLOUD_ECS_INSTANCE + - DOCUSIGN_PERMISSION_PROFILE + - ZOOM_ROLE + - ZOOM_LICENSE + example: AWS_IAM_ROLE + type: string + EntityItemTypeEnum: + description: Granular subtype of an entity. + enum: + - USER + - SERVICE_USER + - ACTIVE_DIRECTORY_GROUP + - AWS_SSO_GROUP + - DUO_GROUP + - GIT_HUB_TEAM + - GIT_LAB_GROUP + - GOOGLE_GROUPS_GROUP + - GOOGLE_GROUPS_GKE_GROUP + - LDAP_GROUP + - OKTA_GROUP + - OKTA_GROUP_RULE + - TAILSCALE_GROUP + - TWINGATE_GROUP + - TWINGATE_GROUP_SYNCED + - OPAL_GROUP + - OPAL_ACCESS_RULE + - AZURE_AD_SECURITY_GROUP + - AZURE_AD_MICROSOFT_365_GROUP + - CONNECTOR_GROUP + - SNOWFLAKE_ROLE + - WORKDAY_USER_SECURITY_GROUP + - DATABRICKS_ACCOUNT_GROUP + - AWS_IAM_ROLE + - AWS_EC2_INSTANCE + - AWS_EKS_CLUSTER + - AWS_RDS_POSTGRES_INSTANCE + - AWS_RDS_POSTGRES_CLUSTER + - AWS_RDS_MYSQL_INSTANCE + - AWS_RDS_MYSQL_CLUSTER + - AWS_ACCOUNT + - AWS_SSO_PERMISSION_SET + - AZURE_MANAGEMENT_GROUP + - AZURE_RESOURCE_GROUP + - AZURE_SUBSCRIPTION + - AZURE_VIRTUAL_MACHINE + - AZURE_STORAGE_ACCOUNT + - AZURE_STORAGE_CONTAINER + - AZURE_SQL_SERVER + - AZURE_SQL_MANAGED_INSTANCE + - AZURE_SQL_DATABASE + - AZURE_SQL_MANAGED_DATABASE + - AZURE_USER_ASSIGNED_MANAGED_Identity + - AZURE_ENTRA_ID_ROLE + - AZURE_ENTERPRISE_APP + - CUSTOM + - CUSTOM_CONNECTOR + - GCP_ORGANIZATION + - GCP_BUCKET + - GCP_COMPUTE_INSTANCE + - GCP_BIG_QUERY_DATASET + - GCP_BIG_QUERY_TABLE + - GCP_FOLDER + - GCP_GKE_CLUSTER + - GCP_PROJECT + - GCP_CLOUD_SQL_POSTGRES_INSTANCE + - GCP_CLOUD_SQL_MYSQL_INSTANCE - GCP_SERVICE_ACCOUNT - GIT_HUB_REPO - GIT_HUB_ORG_ROLE @@ -6496,6 +9684,7 @@ components: - OPAL_SCOPED_ROLE - PAGERDUTY_ROLE - TAILSCALE_SSH + - TWINGATE_RESOURCE - SALESFORCE_PERMISSION_SET - SALESFORCE_PROFILE - SALESFORCE_ROLE @@ -6507,7 +9696,9 @@ components: - MARIADB_INSTANCE - POSTGRES_INSTANCE - TELEPORT_ROLE - example: AWS_IAM_ROLE + - DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL + - ILEVEL_ADVANCED_ROLE + example: OPAL_ROLE type: string VisibilityTypeEnum: description: The visibility level of the entity. @@ -6549,6 +9740,7 @@ components: - BUNDLE - USER - ACCESS_REVIEW + - OWNER example: RESOURCE type: string UpdateGroupResourcesInfo: @@ -6569,10 +9761,16 @@ components: IdpGroupMapping: description: Information about a group mapping. example: + app_resource_id: 1520617d-e72a-47f5-a84c-693817ab48ad2 group_id: 6f99639b-7928-4043-8184-47cbc6766145 alias: "finance-team" hidden_from_end_user: False properties: + app_resource_id: + description: The ID of the app resource. + example: 1520617d-e72a-47f5-a84c-693817ab48ad2 + format: uuid + type: string group_id: description: The ID of the group. example: 6f99639b-7928-4043-8184-47cbc6766145 @@ -6792,6 +9990,8 @@ components: owner_ids: - 7870617d-e72a-47f5-a84c-693817ab4567 - 1520617d-e72a-47f5-a84c-693817ab48ad2 + service_user_ids: + - 7870617d-e72a-47f5-a84c-693817ab4568 properties: require_manager_approval: description: Whether this reviewer stage should require manager approval. @@ -6809,6 +10009,13 @@ components: example: AND type: string owner_ids: + description: The IDs of owners assigned as reviewers for this stage. + items: + type: string + format: uuid + type: array + service_user_ids: + description: The IDs of service users assigned as reviewers for this stage. items: type: string format: uuid @@ -6947,8 +10154,12 @@ components: - SERVICE_NOW example: LINEAR type: string + RDSEngineEnum: + type: string + description: "The database engine for the RDS instance." + enum: [MYSQL, POSTGRESQL] GroupRemoteInfo: - description: Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. + description: Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. If remote_info is provided, a group will be imported into Opal. For group types that support group creation through Opal, a new group will be created if remote_info is not provided. properties: active_directory_group: description: Remote info for Active Directory group. @@ -6960,6 +10171,66 @@ components: type: object required: - group_id + tailscale_group: + description: Remote info for Tailscale group. + properties: + group_id: + description: The id of the Tailscale group. + example: 898931321 + type: string + type: object + required: + - group_id + twingate_group: + description: Remote info for Twingate group. + properties: + group_id: + description: The id of the Twingate group. + example: R3JvdXA6MTIzNA== + type: string + type: object + required: + - group_id + twingate_group_synced: + description: Remote info for Twingate synced group. + properties: + group_id: + description: The id of the Twingate synced group. + example: R3JvdXA6MTIzNA== + type: string + type: object + required: + - group_id + aws_sso_group: + description: Remote info for AWS SSO group. + properties: + group_id: + description: The id of the AWS SSO group. + example: 898931321 + type: string + type: object + required: + - group_id + databricks_account_group: + description: Remote info for Databricks account group. + properties: + group_id: + description: The id of the Databricks account group. + example: 898931321 + type: string + type: object + required: + - group_id + connector_group: + description: Remote info for Connector group. + properties: + group_id: + description: The id of the Connector group. + example: 898931321 + type: string + type: object + required: + - group_id github_team: description: Remote info for GitHub team. properties: @@ -6972,6 +10243,19 @@ components: description: The slug of the GitHub team. example: opal-security type: string + org_name: + description: GitHub team's org name, required only for Enterprise + type: string + type: object + required: + - team_slug + github_enterprise_team: + description: Remote info for GitHub Enterprise team. + properties: + team_slug: + description: The slug of the GitHub Enterprise team. + example: opal-security + type: string type: object required: - team_slug @@ -7075,10 +10359,315 @@ components: type: object required: - group_id + pagerduty_on_call_schedule: + description: Remote info for PagerDuty on-call schedule group. + properties: + schedule_id: + description: The id of the PagerDuty on-call schedule. + example: PNZNINN + type: string + type: object + required: + - schedule_id + incidentio_on_call_schedule: + description: Remote info for Incident.io on-call schedule group. + properties: + schedule_id: + description: The id of the Incident.io on-call schedule. + example: 01HZ8XQM9ZQX8RKMZQ8ZQX8RK + type: string + type: object + required: + - schedule_id + rootly_on_call_schedule: + description: Remote info for Rootly on-call schedule group. + properties: + schedule_id: + description: The id of the Rootly on-call schedule. + example: 01HZ8XQM9ZQX8RKMZQ8ZQX8RK + type: string + type: object + required: + - schedule_id + devin_group: + description: Remote info for Devin group. + properties: + group_name: + description: The name of the Devin group. + example: devin-group-01 + type: string + type: object + required: + - group_name + clickhouse_role: + description: Remote info for ClickHouse role. + properties: + role_id: + description: The name of the ClickHouse role. + example: my_clickhouse_role + type: string + type: object + required: + - role_id + grafana_team: + description: Remote info for Grafana team. + properties: + team_id: + description: The ID of the team. + example: 2323 + type: string + type: object + required: + - team_id + zendesk_group: + description: Remote info for Zendesk group. + properties: + group_id: + description: The ID of the Zendesk group. + example: "12345" + type: string + type: object + required: + - group_id + slack_user_group: + description: Remote info for Slack user group. + properties: + group_id: + description: The id of the Slack user group. + example: S0614TZR7 + type: string + type: object + required: + - group_id + zendesk_organization: + description: Remote info for Zendesk organization. + properties: + organization_id: + description: The ID of the Zendesk organization. + example: "67890" + type: string + type: object + required: + - organization_id + hubspot_team: + description: Remote info for HubSpot team. + properties: + team_id: + description: The ID of the HubSpot team. + example: "12345" + type: string + type: object + required: + - team_id + tableau_group: + description: Remote info for Tableau group. + properties: + group_id: + description: The ID of the Tableau group. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + type: object + required: + - group_id + confluence_group: + description: Remote info for Confluence group. + properties: + group_id: + description: The ID of the Confluence group. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + type: object + required: + - group_id + jira_group: + description: Remote info for Jira group. + properties: + group_id: + description: The ID of the Jira group. + example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" + type: string + type: object + required: + - group_id + docusign_group: + description: Remote info for Docusign group. + properties: + group_id: + description: The ID of the Docusign group. + example: "12345" + type: string + type: object + required: + - group_id + zoom_group: + description: Remote info for Zoom group. + properties: + group_id: + description: The ID of the Zoom group. + example: "SoBVexyrQjqCkcxjpBWi6w" + type: string + type: object + required: + - group_id + docusign_signing_group: + description: Remote info for Docusign signing group. + properties: + signing_group_id: + description: The ID of the Docusign signing group. + example: "12345" + type: string + type: object + required: + - signing_group_id type: object ResourceRemoteInfo: description: Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields. properties: + databricks_account_service_principal: + description: Remote info for Databricks account service principal. + properties: + application_id: + description: The application ID of the service principal. + example: 00000000-0000-0000-0000-000000000000 + type: string + resource_id: + description: The resource ID of the service principal. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: object + required: + - application_id + - resource_id + azure_subscription: + description: Remote info for Azure subscription. + properties: + resource_id: + description: The ARM resource ID of the subscription. + example: /subscriptions/00000000-0000-0000-0000-000000000000 + type: string + type: object + required: + - resource_id + azure_resource_group: + description: Remote info for Azure resource group. + properties: + resource_id: + description: The ARM resource ID of the resource group. + example: /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg + type: string + type: object + required: + - resource_id + azure_management_group: + description: Remote info for Azure management group. + properties: + resource_id: + description: The ARM resource ID of the management group. + example: /providers/Microsoft.Management/managementGroups/my-mg + type: string + type: object + required: + - resource_id + azure_virtual_machine: + description: Remote info for Azure virtual machine. + properties: + resource_id: + description: The ARM resource ID of the virtual machine. + example: /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/vm01 + type: string + type: object + required: + - resource_id + azure_storage_account: + description: Remote info for Azure storage account. + properties: + resource_id: + description: The ARM resource ID of the storage account. + example: /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/sa01 + type: string + type: object + required: + - resource_id + azure_storage_container: + description: Remote info for Azure storage container. + properties: + resource_id: + description: The ARM resource ID of the storage container. + example: /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/sa01/blobServices/default/containers/c01 + type: string + type: object + required: + - resource_id + azure_sql_server: + description: Remote info for Azure SQL server. + properties: + resource_id: + description: The ARM resource ID of the SQL server. + example: /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/servers/sqldev01 + type: string + type: object + required: + - resource_id + azure_sql_database: + description: Remote info for Azure SQL database. + properties: + resource_id: + description: The ARM resource ID of the SQL database. + example: /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/servers/sqldev01/databases/db01 + type: string + type: object + required: + - resource_id + azure_sql_managed_instance: + description: Remote info for Azure SQL managed instance. + properties: + resource_id: + description: The ARM resource ID of the SQL managed instance. + example: /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/managedInstances/mi01 + type: string + type: object + required: + - resource_id + azure_sql_managed_database: + description: Remote info for Azure SQL managed database. + properties: + resource_id: + description: The ARM resource ID of the SQL managed database. + example: /subscriptions/0000/resourceGroups/rg/providers/Microsoft.Sql/managedInstances/mi01/databases/midb01 + type: string + type: object + required: + - resource_id + azure_user_assigned_managed_identity: + description: Remote info for Azure user assigned managed identity. + properties: + resource_id: + description: The ARM resource ID of the user assigned managed identity. + example: /subscriptions/0000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id01 + type: string + type: object + required: + - resource_id + azure_enterprise_app: + description: Remote info for Azure Enterprise App. + properties: + resource_id: + description: The remote application identifier (service principal or application object ID). + example: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee + type: string + type: object + required: + - resource_id + azure_entra_id_role: + description: Remote info for Azure Entra ID role. + properties: + resource_id: + description: The remote role identifier from Entra (object ID). + example: 11111111-2222-3333-4444-555555555555 + type: string + type: object + required: + - resource_id aws_organizational_unit: description: Remote info for AWS organizational unit. properties: @@ -7155,6 +10744,40 @@ components: required: - instance_id - region + aws_rds_cluster: + description: Remote info for AWS RDS cluster. + properties: + cluster_id: + description: The clusterId of the RDS cluster. + example: demo-mysql-cluster + type: string + region: + description: The region of the RDS cluster. + example: us-east-2 + type: string + resource_id: + description: The resourceId of the RDS cluster. + example: cluster-AOO8V0XUCNU13XLZXQDQRSN0NQ + type: string + account_id: + description: The id of the AWS account. Required for AWS Organizations. + example: 234234234234 + type: string + database_name: + description: The name of the database in the RDS cluster. This can be the value of the tag `opal:database-name` or the database name. + example: mydatabase + type: string + engine: + allOf: + - $ref: "#/components/schemas/RDSEngineEnum" + type: object + required: + - cluster_id + - region + - resource_id + - account_id + - database_name + - engine aws_rds_instance: description: Remote info for AWS RDS instance. properties: @@ -7337,7 +10960,7 @@ components: type: string service_account_id: description: The id of the service account. - example: 103561576023829463298 + example: 103561576023829460000 type: string project_id: description: The id of the project the service account is in. @@ -7370,9 +10993,45 @@ components: description: The name of the repository. example: Opal Security type: string + org_name: + description: GitHub repo's org name, required only for Enterprise. + type: string + type: object + required: + - repo_name + github_org_role: + description: Remote info for GitHub organization role. + properties: + role_id: + description: The id of the role. + example: 112233 + type: string + org_name: + description: GitHub org role's org name, required only for Enterprise. + type: string + type: object + required: + - role_id + github_org: + description: Remote info for GitHub organization. + properties: + org_name: + description: The name of the organization. + example: Opal Security + type: string type: object required: - - repo_name + - org_name + github_enterprise_role: + description: Remote info for GitHub Enterprise role. + properties: + role_id: + description: The id of the role. + example: 112233 + type: string + type: object + required: + - role_id gitlab_project: description: Remote info for Gitlab project. properties: @@ -7413,6 +11072,81 @@ components: type: object required: - role_id + snowflake_database: + description: Remote info for Snowflake database. + properties: + database_name: + description: The name of the database. + example: mydatabase + type: string + type: object + required: + - database_name + snowflake_schema: + description: Remote info for Snowflake schema. + properties: + database_name: + description: The name of the database the schema is in. + example: mydatabase + type: string + schema_name: + description: The name of the schema. + example: mycatalogschema + type: string + type: object + required: + - database_name + - schema_name + snowflake_table: + description: Remote info for Snowflake table. + properties: + database_name: + description: The name of the database the table is in. + example: mydatabase + type: string + schema_name: + description: The name of the schema the table is in. + example: mycatalogschema + type: string + table_name: + description: The name of the table. + example: myitemstable + type: string + type: object + required: + - database_name + - schema_name + - table_name + ilevel_advanced_role: + description: Remote info for iLevel Advanced role. + properties: + role_name: + description: The name of the role. + example: IT User + type: string + type: object + required: + - role_name + tailscale_ssh: + description: Remote info for Tailscale SSH tag. + properties: + tag_name: + description: The name of the tag. + example: admin + type: string + type: object + required: + - tag_name + twingate_resource: + description: Remote info for Twingate resource. + properties: + resource_id: + description: The id of the Twingate resource. + example: UmVzb3VyY2U6MTIzNA== + type: string + type: object + required: + - resource_id pagerduty_role: description: Remote info for Pagerduty role. properties: @@ -7423,6 +11157,16 @@ components: type: object required: - role_name + workday_role: + description: Remote info for Workday role. + properties: + role_id: + description: The id of the role. + example: 123abc456def + type: string + type: object + required: + - role_id salesforce_permission_set: description: Remote info for Salesforce permission set. properties: @@ -7448,6 +11192,16 @@ components: required: - profile_id - user_license_id + docusign_permission_profile: + description: Remote info for Docusign permission profile. + properties: + permission_profile_id: + description: The ID of the Docusign permission profile. + example: "12345" + type: string + type: object + required: + - permission_profile_id salesforce_role: description: Remote info for Salesforce role. properties: @@ -7468,6 +11222,236 @@ components: type: object required: - role_name + datastax_astra_role: + description: Remote info for an Astra role. + properties: + role_id: + description: The id of the role. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - role_id + coupa_role: + description: Remote info for Coupa role. + properties: + role_id: + description: The id of the role. + example: 999 + type: string + type: object + required: + - role_id + cursor_organization: + description: Remote info for a Cursor organization. + properties: + org_id: + description: The id of the organization. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - org_id + openai_platform_project: + description: Remote info for OpenAI Platform project. + properties: + project_id: + description: The id of the project. + example: proj_abc + type: string + type: object + required: + - project_id + openai_platform_service_account: + description: Remote info for OpenAI Platform service account. + properties: + project_id: + description: The id of the project for the service account. + example: proj_abc + type: string + service_account_id: + description: The id of the service account. + example: svc_acct_abc + type: string + type: object + required: + - project_id + - service_account_id + anthropic_workspace: + description: Remote info for Anthropic workspace. + properties: + workspace_id: + description: The id of the workspace. + example: ws-123456 + type: string + type: object + required: + - workspace_id + oracle_fusion_role: + description: Remote info for Oracle Fusion role. + properties: + role_id: + description: The id of the role. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - role_id + devin_organization: + description: Remote info for Devin organization. + properties: + org_id: + description: The id of the organization. + example: devin-org-01 + type: string + type: object + required: + - org_id + devin_role: + description: Remote info for Devin role. + properties: + role_id: + description: The id of the role. + example: devin-role-01 + type: string + type: object + required: + - role_id + netsuite_role: + description: Remote info for NetSuite role. + properties: + role_id: + description: The id of the role. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - role_id + datadog_role: + description: Remote info for Datadog role. + properties: + role_id: + description: The id of the role. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object + required: + - role_id + clickhouse_database: + description: Remote info for ClickHouse database. + properties: + database_name: + description: The name of the ClickHouse database. + example: my_database + type: string + type: object + required: + - database_name + clickhouse_table: + description: Remote info for ClickHouse table. + properties: + database_name: + description: The name of the ClickHouse database containing the table. + example: my_database + type: string + table_name: + description: The name of the ClickHouse table. + example: my_table + type: string + type: object + required: + - database_name + - table_name + grafana_folder: + description: Remote info for Grafana folder. + properties: + folder_uid: + description: The UID of the Grafana folder. + example: fffRTXX + type: string + type: object + required: + - folder_uid + grafana_dashboard: + description: Remote info for Grafana dashboard. + properties: + dashboard_uid: + description: The UID of the Grafana dashboard. + example: dddRTXX + type: string + type: object + required: + - dashboard_uid + grafana_role: + description: Remote info for Grafana role(fixed or custom). + properties: + role_uid: + description: The UID of the Grafana role. + example: rrfRTXX + type: string + type: object + required: + - role_uid + zendesk_role: + description: Remote info for Zendesk custom role. + properties: + role_id: + description: The ID of the Zendesk custom role. + example: "12345" + type: string + type: object + required: + - role_id + hubspot_role: + description: Remote info for HubSpot role. + properties: + role_id: + description: The ID of the HubSpot role. + example: "12345" + type: string + type: object + required: + - role_id + alicloud_ram_role: + description: Remote info for AliCloud RAM role. + properties: + role_arn: + description: The ARN of the AliCloud RAM role. + example: "acs:ram::1234567890:role/MyRole" + type: string + type: object + required: + - role_arn + alicloud_ecs_instance: + description: Remote info for AliCloud ECS instance. + properties: + instance_id: + description: The ID of the ECS instance. + example: "i-bp1a1234567890abcd" + type: string + type: object + required: + - instance_id + zoom_role: + description: Remote info for Zoom role. + properties: + role_id: + description: The ID of the Zoom role. + example: "0" + type: string + type: object + required: + - role_id + zoom_license: + description: Remote info for Zoom license (user type). + properties: + license_type: + description: The Zoom user type representing the license (e.g. "2" for Licensed). + example: "2" + type: string + type: object + required: + - license_type type: object RiskSensitivityEnum: type: string @@ -7760,6 +11744,14 @@ components: risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false. + example: False + type: boolean + match_remote_description: + description: A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false. + example: False + type: boolean required: - name - resource_type @@ -7935,6 +11927,14 @@ components: risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false. + example: False + type: boolean + match_remote_description: + description: A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false. + example: False + type: boolean required: - name - group_type @@ -8019,20 +12019,20 @@ components: request_id: 4c86c85d-0651-43e2-a748-d69d658418e8 user_id: c86c85d-0651-43e2-a748-d69d658418e8 comment: This is a comment. - stages: - requestedRoleName: "Admin" - requestedItemName: "AWS Production Account" - stages: - - stage: 1 - operator: AND - reviewers: - - id: 7c86c85d-0651-43e2-a748-d69d658418e8 - status: PENDING - - stage: 2 - operator: OR - reviewers: - - id: 8d86c85d-0651-43e2-a748-d69d658418e9 - status: APPROVED + reviewer_stages: + - requestedRoleName: "Admin" + requestedItemName: "AWS Production Account" + stages: + - stage: 1 + operator: AND + reviewers: + - id: 7c86c85d-0651-43e2-a748-d69d658418e8 + status: PENDING + - stage: 2 + operator: OR + reviewers: + - id: 8d86c85d-0651-43e2-a748-d69d658418e9 + status: APPROVED properties: id: description: The unique identifier of the request. @@ -8087,8 +12087,16 @@ components: items: $ref: "#/components/schemas/RequestCustomFieldResponse" stages: + deprecated: true description: The stages configuration for this request $ref: "#/components/schemas/RequestItemStages" + reviewer_stages: + description: The configured reviewer stages for every item in this request, or an error message if reviewers could not be loaded + oneOf: + - type: array + items: + $ref: "#/components/schemas/RequestReviewerStages" + - type: string required: - id - created_at @@ -8096,9 +12104,101 @@ components: - requester_id - status - reason + RequestCommentList: + description: A paginated list of request comments + type: object + example: + comments: + - created_at: 2021-01-06T20:00:00Z + request_id: 4c86c85d-0651-43e2-a748-d69d658418e8 + user_id: c86c85d-0651-43e2-a748-d69d658418e8 + comment: This is a comment. + properties: + comments: + items: + $ref: "#/components/schemas/RequestComment" + type: array + required: + - comments + RequestComment: + description: |- + # Request Comment Object + ### Description + The `RequestComment` object is used to represent a comment on a request. + + ### Usage Example + Returned from the `GET Requests` endpoint as part of a `Request` object. + example: + created_at: 2021-01-06T20:00:00Z + request_id: 4c86c85d-0651-43e2-a748-d69d658418e8 + user_id: c86c85d-0651-43e2-a748-d69d658418e8 + comment: This is a comment. + properties: + created_at: + description: The date and time the comment was created. + example: 2021-01-06T20:00:00Z + format: date-time + type: string + request_id: + description: The unique identifier of the request the comment is associated with. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + user_id: + description: The unique identifier of the user who made the comment. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + user_full_name: + description: The user's full name. + example: Jake Barnes + type: string + user_email: + description: The user's email address. + example: jake.barnes@company.com + type: string + comment: + description: The content of the comment. + example: This is a comment. + type: string + required: + - created_at + - request_id + - user_id + - comment + RequestReviewerStages: + description: The stages configuration for a request item + type: object + properties: + access_level_name: + description: The name of the access level requested. + example: admin + type: string + access_level_remote_id: + description: The ID of the access level requested on the remote system. + example: arn:aws:iam::490306337630:role/SupportUser + type: string + item_name: + description: The name of the requested item + type: string + item_id: + description: The ID of the resource requested. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + stages: + description: The stages of review for this request + type: array + items: + $ref: "#/components/schemas/RequestStage" + required: + - item_name + - item_id + - stages RequestItemStages: description: The stages configuration for a request item type: object + deprecated: true properties: requestedRoleName: description: The name of the requested role @@ -8147,6 +12247,10 @@ components: description: The unique identifier of the reviewer type: string format: uuid + full_name: + description: The user's full name. + example: Jake Barnes + type: string status: description: The status of this reviewer's review type: string @@ -8330,6 +12434,10 @@ components: description: The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. type: integer example: 120 + extensions_duration_in_minutes: + description: The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. + type: integer + example: 120 require_manager_approval: description: A bool representing whether or not access requests to the resource require manager approval. example: False @@ -8432,6 +12540,18 @@ components: example: - f454d283-ca67-4a8a-bdbb-df212eca5347 - f454d283-ca67-4a8a-bdbb-df212eca5348 + match_remote_name: + description: A bool representing whether or not the resource's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false. + example: False + type: boolean + match_remote_description: + description: A bool representing whether or not the resource's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false. + example: False + type: boolean + last_successful_sync: + readOnly: true + description: Information about the last successful sync of this resource. + $ref: "#/components/schemas/SyncTask" required: - resource_id type: object @@ -8568,6 +12688,14 @@ components: risk_sensitivity_override: allOf: - $ref: "#/components/schemas/RiskSensitivityEnum" + match_remote_name: + description: A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. + example: False + type: boolean + match_remote_description: + description: A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. + example: False + type: boolean configuration_template_id: description: The ID of the associated configuration template. example: 06851574-e50d-40ca-8c78-f72ae6ab4304 @@ -8584,6 +12712,17 @@ components: example: False type: boolean deprecated: true + extensions_duration_in_minutes: + description: The duration for which access can be extended (in minutes). Deprecated, set the extension duration in the request_configuration you want it to apply to. + type: integer + example: 120 + deprecated: true + parent_resource_id: + description: The ID of the parent resource. + example: f454d283-ca67-4a8a-bdbb-df212eca5345 + format: uuid + type: string + nullable: true request_configurations: type: array items: @@ -9003,6 +13142,23 @@ components: - name - admin_owner_id - description + PaginatedAccessRulesList: + properties: + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + type: string + previous: + description: The cursor used to retrieve the previous page of results. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + type: string + results: + items: + $ref: "#/components/schemas/AccessRule" + type: array + required: + - results + type: object AccessRule: description: |- # Access Rule Object @@ -9010,7 +13166,7 @@ components: The `AccessRule` object is used to represent an access rule configuration. ### Usage Example - Get access rule configurations from the `GET Access Rule Configs` endpoint. + List access rules from the `GET /access-rules` endpoint, or retrieve a single access rule from the `GET /access-rules/{access_rule_id}` endpoint. properties: access_rule_id: description: The ID (group ID) of the access rule. @@ -9069,6 +13225,10 @@ components: type: array items: $ref: "#/components/schemas/TagSelector" + attribute_selectors: + type: array + items: + $ref: "#/components/schemas/UserAttributeSelector" required: - selectors TagSelector: @@ -9084,6 +13244,19 @@ components: - key - value - connection_id + UserAttributeSelector: + properties: + attribute: + type: string + enum: + - HR_IDP_STATUS + values: + type: array + items: + type: string + required: + - attribute + - values PaginatedOwnersList: example: next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw @@ -9348,6 +13521,10 @@ components: description: A bool representing whether or not access requests to the resource require an access ticket. example: False type: boolean + extensions_duration_in_minutes: + description: The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. + type: integer + example: 120 request_template_id: description: The ID of the associated request template. example: 06851574-e50d-40ca-8c78-f72ae6ab4304 @@ -9852,9 +14029,10 @@ components: example: arn:aws:iam::490306337630:role/SupportUser type: string access_level_name: - description: The ID of the access level requested on the remote system. + description: The ID of the access level requested on the remote system. This field is deprecated and no longer required. We will populate based on the access_level_remote_id. example: arn:aws:iam::490306337630:role/SupportUser type: string + deprecated: true groups: type: array items: @@ -10218,6 +14396,401 @@ components: - target_type - permission_name - allow_all + SyncTask: + type: object + description: Represents a sync task that has been completed, either successfully or with errors. + properties: + id: + description: The ID of the sync task. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + completed_at: + description: The time when the sync task was completed. + example: 2023-10-01T12:00:00Z + type: string + format: date-time + required: + - id + - completed_at + example: + id: 7c86c85d-0651-43e2-a748-d69d658418e8 + completed_at: 2023-10-01T12:00:00Z + RequestApprovalEnum: + type: string + enum: [REGULAR, ADMIN] + description: "The decision level for the approval" + example: "REGULAR" + Delegation: + type: object + description: |- + # Delegation Object + ### Description + The `Delegation` object represents a delegation of access review requests from one user to another. + + ### Usage Example + List from the `GET Delegations` endpoint. + Get from the `GET Delegation` endpoint. + properties: + id: + description: The ID of the delegation. + example: 4aed3e8a-727b-4d72-8010-3b8710c50bec + format: uuid + type: string + delegator_user_id: + description: The ID of the user delegating their access review requests. + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + delegate_user_id: + description: The ID of the user being delegated to. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + start_time: + description: The start time of the delegation. + example: 2023-10-01T12:00:00Z + type: string + format: date-time + end_time: + description: The end time of the delegation. + example: 2023-10-01T12:00:00Z + type: string + format: date-time + reason: + description: The reason for the delegation. + example: "I need to be out of the office" + type: string + created_at: + description: The creation time of the delegation. + example: 2023-10-01T12:00:00Z + type: string + format: date-time + updated_at: + description: The last updated time of the delegation. + example: 2023-10-01T12:00:00Z + type: string + format: date-time + required: + - id + - delegator_user_id + - delegate_user_id + - start_time + - end_time + - reason + - created_at + - updated_at + PaginatedDelegationsList: + type: object + description: A list of delegations for your organization. + properties: + results: + description: The delegations in the result set. + type: array + items: + $ref: "#/components/schemas/Delegation" + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string + total_count: + description: The total number of items in the result set. + example: 2 + type: integer + CreateDelegationRequest: + type: object + description: Request body for creating a new delegation of access review requests from one user to another. + properties: + delegator_user_id: + description: The ID of the user delegating their access review requests. + example: 123e4567-e89b-12d3-a456-426614174000 + format: uuid + type: string + delegate_user_id: + description: The ID of the user being delegated to. + example: 7c86c85d-0651-43e2-a748-d69d658418e8 + format: uuid + type: string + start_time: + description: The start time of the delegation. + example: 2023-10-01T12:00:00Z + type: string + format: date-time + end_time: + description: The end time of the delegation. + example: 2023-10-01T12:00:00Z + type: string + format: date-time + reason: + description: The reason for the delegation. + example: "I need to be out of the office" + type: string + required: + - delegator_user_id + - delegate_user_id + - start_time + - end_time + - reason + ApiAccessLevelEnum: + description: The access level of an API token. + enum: + - READ_ONLY + - FULL_ACCESS + type: string + EventStreamConnectionTypeEnum: + description: The type of event stream connection. + enum: + - WEBHOOK + type: string + WebhookAuthTypeEnum: + description: The authentication type for webhook connections. + enum: + - NONE + - API_KEY + - HMAC + type: string + WebhookApiKeyLocationEnum: + description: Where the API key is placed in webhook requests. + enum: + - HEADER + - QUERY_PARAM + type: string + WebhookApiKeyCredential: + description: An API key credential for webhook authentication. + properties: + id: + description: The unique identifier for the credential. + format: uuid + type: string + name: + description: The name of the API key. + type: string + value: + description: The value of the API key. + type: string + location: + $ref: "#/components/schemas/WebhookApiKeyLocationEnum" + required: + - id + - name + - value + - location + type: object + WebhookHmacCredential: + description: An HMAC credential for webhook authentication. + properties: + id: + description: The unique identifier for the credential. + format: uuid + type: string + secret: + description: The HMAC secret value. + type: string + created_at: + description: When the credential was created. + format: date-time + type: string + required: + - id + - secret + - created_at + type: object + WebhookCredentials: + description: Authentication credentials for a webhook connection. + properties: + auth_type: + $ref: "#/components/schemas/WebhookAuthTypeEnum" + api_key_credentials: + description: API key credentials, present when auth_type is API_KEY. + items: + $ref: "#/components/schemas/WebhookApiKeyCredential" + type: array + hmac_credential_1: + description: Primary HMAC credential, present when auth_type is HMAC. + nullable: true + $ref: "#/components/schemas/WebhookHmacCredential" + hmac_credential_2: + description: Secondary HMAC credential for rotation, present when auth_type is HMAC. + nullable: true + $ref: "#/components/schemas/WebhookHmacCredential" + required: + - auth_type + type: object + EventStreamConnection: + description: The connection configuration for an event stream. + properties: + name: + description: The name of the connection. + type: string + connection_type: + $ref: "#/components/schemas/EventStreamConnectionTypeEnum" + enabled: + description: Whether the connection is enabled. + type: boolean + webhook_url: + description: The webhook URL, present when connection_type is WEBHOOK. + type: string + credentials: + $ref: "#/components/schemas/WebhookCredentials" + required: + - name + - connection_type + - enabled + type: object + EventStream: + description: An event streaming connection that publishes events to an external system. + properties: + event_stream_id: + description: The ID of the event stream. + format: uuid + type: string + connection: + $ref: "#/components/schemas/EventStreamConnection" + required: + - event_stream_id + - connection + type: object + EventStreamList: + description: A list of event streams. + properties: + event_streams: + items: + $ref: "#/components/schemas/EventStream" + type: array + required: + - event_streams + type: object + CreateEventStreamInfo: + description: Information needed to create an event stream. + properties: + name: + description: The name for the event stream. + type: string + connection_type: + $ref: "#/components/schemas/EventStreamConnectionTypeEnum" + webhook_url: + description: The webhook URL. Required when connection_type is WEBHOOK. + type: string + credentials: + $ref: "#/components/schemas/WebhookCredentials" + required: + - name + - connection_type + type: object + UpdateEventStreamInfo: + description: Information needed to update an event stream. + properties: + name: + description: Updated name for the event stream. + type: string + enabled: + description: Whether the event stream should be enabled. + type: boolean + webhook_url: + description: Updated webhook URL. + type: string + credentials: + $ref: "#/components/schemas/WebhookCredentials" + type: object + Token: + description: A first-party API token. + example: + token_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + created_at: 2022-01-23T04:56:07Z + token_preview: ab123 + token_label: My API Token + creator_user_id: d4a7d928-783e-4599-8ec6-088d635a5bcc + user_id: d4a7d928-783e-4599-8ec6-088d635a5bcc + access_level: READ_ONLY + properties: + token_id: + description: The ID of the API token. + example: f454d283-ca87-4a8a-bdbb-df212eca5353 + format: uuid + type: string + created_at: + description: The date and time the token was created. + example: 2022-01-23T04:56:07Z + format: date-time + type: string + token_label: + description: A human-readable label for the token. + example: My API Token + type: string + creator_user_id: + description: The ID of the user who created the token. + example: d4a7d928-783e-4599-8ec6-088d635a5bcc + format: uuid + type: string + user_id: + description: The ID of the user the token authenticates as. + example: d4a7d928-783e-4599-8ec6-088d635a5bcc + format: uuid + type: string + last_used_at: + description: The date and time the token was last used. + example: 2022-01-23T04:56:07Z + format: date-time + nullable: true + type: string + access_level: + $ref: "#/components/schemas/ApiAccessLevelEnum" + expires_at: + description: The date and time the token expires. + example: 2023-01-23T04:56:07Z + format: date-time + nullable: true + type: string + required: + - token_id + - created_at + - token_label + - creator_user_id + - user_id + - access_level + type: object + PaginatedTokensList: + example: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - token_id: f454d283-ca87-4a8a-bdbb-df212eca5353 + created_at: 2022-01-23T04:56:07Z + token_label: My API Token + creator_user_id: d4a7d928-783e-4599-8ec6-088d635a5bcc + user_id: d4a7d928-783e-4599-8ec6-088d635a5bcc + access_level: READ_ONLY + properties: + next: + description: The cursor with which to continue pagination if additional result pages exist. + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + nullable: true + type: string + previous: + description: The cursor used to obtain the current result page. + example: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Token" + type: array + required: + - results + type: object + StopCampaignRequest: + properties: + revoke_unreviewed: + default: false + description: Revoke all unreviewed access grants. Access grants with no reviewer decision will be immediately revoked. + type: boolean + type: object securitySchemes: BearerAuth: scheme: bearer diff --git a/package-lock.json b/package-lock.json index ceaae1b7..80ebf285 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,38 +1,31 @@ { "name": "opal-mcp", - "version": "0.7.0", + "version": "0.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "opal-mcp", - "version": "0.7.0", + "version": "0.8.0", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.26.0", + "zod": "^3.25.0 || ^4.0.0" + }, "bin": { "mcp": "bin/mcp-server.js" }, "devDependencies": { - "@eslint/js": "^9.19.0", - "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "@eslint/js": "^9.26.0", "@stricli/core": "^1.1.1", "@types/express": "^4.17.21", "bun": "1.2.17", "bun-types": "1.2.17", - "eslint": "^9.19.0", + "eslint": "^9.26.0", "express": "^4.21.2", "globals": "^15.14.0", - "tshy": "^2.0.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.25.17" - }, - "peerDependencies": { - "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", - "zod": "^3" - }, - "peerDependenciesMeta": { - "@modelcontextprotocol/sdk": { - "optional": true - } + "tshy": "^3.3.2", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" } }, "node_modules/@eslint-community/eslint-utils": { @@ -186,6 +179,18 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@hono/node-server": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.1.tgz", + "integrity": "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "hono": "^4" + } + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -252,51 +257,50 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.9.0.tgz", - "integrity": "sha512-Jq2EUCQpe0iyO5FGpzVYDNFR6oR53AIrwph9yWl7uSc7IWUMsrmpmSaTGra5hQNunXpM+9oit85p924jWuHzUA==", - "dev": true, + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.30.0.tgz", + "integrity": "sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA==", "license": "MIT", "dependencies": { + "@hono/node-server": "^1.19.9 || ^2.0.5", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", - "cross-spawn": "^7.0.3", + "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", - "express": "^5.0.1", - "express-rate-limit": "^7.5.0", + "eventsource-parser": "^3.0.0", + "express": "^5.2.1", + "express-rate-limit": "^8.2.1", + "hono": "^4.11.4", + "jose": "^6.1.3", + "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", - "zod": "^3.23.8", - "zod-to-json-schema": "^3.24.1" + "zod": "^3.25 || ^4.0", + "zod-to-json-schema": "^3.25.1" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@cfworker/json-schema": "^4.1.1", + "zod": "^3.25 || ^4.0" + }, + "peerDependenciesMeta": { + "@cfworker/json-schema": { + "optional": true + }, + "zod": { + "optional": false + } } }, "node_modules/@modelcontextprotocol/sdk/node_modules/accepts": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", - "dev": true, "license": "MIT", "dependencies": { "mime-types": "^3.0.0", @@ -306,64 +310,95 @@ "node": ">= 0.6" } }, + "node_modules/@modelcontextprotocol/sdk/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@modelcontextprotocol/sdk/node_modules/body-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", - "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", - "dev": true, + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz", + "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==", "license": "MIT", "dependencies": { "bytes": "^3.1.2", - "content-type": "^1.0.5", - "debug": "^4.4.0", - "http-errors": "^2.0.0", - "iconv-lite": "^0.6.3", + "content-type": "^2.0.0", + "debug": "^4.4.3", + "http-errors": "^2.0.1", + "iconv-lite": "^0.7.2", "on-finished": "^2.4.1", - "qs": "^6.14.0", - "raw-body": "^3.0.0", - "type-is": "^2.0.0" + "qs": "^6.15.2", + "raw-body": "^3.0.2", + "type-is": "^2.1.0" }, "engines": { "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/@modelcontextprotocol/sdk/node_modules/content-disposition": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", - "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", - "dev": true, + "node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" + "engines": { + "node": ">=18" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/content-disposition": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz", + "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==", + "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/cookie-signature": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.6.0" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/express": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", - "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", - "dev": true, + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", "license": "MIT", "dependencies": { "accepts": "^2.0.0", - "body-parser": "^2.2.0", + "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", + "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", @@ -394,10 +429,9 @@ } }, "node_modules/@modelcontextprotocol/sdk/node_modules/finalhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", - "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", - "dev": true, + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", "license": "MIT", "dependencies": { "debug": "^4.4.0", @@ -408,47 +442,81 @@ "statuses": "^2.0.1" }, "engines": { - "node": ">= 0.8" + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/fresh": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" } }, + "node_modules/@modelcontextprotocol/sdk/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, + "node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, "node_modules/@modelcontextprotocol/sdk/node_modules/media-typer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", - "dev": true, + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.1.tgz", + "integrity": "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==", "license": "MIT", "engines": { "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/merge-descriptors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -461,43 +529,44 @@ "version": "1.54.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "dev": true, + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", "license": "MIT", "dependencies": { "mime-db": "^1.54.0" }, "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/negotiator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "dev": true, + "version": "6.15.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", + "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.1.0" + "es-define-property": "^1.0.1", + "side-channel": "^1.1.1" }, "engines": { "node": ">=0.6" @@ -507,33 +576,35 @@ } }, "node_modules/@modelcontextprotocol/sdk/node_modules/send": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", - "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", - "dev": true, + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", "license": "MIT", "dependencies": { - "debug": "^4.3.5", + "debug": "^4.4.3", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "mime-types": "^3.0.1", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", - "statuses": "^2.0.1" + "statuses": "^2.0.2" }, "engines": { "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/serve-static": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", - "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", - "dev": true, + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", "license": "MIT", "dependencies": { "encodeurl": "^2.0.0", @@ -543,21 +614,50 @@ }, "engines": { "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" } }, "node_modules/@modelcontextprotocol/sdk/node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", - "dev": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz", + "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==", "license": "MIT", "dependencies": { - "content-type": "^1.0.5", + "content-type": "^2.0.0", "media-typer": "^1.1.0", "mime-types": "^3.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/type-is/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/@nodelib/fs.scandir": { @@ -741,17 +841,6 @@ "win32" ] }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@stricli/core": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@stricli/core/-/core-1.1.2.tgz", @@ -1085,73 +1174,239 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "node_modules/@typescript/native-preview": { + "version": "7.0.0-dev.20260707.2", + "resolved": "https://registry.npmjs.org/@typescript/native-preview/-/native-preview-7.0.0-dev.20260707.2.tgz", + "integrity": "sha512-oUGp+Rep/hqMhPunyinsALUwSlzHINSxitifPiSaeqoKOKD2OlR9NE3TaPqwsl4NlGslsOSUXI1JotWQzpYCPg==", "dev": true, - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" + "license": "Apache-2.0", + "bin": { + "tsgo": "bin/tsgo" }, "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" + "node": ">=16.20.0" }, + "optionalDependencies": { + "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260707.2", + "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260707.2", + "@typescript/native-preview-linux-arm": "7.0.0-dev.20260707.2", + "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260707.2", + "@typescript/native-preview-linux-x64": "7.0.0-dev.20260707.2", + "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260707.2", + "@typescript/native-preview-win32-x64": "7.0.0-dev.20260707.2" + } + }, + "node_modules/@typescript/native-preview-darwin-arm64": { + "version": "7.0.0-dev.20260707.2", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20260707.2.tgz", + "integrity": "sha512-wny2pgKjGbiZtnOIHVa3tXC1UfDqxNEFzyPGmiqybedG8hipG2Nfp0l5UxbaKCjkLacUpH/W5bP2hBOMVhCOzg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=0.4.0" + "node": ">=16.20.0" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "node_modules/@typescript/native-preview-darwin-x64": { + "version": "7.0.0-dev.20260707.2", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20260707.2.tgz", + "integrity": "sha512-Afc7M5zOwo+GpfcYwz5Z8HMB2tPVsui7nNIqEuuFB73MPdVqNn/Wmpe4tP4MRri0AtJnJknoHBaTJ/VDAp/Jhw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@typescript/native-preview-linux-arm": { + "version": "7.0.0-dev.20260707.2", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20260707.2.tgz", + "integrity": "sha512-hJm/UOqZTr9FHmR7uNm8VGX4oKtfWk0Jem0zPeJFNC8ckGUfSBueyiEYMZB+XmRc1aG4x1E46y3CplP4CLHvGQ==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" } }, - "node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "node_modules/@typescript/native-preview-linux-arm64": { + "version": "7.0.0-dev.20260707.2", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20260707.2.tgz", + "integrity": "sha512-iITBa2WjjTI5N9t5l7Z4KoOSI+2zBlhbvFzsD/f8qX8QoKjz/Y4DPyBDgezYi8nkqjjksbgSOJ3/ykzhwrB9cg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/native-preview-linux-x64": { + "version": "7.0.0-dev.20260707.2", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20260707.2.tgz", + "integrity": "sha512-du0dzi6y97Po5vDNdPJTyyijHCpaS22JLRnKZEJXBDaO9gCIymOv/5QQokFRuOlQm0bWl3i9PF4OVdGP6uAOQA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/native-preview-win32-arm64": { + "version": "7.0.0-dev.20260707.2", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20260707.2.tgz", + "integrity": "sha512-SsAwfhyHJ1akgBc+99z4+hwdbHsdWaKB8EwCNIMA6JfSLMeUjffrYvxu+vfMyxVtOVOz7RrRXRoiDiu4a2sCtg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/native-preview-win32-x64": { + "version": "7.0.0-dev.20260707.2", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20260707.2.tgz", + "integrity": "sha512-DL4u27stv0fo71sVhOzHSwE+YMZsbBijVI+kg5dLDLilSH79WFTJ8RSQ46vJrCMt+Gjlv/JOZP1PuLJDfioYeQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=12" + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1168,20 +1423,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1193,7 +1434,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true, "license": "MIT" }, "node_modules/balanced-match": { @@ -1203,24 +1443,10 @@ "dev": true, "license": "MIT" }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", - "dev": true, "license": "MIT", "dependencies": { "bytes": "3.1.2", @@ -1245,7 +1471,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "2.0.0" @@ -1255,14 +1480,12 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, "license": "MIT" }, "node_modules/body-parser/node_modules/raw-body": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, "license": "MIT", "dependencies": { "bytes": "3.1.2", @@ -1345,7 +1568,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -1355,7 +1577,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -1369,7 +1590,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -1410,41 +1630,19 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" } }, "node_modules/color-convert": { @@ -1478,7 +1676,6 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" @@ -1491,7 +1688,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -1501,7 +1697,6 @@ "version": "0.7.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -1511,14 +1706,12 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true, "license": "MIT" }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, "license": "MIT", "dependencies": { "object-assign": "^4", @@ -1532,7 +1725,6 @@ "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -1544,10 +1736,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "dev": true, + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -1572,7 +1763,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -1582,7 +1772,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8", @@ -1593,7 +1782,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", @@ -1604,32 +1792,16 @@ "node": ">= 0.4" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true, - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, "license": "MIT" }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -1639,7 +1811,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1649,7 +1820,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1659,7 +1829,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -1672,7 +1841,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true, "license": "MIT" }, "node_modules/escape-string-regexp": { @@ -1849,7 +2017,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -1859,7 +2026,6 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", - "dev": true, "license": "MIT", "dependencies": { "eventsource-parser": "^3.0.1" @@ -1872,7 +2038,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.1.tgz", "integrity": "sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==", - "dev": true, "license": "MIT", "engines": { "node": ">=18.0.0" @@ -1882,7 +2047,6 @@ "version": "4.21.2", "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", - "dev": true, "license": "MIT", "dependencies": { "accepts": "~1.3.8", @@ -1926,11 +2090,14 @@ } }, "node_modules/express-rate-limit": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", - "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", - "dev": true, + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.6.2.tgz", + "integrity": "sha512-YH4ru+eOJxQABscKFfRCy9R7x9QFGdezclVMwwgFFndzS2Xnm0uo6B0ABZsLhcpeptGv2qvuJVWlQr9gQZoC3A==", "license": "MIT", + "dependencies": { + "debug": "^4.4.3", + "ip-address": "^10.2.0" + }, "engines": { "node": ">= 16" }, @@ -1938,14 +2105,13 @@ "url": "https://github.com/sponsors/express-rate-limit" }, "peerDependencies": { - "express": "^4.11 || 5 || ^5.0.0-beta.1" + "express": ">= 4.11" } }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "2.0.0" @@ -1955,14 +2121,12 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, "license": "MIT" }, "node_modules/fast-glob": { @@ -2009,6 +2173,22 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-uri": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", + "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fastq": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", @@ -2049,7 +2229,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", - "dev": true, "license": "MIT", "dependencies": { "debug": "2.6.9", @@ -2068,7 +2247,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "2.0.0" @@ -2078,7 +2256,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, "license": "MIT" }, "node_modules/find-up": { @@ -2120,17 +2297,16 @@ "license": "ISC" }, "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-4.0.3.tgz", + "integrity": "sha512-yeXZaNbCBGaT9giTpLPBdtedzjwhlJBUoL/R4BVQU5mn0TQXOHwVIl1Q2DMuBIdNno4ktA1abZ7dQFVxD6uHxw==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { - "node": ">=14" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2140,7 +2316,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2150,32 +2325,15 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2185,7 +2343,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -2210,7 +2367,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", @@ -2221,21 +2377,18 @@ } }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" }, - "bin": { - "glob": "dist/esm/bin.mjs" + "engines": { + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2254,27 +2407,40 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/glob/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^5.0.8" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2297,7 +2463,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2327,7 +2492,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2340,7 +2504,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -2349,11 +2512,19 @@ "node": ">= 0.4" } }, - "node_modules/http-errors": { - "version": "2.0.0", + "node_modules/hono": { + "version": "4.13.3", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.3.tgz", + "integrity": "sha512-r8AO2mYHoLxSHkgafNeC/BXyb2vWRxD3jem4Ts+ptav8oTG5FIRifAjuJEmZI4bSvvc2ns0GxmIYiZnHqN3mMw==", + "license": "MIT", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, "license": "MIT", "dependencies": { "depd": "2.0.0", @@ -2370,7 +2541,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" @@ -2420,32 +2590,26 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, "license": "ISC" }, + "node_modules/ip-address": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.5.0.tgz", + "integrity": "sha512-R5SnVLJmgYYvf2F2ZgwSBnelz5G4q5AxIC277GDfUaNbrZKNANcBC7RHqYYePlszf4kBolVkJauG0ZjHHFh55g==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.10" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2456,16 +2620,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2493,30 +2647,21 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", - "dev": true, "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, "license": "ISC" }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, + "node_modules/jose": { + "version": "6.2.9", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.9.tgz", + "integrity": "sha512-XrchZOFZUl/T3vTwRe8XK+cJrGtMF4th1ARnDfwbBXFKThGhlsxEE4Zu03AD/bjJSt/9jT/mxrOCkJWOg77aPA==", + "license": "MIT", "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" + "url": "https://github.com/sponsors/panva" } }, "node_modules/js-yaml": { @@ -2546,6 +2691,12 @@ "dev": true, "license": "MIT" }, + "node_modules/json-schema-typed": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz", + "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==", + "license": "BSD-2-Clause" + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -2553,6 +2704,15 @@ "dev": true, "license": "MIT" }, + "node_modules/jsonc-simple-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-simple-parser/-/jsonc-simple-parser-3.0.0.tgz", + "integrity": "sha512-0qi9Kuj4JPar4/3b9wZteuPZrTeFzXsQyOZj7hksnReCZN3Vr17Doz7w/i3E9XH7vRkVTHhHES+r1h97I+hfww==", + "dev": true, + "dependencies": { + "reghex": "^3.0.2" + } + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -2601,17 +2761,19 @@ "license": "MIT" }, "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "version": "11.5.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", + "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", "dev": true, - "license": "ISC" + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2621,7 +2783,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2631,7 +2792,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2651,7 +2811,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2675,7 +2834,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, "license": "MIT", "bin": { "mime": "cli.js" @@ -2688,7 +2846,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2698,7 +2855,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "license": "MIT", "dependencies": { "mime-db": "1.52.0" @@ -2721,11 +2877,11 @@ } }, "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" } @@ -2750,7 +2906,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/natural-compare": { @@ -2764,27 +2919,15 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2794,7 +2937,6 @@ "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2807,7 +2949,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, "license": "MIT", "dependencies": { "ee-first": "1.1.1" @@ -2820,7 +2961,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -2900,7 +3040,6 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -2920,24 +3059,23 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" }, "engines": { - "node": ">=16 || 14 >=14.18" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2947,7 +3085,6 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", - "dev": true, "license": "MIT" }, "node_modules/picomatch": { @@ -2967,7 +3104,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=16.20.0" @@ -3000,7 +3136,6 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, "license": "MIT", "dependencies": { "forwarded": "0.2.0", @@ -3024,7 +3159,6 @@ "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.6" @@ -3061,52 +3195,99 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", - "dev": true, + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.6.3", - "unpipe": "1.0.0" + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/raw-body/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" }, "engines": { "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/raw-body/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" } }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" + "engines": { + "node": ">= 14.18.0" }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/reghex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/reghex/-/reghex-3.0.2.tgz", + "integrity": "sha512-Zb9DJ5u6GhgqRSBnxV2QSnLqEwcKxHWFA1N2yUa4ZUAO1P8jlWKYtWZ6/ooV6yylspGXJX0O/uNzEv0xrCtwaA==", + "dev": true, + "license": "MIT" + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", "engines": { - "node": ">=8.10.0" + "node": ">=0.10.0" } }, "node_modules/resolve-from": { @@ -3120,17 +3301,17 @@ } }, "node_modules/resolve-import": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-1.4.6.tgz", - "integrity": "sha512-CIw9e64QcKcCFUj9+KxUCJPy8hYofv6eVfo3U9wdhCm2E4IjvFnZ6G4/yIC4yP3f11+h6uU5b3LdS7O64LgqrA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-2.4.0.tgz", + "integrity": "sha512-gLWKdA5tiv5j/D7ipR47u3ovbVfzFPrctTdw2Ulnpmr6PPVVSvPKGNWu09jXVNlOSLLAeD6CA13bjIelpWttSw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "glob": "^10.3.3", - "walk-up-path": "^3.0.1" + "glob": "^13.0.0", + "walk-up-path": "^4.0.0" }, "engines": { - "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3148,17 +3329,21 @@ } }, "node_modules/rimraf": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", - "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz", + "integrity": "sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "glob": "^10.3.7" + "glob": "^13.0.3", + "package-json-from-dist": "^1.0.1" }, "bin": { "rimraf": "dist/esm/bin.mjs" }, + "engines": { + "node": "20 || >=22" + }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -3167,7 +3352,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", - "dev": true, "license": "MIT", "dependencies": { "debug": "^4.4.0", @@ -3181,13 +3365,13 @@ } }, "node_modules/router/node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", - "dev": true, + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", + "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", "license": "MIT", - "engines": { - "node": ">=16" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/run-parallel": { @@ -3218,7 +3402,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -3239,7 +3422,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, "license": "MIT" }, "node_modules/semver": { @@ -3259,7 +3441,6 @@ "version": "0.19.0", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", - "dev": true, "license": "MIT", "dependencies": { "debug": "2.6.9", @@ -3284,7 +3465,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "2.0.0" @@ -3294,14 +3474,12 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, "license": "MIT" }, "node_modules/send/node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -3311,7 +3489,6 @@ "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", - "dev": true, "license": "MIT", "dependencies": { "encodeurl": "~2.0.0", @@ -3327,14 +3504,12 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true, "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -3347,22 +3522,20 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", + "object-inspect": "^1.13.4", + "side-channel-list": "^1.0.1", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" }, @@ -3374,14 +3547,13 @@ } }, "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" + "object-inspect": "^1.13.4" }, "engines": { "node": ">= 0.4" @@ -3394,7 +3566,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -3413,7 +3584,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -3446,116 +3616,11 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -3583,22 +3648,22 @@ } }, "node_modules/sync-content": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-1.0.2.tgz", - "integrity": "sha512-znd3rYiiSxU3WteWyS9a6FXkTA/Wjk8WQsOyzHbineeL837dLn3DA4MRhsIX3qGcxDMH6+uuFV4axztssk7wEQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-2.0.4.tgz", + "integrity": "sha512-w3ioiBmbaogob33WdLnuwFk+8tpePI58CTWKqtdAgEqc2hfGuSwP02gPETqNX/3PLS5skv5a1wQR0gbaa2W0XQ==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "glob": "^10.2.6", + "glob": "^13.0.1", "mkdirp": "^3.0.1", - "path-scurry": "^1.9.2", - "rimraf": "^5.0.1" + "path-scurry": "^2.0.0", + "rimraf": "^6.0.0" }, "bin": { - "sync-content": "dist/mjs/bin.mjs" + "sync-content": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3621,7 +3686,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.6" @@ -3641,45 +3705,60 @@ } }, "node_modules/tshy": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tshy/-/tshy-2.0.1.tgz", - "integrity": "sha512-U5fC+3pMaGfmULhPTVpxKMd62AcX13yfsFrjhAP/daTLG6LFRLIuxqYOmkejJ4MT/s5bEa29+1Jy/9mXkMiMfA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/tshy/-/tshy-3.3.2.tgz", + "integrity": "sha512-vOIXkqMtBWNjKUR/c99+6N50LhWdnKG1xE3+5wf8IPdzxx2lcIFPvbGgFdBBgoTMbdNb8mz06MUm7hY+TFnJcw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "chalk": "^5.3.0", - "chokidar": "^3.6.0", - "foreground-child": "^3.1.1", - "minimatch": "^9.0.4", + "@typescript/native-preview": "^7.0.0-dev.20260218.1", + "chalk": "^5.6.2", + "chokidar": "^4.0.3", + "foreground-child": "^4.0.0", + "jsonc-simple-parser": "^3.0.0", + "minimatch": "^10.0.3", "mkdirp": "^3.0.1", "polite-json": "^5.0.0", - "resolve-import": "^1.4.5", - "rimraf": "^5.0.1", - "sync-content": "^1.0.2", - "typescript": "5", - "walk-up-path": "^3.0.1" + "resolve-import": "^2.4.0", + "rimraf": "^6.1.2", + "sync-content": "^2.0.3", + "typescript": "^5.9.3", + "walk-up-path": "^4.0.0" }, "bin": { - "tshy": "dist/esm/index.js" + "tshy": "dist/esm/bin-min.mjs" }, "engines": { - "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" + "node": "20 || >=22" + } + }, + "node_modules/tshy/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" } }, "node_modules/tshy/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/tshy/node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", "dev": true, "license": "MIT", "engines": { @@ -3690,21 +3769,35 @@ } }, "node_modules/tshy/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^5.0.8" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/tshy/node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -3722,7 +3815,6 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, "license": "MIT", "dependencies": { "media-typer": "0.3.0", @@ -3779,7 +3871,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -3799,7 +3890,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4.0" @@ -3809,24 +3899,25 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" } }, "node_modules/walk-up-path": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", - "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz", + "integrity": "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==", "dev": true, - "license": "ISC" + "license": "ISC", + "engines": { + "node": "20 || >=22" + } }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -3848,106 +3939,10 @@ "node": ">=0.10.0" } }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, "license": "ISC" }, "node_modules/yocto-queue": { @@ -3967,20 +3962,18 @@ "version": "3.25.62", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.62.tgz", "integrity": "sha512-YCxsr4DmhPcrKPC9R1oBHQNlQzlJEyPAId//qTau/vBee9uO8K6prmRq4eMkOyxvBfH4wDPIPdLx9HVMWIY3xA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } }, "node_modules/zod-to-json-schema": { - "version": "3.24.5", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", - "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", - "dev": true, + "version": "3.25.2", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.2.tgz", + "integrity": "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==", "license": "ISC", "peerDependencies": { - "zod": "^3.24.1" + "zod": "^3.25.28 || ^4" } } } diff --git a/package.json b/package.json index 009254cd..6f951b15 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opal-mcp", - "version": "0.7.0", + "version": "0.8.0", "author": "Speakeasy", "type": "module", "bin": { @@ -32,31 +32,24 @@ "build": "npm run build:mcp && tshy", "prepublishOnly": "npm run build" }, - "peerDependencies": { - "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", - "zod": "^3" - }, - "peerDependenciesMeta": { - "@modelcontextprotocol/sdk": { - "optional": true - } - }, + "peerDependencies": {}, "devDependencies": { - "@eslint/js": "^9.19.0", - "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "@eslint/js": "^9.26.0", "@stricli/core": "^1.1.1", "@types/express": "^4.17.21", "bun": "1.2.17", "bun-types": "1.2.17", - "eslint": "^9.19.0", + "eslint": "^9.26.0", "express": "^4.21.2", "globals": "^15.14.0", - "tshy": "^2.0.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.25.17" + "tshy": "^3.3.2", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "^1.26.0", + "zod": "^3.25.0 || ^4.0.0" }, - "dependencies": {}, "exports": { ".": { "import": { diff --git a/src/funcs/accessRulesCreateAccessRule.ts b/src/funcs/accessRulesCreateAccessRule.ts index d2edeb05..4d9bebb6 100644 --- a/src/funcs/accessRulesCreateAccessRule.ts +++ b/src/funcs/accessRulesCreateAccessRule.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create_access_rule", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/accessRulesGetAccessRule.ts b/src/funcs/accessRulesGetAccessRule.ts index 6d7d8051..5f4022c8 100644 --- a/src/funcs/accessRulesGetAccessRule.ts +++ b/src/funcs/accessRulesGetAccessRule.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/access-rules/{access_rule_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_access_rule", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/accessRulesGetAccessRules.ts b/src/funcs/accessRulesGetAccessRules.ts new file mode 100644 index 00000000..946bec9c --- /dev/null +++ b/src/funcs/accessRulesGetAccessRules.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Returns a list of access rules for your organization. + */ +export function accessRulesGetAccessRules( + client: OpalMcpCore, + request: operations.GetAccessRulesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PaginatedAccessRulesList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetAccessRulesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PaginatedAccessRulesList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAccessRulesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/access-rules")(); + + const query = encodeFormQuery({ + "cursor": payload.cursor, + "page_size": payload.page_size, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_access_rules", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PaginatedAccessRulesList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PaginatedAccessRulesList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/accessRulesUpdateAccessRule.ts b/src/funcs/accessRulesUpdateAccessRule.ts index 3794cfe8..20682f35 100644 --- a/src/funcs/accessRulesUpdateAccessRule.ts +++ b/src/funcs/accessRulesUpdateAccessRule.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -91,7 +92,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/access-rules/{access_rule_id}")(pathParams); const headers = new Headers(compactMap({ @@ -107,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "update_access_rule", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -135,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/appsGetApp.ts b/src/funcs/appsGetApp.ts index 565e28d3..063699ab 100644 --- a/src/funcs/appsGetApp.ts +++ b/src/funcs/appsGetApp.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get app by ID + * + * @remarks * Returns an `App` object. */ export function appsGetApp( @@ -89,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/apps/{app_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getApp", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/appsGetApps.ts b/src/funcs/appsGetApps.ts index 9c345a83..baf38177 100644 --- a/src/funcs/appsGetApps.ts +++ b/src/funcs/appsGetApps.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, queryJoin } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get apps + * + * @remarks * Returns a list of `App` objects. */ export function appsGetApps( @@ -106,7 +110,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getApps", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -135,7 +139,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/appsGetSyncErrors.ts b/src/funcs/appsGetSyncErrors.ts index d80d6daa..e9a1d197 100644 --- a/src/funcs/appsGetSyncErrors.ts +++ b/src/funcs/appsGetSyncErrors.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -104,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getSyncErrors", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +134,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesAddBundleGroup.ts b/src/funcs/bundlesAddBundleGroup.ts index 96c92614..e219e884 100644 --- a/src/funcs/bundlesAddBundleGroup.ts +++ b/src/funcs/bundlesAddBundleGroup.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}/groups")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "addBundleGroup", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesAddBundleResource.ts b/src/funcs/bundlesAddBundleResource.ts index 25c94cc8..eeb48a0f 100644 --- a/src/funcs/bundlesAddBundleResource.ts +++ b/src/funcs/bundlesAddBundleResource.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}/resources")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "addBundleResource", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesCreateBundle.ts b/src/funcs/bundlesCreateBundle.ts index e780e5c3..0d673042 100644 --- a/src/funcs/bundlesCreateBundle.ts +++ b/src/funcs/bundlesCreateBundle.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createBundle", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesDeleteBundle.ts b/src/funcs/bundlesDeleteBundle.ts index bfbb201f..ef37410b 100644 --- a/src/funcs/bundlesDeleteBundle.ts +++ b/src/funcs/bundlesDeleteBundle.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteBundle", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesGetBundle.ts b/src/funcs/bundlesGetBundle.ts index ddfbc8a7..4b215caf 100644 --- a/src/funcs/bundlesGetBundle.ts +++ b/src/funcs/bundlesGetBundle.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get bundle by ID + * + * @remarks * Returns a `Bundle` object. */ export function bundlesGetBundle( @@ -89,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getBundle", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesGetBundleGroups.ts b/src/funcs/bundlesGetBundleGroups.ts index b32fa70f..93ca7848 100644 --- a/src/funcs/bundlesGetBundleGroups.ts +++ b/src/funcs/bundlesGetBundleGroups.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -101,7 +101,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}/groups")(pathParams); const query = encodeFormQuery({ @@ -121,7 +120,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getBundleGroups", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -150,7 +149,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -206,11 +206,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "bundle_groups"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { bundle_groups: unknown }).bundle_groups; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/bundlesGetBundleResources.ts b/src/funcs/bundlesGetBundleResources.ts index 633db0a2..b1d10368 100644 --- a/src/funcs/bundlesGetBundleResources.ts +++ b/src/funcs/bundlesGetBundleResources.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -101,7 +101,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}/resources")(pathParams); const query = encodeFormQuery({ @@ -121,7 +120,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getBundleResources", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -150,7 +149,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -206,11 +206,15 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "bundle_resources"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = + (responseData as { bundle_resources: unknown }).bundle_resources; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/bundlesGetBundleVisibility.ts b/src/funcs/bundlesGetBundleVisibility.ts index fc4b9246..529845be 100644 --- a/src/funcs/bundlesGetBundleVisibility.ts +++ b/src/funcs/bundlesGetBundleVisibility.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}/visibility")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getBundleVisibility", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesGetBundles.ts b/src/funcs/bundlesGetBundles.ts index f3576576..1140d59a 100644 --- a/src/funcs/bundlesGetBundles.ts +++ b/src/funcs/bundlesGetBundles.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -32,6 +32,9 @@ import { } from "../types/operations.js"; /** + * Get bundles + * + * @remarks * Returns a list of `Bundle` objects. */ export function bundlesGetBundles( @@ -115,7 +118,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getBundles", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -144,7 +147,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -198,11 +202,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "bundles"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { bundles: unknown }).bundles; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/bundlesRemoveBundleGroup.ts b/src/funcs/bundlesRemoveBundleGroup.ts index 7bbd4446..cd2501cc 100644 --- a/src/funcs/bundlesRemoveBundleGroup.ts +++ b/src/funcs/bundlesRemoveBundleGroup.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}/groups/{group_id}")(pathParams); const query = encodeFormQuery({ @@ -112,7 +112,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "removeBundleGroup", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -141,7 +141,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesRemoveBundleResource.ts b/src/funcs/bundlesRemoveBundleResource.ts index 11ad2515..289507d6 100644 --- a/src/funcs/bundlesRemoveBundleResource.ts +++ b/src/funcs/bundlesRemoveBundleResource.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -94,7 +95,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}/resources/{resource_id}")( pathParams, ); @@ -115,7 +115,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "removeBundleResource", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -144,7 +144,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesSetBundleVisibility.ts b/src/funcs/bundlesSetBundleVisibility.ts index 501089c5..93c3cc86 100644 --- a/src/funcs/bundlesSetBundleVisibility.ts +++ b/src/funcs/bundlesSetBundleVisibility.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}/visibility")(pathParams); const headers = new Headers(compactMap({ @@ -106,7 +106,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "setBundleVisibility", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -134,7 +134,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/bundlesUpdateBundle.ts b/src/funcs/bundlesUpdateBundle.ts index 0a9add26..ce82b873 100644 --- a/src/funcs/bundlesUpdateBundle.ts +++ b/src/funcs/bundlesUpdateBundle.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/bundles/{bundle_id}")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateBundle", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/campaignsCreateCampaign.ts b/src/funcs/campaignsCreateCampaign.ts new file mode 100644 index 00000000..4a0e9c73 --- /dev/null +++ b/src/funcs/campaignsCreateCampaign.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Creates a campaign. Campaign scope only supports direct access edges: + * `configuration.query.edgeFilter.directOnly` defaults to `true`, is + * always stored as `true`, and passing `false` returns 400. + */ +export function campaignsCreateCampaign( + client: OpalMcpCore, + request: components.CreateCampaignInfo, + options?: RequestOptions, +): APIPromise< + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: components.CreateCampaignInfo, + options?: RequestOptions, +): Promise< + [ + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateCampaignInfo$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/campaigns")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createCampaign", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(201, components.Campaign$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/campaignsEndCampaign.ts b/src/funcs/campaignsEndCampaign.ts new file mode 100644 index 00000000..e323f3fe --- /dev/null +++ b/src/funcs/campaignsEndCampaign.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * End campaign + * + * @remarks + * Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, + * applying pending access changes, and queuing report generation. + * Returns 400 unless the campaign is started and stopped and not already + * ended. + */ +export function campaignsEndCampaign( + client: OpalMcpCore, + request: operations.EndCampaignRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.EndCampaignRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.EndCampaignRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + campaign_id: encodeSimple("campaign_id", payload.campaign_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/campaigns/{campaign_id}/end")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "endCampaign", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Campaign$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/campaignsGetCampaign.ts b/src/funcs/campaignsGetCampaign.ts new file mode 100644 index 00000000..745ca56f --- /dev/null +++ b/src/funcs/campaignsGetCampaign.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get campaign by ID + * + * @remarks + * Returns a `Campaign` object. + */ +export function campaignsGetCampaign( + client: OpalMcpCore, + request: operations.GetCampaignRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetCampaignRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetCampaignRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + campaign_id: encodeSimple("campaign_id", payload.campaign_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/campaigns/{campaign_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCampaign", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Campaign$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/campaignsGetCampaigns.ts b/src/funcs/campaignsGetCampaigns.ts new file mode 100644 index 00000000..dc5e69da --- /dev/null +++ b/src/funcs/campaignsGetCampaigns.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Returns a list of `Campaign` objects. + */ +export function campaignsGetCampaigns( + client: OpalMcpCore, + request: operations.GetCampaignsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PaginatedCampaignsList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetCampaignsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PaginatedCampaignsList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetCampaignsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/campaigns")(); + + const query = encodeFormQuery({ + "created_at_after": payload.created_at_after, + "created_at_before": payload.created_at_before, + "cursor": payload.cursor, + "ended_at_after": payload.ended_at_after, + "ended_at_before": payload.ended_at_before, + "name": payload.name, + "page_size": payload.page_size, + "started_at_after": payload.started_at_after, + "started_at_before": payload.started_at_before, + "status": payload.status, + "stopped_at_after": payload.stopped_at_after, + "stopped_at_before": payload.stopped_at_before, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getCampaigns", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PaginatedCampaignsList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PaginatedCampaignsList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/campaignsStartCampaign.ts b/src/funcs/campaignsStartCampaign.ts new file mode 100644 index 00000000..f26c6fee --- /dev/null +++ b/src/funcs/campaignsStartCampaign.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Start campaign + * + * @remarks + * Starts a draft campaign immediately, setting `started_at` and + * `started_by_user_id`. Returns 400 if the campaign is not in draft + * state, or if it is a recurring template (`is_template: true`) — + * templates spawn draft campaigns on their schedule and cannot be + * started directly. + */ +export function campaignsStartCampaign( + client: OpalMcpCore, + request: operations.StartCampaignRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.StartCampaignRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.StartCampaignRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + campaign_id: encodeSimple("campaign_id", payload.campaign_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/campaigns/{campaign_id}/start")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "startCampaign", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Campaign$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/campaignsStopCampaign.ts b/src/funcs/campaignsStopCampaign.ts new file mode 100644 index 00000000..9294d11e --- /dev/null +++ b/src/funcs/campaignsStopCampaign.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Stop campaign + * + * @remarks + * Stops an ongoing campaign immediately, setting `stopped_at` and + * `stopped_by_user_id`. Returns 400 if the campaign has not started or + * has already stopped. + */ +export function campaignsStopCampaign( + client: OpalMcpCore, + request: operations.StopCampaignRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.StopCampaignRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.StopCampaignRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.StopCampaignRequest, { + explode: true, + }); + + const pathParams = { + campaign_id: encodeSimple("campaign_id", payload.campaign_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/campaigns/{campaign_id}/stop")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "stopCampaign", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Campaign$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/campaignsUpdateCampaign.ts b/src/funcs/campaignsUpdateCampaign.ts new file mode 100644 index 00000000..31b326d0 --- /dev/null +++ b/src/funcs/campaignsUpdateCampaign.ts @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update campaign + * + * @remarks + * Partially updates a campaign. Omitted fields are left unchanged. + * `configuration.query` and `configuration.reviewer_assignment_policy` + * cannot be updated after create; including either field returns 400. + * `configuration.cron_expression` and + * `configuration.recurring_duration_days` may only be set on template + * campaigns; setting them on a one-off campaign returns 400. + * `configuration.is_template` is immutable and not accepted on update. + * Configuration updates on a stopped or ended (non-template) campaign + * return 400. Name-only updates are still allowed. + */ +export function campaignsUpdateCampaign( + client: OpalMcpCore, + request: operations.UpdateCampaignRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.UpdateCampaignRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateCampaignRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdateCampaignInfo, { + explode: true, + }); + + const pathParams = { + campaign_id: encodeSimple("campaign_id", payload.campaign_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/campaigns/{campaign_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updateCampaign", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Campaign, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Campaign$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/configurationTemplatesCreateConfigurationTemplate.ts b/src/funcs/configurationTemplatesCreateConfigurationTemplate.ts index 03ffc3e6..58adae18 100644 --- a/src/funcs/configurationTemplatesCreateConfigurationTemplate.ts +++ b/src/funcs/configurationTemplatesCreateConfigurationTemplate.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -98,7 +99,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createConfigurationTemplate", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -126,7 +127,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/configurationTemplatesDeleteConfigurationTemplate.ts b/src/funcs/configurationTemplatesDeleteConfigurationTemplate.ts index c78bef1d..7e1bdaf1 100644 --- a/src/funcs/configurationTemplatesDeleteConfigurationTemplate.ts +++ b/src/funcs/configurationTemplatesDeleteConfigurationTemplate.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -91,7 +92,6 @@ async function $do( { explode: false, charEncoding: "percent" }, ), }; - const path = pathToFunc( "/configuration-templates/{configuration_template_id}", )(pathParams); @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteConfigurationTemplate", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/configurationTemplatesGetConfigurationTemplates.ts b/src/funcs/configurationTemplatesGetConfigurationTemplates.ts index 1e8257c1..26ee11c5 100644 --- a/src/funcs/configurationTemplatesGetConfigurationTemplates.ts +++ b/src/funcs/configurationTemplatesGetConfigurationTemplates.ts @@ -3,6 +3,7 @@ */ import { OpalMcpCore } from "../core.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; @@ -80,7 +81,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getConfigurationTemplates", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,7 +108,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/configurationTemplatesUpdateConfigurationTemplate.ts b/src/funcs/configurationTemplatesUpdateConfigurationTemplate.ts index 00f09082..d7e6633e 100644 --- a/src/funcs/configurationTemplatesUpdateConfigurationTemplate.ts +++ b/src/funcs/configurationTemplatesUpdateConfigurationTemplate.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -98,7 +99,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateConfigurationTemplate", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -126,7 +127,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/delegationsCreateDelegation.ts b/src/funcs/delegationsCreateDelegation.ts new file mode 100644 index 00000000..986b1b9e --- /dev/null +++ b/src/funcs/delegationsCreateDelegation.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Creates a new request reviewer delegation to delegate access review requests from one user to another. + */ +export function delegationsCreateDelegation( + client: OpalMcpCore, + request: components.CreateDelegationRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Delegation, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: components.CreateDelegationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Delegation, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateDelegationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/delegations")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createDelegation", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Delegation, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Delegation$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/delegationsDeleteDelegation.ts b/src/funcs/delegationsDeleteDelegation.ts new file mode 100644 index 00000000..a9e98533 --- /dev/null +++ b/src/funcs/delegationsDeleteDelegation.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Deletes a delegation by its ID. + */ +export function delegationsDeleteDelegation( + client: OpalMcpCore, + request: operations.DeleteDelegationRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.DeleteDelegationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteDelegationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + delegation_id: encodeSimple("delegation_id", payload.delegation_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/delegations/{delegation_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteDelegation", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/delegationsGetDelegation.ts b/src/funcs/delegationsGetDelegation.ts new file mode 100644 index 00000000..94f8e3ab --- /dev/null +++ b/src/funcs/delegationsGetDelegation.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get delegation by ID + * + * @remarks + * Returns a specific delegation by its ID. + */ +export function delegationsGetDelegation( + client: OpalMcpCore, + request: operations.GetDelegationRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Delegation, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetDelegationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Delegation, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetDelegationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + delegation_id: encodeSimple("delegation_id", payload.delegation_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/delegations/{delegation_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getDelegation", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Delegation, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Delegation$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/delegationsGetDelegations.ts b/src/funcs/delegationsGetDelegations.ts new file mode 100644 index 00000000..b6b43fda --- /dev/null +++ b/src/funcs/delegationsGetDelegations.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get delegations + * + * @remarks + * Returns a list of request reviewer delegations configured for your organization. + */ +export function delegationsGetDelegations( + client: OpalMcpCore, + request: operations.GetDelegationsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PaginatedDelegationsList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetDelegationsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PaginatedDelegationsList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetDelegationsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/delegations")(); + + const query = encodeFormQuery({ + "cursor": payload.cursor, + "delegate_user_id": payload.delegate_user_id, + "delegator_user_id": payload.delegator_user_id, + "page_size": payload.page_size, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getDelegations", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PaginatedDelegationsList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PaginatedDelegationsList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/eventStreamsCreateEventStream.ts b/src/funcs/eventStreamsCreateEventStream.ts new file mode 100644 index 00000000..8efd39eb --- /dev/null +++ b/src/funcs/eventStreamsCreateEventStream.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create event stream + * + * @remarks + * Creates a new event streaming connection. + */ +export function eventStreamsCreateEventStream( + client: OpalMcpCore, + request: components.CreateEventStreamInfo, + options?: RequestOptions, +): APIPromise< + Result< + components.EventStream, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: components.CreateEventStreamInfo, + options?: RequestOptions, +): Promise< + [ + Result< + components.EventStream, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateEventStreamInfo$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/event-streams")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createEventStream", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EventStream, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.EventStream$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/eventStreamsDeleteEventStream.ts b/src/funcs/eventStreamsDeleteEventStream.ts new file mode 100644 index 00000000..5aaec5ff --- /dev/null +++ b/src/funcs/eventStreamsDeleteEventStream.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete event stream + * + * @remarks + * Deletes an event streaming connection. + */ +export function eventStreamsDeleteEventStream( + client: OpalMcpCore, + request: operations.DeleteEventStreamRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.DeleteEventStreamRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteEventStreamRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + event_stream_id: encodeSimple("event_stream_id", payload.event_stream_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/event-streams/{event_stream_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteEventStream", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/eventStreamsGetEventStreams.ts b/src/funcs/eventStreamsGetEventStreams.ts new file mode 100644 index 00000000..64917231 --- /dev/null +++ b/src/funcs/eventStreamsGetEventStreams.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get event streams + * + * @remarks + * Returns a list of configured event streaming connections for your organization. + */ +export function eventStreamsGetEventStreams( + client: OpalMcpCore, + options?: RequestOptions, +): APIPromise< + Result< + components.EventStreamList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: OpalMcpCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.EventStreamList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/event-streams")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getEventStreams", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EventStreamList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.EventStreamList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/eventStreamsUpdateEventStream.ts b/src/funcs/eventStreamsUpdateEventStream.ts new file mode 100644 index 00000000..d992d986 --- /dev/null +++ b/src/funcs/eventStreamsUpdateEventStream.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update event stream + * + * @remarks + * Updates an existing event streaming connection. + */ +export function eventStreamsUpdateEventStream( + client: OpalMcpCore, + request: operations.UpdateEventStreamRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EventStream, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.UpdateEventStreamRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EventStream, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateEventStreamRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdateEventStreamInfo, { + explode: true, + }); + + const pathParams = { + event_stream_id: encodeSimple("event_stream_id", payload.event_stream_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/event-streams/{event_stream_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updateEventStream", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EventStream, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.EventStream$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/eventsEvents.ts b/src/funcs/eventsEvents.ts index 0d2cf328..5d6b3d1c 100644 --- a/src/funcs/eventsEvents.ts +++ b/src/funcs/eventsEvents.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -120,7 +120,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "events", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -149,7 +149,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -203,11 +204,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results?: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/eventsGetEvent.ts b/src/funcs/eventsGetEvent.ts new file mode 100644 index 00000000..2fe2c597 --- /dev/null +++ b/src/funcs/eventsGetEvent.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get event by ID + * + * @remarks + * Returns an `Event` object. + */ +export function eventsGetEvent( + client: OpalMcpCore, + request: operations.GetEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Event, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Event, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + event_id: encodeSimple("event_id", payload.event_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/events/{event_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getEvent", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Event, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Event$inboundSchema), + M.fail([404, "4XX"]), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/groupBindingsCreateGroupBinding.ts b/src/funcs/groupBindingsCreateGroupBinding.ts index 01ebee3a..b1033732 100644 --- a/src/funcs/groupBindingsCreateGroupBinding.ts +++ b/src/funcs/groupBindingsCreateGroupBinding.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createGroupBinding", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupBindingsDeleteGroupBinding.ts b/src/funcs/groupBindingsDeleteGroupBinding.ts index bd14ce1c..ff9ab746 100644 --- a/src/funcs/groupBindingsDeleteGroupBinding.ts +++ b/src/funcs/groupBindingsDeleteGroupBinding.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( { explode: false, charEncoding: "percent" }, ), }; - const path = pathToFunc("/group-bindings/{group_binding_id}")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteGroupBinding", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupBindingsGetGroupBinding.ts b/src/funcs/groupBindingsGetGroupBinding.ts index 2a4eda42..a679cd70 100644 --- a/src/funcs/groupBindingsGetGroupBinding.ts +++ b/src/funcs/groupBindingsGetGroupBinding.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get group binding by ID + * + * @remarks * Returns a `GroupBinding` object. */ export function groupBindingsGetGroupBinding( @@ -90,7 +94,6 @@ async function $do( { explode: true, charEncoding: "percent" }, ), }; - const path = pathToFunc("/group-bindings/{group_binding_id}")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getGroupBinding", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupBindingsGetGroupBindings.ts b/src/funcs/groupBindingsGetGroupBindings.ts index 494344a5..15a7e5d7 100644 --- a/src/funcs/groupBindingsGetGroupBindings.ts +++ b/src/funcs/groupBindingsGetGroupBindings.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -32,6 +32,9 @@ import { } from "../types/operations.js"; /** + * Get group bindings + * + * @remarks * Returns a list of `GroupBinding` objects. */ export function groupBindingsGetGroupBindings( @@ -114,7 +117,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getGroupBindings", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +146,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -199,11 +203,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/groupBindingsUpdateGroupBindings.ts b/src/funcs/groupBindingsUpdateGroupBindings.ts index fc64cd7e..67961083 100644 --- a/src/funcs/groupBindingsUpdateGroupBindings.ts +++ b/src/funcs/groupBindingsUpdateGroupBindings.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -99,7 +100,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateGroupBindings", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -127,7 +128,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsAddGroupContainingGroup.ts b/src/funcs/groupsAddGroupContainingGroup.ts index 7fa9b941..8d02afdd 100644 --- a/src/funcs/groupsAddGroupContainingGroup.ts +++ b/src/funcs/groupsAddGroupContainingGroup.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -92,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/containing-groups")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "add_group_containing_group", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsAddGroupResource.ts b/src/funcs/groupsAddGroupResource.ts index f3f48cae..05257c10 100644 --- a/src/funcs/groupsAddGroupResource.ts +++ b/src/funcs/groupsAddGroupResource.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/resources/{resource_id}")( pathParams, ); @@ -115,7 +115,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "add_group_resource", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -144,7 +144,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsAddGroupUser.ts b/src/funcs/groupsAddGroupUser.ts index 8ab1bfae..91d12319 100644 --- a/src/funcs/groupsAddGroupUser.ts +++ b/src/funcs/groupsAddGroupUser.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/users/{user_id}")(pathParams); const query = encodeFormQuery({ @@ -114,7 +114,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "add_group_user", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +143,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsCreateGroup.ts b/src/funcs/groupsCreateGroup.ts index 6897e979..235101d4 100644 --- a/src/funcs/groupsCreateGroup.ts +++ b/src/funcs/groupsCreateGroup.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createGroup", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsDeleteGroup.ts b/src/funcs/groupsDeleteGroup.ts index bcbf03a6..e6c2de2a 100644 --- a/src/funcs/groupsDeleteGroup.ts +++ b/src/funcs/groupsDeleteGroup.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_group", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsDeleteGroupUser.ts b/src/funcs/groupsDeleteGroupUser.ts index eb2addb5..5622747a 100644 --- a/src/funcs/groupsDeleteGroupUser.ts +++ b/src/funcs/groupsDeleteGroupUser.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/users/{user_id}")(pathParams); const query = encodeFormQuery({ @@ -112,7 +112,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_group_user", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -141,7 +141,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroup.ts b/src/funcs/groupsGetGroup.ts index f1233eec..f0e71efa 100644 --- a/src/funcs/groupsGetGroup.ts +++ b/src/funcs/groupsGetGroup.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get group by ID + * + * @remarks * Returns a `Group` object. */ export function groupsGetGroup( @@ -89,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getGroup", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupContainingGroup.ts b/src/funcs/groupsGetGroupContainingGroup.ts index bea70e20..4897c801 100644 --- a/src/funcs/groupsGetGroupContainingGroup.ts +++ b/src/funcs/groupsGetGroupContainingGroup.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get nested group by ID + * + * @remarks * Gets a specific containing group for a group. */ export function groupsGetGroupContainingGroup( @@ -95,7 +99,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/groups/{group_id}/containing-groups/{containing_group_id}", )(pathParams); @@ -112,7 +115,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_containing_group", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -140,7 +143,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupContainingGroups.ts b/src/funcs/groupsGetGroupContainingGroups.ts index 8d222738..a7e6c6be 100644 --- a/src/funcs/groupsGetGroupContainingGroups.ts +++ b/src/funcs/groupsGetGroupContainingGroups.ts @@ -3,7 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get nested groups + * + * @remarks * Gets the list of groups that the group gives access to. */ export function groupsGetGroupContainingGroups( @@ -90,9 +94,12 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/containing-groups")(pathParams); + const query = encodeFormQuery({ + "access_level_remote_id": payload.access_level_remote_id, + }); + const headers = new Headers(compactMap({ Accept: "application/json", })); @@ -105,7 +112,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_containing_groups", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -122,6 +129,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + query: query, body: body, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, @@ -133,7 +141,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupMessageChannels.ts b/src/funcs/groupsGetGroupMessageChannels.ts index 65b0c174..28578aa7 100644 --- a/src/funcs/groupsGetGroupMessageChannels.ts +++ b/src/funcs/groupsGetGroupMessageChannels.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/message-channels")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_message_channels", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupOnCallSchedules.ts b/src/funcs/groupsGetGroupOnCallSchedules.ts index 4cd3edc1..3dc6f7c4 100644 --- a/src/funcs/groupsGetGroupOnCallSchedules.ts +++ b/src/funcs/groupsGetGroupOnCallSchedules.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/on-call-schedules")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_on_call_schedules", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupResources.ts b/src/funcs/groupsGetGroupResources.ts index 283060e0..133b72bf 100644 --- a/src/funcs/groupsGetGroupResources.ts +++ b/src/funcs/groupsGetGroupResources.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/resources")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_resources", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupReviewerStages.ts b/src/funcs/groupsGetGroupReviewerStages.ts index e6f1c46d..fd8383b6 100644 --- a/src/funcs/groupsGetGroupReviewerStages.ts +++ b/src/funcs/groupsGetGroupReviewerStages.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/reviewer-stages")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_reviewer_stages", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupReviewers.ts b/src/funcs/groupsGetGroupReviewers.ts index e88ee048..92fed09a 100644 --- a/src/funcs/groupsGetGroupReviewers.ts +++ b/src/funcs/groupsGetGroupReviewers.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -91,7 +92,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/reviewers")(pathParams); const headers = new Headers(compactMap({ @@ -106,7 +106,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_reviewers", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -134,7 +134,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupTags.ts b/src/funcs/groupsGetGroupTags.ts index a8e3bca0..86082b51 100644 --- a/src/funcs/groupsGetGroupTags.ts +++ b/src/funcs/groupsGetGroupTags.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/tags")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_tags", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupUsers.ts b/src/funcs/groupsGetGroupUsers.ts index 29341e61..a5791901 100644 --- a/src/funcs/groupsGetGroupUsers.ts +++ b/src/funcs/groupsGetGroupUsers.ts @@ -3,7 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,9 +90,13 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/users")(pathParams); + const query = encodeFormQuery({ + "cursor": payload.cursor, + "page_size": payload.page_size, + }); + const headers = new Headers(compactMap({ Accept: "application/json", })); @@ -104,7 +109,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_users", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -121,6 +126,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + query: query, body: body, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, @@ -132,7 +138,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroupVisibility.ts b/src/funcs/groupsGetGroupVisibility.ts index dba8e6bb..877d3166 100644 --- a/src/funcs/groupsGetGroupVisibility.ts +++ b/src/funcs/groupsGetGroupVisibility.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/visibility")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_group_visibility", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsGetGroups.ts b/src/funcs/groupsGetGroups.ts index 3f9ca375..bf1d71e7 100644 --- a/src/funcs/groupsGetGroups.ts +++ b/src/funcs/groupsGetGroups.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, queryJoin } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -32,6 +32,9 @@ import { } from "../types/operations.js"; /** + * Get groups + * + * @remarks * Returns a list of groups for your organization. */ export function groupsGetGroups( @@ -106,6 +109,7 @@ async function $do( "group_name": payload.group_name, "group_type_filter": payload.group_type_filter, "page_size": payload.page_size, + "tag_ids": payload.tag_ids, }), ); @@ -121,7 +125,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getGroups", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -150,7 +154,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -204,11 +209,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/groupsGetUserGroups.ts b/src/funcs/groupsGetUserGroups.ts new file mode 100644 index 00000000..4b2975fa --- /dev/null +++ b/src/funcs/groupsGetUserGroups.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Returns all groups that the user is a member of. + */ +export function groupsGetUserGroups( + client: OpalMcpCore, + request: operations.GetUserGroupsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.GroupUserList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetUserGroupsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.GroupUserList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetUserGroupsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + user_id: encodeSimple("user_id", payload.user_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/groups/users/{user_id}")(pathParams); + + const query = encodeFormQuery({ + "cursor": payload.cursor, + "page_size": payload.page_size, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_user_groups", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.GroupUserList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.GroupUserList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/groupsRemoveGroupContainingGroup.ts b/src/funcs/groupsRemoveGroupContainingGroup.ts index 77d4ef22..5173056c 100644 --- a/src/funcs/groupsRemoveGroupContainingGroup.ts +++ b/src/funcs/groupsRemoveGroupContainingGroup.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -95,11 +96,14 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/groups/{group_id}/containing-groups/{containing_group_id}", )(pathParams); + const query = encodeFormQuery({ + "access_level_remote_id": payload.access_level_remote_id, + }); + const headers = new Headers(compactMap({ Accept: "*/*", })); @@ -112,7 +116,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "remove_group_containing_group", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -129,6 +133,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + query: query, body: body, userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, @@ -140,7 +145,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsSetGroupMessageChannels.ts b/src/funcs/groupsSetGroupMessageChannels.ts index 06ea91db..f8327275 100644 --- a/src/funcs/groupsSetGroupMessageChannels.ts +++ b/src/funcs/groupsSetGroupMessageChannels.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -92,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/message-channels")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_group_message_channels", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsSetGroupOnCallSchedules.ts b/src/funcs/groupsSetGroupOnCallSchedules.ts index e9817b05..2878fd0e 100644 --- a/src/funcs/groupsSetGroupOnCallSchedules.ts +++ b/src/funcs/groupsSetGroupOnCallSchedules.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -92,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/on-call-schedules")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_group_on_call_schedules", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsSetGroupResources.ts b/src/funcs/groupsSetGroupResources.ts index dd2d7485..a0679a53 100644 --- a/src/funcs/groupsSetGroupResources.ts +++ b/src/funcs/groupsSetGroupResources.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -91,7 +92,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/resources")(pathParams); const headers = new Headers(compactMap({ @@ -107,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_group_resources", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -135,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsSetGroupReviewerStages.ts b/src/funcs/groupsSetGroupReviewerStages.ts index c6278122..ca6b36e9 100644 --- a/src/funcs/groupsSetGroupReviewerStages.ts +++ b/src/funcs/groupsSetGroupReviewerStages.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/reviewer-stages")(pathParams); const headers = new Headers(compactMap({ @@ -109,7 +109,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_group_reviewer_stages", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -137,7 +137,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsSetGroupReviewers.ts b/src/funcs/groupsSetGroupReviewers.ts index f9e03d3e..862edefa 100644 --- a/src/funcs/groupsSetGroupReviewers.ts +++ b/src/funcs/groupsSetGroupReviewers.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -91,7 +92,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/reviewers")(pathParams); const headers = new Headers(compactMap({ @@ -107,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_group_reviewers", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -135,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsSetGroupVisibility.ts b/src/funcs/groupsSetGroupVisibility.ts index 8d4c1761..f52567c8 100644 --- a/src/funcs/groupsSetGroupVisibility.ts +++ b/src/funcs/groupsSetGroupVisibility.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/visibility")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_group_visibility", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsUpdateGroupUser.ts b/src/funcs/groupsUpdateGroupUser.ts index f996dc09..361f1f9e 100644 --- a/src/funcs/groupsUpdateGroupUser.ts +++ b/src/funcs/groupsUpdateGroupUser.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/groups/{group_id}/users/{user_id}")(pathParams); const headers = new Headers(compactMap({ @@ -109,7 +109,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "update_group_user", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -137,7 +137,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/groupsUpdateGroups.ts b/src/funcs/groupsUpdateGroups.ts index e74d633f..4e908a90 100644 --- a/src/funcs/groupsUpdateGroups.ts +++ b/src/funcs/groupsUpdateGroups.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateGroups", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/idpGroupMappingsCreateIdpGroupMapping.ts b/src/funcs/idpGroupMappingsCreateIdpGroupMapping.ts new file mode 100644 index 00000000..b38b3e6c --- /dev/null +++ b/src/funcs/idpGroupMappingsCreateIdpGroupMapping.ts @@ -0,0 +1,177 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Creates or updates an individual `IdpGroupMapping` object (upsert operation). + * + * **Behavior:** + * - If the mapping doesn't exist, it will be created with the provided values + * - If the mapping exists, only the fields provided in the request will be updated + */ +export function idpGroupMappingsCreateIdpGroupMapping( + client: OpalMcpCore, + request: operations.CreateIdpGroupMappingRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IdpGroupMapping, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.CreateIdpGroupMappingRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IdpGroupMapping, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIdpGroupMappingRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + app_resource_id: encodeSimple("app_resource_id", payload.app_resource_id, { + explode: false, + charEncoding: "percent", + }), + group_id: encodeSimple("group_id", payload.group_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc( + "/idp-group-mappings/{app_resource_id}/groups/{group_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createIdpGroupMapping", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IdpGroupMapping, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.IdpGroupMapping$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/idpGroupMappingsDeleteIdpGroupMappings.ts b/src/funcs/idpGroupMappingsDeleteIdpGroupMappings.ts index 0a958f9e..a6dcff61 100644 --- a/src/funcs/idpGroupMappingsDeleteIdpGroupMappings.ts +++ b/src/funcs/idpGroupMappingsDeleteIdpGroupMappings.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -94,10 +95,9 @@ async function $do( charEncoding: "percent", }), }; - - const path = pathToFunc("/idp-group-mappings/{app_resource_id}/{group_id}/")( - pathParams, - ); + const path = pathToFunc( + "/idp-group-mappings/{app_resource_id}/groups/{group_id}", + )(pathParams); const headers = new Headers(compactMap({ Accept: "*/*", @@ -111,7 +111,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_idp_group_mappings", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -139,7 +139,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/idpGroupMappingsGetIdpGroupMapping.ts b/src/funcs/idpGroupMappingsGetIdpGroupMapping.ts new file mode 100644 index 00000000..af9ca8c8 --- /dev/null +++ b/src/funcs/idpGroupMappingsGetIdpGroupMapping.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Gets an `IdpGroupMapping` object for an Okta app and group. + */ +export function idpGroupMappingsGetIdpGroupMapping( + client: OpalMcpCore, + request: operations.GetIdpGroupMappingRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IdpGroupMapping, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetIdpGroupMappingRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IdpGroupMapping, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIdpGroupMappingRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + app_resource_id: encodeSimple("app_resource_id", payload.app_resource_id, { + explode: false, + charEncoding: "percent", + }), + group_id: encodeSimple("group_id", payload.group_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc( + "/idp-group-mappings/{app_resource_id}/groups/{group_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getIdpGroupMapping", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IdpGroupMapping, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.IdpGroupMapping$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/idpGroupMappingsGetIdpGroupMappings.ts b/src/funcs/idpGroupMappingsGetIdpGroupMappings.ts index 4e7220cd..b4c4e6ed 100644 --- a/src/funcs/idpGroupMappingsGetIdpGroupMappings.ts +++ b/src/funcs/idpGroupMappingsGetIdpGroupMappings.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/idp-group-mappings/{app_resource_id}")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getIdpGroupMappings", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/idpGroupMappingsUpdateIdpGroupMappings.ts b/src/funcs/idpGroupMappingsUpdateIdpGroupMappings.ts index 2bad94c1..cf4ed26c 100644 --- a/src/funcs/idpGroupMappingsUpdateIdpGroupMappings.ts +++ b/src/funcs/idpGroupMappingsUpdateIdpGroupMappings.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/idp-group-mappings/{app_resource_id}")(pathParams); const headers = new Headers(compactMap({ @@ -106,7 +106,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateIdpGroupMappings", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -134,7 +134,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/messageChannelsCreateMessageChannel.ts b/src/funcs/messageChannelsCreateMessageChannel.ts index ca626a8f..b5b20ce9 100644 --- a/src/funcs/messageChannelsCreateMessageChannel.ts +++ b/src/funcs/messageChannelsCreateMessageChannel.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create_message_channel", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/messageChannelsGetMessageChannel.ts b/src/funcs/messageChannelsGetMessageChannel.ts index 5ef01dfb..2d77eded 100644 --- a/src/funcs/messageChannelsGetMessageChannel.ts +++ b/src/funcs/messageChannelsGetMessageChannel.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get message channel by ID + * + * @remarks * Gets a `MessageChannel` object. */ export function messageChannelsGetMessageChannel( @@ -90,7 +94,6 @@ async function $do( { explode: false, charEncoding: "percent" }, ), }; - const path = pathToFunc("/message-channels/{message_channel_id}")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_message_channel", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/messageChannelsGetMessageChannels.ts b/src/funcs/messageChannelsGetMessageChannels.ts index fda90f25..0ed3124b 100644 --- a/src/funcs/messageChannelsGetMessageChannels.ts +++ b/src/funcs/messageChannelsGetMessageChannels.ts @@ -3,6 +3,7 @@ */ import { OpalMcpCore } from "../core.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; @@ -23,6 +24,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get message channels + * + * @remarks * Returns a list of `MessageChannel` objects. */ export function messageChannelsGetMessageChannels( @@ -80,7 +84,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_message_channels", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,7 +111,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/nonHumanIdentitiesGetNhis.ts b/src/funcs/nonHumanIdentitiesGetNhis.ts index 770d0f4e..ee43c4ff 100644 --- a/src/funcs/nonHumanIdentitiesGetNhis.ts +++ b/src/funcs/nonHumanIdentitiesGetNhis.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -114,7 +114,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_nhis", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +143,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -197,11 +198,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/onCallSchedulesCreateOnCallSchedule.ts b/src/funcs/onCallSchedulesCreateOnCallSchedule.ts index 1f48d354..04496af4 100644 --- a/src/funcs/onCallSchedulesCreateOnCallSchedule.ts +++ b/src/funcs/onCallSchedulesCreateOnCallSchedule.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create_on_call_schedule", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/onCallSchedulesGetOnCallSchedule.ts b/src/funcs/onCallSchedulesGetOnCallSchedule.ts index b7883ab5..3442f21b 100644 --- a/src/funcs/onCallSchedulesGetOnCallSchedule.ts +++ b/src/funcs/onCallSchedulesGetOnCallSchedule.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get on call schedule by ID + * + * @remarks * Gets a `OnCallSchedule` object. */ export function onCallSchedulesGetOnCallSchedule( @@ -90,7 +94,6 @@ async function $do( { explode: false, charEncoding: "percent" }, ), }; - const path = pathToFunc("/on-call-schedules/{on_call_schedule_id}")( pathParams, ); @@ -107,7 +110,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_on_call_schedule", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -135,7 +138,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/onCallSchedulesGetOnCallSchedules.ts b/src/funcs/onCallSchedulesGetOnCallSchedules.ts index c17e5394..3634064d 100644 --- a/src/funcs/onCallSchedulesGetOnCallSchedules.ts +++ b/src/funcs/onCallSchedulesGetOnCallSchedules.ts @@ -3,6 +3,7 @@ */ import { OpalMcpCore } from "../core.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; @@ -23,6 +24,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get on call schedules + * + * @remarks * Returns a list of `OnCallSchedule` objects. */ export function onCallSchedulesGetOnCallSchedules( @@ -80,7 +84,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_on_call_schedules", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,7 +111,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/opalQueriesRunOpalQuery.ts b/src/funcs/opalQueriesRunOpalQuery.ts new file mode 100644 index 00000000..c90eda42 --- /dev/null +++ b/src/funcs/opalQueriesRunOpalQuery.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Run an ad-hoc OpalQuery + * + * @remarks + * Runs an ad-hoc OpalQuery and returns the results. Supports NODE queries (users, resources, groups) and ACCESS_PATH queries (principal-to-entitlement access edges). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta. + */ +export function opalQueriesRunOpalQuery( + client: OpalMcpCore, + request: components.RunOpalQueryRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.OpalQueryResults, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: components.RunOpalQueryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.OpalQueryResults, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.RunOpalQueryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/queries/run")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "runOpalQuery", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.OpalQueryResults, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.OpalQueryResults$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ownersCreateOwner.ts b/src/funcs/ownersCreateOwner.ts index 6422e43c..6c525830 100644 --- a/src/funcs/ownersCreateOwner.ts +++ b/src/funcs/ownersCreateOwner.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createOwner", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/ownersDeleteOwner.ts b/src/funcs/ownersDeleteOwner.ts index 64034600..14b742d4 100644 --- a/src/funcs/ownersDeleteOwner.ts +++ b/src/funcs/ownersDeleteOwner.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/owners/{owner_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_owner", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/ownersGetOwner.ts b/src/funcs/ownersGetOwner.ts index b4014757..f09971b3 100644 --- a/src/funcs/ownersGetOwner.ts +++ b/src/funcs/ownersGetOwner.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get owner by ID + * + * @remarks * Returns an `Owner` object. */ export function ownersGetOwner( @@ -89,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/owners/{owner_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getOwner", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/ownersGetOwnerFromName.ts b/src/funcs/ownersGetOwnerFromName.ts index 4f7d4269..7253aba6 100644 --- a/src/funcs/ownersGetOwnerFromName.ts +++ b/src/funcs/ownersGetOwnerFromName.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/owners/name/{owner_name}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getOwnerFromName", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/ownersGetOwnerUsers.ts b/src/funcs/ownersGetOwnerUsers.ts index ab701089..49f49bc1 100644 --- a/src/funcs/ownersGetOwnerUsers.ts +++ b/src/funcs/ownersGetOwnerUsers.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/owners/{owner_id}/users")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_owner_users", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/ownersGetOwners.ts b/src/funcs/ownersGetOwners.ts index 0b35072f..4a89e157 100644 --- a/src/funcs/ownersGetOwners.ts +++ b/src/funcs/ownersGetOwners.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -32,6 +32,9 @@ import { } from "../types/operations.js"; /** + * Get owners + * + * @remarks * Returns a list of `Owner` objects. */ export function ownersGetOwners( @@ -115,7 +118,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_owners", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -144,7 +147,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -198,11 +202,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/ownersSetOwnerUsers.ts b/src/funcs/ownersSetOwnerUsers.ts index e68946dc..c85dfcfc 100644 --- a/src/funcs/ownersSetOwnerUsers.ts +++ b/src/funcs/ownersSetOwnerUsers.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/owners/{owner_id}/users")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_owner_users", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/ownersUpdateOwners.ts b/src/funcs/ownersUpdateOwners.ts index a3000293..d35a9573 100644 --- a/src/funcs/ownersUpdateOwners.ts +++ b/src/funcs/ownersUpdateOwners.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateOwners", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/paladinCreatePaladin.ts b/src/funcs/paladinCreatePaladin.ts new file mode 100644 index 00000000..5460408b --- /dev/null +++ b/src/funcs/paladinCreatePaladin.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create Paladin + * + * @remarks + * Creates a new `Paladin`. + */ +export function paladinCreatePaladin( + client: OpalMcpCore, + request: components.CreatePaladinInfo, + options?: RequestOptions, +): APIPromise< + Result< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: components.CreatePaladinInfo, + options?: RequestOptions, +): Promise< + [ + Result< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreatePaladinInfo$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/paladin")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createPaladin", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Paladin$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/paladinCreatePaladinContextSource.ts b/src/funcs/paladinCreatePaladinContextSource.ts new file mode 100644 index 00000000..be578b82 --- /dev/null +++ b/src/funcs/paladinCreatePaladinContextSource.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add a Paladin context source + * + * @remarks + * Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it. + */ +export function paladinCreatePaladinContextSource( + client: OpalMcpCore, + request: operations.CreatePaladinContextSourceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PaladinContextSource, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.CreatePaladinContextSourceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PaladinContextSource, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreatePaladinContextSourceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.CreatePaladinContextSourceInfo, { + explode: true, + }); + + const pathParams = { + paladin_id: encodeSimple("paladin_id", payload.paladin_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/paladin/{paladin_id}/context-sources")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createPaladinContextSource", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PaladinContextSource, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PaladinContextSource$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/paladinDeletePaladin.ts b/src/funcs/paladinDeletePaladin.ts new file mode 100644 index 00000000..4baed958 --- /dev/null +++ b/src/funcs/paladinDeletePaladin.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete Paladin + * + * @remarks + * Deletes a Paladin, removing the underlying service user. + */ +export function paladinDeletePaladin( + client: OpalMcpCore, + request: operations.DeletePaladinRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.DeletePaladinRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeletePaladinRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + paladin_id: encodeSimple("paladin_id", payload.paladin_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/paladin/{paladin_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deletePaladin", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/paladinDeletePaladinContextSource.ts b/src/funcs/paladinDeletePaladinContextSource.ts new file mode 100644 index 00000000..b744ea17 --- /dev/null +++ b/src/funcs/paladinDeletePaladinContextSource.ts @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Remove a Paladin context source + * + * @remarks + * Removes a context source from a Paladin. + */ +export function paladinDeletePaladinContextSource( + client: OpalMcpCore, + request: operations.DeletePaladinContextSourceRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.DeletePaladinContextSourceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeletePaladinContextSourceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + context_source_id: encodeSimple( + "context_source_id", + payload.context_source_id, + { explode: true, charEncoding: "percent" }, + ), + paladin_id: encodeSimple("paladin_id", payload.paladin_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc( + "/paladin/{paladin_id}/context-sources/{context_source_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deletePaladinContextSource", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/paladinGetPaladin.ts b/src/funcs/paladinGetPaladin.ts new file mode 100644 index 00000000..26d4f154 --- /dev/null +++ b/src/funcs/paladinGetPaladin.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get Paladin by ID + * + * @remarks + * Returns a `Paladin` object. + */ +export function paladinGetPaladin( + client: OpalMcpCore, + request: operations.GetPaladinRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetPaladinRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPaladinRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + paladin_id: encodeSimple("paladin_id", payload.paladin_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/paladin/{paladin_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPaladin", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Paladin$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/paladinGetPaladinFromName.ts b/src/funcs/paladinGetPaladinFromName.ts new file mode 100644 index 00000000..325a6bc9 --- /dev/null +++ b/src/funcs/paladinGetPaladinFromName.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get Paladins by name + * + * @remarks + * Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty. + */ +export function paladinGetPaladinFromName( + client: OpalMcpCore, + request: operations.GetPaladinFromNameRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PaladinList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetPaladinFromNameRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PaladinList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetPaladinFromNameRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + paladin_name: encodeSimple("paladin_name", payload.paladin_name, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/paladin/name/{paladin_name}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getPaladinFromName", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PaladinList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PaladinList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/paladinListPaladinContextSources.ts b/src/funcs/paladinListPaladinContextSources.ts new file mode 100644 index 00000000..2d83f368 --- /dev/null +++ b/src/funcs/paladinListPaladinContextSources.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List Paladin context sources + * + * @remarks + * Returns the context sources (Slack channels and documents) configured for a Paladin. + */ +export function paladinListPaladinContextSources( + client: OpalMcpCore, + request: operations.ListPaladinContextSourcesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PaladinContextSourceList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.ListPaladinContextSourcesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PaladinContextSourceList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListPaladinContextSourcesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + paladin_id: encodeSimple("paladin_id", payload.paladin_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/paladin/{paladin_id}/context-sources")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listPaladinContextSources", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PaladinContextSourceList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PaladinContextSourceList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/paladinUpdatePaladin.ts b/src/funcs/paladinUpdatePaladin.ts new file mode 100644 index 00000000..fb21b1bb --- /dev/null +++ b/src/funcs/paladinUpdatePaladin.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update Paladin + * + * @remarks + * Updates a `Paladin` object. + */ +export function paladinUpdatePaladin( + client: OpalMcpCore, + request: operations.UpdatePaladinRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.UpdatePaladinRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdatePaladinRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.UpdatePaladinInfo, { explode: true }); + + const pathParams = { + paladin_id: encodeSimple("paladin_id", payload.paladin_id, { + explode: true, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/paladin/{paladin_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "updatePaladin", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.Paladin, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.Paladin$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/requestsApproveRequest.ts b/src/funcs/requestsApproveRequest.ts index e7ab7975..c2febe48 100644 --- a/src/funcs/requestsApproveRequest.ts +++ b/src/funcs/requestsApproveRequest.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -88,7 +89,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/requests/{id}/approve")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "approveRequest", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/requestsCreateRequest.ts b/src/funcs/requestsCreateRequest.ts index 5e847eb4..3250f6a7 100644 --- a/src/funcs/requestsCreateRequest.ts +++ b/src/funcs/requestsCreateRequest.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -98,7 +99,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createRequest", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -126,7 +127,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/requestsCreateRequestComment.ts b/src/funcs/requestsCreateRequestComment.ts new file mode 100644 index 00000000..ea676609 --- /dev/null +++ b/src/funcs/requestsCreateRequestComment.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Comment on an access request + */ +export function requestsCreateRequestComment( + client: OpalMcpCore, + request: operations.CreateRequestCommentRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateRequestCommentResponse, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.CreateRequestCommentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateRequestCommentResponse, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateRequestCommentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/requests/{id}/comments")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createRequestComment", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + operations.CreateRequestCommentResponse, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateRequestCommentResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/requestsDenyRequest.ts b/src/funcs/requestsDenyRequest.ts new file mode 100644 index 00000000..70ca8227 --- /dev/null +++ b/src/funcs/requestsDenyRequest.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Deny an access request + */ +export function requestsDenyRequest( + client: OpalMcpCore, + request: operations.DenyRequestRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.DenyRequestResponse, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.DenyRequestRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.DenyRequestResponse, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DenyRequestRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/requests/{id}/deny")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "denyRequest", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + operations.DenyRequestResponse, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.DenyRequestResponse$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/requestsGetRequest.ts b/src/funcs/requestsGetRequest.ts index 5593685a..3ca3c1da 100644 --- a/src/funcs/requestsGetRequest.ts +++ b/src/funcs/requestsGetRequest.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get request by ID + * + * @remarks * Returns a request by ID. */ export function requestsGetRequest( @@ -89,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/requests/{id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getRequest", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/requestsGetRequestComments.ts b/src/funcs/requestsGetRequestComments.ts new file mode 100644 index 00000000..10562f55 --- /dev/null +++ b/src/funcs/requestsGetRequestComments.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Returns a list of comments for a specific request. + */ +export function requestsGetRequestComments( + client: OpalMcpCore, + request: operations.GetRequestCommentsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RequestCommentList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetRequestCommentsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RequestCommentList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetRequestCommentsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/requests/{id}/comments")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getRequestComments", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RequestCommentList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.RequestCommentList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/requestsGetRequests.ts b/src/funcs/requestsGetRequests.ts index b2beb70f..4c7cbc79 100644 --- a/src/funcs/requestsGetRequests.ts +++ b/src/funcs/requestsGetRequests.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -32,6 +32,9 @@ import { } from "../types/operations.js"; /** + * Get requests + * + * @remarks * Returns a list of requests for your organization that is visible by the admin. */ export function requestsGetRequests( @@ -100,9 +103,13 @@ async function $do( const query = encodeFormQuery({ "cursor": payload.cursor, "end_date_filter": payload.end_date_filter, + "group_id": payload.group_id, "page_size": payload.page_size, + "requester_id": payload.requester_id, + "resource_id": payload.resource_id, "show_pending_only": payload.show_pending_only, "start_date_filter": payload.start_date_filter, + "target_user_id": payload.target_user_id, }); const headers = new Headers(compactMap({ @@ -117,7 +124,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getRequests", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -146,7 +153,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -202,11 +210,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "cursor"); + const nextCursor = (responseData as { cursor?: unknown }).cursor; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "requests"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { requests?: unknown }).requests; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/requestsGetRequestsRelay.ts b/src/funcs/requestsGetRequestsRelay.ts index c0ff2964..e478ac2c 100644 --- a/src/funcs/requestsGetRequestsRelay.ts +++ b/src/funcs/requestsGetRequestsRelay.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get requests via Relay + * + * @remarks * Returns a paginated list of requests using Relay-style cursor pagination. * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -109,7 +113,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getRequestsRelay", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -138,7 +142,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesAddResourceNhi.ts b/src/funcs/resourcesAddResourceNhi.ts index 4218dd0c..b02d20f2 100644 --- a/src/funcs/resourcesAddResourceNhi.ts +++ b/src/funcs/resourcesAddResourceNhi.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -94,7 +95,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/resources/{resource_id}/non-human-identities/{non_human_identity_id}", )(pathParams); @@ -112,7 +112,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "add_resource_nhi", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -140,7 +140,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesAddResourceUser.ts b/src/funcs/resourcesAddResourceUser.ts index 00094381..bbfcf147 100644 --- a/src/funcs/resourcesAddResourceUser.ts +++ b/src/funcs/resourcesAddResourceUser.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/users/{user_id}")( pathParams, ); @@ -116,7 +116,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "add_resource_user", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -145,7 +145,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesCreateResource.ts b/src/funcs/resourcesCreateResource.ts index d51101a8..a8b32934 100644 --- a/src/funcs/resourcesCreateResource.ts +++ b/src/funcs/resourcesCreateResource.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "createResource", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesDeleteResource.ts b/src/funcs/resourcesDeleteResource.ts index e6566b9c..a357cba1 100644 --- a/src/funcs/resourcesDeleteResource.ts +++ b/src/funcs/resourcesDeleteResource.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_resource", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesDeleteResourceNhi.ts b/src/funcs/resourcesDeleteResourceNhi.ts index 72175ea5..b5dd49ae 100644 --- a/src/funcs/resourcesDeleteResourceNhi.ts +++ b/src/funcs/resourcesDeleteResourceNhi.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -94,7 +95,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/resources/{resource_id}/non-human-identities/{non_human_identity_id}", )(pathParams); @@ -115,7 +115,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_resource_nhi", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -144,7 +144,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesDeleteResourceUser.ts b/src/funcs/resourcesDeleteResourceUser.ts index 2322967d..f1fd9c49 100644 --- a/src/funcs/resourcesDeleteResourceUser.ts +++ b/src/funcs/resourcesDeleteResourceUser.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/users/{user_id}")( pathParams, ); @@ -114,7 +114,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_resource_user", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +143,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResource.ts b/src/funcs/resourcesGetResource.ts index c028e7ca..fbf4e5f5 100644 --- a/src/funcs/resourcesGetResource.ts +++ b/src/funcs/resourcesGetResource.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get resource by ID + * + * @remarks * Retrieves a resource. */ export function resourcesGetResource( @@ -89,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceGroups.ts b/src/funcs/resourcesGetResourceGroups.ts new file mode 100644 index 00000000..d87a58aa --- /dev/null +++ b/src/funcs/resourcesGetResourceGroups.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Returns a list of groups that grant access to the resource + */ +export function resourcesGetResourceGroups( + client: OpalMcpCore, + request: operations.GetResourceGroupsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.GroupResourceList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetResourceGroupsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.GroupResourceList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetResourceGroupsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + resource_id: encodeSimple("resource_id", payload.resource_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/resources/{resource_id}/groups")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_resource_groups", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.GroupResourceList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.GroupResourceList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/resourcesGetResourceMessageChannels.ts b/src/funcs/resourcesGetResourceMessageChannels.ts index 294db613..64cffa6d 100644 --- a/src/funcs/resourcesGetResourceMessageChannels.ts +++ b/src/funcs/resourcesGetResourceMessageChannels.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/message-channels")( pathParams, ); @@ -107,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource_message_channels", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -135,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceNhis.ts b/src/funcs/resourcesGetResourceNhis.ts index 0d1c8921..45beee10 100644 --- a/src/funcs/resourcesGetResourceNhis.ts +++ b/src/funcs/resourcesGetResourceNhis.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/non-human-identities")( pathParams, ); @@ -110,7 +110,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource_nhis", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -139,7 +139,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceReviewerStages.ts b/src/funcs/resourcesGetResourceReviewerStages.ts index 74dee209..baaea1f2 100644 --- a/src/funcs/resourcesGetResourceReviewerStages.ts +++ b/src/funcs/resourcesGetResourceReviewerStages.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -91,7 +92,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/reviewer-stages")( pathParams, ); @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource_reviewer_stages", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceReviewers.ts b/src/funcs/resourcesGetResourceReviewers.ts index c70c68ef..c5d4f4d8 100644 --- a/src/funcs/resourcesGetResourceReviewers.ts +++ b/src/funcs/resourcesGetResourceReviewers.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/reviewers")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource_reviewers", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceScopedRolePermissions.ts b/src/funcs/resourcesGetResourceScopedRolePermissions.ts index b7ffd24d..7bfa3c26 100644 --- a/src/funcs/resourcesGetResourceScopedRolePermissions.ts +++ b/src/funcs/resourcesGetResourceScopedRolePermissions.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -92,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/scoped-role-permissions")( pathParams, ); @@ -109,7 +109,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource_scoped_role_permissions", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -137,7 +137,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceTags.ts b/src/funcs/resourcesGetResourceTags.ts index 51de6951..3b8dc030 100644 --- a/src/funcs/resourcesGetResourceTags.ts +++ b/src/funcs/resourcesGetResourceTags.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/tags")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource_tags", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceUser.ts b/src/funcs/resourcesGetResourceUser.ts index 8624d9e7..bca82192 100644 --- a/src/funcs/resourcesGetResourceUser.ts +++ b/src/funcs/resourcesGetResourceUser.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -25,6 +26,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get resource user + * + * @remarks * Returns information about a specific user's access to a resource. */ export function resourcesGetResourceUser( @@ -92,7 +96,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/users/{user_id}")( pathParams, ); @@ -113,7 +116,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getResourceUser", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -142,7 +145,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["404", "4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceUsers.ts b/src/funcs/resourcesGetResourceUsers.ts index 45f10269..b30c2ffe 100644 --- a/src/funcs/resourcesGetResourceUsers.ts +++ b/src/funcs/resourcesGetResourceUsers.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get resource users + * + * @remarks * Gets the list of users for this resource. */ export function resourcesGetResourceUsers( @@ -89,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/users")(pathParams); const query = encodeFormQuery({ @@ -108,7 +111,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource_users", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -137,7 +140,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResourceVisibility.ts b/src/funcs/resourcesGetResourceVisibility.ts index 70304d74..36a6366b 100644 --- a/src/funcs/resourcesGetResourceVisibility.ts +++ b/src/funcs/resourcesGetResourceVisibility.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/visibility")(pathParams); const headers = new Headers(compactMap({ @@ -105,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_resource_visibility", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +133,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesGetResources.ts b/src/funcs/resourcesGetResources.ts index f598c5cb..b581b541 100644 --- a/src/funcs/resourcesGetResources.ts +++ b/src/funcs/resourcesGetResources.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery, queryJoin } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -32,6 +32,9 @@ import { } from "../types/operations.js"; /** + * Get resources + * + * @remarks * Returns a list of resources for your organization. */ export function resourcesGetResources( @@ -106,8 +109,10 @@ async function $do( encodeFormQuery({ "cursor": payload.cursor, "page_size": payload.page_size, + "remote_id": payload.remote_id, "resource_name": payload.resource_name, "resource_type_filter": payload.resource_type_filter, + "tag_ids": payload.tag_ids, }), ); @@ -123,7 +128,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getResources", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -152,7 +157,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -208,11 +214,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/resourcesGetUserResources.ts b/src/funcs/resourcesGetUserResources.ts new file mode 100644 index 00000000..a3bb1953 --- /dev/null +++ b/src/funcs/resourcesGetUserResources.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Gets the list of resources for this user. + */ +export function resourcesGetUserResources( + client: OpalMcpCore, + request: operations.GetUserResourcesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ResourceAccessUserList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetUserResourcesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ResourceAccessUserList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetUserResourcesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + user_id: encodeSimple("user_id", payload.user_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/resources/users/{user_id}")(pathParams); + + const query = encodeFormQuery({ + "cursor": payload.cursor, + "include_unmanaged": payload.include_unmanaged, + "limit": payload.limit, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_user_resources", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ResourceAccessUserList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.ResourceAccessUserList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/resourcesResourceUserAccessStatusRetrieve.ts b/src/funcs/resourcesResourceUserAccessStatusRetrieve.ts index 1788a1e0..2e97c09c 100644 --- a/src/funcs/resourcesResourceUserAccessStatusRetrieve.ts +++ b/src/funcs/resourcesResourceUserAccessStatusRetrieve.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -98,7 +99,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/resource-user-access-status/{resource_id}/{user_id}", )(pathParams); @@ -121,7 +121,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "resource_user_access_status_retrieve", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -150,7 +150,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesSetResourceMessageChannels.ts b/src/funcs/resourcesSetResourceMessageChannels.ts index b7805d87..e527d0d8 100644 --- a/src/funcs/resourcesSetResourceMessageChannels.ts +++ b/src/funcs/resourcesSetResourceMessageChannels.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -92,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/message-channels")( pathParams, ); @@ -110,7 +110,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_resource_message_channels", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -138,7 +138,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesSetResourceReviewerStages.ts b/src/funcs/resourcesSetResourceReviewerStages.ts index 5c9308b3..baa2e33b 100644 --- a/src/funcs/resourcesSetResourceReviewerStages.ts +++ b/src/funcs/resourcesSetResourceReviewerStages.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -91,7 +92,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/reviewer-stages")( pathParams, ); @@ -109,7 +109,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_resource_reviewer_stages", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -137,7 +137,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesSetResourceReviewers.ts b/src/funcs/resourcesSetResourceReviewers.ts index 705fe705..b365e51a 100644 --- a/src/funcs/resourcesSetResourceReviewers.ts +++ b/src/funcs/resourcesSetResourceReviewers.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/reviewers")(pathParams); const headers = new Headers(compactMap({ @@ -106,7 +106,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_resource_reviewers", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -134,7 +134,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesSetResourceScopedRolePermissions.ts b/src/funcs/resourcesSetResourceScopedRolePermissions.ts index 9e6d3384..8960ad4f 100644 --- a/src/funcs/resourcesSetResourceScopedRolePermissions.ts +++ b/src/funcs/resourcesSetResourceScopedRolePermissions.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -94,7 +95,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/scoped-role-permissions")( pathParams, ); @@ -112,7 +112,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_resource_scoped_role_permissions", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -140,7 +140,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesSetResourceVisibility.ts b/src/funcs/resourcesSetResourceVisibility.ts index 25008a22..8dd163d3 100644 --- a/src/funcs/resourcesSetResourceVisibility.ts +++ b/src/funcs/resourcesSetResourceVisibility.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -90,7 +91,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/visibility")(pathParams); const headers = new Headers(compactMap({ @@ -106,7 +106,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set_resource_visibility", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -134,7 +134,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesUpdateResourceUser.ts b/src/funcs/resourcesUpdateResourceUser.ts index 6ddcf0d3..e649293a 100644 --- a/src/funcs/resourcesUpdateResourceUser.ts +++ b/src/funcs/resourcesUpdateResourceUser.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/resources/{resource_id}/users/{user_id}")( pathParams, ); @@ -111,7 +111,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "update_resource_user", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -139,7 +139,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/resourcesUpdateResources.ts b/src/funcs/resourcesUpdateResources.ts index 1bb2c986..cbce16af 100644 --- a/src/funcs/resourcesUpdateResources.ts +++ b/src/funcs/resourcesUpdateResources.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -97,7 +98,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateResources", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +126,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/sessionsSessions.ts b/src/funcs/sessionsSessions.ts index 1ad54cf8..6a0b7340 100644 --- a/src/funcs/sessionsSessions.ts +++ b/src/funcs/sessionsSessions.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -102,7 +103,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "sessions", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -131,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsAddGroupTag.ts b/src/funcs/tagsAddGroupTag.ts index f73af15f..37488184 100644 --- a/src/funcs/tagsAddGroupTag.ts +++ b/src/funcs/tagsAddGroupTag.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tags/{tag_id}/groups/{group_id}")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "add_group_tag", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsAddResourceTag.ts b/src/funcs/tagsAddResourceTag.ts index 9006a174..0d1366b4 100644 --- a/src/funcs/tagsAddResourceTag.ts +++ b/src/funcs/tagsAddResourceTag.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tags/{tag_id}/resources/{resource_id}")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "add_resource_tag", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsAddUserTag.ts b/src/funcs/tagsAddUserTag.ts index a7764233..5d6f6c2b 100644 --- a/src/funcs/tagsAddUserTag.ts +++ b/src/funcs/tagsAddUserTag.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tags/{tag_id}/users/{user_id}")(pathParams); const headers = new Headers(compactMap({ @@ -109,7 +109,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "add_user_tag", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -137,7 +137,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsCreateTag.ts b/src/funcs/tagsCreateTag.ts index abfeeadb..4c343614 100644 --- a/src/funcs/tagsCreateTag.ts +++ b/src/funcs/tagsCreateTag.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery, encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -104,7 +105,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create_tag", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -133,7 +134,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsDeleteTagByID.ts b/src/funcs/tagsDeleteTagByID.ts index 0d39e3f9..512d4e8c 100644 --- a/src/funcs/tagsDeleteTagByID.ts +++ b/src/funcs/tagsDeleteTagByID.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tag/{tag_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_tag_by_ID", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsGetTag.ts b/src/funcs/tagsGetTag.ts index 08725e60..997d16b6 100644 --- a/src/funcs/tagsGetTag.ts +++ b/src/funcs/tagsGetTag.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -102,7 +103,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_tag", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -131,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsGetTagByID.ts b/src/funcs/tagsGetTagByID.ts index 63c37cbb..c2e6c531 100644 --- a/src/funcs/tagsGetTagByID.ts +++ b/src/funcs/tagsGetTagByID.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,6 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get tag by ID + * + * @remarks * UNSTABLE. May be removed at any time. Gets a tag with the given id. */ export function tagsGetTagByID( @@ -89,7 +93,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tag/{tag_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_tag_by_ID", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +135,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsGetTags.ts b/src/funcs/tagsGetTags.ts index 3dbd9acc..e550e7c5 100644 --- a/src/funcs/tagsGetTags.ts +++ b/src/funcs/tagsGetTags.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -32,6 +32,9 @@ import { } from "../types/operations.js"; /** + * Get tags + * + * @remarks * Returns a list of tags created by your organization. */ export function tagsGetTags( @@ -114,7 +117,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getTags", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +146,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -197,11 +201,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/tagsRemoveGroupTag.ts b/src/funcs/tagsRemoveGroupTag.ts index 2ad84714..e92b3861 100644 --- a/src/funcs/tagsRemoveGroupTag.ts +++ b/src/funcs/tagsRemoveGroupTag.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tags/{tag_id}/groups/{group_id}")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "remove_group_tag", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsRemoveResourceTag.ts b/src/funcs/tagsRemoveResourceTag.ts index 6c0a838e..b7d8a959 100644 --- a/src/funcs/tagsRemoveResourceTag.ts +++ b/src/funcs/tagsRemoveResourceTag.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tags/{tag_id}/resources/{resource_id}")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "remove_resource_tag", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tagsRemoveUserTag.ts b/src/funcs/tagsRemoveUserTag.ts index 20116a1b..67a6795b 100644 --- a/src/funcs/tagsRemoveUserTag.ts +++ b/src/funcs/tagsRemoveUserTag.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -93,7 +94,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tags/{tag_id}/users/{user_id}")(pathParams); const headers = new Headers(compactMap({ @@ -108,7 +108,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "remove_user_tag", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -136,7 +136,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/tokensDeleteToken.ts b/src/funcs/tokensDeleteToken.ts new file mode 100644 index 00000000..359e3cc5 --- /dev/null +++ b/src/funcs/tokensDeleteToken.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { OpalMcpCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete token + * + * @remarks + * Deletes a first-party API token. Admins can delete any token. Non-admins can only delete their own tokens when the organization allows all users to create API tokens. + */ +export function tokensDeleteToken( + client: OpalMcpCore, + request: operations.DeleteTokenRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.DeleteTokenRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteTokenRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + token_id: encodeSimple("token_id", payload.token_id, { + explode: false, + charEncoding: "percent", + }), + }; + const path = pathToFunc("/tokens/{token_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "deleteToken", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(200, z.void()), + M.fail([403, 404, "4XX"]), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tokensGetTokens.ts b/src/funcs/tokensGetTokens.ts new file mode 100644 index 00000000..46e64b6b --- /dev/null +++ b/src/funcs/tokensGetTokens.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeFormQuery, queryJoin } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get tokens + * + * @remarks + * Returns a list of first-party API tokens for your organization. Requires admin access. + */ +export function tokensGetTokens( + client: OpalMcpCore, + request: operations.GetTokensRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PaginatedTokensList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetTokensRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PaginatedTokensList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetTokensRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/tokens")(); + + const query = queryJoin( + encodeFormQuery({ + "token_ids": payload.token_ids, + }, { explode: false }), + encodeFormQuery({ + "cursor": payload.cursor, + "page_size": payload.page_size, + "user_id": payload.user_id, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getTokens", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PaginatedTokensList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PaginatedTokensList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/uarsCreateUar.ts b/src/funcs/uarsCreateUar.ts index e0e037b0..41b90b52 100644 --- a/src/funcs/uarsCreateUar.ts +++ b/src/funcs/uarsCreateUar.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -25,7 +26,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Starts a User Access Review. + * Starts a User Access Review. Deprecated in favor of `POST /campaigns`. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ export function uarsCreateUar( client: OpalMcpCore, @@ -97,7 +100,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create_uar", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -125,7 +128,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/uarsGetUARs.ts b/src/funcs/uarsGetUARs.ts index ec1fd850..84916125 100644 --- a/src/funcs/uarsGetUARs.ts +++ b/src/funcs/uarsGetUARs.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -32,7 +32,9 @@ import { } from "../types/operations.js"; /** - * Returns a list of `UAR` objects. + * Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ export function uarsGetUARs( client: OpalMcpCore, @@ -114,7 +116,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getUARs", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +145,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -197,11 +200,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/uarsGetUar.ts b/src/funcs/uarsGetUar.ts index 4c4194cb..865b0585 100644 --- a/src/funcs/uarsGetUar.ts +++ b/src/funcs/uarsGetUar.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -26,7 +27,9 @@ import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Retrieves a specific UAR. + * Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ export function uarsGetUar( client: OpalMcpCore, @@ -89,7 +92,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/uar/{uar_id}")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +106,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_uar", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +134,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/usersGetRemoteUsers.ts b/src/funcs/usersGetRemoteUsers.ts new file mode 100644 index 00000000..cabca6eb --- /dev/null +++ b/src/funcs/usersGetRemoteUsers.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Returns a list of remote users for your organization. + */ +export function usersGetRemoteUsers( + client: OpalMcpCore, + request: operations.GetRemoteUsersRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PaginatedRemoteUsersList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpalMcpCore, + request: operations.GetRemoteUsersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PaginatedRemoteUsersList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetRemoteUsersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/users/remote_users")(); + + const query = encodeFormQuery({ + "cursor": payload.cursor, + "page_size": payload.page_size, + "remote_id": payload.remote_id, + "third_party_provider": payload.third_party_provider, + "user_id": payload.user_id, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getRemoteUsers", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PaginatedRemoteUsersList, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PaginatedRemoteUsersList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/usersGetUserTags.ts b/src/funcs/usersGetUserTags.ts index c4a2d1fb..13d99376 100644 --- a/src/funcs/usersGetUserTags.ts +++ b/src/funcs/usersGetUserTags.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -89,7 +90,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/users/{user_id}/tags")(pathParams); const headers = new Headers(compactMap({ @@ -104,7 +104,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_user_tags", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -132,7 +132,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/funcs/usersGetUserWhoami.ts b/src/funcs/usersGetUserWhoami.ts new file mode 100644 index 00000000..396489d8 --- /dev/null +++ b/src/funcs/usersGetUserWhoami.ts @@ -0,0 +1,141 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpalMcpCore } from "../core.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { OpalMcpError } from "../models/errors/opalmcperror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Returns the user that the provided API token authenticates as. + */ +export function usersGetUserWhoami( + client: OpalMcpCore, + options?: RequestOptions, +): APIPromise< + Result< + components.User, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: OpalMcpCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.User, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/users/whoami")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.bearerAuth); + const securityInput = secConfig == null ? {} : { bearerAuth: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getUserWhoami", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.bearerAuth, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.User, + | OpalMcpError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.User$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/usersGetUsers.ts b/src/funcs/usersGetUsers.ts index d8dfce24..d5cda8aa 100644 --- a/src/funcs/usersGetUsers.ts +++ b/src/funcs/usersGetUsers.ts @@ -3,8 +3,8 @@ */ import { OpalMcpCore } from "../core.js"; -import { dlv } from "../lib/dlv.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -100,6 +100,7 @@ async function $do( const query = encodeFormQuery({ "cursor": payload.cursor, "page_size": payload.page_size, + "tag_ids": payload.tag_ids, }); const headers = new Headers(compactMap({ @@ -114,7 +115,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getUsers", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +144,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -197,11 +199,14 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const nextCursor = dlv(responseData, "next"); + const nextCursor = (responseData as { next?: unknown | null }).next; if (typeof nextCursor !== "string") { return { next: () => null }; } - const results = dlv(responseData, "results"); + if (nextCursor.trim() === "") { + return { next: () => null }; + } + const results = (responseData as { results: unknown }).results; if (!Array.isArray(results) || !results.length) { return { next: () => null }; } diff --git a/src/funcs/usersUser.ts b/src/funcs/usersUser.ts index bd65cb00..5eb6400c 100644 --- a/src/funcs/usersUser.ts +++ b/src/funcs/usersUser.ts @@ -4,6 +4,7 @@ import { OpalMcpCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; @@ -114,7 +115,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "user", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +144,8 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["4XX", "5XX"], + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 8bfe4fe8..5ffda46a 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -15,6 +15,7 @@ export type HookContext = { retryConfig: RetryConfig; resolvedSecurity: SecurityState | null; options: SDKOptions; + timeoutMs?: number; }; export type Awaitable = T | Promise; diff --git a/src/lib/base64.ts b/src/lib/base64.ts index c2d5b389..0aebd8b0 100644 --- a/src/lib/base64.ts +++ b/src/lib/base64.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export function bytesToBase64(u8arr: Uint8Array): string { return btoa(String.fromCodePoint(...u8arr)); diff --git a/src/lib/config.ts b/src/lib/config.ts index 4e05c8b9..deb0b41d 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0", - sdkVersion: "0.7.0", - genVersion: "2.667.0", - userAgent: "speakeasy-sdk/typescript 0.7.0 2.667.0 1.0 opal-mcp", + sdkVersion: "0.8.0", + genVersion: "2.931.0", + userAgent: "speakeasy-sdk/typescript 0.8.0 2.931.0 1.0 opal-mcp", } as const; diff --git a/src/lib/dlv.ts b/src/lib/dlv.ts deleted file mode 100644 index e81091f5..00000000 --- a/src/lib/dlv.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -/* -MIT License - -Copyright (c) 2024 Jason Miller (http://jasonformat.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -/** - * @param obj The object to walk - * @param key The key path to walk the object with - * @param def A default value to return if the result is undefined - * - * @example - * dlv(obj, "a.b.c.d") - * @example - * dlv(object, ["a", "b", "c", "d"]) - * @example - * dlv(object, "foo.bar.baz", "Hello, default value!") - */ -export function dlv( - obj: any, - key: string | string[], - def?: T, - p?: number, - undef?: never, -): T | undefined { - key = Array.isArray(key) ? key : key.split("."); - for (p = 0; p < key.length; p++) { - const k = key[p]; - obj = k != null && obj ? obj[k] : undef; - } - return obj === undef ? def : obj; -} diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 25c9dcba..dcab511b 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -3,7 +3,7 @@ */ import { bytesToBase64 } from "./base64.js"; -import { isPlainObject } from "./is-plain-object.js"; +import { isPlainObject } from "./primitives.js"; export class EncodingError extends Error { constructor(message: string) { @@ -102,8 +102,9 @@ export function encodeLabel( }); encValue = mapped?.join("").slice(1); } else { - const k = - options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + const k = options?.explode && isPlainObject(value) + ? `${encodeString(pk)}=` + : ""; encValue = `${k}${encodeValue(pv)}`; } @@ -426,6 +427,7 @@ export function queryJoin(...args: (string | undefined)[]): string { type QueryEncoderOptions = { explode?: boolean; charEncoding?: "percent" | "none"; + allowEmptyValue?: string[]; }; type QueryEncoder = ( @@ -440,7 +442,7 @@ type BulkQueryEncoder = ( ) => string; export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { - const bulkEncode = function ( + const bulkEncode = function( values: Record, options?: QueryEncoderOptions, ): string { @@ -450,7 +452,19 @@ export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { charEncoding: options?.charEncoding ?? "percent", }; + const allowEmptySet = new Set(options?.allowEmptyValue ?? []); + const encoded = Object.entries(values).map(([key, value]) => { + if (allowEmptySet.has(key)) { + if ( + value === undefined + || value === null + || value === "" + || (Array.isArray(value) && value.length === 0) + ) { + return `${encodeURIComponent(key)}=`; + } + } return f(key, value, opts); }); return queryJoin(...encoded); @@ -465,6 +479,23 @@ export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); +function isBlobLike(val: unknown): val is Blob { + if (val instanceof Blob) { + return true; + } + + if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { + return false; + } + + const tag = val[Symbol.toStringTag]; + if (tag !== "Blob" && tag !== "File") { + return false; + } + + return "stream" in val && typeof val.stream === "function"; +} + export function appendForm( fd: FormData, key: string, @@ -473,11 +504,22 @@ export function appendForm( ): void { if (value == null) { return; - } else if (value instanceof Blob && fileName) { - fd.append(key, value, fileName); - } else if (value instanceof Blob) { - fd.append(key, value); + } else if (isBlobLike(value)) { + if (fileName) { + fd.append(key, value as Blob, fileName); + } else { + fd.append(key, value as Blob); + } } else { fd.append(key, String(value)); } } + +export async function normalizeBlob( + value: Pick, +): Promise { + if (value instanceof Blob) { + return value; + } + return new Blob([await value.arrayBuffer()], { type: value.type }); +} diff --git a/src/lib/env.ts b/src/lib/env.ts index 4ac220c5..15b0675b 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -2,9 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { dlv } from "./dlv.js"; - -import * as z from "zod"; +import * as z from "zod/v3"; export interface Env { OPALMCP_BEARER_AUTH?: string | undefined; @@ -18,6 +16,18 @@ export const envSchema: z.ZodType = z.object({ OPALMCP_DEBUG: z.coerce.boolean().optional(), }); +/** + * Checks for the existence of the Deno global object to determine the environment. + * @returns {boolean} True if the runtime is Deno, false otherwise. + */ +function isDeno() { + if ("Deno" in globalThis) { + return true; + } + + return false; +} + let envMemo: Env | undefined = undefined; /** * Reads and validates environment variables. @@ -27,9 +37,19 @@ export function env(): Env { return envMemo; } - envMemo = envSchema.parse( - dlv(globalThis, "process.env") ?? dlv(globalThis, "Deno.env") ?? {}, - ); + const globals = globalThis as { + Deno?: { env?: { toObject?: () => Record } }; + process?: { env?: Record }; + }; + + let envObject: Record = {}; + if (isDeno()) { + envObject = globals.Deno?.env?.toObject?.() ?? {}; + } else { + envObject = globals.process?.env ?? {}; + } + + envMemo = envSchema.parse(envObject); return envMemo; } diff --git a/src/lib/files.ts b/src/lib/files.ts index 0344cd04..6ca6b37d 100644 --- a/src/lib/files.ts +++ b/src/lib/files.ts @@ -80,3 +80,25 @@ export function getContentTypeFromFileName(fileName: string): string | null { return mimeTypes[ext] || null; } + +/** + * Creates a Blob from file content with the given MIME type. + * + * Node.js Buffers are Uint8Array subclasses that may share a pooled + * ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing + * such a Buffer directly to `new Blob([buf])` can include the entire + * underlying pool on some runtimes, producing a Blob with extra bytes + * that corrupts multipart uploads. + * + * Copying into a standalone Uint8Array ensures the Blob receives only the + * intended bytes regardless of runtime behaviour. + */ +export function bytesToBlob( + content: Uint8Array | ArrayBuffer | Blob | string, + contentType: string, +): Blob { + if (content instanceof Uint8Array) { + return new Blob([new Uint8Array(content)], { type: contentType }); + } + return new Blob([content as BlobPart], { type: contentType }); +} diff --git a/src/lib/http.ts b/src/lib/http.ts index 13cf1fd7..6b7a6cf3 100644 --- a/src/lib/http.ts +++ b/src/lib/http.ts @@ -45,8 +45,10 @@ export class HTTPClient { private requestHooks: BeforeRequestHook[] = []; private requestErrorHooks: RequestErrorHook[] = []; private responseHooks: ResponseHook[] = []; + private options: HTTPClientOptions; - constructor(private options: HTTPClientOptions = {}) { + constructor(options: HTTPClientOptions = {}) { + this.options = options; this.fetcher = options.fetcher || DEFAULT_FETCHER; } diff --git a/src/lib/is-plain-object.ts b/src/lib/is-plain-object.ts deleted file mode 100644 index 61070d3d..00000000 --- a/src/lib/is-plain-object.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -/* -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js - -export function isPlainObject(value: unknown): value is object { - if (typeof value !== "object" || value === null) { - return false; - } - - const prototype = Object.getPrototypeOf(value); - return ( - (prototype === null || - prototype === Object.prototype || - Object.getPrototypeOf(prototype) === null) && - !(Symbol.toStringTag in value) && - !(Symbol.iterator in value) - ); -} diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index 77d41086..efc0928a 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -6,7 +6,7 @@ import { APIError } from "../models/errors/apierror.js"; import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { ERR, OK, Result } from "../types/fp.js"; import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; -import { isPlainObject } from "./is-plain-object.js"; +import { isPlainObject } from "./primitives.js"; export type Encoding = | "jsonl" @@ -248,8 +248,9 @@ export function match( raw = body; break; default: - encoding satisfies never; - throw new Error(`Unsupported response type: ${encoding}`); + throw new Error( + `Unsupported response type: ${encoding satisfies never}`, + ); } if (matcher.enc === "fail") { diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts index d21f1dc4..8ce65db0 100644 --- a/src/lib/primitives.ts +++ b/src/lib/primitives.ts @@ -148,3 +148,19 @@ export function allRequired>( return v as ReturnType>; } + +export function isPlainObject( + value: unknown, +): value is Record { + if (value === null || typeof value !== "object") return false; + if (Object.prototype.toString.call(value) !== "[object Object]") return false; + const proto = Object.getPrototypeOf(value); + if (proto === null || proto === Object.prototype) return true; + // cross-realm plain objects (vm contexts, iframes) inherit from a + // different realm's Object.prototype, which itself has a null prototype + try { + return Object.getPrototypeOf(proto) === null; + } catch { + return false; + } +} diff --git a/src/lib/retries.ts b/src/lib/retries.ts index e3ce9aba..21a647e1 100644 --- a/src/lib/retries.ts +++ b/src/lib/retries.ts @@ -194,6 +194,14 @@ async function retryBackoff( } function retryIntervalFromResponse(res: Response): number { + const retryAfterMsVal = res.headers.get("retry-after-ms"); + if (retryAfterMsVal) { + const parsedMs = Number(retryAfterMsVal); + if (Number.isFinite(parsedMs) && parsedMs >= 0) { + return parsedMs; + } + } + const retryVal = res.headers.get("retry-after") || ""; if (!retryVal) { return 0; diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 0e340b7e..47edb972 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -9,7 +9,7 @@ import { ZodObject, ZodRawShape, ZodTypeAny, -} from "zod"; +} from "zod/v3"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { ERR, OK, Result } from "../types/fp.js"; diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 9e39e42a..daa4b07b 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -22,9 +22,9 @@ import { isConnectionError, isTimeoutError, matchContentType, - matchStatusCode, } from "./http.js"; import { Logger } from "./logger.js"; +import { combineSignals } from "./primitives.js"; import { retry, RetryConfig } from "./retries.js"; import { SecurityState } from "./security.js"; @@ -128,30 +128,60 @@ export class ClientSDK { if (!base) { return ERR(new InvalidRequestError("No base URL provided for operation")); } - const reqURL = new URL(base); - const inputURL = new URL(path, reqURL); - + const baseURL = new URL(base); + let reqURL: URL; if (path) { - reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/"; - reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/"; + reqURL = new URL(path, baseURL); + if (!reqURL.search && baseURL.search) { + reqURL.search = baseURL.search; + } + } else { + reqURL = baseURL; } + reqURL.hash = ""; - let finalQuery = query || ""; - - const secQuery: string[] = []; - for (const [k, v] of Object.entries(security?.queryParams || {})) { - const q = encodeForm(k, v, { charEncoding: "percent" }); - if (typeof q !== "undefined") { - secQuery.push(q); + // Appends already-encoded query pairs to a query string, replacing any + // existing pairs with the same key so later sources take precedence. + const mergeQuery = (current: string, additions: string): string => { + if (!additions) { + return current; } - } - if (secQuery.length) { - finalQuery += `&${secQuery.join("&")}`; - } + const additionKeys = new Set( + additions + .split("&") + .filter((pair) => pair !== "") + .map((pair) => pair.split("=")[0] ?? ""), + ); + const kept = current.split("&").filter((pair) => { + return pair !== "" && !additionKeys.has(pair.split("=")[0] ?? ""); + }); + return [...kept, additions].join("&"); + }; + + const encodeQueryRecord = (record: Record): string => { + return Object.entries(record) + .map(([k, v]) => { + if (v == null) { + return undefined; + } + const value = v; + return encodeForm(k, value, { + explode: Array.isArray(value), + charEncoding: "percent", + }); + }) + .filter((pair): pair is string => typeof pair !== "undefined") + .join("&"); + }; + + const finalQuery = [ + query || "", + encodeQueryRecord(security?.queryParams || {}), + ].reduce(mergeQuery, reqURL.search.slice(1)); if (finalQuery) { - const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q}`; + reqURL.search = `?${finalQuery}`; } const headers = new Headers(opHeaders); @@ -197,9 +227,8 @@ export class ClientSDK { ...options?.fetchOptions, ...options, }; - if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { - const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - fetchOptions.signal = timeoutSignal; + if (!fetchOptions?.signal && conf.timeoutMs != null && conf.timeoutMs > 0) { + context.timeoutMs = conf.timeoutMs; } if (conf.body instanceof ReadableStream) { @@ -232,7 +261,7 @@ export class ClientSDK { request: Request, options: { context: HookContext; - errorCodes: number | string | (number | string)[]; + isErrorStatusCode: (statusCode: number) => boolean; retryConfig: RetryConfig; retryCodes: string[]; }, @@ -245,11 +274,20 @@ export class ClientSDK { | UnexpectedClientError > > { - const { context, errorCodes } = options; + const { context, isErrorStatusCode } = options; + const timeoutMs = context.timeoutMs; return retry( async () => { - const req = await this.#hooks.beforeRequest(context, request.clone()); + const cloned = request.clone(); + let attempt = cloned; + if (timeoutMs != null && timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(timeoutMs); + const combined = combineSignals(cloned.signal, timeoutSignal) + ?? timeoutSignal; + attempt = new Request(cloned, { signal: combined }); + } + const req = await this.#hooks.beforeRequest(context, attempt); await logRequest(this.#logger, req).catch((e) => this.#logger?.log("Failed to log request:", e) ); @@ -257,7 +295,7 @@ export class ClientSDK { let response = await this.#httpClient.request(req); try { - if (matchStatusCode(response, errorCodes)) { + if (isErrorStatusCode(response.status)) { const result = await this.#hooks.afterError( context, response, @@ -308,9 +346,9 @@ export class ClientSDK { } } -const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/; +const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/; const jsonlLikeContentTypeRE = - /(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/; + /^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/; async function logRequest(logger: Logger | undefined, req: Request) { if (!logger) { return; @@ -381,8 +419,6 @@ async function logResponse( break; case matchContentType(res, "application/jsonl") || jsonlLikeContentTypeRE.test(ct): - logger.log(await res.clone().text()); - break; case matchContentType(res, "text/event-stream"): logger.log(`<${contentType}>`); break; diff --git a/src/lib/security.ts b/src/lib/security.ts index 093d179d..166661ba 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -13,17 +13,22 @@ type OAuth2PasswordFlow = { tokenURL: string; }; -export enum SecurityErrorCode { - Incomplete = "incomplete", - UnrecognisedSecurityType = "unrecognized_security_type", -} +export const SecurityErrorCode = { + Incomplete: "incomplete", + UnrecognisedSecurityType: "unrecognized_security_type", +} as const; +export type SecurityErrorCode = + (typeof SecurityErrorCode)[keyof typeof SecurityErrorCode]; export class SecurityError extends Error { + public code: SecurityErrorCode; + constructor( - public code: SecurityErrorCode, + code: SecurityErrorCode, message: string, ) { super(message); + this.code = code; this.name = "SecurityError"; } @@ -84,7 +89,10 @@ type SecurityInputOAuth2 = { type SecurityInputOAuth2ClientCredentials = { type: "oauth2:client_credentials"; value: - | { clientID?: string | undefined; clientSecret?: string | undefined } + | { + clientID?: string | undefined; + clientSecret?: string | undefined; + } | null | string | undefined; @@ -195,8 +203,7 @@ export function resolveSecurity( applyBearer(state, spec); break; default: - spec satisfies never; - throw SecurityError.unrecognizedType(type); + throw SecurityError.unrecognizedType((spec satisfies never, type)); } }); @@ -238,8 +245,9 @@ function applyBearer( export function resolveGlobalSecurity( security: Partial | null | undefined, + allowedFields?: number[], ): SecurityState | null { - return resolveSecurity( + let inputs: SecurityInput[][] = [ [ { fieldName: "Authorization", @@ -247,7 +255,18 @@ export function resolveGlobalSecurity( value: security?.bearerAuth ?? env().OPALMCP_BEARER_AUTH, }, ], - ); + ]; + + if (allowedFields) { + inputs = allowedFields.map((i) => { + if (i < 0 || i >= inputs.length) { + throw new RangeError(`invalid allowedFields index ${i}`); + } + return inputs[i]!; + }); + } + + return resolveSecurity(...inputs); } export async function extractSecurity< diff --git a/src/lib/url.ts b/src/lib/url.ts index 6bc6356e..79e7ce66 100644 --- a/src/lib/url.ts +++ b/src/lib/url.ts @@ -10,24 +10,26 @@ export function pathToFunc( pathPattern: string, options?: { charEncoding?: "percent" | "none" }, ): (params?: Params) => string { - const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g; return function buildURLPath(params: Record = {}): string { - return pathPattern.replace(paramRE, function (_, placeholder) { - if (!hasOwn.call(params, placeholder)) { - throw new Error(`Parameter '${placeholder}' is required`); - } + return pathPattern + .replace(paramRE, function (_, placeholder) { + if (!hasOwn.call(params, placeholder)) { + throw new Error(`Parameter '${placeholder}' is required`); + } - const value = params[placeholder]; - if (typeof value !== "string" && typeof value !== "number") { - throw new Error( - `Parameter '${placeholder}' must be a string or number`, - ); - } + const value = params[placeholder]; + if (typeof value !== "string" && typeof value !== "number") { + throw new Error( + `Parameter '${placeholder}' must be a string or number`, + ); + } - return options?.charEncoding === "percent" - ? encodeURIComponent(`${value}`) - : `${value}`; - }); + return options?.charEncoding === "percent" + ? encodeURIComponent(`${value}`) + : `${value}`; + }) + .replace(/^\/+/, ""); }; } diff --git a/src/mcp-server/cli/start/command.ts b/src/mcp-server/cli/start/command.ts index 1e29d61a..6b5bf7c3 100644 --- a/src/mcp-server/cli/start/command.ts +++ b/src/mcp-server/cli/start/command.ts @@ -2,9 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { buildCommand } from "@stricli/core"; -import { numberParser } from "@stricli/core"; -import * as z from "zod"; +import { buildCommand, numberParser } from "@stricli/core"; +import * as z from "zod/v3"; import { consoleLoggerLevels } from "../../console-logger.js"; import { mcpScopes } from "../../scopes.js"; diff --git a/src/mcp-server/cli/start/impl.ts b/src/mcp-server/cli/start/impl.ts index 51899c74..2771d66a 100644 --- a/src/mcp-server/cli/start/impl.ts +++ b/src/mcp-server/cli/start/impl.ts @@ -50,7 +50,8 @@ async function startStdio(flags: StartCommandFlags) { logger, allowedTools: flags.tool, scopes: flags.scope, - ...{ bearerAuth: flags["bearer-auth"] ?? "" }, + bearerAuth: flags["bearer-auth"] ?? "", + serverURL: flags["server-url"], serverIdx: flags["server-index"], }); @@ -71,7 +72,8 @@ async function startSSE(flags: StartCommandFlags) { logger, allowedTools: flags.tool, scopes: flags.scope, - ...{ bearerAuth: flags["bearer-auth"] ?? "" }, + bearerAuth: flags["bearer-auth"] ?? "", + serverURL: flags["server-url"], serverIdx: flags["server-index"], }); diff --git a/src/mcp-server/extensions.ts b/src/mcp-server/extensions.ts index 7aab2809..0955a573 100644 --- a/src/mcp-server/extensions.ts +++ b/src/mcp-server/extensions.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ZodRawShape } from "zod"; +import { ZodRawShape } from "zod/v3"; import { PromptArgsRawShape, PromptDefinition } from "./prompts.js"; import { ResourceDefinition, ResourceTemplateDefinition } from "./resources.js"; import { ToolDefinition } from "./tools.js"; diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts index 0ffdff16..a7c3a332 100644 --- a/src/mcp-server/mcp-server.ts +++ b/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "0.7.0", + currentVersion: "0.8.0", }, }); diff --git a/src/mcp-server/prompts.ts b/src/mcp-server/prompts.ts index 8c325dd7..05647eb8 100644 --- a/src/mcp-server/prompts.ts +++ b/src/mcp-server/prompts.ts @@ -4,14 +4,18 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; -import { GetPromptResult } from "@modelcontextprotocol/sdk/types.js"; +import { + GetPromptResult, + ServerNotification, + ServerRequest, +} from "@modelcontextprotocol/sdk/types.js"; import { objectOutputType, ZodOptional, ZodType, ZodTypeAny, ZodTypeDef, -} from "zod"; +} from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { ConsoleLogger } from "./console-logger.js"; import { MCPScope } from "./scopes.js"; @@ -33,7 +37,7 @@ export type PromptDefinition< prompt: ( client: OpalMcpCore, args: objectOutputType, - extra: RequestHandlerExtra, + extra: RequestHandlerExtra, ) => GetPromptResult | Promise; } : { @@ -43,7 +47,7 @@ export type PromptDefinition< args?: undefined; prompt: ( client: OpalMcpCore, - extra: RequestHandlerExtra, + extra: RequestHandlerExtra, ) => GetPromptResult | Promise; }; diff --git a/src/mcp-server/resources.ts b/src/mcp-server/resources.ts index dd4d8626..22e8bfe9 100644 --- a/src/mcp-server/resources.ts +++ b/src/mcp-server/resources.ts @@ -9,7 +9,11 @@ import { } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; import { Variables } from "@modelcontextprotocol/sdk/shared/uriTemplate.js"; -import { ReadResourceResult } from "@modelcontextprotocol/sdk/types.js"; +import { + ReadResourceResult, + ServerNotification, + ServerRequest, +} from "@modelcontextprotocol/sdk/types.js"; import { OpalMcpCore } from "../core.js"; import { ConsoleLogger } from "./console-logger.js"; import { MCPScope } from "./scopes.js"; @@ -18,7 +22,7 @@ import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js"; export type ReadResourceCallback = ( client: OpalMcpCore, uri: URL, - extra: RequestHandlerExtra, + extra: RequestHandlerExtra, ) => ReadResourceResult | Promise; export type ResourceDefinition = { @@ -34,7 +38,7 @@ export type ReadResourceTemplateCallback = ( client: OpalMcpCore, uri: URL, vars: Variables, - extra: RequestHandlerExtra, + extra: RequestHandlerExtra, ) => ReadResourceResult | Promise; export type ResourceTemplateDefinition = { diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts index afab606a..af772bfb 100644 --- a/src/mcp-server/server.ts +++ b/src/mcp-server/server.ts @@ -15,6 +15,7 @@ import { MCPScope } from "./scopes.js"; import { createRegisterTool } from "./tools.js"; import { tool$accessRulesCreateAccessRule } from "./tools/accessRulesCreateAccessRule.js"; import { tool$accessRulesGetAccessRule } from "./tools/accessRulesGetAccessRule.js"; +import { tool$accessRulesGetAccessRules } from "./tools/accessRulesGetAccessRules.js"; import { tool$accessRulesUpdateAccessRule } from "./tools/accessRulesUpdateAccessRule.js"; import { tool$appsGetApp } from "./tools/appsGetApp.js"; import { tool$appsGetApps } from "./tools/appsGetApps.js"; @@ -32,11 +33,27 @@ import { tool$bundlesRemoveBundleGroup } from "./tools/bundlesRemoveBundleGroup. import { tool$bundlesRemoveBundleResource } from "./tools/bundlesRemoveBundleResource.js"; import { tool$bundlesSetBundleVisibility } from "./tools/bundlesSetBundleVisibility.js"; import { tool$bundlesUpdateBundle } from "./tools/bundlesUpdateBundle.js"; +import { tool$campaignsCreateCampaign } from "./tools/campaignsCreateCampaign.js"; +import { tool$campaignsEndCampaign } from "./tools/campaignsEndCampaign.js"; +import { tool$campaignsGetCampaign } from "./tools/campaignsGetCampaign.js"; +import { tool$campaignsGetCampaigns } from "./tools/campaignsGetCampaigns.js"; +import { tool$campaignsStartCampaign } from "./tools/campaignsStartCampaign.js"; +import { tool$campaignsStopCampaign } from "./tools/campaignsStopCampaign.js"; +import { tool$campaignsUpdateCampaign } from "./tools/campaignsUpdateCampaign.js"; import { tool$configurationTemplatesCreateConfigurationTemplate } from "./tools/configurationTemplatesCreateConfigurationTemplate.js"; import { tool$configurationTemplatesDeleteConfigurationTemplate } from "./tools/configurationTemplatesDeleteConfigurationTemplate.js"; import { tool$configurationTemplatesGetConfigurationTemplates } from "./tools/configurationTemplatesGetConfigurationTemplates.js"; import { tool$configurationTemplatesUpdateConfigurationTemplate } from "./tools/configurationTemplatesUpdateConfigurationTemplate.js"; +import { tool$delegationsCreateDelegation } from "./tools/delegationsCreateDelegation.js"; +import { tool$delegationsDeleteDelegation } from "./tools/delegationsDeleteDelegation.js"; +import { tool$delegationsGetDelegation } from "./tools/delegationsGetDelegation.js"; +import { tool$delegationsGetDelegations } from "./tools/delegationsGetDelegations.js"; import { tool$eventsEvents } from "./tools/eventsEvents.js"; +import { tool$eventsGetEvent } from "./tools/eventsGetEvent.js"; +import { tool$eventStreamsCreateEventStream } from "./tools/eventStreamsCreateEventStream.js"; +import { tool$eventStreamsDeleteEventStream } from "./tools/eventStreamsDeleteEventStream.js"; +import { tool$eventStreamsGetEventStreams } from "./tools/eventStreamsGetEventStreams.js"; +import { tool$eventStreamsUpdateEventStream } from "./tools/eventStreamsUpdateEventStream.js"; import { tool$groupBindingsCreateGroupBinding } from "./tools/groupBindingsCreateGroupBinding.js"; import { tool$groupBindingsDeleteGroupBinding } from "./tools/groupBindingsDeleteGroupBinding.js"; import { tool$groupBindingsGetGroupBinding } from "./tools/groupBindingsGetGroupBinding.js"; @@ -60,6 +77,7 @@ import { tool$groupsGetGroups } from "./tools/groupsGetGroups.js"; import { tool$groupsGetGroupTags } from "./tools/groupsGetGroupTags.js"; import { tool$groupsGetGroupUsers } from "./tools/groupsGetGroupUsers.js"; import { tool$groupsGetGroupVisibility } from "./tools/groupsGetGroupVisibility.js"; +import { tool$groupsGetUserGroups } from "./tools/groupsGetUserGroups.js"; import { tool$groupsRemoveGroupContainingGroup } from "./tools/groupsRemoveGroupContainingGroup.js"; import { tool$groupsSetGroupMessageChannels } from "./tools/groupsSetGroupMessageChannels.js"; import { tool$groupsSetGroupOnCallSchedules } from "./tools/groupsSetGroupOnCallSchedules.js"; @@ -69,7 +87,9 @@ import { tool$groupsSetGroupReviewerStages } from "./tools/groupsSetGroupReviewe import { tool$groupsSetGroupVisibility } from "./tools/groupsSetGroupVisibility.js"; import { tool$groupsUpdateGroups } from "./tools/groupsUpdateGroups.js"; import { tool$groupsUpdateGroupUser } from "./tools/groupsUpdateGroupUser.js"; +import { tool$idpGroupMappingsCreateIdpGroupMapping } from "./tools/idpGroupMappingsCreateIdpGroupMapping.js"; import { tool$idpGroupMappingsDeleteIdpGroupMappings } from "./tools/idpGroupMappingsDeleteIdpGroupMappings.js"; +import { tool$idpGroupMappingsGetIdpGroupMapping } from "./tools/idpGroupMappingsGetIdpGroupMapping.js"; import { tool$idpGroupMappingsGetIdpGroupMappings } from "./tools/idpGroupMappingsGetIdpGroupMappings.js"; import { tool$idpGroupMappingsUpdateIdpGroupMappings } from "./tools/idpGroupMappingsUpdateIdpGroupMappings.js"; import { tool$messageChannelsCreateMessageChannel } from "./tools/messageChannelsCreateMessageChannel.js"; @@ -79,6 +99,7 @@ import { tool$nonHumanIdentitiesGetNhis } from "./tools/nonHumanIdentitiesGetNhi import { tool$onCallSchedulesCreateOnCallSchedule } from "./tools/onCallSchedulesCreateOnCallSchedule.js"; import { tool$onCallSchedulesGetOnCallSchedule } from "./tools/onCallSchedulesGetOnCallSchedule.js"; import { tool$onCallSchedulesGetOnCallSchedules } from "./tools/onCallSchedulesGetOnCallSchedules.js"; +import { tool$opalQueriesRunOpalQuery } from "./tools/opalQueriesRunOpalQuery.js"; import { tool$ownersCreateOwner } from "./tools/ownersCreateOwner.js"; import { tool$ownersDeleteOwner } from "./tools/ownersDeleteOwner.js"; import { tool$ownersGetOwner } from "./tools/ownersGetOwner.js"; @@ -87,9 +108,20 @@ import { tool$ownersGetOwners } from "./tools/ownersGetOwners.js"; import { tool$ownersGetOwnerUsers } from "./tools/ownersGetOwnerUsers.js"; import { tool$ownersSetOwnerUsers } from "./tools/ownersSetOwnerUsers.js"; import { tool$ownersUpdateOwners } from "./tools/ownersUpdateOwners.js"; +import { tool$paladinCreatePaladin } from "./tools/paladinCreatePaladin.js"; +import { tool$paladinCreatePaladinContextSource } from "./tools/paladinCreatePaladinContextSource.js"; +import { tool$paladinDeletePaladin } from "./tools/paladinDeletePaladin.js"; +import { tool$paladinDeletePaladinContextSource } from "./tools/paladinDeletePaladinContextSource.js"; +import { tool$paladinGetPaladin } from "./tools/paladinGetPaladin.js"; +import { tool$paladinGetPaladinFromName } from "./tools/paladinGetPaladinFromName.js"; +import { tool$paladinListPaladinContextSources } from "./tools/paladinListPaladinContextSources.js"; +import { tool$paladinUpdatePaladin } from "./tools/paladinUpdatePaladin.js"; import { tool$requestsApproveRequest } from "./tools/requestsApproveRequest.js"; import { tool$requestsCreateRequest } from "./tools/requestsCreateRequest.js"; +import { tool$requestsCreateRequestComment } from "./tools/requestsCreateRequestComment.js"; +import { tool$requestsDenyRequest } from "./tools/requestsDenyRequest.js"; import { tool$requestsGetRequest } from "./tools/requestsGetRequest.js"; +import { tool$requestsGetRequestComments } from "./tools/requestsGetRequestComments.js"; import { tool$requestsGetRequests } from "./tools/requestsGetRequests.js"; import { tool$requestsGetRequestsRelay } from "./tools/requestsGetRequestsRelay.js"; import { tool$resourcesAddResourceNhi } from "./tools/resourcesAddResourceNhi.js"; @@ -99,6 +131,7 @@ import { tool$resourcesDeleteResource } from "./tools/resourcesDeleteResource.js import { tool$resourcesDeleteResourceNhi } from "./tools/resourcesDeleteResourceNhi.js"; import { tool$resourcesDeleteResourceUser } from "./tools/resourcesDeleteResourceUser.js"; import { tool$resourcesGetResource } from "./tools/resourcesGetResource.js"; +import { tool$resourcesGetResourceGroups } from "./tools/resourcesGetResourceGroups.js"; import { tool$resourcesGetResourceMessageChannels } from "./tools/resourcesGetResourceMessageChannels.js"; import { tool$resourcesGetResourceNhis } from "./tools/resourcesGetResourceNhis.js"; import { tool$resourcesGetResourceReviewers } from "./tools/resourcesGetResourceReviewers.js"; @@ -109,6 +142,7 @@ import { tool$resourcesGetResourceTags } from "./tools/resourcesGetResourceTags. import { tool$resourcesGetResourceUser } from "./tools/resourcesGetResourceUser.js"; import { tool$resourcesGetResourceUsers } from "./tools/resourcesGetResourceUsers.js"; import { tool$resourcesGetResourceVisibility } from "./tools/resourcesGetResourceVisibility.js"; +import { tool$resourcesGetUserResources } from "./tools/resourcesGetUserResources.js"; import { tool$resourcesResourceUserAccessStatusRetrieve } from "./tools/resourcesResourceUserAccessStatusRetrieve.js"; import { tool$resourcesSetResourceMessageChannels } from "./tools/resourcesSetResourceMessageChannels.js"; import { tool$resourcesSetResourceReviewers } from "./tools/resourcesSetResourceReviewers.js"; @@ -129,11 +163,15 @@ import { tool$tagsGetTags } from "./tools/tagsGetTags.js"; import { tool$tagsRemoveGroupTag } from "./tools/tagsRemoveGroupTag.js"; import { tool$tagsRemoveResourceTag } from "./tools/tagsRemoveResourceTag.js"; import { tool$tagsRemoveUserTag } from "./tools/tagsRemoveUserTag.js"; +import { tool$tokensDeleteToken } from "./tools/tokensDeleteToken.js"; +import { tool$tokensGetTokens } from "./tools/tokensGetTokens.js"; import { tool$uarsCreateUar } from "./tools/uarsCreateUar.js"; import { tool$uarsGetUar } from "./tools/uarsGetUar.js"; import { tool$uarsGetUARs } from "./tools/uarsGetUARs.js"; +import { tool$usersGetRemoteUsers } from "./tools/usersGetRemoteUsers.js"; import { tool$usersGetUsers } from "./tools/usersGetUsers.js"; import { tool$usersGetUserTags } from "./tools/usersGetUserTags.js"; +import { tool$usersGetUserWhoami } from "./tools/usersGetUserWhoami.js"; import { tool$usersUser } from "./tools/usersUser.js"; export function createMCPServer(deps: { @@ -146,7 +184,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "OpalMcp", - version: "0.7.0", + version: "0.8.0", }); const client = new OpalMcpCore({ @@ -192,11 +230,23 @@ export function createMCPServer(deps: { tool(tool$bundlesRemoveBundleGroup); tool(tool$bundlesGetBundleVisibility); tool(tool$bundlesSetBundleVisibility); + tool(tool$campaignsGetCampaigns); + tool(tool$campaignsCreateCampaign); + tool(tool$campaignsGetCampaign); + tool(tool$campaignsUpdateCampaign); + tool(tool$campaignsStartCampaign); + tool(tool$campaignsStopCampaign); + tool(tool$campaignsEndCampaign); tool(tool$configurationTemplatesGetConfigurationTemplates); tool(tool$configurationTemplatesCreateConfigurationTemplate); tool(tool$configurationTemplatesUpdateConfigurationTemplate); tool(tool$configurationTemplatesDeleteConfigurationTemplate); + tool(tool$eventStreamsGetEventStreams); + tool(tool$eventStreamsCreateEventStream); + tool(tool$eventStreamsUpdateEventStream); + tool(tool$eventStreamsDeleteEventStream); tool(tool$eventsEvents); + tool(tool$eventsGetEvent); tool(tool$groupsGetGroups); tool(tool$groupsUpdateGroups); tool(tool$groupsCreateGroup); @@ -224,6 +274,7 @@ export function createMCPServer(deps: { tool(tool$groupsUpdateGroupUser); tool(tool$groupsAddGroupUser); tool(tool$groupsDeleteGroupUser); + tool(tool$groupsGetUserGroups); tool(tool$groupBindingsGetGroupBindings); tool(tool$groupBindingsCreateGroupBinding); tool(tool$groupBindingsUpdateGroupBindings); @@ -231,6 +282,8 @@ export function createMCPServer(deps: { tool(tool$groupBindingsDeleteGroupBinding); tool(tool$idpGroupMappingsGetIdpGroupMappings); tool(tool$idpGroupMappingsUpdateIdpGroupMappings); + tool(tool$idpGroupMappingsGetIdpGroupMapping); + tool(tool$idpGroupMappingsCreateIdpGroupMapping); tool(tool$idpGroupMappingsDeleteIdpGroupMappings); tool(tool$ownersGetOwners); tool(tool$ownersCreateOwner); @@ -245,6 +298,9 @@ export function createMCPServer(deps: { tool(tool$requestsGetRequestsRelay); tool(tool$requestsGetRequest); tool(tool$requestsApproveRequest); + tool(tool$requestsDenyRequest); + tool(tool$requestsGetRequestComments); + tool(tool$requestsCreateRequestComment); tool(tool$resourcesGetResources); tool(tool$resourcesUpdateResources); tool(tool$resourcesCreateResource); @@ -270,11 +326,24 @@ export function createMCPServer(deps: { tool(tool$resourcesGetResourceTags); tool(tool$resourcesGetResourceScopedRolePermissions); tool(tool$resourcesSetResourceScopedRolePermissions); + tool(tool$resourcesGetUserResources); + tool(tool$resourcesGetResourceGroups); tool(tool$nonHumanIdentitiesGetNhis); + tool(tool$paladinCreatePaladin); + tool(tool$paladinGetPaladin); + tool(tool$paladinUpdatePaladin); + tool(tool$paladinDeletePaladin); + tool(tool$paladinGetPaladinFromName); + tool(tool$paladinListPaladinContextSources); + tool(tool$paladinCreatePaladinContextSource); + tool(tool$paladinDeletePaladinContextSource); tool(tool$sessionsSessions); tool(tool$usersUser); tool(tool$usersGetUsers); + tool(tool$usersGetRemoteUsers); + tool(tool$usersGetUserWhoami); tool(tool$usersGetUserTags); + tool(tool$accessRulesGetAccessRules); tool(tool$accessRulesCreateAccessRule); tool(tool$accessRulesGetAccessRule); tool(tool$accessRulesUpdateAccessRule); @@ -295,9 +364,16 @@ export function createMCPServer(deps: { tool(tool$onCallSchedulesGetOnCallSchedules); tool(tool$onCallSchedulesCreateOnCallSchedule); tool(tool$onCallSchedulesGetOnCallSchedule); + tool(tool$opalQueriesRunOpalQuery); + tool(tool$tokensGetTokens); + tool(tool$tokensDeleteToken); tool(tool$uarsGetUARs); tool(tool$uarsCreateUar); tool(tool$uarsGetUar); + tool(tool$delegationsGetDelegations); + tool(tool$delegationsCreateDelegation); + tool(tool$delegationsGetDelegation); + tool(tool$delegationsDeleteDelegation); return server; } diff --git a/src/mcp-server/shared.ts b/src/mcp-server/shared.ts index 9dc6d2f6..bef212f0 100644 --- a/src/mcp-server/shared.ts +++ b/src/mcp-server/shared.ts @@ -2,9 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { bytesToBase64 } from "../lib/base64.js"; - type BinaryData = | Uint8Array | ArrayBuffer @@ -17,12 +16,12 @@ export async function consumeStream( stream: ReadableStream, ): Promise { const reader = stream.getReader(); - const chunks: Uint8Array[] = []; + const chunks: ArrayBuffer[] = []; try { while (true) { const { done, value } = await reader.read(); - if (value != null) chunks.push(value); + if (value != null) chunks.push(new Uint8Array(value).buffer); if (done) break; } } finally { diff --git a/src/mcp-server/tools.ts b/src/mcp-server/tools.ts index 8747157f..edf95ed5 100644 --- a/src/mcp-server/tools.ts +++ b/src/mcp-server/tools.ts @@ -4,8 +4,12 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; -import { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; -import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod"; +import { + CallToolResult, + ServerNotification, + ServerRequest, +} from "@modelcontextprotocol/sdk/types.js"; +import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod/v3"; import { OpalMcpCore } from "../core.js"; import { ConsoleLogger } from "./console-logger.js"; import { MCPScope } from "./scopes.js"; @@ -20,7 +24,7 @@ export type ToolDefinition = tool: ( client: OpalMcpCore, args: objectOutputType, - extra: RequestHandlerExtra, + extra: RequestHandlerExtra, ) => CallToolResult | Promise; } : { @@ -30,7 +34,7 @@ export type ToolDefinition = args?: undefined; tool: ( client: OpalMcpCore, - extra: RequestHandlerExtra, + extra: RequestHandlerExtra, ) => CallToolResult | Promise; }; diff --git a/src/mcp-server/tools/accessRulesGetAccessRules.ts b/src/mcp-server/tools/accessRulesGetAccessRules.ts new file mode 100644 index 00000000..b9983f61 --- /dev/null +++ b/src/mcp-server/tools/accessRulesGetAccessRules.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { accessRulesGetAccessRules } from "../../funcs/accessRulesGetAccessRules.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetAccessRulesRequest$inboundSchema, +}; + +export const tool$accessRulesGetAccessRules: ToolDefinition = { + name: "access-rules-get-access-rules", + description: `Returns a list of access rules for your organization.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await accessRulesGetAccessRules( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/appsGetApp.ts b/src/mcp-server/tools/appsGetApp.ts index 69e1d38e..12efa449 100644 --- a/src/mcp-server/tools/appsGetApp.ts +++ b/src/mcp-server/tools/appsGetApp.ts @@ -12,7 +12,9 @@ const args = { export const tool$appsGetApp: ToolDefinition = { name: "apps-get-app", - description: `Returns an \`App\` object.`, + description: `Get app by ID + +Returns an \`App\` object.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/appsGetApps.ts b/src/mcp-server/tools/appsGetApps.ts index 2388d0b1..dba0ffd4 100644 --- a/src/mcp-server/tools/appsGetApps.ts +++ b/src/mcp-server/tools/appsGetApps.ts @@ -12,7 +12,9 @@ const args = { export const tool$appsGetApps: ToolDefinition = { name: "apps-get-apps", - description: `Returns a list of \`App\` objects.`, + description: `Get apps + +Returns a list of \`App\` objects.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/bundlesGetBundle.ts b/src/mcp-server/tools/bundlesGetBundle.ts index 9d414249..35cd2a8c 100644 --- a/src/mcp-server/tools/bundlesGetBundle.ts +++ b/src/mcp-server/tools/bundlesGetBundle.ts @@ -12,7 +12,9 @@ const args = { export const tool$bundlesGetBundle: ToolDefinition = { name: "bundles-get-bundle", - description: `Returns a \`Bundle\` object.`, + description: `Get bundle by ID + +Returns a \`Bundle\` object.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/bundlesGetBundles.ts b/src/mcp-server/tools/bundlesGetBundles.ts index 11c49416..35dc3964 100644 --- a/src/mcp-server/tools/bundlesGetBundles.ts +++ b/src/mcp-server/tools/bundlesGetBundles.ts @@ -12,7 +12,9 @@ const args = { export const tool$bundlesGetBundles: ToolDefinition = { name: "bundles-get-bundles", - description: `Returns a list of \`Bundle\` objects.`, + description: `Get bundles + +Returns a list of \`Bundle\` objects.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/campaignsCreateCampaign.ts b/src/mcp-server/tools/campaignsCreateCampaign.ts new file mode 100644 index 00000000..9c6aebcd --- /dev/null +++ b/src/mcp-server/tools/campaignsCreateCampaign.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { campaignsCreateCampaign } from "../../funcs/campaignsCreateCampaign.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateCampaignInfo$inboundSchema, +}; + +export const tool$campaignsCreateCampaign: ToolDefinition = { + name: "campaigns-create-campaign", + description: + `Creates a campaign. Campaign scope only supports direct access edges: +\`configuration.query.edgeFilter.directOnly\` defaults to \`true\`, is +always stored as \`true\`, and passing \`false\` returns 400. +`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await campaignsCreateCampaign( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/campaignsEndCampaign.ts b/src/mcp-server/tools/campaignsEndCampaign.ts new file mode 100644 index 00000000..9d8a8d1b --- /dev/null +++ b/src/mcp-server/tools/campaignsEndCampaign.ts @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { campaignsEndCampaign } from "../../funcs/campaignsEndCampaign.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.EndCampaignRequest$inboundSchema, +}; + +export const tool$campaignsEndCampaign: ToolDefinition = { + name: "campaigns-end-campaign", + description: `End campaign + +Ends a stopped campaign, setting \`ended_at\` and \`ended_by_user_id\`, +applying pending access changes, and queuing report generation. +Returns 400 unless the campaign is started and stopped and not already +ended. +`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await campaignsEndCampaign( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/campaignsGetCampaign.ts b/src/mcp-server/tools/campaignsGetCampaign.ts new file mode 100644 index 00000000..7dc58dab --- /dev/null +++ b/src/mcp-server/tools/campaignsGetCampaign.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { campaignsGetCampaign } from "../../funcs/campaignsGetCampaign.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetCampaignRequest$inboundSchema, +}; + +export const tool$campaignsGetCampaign: ToolDefinition = { + name: "campaigns-get-campaign", + description: `Get campaign by ID + +Returns a \`Campaign\` object.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await campaignsGetCampaign( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/campaignsGetCampaigns.ts b/src/mcp-server/tools/campaignsGetCampaigns.ts new file mode 100644 index 00000000..863d57b7 --- /dev/null +++ b/src/mcp-server/tools/campaignsGetCampaigns.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { campaignsGetCampaigns } from "../../funcs/campaignsGetCampaigns.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetCampaignsRequest$inboundSchema, +}; + +export const tool$campaignsGetCampaigns: ToolDefinition = { + name: "campaigns-get-campaigns", + description: `Returns a list of \`Campaign\` objects.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await campaignsGetCampaigns( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/campaignsStartCampaign.ts b/src/mcp-server/tools/campaignsStartCampaign.ts new file mode 100644 index 00000000..286bf4a9 --- /dev/null +++ b/src/mcp-server/tools/campaignsStartCampaign.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { campaignsStartCampaign } from "../../funcs/campaignsStartCampaign.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.StartCampaignRequest$inboundSchema, +}; + +export const tool$campaignsStartCampaign: ToolDefinition = { + name: "campaigns-start-campaign", + description: `Start campaign + +Starts a draft campaign immediately, setting \`started_at\` and +\`started_by_user_id\`. Returns 400 if the campaign is not in draft +state, or if it is a recurring template (\`is_template: true\`) — +templates spawn draft campaigns on their schedule and cannot be +started directly. +`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await campaignsStartCampaign( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/campaignsStopCampaign.ts b/src/mcp-server/tools/campaignsStopCampaign.ts new file mode 100644 index 00000000..f17077e2 --- /dev/null +++ b/src/mcp-server/tools/campaignsStopCampaign.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { campaignsStopCampaign } from "../../funcs/campaignsStopCampaign.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.StopCampaignRequest$inboundSchema, +}; + +export const tool$campaignsStopCampaign: ToolDefinition = { + name: "campaigns-stop-campaign", + description: `Stop campaign + +Stops an ongoing campaign immediately, setting \`stopped_at\` and +\`stopped_by_user_id\`. Returns 400 if the campaign has not started or +has already stopped. +`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await campaignsStopCampaign( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/campaignsUpdateCampaign.ts b/src/mcp-server/tools/campaignsUpdateCampaign.ts new file mode 100644 index 00000000..3bd3376f --- /dev/null +++ b/src/mcp-server/tools/campaignsUpdateCampaign.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { campaignsUpdateCampaign } from "../../funcs/campaignsUpdateCampaign.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateCampaignRequest$inboundSchema, +}; + +export const tool$campaignsUpdateCampaign: ToolDefinition = { + name: "campaigns-update-campaign", + description: `Update campaign + +Partially updates a campaign. Omitted fields are left unchanged. +\`configuration.query\` and \`configuration.reviewer_assignment_policy\` +cannot be updated after create; including either field returns 400. +\`configuration.cron_expression\` and +\`configuration.recurring_duration_days\` may only be set on template +campaigns; setting them on a one-off campaign returns 400. +\`configuration.is_template\` is immutable and not accepted on update. +Configuration updates on a stopped or ended (non-template) campaign +return 400. Name-only updates are still allowed. +`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await campaignsUpdateCampaign( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/delegationsCreateDelegation.ts b/src/mcp-server/tools/delegationsCreateDelegation.ts new file mode 100644 index 00000000..25b4fbd0 --- /dev/null +++ b/src/mcp-server/tools/delegationsCreateDelegation.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { delegationsCreateDelegation } from "../../funcs/delegationsCreateDelegation.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateDelegationRequest$inboundSchema, +}; + +export const tool$delegationsCreateDelegation: ToolDefinition = { + name: "delegations-create-delegation", + description: + `Creates a new request reviewer delegation to delegate access review requests from one user to another.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await delegationsCreateDelegation( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/delegationsDeleteDelegation.ts b/src/mcp-server/tools/delegationsDeleteDelegation.ts new file mode 100644 index 00000000..7a7a1e00 --- /dev/null +++ b/src/mcp-server/tools/delegationsDeleteDelegation.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { delegationsDeleteDelegation } from "../../funcs/delegationsDeleteDelegation.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteDelegationRequest$inboundSchema, +}; + +export const tool$delegationsDeleteDelegation: ToolDefinition = { + name: "delegations-delete-delegation", + description: `Deletes a delegation by its ID.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await delegationsDeleteDelegation( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/delegationsGetDelegation.ts b/src/mcp-server/tools/delegationsGetDelegation.ts new file mode 100644 index 00000000..204952a9 --- /dev/null +++ b/src/mcp-server/tools/delegationsGetDelegation.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { delegationsGetDelegation } from "../../funcs/delegationsGetDelegation.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetDelegationRequest$inboundSchema, +}; + +export const tool$delegationsGetDelegation: ToolDefinition = { + name: "delegations-get-delegation", + description: `Get delegation by ID + +Returns a specific delegation by its ID.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await delegationsGetDelegation( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/delegationsGetDelegations.ts b/src/mcp-server/tools/delegationsGetDelegations.ts new file mode 100644 index 00000000..c3b5e603 --- /dev/null +++ b/src/mcp-server/tools/delegationsGetDelegations.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { delegationsGetDelegations } from "../../funcs/delegationsGetDelegations.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetDelegationsRequest$inboundSchema, +}; + +export const tool$delegationsGetDelegations: ToolDefinition = { + name: "delegations-get-delegations", + description: `Get delegations + +Returns a list of request reviewer delegations configured for your organization.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await delegationsGetDelegations( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/eventStreamsCreateEventStream.ts b/src/mcp-server/tools/eventStreamsCreateEventStream.ts new file mode 100644 index 00000000..4daa813a --- /dev/null +++ b/src/mcp-server/tools/eventStreamsCreateEventStream.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { eventStreamsCreateEventStream } from "../../funcs/eventStreamsCreateEventStream.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateEventStreamInfo$inboundSchema, +}; + +export const tool$eventStreamsCreateEventStream: ToolDefinition = { + name: "event-streams-create-event-stream", + description: `Create event stream + +Creates a new event streaming connection.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await eventStreamsCreateEventStream( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/eventStreamsDeleteEventStream.ts b/src/mcp-server/tools/eventStreamsDeleteEventStream.ts new file mode 100644 index 00000000..a8f0cc26 --- /dev/null +++ b/src/mcp-server/tools/eventStreamsDeleteEventStream.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { eventStreamsDeleteEventStream } from "../../funcs/eventStreamsDeleteEventStream.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteEventStreamRequest$inboundSchema, +}; + +export const tool$eventStreamsDeleteEventStream: ToolDefinition = { + name: "event-streams-delete-event-stream", + description: `Delete event stream + +Deletes an event streaming connection.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await eventStreamsDeleteEventStream( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/eventStreamsGetEventStreams.ts b/src/mcp-server/tools/eventStreamsGetEventStreams.ts new file mode 100644 index 00000000..2678df6d --- /dev/null +++ b/src/mcp-server/tools/eventStreamsGetEventStreams.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { eventStreamsGetEventStreams } from "../../funcs/eventStreamsGetEventStreams.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$eventStreamsGetEventStreams: ToolDefinition = { + name: "event-streams-get-event-streams", + description: `Get event streams + +Returns a list of configured event streaming connections for your organization.`, + scopes: ["read"], + tool: async (client, ctx) => { + const [result, apiCall] = await eventStreamsGetEventStreams( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/eventStreamsUpdateEventStream.ts b/src/mcp-server/tools/eventStreamsUpdateEventStream.ts new file mode 100644 index 00000000..628e48d9 --- /dev/null +++ b/src/mcp-server/tools/eventStreamsUpdateEventStream.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { eventStreamsUpdateEventStream } from "../../funcs/eventStreamsUpdateEventStream.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateEventStreamRequest$inboundSchema, +}; + +export const tool$eventStreamsUpdateEventStream: ToolDefinition = { + name: "event-streams-update-event-stream", + description: `Update event stream + +Updates an existing event streaming connection.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await eventStreamsUpdateEventStream( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/eventsGetEvent.ts b/src/mcp-server/tools/eventsGetEvent.ts new file mode 100644 index 00000000..f8d102a8 --- /dev/null +++ b/src/mcp-server/tools/eventsGetEvent.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { eventsGetEvent } from "../../funcs/eventsGetEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetEventRequest$inboundSchema, +}; + +export const tool$eventsGetEvent: ToolDefinition = { + name: "events-get-event", + description: `Get event by ID + +Returns an \`Event\` object.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await eventsGetEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/groupBindingsGetGroupBinding.ts b/src/mcp-server/tools/groupBindingsGetGroupBinding.ts index f32f3e9d..10e5b07b 100644 --- a/src/mcp-server/tools/groupBindingsGetGroupBinding.ts +++ b/src/mcp-server/tools/groupBindingsGetGroupBinding.ts @@ -12,7 +12,9 @@ const args = { export const tool$groupBindingsGetGroupBinding: ToolDefinition = { name: "group-bindings-get-group-binding", - description: `Returns a \`GroupBinding\` object.`, + description: `Get group binding by ID + +Returns a \`GroupBinding\` object.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/groupBindingsGetGroupBindings.ts b/src/mcp-server/tools/groupBindingsGetGroupBindings.ts index cfcda6d0..075aaa21 100644 --- a/src/mcp-server/tools/groupBindingsGetGroupBindings.ts +++ b/src/mcp-server/tools/groupBindingsGetGroupBindings.ts @@ -12,7 +12,9 @@ const args = { export const tool$groupBindingsGetGroupBindings: ToolDefinition = { name: "group-bindings-get-group-bindings", - description: `Returns a list of \`GroupBinding\` objects.`, + description: `Get group bindings + +Returns a list of \`GroupBinding\` objects.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/groupsGetGroup.ts b/src/mcp-server/tools/groupsGetGroup.ts index 2229cc9c..f8b05cf8 100644 --- a/src/mcp-server/tools/groupsGetGroup.ts +++ b/src/mcp-server/tools/groupsGetGroup.ts @@ -12,7 +12,9 @@ const args = { export const tool$groupsGetGroup: ToolDefinition = { name: "groups-get-group", - description: `Returns a \`Group\` object.`, + description: `Get group by ID + +Returns a \`Group\` object.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/groupsGetGroupContainingGroup.ts b/src/mcp-server/tools/groupsGetGroupContainingGroup.ts index 89bab25d..716e77cb 100644 --- a/src/mcp-server/tools/groupsGetGroupContainingGroup.ts +++ b/src/mcp-server/tools/groupsGetGroupContainingGroup.ts @@ -12,7 +12,9 @@ const args = { export const tool$groupsGetGroupContainingGroup: ToolDefinition = { name: "groups-get-group-containing-group", - description: `Gets a specific containing group for a group.`, + description: `Get nested group by ID + +Gets a specific containing group for a group.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/groupsGetGroupContainingGroups.ts b/src/mcp-server/tools/groupsGetGroupContainingGroups.ts index 9a1d421f..5b5d07dd 100644 --- a/src/mcp-server/tools/groupsGetGroupContainingGroups.ts +++ b/src/mcp-server/tools/groupsGetGroupContainingGroups.ts @@ -13,7 +13,9 @@ const args = { export const tool$groupsGetGroupContainingGroups: ToolDefinition = { name: "groups-get-group-containing-groups", - description: `Gets the list of groups that the group gives access to.`, + description: `Get nested groups + +Gets the list of groups that the group gives access to.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/groupsGetGroups.ts b/src/mcp-server/tools/groupsGetGroups.ts index df903886..f79e8183 100644 --- a/src/mcp-server/tools/groupsGetGroups.ts +++ b/src/mcp-server/tools/groupsGetGroups.ts @@ -12,7 +12,9 @@ const args = { export const tool$groupsGetGroups: ToolDefinition = { name: "groups-get-groups", - description: `Returns a list of groups for your organization.`, + description: `Get groups + +Returns a list of groups for your organization.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/groupsGetUserGroups.ts b/src/mcp-server/tools/groupsGetUserGroups.ts new file mode 100644 index 00000000..7dfb1155 --- /dev/null +++ b/src/mcp-server/tools/groupsGetUserGroups.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { groupsGetUserGroups } from "../../funcs/groupsGetUserGroups.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetUserGroupsRequest$inboundSchema, +}; + +export const tool$groupsGetUserGroups: ToolDefinition = { + name: "groups-get-user-groups", + description: `Returns all groups that the user is a member of.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await groupsGetUserGroups( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/idpGroupMappingsCreateIdpGroupMapping.ts b/src/mcp-server/tools/idpGroupMappingsCreateIdpGroupMapping.ts new file mode 100644 index 00000000..e9e8429c --- /dev/null +++ b/src/mcp-server/tools/idpGroupMappingsCreateIdpGroupMapping.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { idpGroupMappingsCreateIdpGroupMapping } from "../../funcs/idpGroupMappingsCreateIdpGroupMapping.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIdpGroupMappingRequest$inboundSchema, +}; + +export const tool$idpGroupMappingsCreateIdpGroupMapping: ToolDefinition< + typeof args +> = { + name: "idp-group-mappings-create-idp-group-mapping", + description: + `Creates or updates an individual \`IdpGroupMapping\` object (upsert operation). + +**Behavior:** +- If the mapping doesn't exist, it will be created with the provided values +- If the mapping exists, only the fields provided in the request will be updated +`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await idpGroupMappingsCreateIdpGroupMapping( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/idpGroupMappingsGetIdpGroupMapping.ts b/src/mcp-server/tools/idpGroupMappingsGetIdpGroupMapping.ts new file mode 100644 index 00000000..058ed3ca --- /dev/null +++ b/src/mcp-server/tools/idpGroupMappingsGetIdpGroupMapping.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { idpGroupMappingsGetIdpGroupMapping } from "../../funcs/idpGroupMappingsGetIdpGroupMapping.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIdpGroupMappingRequest$inboundSchema, +}; + +export const tool$idpGroupMappingsGetIdpGroupMapping: ToolDefinition< + typeof args +> = { + name: "idp-group-mappings-get-idp-group-mapping", + description: `Gets an \`IdpGroupMapping\` object for an Okta app and group.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await idpGroupMappingsGetIdpGroupMapping( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/messageChannelsGetMessageChannel.ts b/src/mcp-server/tools/messageChannelsGetMessageChannel.ts index 76cddb51..77a67c73 100644 --- a/src/mcp-server/tools/messageChannelsGetMessageChannel.ts +++ b/src/mcp-server/tools/messageChannelsGetMessageChannel.ts @@ -14,7 +14,9 @@ export const tool$messageChannelsGetMessageChannel: ToolDefinition< typeof args > = { name: "message-channels-get-message-channel", - description: `Gets a \`MessageChannel\` object.`, + description: `Get message channel by ID + +Gets a \`MessageChannel\` object.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/messageChannelsGetMessageChannels.ts b/src/mcp-server/tools/messageChannelsGetMessageChannels.ts index 18bd70be..de66aa7e 100644 --- a/src/mcp-server/tools/messageChannelsGetMessageChannels.ts +++ b/src/mcp-server/tools/messageChannelsGetMessageChannels.ts @@ -7,7 +7,9 @@ import { formatResult, ToolDefinition } from "../tools.js"; export const tool$messageChannelsGetMessageChannels: ToolDefinition = { name: "message-channels-get-message-channels", - description: `Returns a list of \`MessageChannel\` objects.`, + description: `Get message channels + +Returns a list of \`MessageChannel\` objects.`, scopes: ["read"], tool: async (client, ctx) => { const [result, apiCall] = await messageChannelsGetMessageChannels( diff --git a/src/mcp-server/tools/onCallSchedulesGetOnCallSchedule.ts b/src/mcp-server/tools/onCallSchedulesGetOnCallSchedule.ts index 77ce8f22..54dc9a74 100644 --- a/src/mcp-server/tools/onCallSchedulesGetOnCallSchedule.ts +++ b/src/mcp-server/tools/onCallSchedulesGetOnCallSchedule.ts @@ -14,7 +14,9 @@ export const tool$onCallSchedulesGetOnCallSchedule: ToolDefinition< typeof args > = { name: "on-call-schedules-get-on-call-schedule", - description: `Gets a \`OnCallSchedule\` object.`, + description: `Get on call schedule by ID + +Gets a \`OnCallSchedule\` object.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/onCallSchedulesGetOnCallSchedules.ts b/src/mcp-server/tools/onCallSchedulesGetOnCallSchedules.ts index 38b61bb4..6b3ea213 100644 --- a/src/mcp-server/tools/onCallSchedulesGetOnCallSchedules.ts +++ b/src/mcp-server/tools/onCallSchedulesGetOnCallSchedules.ts @@ -7,7 +7,9 @@ import { formatResult, ToolDefinition } from "../tools.js"; export const tool$onCallSchedulesGetOnCallSchedules: ToolDefinition = { name: "on-call-schedules-get-on-call-schedules", - description: `Returns a list of \`OnCallSchedule\` objects.`, + description: `Get on call schedules + +Returns a list of \`OnCallSchedule\` objects.`, scopes: ["read"], tool: async (client, ctx) => { const [result, apiCall] = await onCallSchedulesGetOnCallSchedules( diff --git a/src/mcp-server/tools/opalQueriesRunOpalQuery.ts b/src/mcp-server/tools/opalQueriesRunOpalQuery.ts new file mode 100644 index 00000000..dc7d118c --- /dev/null +++ b/src/mcp-server/tools/opalQueriesRunOpalQuery.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { opalQueriesRunOpalQuery } from "../../funcs/opalQueriesRunOpalQuery.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.RunOpalQueryRequest$inboundSchema, +}; + +export const tool$opalQueriesRunOpalQuery: ToolDefinition = { + name: "opal-queries-run-opal-query", + description: `Run an ad-hoc OpalQuery + +Runs an ad-hoc OpalQuery and returns the results. Supports NODE queries (users, resources, groups) and ACCESS_PATH queries (principal-to-entitlement access edges). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await opalQueriesRunOpalQuery( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ownersGetOwner.ts b/src/mcp-server/tools/ownersGetOwner.ts index 22380035..e4af630b 100644 --- a/src/mcp-server/tools/ownersGetOwner.ts +++ b/src/mcp-server/tools/ownersGetOwner.ts @@ -12,7 +12,9 @@ const args = { export const tool$ownersGetOwner: ToolDefinition = { name: "owners-get-owner", - description: `Returns an \`Owner\` object.`, + description: `Get owner by ID + +Returns an \`Owner\` object.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/ownersGetOwners.ts b/src/mcp-server/tools/ownersGetOwners.ts index 9a315a2d..7a73a196 100644 --- a/src/mcp-server/tools/ownersGetOwners.ts +++ b/src/mcp-server/tools/ownersGetOwners.ts @@ -12,7 +12,9 @@ const args = { export const tool$ownersGetOwners: ToolDefinition = { name: "owners-get-owners", - description: `Returns a list of \`Owner\` objects.`, + description: `Get owners + +Returns a list of \`Owner\` objects.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/paladinCreatePaladin.ts b/src/mcp-server/tools/paladinCreatePaladin.ts new file mode 100644 index 00000000..6c193412 --- /dev/null +++ b/src/mcp-server/tools/paladinCreatePaladin.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinCreatePaladin } from "../../funcs/paladinCreatePaladin.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreatePaladinInfo$inboundSchema, +}; + +export const tool$paladinCreatePaladin: ToolDefinition = { + name: "paladin-create-paladin", + description: `Create Paladin + +Creates a new \`Paladin\`.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await paladinCreatePaladin( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/paladinCreatePaladinContextSource.ts b/src/mcp-server/tools/paladinCreatePaladinContextSource.ts new file mode 100644 index 00000000..d665a661 --- /dev/null +++ b/src/mcp-server/tools/paladinCreatePaladinContextSource.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinCreatePaladinContextSource } from "../../funcs/paladinCreatePaladinContextSource.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreatePaladinContextSourceRequest$inboundSchema, +}; + +export const tool$paladinCreatePaladinContextSource: ToolDefinition< + typeof args +> = { + name: "paladin-create-paladin-context-source", + description: `Add a Paladin context source + +Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await paladinCreatePaladinContextSource( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/paladinDeletePaladin.ts b/src/mcp-server/tools/paladinDeletePaladin.ts new file mode 100644 index 00000000..5281367a --- /dev/null +++ b/src/mcp-server/tools/paladinDeletePaladin.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinDeletePaladin } from "../../funcs/paladinDeletePaladin.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeletePaladinRequest$inboundSchema, +}; + +export const tool$paladinDeletePaladin: ToolDefinition = { + name: "paladin-delete-paladin", + description: `Delete Paladin + +Deletes a Paladin, removing the underlying service user.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await paladinDeletePaladin( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/paladinDeletePaladinContextSource.ts b/src/mcp-server/tools/paladinDeletePaladinContextSource.ts new file mode 100644 index 00000000..75f8edfe --- /dev/null +++ b/src/mcp-server/tools/paladinDeletePaladinContextSource.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinDeletePaladinContextSource } from "../../funcs/paladinDeletePaladinContextSource.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeletePaladinContextSourceRequest$inboundSchema, +}; + +export const tool$paladinDeletePaladinContextSource: ToolDefinition< + typeof args +> = { + name: "paladin-delete-paladin-context-source", + description: `Remove a Paladin context source + +Removes a context source from a Paladin.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await paladinDeletePaladinContextSource( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/paladinGetPaladin.ts b/src/mcp-server/tools/paladinGetPaladin.ts new file mode 100644 index 00000000..b1f40b19 --- /dev/null +++ b/src/mcp-server/tools/paladinGetPaladin.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinGetPaladin } from "../../funcs/paladinGetPaladin.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetPaladinRequest$inboundSchema, +}; + +export const tool$paladinGetPaladin: ToolDefinition = { + name: "paladin-get-paladin", + description: `Get Paladin by ID + +Returns a \`Paladin\` object.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await paladinGetPaladin( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/paladinGetPaladinFromName.ts b/src/mcp-server/tools/paladinGetPaladinFromName.ts new file mode 100644 index 00000000..1ef9aa2b --- /dev/null +++ b/src/mcp-server/tools/paladinGetPaladinFromName.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinGetPaladinFromName } from "../../funcs/paladinGetPaladinFromName.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetPaladinFromNameRequest$inboundSchema, +}; + +export const tool$paladinGetPaladinFromName: ToolDefinition = { + name: "paladin-get-paladin-from-name", + description: `Get Paladins by name + +Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await paladinGetPaladinFromName( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/paladinListPaladinContextSources.ts b/src/mcp-server/tools/paladinListPaladinContextSources.ts new file mode 100644 index 00000000..bef033ae --- /dev/null +++ b/src/mcp-server/tools/paladinListPaladinContextSources.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinListPaladinContextSources } from "../../funcs/paladinListPaladinContextSources.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListPaladinContextSourcesRequest$inboundSchema, +}; + +export const tool$paladinListPaladinContextSources: ToolDefinition< + typeof args +> = { + name: "paladin-list-paladin-context-sources", + description: `List Paladin context sources + +Returns the context sources (Slack channels and documents) configured for a Paladin.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await paladinListPaladinContextSources( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/paladinUpdatePaladin.ts b/src/mcp-server/tools/paladinUpdatePaladin.ts new file mode 100644 index 00000000..8f282e7f --- /dev/null +++ b/src/mcp-server/tools/paladinUpdatePaladin.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinUpdatePaladin } from "../../funcs/paladinUpdatePaladin.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdatePaladinRequest$inboundSchema, +}; + +export const tool$paladinUpdatePaladin: ToolDefinition = { + name: "paladin-update-paladin", + description: `Update Paladin + +Updates a \`Paladin\` object.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await paladinUpdatePaladin( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/requestsCreateRequestComment.ts b/src/mcp-server/tools/requestsCreateRequestComment.ts new file mode 100644 index 00000000..7b802b62 --- /dev/null +++ b/src/mcp-server/tools/requestsCreateRequestComment.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { requestsCreateRequestComment } from "../../funcs/requestsCreateRequestComment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateRequestCommentRequest$inboundSchema, +}; + +export const tool$requestsCreateRequestComment: ToolDefinition = { + name: "requests-create-request-comment", + description: `Comment on an access request`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await requestsCreateRequestComment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/requestsDenyRequest.ts b/src/mcp-server/tools/requestsDenyRequest.ts new file mode 100644 index 00000000..864db8a2 --- /dev/null +++ b/src/mcp-server/tools/requestsDenyRequest.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { requestsDenyRequest } from "../../funcs/requestsDenyRequest.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DenyRequestRequest$inboundSchema, +}; + +export const tool$requestsDenyRequest: ToolDefinition = { + name: "requests-deny-request", + description: `Deny an access request`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await requestsDenyRequest( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/requestsGetRequest.ts b/src/mcp-server/tools/requestsGetRequest.ts index 18d28040..9f2777c7 100644 --- a/src/mcp-server/tools/requestsGetRequest.ts +++ b/src/mcp-server/tools/requestsGetRequest.ts @@ -12,7 +12,9 @@ const args = { export const tool$requestsGetRequest: ToolDefinition = { name: "requests-get-request", - description: `Returns a request by ID.`, + description: `Get request by ID + +Returns a request by ID.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/requestsGetRequestComments.ts b/src/mcp-server/tools/requestsGetRequestComments.ts new file mode 100644 index 00000000..88ef687a --- /dev/null +++ b/src/mcp-server/tools/requestsGetRequestComments.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { requestsGetRequestComments } from "../../funcs/requestsGetRequestComments.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetRequestCommentsRequest$inboundSchema, +}; + +export const tool$requestsGetRequestComments: ToolDefinition = { + name: "requests-get-request-comments", + description: `Returns a list of comments for a specific request.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await requestsGetRequestComments( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/requestsGetRequests.ts b/src/mcp-server/tools/requestsGetRequests.ts index d232748c..cf769113 100644 --- a/src/mcp-server/tools/requestsGetRequests.ts +++ b/src/mcp-server/tools/requestsGetRequests.ts @@ -12,8 +12,9 @@ const args = { export const tool$requestsGetRequests: ToolDefinition = { name: "requests-get-requests", - description: - `Returns a list of requests for your organization that is visible by the admin.`, + description: `Get requests + +Returns a list of requests for your organization that is visible by the admin.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/requestsGetRequestsRelay.ts b/src/mcp-server/tools/requestsGetRequestsRelay.ts index 61a85e34..cbbc562c 100644 --- a/src/mcp-server/tools/requestsGetRequestsRelay.ts +++ b/src/mcp-server/tools/requestsGetRequestsRelay.ts @@ -12,8 +12,9 @@ const args = { export const tool$requestsGetRequestsRelay: ToolDefinition = { name: "requests-get-requests-relay", - description: - `Returns a paginated list of requests using Relay-style cursor pagination.`, + description: `Get requests via Relay + +Returns a paginated list of requests using Relay-style cursor pagination.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/resourcesGetResource.ts b/src/mcp-server/tools/resourcesGetResource.ts index 94ef2403..e5fa595b 100644 --- a/src/mcp-server/tools/resourcesGetResource.ts +++ b/src/mcp-server/tools/resourcesGetResource.ts @@ -12,7 +12,9 @@ const args = { export const tool$resourcesGetResource: ToolDefinition = { name: "resources-get-resource", - description: `Retrieves a resource.`, + description: `Get resource by ID + +Retrieves a resource.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/resourcesGetResourceGroups.ts b/src/mcp-server/tools/resourcesGetResourceGroups.ts new file mode 100644 index 00000000..5068169b --- /dev/null +++ b/src/mcp-server/tools/resourcesGetResourceGroups.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { resourcesGetResourceGroups } from "../../funcs/resourcesGetResourceGroups.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetResourceGroupsRequest$inboundSchema, +}; + +export const tool$resourcesGetResourceGroups: ToolDefinition = { + name: "resources-get-resource-groups", + description: `Returns a list of groups that grant access to the resource`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await resourcesGetResourceGroups( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/resourcesGetResourceUser.ts b/src/mcp-server/tools/resourcesGetResourceUser.ts index c9b63aca..9d9ec743 100644 --- a/src/mcp-server/tools/resourcesGetResourceUser.ts +++ b/src/mcp-server/tools/resourcesGetResourceUser.ts @@ -12,8 +12,9 @@ const args = { export const tool$resourcesGetResourceUser: ToolDefinition = { name: "resources-get-resource-user", - description: - `Returns information about a specific user's access to a resource.`, + description: `Get resource user + +Returns information about a specific user's access to a resource.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/resourcesGetResourceUsers.ts b/src/mcp-server/tools/resourcesGetResourceUsers.ts index 9ee1af8c..86617ce3 100644 --- a/src/mcp-server/tools/resourcesGetResourceUsers.ts +++ b/src/mcp-server/tools/resourcesGetResourceUsers.ts @@ -12,7 +12,9 @@ const args = { export const tool$resourcesGetResourceUsers: ToolDefinition = { name: "resources-get-resource-users", - description: `Gets the list of users for this resource.`, + description: `Get resource users + +Gets the list of users for this resource.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/resourcesGetResources.ts b/src/mcp-server/tools/resourcesGetResources.ts index 83d1a56f..e2704354 100644 --- a/src/mcp-server/tools/resourcesGetResources.ts +++ b/src/mcp-server/tools/resourcesGetResources.ts @@ -12,7 +12,9 @@ const args = { export const tool$resourcesGetResources: ToolDefinition = { name: "resources-get-resources", - description: `Returns a list of resources for your organization.`, + description: `Get resources + +Returns a list of resources for your organization.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/resourcesGetUserResources.ts b/src/mcp-server/tools/resourcesGetUserResources.ts new file mode 100644 index 00000000..a1decf24 --- /dev/null +++ b/src/mcp-server/tools/resourcesGetUserResources.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { resourcesGetUserResources } from "../../funcs/resourcesGetUserResources.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetUserResourcesRequest$inboundSchema, +}; + +export const tool$resourcesGetUserResources: ToolDefinition = { + name: "resources-get-user-resources", + description: `Gets the list of resources for this user.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await resourcesGetUserResources( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tagsGetTagByID.ts b/src/mcp-server/tools/tagsGetTagByID.ts index 5e4987f5..73ea433c 100644 --- a/src/mcp-server/tools/tagsGetTagByID.ts +++ b/src/mcp-server/tools/tagsGetTagByID.ts @@ -12,8 +12,9 @@ const args = { export const tool$tagsGetTagByID: ToolDefinition = { name: "tags-get-tag-by-ID", - description: - `UNSTABLE. May be removed at any time. Gets a tag with the given id.`, + description: `Get tag by ID + +UNSTABLE. May be removed at any time. Gets a tag with the given id.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/tagsGetTags.ts b/src/mcp-server/tools/tagsGetTags.ts index 6cd51cc0..22e4e25a 100644 --- a/src/mcp-server/tools/tagsGetTags.ts +++ b/src/mcp-server/tools/tagsGetTags.ts @@ -12,7 +12,9 @@ const args = { export const tool$tagsGetTags: ToolDefinition = { name: "tags-get-tags", - description: `Returns a list of tags created by your organization.`, + description: `Get tags + +Returns a list of tags created by your organization.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/tokensDeleteToken.ts b/src/mcp-server/tools/tokensDeleteToken.ts new file mode 100644 index 00000000..a2dc77b9 --- /dev/null +++ b/src/mcp-server/tools/tokensDeleteToken.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tokensDeleteToken } from "../../funcs/tokensDeleteToken.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTokenRequest$inboundSchema, +}; + +export const tool$tokensDeleteToken: ToolDefinition = { + name: "tokens-delete-token", + description: `Delete token + +Deletes a first-party API token. Admins can delete any token. Non-admins can only delete their own tokens when the organization allows all users to create API tokens.`, + scopes: ["write"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tokensDeleteToken( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tokensGetTokens.ts b/src/mcp-server/tools/tokensGetTokens.ts new file mode 100644 index 00000000..a7a5dfda --- /dev/null +++ b/src/mcp-server/tools/tokensGetTokens.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tokensGetTokens } from "../../funcs/tokensGetTokens.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTokensRequest$inboundSchema, +}; + +export const tool$tokensGetTokens: ToolDefinition = { + name: "tokens-get-tokens", + description: `Get tokens + +Returns a list of first-party API tokens for your organization. Requires admin access.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tokensGetTokens( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/uarsCreateUar.ts b/src/mcp-server/tools/uarsCreateUar.ts index 9b1cd033..a06f59f2 100644 --- a/src/mcp-server/tools/uarsCreateUar.ts +++ b/src/mcp-server/tools/uarsCreateUar.ts @@ -12,7 +12,8 @@ const args = { export const tool$uarsCreateUar: ToolDefinition = { name: "uars-create-uar", - description: `Starts a User Access Review.`, + description: + `Starts a User Access Review. Deprecated in favor of \`POST /campaigns\`.`, scopes: ["write"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/uarsGetUARs.ts b/src/mcp-server/tools/uarsGetUARs.ts index e2764ebc..0934875b 100644 --- a/src/mcp-server/tools/uarsGetUARs.ts +++ b/src/mcp-server/tools/uarsGetUARs.ts @@ -12,7 +12,8 @@ const args = { export const tool$uarsGetUARs: ToolDefinition = { name: "uars-get-UA-rs", - description: `Returns a list of \`UAR\` objects.`, + description: + `Returns a list of \`UAR\` objects. Deprecated in favor of \`GET /campaigns\`.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/uarsGetUar.ts b/src/mcp-server/tools/uarsGetUar.ts index bc472801..1ddc29d1 100644 --- a/src/mcp-server/tools/uarsGetUar.ts +++ b/src/mcp-server/tools/uarsGetUar.ts @@ -12,7 +12,8 @@ const args = { export const tool$uarsGetUar: ToolDefinition = { name: "uars-get-uar", - description: `Retrieves a specific UAR.`, + description: + `Retrieves a specific UAR. Deprecated in favor of \`GET /campaigns/{campaign_id}\`.`, scopes: ["read"], args, tool: async (client, args, ctx) => { diff --git a/src/mcp-server/tools/usersGetRemoteUsers.ts b/src/mcp-server/tools/usersGetRemoteUsers.ts new file mode 100644 index 00000000..a113ac19 --- /dev/null +++ b/src/mcp-server/tools/usersGetRemoteUsers.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { usersGetRemoteUsers } from "../../funcs/usersGetRemoteUsers.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetRemoteUsersRequest$inboundSchema, +}; + +export const tool$usersGetRemoteUsers: ToolDefinition = { + name: "users-get-remote-users", + description: `Returns a list of remote users for your organization.`, + scopes: ["read"], + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await usersGetRemoteUsers( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/usersGetUserWhoami.ts b/src/mcp-server/tools/usersGetUserWhoami.ts new file mode 100644 index 00000000..cd07479c --- /dev/null +++ b/src/mcp-server/tools/usersGetUserWhoami.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { usersGetUserWhoami } from "../../funcs/usersGetUserWhoami.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$usersGetUserWhoami: ToolDefinition = { + name: "users-get-user-whoami", + description: `Returns the user that the provided API token authenticates as.`, + scopes: ["read"], + tool: async (client, ctx) => { + const [result, apiCall] = await usersGetUserWhoami( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/models/components/access.ts b/src/models/components/access.ts index 5f406f01..f4e2b608 100644 --- a/src/models/components/access.ts +++ b/src/models/components/access.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -97,7 +97,6 @@ export const Access$inboundSchema: z.ZodType = z "num_access_paths": "numAccessPaths", }); }); - /** @internal */ export type Access$Outbound = { principal_id: string; @@ -138,23 +137,9 @@ export const Access$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Access$ { - /** @deprecated use `Access$inboundSchema` instead. */ - export const inboundSchema = Access$inboundSchema; - /** @deprecated use `Access$outboundSchema` instead. */ - export const outboundSchema = Access$outboundSchema; - /** @deprecated use `Access$Outbound` instead. */ - export type Outbound = Access$Outbound; -} - export function accessToJSON(access: Access): string { return JSON.stringify(Access$outboundSchema.parse(access)); } - export function accessFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/accessentityfilters.ts b/src/models/components/accessentityfilters.ts new file mode 100644 index 00000000..cf54a625 --- /dev/null +++ b/src/models/components/accessentityfilters.ts @@ -0,0 +1,235 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + EntityAdminFilter, + EntityAdminFilter$inboundSchema, + EntityAdminFilter$Outbound, + EntityAdminFilter$outboundSchema, +} from "./entityadminfilter.js"; +import { + EntityItemTypeEnum, + EntityItemTypeEnum$inboundSchema, + EntityItemTypeEnum$outboundSchema, +} from "./entityitemtypeenum.js"; +import { + EntityNameFilter, + EntityNameFilter$inboundSchema, + EntityNameFilter$Outbound, + EntityNameFilter$outboundSchema, +} from "./entitynamefilter.js"; +import { + EntityTagFilter, + EntityTagFilter$inboundSchema, + EntityTagFilter$Outbound, + EntityTagFilter$outboundSchema, +} from "./entitytagfilter.js"; +import { + IdpStatusFilter, + IdpStatusFilter$inboundSchema, + IdpStatusFilter$Outbound, + IdpStatusFilter$outboundSchema, +} from "./idpstatusfilter.js"; + +export const AccessEntityFiltersEntityType = { + Resource: "RESOURCE", + Group: "GROUP", + User: "USER", +} as const; +export type AccessEntityFiltersEntityType = ClosedEnum< + typeof AccessEntityFiltersEntityType +>; + +/** + * Excludes entities matching the embedded filter (logical NOT). Pass a filter object with the same shape as this one — typically a single scalar field, like `{not: {entityTypes: ["RESOURCE"]}}` to exclude resources. + * + * @remarks + */ +export type Not = {}; + +/** + * Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + */ +export type AccessEntityFilters = { + /** + * Filter by entity type. Only RESOURCE, GROUP, and USER are queryable via OpalQuery. + */ + entityTypes?: Array | undefined; + /** + * Filter by entity item types. + */ + entityItemTypes?: Array | undefined; + /** + * Filters entities by name using a string match strategy. + */ + entityName?: EntityNameFilter | undefined; + /** + * Filters entities by a tag key/value pair, optionally scoped to a connection. + */ + entityTag?: EntityTagFilter | undefined; + /** + * Filters USER entities by their HR/IDP lifecycle status. Only applies to USER entities; GROUP and RESOURCE entities never match, in either polarity. `statuses` combine with OR. `not` inverts the match within the user domain (e.g. "IDP status is NOT active"), so it still returns only users rather than sweeping in groups/resources. + * + * @remarks + */ + hrIdpStatus?: IdpStatusFilter | undefined; + /** + * Filters GROUP and RESOURCE entities by their admin owner. USER entities never match, in either polarity. `not` inverts the match within the resource/group domain (self-negating, like IdpStatusFilter): omit it (or false) to include entities owned by the given owners, set it true to exclude them. + * + * @remarks + */ + entityAdminOwner?: EntityAdminFilter | undefined; + /** + * Filter by specific entity UUIDs. + */ + entityIDs?: Array | undefined; + /** + * Filter by app IDs from which returned nodes will be imported from. + */ + importedFromApp?: Array | undefined; + /** + * Filter by role remote IDs. Can only be applied within a hasAccessTo clause. + */ + roleRemoteIds?: Array | undefined; + /** + * Filter by role display names (e.g. "Admin", "Read"). Can only be applied within a hasAccessTo clause. + */ + roleNames?: Array | undefined; + /** + * A list of nested filters that must all match (logical AND). Each + * + * @remarks + * + * item has the same shape as this object — scalar fields like + * `entityTypes` or `entityTag`, and can further nest `allOf`, + * `anyOf`, or `not`. + */ + allOf?: Array | undefined; + /** + * A list of nested filters where at least one must match (logical + * + * @remarks + * + * OR). Each item has the same shape as this object. + */ + anyOf?: Array | undefined; + /** + * Excludes entities matching the embedded filter (logical NOT). Pass a filter object with the same shape as this one — typically a single scalar field, like `{not: {entityTypes: ["RESOURCE"]}}` to exclude resources. + * + * @remarks + */ + not?: Not | undefined; +}; + +/** @internal */ +export const AccessEntityFiltersEntityType$inboundSchema: z.ZodNativeEnum< + typeof AccessEntityFiltersEntityType +> = z.nativeEnum(AccessEntityFiltersEntityType); +/** @internal */ +export const AccessEntityFiltersEntityType$outboundSchema: z.ZodNativeEnum< + typeof AccessEntityFiltersEntityType +> = AccessEntityFiltersEntityType$inboundSchema; + +/** @internal */ +export const Not$inboundSchema: z.ZodType = z + .object({}); +/** @internal */ +export type Not$Outbound = {}; + +/** @internal */ +export const Not$outboundSchema: z.ZodType = z + .object({}); + +export function notToJSON(not: Not): string { + return JSON.stringify(Not$outboundSchema.parse(not)); +} +export function notFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Not$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Not' from JSON`, + ); +} + +/** @internal */ +export const AccessEntityFilters$inboundSchema: z.ZodType< + AccessEntityFilters, + z.ZodTypeDef, + unknown +> = z.object({ + entityTypes: z.array(AccessEntityFiltersEntityType$inboundSchema).optional(), + entityItemTypes: z.array(EntityItemTypeEnum$inboundSchema).optional(), + entityName: EntityNameFilter$inboundSchema.optional(), + entityTag: EntityTagFilter$inboundSchema.optional(), + hrIdpStatus: IdpStatusFilter$inboundSchema.optional(), + entityAdminOwner: EntityAdminFilter$inboundSchema.optional(), + entityIDs: z.array(z.string()).optional(), + importedFromApp: z.array(z.string()).optional(), + roleRemoteIds: z.array(z.string()).optional(), + roleNames: z.array(z.string()).optional(), + allOf: z.array(z.lazy(() => AccessEntityFilters$inboundSchema)).optional(), + anyOf: z.array(z.lazy(() => AccessEntityFilters$inboundSchema)).optional(), + not: z.lazy(() => Not$inboundSchema).optional(), +}); +/** @internal */ +export type AccessEntityFilters$Outbound = { + entityTypes?: Array | undefined; + entityItemTypes?: Array | undefined; + entityName?: EntityNameFilter$Outbound | undefined; + entityTag?: EntityTagFilter$Outbound | undefined; + hrIdpStatus?: IdpStatusFilter$Outbound | undefined; + entityAdminOwner?: EntityAdminFilter$Outbound | undefined; + entityIDs?: Array | undefined; + importedFromApp?: Array | undefined; + roleRemoteIds?: Array | undefined; + roleNames?: Array | undefined; + allOf?: Array | undefined; + anyOf?: Array | undefined; + not?: Not$Outbound | undefined; +}; + +/** @internal */ +export const AccessEntityFilters$outboundSchema: z.ZodType< + AccessEntityFilters$Outbound, + z.ZodTypeDef, + AccessEntityFilters +> = z.object({ + entityTypes: z.array(AccessEntityFiltersEntityType$outboundSchema).optional(), + entityItemTypes: z.array(EntityItemTypeEnum$outboundSchema).optional(), + entityName: EntityNameFilter$outboundSchema.optional(), + entityTag: EntityTagFilter$outboundSchema.optional(), + hrIdpStatus: IdpStatusFilter$outboundSchema.optional(), + entityAdminOwner: EntityAdminFilter$outboundSchema.optional(), + entityIDs: z.array(z.string()).optional(), + importedFromApp: z.array(z.string()).optional(), + roleRemoteIds: z.array(z.string()).optional(), + roleNames: z.array(z.string()).optional(), + allOf: z.array(z.lazy(() => AccessEntityFilters$outboundSchema)).optional(), + anyOf: z.array(z.lazy(() => AccessEntityFilters$outboundSchema)).optional(), + not: z.lazy(() => Not$outboundSchema).optional(), +}); + +export function accessEntityFiltersToJSON( + accessEntityFilters: AccessEntityFilters, +): string { + return JSON.stringify( + AccessEntityFilters$outboundSchema.parse(accessEntityFilters), + ); +} +export function accessEntityFiltersFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AccessEntityFilters$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AccessEntityFilters' from JSON`, + ); +} diff --git a/src/models/components/accesslist.ts b/src/models/components/accesslist.ts index 99450476..8e9a6c87 100644 --- a/src/models/components/accesslist.ts +++ b/src/models/components/accesslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -25,7 +25,6 @@ export const AccessList$inboundSchema: z.ZodType< > = z.object({ results: z.array(Access$inboundSchema).optional(), }); - /** @internal */ export type AccessList$Outbound = { results?: Array | undefined; @@ -40,23 +39,9 @@ export const AccessList$outboundSchema: z.ZodType< results: z.array(Access$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccessList$ { - /** @deprecated use `AccessList$inboundSchema` instead. */ - export const inboundSchema = AccessList$inboundSchema; - /** @deprecated use `AccessList$outboundSchema` instead. */ - export const outboundSchema = AccessList$outboundSchema; - /** @deprecated use `AccessList$Outbound` instead. */ - export type Outbound = AccessList$Outbound; -} - export function accessListToJSON(accessList: AccessList): string { return JSON.stringify(AccessList$outboundSchema.parse(accessList)); } - export function accessListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/accessrelationshipfilters.ts b/src/models/components/accessrelationshipfilters.ts new file mode 100644 index 00000000..55a5246b --- /dev/null +++ b/src/models/components/accessrelationshipfilters.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AccessEntityFilters, + AccessEntityFilters$inboundSchema, + AccessEntityFilters$Outbound, + AccessEntityFilters$outboundSchema, +} from "./accessentityfilters.js"; + +/** + * Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously. + * + * @remarks + */ +export type AccessRelationshipFilters = { + /** + * Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + */ + isAccessibleBy?: AccessEntityFilters | undefined; + /** + * Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + */ + hasAccessTo?: AccessEntityFilters | undefined; +}; + +/** @internal */ +export const AccessRelationshipFilters$inboundSchema: z.ZodType< + AccessRelationshipFilters, + z.ZodTypeDef, + unknown +> = z.object({ + isAccessibleBy: AccessEntityFilters$inboundSchema.optional(), + hasAccessTo: AccessEntityFilters$inboundSchema.optional(), +}); +/** @internal */ +export type AccessRelationshipFilters$Outbound = { + isAccessibleBy?: AccessEntityFilters$Outbound | undefined; + hasAccessTo?: AccessEntityFilters$Outbound | undefined; +}; + +/** @internal */ +export const AccessRelationshipFilters$outboundSchema: z.ZodType< + AccessRelationshipFilters$Outbound, + z.ZodTypeDef, + AccessRelationshipFilters +> = z.object({ + isAccessibleBy: AccessEntityFilters$outboundSchema.optional(), + hasAccessTo: AccessEntityFilters$outboundSchema.optional(), +}); + +export function accessRelationshipFiltersToJSON( + accessRelationshipFilters: AccessRelationshipFilters, +): string { + return JSON.stringify( + AccessRelationshipFilters$outboundSchema.parse(accessRelationshipFilters), + ); +} +export function accessRelationshipFiltersFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AccessRelationshipFilters$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AccessRelationshipFilters' from JSON`, + ); +} diff --git a/src/models/components/accessrule.ts b/src/models/components/accessrule.ts index 7785ebea..36a724e4 100644 --- a/src/models/components/accessrule.ts +++ b/src/models/components/accessrule.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; @@ -35,7 +35,7 @@ export type AccessRuleStatus = ClosedEnum; * The `AccessRule` object is used to represent an access rule configuration. * * ### Usage Example - * Get access rule configurations from the `GET Access Rule Configs` endpoint. + * List access rules from the `GET /access-rules` endpoint, or retrieve a single access rule from the `GET /access-rules/{access_rule_id}` endpoint. */ export type AccessRule = { /** @@ -65,23 +65,11 @@ export type AccessRule = { export const AccessRuleStatus$inboundSchema: z.ZodNativeEnum< typeof AccessRuleStatus > = z.nativeEnum(AccessRuleStatus); - /** @internal */ export const AccessRuleStatus$outboundSchema: z.ZodNativeEnum< typeof AccessRuleStatus > = AccessRuleStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccessRuleStatus$ { - /** @deprecated use `AccessRuleStatus$inboundSchema` instead. */ - export const inboundSchema = AccessRuleStatus$inboundSchema; - /** @deprecated use `AccessRuleStatus$outboundSchema` instead. */ - export const outboundSchema = AccessRuleStatus$outboundSchema; -} - /** @internal */ export const AccessRule$inboundSchema: z.ZodType< AccessRule, @@ -100,7 +88,6 @@ export const AccessRule$inboundSchema: z.ZodType< "admin_owner_id": "adminOwnerId", }); }); - /** @internal */ export type AccessRule$Outbound = { access_rule_id: string; @@ -130,23 +117,9 @@ export const AccessRule$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccessRule$ { - /** @deprecated use `AccessRule$inboundSchema` instead. */ - export const inboundSchema = AccessRule$inboundSchema; - /** @deprecated use `AccessRule$outboundSchema` instead. */ - export const outboundSchema = AccessRule$outboundSchema; - /** @deprecated use `AccessRule$Outbound` instead. */ - export type Outbound = AccessRule$Outbound; -} - export function accessRuleToJSON(accessRule: AccessRule): string { return JSON.stringify(AccessRule$outboundSchema.parse(accessRule)); } - export function accessRuleFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/apiaccesslevelenum.ts b/src/models/components/apiaccesslevelenum.ts new file mode 100644 index 00000000..6203ef27 --- /dev/null +++ b/src/models/components/apiaccesslevelenum.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The access level of an API token. + */ +export const ApiAccessLevelEnum = { + ReadOnly: "READ_ONLY", + FullAccess: "FULL_ACCESS", +} as const; +/** + * The access level of an API token. + */ +export type ApiAccessLevelEnum = ClosedEnum; + +/** @internal */ +export const ApiAccessLevelEnum$inboundSchema: z.ZodNativeEnum< + typeof ApiAccessLevelEnum +> = z.nativeEnum(ApiAccessLevelEnum); +/** @internal */ +export const ApiAccessLevelEnum$outboundSchema: z.ZodNativeEnum< + typeof ApiAccessLevelEnum +> = ApiAccessLevelEnum$inboundSchema; diff --git a/src/models/components/app.ts b/src/models/components/app.ts index 669d3875..13d4bcc8 100644 --- a/src/models/components/app.ts +++ b/src/models/components/app.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -72,7 +72,6 @@ export const App$inboundSchema: z.ZodType = z "app_type": "appType", }); }); - /** @internal */ export type App$Outbound = { app_id: string; @@ -100,23 +99,9 @@ export const App$outboundSchema: z.ZodType = z }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace App$ { - /** @deprecated use `App$inboundSchema` instead. */ - export const inboundSchema = App$inboundSchema; - /** @deprecated use `App$outboundSchema` instead. */ - export const outboundSchema = App$outboundSchema; - /** @deprecated use `App$Outbound` instead. */ - export type Outbound = App$Outbound; -} - export function appToJSON(app: App): string { return JSON.stringify(App$outboundSchema.parse(app)); } - export function appFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/appslist.ts b/src/models/components/appslist.ts index 9166d1c0..09349591 100644 --- a/src/models/components/appslist.ts +++ b/src/models/components/appslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,7 +28,6 @@ export const AppsList$inboundSchema: z.ZodType< > = z.object({ apps: z.array(App$inboundSchema), }); - /** @internal */ export type AppsList$Outbound = { apps: Array; @@ -43,23 +42,9 @@ export const AppsList$outboundSchema: z.ZodType< apps: z.array(App$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AppsList$ { - /** @deprecated use `AppsList$inboundSchema` instead. */ - export const inboundSchema = AppsList$inboundSchema; - /** @deprecated use `AppsList$outboundSchema` instead. */ - export const outboundSchema = AppsList$outboundSchema; - /** @deprecated use `AppsList$Outbound` instead. */ - export type Outbound = AppsList$Outbound; -} - export function appsListToJSON(appsList: AppsList): string { return JSON.stringify(AppsList$outboundSchema.parse(appsList)); } - export function appsListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/apptypeenum.ts b/src/models/components/apptypeenum.ts index 39800130..0e9882d6 100644 --- a/src/models/components/apptypeenum.ts +++ b/src/models/components/apptypeenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -10,28 +10,58 @@ import { ClosedEnum } from "../../types/enums.js"; */ export const AppTypeEnum = { ActiveDirectory: "ACTIVE_DIRECTORY", + Anthropic: "ANTHROPIC", AzureAd: "AZURE_AD", Aws: "AWS", AwsSso: "AWS_SSO", + Clickhouse: "CLICKHOUSE", + Coupa: "COUPA", + Cursor: "CURSOR", Custom: "CUSTOM", + Confluence: "CONFLUENCE", + CustomConnector: "CUSTOM_CONNECTOR", + Databricks: "DATABRICKS", + DatastaxAstra: "DATASTAX_ASTRA", + Alicloud: "ALICLOUD", + Devin: "DEVIN", + Docusign: "DOCUSIGN", Duo: "DUO", Gcp: "GCP", GitHub: "GIT_HUB", GitLab: "GIT_LAB", GoogleGroups: "GOOGLE_GROUPS", GoogleWorkspace: "GOOGLE_WORKSPACE", + Grafana: "GRAFANA", + Hubspot: "HUBSPOT", + Ilevel: "ILEVEL", + Incidentio: "INCIDENTIO", + Jira: "JIRA", Ldap: "LDAP", Mariadb: "MARIADB", Mongo: "MONGO", MongoAtlas: "MONGO_ATLAS", Mysql: "MYSQL", + Netsuite: "NETSUITE", + Datadog: "DATADOG", + OktaCiam: "OKTA_CIAM", OktaDirectory: "OKTA_DIRECTORY", + OpenaiPlatform: "OPENAI_PLATFORM", Opal: "OPAL", + OracleFusion: "ORACLE_FUSION", Pagerduty: "PAGERDUTY", + Postgres: "POSTGRES", + Rootly: "ROOTLY", Salesforce: "SALESFORCE", + Snowflake: "SNOWFLAKE", + Slack: "SLACK", + Tableau: "TABLEAU", Tailscale: "TAILSCALE", Teleport: "TELEPORT", + Twingate: "TWINGATE", + Vault: "VAULT", Workday: "WORKDAY", + Zendesk: "ZENDESK", + Zoom: "ZOOM", } as const; /** * The type of an app. @@ -41,18 +71,6 @@ export type AppTypeEnum = ClosedEnum; /** @internal */ export const AppTypeEnum$inboundSchema: z.ZodNativeEnum = z .nativeEnum(AppTypeEnum); - /** @internal */ export const AppTypeEnum$outboundSchema: z.ZodNativeEnum = AppTypeEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AppTypeEnum$ { - /** @deprecated use `AppTypeEnum$inboundSchema` instead. */ - export const inboundSchema = AppTypeEnum$inboundSchema; - /** @deprecated use `AppTypeEnum$outboundSchema` instead. */ - export const outboundSchema = AppTypeEnum$outboundSchema; -} diff --git a/src/models/components/appvalidation.ts b/src/models/components/appvalidation.ts index 2eb6fa10..bc3e47ec 100644 --- a/src/models/components/appvalidation.ts +++ b/src/models/components/appvalidation.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -78,7 +78,6 @@ export const AppValidation$inboundSchema: z.ZodType< "updated_at": "updatedAt", }); }); - /** @internal */ export type AppValidation$Outbound = { key: string; @@ -110,23 +109,9 @@ export const AppValidation$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AppValidation$ { - /** @deprecated use `AppValidation$inboundSchema` instead. */ - export const inboundSchema = AppValidation$inboundSchema; - /** @deprecated use `AppValidation$outboundSchema` instead. */ - export const outboundSchema = AppValidation$outboundSchema; - /** @deprecated use `AppValidation$Outbound` instead. */ - export type Outbound = AppValidation$Outbound; -} - export function appValidationToJSON(appValidation: AppValidation): string { return JSON.stringify(AppValidation$outboundSchema.parse(appValidation)); } - export function appValidationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/appvalidationseverityenum.ts b/src/models/components/appvalidationseverityenum.ts index bc462785..070a5f81 100644 --- a/src/models/components/appvalidationseverityenum.ts +++ b/src/models/components/appvalidationseverityenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -25,19 +25,7 @@ export type AppValidationSeverityEnum = ClosedEnum< export const AppValidationSeverityEnum$inboundSchema: z.ZodNativeEnum< typeof AppValidationSeverityEnum > = z.nativeEnum(AppValidationSeverityEnum); - /** @internal */ export const AppValidationSeverityEnum$outboundSchema: z.ZodNativeEnum< typeof AppValidationSeverityEnum > = AppValidationSeverityEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AppValidationSeverityEnum$ { - /** @deprecated use `AppValidationSeverityEnum$inboundSchema` instead. */ - export const inboundSchema = AppValidationSeverityEnum$inboundSchema; - /** @deprecated use `AppValidationSeverityEnum$outboundSchema` instead. */ - export const outboundSchema = AppValidationSeverityEnum$outboundSchema; -} diff --git a/src/models/components/appvalidationstatusenum.ts b/src/models/components/appvalidationstatusenum.ts index 8bede080..435a0795 100644 --- a/src/models/components/appvalidationstatusenum.ts +++ b/src/models/components/appvalidationstatusenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -23,19 +23,7 @@ export type AppValidationStatusEnum = ClosedEnum< export const AppValidationStatusEnum$inboundSchema: z.ZodNativeEnum< typeof AppValidationStatusEnum > = z.nativeEnum(AppValidationStatusEnum); - /** @internal */ export const AppValidationStatusEnum$outboundSchema: z.ZodNativeEnum< typeof AppValidationStatusEnum > = AppValidationStatusEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AppValidationStatusEnum$ { - /** @deprecated use `AppValidationStatusEnum$inboundSchema` instead. */ - export const inboundSchema = AppValidationStatusEnum$inboundSchema; - /** @deprecated use `AppValidationStatusEnum$outboundSchema` instead. */ - export const outboundSchema = AppValidationStatusEnum$outboundSchema; -} diff --git a/src/models/components/bundle.ts b/src/models/components/bundle.ts index 950894f6..31a335f6 100644 --- a/src/models/components/bundle.ts +++ b/src/models/components/bundle.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -74,7 +74,6 @@ export const Bundle$inboundSchema: z.ZodType = z "total_num_groups": "totalNumGroups", }); }); - /** @internal */ export type Bundle$Outbound = { bundle_id?: string | undefined; @@ -115,23 +114,9 @@ export const Bundle$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Bundle$ { - /** @deprecated use `Bundle$inboundSchema` instead. */ - export const inboundSchema = Bundle$inboundSchema; - /** @deprecated use `Bundle$outboundSchema` instead. */ - export const outboundSchema = Bundle$outboundSchema; - /** @deprecated use `Bundle$Outbound` instead. */ - export type Outbound = Bundle$Outbound; -} - export function bundleToJSON(bundle: Bundle): string { return JSON.stringify(Bundle$outboundSchema.parse(bundle)); } - export function bundleFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/bundlegroup.ts b/src/models/components/bundlegroup.ts index 05c99092..6bd1e5a7 100644 --- a/src/models/components/bundlegroup.ts +++ b/src/models/components/bundlegroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -45,7 +45,6 @@ export const BundleGroup$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type BundleGroup$Outbound = { bundle_id?: string | undefined; @@ -73,23 +72,9 @@ export const BundleGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BundleGroup$ { - /** @deprecated use `BundleGroup$inboundSchema` instead. */ - export const inboundSchema = BundleGroup$inboundSchema; - /** @deprecated use `BundleGroup$outboundSchema` instead. */ - export const outboundSchema = BundleGroup$outboundSchema; - /** @deprecated use `BundleGroup$Outbound` instead. */ - export type Outbound = BundleGroup$Outbound; -} - export function bundleGroupToJSON(bundleGroup: BundleGroup): string { return JSON.stringify(BundleGroup$outboundSchema.parse(bundleGroup)); } - export function bundleGroupFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/bundleinput.ts b/src/models/components/bundleinput.ts index 4d3e1dba..2e9bfb2b 100644 --- a/src/models/components/bundleinput.ts +++ b/src/models/components/bundleinput.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -37,7 +37,6 @@ export const BundleInput$inboundSchema: z.ZodType< "admin_owner_id": "adminOwnerId", }); }); - /** @internal */ export type BundleInput$Outbound = { name?: string | undefined; @@ -60,23 +59,9 @@ export const BundleInput$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BundleInput$ { - /** @deprecated use `BundleInput$inboundSchema` instead. */ - export const inboundSchema = BundleInput$inboundSchema; - /** @deprecated use `BundleInput$outboundSchema` instead. */ - export const outboundSchema = BundleInput$outboundSchema; - /** @deprecated use `BundleInput$Outbound` instead. */ - export type Outbound = BundleInput$Outbound; -} - export function bundleInputToJSON(bundleInput: BundleInput): string { return JSON.stringify(BundleInput$outboundSchema.parse(bundleInput)); } - export function bundleInputFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/bundleresource.ts b/src/models/components/bundleresource.ts index a6efc1ba..1502e62f 100644 --- a/src/models/components/bundleresource.ts +++ b/src/models/components/bundleresource.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -45,7 +45,6 @@ export const BundleResource$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type BundleResource$Outbound = { bundle_id?: string | undefined; @@ -73,23 +72,9 @@ export const BundleResource$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BundleResource$ { - /** @deprecated use `BundleResource$inboundSchema` instead. */ - export const inboundSchema = BundleResource$inboundSchema; - /** @deprecated use `BundleResource$outboundSchema` instead. */ - export const outboundSchema = BundleResource$outboundSchema; - /** @deprecated use `BundleResource$Outbound` instead. */ - export type Outbound = BundleResource$Outbound; -} - export function bundleResourceToJSON(bundleResource: BundleResource): string { return JSON.stringify(BundleResource$outboundSchema.parse(bundleResource)); } - export function bundleResourceFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/campaign.ts b/src/models/components/campaign.ts new file mode 100644 index 00000000..04b080ca --- /dev/null +++ b/src/models/components/campaign.ts @@ -0,0 +1,568 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AccessEntityFilters, + AccessEntityFilters$inboundSchema, + AccessEntityFilters$Outbound, + AccessEntityFilters$outboundSchema, +} from "./accessentityfilters.js"; +import { + AccessRelationshipFilters, + AccessRelationshipFilters$inboundSchema, + AccessRelationshipFilters$Outbound, + AccessRelationshipFilters$outboundSchema, +} from "./accessrelationshipfilters.js"; +import { + CampaignGroupAssetVisibilityPolicyEnum, + CampaignGroupAssetVisibilityPolicyEnum$inboundSchema, + CampaignGroupAssetVisibilityPolicyEnum$outboundSchema, +} from "./campaigngroupassetvisibilitypolicyenum.js"; +import { + CampaignRevokeOnEnum, + CampaignRevokeOnEnum$inboundSchema, + CampaignRevokeOnEnum$outboundSchema, +} from "./campaignrevokeonenum.js"; +import { + CampaignStatusEnum, + CampaignStatusEnum$inboundSchema, + CampaignStatusEnum$outboundSchema, +} from "./campaignstatusenum.js"; +import { + OpalAccessPathEdgeFilter, + OpalAccessPathEdgeFilter$inboundSchema, + OpalAccessPathEdgeFilter$Outbound, + OpalAccessPathEdgeFilter$outboundSchema, +} from "./opalaccesspathedgefilter.js"; +import { + UARReviewerAssignmentPolicyEnum, + UARReviewerAssignmentPolicyEnum$inboundSchema, + UARReviewerAssignmentPolicyEnum$outboundSchema, +} from "./uarreviewerassignmentpolicyenum.js"; + +/** + * Access-path query defining the scope of access to review. Uses the same principalFilter / entitlementFilter shape as ACCESS_PATH OpalQuery. + */ +export type Query = { + /** + * Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + */ + principalFilter?: AccessEntityFilters | undefined; + /** + * Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + */ + entitlementFilter?: AccessEntityFilters | undefined; + /** + * Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously. + * + * @remarks + */ + principalAccessFilters?: AccessRelationshipFilters | undefined; + /** + * Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously. + * + * @remarks + */ + entitlementAccessFilters?: AccessRelationshipFilters | undefined; + /** + * Filter by access-level remote IDs on the terminal edge. + */ + accessLevelRemoteIds?: Array | undefined; + /** + * Filter by access-level display names on the terminal edge. + */ + accessLevelNames?: Array | undefined; + /** + * Constraints on the access path edges themselves. + */ + edgeFilter?: OpalAccessPathEdgeFilter | undefined; +}; + +/** + * The campaign's configuration, if set. + */ +export type Configuration = { + /** + * The ID of the campaign configuration. + */ + configurationId: string; + /** + * The creation time of the configuration. + */ + createdAt: Date; + /** + * The last updated time of the configuration. + */ + updatedAt: Date; + /** + * Access-path query defining the scope of access to review. Uses the same principalFilter / entitlementFilter shape as ACCESS_PATH OpalQuery. + */ + query?: Query | null | undefined; + /** + * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. + */ + reviewerAssignmentPolicy: UARReviewerAssignmentPolicyEnum; + /** + * Whether reviewers can review their own access. + */ + allowSelfReview: boolean; + /** + * Whether to notify reviewers upon assignment. + */ + sendReviewerAssignmentNotification: boolean; + /** + * Whether reviewers may reassign their reviews to another user. + */ + allowReviewerReassignment: boolean; + /** + * Scheduled start date of the campaign. + */ + startDate?: Date | null | undefined; + /** + * Scheduled end date of the campaign. + */ + endDate?: Date | null | undefined; + /** + * IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). + */ + timezone: string; + /** + * When access decisions take effect during a campaign. + */ + revokeOn: CampaignRevokeOnEnum; + /** + * Days before end date to send reminder notifications. + */ + reminderSchedule?: Array | undefined; + /** + * Whether to include the reviewer's manager in reminders. + */ + reminderIncludeManager: boolean; + /** + * Whether reviewers must provide a reason when denying (revoking) access. + */ + requireReasonOnDenial: boolean; + /** + * Whether AI suggestions are hidden from reviewers. + */ + hideAiSuggestions: boolean; + /** + * Optional custom message included when notifying reviewers that the campaign started. + */ + customStartMessage?: string | null | undefined; + /** + * Controls what group assets reviewers can see during the campaign. + */ + groupAssetVisibilityPolicy: CampaignGroupAssetVisibilityPolicyEnum; + /** + * Whether this configuration is a recurring schedule template. + */ + isTemplate: boolean; + /** + * Cron expression driving the recurring schedule. Null for one-off campaigns. + */ + cronExpression?: string | null | undefined; + /** + * Next time a draft will be generated from this template. + */ + nextScheduledRun?: Date | null | undefined; + /** + * Most recent time a draft was generated from this template. + */ + lastScheduledRun?: Date | null | undefined; + /** + * Deadline window in days applied to each draft generated from this template. + */ + recurringDurationDays?: number | null | undefined; +}; + +/** + * An access review campaign. + */ +export type Campaign = { + /** + * The ID of the campaign. + */ + campaignId: string; + /** + * The name of the campaign. + */ + name: string; + /** + * The current status of a campaign. + */ + status: CampaignStatusEnum; + /** + * Whether this campaign is a recurring schedule template. Templates spawn draft campaigns on schedule rather than being reviewed directly. + */ + isTemplate: boolean; + /** + * The creation time of the campaign. + */ + createdAt: Date; + /** + * The last updated time of the campaign. + */ + updatedAt: Date; + /** + * The ID of the user who created the campaign. + */ + createdByUserId: string; + /** + * The campaign's configuration, if set. + */ + configuration?: Configuration | null | undefined; + /** + * The time the campaign was started, if started. + */ + startedAt?: Date | null | undefined; + /** + * The ID of the user who started the campaign, if started. + */ + startedByUserId?: string | null | undefined; + /** + * The time the campaign was manually stopped, if stopped. + */ + stoppedAt?: Date | null | undefined; + /** + * The ID of the user who stopped the campaign, if stopped. + */ + stoppedByUserId?: string | null | undefined; + /** + * The time the campaign reached its scheduled end, if ended. + */ + endedAt?: Date | null | undefined; + /** + * The ID of the user who ended the campaign, if ended. + */ + endedByUserId?: string | null | undefined; +}; + +/** @internal */ +export const Query$inboundSchema: z.ZodType = z + .object({ + principalFilter: AccessEntityFilters$inboundSchema.optional(), + entitlementFilter: AccessEntityFilters$inboundSchema.optional(), + principalAccessFilters: AccessRelationshipFilters$inboundSchema.optional(), + entitlementAccessFilters: AccessRelationshipFilters$inboundSchema + .optional(), + accessLevelRemoteIds: z.array(z.string()).optional(), + accessLevelNames: z.array(z.string()).optional(), + edgeFilter: OpalAccessPathEdgeFilter$inboundSchema.optional(), + }); +/** @internal */ +export type Query$Outbound = { + principalFilter?: AccessEntityFilters$Outbound | undefined; + entitlementFilter?: AccessEntityFilters$Outbound | undefined; + principalAccessFilters?: AccessRelationshipFilters$Outbound | undefined; + entitlementAccessFilters?: AccessRelationshipFilters$Outbound | undefined; + accessLevelRemoteIds?: Array | undefined; + accessLevelNames?: Array | undefined; + edgeFilter?: OpalAccessPathEdgeFilter$Outbound | undefined; +}; + +/** @internal */ +export const Query$outboundSchema: z.ZodType< + Query$Outbound, + z.ZodTypeDef, + Query +> = z.object({ + principalFilter: AccessEntityFilters$outboundSchema.optional(), + entitlementFilter: AccessEntityFilters$outboundSchema.optional(), + principalAccessFilters: AccessRelationshipFilters$outboundSchema.optional(), + entitlementAccessFilters: AccessRelationshipFilters$outboundSchema.optional(), + accessLevelRemoteIds: z.array(z.string()).optional(), + accessLevelNames: z.array(z.string()).optional(), + edgeFilter: OpalAccessPathEdgeFilter$outboundSchema.optional(), +}); + +export function queryToJSON(query: Query): string { + return JSON.stringify(Query$outboundSchema.parse(query)); +} +export function queryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Query$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Query' from JSON`, + ); +} + +/** @internal */ +export const Configuration$inboundSchema: z.ZodType< + Configuration, + z.ZodTypeDef, + unknown +> = z.object({ + configuration_id: z.string(), + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + query: z.nullable(z.lazy(() => Query$inboundSchema)).optional(), + reviewer_assignment_policy: UARReviewerAssignmentPolicyEnum$inboundSchema, + allow_self_review: z.boolean(), + send_reviewer_assignment_notification: z.boolean(), + allow_reviewer_reassignment: z.boolean(), + start_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + end_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + timezone: z.string(), + revoke_on: CampaignRevokeOnEnum$inboundSchema, + reminder_schedule: z.array(z.number().int()).optional(), + reminder_include_manager: z.boolean(), + require_reason_on_denial: z.boolean(), + hide_ai_suggestions: z.boolean(), + custom_start_message: z.nullable(z.string()).optional(), + group_asset_visibility_policy: + CampaignGroupAssetVisibilityPolicyEnum$inboundSchema, + is_template: z.boolean(), + cron_expression: z.nullable(z.string()).optional(), + next_scheduled_run: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + last_scheduled_run: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + recurring_duration_days: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "configuration_id": "configurationId", + "created_at": "createdAt", + "updated_at": "updatedAt", + "reviewer_assignment_policy": "reviewerAssignmentPolicy", + "allow_self_review": "allowSelfReview", + "send_reviewer_assignment_notification": + "sendReviewerAssignmentNotification", + "allow_reviewer_reassignment": "allowReviewerReassignment", + "start_date": "startDate", + "end_date": "endDate", + "revoke_on": "revokeOn", + "reminder_schedule": "reminderSchedule", + "reminder_include_manager": "reminderIncludeManager", + "require_reason_on_denial": "requireReasonOnDenial", + "hide_ai_suggestions": "hideAiSuggestions", + "custom_start_message": "customStartMessage", + "group_asset_visibility_policy": "groupAssetVisibilityPolicy", + "is_template": "isTemplate", + "cron_expression": "cronExpression", + "next_scheduled_run": "nextScheduledRun", + "last_scheduled_run": "lastScheduledRun", + "recurring_duration_days": "recurringDurationDays", + }); +}); +/** @internal */ +export type Configuration$Outbound = { + configuration_id: string; + created_at: string; + updated_at: string; + query?: Query$Outbound | null | undefined; + reviewer_assignment_policy: string; + allow_self_review: boolean; + send_reviewer_assignment_notification: boolean; + allow_reviewer_reassignment: boolean; + start_date?: string | null | undefined; + end_date?: string | null | undefined; + timezone: string; + revoke_on: string; + reminder_schedule?: Array | undefined; + reminder_include_manager: boolean; + require_reason_on_denial: boolean; + hide_ai_suggestions: boolean; + custom_start_message?: string | null | undefined; + group_asset_visibility_policy: string; + is_template: boolean; + cron_expression?: string | null | undefined; + next_scheduled_run?: string | null | undefined; + last_scheduled_run?: string | null | undefined; + recurring_duration_days?: number | null | undefined; +}; + +/** @internal */ +export const Configuration$outboundSchema: z.ZodType< + Configuration$Outbound, + z.ZodTypeDef, + Configuration +> = z.object({ + configurationId: z.string(), + createdAt: z.date().transform(v => v.toISOString()), + updatedAt: z.date().transform(v => v.toISOString()), + query: z.nullable(z.lazy(() => Query$outboundSchema)).optional(), + reviewerAssignmentPolicy: UARReviewerAssignmentPolicyEnum$outboundSchema, + allowSelfReview: z.boolean(), + sendReviewerAssignmentNotification: z.boolean(), + allowReviewerReassignment: z.boolean(), + startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + timezone: z.string(), + revokeOn: CampaignRevokeOnEnum$outboundSchema, + reminderSchedule: z.array(z.number().int()).optional(), + reminderIncludeManager: z.boolean(), + requireReasonOnDenial: z.boolean(), + hideAiSuggestions: z.boolean(), + customStartMessage: z.nullable(z.string()).optional(), + groupAssetVisibilityPolicy: + CampaignGroupAssetVisibilityPolicyEnum$outboundSchema, + isTemplate: z.boolean(), + cronExpression: z.nullable(z.string()).optional(), + nextScheduledRun: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + lastScheduledRun: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + recurringDurationDays: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + configurationId: "configuration_id", + createdAt: "created_at", + updatedAt: "updated_at", + reviewerAssignmentPolicy: "reviewer_assignment_policy", + allowSelfReview: "allow_self_review", + sendReviewerAssignmentNotification: "send_reviewer_assignment_notification", + allowReviewerReassignment: "allow_reviewer_reassignment", + startDate: "start_date", + endDate: "end_date", + revokeOn: "revoke_on", + reminderSchedule: "reminder_schedule", + reminderIncludeManager: "reminder_include_manager", + requireReasonOnDenial: "require_reason_on_denial", + hideAiSuggestions: "hide_ai_suggestions", + customStartMessage: "custom_start_message", + groupAssetVisibilityPolicy: "group_asset_visibility_policy", + isTemplate: "is_template", + cronExpression: "cron_expression", + nextScheduledRun: "next_scheduled_run", + lastScheduledRun: "last_scheduled_run", + recurringDurationDays: "recurring_duration_days", + }); +}); + +export function configurationToJSON(configuration: Configuration): string { + return JSON.stringify(Configuration$outboundSchema.parse(configuration)); +} +export function configurationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Configuration$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Configuration' from JSON`, + ); +} + +/** @internal */ +export const Campaign$inboundSchema: z.ZodType< + Campaign, + z.ZodTypeDef, + unknown +> = z.object({ + campaign_id: z.string(), + name: z.string(), + status: CampaignStatusEnum$inboundSchema, + is_template: z.boolean(), + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + created_by_user_id: z.string(), + configuration: z.nullable(z.lazy(() => Configuration$inboundSchema)) + .optional(), + started_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + started_by_user_id: z.nullable(z.string()).optional(), + stopped_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + stopped_by_user_id: z.nullable(z.string()).optional(), + ended_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ended_by_user_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "campaign_id": "campaignId", + "is_template": "isTemplate", + "created_at": "createdAt", + "updated_at": "updatedAt", + "created_by_user_id": "createdByUserId", + "started_at": "startedAt", + "started_by_user_id": "startedByUserId", + "stopped_at": "stoppedAt", + "stopped_by_user_id": "stoppedByUserId", + "ended_at": "endedAt", + "ended_by_user_id": "endedByUserId", + }); +}); +/** @internal */ +export type Campaign$Outbound = { + campaign_id: string; + name: string; + status: string; + is_template: boolean; + created_at: string; + updated_at: string; + created_by_user_id: string; + configuration?: Configuration$Outbound | null | undefined; + started_at?: string | null | undefined; + started_by_user_id?: string | null | undefined; + stopped_at?: string | null | undefined; + stopped_by_user_id?: string | null | undefined; + ended_at?: string | null | undefined; + ended_by_user_id?: string | null | undefined; +}; + +/** @internal */ +export const Campaign$outboundSchema: z.ZodType< + Campaign$Outbound, + z.ZodTypeDef, + Campaign +> = z.object({ + campaignId: z.string(), + name: z.string(), + status: CampaignStatusEnum$outboundSchema, + isTemplate: z.boolean(), + createdAt: z.date().transform(v => v.toISOString()), + updatedAt: z.date().transform(v => v.toISOString()), + createdByUserId: z.string(), + configuration: z.nullable(z.lazy(() => Configuration$outboundSchema)) + .optional(), + startedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + startedByUserId: z.nullable(z.string()).optional(), + stoppedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + stoppedByUserId: z.nullable(z.string()).optional(), + endedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endedByUserId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + campaignId: "campaign_id", + isTemplate: "is_template", + createdAt: "created_at", + updatedAt: "updated_at", + createdByUserId: "created_by_user_id", + startedAt: "started_at", + startedByUserId: "started_by_user_id", + stoppedAt: "stopped_at", + stoppedByUserId: "stopped_by_user_id", + endedAt: "ended_at", + endedByUserId: "ended_by_user_id", + }); +}); + +export function campaignToJSON(campaign: Campaign): string { + return JSON.stringify(Campaign$outboundSchema.parse(campaign)); +} +export function campaignFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Campaign$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Campaign' from JSON`, + ); +} diff --git a/src/models/components/campaigngroupassetvisibilitypolicyenum.ts b/src/models/components/campaigngroupassetvisibilitypolicyenum.ts new file mode 100644 index 00000000..22c2bc6a --- /dev/null +++ b/src/models/components/campaigngroupassetvisibilitypolicyenum.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Controls what group assets reviewers can see during the campaign. + */ +export const CampaignGroupAssetVisibilityPolicyEnum = { + Strict: "STRICT", + ViewVisibleAndAssigned: "VIEW_VISIBLE_AND_ASSIGNED", + ViewAll: "VIEW_ALL", +} as const; +/** + * Controls what group assets reviewers can see during the campaign. + */ +export type CampaignGroupAssetVisibilityPolicyEnum = ClosedEnum< + typeof CampaignGroupAssetVisibilityPolicyEnum +>; + +/** @internal */ +export const CampaignGroupAssetVisibilityPolicyEnum$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + CampaignGroupAssetVisibilityPolicyEnum, + ); +/** @internal */ +export const CampaignGroupAssetVisibilityPolicyEnum$outboundSchema: + z.ZodNativeEnum = + CampaignGroupAssetVisibilityPolicyEnum$inboundSchema; diff --git a/src/models/components/campaignrevokeonenum.ts b/src/models/components/campaignrevokeonenum.ts new file mode 100644 index 00000000..db7800de --- /dev/null +++ b/src/models/components/campaignrevokeonenum.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * When access decisions take effect during a campaign. + */ +export const CampaignRevokeOnEnum = { + Action: "ACTION", + End: "END", + None: "NONE", +} as const; +/** + * When access decisions take effect during a campaign. + */ +export type CampaignRevokeOnEnum = ClosedEnum; + +/** @internal */ +export const CampaignRevokeOnEnum$inboundSchema: z.ZodNativeEnum< + typeof CampaignRevokeOnEnum +> = z.nativeEnum(CampaignRevokeOnEnum); +/** @internal */ +export const CampaignRevokeOnEnum$outboundSchema: z.ZodNativeEnum< + typeof CampaignRevokeOnEnum +> = CampaignRevokeOnEnum$inboundSchema; diff --git a/src/models/components/campaignstatusenum.ts b/src/models/components/campaignstatusenum.ts new file mode 100644 index 00000000..6ced6e1f --- /dev/null +++ b/src/models/components/campaignstatusenum.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The current status of a campaign. + */ +export const CampaignStatusEnum = { + Draft: "DRAFT", + Ongoing: "ONGOING", + Completed: "COMPLETED", + Stopped: "STOPPED", + Ended: "ENDED", +} as const; +/** + * The current status of a campaign. + */ +export type CampaignStatusEnum = ClosedEnum; + +/** @internal */ +export const CampaignStatusEnum$inboundSchema: z.ZodNativeEnum< + typeof CampaignStatusEnum +> = z.nativeEnum(CampaignStatusEnum); +/** @internal */ +export const CampaignStatusEnum$outboundSchema: z.ZodNativeEnum< + typeof CampaignStatusEnum +> = CampaignStatusEnum$inboundSchema; diff --git a/src/models/components/condition.ts b/src/models/components/condition.ts index bac607fd..7c9902ae 100644 --- a/src/models/components/condition.ts +++ b/src/models/components/condition.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -43,7 +43,6 @@ export const Condition$inboundSchema: z.ZodType< "role_remote_ids": "roleRemoteIds", }); }); - /** @internal */ export type Condition$Outbound = { group_ids?: Array | undefined; @@ -65,23 +64,9 @@ export const Condition$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Condition$ { - /** @deprecated use `Condition$inboundSchema` instead. */ - export const inboundSchema = Condition$inboundSchema; - /** @deprecated use `Condition$outboundSchema` instead. */ - export const outboundSchema = Condition$outboundSchema; - /** @deprecated use `Condition$Outbound` instead. */ - export type Outbound = Condition$Outbound; -} - export function conditionToJSON(condition: Condition): string { return JSON.stringify(Condition$outboundSchema.parse(condition)); } - export function conditionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/configurationtemplate.ts b/src/models/components/configurationtemplate.ts index 1439b411..5fd14393 100644 --- a/src/models/components/configurationtemplate.ts +++ b/src/models/components/configurationtemplate.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -113,7 +113,6 @@ export const ConfigurationTemplate$inboundSchema: z.ZodType< "custom_request_notification": "customRequestNotification", }); }); - /** @internal */ export type ConfigurationTemplate$Outbound = { configuration_template_id?: string | undefined; @@ -163,19 +162,6 @@ export const ConfigurationTemplate$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ConfigurationTemplate$ { - /** @deprecated use `ConfigurationTemplate$inboundSchema` instead. */ - export const inboundSchema = ConfigurationTemplate$inboundSchema; - /** @deprecated use `ConfigurationTemplate$outboundSchema` instead. */ - export const outboundSchema = ConfigurationTemplate$outboundSchema; - /** @deprecated use `ConfigurationTemplate$Outbound` instead. */ - export type Outbound = ConfigurationTemplate$Outbound; -} - export function configurationTemplateToJSON( configurationTemplate: ConfigurationTemplate, ): string { @@ -183,7 +169,6 @@ export function configurationTemplateToJSON( ConfigurationTemplate$outboundSchema.parse(configurationTemplate), ); } - export function configurationTemplateFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createbundleinfo.ts b/src/models/components/createbundleinfo.ts index 650b0a04..52fc9876 100644 --- a/src/models/components/createbundleinfo.ts +++ b/src/models/components/createbundleinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -47,7 +47,6 @@ export const CreateBundleInfo$inboundSchema: z.ZodType< "admin_owner_id": "adminOwnerId", }); }); - /** @internal */ export type CreateBundleInfo$Outbound = { name: string; @@ -70,19 +69,6 @@ export const CreateBundleInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateBundleInfo$ { - /** @deprecated use `CreateBundleInfo$inboundSchema` instead. */ - export const inboundSchema = CreateBundleInfo$inboundSchema; - /** @deprecated use `CreateBundleInfo$outboundSchema` instead. */ - export const outboundSchema = CreateBundleInfo$outboundSchema; - /** @deprecated use `CreateBundleInfo$Outbound` instead. */ - export type Outbound = CreateBundleInfo$Outbound; -} - export function createBundleInfoToJSON( createBundleInfo: CreateBundleInfo, ): string { @@ -90,7 +76,6 @@ export function createBundleInfoToJSON( CreateBundleInfo$outboundSchema.parse(createBundleInfo), ); } - export function createBundleInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createcampaignconfigurationinfo.ts b/src/models/components/createcampaignconfigurationinfo.ts new file mode 100644 index 00000000..a0f83cb3 --- /dev/null +++ b/src/models/components/createcampaignconfigurationinfo.ts @@ -0,0 +1,267 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + CampaignGroupAssetVisibilityPolicyEnum, + CampaignGroupAssetVisibilityPolicyEnum$inboundSchema, + CampaignGroupAssetVisibilityPolicyEnum$outboundSchema, +} from "./campaigngroupassetvisibilitypolicyenum.js"; +import { + CampaignRevokeOnEnum, + CampaignRevokeOnEnum$inboundSchema, + CampaignRevokeOnEnum$outboundSchema, +} from "./campaignrevokeonenum.js"; +import { + OpalAccessPathQueryBody, + OpalAccessPathQueryBody$inboundSchema, + OpalAccessPathQueryBody$Outbound, + OpalAccessPathQueryBody$outboundSchema, +} from "./opalaccesspathquerybody.js"; +import { + UARReviewerAssignmentPolicyEnum, + UARReviewerAssignmentPolicyEnum$inboundSchema, + UARReviewerAssignmentPolicyEnum$outboundSchema, +} from "./uarreviewerassignmentpolicyenum.js"; + +/** + * Configuration to apply when creating a campaign. `query` is required; other omitted fields use defaults. + */ +export type CreateCampaignConfigurationInfo = { + /** + * Access-path query defining the scope of access to review. Required. + * + * @remarks + * Uses the same principalFilter / entitlementFilter shape as + * ACCESS_PATH OpalQuery. Must include at least one of + * principalFilter or entitlementFilter. + * + * Campaign scope only supports direct access edges: + * `edgeFilter.directOnly` defaults to `true`, is always stored as + * `true`, and passing `false` returns 400. + */ + query: OpalAccessPathQueryBody; + /** + * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. + */ + reviewerAssignmentPolicy?: UARReviewerAssignmentPolicyEnum | undefined; + /** + * Whether reviewers can review their own access. + */ + allowSelfReview?: boolean | undefined; + /** + * Whether to notify reviewers upon assignment. + */ + sendReviewerAssignmentNotification?: boolean | undefined; + /** + * Whether reviewers may reassign their reviews to another user. + */ + allowReviewerReassignment?: boolean | undefined; + /** + * Scheduled start date of the campaign. + */ + startDate?: Date | null | undefined; + /** + * Scheduled end date of the campaign. + */ + endDate?: Date | null | undefined; + /** + * IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). + */ + timezone?: string | undefined; + /** + * When access decisions take effect during a campaign. + */ + revokeOn?: CampaignRevokeOnEnum | undefined; + /** + * Days before end date to send reminder notifications. + */ + reminderSchedule?: Array | undefined; + /** + * Whether to include the reviewer's manager in reminders. + */ + reminderIncludeManager?: boolean | undefined; + /** + * Whether reviewers must provide a reason when denying (revoking) access. + */ + requireReasonOnDenial?: boolean | undefined; + /** + * Whether AI suggestions are hidden from reviewers. + */ + hideAiSuggestions?: boolean | undefined; + /** + * Optional custom message included when notifying reviewers that the campaign started. + */ + customStartMessage?: string | null | undefined; + /** + * Controls what group assets reviewers can see during the campaign. + */ + groupAssetVisibilityPolicy?: + | CampaignGroupAssetVisibilityPolicyEnum + | undefined; + /** + * Whether this configuration is a recurring schedule template. + */ + isTemplate?: boolean | undefined; + /** + * Cron expression driving the recurring schedule. Null for one-off campaigns. + */ + cronExpression?: string | null | undefined; + /** + * Deadline window in days applied to each draft generated from this template. + */ + recurringDurationDays?: number | null | undefined; + /** + * Role assignment IDs to exclude from the campaign scope during population. + */ + excludedRoleAssignmentIds?: Array | undefined; +}; + +/** @internal */ +export const CreateCampaignConfigurationInfo$inboundSchema: z.ZodType< + CreateCampaignConfigurationInfo, + z.ZodTypeDef, + unknown +> = z.object({ + query: OpalAccessPathQueryBody$inboundSchema, + reviewer_assignment_policy: UARReviewerAssignmentPolicyEnum$inboundSchema + .optional(), + allow_self_review: z.boolean().optional(), + send_reviewer_assignment_notification: z.boolean().optional(), + allow_reviewer_reassignment: z.boolean().optional(), + start_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + end_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + timezone: z.string().optional(), + revoke_on: CampaignRevokeOnEnum$inboundSchema.optional(), + reminder_schedule: z.array(z.number().int()).optional(), + reminder_include_manager: z.boolean().optional(), + require_reason_on_denial: z.boolean().optional(), + hide_ai_suggestions: z.boolean().optional(), + custom_start_message: z.nullable(z.string()).optional(), + group_asset_visibility_policy: + CampaignGroupAssetVisibilityPolicyEnum$inboundSchema.optional(), + is_template: z.boolean().optional(), + cron_expression: z.nullable(z.string()).optional(), + recurring_duration_days: z.nullable(z.number().int()).optional(), + excluded_role_assignment_ids: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "reviewer_assignment_policy": "reviewerAssignmentPolicy", + "allow_self_review": "allowSelfReview", + "send_reviewer_assignment_notification": + "sendReviewerAssignmentNotification", + "allow_reviewer_reassignment": "allowReviewerReassignment", + "start_date": "startDate", + "end_date": "endDate", + "revoke_on": "revokeOn", + "reminder_schedule": "reminderSchedule", + "reminder_include_manager": "reminderIncludeManager", + "require_reason_on_denial": "requireReasonOnDenial", + "hide_ai_suggestions": "hideAiSuggestions", + "custom_start_message": "customStartMessage", + "group_asset_visibility_policy": "groupAssetVisibilityPolicy", + "is_template": "isTemplate", + "cron_expression": "cronExpression", + "recurring_duration_days": "recurringDurationDays", + "excluded_role_assignment_ids": "excludedRoleAssignmentIds", + }); +}); +/** @internal */ +export type CreateCampaignConfigurationInfo$Outbound = { + query: OpalAccessPathQueryBody$Outbound; + reviewer_assignment_policy?: string | undefined; + allow_self_review?: boolean | undefined; + send_reviewer_assignment_notification?: boolean | undefined; + allow_reviewer_reassignment?: boolean | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; + timezone?: string | undefined; + revoke_on?: string | undefined; + reminder_schedule?: Array | undefined; + reminder_include_manager?: boolean | undefined; + require_reason_on_denial?: boolean | undefined; + hide_ai_suggestions?: boolean | undefined; + custom_start_message?: string | null | undefined; + group_asset_visibility_policy?: string | undefined; + is_template?: boolean | undefined; + cron_expression?: string | null | undefined; + recurring_duration_days?: number | null | undefined; + excluded_role_assignment_ids?: Array | undefined; +}; + +/** @internal */ +export const CreateCampaignConfigurationInfo$outboundSchema: z.ZodType< + CreateCampaignConfigurationInfo$Outbound, + z.ZodTypeDef, + CreateCampaignConfigurationInfo +> = z.object({ + query: OpalAccessPathQueryBody$outboundSchema, + reviewerAssignmentPolicy: UARReviewerAssignmentPolicyEnum$outboundSchema + .optional(), + allowSelfReview: z.boolean().optional(), + sendReviewerAssignmentNotification: z.boolean().optional(), + allowReviewerReassignment: z.boolean().optional(), + startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + timezone: z.string().optional(), + revokeOn: CampaignRevokeOnEnum$outboundSchema.optional(), + reminderSchedule: z.array(z.number().int()).optional(), + reminderIncludeManager: z.boolean().optional(), + requireReasonOnDenial: z.boolean().optional(), + hideAiSuggestions: z.boolean().optional(), + customStartMessage: z.nullable(z.string()).optional(), + groupAssetVisibilityPolicy: + CampaignGroupAssetVisibilityPolicyEnum$outboundSchema.optional(), + isTemplate: z.boolean().optional(), + cronExpression: z.nullable(z.string()).optional(), + recurringDurationDays: z.nullable(z.number().int()).optional(), + excludedRoleAssignmentIds: z.array(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + reviewerAssignmentPolicy: "reviewer_assignment_policy", + allowSelfReview: "allow_self_review", + sendReviewerAssignmentNotification: "send_reviewer_assignment_notification", + allowReviewerReassignment: "allow_reviewer_reassignment", + startDate: "start_date", + endDate: "end_date", + revokeOn: "revoke_on", + reminderSchedule: "reminder_schedule", + reminderIncludeManager: "reminder_include_manager", + requireReasonOnDenial: "require_reason_on_denial", + hideAiSuggestions: "hide_ai_suggestions", + customStartMessage: "custom_start_message", + groupAssetVisibilityPolicy: "group_asset_visibility_policy", + isTemplate: "is_template", + cronExpression: "cron_expression", + recurringDurationDays: "recurring_duration_days", + excludedRoleAssignmentIds: "excluded_role_assignment_ids", + }); +}); + +export function createCampaignConfigurationInfoToJSON( + createCampaignConfigurationInfo: CreateCampaignConfigurationInfo, +): string { + return JSON.stringify( + CreateCampaignConfigurationInfo$outboundSchema.parse( + createCampaignConfigurationInfo, + ), + ); +} +export function createCampaignConfigurationInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCampaignConfigurationInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCampaignConfigurationInfo' from JSON`, + ); +} diff --git a/src/models/components/createcampaigninfo.ts b/src/models/components/createcampaigninfo.ts new file mode 100644 index 00000000..fb75b551 --- /dev/null +++ b/src/models/components/createcampaigninfo.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + CreateCampaignConfigurationInfo, + CreateCampaignConfigurationInfo$inboundSchema, + CreateCampaignConfigurationInfo$Outbound, + CreateCampaignConfigurationInfo$outboundSchema, +} from "./createcampaignconfigurationinfo.js"; + +/** + * # CreateCampaignInfo Object + * + * @remarks + * ### Description + * The `CreateCampaignInfo` object is used to create a campaign. + * + * ### Usage Example + * Use in the `POST Campaigns` endpoint. + */ +export type CreateCampaignInfo = { + /** + * The name of the campaign. + */ + name: string; + /** + * Configuration for the campaign. Required; must include a query. Other omitted fields use defaults. + */ + configuration: CreateCampaignConfigurationInfo; +}; + +/** @internal */ +export const CreateCampaignInfo$inboundSchema: z.ZodType< + CreateCampaignInfo, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + configuration: CreateCampaignConfigurationInfo$inboundSchema, +}); +/** @internal */ +export type CreateCampaignInfo$Outbound = { + name: string; + configuration: CreateCampaignConfigurationInfo$Outbound; +}; + +/** @internal */ +export const CreateCampaignInfo$outboundSchema: z.ZodType< + CreateCampaignInfo$Outbound, + z.ZodTypeDef, + CreateCampaignInfo +> = z.object({ + name: z.string(), + configuration: CreateCampaignConfigurationInfo$outboundSchema, +}); + +export function createCampaignInfoToJSON( + createCampaignInfo: CreateCampaignInfo, +): string { + return JSON.stringify( + CreateCampaignInfo$outboundSchema.parse(createCampaignInfo), + ); +} +export function createCampaignInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCampaignInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCampaignInfo' from JSON`, + ); +} diff --git a/src/models/components/createconfigurationtemplateinfo.ts b/src/models/components/createconfigurationtemplateinfo.ts index ad4d5452..5ef03668 100644 --- a/src/models/components/createconfigurationtemplateinfo.ts +++ b/src/models/components/createconfigurationtemplateinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -146,7 +146,6 @@ export const CreateConfigurationTemplateInfo$inboundSchema: z.ZodType< "custom_request_notification": "customRequestNotification", }); }); - /** @internal */ export type CreateConfigurationTemplateInfo$Outbound = { admin_owner_id: string; @@ -200,19 +199,6 @@ export const CreateConfigurationTemplateInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateConfigurationTemplateInfo$ { - /** @deprecated use `CreateConfigurationTemplateInfo$inboundSchema` instead. */ - export const inboundSchema = CreateConfigurationTemplateInfo$inboundSchema; - /** @deprecated use `CreateConfigurationTemplateInfo$outboundSchema` instead. */ - export const outboundSchema = CreateConfigurationTemplateInfo$outboundSchema; - /** @deprecated use `CreateConfigurationTemplateInfo$Outbound` instead. */ - export type Outbound = CreateConfigurationTemplateInfo$Outbound; -} - export function createConfigurationTemplateInfoToJSON( createConfigurationTemplateInfo: CreateConfigurationTemplateInfo, ): string { @@ -222,7 +208,6 @@ export function createConfigurationTemplateInfoToJSON( ), ); } - export function createConfigurationTemplateInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createdelegationrequest.ts b/src/models/components/createdelegationrequest.ts new file mode 100644 index 00000000..cb817aa3 --- /dev/null +++ b/src/models/components/createdelegationrequest.ts @@ -0,0 +1,100 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Request body for creating a new delegation of access review requests from one user to another. + */ +export type CreateDelegationRequest = { + /** + * The ID of the user delegating their access review requests. + */ + delegatorUserId: string; + /** + * The ID of the user being delegated to. + */ + delegateUserId: string; + /** + * The start time of the delegation. + */ + startTime: Date; + /** + * The end time of the delegation. + */ + endTime: Date; + /** + * The reason for the delegation. + */ + reason: string; +}; + +/** @internal */ +export const CreateDelegationRequest$inboundSchema: z.ZodType< + CreateDelegationRequest, + z.ZodTypeDef, + unknown +> = z.object({ + delegator_user_id: z.string(), + delegate_user_id: z.string(), + start_time: z.string().datetime({ offset: true }).transform(v => new Date(v)), + end_time: z.string().datetime({ offset: true }).transform(v => new Date(v)), + reason: z.string(), +}).transform((v) => { + return remap$(v, { + "delegator_user_id": "delegatorUserId", + "delegate_user_id": "delegateUserId", + "start_time": "startTime", + "end_time": "endTime", + }); +}); +/** @internal */ +export type CreateDelegationRequest$Outbound = { + delegator_user_id: string; + delegate_user_id: string; + start_time: string; + end_time: string; + reason: string; +}; + +/** @internal */ +export const CreateDelegationRequest$outboundSchema: z.ZodType< + CreateDelegationRequest$Outbound, + z.ZodTypeDef, + CreateDelegationRequest +> = z.object({ + delegatorUserId: z.string(), + delegateUserId: z.string(), + startTime: z.date().transform(v => v.toISOString()), + endTime: z.date().transform(v => v.toISOString()), + reason: z.string(), +}).transform((v) => { + return remap$(v, { + delegatorUserId: "delegator_user_id", + delegateUserId: "delegate_user_id", + startTime: "start_time", + endTime: "end_time", + }); +}); + +export function createDelegationRequestToJSON( + createDelegationRequest: CreateDelegationRequest, +): string { + return JSON.stringify( + CreateDelegationRequest$outboundSchema.parse(createDelegationRequest), + ); +} +export function createDelegationRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateDelegationRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateDelegationRequest' from JSON`, + ); +} diff --git a/src/models/components/createeventstreaminfo.ts b/src/models/components/createeventstreaminfo.ts new file mode 100644 index 00000000..48592dea --- /dev/null +++ b/src/models/components/createeventstreaminfo.ts @@ -0,0 +1,100 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + EventStreamConnectionTypeEnum, + EventStreamConnectionTypeEnum$inboundSchema, + EventStreamConnectionTypeEnum$outboundSchema, +} from "./eventstreamconnectiontypeenum.js"; +import { + WebhookCredentials, + WebhookCredentials$inboundSchema, + WebhookCredentials$Outbound, + WebhookCredentials$outboundSchema, +} from "./webhookcredentials.js"; + +/** + * Information needed to create an event stream. + */ +export type CreateEventStreamInfo = { + /** + * The name for the event stream. + */ + name: string; + /** + * The type of event stream connection. + */ + connectionType: EventStreamConnectionTypeEnum; + /** + * The webhook URL. Required when connection_type is WEBHOOK. + */ + webhookUrl?: string | undefined; + /** + * Authentication credentials for a webhook connection. + */ + credentials?: WebhookCredentials | undefined; +}; + +/** @internal */ +export const CreateEventStreamInfo$inboundSchema: z.ZodType< + CreateEventStreamInfo, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + connection_type: EventStreamConnectionTypeEnum$inboundSchema, + webhook_url: z.string().optional(), + credentials: WebhookCredentials$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "connection_type": "connectionType", + "webhook_url": "webhookUrl", + }); +}); +/** @internal */ +export type CreateEventStreamInfo$Outbound = { + name: string; + connection_type: string; + webhook_url?: string | undefined; + credentials?: WebhookCredentials$Outbound | undefined; +}; + +/** @internal */ +export const CreateEventStreamInfo$outboundSchema: z.ZodType< + CreateEventStreamInfo$Outbound, + z.ZodTypeDef, + CreateEventStreamInfo +> = z.object({ + name: z.string(), + connectionType: EventStreamConnectionTypeEnum$outboundSchema, + webhookUrl: z.string().optional(), + credentials: WebhookCredentials$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + connectionType: "connection_type", + webhookUrl: "webhook_url", + }); +}); + +export function createEventStreamInfoToJSON( + createEventStreamInfo: CreateEventStreamInfo, +): string { + return JSON.stringify( + CreateEventStreamInfo$outboundSchema.parse(createEventStreamInfo), + ); +} +export function createEventStreamInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateEventStreamInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEventStreamInfo' from JSON`, + ); +} diff --git a/src/models/components/creategroupbindinginfo.ts b/src/models/components/creategroupbindinginfo.ts index 6343473c..8bf9dac4 100644 --- a/src/models/components/creategroupbindinginfo.ts +++ b/src/models/components/creategroupbindinginfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -45,7 +45,6 @@ export const CreateGroupBindingInfoGroup$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type CreateGroupBindingInfoGroup$Outbound = { group_id: string; @@ -64,19 +63,6 @@ export const CreateGroupBindingInfoGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateGroupBindingInfoGroup$ { - /** @deprecated use `CreateGroupBindingInfoGroup$inboundSchema` instead. */ - export const inboundSchema = CreateGroupBindingInfoGroup$inboundSchema; - /** @deprecated use `CreateGroupBindingInfoGroup$outboundSchema` instead. */ - export const outboundSchema = CreateGroupBindingInfoGroup$outboundSchema; - /** @deprecated use `CreateGroupBindingInfoGroup$Outbound` instead. */ - export type Outbound = CreateGroupBindingInfoGroup$Outbound; -} - export function createGroupBindingInfoGroupToJSON( createGroupBindingInfoGroup: CreateGroupBindingInfoGroup, ): string { @@ -86,7 +72,6 @@ export function createGroupBindingInfoGroupToJSON( ), ); } - export function createGroupBindingInfoGroupFromJSON( jsonString: string, ): SafeParseResult { @@ -110,7 +95,6 @@ export const CreateGroupBindingInfo$inboundSchema: z.ZodType< "source_group_id": "sourceGroupId", }); }); - /** @internal */ export type CreateGroupBindingInfo$Outbound = { source_group_id: string; @@ -131,19 +115,6 @@ export const CreateGroupBindingInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateGroupBindingInfo$ { - /** @deprecated use `CreateGroupBindingInfo$inboundSchema` instead. */ - export const inboundSchema = CreateGroupBindingInfo$inboundSchema; - /** @deprecated use `CreateGroupBindingInfo$outboundSchema` instead. */ - export const outboundSchema = CreateGroupBindingInfo$outboundSchema; - /** @deprecated use `CreateGroupBindingInfo$Outbound` instead. */ - export type Outbound = CreateGroupBindingInfo$Outbound; -} - export function createGroupBindingInfoToJSON( createGroupBindingInfo: CreateGroupBindingInfo, ): string { @@ -151,7 +122,6 @@ export function createGroupBindingInfoToJSON( CreateGroupBindingInfo$outboundSchema.parse(createGroupBindingInfo), ); } - export function createGroupBindingInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/creategroupinfo.ts b/src/models/components/creategroupinfo.ts index 1c3aafa7..fac27b13 100644 --- a/src/models/components/creategroupinfo.ts +++ b/src/models/components/creategroupinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -52,7 +52,7 @@ export type CreateGroupInfo = { */ appId: string; /** - * Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. + * Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. If remote_info is provided, a group will be imported into Opal. For group types that support group creation through Opal, a new group will be created if remote_info is not provided. */ remoteInfo?: GroupRemoteInfo | undefined; /** @@ -161,6 +161,14 @@ export type CreateGroupInfo = { */ customRequestNotification?: string | null | undefined; riskSensitivityOverride?: RiskSensitivityEnum | undefined; + /** + * A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false. + */ + matchRemoteName?: boolean | undefined; + /** + * A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false. + */ + matchRemoteDescription?: boolean | undefined; }; /** @internal */ @@ -178,6 +186,8 @@ export const CreateGroupInfo$inboundSchema: z.ZodType< metadata: z.string().optional(), custom_request_notification: z.nullable(z.string()).optional(), risk_sensitivity_override: RiskSensitivityEnum$inboundSchema.optional(), + match_remote_name: z.boolean().optional(), + match_remote_description: z.boolean().optional(), }).transform((v) => { return remap$(v, { "group_type": "groupType", @@ -186,9 +196,10 @@ export const CreateGroupInfo$inboundSchema: z.ZodType< "remote_group_id": "remoteGroupId", "custom_request_notification": "customRequestNotification", "risk_sensitivity_override": "riskSensitivityOverride", + "match_remote_name": "matchRemoteName", + "match_remote_description": "matchRemoteDescription", }); }); - /** @internal */ export type CreateGroupInfo$Outbound = { name: string; @@ -200,6 +211,8 @@ export type CreateGroupInfo$Outbound = { metadata?: string | undefined; custom_request_notification?: string | null | undefined; risk_sensitivity_override?: string | undefined; + match_remote_name?: boolean | undefined; + match_remote_description?: boolean | undefined; }; /** @internal */ @@ -217,6 +230,8 @@ export const CreateGroupInfo$outboundSchema: z.ZodType< metadata: z.string().optional(), customRequestNotification: z.nullable(z.string()).optional(), riskSensitivityOverride: RiskSensitivityEnum$outboundSchema.optional(), + matchRemoteName: z.boolean().optional(), + matchRemoteDescription: z.boolean().optional(), }).transform((v) => { return remap$(v, { groupType: "group_type", @@ -225,28 +240,16 @@ export const CreateGroupInfo$outboundSchema: z.ZodType< remoteGroupId: "remote_group_id", customRequestNotification: "custom_request_notification", riskSensitivityOverride: "risk_sensitivity_override", + matchRemoteName: "match_remote_name", + matchRemoteDescription: "match_remote_description", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateGroupInfo$ { - /** @deprecated use `CreateGroupInfo$inboundSchema` instead. */ - export const inboundSchema = CreateGroupInfo$inboundSchema; - /** @deprecated use `CreateGroupInfo$outboundSchema` instead. */ - export const outboundSchema = CreateGroupInfo$outboundSchema; - /** @deprecated use `CreateGroupInfo$Outbound` instead. */ - export type Outbound = CreateGroupInfo$Outbound; -} - export function createGroupInfoToJSON( createGroupInfo: CreateGroupInfo, ): string { return JSON.stringify(CreateGroupInfo$outboundSchema.parse(createGroupInfo)); } - export function createGroupInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createmessagechannelinfo.ts b/src/models/components/createmessagechannelinfo.ts index e7a7ba2f..beb83c9e 100644 --- a/src/models/components/createmessagechannelinfo.ts +++ b/src/models/components/createmessagechannelinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -45,7 +45,6 @@ export const CreateMessageChannelInfo$inboundSchema: z.ZodType< "remote_id": "remoteId", }); }); - /** @internal */ export type CreateMessageChannelInfo$Outbound = { third_party_provider: string; @@ -67,19 +66,6 @@ export const CreateMessageChannelInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateMessageChannelInfo$ { - /** @deprecated use `CreateMessageChannelInfo$inboundSchema` instead. */ - export const inboundSchema = CreateMessageChannelInfo$inboundSchema; - /** @deprecated use `CreateMessageChannelInfo$outboundSchema` instead. */ - export const outboundSchema = CreateMessageChannelInfo$outboundSchema; - /** @deprecated use `CreateMessageChannelInfo$Outbound` instead. */ - export type Outbound = CreateMessageChannelInfo$Outbound; -} - export function createMessageChannelInfoToJSON( createMessageChannelInfo: CreateMessageChannelInfo, ): string { @@ -87,7 +73,6 @@ export function createMessageChannelInfoToJSON( CreateMessageChannelInfo$outboundSchema.parse(createMessageChannelInfo), ); } - export function createMessageChannelInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createoncallscheduleinfo.ts b/src/models/components/createoncallscheduleinfo.ts index a0481d56..d421ddc9 100644 --- a/src/models/components/createoncallscheduleinfo.ts +++ b/src/models/components/createoncallscheduleinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -45,7 +45,6 @@ export const CreateOnCallScheduleInfo$inboundSchema: z.ZodType< "remote_id": "remoteId", }); }); - /** @internal */ export type CreateOnCallScheduleInfo$Outbound = { third_party_provider: string; @@ -67,19 +66,6 @@ export const CreateOnCallScheduleInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateOnCallScheduleInfo$ { - /** @deprecated use `CreateOnCallScheduleInfo$inboundSchema` instead. */ - export const inboundSchema = CreateOnCallScheduleInfo$inboundSchema; - /** @deprecated use `CreateOnCallScheduleInfo$outboundSchema` instead. */ - export const outboundSchema = CreateOnCallScheduleInfo$outboundSchema; - /** @deprecated use `CreateOnCallScheduleInfo$Outbound` instead. */ - export type Outbound = CreateOnCallScheduleInfo$Outbound; -} - export function createOnCallScheduleInfoToJSON( createOnCallScheduleInfo: CreateOnCallScheduleInfo, ): string { @@ -87,7 +73,6 @@ export function createOnCallScheduleInfoToJSON( CreateOnCallScheduleInfo$outboundSchema.parse(createOnCallScheduleInfo), ); } - export function createOnCallScheduleInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createownerinfo.ts b/src/models/components/createownerinfo.ts index 715b1c6c..7e4d08ee 100644 --- a/src/models/components/createownerinfo.ts +++ b/src/models/components/createownerinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -65,7 +65,6 @@ export const CreateOwnerInfo$inboundSchema: z.ZodType< "source_group_id": "sourceGroupId", }); }); - /** @internal */ export type CreateOwnerInfo$Outbound = { name: string; @@ -97,25 +96,11 @@ export const CreateOwnerInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateOwnerInfo$ { - /** @deprecated use `CreateOwnerInfo$inboundSchema` instead. */ - export const inboundSchema = CreateOwnerInfo$inboundSchema; - /** @deprecated use `CreateOwnerInfo$outboundSchema` instead. */ - export const outboundSchema = CreateOwnerInfo$outboundSchema; - /** @deprecated use `CreateOwnerInfo$Outbound` instead. */ - export type Outbound = CreateOwnerInfo$Outbound; -} - export function createOwnerInfoToJSON( createOwnerInfo: CreateOwnerInfo, ): string { return JSON.stringify(CreateOwnerInfo$outboundSchema.parse(createOwnerInfo)); } - export function createOwnerInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createpaladincontextsourceinfo.ts b/src/models/components/createpaladincontextsourceinfo.ts new file mode 100644 index 00000000..28945baa --- /dev/null +++ b/src/models/components/createpaladincontextsourceinfo.ts @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PaladinContextSourceKind, + PaladinContextSourceKind$inboundSchema, + PaladinContextSourceKind$outboundSchema, +} from "./paladincontextsourcekind.js"; +import { + PaladinContextSourceProvider, + PaladinContextSourceProvider$inboundSchema, + PaladinContextSourceProvider$outboundSchema, +} from "./paladincontextsourceprovider.js"; + +/** + * Information for adding a context source to a Paladin. + */ +export type CreatePaladinContextSourceInfo = { + /** + * The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page. + */ + sourceKind: PaladinContextSourceKind; + /** + * The integration a Paladin context source comes from. + */ + thirdPartyProvider: PaladinContextSourceProvider; + /** + * The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID for a document. + */ + remoteId: string; + /** + * An optional human-readable name for the source. + */ + name?: string | undefined; + /** + * An optional link to the source. + */ + url?: string | undefined; +}; + +/** @internal */ +export const CreatePaladinContextSourceInfo$inboundSchema: z.ZodType< + CreatePaladinContextSourceInfo, + z.ZodTypeDef, + unknown +> = z.object({ + source_kind: PaladinContextSourceKind$inboundSchema, + third_party_provider: PaladinContextSourceProvider$inboundSchema, + remote_id: z.string(), + name: z.string().optional(), + url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "source_kind": "sourceKind", + "third_party_provider": "thirdPartyProvider", + "remote_id": "remoteId", + }); +}); +/** @internal */ +export type CreatePaladinContextSourceInfo$Outbound = { + source_kind: string; + third_party_provider: string; + remote_id: string; + name?: string | undefined; + url?: string | undefined; +}; + +/** @internal */ +export const CreatePaladinContextSourceInfo$outboundSchema: z.ZodType< + CreatePaladinContextSourceInfo$Outbound, + z.ZodTypeDef, + CreatePaladinContextSourceInfo +> = z.object({ + sourceKind: PaladinContextSourceKind$outboundSchema, + thirdPartyProvider: PaladinContextSourceProvider$outboundSchema, + remoteId: z.string(), + name: z.string().optional(), + url: z.string().optional(), +}).transform((v) => { + return remap$(v, { + sourceKind: "source_kind", + thirdPartyProvider: "third_party_provider", + remoteId: "remote_id", + }); +}); + +export function createPaladinContextSourceInfoToJSON( + createPaladinContextSourceInfo: CreatePaladinContextSourceInfo, +): string { + return JSON.stringify( + CreatePaladinContextSourceInfo$outboundSchema.parse( + createPaladinContextSourceInfo, + ), + ); +} +export function createPaladinContextSourceInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePaladinContextSourceInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePaladinContextSourceInfo' from JSON`, + ); +} diff --git a/src/models/components/createpaladininfo.ts b/src/models/components/createpaladininfo.ts new file mode 100644 index 00000000..8c66e2f0 --- /dev/null +++ b/src/models/components/createpaladininfo.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PaladinConnector, + PaladinConnector$inboundSchema, + PaladinConnector$outboundSchema, +} from "./paladinconnector.js"; + +/** + * Information for creating a Paladin. + */ +export type CreatePaladinInfo = { + /** + * The name of the Paladin. + */ + name: string; + /** + * The ID of the owner of the Paladin. + */ + ownerId: string; + /** + * When true, the Paladin reasons about requests but takes no action. Defaults to true. + */ + monitorMode?: boolean | undefined; + /** + * When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. Defaults to false. + */ + adminViewOnly?: boolean | undefined; + /** + * The connectors the Paladin is allowed to use. + */ + enabledConnectors?: Array | undefined; + /** + * The free-form instructions that guide the Paladin's decisions. Optional; if omitted the Paladin is created without instructions. + */ + instructions?: string | undefined; +}; + +/** @internal */ +export const CreatePaladinInfo$inboundSchema: z.ZodType< + CreatePaladinInfo, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + owner_id: z.string(), + monitor_mode: z.boolean().default(true), + admin_view_only: z.boolean().default(false), + enabled_connectors: z.array(PaladinConnector$inboundSchema).optional(), + instructions: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "owner_id": "ownerId", + "monitor_mode": "monitorMode", + "admin_view_only": "adminViewOnly", + "enabled_connectors": "enabledConnectors", + }); +}); +/** @internal */ +export type CreatePaladinInfo$Outbound = { + name: string; + owner_id: string; + monitor_mode: boolean; + admin_view_only: boolean; + enabled_connectors?: Array | undefined; + instructions?: string | undefined; +}; + +/** @internal */ +export const CreatePaladinInfo$outboundSchema: z.ZodType< + CreatePaladinInfo$Outbound, + z.ZodTypeDef, + CreatePaladinInfo +> = z.object({ + name: z.string(), + ownerId: z.string(), + monitorMode: z.boolean().default(true), + adminViewOnly: z.boolean().default(false), + enabledConnectors: z.array(PaladinConnector$outboundSchema).optional(), + instructions: z.string().optional(), +}).transform((v) => { + return remap$(v, { + ownerId: "owner_id", + monitorMode: "monitor_mode", + adminViewOnly: "admin_view_only", + enabledConnectors: "enabled_connectors", + }); +}); + +export function createPaladinInfoToJSON( + createPaladinInfo: CreatePaladinInfo, +): string { + return JSON.stringify( + CreatePaladinInfo$outboundSchema.parse(createPaladinInfo), + ); +} +export function createPaladinInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePaladinInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePaladinInfo' from JSON`, + ); +} diff --git a/src/models/components/createrequestconfigurationinfolist.ts b/src/models/components/createrequestconfigurationinfolist.ts index 9b846aae..283a985c 100644 --- a/src/models/components/createrequestconfigurationinfolist.ts +++ b/src/models/components/createrequestconfigurationinfolist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -55,7 +55,6 @@ export const CreateRequestConfigurationInfoList$inboundSchema: z.ZodType< "request_configurations": "requestConfigurations", }); }); - /** @internal */ export type CreateRequestConfigurationInfoList$Outbound = { request_configurations: Array; @@ -74,20 +73,6 @@ export const CreateRequestConfigurationInfoList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateRequestConfigurationInfoList$ { - /** @deprecated use `CreateRequestConfigurationInfoList$inboundSchema` instead. */ - export const inboundSchema = CreateRequestConfigurationInfoList$inboundSchema; - /** @deprecated use `CreateRequestConfigurationInfoList$outboundSchema` instead. */ - export const outboundSchema = - CreateRequestConfigurationInfoList$outboundSchema; - /** @deprecated use `CreateRequestConfigurationInfoList$Outbound` instead. */ - export type Outbound = CreateRequestConfigurationInfoList$Outbound; -} - export function createRequestConfigurationInfoListToJSON( createRequestConfigurationInfoList: CreateRequestConfigurationInfoList, ): string { @@ -97,7 +82,6 @@ export function createRequestConfigurationInfoListToJSON( ), ); } - export function createRequestConfigurationInfoListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createrequestinfo.ts b/src/models/components/createrequestinfo.ts index aa9362f9..3c43288d 100644 --- a/src/models/components/createrequestinfo.ts +++ b/src/models/components/createrequestinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -28,7 +28,9 @@ export type CreateRequestInfoResource = { */ accessLevelRemoteId?: string | undefined; /** - * The ID of the access level requested on the remote system. + * The ID of the access level requested on the remote system. This field is deprecated and no longer required. We will populate based on the access_level_remote_id. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ accessLevelName?: string | undefined; }; @@ -105,7 +107,6 @@ export const CreateRequestInfoResource$inboundSchema: z.ZodType< "access_level_name": "accessLevelName", }); }); - /** @internal */ export type CreateRequestInfoResource$Outbound = { id?: string | undefined; @@ -129,19 +130,6 @@ export const CreateRequestInfoResource$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateRequestInfoResource$ { - /** @deprecated use `CreateRequestInfoResource$inboundSchema` instead. */ - export const inboundSchema = CreateRequestInfoResource$inboundSchema; - /** @deprecated use `CreateRequestInfoResource$outboundSchema` instead. */ - export const outboundSchema = CreateRequestInfoResource$outboundSchema; - /** @deprecated use `CreateRequestInfoResource$Outbound` instead. */ - export type Outbound = CreateRequestInfoResource$Outbound; -} - export function createRequestInfoResourceToJSON( createRequestInfoResource: CreateRequestInfoResource, ): string { @@ -149,7 +137,6 @@ export function createRequestInfoResourceToJSON( CreateRequestInfoResource$outboundSchema.parse(createRequestInfoResource), ); } - export function createRequestInfoResourceFromJSON( jsonString: string, ): SafeParseResult { @@ -175,7 +162,6 @@ export const CreateRequestInfoGroup$inboundSchema: z.ZodType< "access_level_name": "accessLevelName", }); }); - /** @internal */ export type CreateRequestInfoGroup$Outbound = { id: string; @@ -199,19 +185,6 @@ export const CreateRequestInfoGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateRequestInfoGroup$ { - /** @deprecated use `CreateRequestInfoGroup$inboundSchema` instead. */ - export const inboundSchema = CreateRequestInfoGroup$inboundSchema; - /** @deprecated use `CreateRequestInfoGroup$outboundSchema` instead. */ - export const outboundSchema = CreateRequestInfoGroup$outboundSchema; - /** @deprecated use `CreateRequestInfoGroup$Outbound` instead. */ - export type Outbound = CreateRequestInfoGroup$Outbound; -} - export function createRequestInfoGroupToJSON( createRequestInfoGroup: CreateRequestInfoGroup, ): string { @@ -219,7 +192,6 @@ export function createRequestInfoGroupToJSON( CreateRequestInfoGroup$outboundSchema.parse(createRequestInfoGroup), ); } - export function createRequestInfoGroupFromJSON( jsonString: string, ): SafeParseResult { @@ -246,7 +218,6 @@ export const SupportTicket$inboundSchema: z.ZodType< "remote_id": "remoteId", }); }); - /** @internal */ export type SupportTicket$Outbound = { ticketing_provider: string; @@ -272,23 +243,9 @@ export const SupportTicket$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SupportTicket$ { - /** @deprecated use `SupportTicket$inboundSchema` instead. */ - export const inboundSchema = SupportTicket$inboundSchema; - /** @deprecated use `SupportTicket$outboundSchema` instead. */ - export const outboundSchema = SupportTicket$outboundSchema; - /** @deprecated use `SupportTicket$Outbound` instead. */ - export type Outbound = SupportTicket$Outbound; -} - export function supportTicketToJSON(supportTicket: SupportTicket): string { return JSON.stringify(SupportTicket$outboundSchema.parse(supportTicket)); } - export function supportTicketFromJSON( jsonString: string, ): SafeParseResult { @@ -309,7 +266,6 @@ export const CustomMetadatum$inboundSchema: z.ZodType< type: RequestTemplateCustomFieldTypeEnum$inboundSchema, value: z.string(), }); - /** @internal */ export type CustomMetadatum$Outbound = { name: string; @@ -328,25 +284,11 @@ export const CustomMetadatum$outboundSchema: z.ZodType< value: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CustomMetadatum$ { - /** @deprecated use `CustomMetadatum$inboundSchema` instead. */ - export const inboundSchema = CustomMetadatum$inboundSchema; - /** @deprecated use `CustomMetadatum$outboundSchema` instead. */ - export const outboundSchema = CustomMetadatum$outboundSchema; - /** @deprecated use `CustomMetadatum$Outbound` instead. */ - export type Outbound = CustomMetadatum$Outbound; -} - export function customMetadatumToJSON( customMetadatum: CustomMetadatum, ): string { return JSON.stringify(CustomMetadatum$outboundSchema.parse(customMetadatum)); } - export function customMetadatumFromJSON( jsonString: string, ): SafeParseResult { @@ -381,7 +323,6 @@ export const CreateRequestInfo$inboundSchema: z.ZodType< "custom_metadata": "customMetadata", }); }); - /** @internal */ export type CreateRequestInfo$Outbound = { resources: Array; @@ -419,19 +360,6 @@ export const CreateRequestInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateRequestInfo$ { - /** @deprecated use `CreateRequestInfo$inboundSchema` instead. */ - export const inboundSchema = CreateRequestInfo$inboundSchema; - /** @deprecated use `CreateRequestInfo$outboundSchema` instead. */ - export const outboundSchema = CreateRequestInfo$outboundSchema; - /** @deprecated use `CreateRequestInfo$Outbound` instead. */ - export type Outbound = CreateRequestInfo$Outbound; -} - export function createRequestInfoToJSON( createRequestInfo: CreateRequestInfo, ): string { @@ -439,7 +367,6 @@ export function createRequestInfoToJSON( CreateRequestInfo$outboundSchema.parse(createRequestInfo), ); } - export function createRequestInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createresourceinfo.ts b/src/models/components/createresourceinfo.ts index 8419a0b0..e87df6c9 100644 --- a/src/models/components/createresourceinfo.ts +++ b/src/models/components/createresourceinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -294,6 +294,14 @@ export type CreateResourceInfo = { */ customRequestNotification?: string | null | undefined; riskSensitivityOverride?: RiskSensitivityEnum | undefined; + /** + * A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. Defaults to false. + */ + matchRemoteName?: boolean | undefined; + /** + * A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. Defaults to false. + */ + matchRemoteDescription?: boolean | undefined; }; /** @internal */ @@ -311,6 +319,8 @@ export const CreateResourceInfo$inboundSchema: z.ZodType< metadata: z.string().optional(), custom_request_notification: z.nullable(z.string()).optional(), risk_sensitivity_override: RiskSensitivityEnum$inboundSchema.optional(), + match_remote_name: z.boolean().optional(), + match_remote_description: z.boolean().optional(), }).transform((v) => { return remap$(v, { "resource_type": "resourceType", @@ -319,9 +329,10 @@ export const CreateResourceInfo$inboundSchema: z.ZodType< "remote_resource_id": "remoteResourceId", "custom_request_notification": "customRequestNotification", "risk_sensitivity_override": "riskSensitivityOverride", + "match_remote_name": "matchRemoteName", + "match_remote_description": "matchRemoteDescription", }); }); - /** @internal */ export type CreateResourceInfo$Outbound = { name: string; @@ -333,6 +344,8 @@ export type CreateResourceInfo$Outbound = { metadata?: string | undefined; custom_request_notification?: string | null | undefined; risk_sensitivity_override?: string | undefined; + match_remote_name?: boolean | undefined; + match_remote_description?: boolean | undefined; }; /** @internal */ @@ -350,6 +363,8 @@ export const CreateResourceInfo$outboundSchema: z.ZodType< metadata: z.string().optional(), customRequestNotification: z.nullable(z.string()).optional(), riskSensitivityOverride: RiskSensitivityEnum$outboundSchema.optional(), + matchRemoteName: z.boolean().optional(), + matchRemoteDescription: z.boolean().optional(), }).transform((v) => { return remap$(v, { resourceType: "resource_type", @@ -358,22 +373,11 @@ export const CreateResourceInfo$outboundSchema: z.ZodType< remoteResourceId: "remote_resource_id", customRequestNotification: "custom_request_notification", riskSensitivityOverride: "risk_sensitivity_override", + matchRemoteName: "match_remote_name", + matchRemoteDescription: "match_remote_description", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateResourceInfo$ { - /** @deprecated use `CreateResourceInfo$inboundSchema` instead. */ - export const inboundSchema = CreateResourceInfo$inboundSchema; - /** @deprecated use `CreateResourceInfo$outboundSchema` instead. */ - export const outboundSchema = CreateResourceInfo$outboundSchema; - /** @deprecated use `CreateResourceInfo$Outbound` instead. */ - export type Outbound = CreateResourceInfo$Outbound; -} - export function createResourceInfoToJSON( createResourceInfo: CreateResourceInfo, ): string { @@ -381,7 +385,6 @@ export function createResourceInfoToJSON( CreateResourceInfo$outboundSchema.parse(createResourceInfo), ); } - export function createResourceInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createtaginfo.ts b/src/models/components/createtaginfo.ts index d0c3e600..7117b7de 100644 --- a/src/models/components/createtaginfo.ts +++ b/src/models/components/createtaginfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -43,7 +43,6 @@ export const CreateTagInfo$inboundSchema: z.ZodType< "tag_value": "tagValue", }); }); - /** @internal */ export type CreateTagInfo$Outbound = { tag_key: string; @@ -65,23 +64,9 @@ export const CreateTagInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateTagInfo$ { - /** @deprecated use `CreateTagInfo$inboundSchema` instead. */ - export const inboundSchema = CreateTagInfo$inboundSchema; - /** @deprecated use `CreateTagInfo$outboundSchema` instead. */ - export const outboundSchema = CreateTagInfo$outboundSchema; - /** @deprecated use `CreateTagInfo$Outbound` instead. */ - export type Outbound = CreateTagInfo$Outbound; -} - export function createTagInfoToJSON(createTagInfo: CreateTagInfo): string { return JSON.stringify(CreateTagInfo$outboundSchema.parse(createTagInfo)); } - export function createTagInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/createuarinfo.ts b/src/models/components/createuarinfo.ts index a175ac8b..dd1a5eb2 100644 --- a/src/models/components/createuarinfo.ts +++ b/src/models/components/createuarinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -28,7 +28,7 @@ export type CreateUARInfo = { */ name: string; /** - * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. + * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. */ reviewerAssignmentPolicy: UARReviewerAssignmentPolicyEnum; /** @@ -47,6 +47,10 @@ export type CreateUARInfo = { * A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. */ selfReviewAllowed: boolean; + /** + * A bool representing whether to instantly action changes when reviewers submit their decision. Default is False. + */ + instantlyActionReviews?: boolean | undefined; reminderSchedule?: Array | undefined; reminderIncludeManager?: boolean | undefined; /** @@ -67,6 +71,7 @@ export const CreateUARInfo$inboundSchema: z.ZodType< deadline: z.string().datetime({ offset: true }).transform(v => new Date(v)), time_zone: z.string(), self_review_allowed: z.boolean(), + instantly_action_reviews: z.boolean().optional(), reminder_schedule: z.array(z.number().int()).optional(), reminder_include_manager: z.boolean().optional(), uar_scope: UARScope$inboundSchema.optional(), @@ -77,12 +82,12 @@ export const CreateUARInfo$inboundSchema: z.ZodType< "sendReviewerAssignmentNotification", "time_zone": "timeZone", "self_review_allowed": "selfReviewAllowed", + "instantly_action_reviews": "instantlyActionReviews", "reminder_schedule": "reminderSchedule", "reminder_include_manager": "reminderIncludeManager", "uar_scope": "uarScope", }); }); - /** @internal */ export type CreateUARInfo$Outbound = { name: string; @@ -91,6 +96,7 @@ export type CreateUARInfo$Outbound = { deadline: string; time_zone: string; self_review_allowed: boolean; + instantly_action_reviews?: boolean | undefined; reminder_schedule?: Array | undefined; reminder_include_manager?: boolean | undefined; uar_scope?: UARScope$Outbound | undefined; @@ -108,6 +114,7 @@ export const CreateUARInfo$outboundSchema: z.ZodType< deadline: z.date().transform(v => v.toISOString()), timeZone: z.string(), selfReviewAllowed: z.boolean(), + instantlyActionReviews: z.boolean().optional(), reminderSchedule: z.array(z.number().int()).optional(), reminderIncludeManager: z.boolean().optional(), uarScope: UARScope$outboundSchema.optional(), @@ -117,29 +124,16 @@ export const CreateUARInfo$outboundSchema: z.ZodType< sendReviewerAssignmentNotification: "send_reviewer_assignment_notification", timeZone: "time_zone", selfReviewAllowed: "self_review_allowed", + instantlyActionReviews: "instantly_action_reviews", reminderSchedule: "reminder_schedule", reminderIncludeManager: "reminder_include_manager", uarScope: "uar_scope", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateUARInfo$ { - /** @deprecated use `CreateUARInfo$inboundSchema` instead. */ - export const inboundSchema = CreateUARInfo$inboundSchema; - /** @deprecated use `CreateUARInfo$outboundSchema` instead. */ - export const outboundSchema = CreateUARInfo$outboundSchema; - /** @deprecated use `CreateUARInfo$Outbound` instead. */ - export type Outbound = CreateUARInfo$Outbound; -} - export function createUARInfoToJSON(createUARInfo: CreateUARInfo): string { return JSON.stringify(CreateUARInfo$outboundSchema.parse(createUARInfo)); } - export function createUARInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/delegation.ts b/src/models/components/delegation.ts new file mode 100644 index 00000000..be65aa71 --- /dev/null +++ b/src/models/components/delegation.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * # Delegation Object + * + * @remarks + * ### Description + * The `Delegation` object represents a delegation of access review requests from one user to another. + * + * ### Usage Example + * List from the `GET Delegations` endpoint. + * Get from the `GET Delegation` endpoint. + */ +export type Delegation = { + /** + * The ID of the delegation. + */ + id: string; + /** + * The ID of the user delegating their access review requests. + */ + delegatorUserId: string; + /** + * The ID of the user being delegated to. + */ + delegateUserId: string; + /** + * The start time of the delegation. + */ + startTime: Date; + /** + * The end time of the delegation. + */ + endTime: Date; + /** + * The reason for the delegation. + */ + reason: string; + /** + * The creation time of the delegation. + */ + createdAt: Date; + /** + * The last updated time of the delegation. + */ + updatedAt: Date; +}; + +/** @internal */ +export const Delegation$inboundSchema: z.ZodType< + Delegation, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + delegator_user_id: z.string(), + delegate_user_id: z.string(), + start_time: z.string().datetime({ offset: true }).transform(v => new Date(v)), + end_time: z.string().datetime({ offset: true }).transform(v => new Date(v)), + reason: z.string(), + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), +}).transform((v) => { + return remap$(v, { + "delegator_user_id": "delegatorUserId", + "delegate_user_id": "delegateUserId", + "start_time": "startTime", + "end_time": "endTime", + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); +/** @internal */ +export type Delegation$Outbound = { + id: string; + delegator_user_id: string; + delegate_user_id: string; + start_time: string; + end_time: string; + reason: string; + created_at: string; + updated_at: string; +}; + +/** @internal */ +export const Delegation$outboundSchema: z.ZodType< + Delegation$Outbound, + z.ZodTypeDef, + Delegation +> = z.object({ + id: z.string(), + delegatorUserId: z.string(), + delegateUserId: z.string(), + startTime: z.date().transform(v => v.toISOString()), + endTime: z.date().transform(v => v.toISOString()), + reason: z.string(), + createdAt: z.date().transform(v => v.toISOString()), + updatedAt: z.date().transform(v => v.toISOString()), +}).transform((v) => { + return remap$(v, { + delegatorUserId: "delegator_user_id", + delegateUserId: "delegate_user_id", + startTime: "start_time", + endTime: "end_time", + createdAt: "created_at", + updatedAt: "updated_at", + }); +}); + +export function delegationToJSON(delegation: Delegation): string { + return JSON.stringify(Delegation$outboundSchema.parse(delegation)); +} +export function delegationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Delegation$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Delegation' from JSON`, + ); +} diff --git a/src/models/components/entityadminfilter.ts b/src/models/components/entityadminfilter.ts new file mode 100644 index 00000000..b99b2275 --- /dev/null +++ b/src/models/components/entityadminfilter.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Filters GROUP and RESOURCE entities by their admin owner. USER entities never match, in either polarity. `not` inverts the match within the resource/group domain (self-negating, like IdpStatusFilter): omit it (or false) to include entities owned by the given owners, set it true to exclude them. + * + * @remarks + */ +export type EntityAdminFilter = { + /** + * The owner (group) UUIDs to match entities against. + */ + ownerIDs: Array; + /** + * Invert the match — return resources/groups NOT owned by the given owners. + */ + not?: boolean | undefined; +}; + +/** @internal */ +export const EntityAdminFilter$inboundSchema: z.ZodType< + EntityAdminFilter, + z.ZodTypeDef, + unknown +> = z.object({ + ownerIDs: z.array(z.string()), + not: z.boolean().optional(), +}); +/** @internal */ +export type EntityAdminFilter$Outbound = { + ownerIDs: Array; + not?: boolean | undefined; +}; + +/** @internal */ +export const EntityAdminFilter$outboundSchema: z.ZodType< + EntityAdminFilter$Outbound, + z.ZodTypeDef, + EntityAdminFilter +> = z.object({ + ownerIDs: z.array(z.string()), + not: z.boolean().optional(), +}); + +export function entityAdminFilterToJSON( + entityAdminFilter: EntityAdminFilter, +): string { + return JSON.stringify( + EntityAdminFilter$outboundSchema.parse(entityAdminFilter), + ); +} +export function entityAdminFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EntityAdminFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EntityAdminFilter' from JSON`, + ); +} diff --git a/src/models/components/entityitemtypeenum.ts b/src/models/components/entityitemtypeenum.ts new file mode 100644 index 00000000..48b58b66 --- /dev/null +++ b/src/models/components/entityitemtypeenum.ts @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Granular subtype of an entity. + */ +export const EntityItemTypeEnum = { + User: "USER", + ServiceUser: "SERVICE_USER", + ActiveDirectoryGroup: "ACTIVE_DIRECTORY_GROUP", + AwsSsoGroup: "AWS_SSO_GROUP", + DuoGroup: "DUO_GROUP", + GitHubTeam: "GIT_HUB_TEAM", + GitLabGroup: "GIT_LAB_GROUP", + GoogleGroupsGroup: "GOOGLE_GROUPS_GROUP", + GoogleGroupsGkeGroup: "GOOGLE_GROUPS_GKE_GROUP", + LdapGroup: "LDAP_GROUP", + OktaGroup: "OKTA_GROUP", + OktaGroupRule: "OKTA_GROUP_RULE", + TailscaleGroup: "TAILSCALE_GROUP", + TwingateGroup: "TWINGATE_GROUP", + TwingateGroupSynced: "TWINGATE_GROUP_SYNCED", + OpalGroup: "OPAL_GROUP", + OpalAccessRule: "OPAL_ACCESS_RULE", + AzureAdSecurityGroup: "AZURE_AD_SECURITY_GROUP", + AzureAdMicrosoft365Group: "AZURE_AD_MICROSOFT_365_GROUP", + ConnectorGroup: "CONNECTOR_GROUP", + SnowflakeRole: "SNOWFLAKE_ROLE", + WorkdayUserSecurityGroup: "WORKDAY_USER_SECURITY_GROUP", + DatabricksAccountGroup: "DATABRICKS_ACCOUNT_GROUP", + AwsIamRole: "AWS_IAM_ROLE", + AwsEc2Instance: "AWS_EC2_INSTANCE", + AwsEksCluster: "AWS_EKS_CLUSTER", + AwsRdsPostgresInstance: "AWS_RDS_POSTGRES_INSTANCE", + AwsRdsPostgresCluster: "AWS_RDS_POSTGRES_CLUSTER", + AwsRdsMysqlInstance: "AWS_RDS_MYSQL_INSTANCE", + AwsRdsMysqlCluster: "AWS_RDS_MYSQL_CLUSTER", + AwsAccount: "AWS_ACCOUNT", + AwsSsoPermissionSet: "AWS_SSO_PERMISSION_SET", + AzureManagementGroup: "AZURE_MANAGEMENT_GROUP", + AzureResourceGroup: "AZURE_RESOURCE_GROUP", + AzureSubscription: "AZURE_SUBSCRIPTION", + AzureVirtualMachine: "AZURE_VIRTUAL_MACHINE", + AzureStorageAccount: "AZURE_STORAGE_ACCOUNT", + AzureStorageContainer: "AZURE_STORAGE_CONTAINER", + AzureSqlServer: "AZURE_SQL_SERVER", + AzureSqlManagedInstance: "AZURE_SQL_MANAGED_INSTANCE", + AzureSqlDatabase: "AZURE_SQL_DATABASE", + AzureSqlManagedDatabase: "AZURE_SQL_MANAGED_DATABASE", + AZUREUSERASSIGNEDMANAGEDIdentity: "AZURE_USER_ASSIGNED_MANAGED_Identity", + AzureEntraIdRole: "AZURE_ENTRA_ID_ROLE", + AzureEnterpriseApp: "AZURE_ENTERPRISE_APP", + Custom: "CUSTOM", + CustomConnector: "CUSTOM_CONNECTOR", + GcpOrganization: "GCP_ORGANIZATION", + GcpBucket: "GCP_BUCKET", + GcpComputeInstance: "GCP_COMPUTE_INSTANCE", + GcpBigQueryDataset: "GCP_BIG_QUERY_DATASET", + GcpBigQueryTable: "GCP_BIG_QUERY_TABLE", + GcpFolder: "GCP_FOLDER", + GcpGkeCluster: "GCP_GKE_CLUSTER", + GcpProject: "GCP_PROJECT", + GcpCloudSqlPostgresInstance: "GCP_CLOUD_SQL_POSTGRES_INSTANCE", + GcpCloudSqlMysqlInstance: "GCP_CLOUD_SQL_MYSQL_INSTANCE", + GcpServiceAccount: "GCP_SERVICE_ACCOUNT", + GitHubRepo: "GIT_HUB_REPO", + GitHubOrgRole: "GIT_HUB_ORG_ROLE", + GitLabProject: "GIT_LAB_PROJECT", + GoogleWorkspaceRole: "GOOGLE_WORKSPACE_ROLE", + MongoInstance: "MONGO_INSTANCE", + MongoAtlasInstance: "MONGO_ATLAS_INSTANCE", + OktaApp: "OKTA_APP", + OktaRole: "OKTA_ROLE", + OpalRole: "OPAL_ROLE", + OpalScopedRole: "OPAL_SCOPED_ROLE", + PagerdutyRole: "PAGERDUTY_ROLE", + TailscaleSsh: "TAILSCALE_SSH", + TwingateResource: "TWINGATE_RESOURCE", + SalesforcePermissionSet: "SALESFORCE_PERMISSION_SET", + SalesforceProfile: "SALESFORCE_PROFILE", + SalesforceRole: "SALESFORCE_ROLE", + SnowflakeDatabase: "SNOWFLAKE_DATABASE", + SnowflakeSchema: "SNOWFLAKE_SCHEMA", + SnowflakeTable: "SNOWFLAKE_TABLE", + WorkdayRole: "WORKDAY_ROLE", + MysqlInstance: "MYSQL_INSTANCE", + MariadbInstance: "MARIADB_INSTANCE", + PostgresInstance: "POSTGRES_INSTANCE", + TeleportRole: "TELEPORT_ROLE", + DatabricksAccountServicePrincipal: "DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL", + IlevelAdvancedRole: "ILEVEL_ADVANCED_ROLE", +} as const; +/** + * Granular subtype of an entity. + */ +export type EntityItemTypeEnum = ClosedEnum; + +/** @internal */ +export const EntityItemTypeEnum$inboundSchema: z.ZodNativeEnum< + typeof EntityItemTypeEnum +> = z.nativeEnum(EntityItemTypeEnum); +/** @internal */ +export const EntityItemTypeEnum$outboundSchema: z.ZodNativeEnum< + typeof EntityItemTypeEnum +> = EntityItemTypeEnum$inboundSchema; diff --git a/src/models/components/entitynamefilter.ts b/src/models/components/entitynamefilter.ts new file mode 100644 index 00000000..4946c59d --- /dev/null +++ b/src/models/components/entitynamefilter.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + StringMatchType, + StringMatchType$inboundSchema, + StringMatchType$outboundSchema, +} from "./stringmatchtype.js"; + +/** + * Filters entities by name using a string match strategy. + */ +export type EntityNameFilter = { + /** + * How to match a string value against entity names. REGEX matches the value as a case-insensitive regular expression. + */ + stringMatchType: StringMatchType; + /** + * The string value to match against the entity name. + */ + string: string; +}; + +/** @internal */ +export const EntityNameFilter$inboundSchema: z.ZodType< + EntityNameFilter, + z.ZodTypeDef, + unknown +> = z.object({ + stringMatchType: StringMatchType$inboundSchema, + string: z.string(), +}); +/** @internal */ +export type EntityNameFilter$Outbound = { + stringMatchType: string; + string: string; +}; + +/** @internal */ +export const EntityNameFilter$outboundSchema: z.ZodType< + EntityNameFilter$Outbound, + z.ZodTypeDef, + EntityNameFilter +> = z.object({ + stringMatchType: StringMatchType$outboundSchema, + string: z.string(), +}); + +export function entityNameFilterToJSON( + entityNameFilter: EntityNameFilter, +): string { + return JSON.stringify( + EntityNameFilter$outboundSchema.parse(entityNameFilter), + ); +} +export function entityNameFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EntityNameFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EntityNameFilter' from JSON`, + ); +} diff --git a/src/models/components/entitytagfilter.ts b/src/models/components/entitytagfilter.ts new file mode 100644 index 00000000..636cc6e6 --- /dev/null +++ b/src/models/components/entitytagfilter.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Filters entities by a tag key/value pair, optionally scoped to a connection. + */ +export type EntityTagFilter = { + /** + * The tag key to filter by. + */ + key: string; + /** + * The tag value to filter by. If omitted, matches any value for the given key. + */ + value?: string | undefined; + /** + * If specified, filters by tags associated with this connection. + */ + connectionId?: string | undefined; +}; + +/** @internal */ +export const EntityTagFilter$inboundSchema: z.ZodType< + EntityTagFilter, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string(), + value: z.string().optional(), + connectionId: z.string().optional(), +}); +/** @internal */ +export type EntityTagFilter$Outbound = { + key: string; + value?: string | undefined; + connectionId?: string | undefined; +}; + +/** @internal */ +export const EntityTagFilter$outboundSchema: z.ZodType< + EntityTagFilter$Outbound, + z.ZodTypeDef, + EntityTagFilter +> = z.object({ + key: z.string(), + value: z.string().optional(), + connectionId: z.string().optional(), +}); + +export function entityTagFilterToJSON( + entityTagFilter: EntityTagFilter, +): string { + return JSON.stringify(EntityTagFilter$outboundSchema.parse(entityTagFilter)); +} +export function entityTagFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EntityTagFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EntityTagFilter' from JSON`, + ); +} diff --git a/src/models/components/entitytypeenum.ts b/src/models/components/entitytypeenum.ts index c44815ba..a3792479 100644 --- a/src/models/components/entitytypeenum.ts +++ b/src/models/components/entitytypeenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -22,19 +22,7 @@ export type EntityTypeEnum = ClosedEnum; export const EntityTypeEnum$inboundSchema: z.ZodNativeEnum< typeof EntityTypeEnum > = z.nativeEnum(EntityTypeEnum); - /** @internal */ export const EntityTypeEnum$outboundSchema: z.ZodNativeEnum< typeof EntityTypeEnum > = EntityTypeEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EntityTypeEnum$ { - /** @deprecated use `EntityTypeEnum$inboundSchema` instead. */ - export const inboundSchema = EntityTypeEnum$inboundSchema; - /** @deprecated use `EntityTypeEnum$outboundSchema` instead. */ - export const outboundSchema = EntityTypeEnum$outboundSchema; -} diff --git a/src/models/components/event.ts b/src/models/components/event.ts index bf2252fd..546905c5 100644 --- a/src/models/components/event.ts +++ b/src/models/components/event.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -93,7 +93,6 @@ export const Event$inboundSchema: z.ZodType = z "sub_events": "subEvents", }); }); - /** @internal */ export type Event$Outbound = { event_id: string; @@ -139,23 +138,9 @@ export const Event$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Event$ { - /** @deprecated use `Event$inboundSchema` instead. */ - export const inboundSchema = Event$inboundSchema; - /** @deprecated use `Event$outboundSchema` instead. */ - export const outboundSchema = Event$outboundSchema; - /** @deprecated use `Event$Outbound` instead. */ - export type Outbound = Event$Outbound; -} - export function eventToJSON(event: Event): string { return JSON.stringify(Event$outboundSchema.parse(event)); } - export function eventFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/eventstream.ts b/src/models/components/eventstream.ts new file mode 100644 index 00000000..582aec78 --- /dev/null +++ b/src/models/components/eventstream.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + EventStreamConnection, + EventStreamConnection$inboundSchema, + EventStreamConnection$Outbound, + EventStreamConnection$outboundSchema, +} from "./eventstreamconnection.js"; + +/** + * An event streaming connection that publishes events to an external system. + */ +export type EventStream = { + /** + * The ID of the event stream. + */ + eventStreamId: string; + /** + * The connection configuration for an event stream. + */ + connection: EventStreamConnection; +}; + +/** @internal */ +export const EventStream$inboundSchema: z.ZodType< + EventStream, + z.ZodTypeDef, + unknown +> = z.object({ + event_stream_id: z.string(), + connection: EventStreamConnection$inboundSchema, +}).transform((v) => { + return remap$(v, { + "event_stream_id": "eventStreamId", + }); +}); +/** @internal */ +export type EventStream$Outbound = { + event_stream_id: string; + connection: EventStreamConnection$Outbound; +}; + +/** @internal */ +export const EventStream$outboundSchema: z.ZodType< + EventStream$Outbound, + z.ZodTypeDef, + EventStream +> = z.object({ + eventStreamId: z.string(), + connection: EventStreamConnection$outboundSchema, +}).transform((v) => { + return remap$(v, { + eventStreamId: "event_stream_id", + }); +}); + +export function eventStreamToJSON(eventStream: EventStream): string { + return JSON.stringify(EventStream$outboundSchema.parse(eventStream)); +} +export function eventStreamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EventStream$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventStream' from JSON`, + ); +} diff --git a/src/models/components/eventstreamconnection.ts b/src/models/components/eventstreamconnection.ts new file mode 100644 index 00000000..0d38dcd2 --- /dev/null +++ b/src/models/components/eventstreamconnection.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + EventStreamConnectionTypeEnum, + EventStreamConnectionTypeEnum$inboundSchema, + EventStreamConnectionTypeEnum$outboundSchema, +} from "./eventstreamconnectiontypeenum.js"; +import { + WebhookCredentials, + WebhookCredentials$inboundSchema, + WebhookCredentials$Outbound, + WebhookCredentials$outboundSchema, +} from "./webhookcredentials.js"; + +/** + * The connection configuration for an event stream. + */ +export type EventStreamConnection = { + /** + * The name of the connection. + */ + name: string; + /** + * The type of event stream connection. + */ + connectionType: EventStreamConnectionTypeEnum; + /** + * Whether the connection is enabled. + */ + enabled: boolean; + /** + * The webhook URL, present when connection_type is WEBHOOK. + */ + webhookUrl?: string | undefined; + /** + * Authentication credentials for a webhook connection. + */ + credentials?: WebhookCredentials | undefined; +}; + +/** @internal */ +export const EventStreamConnection$inboundSchema: z.ZodType< + EventStreamConnection, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + connection_type: EventStreamConnectionTypeEnum$inboundSchema, + enabled: z.boolean(), + webhook_url: z.string().optional(), + credentials: WebhookCredentials$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "connection_type": "connectionType", + "webhook_url": "webhookUrl", + }); +}); +/** @internal */ +export type EventStreamConnection$Outbound = { + name: string; + connection_type: string; + enabled: boolean; + webhook_url?: string | undefined; + credentials?: WebhookCredentials$Outbound | undefined; +}; + +/** @internal */ +export const EventStreamConnection$outboundSchema: z.ZodType< + EventStreamConnection$Outbound, + z.ZodTypeDef, + EventStreamConnection +> = z.object({ + name: z.string(), + connectionType: EventStreamConnectionTypeEnum$outboundSchema, + enabled: z.boolean(), + webhookUrl: z.string().optional(), + credentials: WebhookCredentials$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + connectionType: "connection_type", + webhookUrl: "webhook_url", + }); +}); + +export function eventStreamConnectionToJSON( + eventStreamConnection: EventStreamConnection, +): string { + return JSON.stringify( + EventStreamConnection$outboundSchema.parse(eventStreamConnection), + ); +} +export function eventStreamConnectionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EventStreamConnection$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventStreamConnection' from JSON`, + ); +} diff --git a/src/models/components/eventstreamconnectiontypeenum.ts b/src/models/components/eventstreamconnectiontypeenum.ts new file mode 100644 index 00000000..703a2c86 --- /dev/null +++ b/src/models/components/eventstreamconnectiontypeenum.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The type of event stream connection. + */ +export const EventStreamConnectionTypeEnum = { + Webhook: "WEBHOOK", +} as const; +/** + * The type of event stream connection. + */ +export type EventStreamConnectionTypeEnum = ClosedEnum< + typeof EventStreamConnectionTypeEnum +>; + +/** @internal */ +export const EventStreamConnectionTypeEnum$inboundSchema: z.ZodNativeEnum< + typeof EventStreamConnectionTypeEnum +> = z.nativeEnum(EventStreamConnectionTypeEnum); +/** @internal */ +export const EventStreamConnectionTypeEnum$outboundSchema: z.ZodNativeEnum< + typeof EventStreamConnectionTypeEnum +> = EventStreamConnectionTypeEnum$inboundSchema; diff --git a/src/models/components/eventstreamlist.ts b/src/models/components/eventstreamlist.ts new file mode 100644 index 00000000..17719343 --- /dev/null +++ b/src/models/components/eventstreamlist.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + EventStream, + EventStream$inboundSchema, + EventStream$Outbound, + EventStream$outboundSchema, +} from "./eventstream.js"; + +/** + * A list of event streams. + */ +export type EventStreamList = { + eventStreams: Array; +}; + +/** @internal */ +export const EventStreamList$inboundSchema: z.ZodType< + EventStreamList, + z.ZodTypeDef, + unknown +> = z.object({ + event_streams: z.array(EventStream$inboundSchema), +}).transform((v) => { + return remap$(v, { + "event_streams": "eventStreams", + }); +}); +/** @internal */ +export type EventStreamList$Outbound = { + event_streams: Array; +}; + +/** @internal */ +export const EventStreamList$outboundSchema: z.ZodType< + EventStreamList$Outbound, + z.ZodTypeDef, + EventStreamList +> = z.object({ + eventStreams: z.array(EventStream$outboundSchema), +}).transform((v) => { + return remap$(v, { + eventStreams: "event_streams", + }); +}); + +export function eventStreamListToJSON( + eventStreamList: EventStreamList, +): string { + return JSON.stringify(EventStreamList$outboundSchema.parse(eventStreamList)); +} +export function eventStreamListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EventStreamList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventStreamList' from JSON`, + ); +} diff --git a/src/models/components/group.ts b/src/models/components/group.ts index e7e60c59..697e6472 100644 --- a/src/models/components/group.ts +++ b/src/models/components/group.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; @@ -30,6 +30,12 @@ import { RiskSensitivityEnum$inboundSchema, RiskSensitivityEnum$outboundSchema, } from "./risksensitivityenum.js"; +import { + SyncTask, + SyncTask$inboundSchema, + SyncTask$Outbound, + SyncTask$outboundSchema, +} from "./synctask.js"; /** * The risk sensitivity level for the group. When an override is set, this field will match that. @@ -102,6 +108,10 @@ export type Group = { * The recommended duration for which the group should be requested (in minutes). -1 represents an indefinite duration. */ recommendedDuration?: number | undefined; + /** + * The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. + */ + extensionsDurationInMinutes?: number | undefined; /** * A bool representing whether or not access requests to the group require manager approval. * @@ -157,7 +167,7 @@ export type Group = { */ metadata?: string | undefined; /** - * Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. + * Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. If remote_info is provided, a group will be imported into Opal. For group types that support group creation through Opal, a new group will be created if remote_info is not provided. */ remoteInfo?: GroupRemoteInfo | undefined; /** @@ -169,29 +179,29 @@ export type Group = { */ riskSensitivity?: GroupRiskSensitivity | undefined; riskSensitivityOverride?: RiskSensitivityEnum | undefined; + /** + * A bool representing whether or not the group's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false. + */ + matchRemoteName?: boolean | undefined; + /** + * A bool representing whether or not the group's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false. + */ + matchRemoteDescription?: boolean | undefined; + /** + * Represents a sync task that has been completed, either successfully or with errors. + */ + lastSuccessfulSync?: SyncTask | undefined; }; /** @internal */ export const GroupRiskSensitivity$inboundSchema: z.ZodNativeEnum< typeof GroupRiskSensitivity > = z.nativeEnum(GroupRiskSensitivity); - /** @internal */ export const GroupRiskSensitivity$outboundSchema: z.ZodNativeEnum< typeof GroupRiskSensitivity > = GroupRiskSensitivity$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupRiskSensitivity$ { - /** @deprecated use `GroupRiskSensitivity$inboundSchema` instead. */ - export const inboundSchema = GroupRiskSensitivity$inboundSchema; - /** @deprecated use `GroupRiskSensitivity$outboundSchema` instead. */ - export const outboundSchema = GroupRiskSensitivity$outboundSchema; -} - /** @internal */ export const Group$inboundSchema: z.ZodType = z .object({ @@ -206,6 +216,7 @@ export const Group$inboundSchema: z.ZodType = z group_type: GroupTypeEnum$inboundSchema.optional(), max_duration: z.number().int().optional(), recommended_duration: z.number().int().optional(), + extensions_duration_in_minutes: z.number().int().optional(), require_manager_approval: z.boolean().optional(), require_support_ticket: z.boolean().optional(), require_mfa_to_approve: z.boolean().optional(), @@ -224,6 +235,9 @@ export const Group$inboundSchema: z.ZodType = z custom_request_notification: z.nullable(z.string()).optional(), risk_sensitivity: GroupRiskSensitivity$inboundSchema.optional(), risk_sensitivity_override: RiskSensitivityEnum$inboundSchema.optional(), + match_remote_name: z.boolean().optional(), + match_remote_description: z.boolean().optional(), + last_successful_sync: SyncTask$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "group_id": "groupId", @@ -235,6 +249,7 @@ export const Group$inboundSchema: z.ZodType = z "group_type": "groupType", "max_duration": "maxDuration", "recommended_duration": "recommendedDuration", + "extensions_duration_in_minutes": "extensionsDurationInMinutes", "require_manager_approval": "requireManagerApproval", "require_support_ticket": "requireSupportTicket", "require_mfa_to_approve": "requireMfaToApprove", @@ -250,9 +265,11 @@ export const Group$inboundSchema: z.ZodType = z "custom_request_notification": "customRequestNotification", "risk_sensitivity": "riskSensitivity", "risk_sensitivity_override": "riskSensitivityOverride", + "match_remote_name": "matchRemoteName", + "match_remote_description": "matchRemoteDescription", + "last_successful_sync": "lastSuccessfulSync", }); }); - /** @internal */ export type Group$Outbound = { group_id: string; @@ -266,6 +283,7 @@ export type Group$Outbound = { group_type?: string | undefined; max_duration?: number | undefined; recommended_duration?: number | undefined; + extensions_duration_in_minutes?: number | undefined; require_manager_approval?: boolean | undefined; require_support_ticket?: boolean | undefined; require_mfa_to_approve?: boolean | undefined; @@ -282,6 +300,9 @@ export type Group$Outbound = { custom_request_notification?: string | null | undefined; risk_sensitivity?: string | undefined; risk_sensitivity_override?: string | undefined; + match_remote_name?: boolean | undefined; + match_remote_description?: boolean | undefined; + last_successful_sync?: SyncTask$Outbound | undefined; }; /** @internal */ @@ -301,6 +322,7 @@ export const Group$outboundSchema: z.ZodType< groupType: GroupTypeEnum$outboundSchema.optional(), maxDuration: z.number().int().optional(), recommendedDuration: z.number().int().optional(), + extensionsDurationInMinutes: z.number().int().optional(), requireManagerApproval: z.boolean().optional(), requireSupportTicket: z.boolean().optional(), requireMfaToApprove: z.boolean().optional(), @@ -319,6 +341,9 @@ export const Group$outboundSchema: z.ZodType< customRequestNotification: z.nullable(z.string()).optional(), riskSensitivity: GroupRiskSensitivity$outboundSchema.optional(), riskSensitivityOverride: RiskSensitivityEnum$outboundSchema.optional(), + matchRemoteName: z.boolean().optional(), + matchRemoteDescription: z.boolean().optional(), + lastSuccessfulSync: SyncTask$outboundSchema.optional(), }).transform((v) => { return remap$(v, { groupId: "group_id", @@ -330,6 +355,7 @@ export const Group$outboundSchema: z.ZodType< groupType: "group_type", maxDuration: "max_duration", recommendedDuration: "recommended_duration", + extensionsDurationInMinutes: "extensions_duration_in_minutes", requireManagerApproval: "require_manager_approval", requireSupportTicket: "require_support_ticket", requireMfaToApprove: "require_mfa_to_approve", @@ -345,26 +371,15 @@ export const Group$outboundSchema: z.ZodType< customRequestNotification: "custom_request_notification", riskSensitivity: "risk_sensitivity", riskSensitivityOverride: "risk_sensitivity_override", + matchRemoteName: "match_remote_name", + matchRemoteDescription: "match_remote_description", + lastSuccessfulSync: "last_successful_sync", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Group$ { - /** @deprecated use `Group$inboundSchema` instead. */ - export const inboundSchema = Group$inboundSchema; - /** @deprecated use `Group$outboundSchema` instead. */ - export const outboundSchema = Group$outboundSchema; - /** @deprecated use `Group$Outbound` instead. */ - export type Outbound = Group$Outbound; -} - export function groupToJSON(group: Group): string { return JSON.stringify(Group$outboundSchema.parse(group)); } - export function groupFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupaccesslevel.ts b/src/models/components/groupaccesslevel.ts index 7a4c3eda..1a51a9c9 100644 --- a/src/models/components/groupaccesslevel.ts +++ b/src/models/components/groupaccesslevel.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -44,7 +44,6 @@ export const GroupAccessLevel$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type GroupAccessLevel$Outbound = { access_level_name: string; @@ -66,19 +65,6 @@ export const GroupAccessLevel$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupAccessLevel$ { - /** @deprecated use `GroupAccessLevel$inboundSchema` instead. */ - export const inboundSchema = GroupAccessLevel$inboundSchema; - /** @deprecated use `GroupAccessLevel$outboundSchema` instead. */ - export const outboundSchema = GroupAccessLevel$outboundSchema; - /** @deprecated use `GroupAccessLevel$Outbound` instead. */ - export type Outbound = GroupAccessLevel$Outbound; -} - export function groupAccessLevelToJSON( groupAccessLevel: GroupAccessLevel, ): string { @@ -86,7 +72,6 @@ export function groupAccessLevelToJSON( GroupAccessLevel$outboundSchema.parse(groupAccessLevel), ); } - export function groupAccessLevelFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupbinding.ts b/src/models/components/groupbinding.ts index 46b529aa..4563af6e 100644 --- a/src/models/components/groupbinding.ts +++ b/src/models/components/groupbinding.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -66,7 +66,6 @@ export const GroupBinding$inboundSchema: z.ZodType< "source_group_id": "sourceGroupId", }); }); - /** @internal */ export type GroupBinding$Outbound = { group_binding_id: string; @@ -96,23 +95,9 @@ export const GroupBinding$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupBinding$ { - /** @deprecated use `GroupBinding$inboundSchema` instead. */ - export const inboundSchema = GroupBinding$inboundSchema; - /** @deprecated use `GroupBinding$outboundSchema` instead. */ - export const outboundSchema = GroupBinding$outboundSchema; - /** @deprecated use `GroupBinding$Outbound` instead. */ - export type Outbound = GroupBinding$Outbound; -} - export function groupBindingToJSON(groupBinding: GroupBinding): string { return JSON.stringify(GroupBinding$outboundSchema.parse(groupBinding)); } - export function groupBindingFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupbindinggroup.ts b/src/models/components/groupbindinggroup.ts index 5cb2aa98..68ceddc2 100644 --- a/src/models/components/groupbindinggroup.ts +++ b/src/models/components/groupbindinggroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -48,7 +48,6 @@ export const GroupBindingGroup$inboundSchema: z.ZodType< "group_type": "groupType", }); }); - /** @internal */ export type GroupBindingGroup$Outbound = { group_id: string; @@ -70,19 +69,6 @@ export const GroupBindingGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupBindingGroup$ { - /** @deprecated use `GroupBindingGroup$inboundSchema` instead. */ - export const inboundSchema = GroupBindingGroup$inboundSchema; - /** @deprecated use `GroupBindingGroup$outboundSchema` instead. */ - export const outboundSchema = GroupBindingGroup$outboundSchema; - /** @deprecated use `GroupBindingGroup$Outbound` instead. */ - export type Outbound = GroupBindingGroup$Outbound; -} - export function groupBindingGroupToJSON( groupBindingGroup: GroupBindingGroup, ): string { @@ -90,7 +76,6 @@ export function groupBindingGroupToJSON( GroupBindingGroup$outboundSchema.parse(groupBindingGroup), ); } - export function groupBindingGroupFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupcontaininggroup.ts b/src/models/components/groupcontaininggroup.ts index ee010288..8209fe3f 100644 --- a/src/models/components/groupcontaininggroup.ts +++ b/src/models/components/groupcontaininggroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -20,6 +20,14 @@ export type GroupContainingGroup = { * The groupID of the containing group. */ containingGroupId: string; + /** + * The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. + */ + durationMinutes?: number | undefined; + /** + * The updated remote ID of the access level granted to this group. + */ + accessLevelRemoteId?: string | undefined; }; /** @internal */ @@ -29,15 +37,20 @@ export const GroupContainingGroup$inboundSchema: z.ZodType< unknown > = z.object({ containing_group_id: z.string(), + duration_minutes: z.number().int().optional(), + access_level_remote_id: z.string().optional(), }).transform((v) => { return remap$(v, { "containing_group_id": "containingGroupId", + "duration_minutes": "durationMinutes", + "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type GroupContainingGroup$Outbound = { containing_group_id: string; + duration_minutes?: number | undefined; + access_level_remote_id?: string | undefined; }; /** @internal */ @@ -47,25 +60,16 @@ export const GroupContainingGroup$outboundSchema: z.ZodType< GroupContainingGroup > = z.object({ containingGroupId: z.string(), + durationMinutes: z.number().int().optional(), + accessLevelRemoteId: z.string().optional(), }).transform((v) => { return remap$(v, { containingGroupId: "containing_group_id", + durationMinutes: "duration_minutes", + accessLevelRemoteId: "access_level_remote_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupContainingGroup$ { - /** @deprecated use `GroupContainingGroup$inboundSchema` instead. */ - export const inboundSchema = GroupContainingGroup$inboundSchema; - /** @deprecated use `GroupContainingGroup$outboundSchema` instead. */ - export const outboundSchema = GroupContainingGroup$outboundSchema; - /** @deprecated use `GroupContainingGroup$Outbound` instead. */ - export type Outbound = GroupContainingGroup$Outbound; -} - export function groupContainingGroupToJSON( groupContainingGroup: GroupContainingGroup, ): string { @@ -73,7 +77,6 @@ export function groupContainingGroupToJSON( GroupContainingGroup$outboundSchema.parse(groupContainingGroup), ); } - export function groupContainingGroupFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupcontaininggrouplist.ts b/src/models/components/groupcontaininggrouplist.ts index 19574425..3011295b 100644 --- a/src/models/components/groupcontaininggrouplist.ts +++ b/src/models/components/groupcontaininggrouplist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -30,7 +30,6 @@ export const GroupContainingGroupList$inboundSchema: z.ZodType< "containing_groups": "containingGroups", }); }); - /** @internal */ export type GroupContainingGroupList$Outbound = { containing_groups: Array; @@ -49,19 +48,6 @@ export const GroupContainingGroupList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupContainingGroupList$ { - /** @deprecated use `GroupContainingGroupList$inboundSchema` instead. */ - export const inboundSchema = GroupContainingGroupList$inboundSchema; - /** @deprecated use `GroupContainingGroupList$outboundSchema` instead. */ - export const outboundSchema = GroupContainingGroupList$outboundSchema; - /** @deprecated use `GroupContainingGroupList$Outbound` instead. */ - export type Outbound = GroupContainingGroupList$Outbound; -} - export function groupContainingGroupListToJSON( groupContainingGroupList: GroupContainingGroupList, ): string { @@ -69,7 +55,6 @@ export function groupContainingGroupListToJSON( GroupContainingGroupList$outboundSchema.parse(groupContainingGroupList), ); } - export function groupContainingGroupListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupremoteinfo.ts b/src/models/components/groupremoteinfo.ts index 688785e0..e47ecc2f 100644 --- a/src/models/components/groupremoteinfo.ts +++ b/src/models/components/groupremoteinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -18,6 +18,66 @@ export type ActiveDirectoryGroup = { groupId: string; }; +/** + * Remote info for Tailscale group. + */ +export type TailscaleGroup = { + /** + * The id of the Tailscale group. + */ + groupId: string; +}; + +/** + * Remote info for Twingate group. + */ +export type TwingateGroup = { + /** + * The id of the Twingate group. + */ + groupId: string; +}; + +/** + * Remote info for Twingate synced group. + */ +export type TwingateGroupSynced = { + /** + * The id of the Twingate synced group. + */ + groupId: string; +}; + +/** + * Remote info for AWS SSO group. + */ +export type AwsSsoGroup = { + /** + * The id of the AWS SSO group. + */ + groupId: string; +}; + +/** + * Remote info for Databricks account group. + */ +export type DatabricksAccountGroup = { + /** + * The id of the Databricks account group. + */ + groupId: string; +}; + +/** + * Remote info for Connector group. + */ +export type ConnectorGroup = { + /** + * The id of the Connector group. + */ + groupId: string; +}; + /** * Remote info for GitHub team. */ @@ -32,6 +92,20 @@ export type GithubTeam = { * The slug of the GitHub team. */ teamSlug: string; + /** + * GitHub team's org name, required only for Enterprise + */ + orgName?: string | undefined; +}; + +/** + * Remote info for GitHub Enterprise team. + */ +export type GithubEnterpriseTeam = { + /** + * The slug of the GitHub Enterprise team. + */ + teamSlug: string; }; /** @@ -135,17 +209,205 @@ export type WorkdayUserSecurityGroup = { }; /** - * Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. + * Remote info for PagerDuty on-call schedule group. + */ +export type PagerdutyOnCallSchedule = { + /** + * The id of the PagerDuty on-call schedule. + */ + scheduleId: string; +}; + +/** + * Remote info for Incident.io on-call schedule group. + */ +export type IncidentioOnCallSchedule = { + /** + * The id of the Incident.io on-call schedule. + */ + scheduleId: string; +}; + +/** + * Remote info for Rootly on-call schedule group. + */ +export type RootlyOnCallSchedule = { + /** + * The id of the Rootly on-call schedule. + */ + scheduleId: string; +}; + +/** + * Remote info for Devin group. + */ +export type DevinGroup = { + /** + * The name of the Devin group. + */ + groupName: string; +}; + +/** + * Remote info for ClickHouse role. + */ +export type ClickhouseRole = { + /** + * The name of the ClickHouse role. + */ + roleId: string; +}; + +/** + * Remote info for Grafana team. + */ +export type GrafanaTeam = { + /** + * The ID of the team. + */ + teamId: string; +}; + +/** + * Remote info for Zendesk group. + */ +export type ZendeskGroup = { + /** + * The ID of the Zendesk group. + */ + groupId: string; +}; + +/** + * Remote info for Slack user group. + */ +export type SlackUserGroup = { + /** + * The id of the Slack user group. + */ + groupId: string; +}; + +/** + * Remote info for Zendesk organization. + */ +export type ZendeskOrganization = { + /** + * The ID of the Zendesk organization. + */ + organizationId: string; +}; + +/** + * Remote info for HubSpot team. + */ +export type HubspotTeam = { + /** + * The ID of the HubSpot team. + */ + teamId: string; +}; + +/** + * Remote info for Tableau group. + */ +export type TableauGroup = { + /** + * The ID of the Tableau group. + */ + groupId: string; +}; + +/** + * Remote info for Confluence group. + */ +export type ConfluenceGroup = { + /** + * The ID of the Confluence group. + */ + groupId: string; +}; + +/** + * Remote info for Jira group. + */ +export type JiraGroup = { + /** + * The ID of the Jira group. + */ + groupId: string; +}; + +/** + * Remote info for Docusign group. + */ +export type DocusignGroup = { + /** + * The ID of the Docusign group. + */ + groupId: string; +}; + +/** + * Remote info for Zoom group. + */ +export type ZoomGroup = { + /** + * The ID of the Zoom group. + */ + groupId: string; +}; + +/** + * Remote info for Docusign signing group. + */ +export type DocusignSigningGroup = { + /** + * The ID of the Docusign signing group. + */ + signingGroupId: string; +}; + +/** + * Information that defines the remote group. This replaces the deprecated remote_id and metadata fields. If remote_info is provided, a group will be imported into Opal. For group types that support group creation through Opal, a new group will be created if remote_info is not provided. */ export type GroupRemoteInfo = { /** * Remote info for Active Directory group. */ activeDirectoryGroup?: ActiveDirectoryGroup | undefined; + /** + * Remote info for Tailscale group. + */ + tailscaleGroup?: TailscaleGroup | undefined; + /** + * Remote info for Twingate group. + */ + twingateGroup?: TwingateGroup | undefined; + /** + * Remote info for Twingate synced group. + */ + twingateGroupSynced?: TwingateGroupSynced | undefined; + /** + * Remote info for AWS SSO group. + */ + awsSsoGroup?: AwsSsoGroup | undefined; + /** + * Remote info for Databricks account group. + */ + databricksAccountGroup?: DatabricksAccountGroup | undefined; + /** + * Remote info for Connector group. + */ + connectorGroup?: ConnectorGroup | undefined; /** * Remote info for GitHub team. */ githubTeam?: GithubTeam | undefined; + /** + * Remote info for GitHub Enterprise team. + */ + githubEnterpriseTeam?: GithubEnterpriseTeam | undefined; /** * Remote info for Gitlab group. */ @@ -186,6 +448,70 @@ export type GroupRemoteInfo = { * Remote info for Workday User Security group. */ workdayUserSecurityGroup?: WorkdayUserSecurityGroup | undefined; + /** + * Remote info for PagerDuty on-call schedule group. + */ + pagerdutyOnCallSchedule?: PagerdutyOnCallSchedule | undefined; + /** + * Remote info for Incident.io on-call schedule group. + */ + incidentioOnCallSchedule?: IncidentioOnCallSchedule | undefined; + /** + * Remote info for Rootly on-call schedule group. + */ + rootlyOnCallSchedule?: RootlyOnCallSchedule | undefined; + /** + * Remote info for Devin group. + */ + devinGroup?: DevinGroup | undefined; + /** + * Remote info for ClickHouse role. + */ + clickhouseRole?: ClickhouseRole | undefined; + /** + * Remote info for Grafana team. + */ + grafanaTeam?: GrafanaTeam | undefined; + /** + * Remote info for Zendesk group. + */ + zendeskGroup?: ZendeskGroup | undefined; + /** + * Remote info for Slack user group. + */ + slackUserGroup?: SlackUserGroup | undefined; + /** + * Remote info for Zendesk organization. + */ + zendeskOrganization?: ZendeskOrganization | undefined; + /** + * Remote info for HubSpot team. + */ + hubspotTeam?: HubspotTeam | undefined; + /** + * Remote info for Tableau group. + */ + tableauGroup?: TableauGroup | undefined; + /** + * Remote info for Confluence group. + */ + confluenceGroup?: ConfluenceGroup | undefined; + /** + * Remote info for Jira group. + */ + jiraGroup?: JiraGroup | undefined; + /** + * Remote info for Docusign group. + */ + docusignGroup?: DocusignGroup | undefined; + /** + * Remote info for Zoom group. + */ + zoomGroup?: ZoomGroup | undefined; + /** + * Remote info for Docusign signing group. + */ + docusignSigningGroup?: DocusignSigningGroup | undefined; }; /** @internal */ @@ -200,7 +526,6 @@ export const ActiveDirectoryGroup$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type ActiveDirectoryGroup$Outbound = { group_id: string; @@ -219,19 +544,6 @@ export const ActiveDirectoryGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ActiveDirectoryGroup$ { - /** @deprecated use `ActiveDirectoryGroup$inboundSchema` instead. */ - export const inboundSchema = ActiveDirectoryGroup$inboundSchema; - /** @deprecated use `ActiveDirectoryGroup$outboundSchema` instead. */ - export const outboundSchema = ActiveDirectoryGroup$outboundSchema; - /** @deprecated use `ActiveDirectoryGroup$Outbound` instead. */ - export type Outbound = ActiveDirectoryGroup$Outbound; -} - export function activeDirectoryGroupToJSON( activeDirectoryGroup: ActiveDirectoryGroup, ): string { @@ -239,7 +551,6 @@ export function activeDirectoryGroupToJSON( ActiveDirectoryGroup$outboundSchema.parse(activeDirectoryGroup), ); } - export function activeDirectoryGroupFromJSON( jsonString: string, ): SafeParseResult { @@ -251,71 +562,1086 @@ export function activeDirectoryGroupFromJSON( } /** @internal */ -export const GithubTeam$inboundSchema: z.ZodType< - GithubTeam, +export const TailscaleGroup$inboundSchema: z.ZodType< + TailscaleGroup, z.ZodTypeDef, unknown > = z.object({ - team_id: z.string().optional(), - team_slug: z.string(), + group_id: z.string(), }).transform((v) => { return remap$(v, { - "team_id": "teamId", - "team_slug": "teamSlug", + "group_id": "groupId", }); }); - /** @internal */ -export type GithubTeam$Outbound = { - team_id?: string | undefined; - team_slug: string; +export type TailscaleGroup$Outbound = { + group_id: string; }; /** @internal */ -export const GithubTeam$outboundSchema: z.ZodType< - GithubTeam$Outbound, +export const TailscaleGroup$outboundSchema: z.ZodType< + TailscaleGroup$Outbound, z.ZodTypeDef, - GithubTeam + TailscaleGroup > = z.object({ - teamId: z.string().optional(), - teamSlug: z.string(), + groupId: z.string(), }).transform((v) => { return remap$(v, { - teamId: "team_id", - teamSlug: "team_slug", + groupId: "group_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GithubTeam$ { - /** @deprecated use `GithubTeam$inboundSchema` instead. */ - export const inboundSchema = GithubTeam$inboundSchema; - /** @deprecated use `GithubTeam$outboundSchema` instead. */ - export const outboundSchema = GithubTeam$outboundSchema; - /** @deprecated use `GithubTeam$Outbound` instead. */ - export type Outbound = GithubTeam$Outbound; +export function tailscaleGroupToJSON(tailscaleGroup: TailscaleGroup): string { + return JSON.stringify(TailscaleGroup$outboundSchema.parse(tailscaleGroup)); } - -export function githubTeamToJSON(githubTeam: GithubTeam): string { - return JSON.stringify(GithubTeam$outboundSchema.parse(githubTeam)); +export function tailscaleGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TailscaleGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TailscaleGroup' from JSON`, + ); } -export function githubTeamFromJSON( +/** @internal */ +export const TwingateGroup$inboundSchema: z.ZodType< + TwingateGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type TwingateGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const TwingateGroup$outboundSchema: z.ZodType< + TwingateGroup$Outbound, + z.ZodTypeDef, + TwingateGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function twingateGroupToJSON(twingateGroup: TwingateGroup): string { + return JSON.stringify(TwingateGroup$outboundSchema.parse(twingateGroup)); +} +export function twingateGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TwingateGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TwingateGroup' from JSON`, + ); +} + +/** @internal */ +export const TwingateGroupSynced$inboundSchema: z.ZodType< + TwingateGroupSynced, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type TwingateGroupSynced$Outbound = { + group_id: string; +}; + +/** @internal */ +export const TwingateGroupSynced$outboundSchema: z.ZodType< + TwingateGroupSynced$Outbound, + z.ZodTypeDef, + TwingateGroupSynced +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function twingateGroupSyncedToJSON( + twingateGroupSynced: TwingateGroupSynced, +): string { + return JSON.stringify( + TwingateGroupSynced$outboundSchema.parse(twingateGroupSynced), + ); +} +export function twingateGroupSyncedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TwingateGroupSynced$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TwingateGroupSynced' from JSON`, + ); +} + +/** @internal */ +export const AwsSsoGroup$inboundSchema: z.ZodType< + AwsSsoGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type AwsSsoGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const AwsSsoGroup$outboundSchema: z.ZodType< + AwsSsoGroup$Outbound, + z.ZodTypeDef, + AwsSsoGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function awsSsoGroupToJSON(awsSsoGroup: AwsSsoGroup): string { + return JSON.stringify(AwsSsoGroup$outboundSchema.parse(awsSsoGroup)); +} +export function awsSsoGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsSsoGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsSsoGroup' from JSON`, + ); +} + +/** @internal */ +export const DatabricksAccountGroup$inboundSchema: z.ZodType< + DatabricksAccountGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type DatabricksAccountGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const DatabricksAccountGroup$outboundSchema: z.ZodType< + DatabricksAccountGroup$Outbound, + z.ZodTypeDef, + DatabricksAccountGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function databricksAccountGroupToJSON( + databricksAccountGroup: DatabricksAccountGroup, +): string { + return JSON.stringify( + DatabricksAccountGroup$outboundSchema.parse(databricksAccountGroup), + ); +} +export function databricksAccountGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DatabricksAccountGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DatabricksAccountGroup' from JSON`, + ); +} + +/** @internal */ +export const ConnectorGroup$inboundSchema: z.ZodType< + ConnectorGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type ConnectorGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const ConnectorGroup$outboundSchema: z.ZodType< + ConnectorGroup$Outbound, + z.ZodTypeDef, + ConnectorGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function connectorGroupToJSON(connectorGroup: ConnectorGroup): string { + return JSON.stringify(ConnectorGroup$outboundSchema.parse(connectorGroup)); +} +export function connectorGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ConnectorGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ConnectorGroup' from JSON`, + ); +} + +/** @internal */ +export const GithubTeam$inboundSchema: z.ZodType< + GithubTeam, + z.ZodTypeDef, + unknown +> = z.object({ + team_id: z.string().optional(), + team_slug: z.string(), + org_name: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "team_slug": "teamSlug", + "org_name": "orgName", + }); +}); +/** @internal */ +export type GithubTeam$Outbound = { + team_id?: string | undefined; + team_slug: string; + org_name?: string | undefined; +}; + +/** @internal */ +export const GithubTeam$outboundSchema: z.ZodType< + GithubTeam$Outbound, + z.ZodTypeDef, + GithubTeam +> = z.object({ + teamId: z.string().optional(), + teamSlug: z.string(), + orgName: z.string().optional(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + teamSlug: "team_slug", + orgName: "org_name", + }); +}); + +export function githubTeamToJSON(githubTeam: GithubTeam): string { + return JSON.stringify(GithubTeam$outboundSchema.parse(githubTeam)); +} +export function githubTeamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubTeam' from JSON`, + ); +} + +/** @internal */ +export const GithubEnterpriseTeam$inboundSchema: z.ZodType< + GithubEnterpriseTeam, + z.ZodTypeDef, + unknown +> = z.object({ + team_slug: z.string(), +}).transform((v) => { + return remap$(v, { + "team_slug": "teamSlug", + }); +}); +/** @internal */ +export type GithubEnterpriseTeam$Outbound = { + team_slug: string; +}; + +/** @internal */ +export const GithubEnterpriseTeam$outboundSchema: z.ZodType< + GithubEnterpriseTeam$Outbound, + z.ZodTypeDef, + GithubEnterpriseTeam +> = z.object({ + teamSlug: z.string(), +}).transform((v) => { + return remap$(v, { + teamSlug: "team_slug", + }); +}); + +export function githubEnterpriseTeamToJSON( + githubEnterpriseTeam: GithubEnterpriseTeam, +): string { + return JSON.stringify( + GithubEnterpriseTeam$outboundSchema.parse(githubEnterpriseTeam), + ); +} +export function githubEnterpriseTeamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubEnterpriseTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubEnterpriseTeam' from JSON`, + ); +} + +/** @internal */ +export const GitlabGroup$inboundSchema: z.ZodType< + GitlabGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type GitlabGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const GitlabGroup$outboundSchema: z.ZodType< + GitlabGroup$Outbound, + z.ZodTypeDef, + GitlabGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function gitlabGroupToJSON(gitlabGroup: GitlabGroup): string { + return JSON.stringify(GitlabGroup$outboundSchema.parse(gitlabGroup)); +} +export function gitlabGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GitlabGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitlabGroup' from JSON`, + ); +} + +/** @internal */ +export const GoogleGroup$inboundSchema: z.ZodType< + GoogleGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type GoogleGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const GoogleGroup$outboundSchema: z.ZodType< + GoogleGroup$Outbound, + z.ZodTypeDef, + GoogleGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function googleGroupToJSON(googleGroup: GoogleGroup): string { + return JSON.stringify(GoogleGroup$outboundSchema.parse(googleGroup)); +} +export function googleGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GoogleGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GoogleGroup' from JSON`, + ); +} + +/** @internal */ +export const LdapGroup$inboundSchema: z.ZodType< + LdapGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type LdapGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const LdapGroup$outboundSchema: z.ZodType< + LdapGroup$Outbound, + z.ZodTypeDef, + LdapGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function ldapGroupToJSON(ldapGroup: LdapGroup): string { + return JSON.stringify(LdapGroup$outboundSchema.parse(ldapGroup)); +} +export function ldapGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => LdapGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'LdapGroup' from JSON`, + ); +} + +/** @internal */ +export const OktaGroup$inboundSchema: z.ZodType< + OktaGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type OktaGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const OktaGroup$outboundSchema: z.ZodType< + OktaGroup$Outbound, + z.ZodTypeDef, + OktaGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function oktaGroupToJSON(oktaGroup: OktaGroup): string { + return JSON.stringify(OktaGroup$outboundSchema.parse(oktaGroup)); +} +export function oktaGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OktaGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OktaGroup' from JSON`, + ); +} + +/** @internal */ +export const DuoGroup$inboundSchema: z.ZodType< + DuoGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type DuoGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const DuoGroup$outboundSchema: z.ZodType< + DuoGroup$Outbound, + z.ZodTypeDef, + DuoGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function duoGroupToJSON(duoGroup: DuoGroup): string { + return JSON.stringify(DuoGroup$outboundSchema.parse(duoGroup)); +} +export function duoGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DuoGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DuoGroup' from JSON`, + ); +} + +/** @internal */ +export const AzureAdSecurityGroup$inboundSchema: z.ZodType< + AzureAdSecurityGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type AzureAdSecurityGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const AzureAdSecurityGroup$outboundSchema: z.ZodType< + AzureAdSecurityGroup$Outbound, + z.ZodTypeDef, + AzureAdSecurityGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function azureAdSecurityGroupToJSON( + azureAdSecurityGroup: AzureAdSecurityGroup, +): string { + return JSON.stringify( + AzureAdSecurityGroup$outboundSchema.parse(azureAdSecurityGroup), + ); +} +export function azureAdSecurityGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureAdSecurityGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureAdSecurityGroup' from JSON`, + ); +} + +/** @internal */ +export const AzureAdMicrosoft365Group$inboundSchema: z.ZodType< + AzureAdMicrosoft365Group, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type AzureAdMicrosoft365Group$Outbound = { + group_id: string; +}; + +/** @internal */ +export const AzureAdMicrosoft365Group$outboundSchema: z.ZodType< + AzureAdMicrosoft365Group$Outbound, + z.ZodTypeDef, + AzureAdMicrosoft365Group +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function azureAdMicrosoft365GroupToJSON( + azureAdMicrosoft365Group: AzureAdMicrosoft365Group, +): string { + return JSON.stringify( + AzureAdMicrosoft365Group$outboundSchema.parse(azureAdMicrosoft365Group), + ); +} +export function azureAdMicrosoft365GroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureAdMicrosoft365Group$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureAdMicrosoft365Group' from JSON`, + ); +} + +/** @internal */ +export const SnowflakeRole$inboundSchema: z.ZodType< + SnowflakeRole, + z.ZodTypeDef, + unknown +> = z.object({ + role_id: z.string(), +}).transform((v) => { + return remap$(v, { + "role_id": "roleId", + }); +}); +/** @internal */ +export type SnowflakeRole$Outbound = { + role_id: string; +}; + +/** @internal */ +export const SnowflakeRole$outboundSchema: z.ZodType< + SnowflakeRole$Outbound, + z.ZodTypeDef, + SnowflakeRole +> = z.object({ + roleId: z.string(), +}).transform((v) => { + return remap$(v, { + roleId: "role_id", + }); +}); + +export function snowflakeRoleToJSON(snowflakeRole: SnowflakeRole): string { + return JSON.stringify(SnowflakeRole$outboundSchema.parse(snowflakeRole)); +} +export function snowflakeRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SnowflakeRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SnowflakeRole' from JSON`, + ); +} + +/** @internal */ +export const OktaGroupRule$inboundSchema: z.ZodType< + OktaGroupRule, + z.ZodTypeDef, + unknown +> = z.object({ + rule_id: z.string(), +}).transform((v) => { + return remap$(v, { + "rule_id": "ruleId", + }); +}); +/** @internal */ +export type OktaGroupRule$Outbound = { + rule_id: string; +}; + +/** @internal */ +export const OktaGroupRule$outboundSchema: z.ZodType< + OktaGroupRule$Outbound, + z.ZodTypeDef, + OktaGroupRule +> = z.object({ + ruleId: z.string(), +}).transform((v) => { + return remap$(v, { + ruleId: "rule_id", + }); +}); + +export function oktaGroupRuleToJSON(oktaGroupRule: OktaGroupRule): string { + return JSON.stringify(OktaGroupRule$outboundSchema.parse(oktaGroupRule)); +} +export function oktaGroupRuleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OktaGroupRule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OktaGroupRule' from JSON`, + ); +} + +/** @internal */ +export const WorkdayUserSecurityGroup$inboundSchema: z.ZodType< + WorkdayUserSecurityGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "group_id": "groupId", + }); +}); +/** @internal */ +export type WorkdayUserSecurityGroup$Outbound = { + group_id: string; +}; + +/** @internal */ +export const WorkdayUserSecurityGroup$outboundSchema: z.ZodType< + WorkdayUserSecurityGroup$Outbound, + z.ZodTypeDef, + WorkdayUserSecurityGroup +> = z.object({ + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + groupId: "group_id", + }); +}); + +export function workdayUserSecurityGroupToJSON( + workdayUserSecurityGroup: WorkdayUserSecurityGroup, +): string { + return JSON.stringify( + WorkdayUserSecurityGroup$outboundSchema.parse(workdayUserSecurityGroup), + ); +} +export function workdayUserSecurityGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WorkdayUserSecurityGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WorkdayUserSecurityGroup' from JSON`, + ); +} + +/** @internal */ +export const PagerdutyOnCallSchedule$inboundSchema: z.ZodType< + PagerdutyOnCallSchedule, + z.ZodTypeDef, + unknown +> = z.object({ + schedule_id: z.string(), +}).transform((v) => { + return remap$(v, { + "schedule_id": "scheduleId", + }); +}); +/** @internal */ +export type PagerdutyOnCallSchedule$Outbound = { + schedule_id: string; +}; + +/** @internal */ +export const PagerdutyOnCallSchedule$outboundSchema: z.ZodType< + PagerdutyOnCallSchedule$Outbound, + z.ZodTypeDef, + PagerdutyOnCallSchedule +> = z.object({ + scheduleId: z.string(), +}).transform((v) => { + return remap$(v, { + scheduleId: "schedule_id", + }); +}); + +export function pagerdutyOnCallScheduleToJSON( + pagerdutyOnCallSchedule: PagerdutyOnCallSchedule, +): string { + return JSON.stringify( + PagerdutyOnCallSchedule$outboundSchema.parse(pagerdutyOnCallSchedule), + ); +} +export function pagerdutyOnCallScheduleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PagerdutyOnCallSchedule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PagerdutyOnCallSchedule' from JSON`, + ); +} + +/** @internal */ +export const IncidentioOnCallSchedule$inboundSchema: z.ZodType< + IncidentioOnCallSchedule, + z.ZodTypeDef, + unknown +> = z.object({ + schedule_id: z.string(), +}).transform((v) => { + return remap$(v, { + "schedule_id": "scheduleId", + }); +}); +/** @internal */ +export type IncidentioOnCallSchedule$Outbound = { + schedule_id: string; +}; + +/** @internal */ +export const IncidentioOnCallSchedule$outboundSchema: z.ZodType< + IncidentioOnCallSchedule$Outbound, + z.ZodTypeDef, + IncidentioOnCallSchedule +> = z.object({ + scheduleId: z.string(), +}).transform((v) => { + return remap$(v, { + scheduleId: "schedule_id", + }); +}); + +export function incidentioOnCallScheduleToJSON( + incidentioOnCallSchedule: IncidentioOnCallSchedule, +): string { + return JSON.stringify( + IncidentioOnCallSchedule$outboundSchema.parse(incidentioOnCallSchedule), + ); +} +export function incidentioOnCallScheduleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IncidentioOnCallSchedule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IncidentioOnCallSchedule' from JSON`, + ); +} + +/** @internal */ +export const RootlyOnCallSchedule$inboundSchema: z.ZodType< + RootlyOnCallSchedule, + z.ZodTypeDef, + unknown +> = z.object({ + schedule_id: z.string(), +}).transform((v) => { + return remap$(v, { + "schedule_id": "scheduleId", + }); +}); +/** @internal */ +export type RootlyOnCallSchedule$Outbound = { + schedule_id: string; +}; + +/** @internal */ +export const RootlyOnCallSchedule$outboundSchema: z.ZodType< + RootlyOnCallSchedule$Outbound, + z.ZodTypeDef, + RootlyOnCallSchedule +> = z.object({ + scheduleId: z.string(), +}).transform((v) => { + return remap$(v, { + scheduleId: "schedule_id", + }); +}); + +export function rootlyOnCallScheduleToJSON( + rootlyOnCallSchedule: RootlyOnCallSchedule, +): string { + return JSON.stringify( + RootlyOnCallSchedule$outboundSchema.parse(rootlyOnCallSchedule), + ); +} +export function rootlyOnCallScheduleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RootlyOnCallSchedule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RootlyOnCallSchedule' from JSON`, + ); +} + +/** @internal */ +export const DevinGroup$inboundSchema: z.ZodType< + DevinGroup, + z.ZodTypeDef, + unknown +> = z.object({ + group_name: z.string(), +}).transform((v) => { + return remap$(v, { + "group_name": "groupName", + }); +}); +/** @internal */ +export type DevinGroup$Outbound = { + group_name: string; +}; + +/** @internal */ +export const DevinGroup$outboundSchema: z.ZodType< + DevinGroup$Outbound, + z.ZodTypeDef, + DevinGroup +> = z.object({ + groupName: z.string(), +}).transform((v) => { + return remap$(v, { + groupName: "group_name", + }); +}); + +export function devinGroupToJSON(devinGroup: DevinGroup): string { + return JSON.stringify(DevinGroup$outboundSchema.parse(devinGroup)); +} +export function devinGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DevinGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DevinGroup' from JSON`, + ); +} + +/** @internal */ +export const ClickhouseRole$inboundSchema: z.ZodType< + ClickhouseRole, + z.ZodTypeDef, + unknown +> = z.object({ + role_id: z.string(), +}).transform((v) => { + return remap$(v, { + "role_id": "roleId", + }); +}); +/** @internal */ +export type ClickhouseRole$Outbound = { + role_id: string; +}; + +/** @internal */ +export const ClickhouseRole$outboundSchema: z.ZodType< + ClickhouseRole$Outbound, + z.ZodTypeDef, + ClickhouseRole +> = z.object({ + roleId: z.string(), +}).transform((v) => { + return remap$(v, { + roleId: "role_id", + }); +}); + +export function clickhouseRoleToJSON(clickhouseRole: ClickhouseRole): string { + return JSON.stringify(ClickhouseRole$outboundSchema.parse(clickhouseRole)); +} +export function clickhouseRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ClickhouseRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClickhouseRole' from JSON`, + ); +} + +/** @internal */ +export const GrafanaTeam$inboundSchema: z.ZodType< + GrafanaTeam, + z.ZodTypeDef, + unknown +> = z.object({ + team_id: z.string(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + }); +}); +/** @internal */ +export type GrafanaTeam$Outbound = { + team_id: string; +}; + +/** @internal */ +export const GrafanaTeam$outboundSchema: z.ZodType< + GrafanaTeam$Outbound, + z.ZodTypeDef, + GrafanaTeam +> = z.object({ + teamId: z.string(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + }); +}); + +export function grafanaTeamToJSON(grafanaTeam: GrafanaTeam): string { + return JSON.stringify(GrafanaTeam$outboundSchema.parse(grafanaTeam)); +} +export function grafanaTeamFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GithubTeam$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GithubTeam' from JSON`, + (x) => GrafanaTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GrafanaTeam' from JSON`, ); } /** @internal */ -export const GitlabGroup$inboundSchema: z.ZodType< - GitlabGroup, +export const ZendeskGroup$inboundSchema: z.ZodType< + ZendeskGroup, z.ZodTypeDef, unknown > = z.object({ @@ -325,17 +1651,16 @@ export const GitlabGroup$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ -export type GitlabGroup$Outbound = { +export type ZendeskGroup$Outbound = { group_id: string; }; /** @internal */ -export const GitlabGroup$outboundSchema: z.ZodType< - GitlabGroup$Outbound, +export const ZendeskGroup$outboundSchema: z.ZodType< + ZendeskGroup$Outbound, z.ZodTypeDef, - GitlabGroup + ZendeskGroup > = z.object({ groupId: z.string(), }).transform((v) => { @@ -344,36 +1669,22 @@ export const GitlabGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GitlabGroup$ { - /** @deprecated use `GitlabGroup$inboundSchema` instead. */ - export const inboundSchema = GitlabGroup$inboundSchema; - /** @deprecated use `GitlabGroup$outboundSchema` instead. */ - export const outboundSchema = GitlabGroup$outboundSchema; - /** @deprecated use `GitlabGroup$Outbound` instead. */ - export type Outbound = GitlabGroup$Outbound; -} - -export function gitlabGroupToJSON(gitlabGroup: GitlabGroup): string { - return JSON.stringify(GitlabGroup$outboundSchema.parse(gitlabGroup)); +export function zendeskGroupToJSON(zendeskGroup: ZendeskGroup): string { + return JSON.stringify(ZendeskGroup$outboundSchema.parse(zendeskGroup)); } - -export function gitlabGroupFromJSON( +export function zendeskGroupFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GitlabGroup$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GitlabGroup' from JSON`, + (x) => ZendeskGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ZendeskGroup' from JSON`, ); } /** @internal */ -export const GoogleGroup$inboundSchema: z.ZodType< - GoogleGroup, +export const SlackUserGroup$inboundSchema: z.ZodType< + SlackUserGroup, z.ZodTypeDef, unknown > = z.object({ @@ -383,17 +1694,16 @@ export const GoogleGroup$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ -export type GoogleGroup$Outbound = { +export type SlackUserGroup$Outbound = { group_id: string; }; /** @internal */ -export const GoogleGroup$outboundSchema: z.ZodType< - GoogleGroup$Outbound, +export const SlackUserGroup$outboundSchema: z.ZodType< + SlackUserGroup$Outbound, z.ZodTypeDef, - GoogleGroup + SlackUserGroup > = z.object({ groupId: z.string(), }).transform((v) => { @@ -402,152 +1712,112 @@ export const GoogleGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GoogleGroup$ { - /** @deprecated use `GoogleGroup$inboundSchema` instead. */ - export const inboundSchema = GoogleGroup$inboundSchema; - /** @deprecated use `GoogleGroup$outboundSchema` instead. */ - export const outboundSchema = GoogleGroup$outboundSchema; - /** @deprecated use `GoogleGroup$Outbound` instead. */ - export type Outbound = GoogleGroup$Outbound; -} - -export function googleGroupToJSON(googleGroup: GoogleGroup): string { - return JSON.stringify(GoogleGroup$outboundSchema.parse(googleGroup)); +export function slackUserGroupToJSON(slackUserGroup: SlackUserGroup): string { + return JSON.stringify(SlackUserGroup$outboundSchema.parse(slackUserGroup)); } - -export function googleGroupFromJSON( +export function slackUserGroupFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GoogleGroup$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GoogleGroup' from JSON`, + (x) => SlackUserGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SlackUserGroup' from JSON`, ); } /** @internal */ -export const LdapGroup$inboundSchema: z.ZodType< - LdapGroup, +export const ZendeskOrganization$inboundSchema: z.ZodType< + ZendeskOrganization, z.ZodTypeDef, unknown > = z.object({ - group_id: z.string(), + organization_id: z.string(), }).transform((v) => { return remap$(v, { - "group_id": "groupId", + "organization_id": "organizationId", }); }); - /** @internal */ -export type LdapGroup$Outbound = { - group_id: string; +export type ZendeskOrganization$Outbound = { + organization_id: string; }; /** @internal */ -export const LdapGroup$outboundSchema: z.ZodType< - LdapGroup$Outbound, +export const ZendeskOrganization$outboundSchema: z.ZodType< + ZendeskOrganization$Outbound, z.ZodTypeDef, - LdapGroup + ZendeskOrganization > = z.object({ - groupId: z.string(), + organizationId: z.string(), }).transform((v) => { return remap$(v, { - groupId: "group_id", + organizationId: "organization_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace LdapGroup$ { - /** @deprecated use `LdapGroup$inboundSchema` instead. */ - export const inboundSchema = LdapGroup$inboundSchema; - /** @deprecated use `LdapGroup$outboundSchema` instead. */ - export const outboundSchema = LdapGroup$outboundSchema; - /** @deprecated use `LdapGroup$Outbound` instead. */ - export type Outbound = LdapGroup$Outbound; -} - -export function ldapGroupToJSON(ldapGroup: LdapGroup): string { - return JSON.stringify(LdapGroup$outboundSchema.parse(ldapGroup)); +export function zendeskOrganizationToJSON( + zendeskOrganization: ZendeskOrganization, +): string { + return JSON.stringify( + ZendeskOrganization$outboundSchema.parse(zendeskOrganization), + ); } - -export function ldapGroupFromJSON( +export function zendeskOrganizationFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => LdapGroup$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'LdapGroup' from JSON`, + (x) => ZendeskOrganization$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ZendeskOrganization' from JSON`, ); } /** @internal */ -export const OktaGroup$inboundSchema: z.ZodType< - OktaGroup, +export const HubspotTeam$inboundSchema: z.ZodType< + HubspotTeam, z.ZodTypeDef, unknown > = z.object({ - group_id: z.string(), + team_id: z.string(), }).transform((v) => { return remap$(v, { - "group_id": "groupId", + "team_id": "teamId", }); }); - /** @internal */ -export type OktaGroup$Outbound = { - group_id: string; +export type HubspotTeam$Outbound = { + team_id: string; }; /** @internal */ -export const OktaGroup$outboundSchema: z.ZodType< - OktaGroup$Outbound, +export const HubspotTeam$outboundSchema: z.ZodType< + HubspotTeam$Outbound, z.ZodTypeDef, - OktaGroup + HubspotTeam > = z.object({ - groupId: z.string(), + teamId: z.string(), }).transform((v) => { return remap$(v, { - groupId: "group_id", + teamId: "team_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OktaGroup$ { - /** @deprecated use `OktaGroup$inboundSchema` instead. */ - export const inboundSchema = OktaGroup$inboundSchema; - /** @deprecated use `OktaGroup$outboundSchema` instead. */ - export const outboundSchema = OktaGroup$outboundSchema; - /** @deprecated use `OktaGroup$Outbound` instead. */ - export type Outbound = OktaGroup$Outbound; -} - -export function oktaGroupToJSON(oktaGroup: OktaGroup): string { - return JSON.stringify(OktaGroup$outboundSchema.parse(oktaGroup)); +export function hubspotTeamToJSON(hubspotTeam: HubspotTeam): string { + return JSON.stringify(HubspotTeam$outboundSchema.parse(hubspotTeam)); } - -export function oktaGroupFromJSON( +export function hubspotTeamFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => OktaGroup$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OktaGroup' from JSON`, + (x) => HubspotTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HubspotTeam' from JSON`, ); } /** @internal */ -export const DuoGroup$inboundSchema: z.ZodType< - DuoGroup, +export const TableauGroup$inboundSchema: z.ZodType< + TableauGroup, z.ZodTypeDef, unknown > = z.object({ @@ -557,17 +1827,16 @@ export const DuoGroup$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ -export type DuoGroup$Outbound = { +export type TableauGroup$Outbound = { group_id: string; }; /** @internal */ -export const DuoGroup$outboundSchema: z.ZodType< - DuoGroup$Outbound, +export const TableauGroup$outboundSchema: z.ZodType< + TableauGroup$Outbound, z.ZodTypeDef, - DuoGroup + TableauGroup > = z.object({ groupId: z.string(), }).transform((v) => { @@ -576,36 +1845,22 @@ export const DuoGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DuoGroup$ { - /** @deprecated use `DuoGroup$inboundSchema` instead. */ - export const inboundSchema = DuoGroup$inboundSchema; - /** @deprecated use `DuoGroup$outboundSchema` instead. */ - export const outboundSchema = DuoGroup$outboundSchema; - /** @deprecated use `DuoGroup$Outbound` instead. */ - export type Outbound = DuoGroup$Outbound; -} - -export function duoGroupToJSON(duoGroup: DuoGroup): string { - return JSON.stringify(DuoGroup$outboundSchema.parse(duoGroup)); +export function tableauGroupToJSON(tableauGroup: TableauGroup): string { + return JSON.stringify(TableauGroup$outboundSchema.parse(tableauGroup)); } - -export function duoGroupFromJSON( +export function tableauGroupFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => DuoGroup$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DuoGroup' from JSON`, + (x) => TableauGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TableauGroup' from JSON`, ); } /** @internal */ -export const AzureAdSecurityGroup$inboundSchema: z.ZodType< - AzureAdSecurityGroup, +export const ConfluenceGroup$inboundSchema: z.ZodType< + ConfluenceGroup, z.ZodTypeDef, unknown > = z.object({ @@ -615,17 +1870,16 @@ export const AzureAdSecurityGroup$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ -export type AzureAdSecurityGroup$Outbound = { +export type ConfluenceGroup$Outbound = { group_id: string; }; /** @internal */ -export const AzureAdSecurityGroup$outboundSchema: z.ZodType< - AzureAdSecurityGroup$Outbound, +export const ConfluenceGroup$outboundSchema: z.ZodType< + ConfluenceGroup$Outbound, z.ZodTypeDef, - AzureAdSecurityGroup + ConfluenceGroup > = z.object({ groupId: z.string(), }).transform((v) => { @@ -634,40 +1888,24 @@ export const AzureAdSecurityGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AzureAdSecurityGroup$ { - /** @deprecated use `AzureAdSecurityGroup$inboundSchema` instead. */ - export const inboundSchema = AzureAdSecurityGroup$inboundSchema; - /** @deprecated use `AzureAdSecurityGroup$outboundSchema` instead. */ - export const outboundSchema = AzureAdSecurityGroup$outboundSchema; - /** @deprecated use `AzureAdSecurityGroup$Outbound` instead. */ - export type Outbound = AzureAdSecurityGroup$Outbound; -} - -export function azureAdSecurityGroupToJSON( - azureAdSecurityGroup: AzureAdSecurityGroup, +export function confluenceGroupToJSON( + confluenceGroup: ConfluenceGroup, ): string { - return JSON.stringify( - AzureAdSecurityGroup$outboundSchema.parse(azureAdSecurityGroup), - ); + return JSON.stringify(ConfluenceGroup$outboundSchema.parse(confluenceGroup)); } - -export function azureAdSecurityGroupFromJSON( +export function confluenceGroupFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AzureAdSecurityGroup$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AzureAdSecurityGroup' from JSON`, + (x) => ConfluenceGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ConfluenceGroup' from JSON`, ); } /** @internal */ -export const AzureAdMicrosoft365Group$inboundSchema: z.ZodType< - AzureAdMicrosoft365Group, +export const JiraGroup$inboundSchema: z.ZodType< + JiraGroup, z.ZodTypeDef, unknown > = z.object({ @@ -677,17 +1915,16 @@ export const AzureAdMicrosoft365Group$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ -export type AzureAdMicrosoft365Group$Outbound = { +export type JiraGroup$Outbound = { group_id: string; }; /** @internal */ -export const AzureAdMicrosoft365Group$outboundSchema: z.ZodType< - AzureAdMicrosoft365Group$Outbound, +export const JiraGroup$outboundSchema: z.ZodType< + JiraGroup$Outbound, z.ZodTypeDef, - AzureAdMicrosoft365Group + JiraGroup > = z.object({ groupId: z.string(), }).transform((v) => { @@ -696,212 +1933,149 @@ export const AzureAdMicrosoft365Group$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AzureAdMicrosoft365Group$ { - /** @deprecated use `AzureAdMicrosoft365Group$inboundSchema` instead. */ - export const inboundSchema = AzureAdMicrosoft365Group$inboundSchema; - /** @deprecated use `AzureAdMicrosoft365Group$outboundSchema` instead. */ - export const outboundSchema = AzureAdMicrosoft365Group$outboundSchema; - /** @deprecated use `AzureAdMicrosoft365Group$Outbound` instead. */ - export type Outbound = AzureAdMicrosoft365Group$Outbound; -} - -export function azureAdMicrosoft365GroupToJSON( - azureAdMicrosoft365Group: AzureAdMicrosoft365Group, -): string { - return JSON.stringify( - AzureAdMicrosoft365Group$outboundSchema.parse(azureAdMicrosoft365Group), - ); +export function jiraGroupToJSON(jiraGroup: JiraGroup): string { + return JSON.stringify(JiraGroup$outboundSchema.parse(jiraGroup)); } - -export function azureAdMicrosoft365GroupFromJSON( +export function jiraGroupFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AzureAdMicrosoft365Group$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AzureAdMicrosoft365Group' from JSON`, + (x) => JiraGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'JiraGroup' from JSON`, ); } /** @internal */ -export const SnowflakeRole$inboundSchema: z.ZodType< - SnowflakeRole, +export const DocusignGroup$inboundSchema: z.ZodType< + DocusignGroup, z.ZodTypeDef, unknown > = z.object({ - role_id: z.string(), + group_id: z.string(), }).transform((v) => { return remap$(v, { - "role_id": "roleId", + "group_id": "groupId", }); }); - /** @internal */ -export type SnowflakeRole$Outbound = { - role_id: string; +export type DocusignGroup$Outbound = { + group_id: string; }; /** @internal */ -export const SnowflakeRole$outboundSchema: z.ZodType< - SnowflakeRole$Outbound, +export const DocusignGroup$outboundSchema: z.ZodType< + DocusignGroup$Outbound, z.ZodTypeDef, - SnowflakeRole + DocusignGroup > = z.object({ - roleId: z.string(), + groupId: z.string(), }).transform((v) => { return remap$(v, { - roleId: "role_id", + groupId: "group_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SnowflakeRole$ { - /** @deprecated use `SnowflakeRole$inboundSchema` instead. */ - export const inboundSchema = SnowflakeRole$inboundSchema; - /** @deprecated use `SnowflakeRole$outboundSchema` instead. */ - export const outboundSchema = SnowflakeRole$outboundSchema; - /** @deprecated use `SnowflakeRole$Outbound` instead. */ - export type Outbound = SnowflakeRole$Outbound; -} - -export function snowflakeRoleToJSON(snowflakeRole: SnowflakeRole): string { - return JSON.stringify(SnowflakeRole$outboundSchema.parse(snowflakeRole)); +export function docusignGroupToJSON(docusignGroup: DocusignGroup): string { + return JSON.stringify(DocusignGroup$outboundSchema.parse(docusignGroup)); } - -export function snowflakeRoleFromJSON( +export function docusignGroupFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => SnowflakeRole$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SnowflakeRole' from JSON`, + (x) => DocusignGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DocusignGroup' from JSON`, ); } /** @internal */ -export const OktaGroupRule$inboundSchema: z.ZodType< - OktaGroupRule, +export const ZoomGroup$inboundSchema: z.ZodType< + ZoomGroup, z.ZodTypeDef, unknown > = z.object({ - rule_id: z.string(), + group_id: z.string(), }).transform((v) => { return remap$(v, { - "rule_id": "ruleId", + "group_id": "groupId", }); }); - /** @internal */ -export type OktaGroupRule$Outbound = { - rule_id: string; +export type ZoomGroup$Outbound = { + group_id: string; }; /** @internal */ -export const OktaGroupRule$outboundSchema: z.ZodType< - OktaGroupRule$Outbound, +export const ZoomGroup$outboundSchema: z.ZodType< + ZoomGroup$Outbound, z.ZodTypeDef, - OktaGroupRule + ZoomGroup > = z.object({ - ruleId: z.string(), + groupId: z.string(), }).transform((v) => { return remap$(v, { - ruleId: "rule_id", + groupId: "group_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OktaGroupRule$ { - /** @deprecated use `OktaGroupRule$inboundSchema` instead. */ - export const inboundSchema = OktaGroupRule$inboundSchema; - /** @deprecated use `OktaGroupRule$outboundSchema` instead. */ - export const outboundSchema = OktaGroupRule$outboundSchema; - /** @deprecated use `OktaGroupRule$Outbound` instead. */ - export type Outbound = OktaGroupRule$Outbound; -} - -export function oktaGroupRuleToJSON(oktaGroupRule: OktaGroupRule): string { - return JSON.stringify(OktaGroupRule$outboundSchema.parse(oktaGroupRule)); +export function zoomGroupToJSON(zoomGroup: ZoomGroup): string { + return JSON.stringify(ZoomGroup$outboundSchema.parse(zoomGroup)); } - -export function oktaGroupRuleFromJSON( +export function zoomGroupFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => OktaGroupRule$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OktaGroupRule' from JSON`, + (x) => ZoomGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ZoomGroup' from JSON`, ); } /** @internal */ -export const WorkdayUserSecurityGroup$inboundSchema: z.ZodType< - WorkdayUserSecurityGroup, +export const DocusignSigningGroup$inboundSchema: z.ZodType< + DocusignSigningGroup, z.ZodTypeDef, unknown > = z.object({ - group_id: z.string(), + signing_group_id: z.string(), }).transform((v) => { return remap$(v, { - "group_id": "groupId", + "signing_group_id": "signingGroupId", }); }); - /** @internal */ -export type WorkdayUserSecurityGroup$Outbound = { - group_id: string; +export type DocusignSigningGroup$Outbound = { + signing_group_id: string; }; /** @internal */ -export const WorkdayUserSecurityGroup$outboundSchema: z.ZodType< - WorkdayUserSecurityGroup$Outbound, +export const DocusignSigningGroup$outboundSchema: z.ZodType< + DocusignSigningGroup$Outbound, z.ZodTypeDef, - WorkdayUserSecurityGroup + DocusignSigningGroup > = z.object({ - groupId: z.string(), + signingGroupId: z.string(), }).transform((v) => { return remap$(v, { - groupId: "group_id", + signingGroupId: "signing_group_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WorkdayUserSecurityGroup$ { - /** @deprecated use `WorkdayUserSecurityGroup$inboundSchema` instead. */ - export const inboundSchema = WorkdayUserSecurityGroup$inboundSchema; - /** @deprecated use `WorkdayUserSecurityGroup$outboundSchema` instead. */ - export const outboundSchema = WorkdayUserSecurityGroup$outboundSchema; - /** @deprecated use `WorkdayUserSecurityGroup$Outbound` instead. */ - export type Outbound = WorkdayUserSecurityGroup$Outbound; -} - -export function workdayUserSecurityGroupToJSON( - workdayUserSecurityGroup: WorkdayUserSecurityGroup, +export function docusignSigningGroupToJSON( + docusignSigningGroup: DocusignSigningGroup, ): string { return JSON.stringify( - WorkdayUserSecurityGroup$outboundSchema.parse(workdayUserSecurityGroup), + DocusignSigningGroup$outboundSchema.parse(docusignSigningGroup), ); } - -export function workdayUserSecurityGroupFromJSON( +export function docusignSigningGroupFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => WorkdayUserSecurityGroup$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'WorkdayUserSecurityGroup' from JSON`, + (x) => DocusignSigningGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DocusignSigningGroup' from JSON`, ); } @@ -913,7 +2087,17 @@ export const GroupRemoteInfo$inboundSchema: z.ZodType< > = z.object({ active_directory_group: z.lazy(() => ActiveDirectoryGroup$inboundSchema) .optional(), + tailscale_group: z.lazy(() => TailscaleGroup$inboundSchema).optional(), + twingate_group: z.lazy(() => TwingateGroup$inboundSchema).optional(), + twingate_group_synced: z.lazy(() => TwingateGroupSynced$inboundSchema) + .optional(), + aws_sso_group: z.lazy(() => AwsSsoGroup$inboundSchema).optional(), + databricks_account_group: z.lazy(() => DatabricksAccountGroup$inboundSchema) + .optional(), + connector_group: z.lazy(() => ConnectorGroup$inboundSchema).optional(), github_team: z.lazy(() => GithubTeam$inboundSchema).optional(), + github_enterprise_team: z.lazy(() => GithubEnterpriseTeam$inboundSchema) + .optional(), gitlab_group: z.lazy(() => GitlabGroup$inboundSchema).optional(), google_group: z.lazy(() => GoogleGroup$inboundSchema).optional(), ldap_group: z.lazy(() => LdapGroup$inboundSchema).optional(), @@ -929,10 +2113,40 @@ export const GroupRemoteInfo$inboundSchema: z.ZodType< workday_user_security_group: z.lazy(() => WorkdayUserSecurityGroup$inboundSchema ).optional(), + pagerduty_on_call_schedule: z.lazy(() => + PagerdutyOnCallSchedule$inboundSchema + ).optional(), + incidentio_on_call_schedule: z.lazy(() => + IncidentioOnCallSchedule$inboundSchema + ).optional(), + rootly_on_call_schedule: z.lazy(() => RootlyOnCallSchedule$inboundSchema) + .optional(), + devin_group: z.lazy(() => DevinGroup$inboundSchema).optional(), + clickhouse_role: z.lazy(() => ClickhouseRole$inboundSchema).optional(), + grafana_team: z.lazy(() => GrafanaTeam$inboundSchema).optional(), + zendesk_group: z.lazy(() => ZendeskGroup$inboundSchema).optional(), + slack_user_group: z.lazy(() => SlackUserGroup$inboundSchema).optional(), + zendesk_organization: z.lazy(() => ZendeskOrganization$inboundSchema) + .optional(), + hubspot_team: z.lazy(() => HubspotTeam$inboundSchema).optional(), + tableau_group: z.lazy(() => TableauGroup$inboundSchema).optional(), + confluence_group: z.lazy(() => ConfluenceGroup$inboundSchema).optional(), + jira_group: z.lazy(() => JiraGroup$inboundSchema).optional(), + docusign_group: z.lazy(() => DocusignGroup$inboundSchema).optional(), + zoom_group: z.lazy(() => ZoomGroup$inboundSchema).optional(), + docusign_signing_group: z.lazy(() => DocusignSigningGroup$inboundSchema) + .optional(), }).transform((v) => { return remap$(v, { "active_directory_group": "activeDirectoryGroup", + "tailscale_group": "tailscaleGroup", + "twingate_group": "twingateGroup", + "twingate_group_synced": "twingateGroupSynced", + "aws_sso_group": "awsSsoGroup", + "databricks_account_group": "databricksAccountGroup", + "connector_group": "connectorGroup", "github_team": "githubTeam", + "github_enterprise_team": "githubEnterpriseTeam", "gitlab_group": "gitlabGroup", "google_group": "googleGroup", "ldap_group": "ldapGroup", @@ -943,13 +2157,35 @@ export const GroupRemoteInfo$inboundSchema: z.ZodType< "snowflake_role": "snowflakeRole", "okta_group_rule": "oktaGroupRule", "workday_user_security_group": "workdayUserSecurityGroup", + "pagerduty_on_call_schedule": "pagerdutyOnCallSchedule", + "incidentio_on_call_schedule": "incidentioOnCallSchedule", + "rootly_on_call_schedule": "rootlyOnCallSchedule", + "devin_group": "devinGroup", + "clickhouse_role": "clickhouseRole", + "grafana_team": "grafanaTeam", + "zendesk_group": "zendeskGroup", + "slack_user_group": "slackUserGroup", + "zendesk_organization": "zendeskOrganization", + "hubspot_team": "hubspotTeam", + "tableau_group": "tableauGroup", + "confluence_group": "confluenceGroup", + "jira_group": "jiraGroup", + "docusign_group": "docusignGroup", + "zoom_group": "zoomGroup", + "docusign_signing_group": "docusignSigningGroup", }); }); - /** @internal */ export type GroupRemoteInfo$Outbound = { active_directory_group?: ActiveDirectoryGroup$Outbound | undefined; + tailscale_group?: TailscaleGroup$Outbound | undefined; + twingate_group?: TwingateGroup$Outbound | undefined; + twingate_group_synced?: TwingateGroupSynced$Outbound | undefined; + aws_sso_group?: AwsSsoGroup$Outbound | undefined; + databricks_account_group?: DatabricksAccountGroup$Outbound | undefined; + connector_group?: ConnectorGroup$Outbound | undefined; github_team?: GithubTeam$Outbound | undefined; + github_enterprise_team?: GithubEnterpriseTeam$Outbound | undefined; gitlab_group?: GitlabGroup$Outbound | undefined; google_group?: GoogleGroup$Outbound | undefined; ldap_group?: LdapGroup$Outbound | undefined; @@ -960,6 +2196,22 @@ export type GroupRemoteInfo$Outbound = { snowflake_role?: SnowflakeRole$Outbound | undefined; okta_group_rule?: OktaGroupRule$Outbound | undefined; workday_user_security_group?: WorkdayUserSecurityGroup$Outbound | undefined; + pagerduty_on_call_schedule?: PagerdutyOnCallSchedule$Outbound | undefined; + incidentio_on_call_schedule?: IncidentioOnCallSchedule$Outbound | undefined; + rootly_on_call_schedule?: RootlyOnCallSchedule$Outbound | undefined; + devin_group?: DevinGroup$Outbound | undefined; + clickhouse_role?: ClickhouseRole$Outbound | undefined; + grafana_team?: GrafanaTeam$Outbound | undefined; + zendesk_group?: ZendeskGroup$Outbound | undefined; + slack_user_group?: SlackUserGroup$Outbound | undefined; + zendesk_organization?: ZendeskOrganization$Outbound | undefined; + hubspot_team?: HubspotTeam$Outbound | undefined; + tableau_group?: TableauGroup$Outbound | undefined; + confluence_group?: ConfluenceGroup$Outbound | undefined; + jira_group?: JiraGroup$Outbound | undefined; + docusign_group?: DocusignGroup$Outbound | undefined; + zoom_group?: ZoomGroup$Outbound | undefined; + docusign_signing_group?: DocusignSigningGroup$Outbound | undefined; }; /** @internal */ @@ -970,7 +2222,17 @@ export const GroupRemoteInfo$outboundSchema: z.ZodType< > = z.object({ activeDirectoryGroup: z.lazy(() => ActiveDirectoryGroup$outboundSchema) .optional(), + tailscaleGroup: z.lazy(() => TailscaleGroup$outboundSchema).optional(), + twingateGroup: z.lazy(() => TwingateGroup$outboundSchema).optional(), + twingateGroupSynced: z.lazy(() => TwingateGroupSynced$outboundSchema) + .optional(), + awsSsoGroup: z.lazy(() => AwsSsoGroup$outboundSchema).optional(), + databricksAccountGroup: z.lazy(() => DatabricksAccountGroup$outboundSchema) + .optional(), + connectorGroup: z.lazy(() => ConnectorGroup$outboundSchema).optional(), githubTeam: z.lazy(() => GithubTeam$outboundSchema).optional(), + githubEnterpriseTeam: z.lazy(() => GithubEnterpriseTeam$outboundSchema) + .optional(), gitlabGroup: z.lazy(() => GitlabGroup$outboundSchema).optional(), googleGroup: z.lazy(() => GoogleGroup$outboundSchema).optional(), ldapGroup: z.lazy(() => LdapGroup$outboundSchema).optional(), @@ -986,10 +2248,39 @@ export const GroupRemoteInfo$outboundSchema: z.ZodType< workdayUserSecurityGroup: z.lazy(() => WorkdayUserSecurityGroup$outboundSchema ).optional(), + pagerdutyOnCallSchedule: z.lazy(() => PagerdutyOnCallSchedule$outboundSchema) + .optional(), + incidentioOnCallSchedule: z.lazy(() => + IncidentioOnCallSchedule$outboundSchema + ).optional(), + rootlyOnCallSchedule: z.lazy(() => RootlyOnCallSchedule$outboundSchema) + .optional(), + devinGroup: z.lazy(() => DevinGroup$outboundSchema).optional(), + clickhouseRole: z.lazy(() => ClickhouseRole$outboundSchema).optional(), + grafanaTeam: z.lazy(() => GrafanaTeam$outboundSchema).optional(), + zendeskGroup: z.lazy(() => ZendeskGroup$outboundSchema).optional(), + slackUserGroup: z.lazy(() => SlackUserGroup$outboundSchema).optional(), + zendeskOrganization: z.lazy(() => ZendeskOrganization$outboundSchema) + .optional(), + hubspotTeam: z.lazy(() => HubspotTeam$outboundSchema).optional(), + tableauGroup: z.lazy(() => TableauGroup$outboundSchema).optional(), + confluenceGroup: z.lazy(() => ConfluenceGroup$outboundSchema).optional(), + jiraGroup: z.lazy(() => JiraGroup$outboundSchema).optional(), + docusignGroup: z.lazy(() => DocusignGroup$outboundSchema).optional(), + zoomGroup: z.lazy(() => ZoomGroup$outboundSchema).optional(), + docusignSigningGroup: z.lazy(() => DocusignSigningGroup$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { activeDirectoryGroup: "active_directory_group", + tailscaleGroup: "tailscale_group", + twingateGroup: "twingate_group", + twingateGroupSynced: "twingate_group_synced", + awsSsoGroup: "aws_sso_group", + databricksAccountGroup: "databricks_account_group", + connectorGroup: "connector_group", githubTeam: "github_team", + githubEnterpriseTeam: "github_enterprise_team", gitlabGroup: "gitlab_group", googleGroup: "google_group", ldapGroup: "ldap_group", @@ -1000,28 +2291,30 @@ export const GroupRemoteInfo$outboundSchema: z.ZodType< snowflakeRole: "snowflake_role", oktaGroupRule: "okta_group_rule", workdayUserSecurityGroup: "workday_user_security_group", + pagerdutyOnCallSchedule: "pagerduty_on_call_schedule", + incidentioOnCallSchedule: "incidentio_on_call_schedule", + rootlyOnCallSchedule: "rootly_on_call_schedule", + devinGroup: "devin_group", + clickhouseRole: "clickhouse_role", + grafanaTeam: "grafana_team", + zendeskGroup: "zendesk_group", + slackUserGroup: "slack_user_group", + zendeskOrganization: "zendesk_organization", + hubspotTeam: "hubspot_team", + tableauGroup: "tableau_group", + confluenceGroup: "confluence_group", + jiraGroup: "jira_group", + docusignGroup: "docusign_group", + zoomGroup: "zoom_group", + docusignSigningGroup: "docusign_signing_group", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupRemoteInfo$ { - /** @deprecated use `GroupRemoteInfo$inboundSchema` instead. */ - export const inboundSchema = GroupRemoteInfo$inboundSchema; - /** @deprecated use `GroupRemoteInfo$outboundSchema` instead. */ - export const outboundSchema = GroupRemoteInfo$outboundSchema; - /** @deprecated use `GroupRemoteInfo$Outbound` instead. */ - export type Outbound = GroupRemoteInfo$Outbound; -} - export function groupRemoteInfoToJSON( groupRemoteInfo: GroupRemoteInfo, ): string { return JSON.stringify(GroupRemoteInfo$outboundSchema.parse(groupRemoteInfo)); } - export function groupRemoteInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupresource.ts b/src/models/components/groupresource.ts index 09883708..913489e9 100644 --- a/src/models/components/groupresource.ts +++ b/src/models/components/groupresource.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -30,6 +30,18 @@ export type GroupResource = { * The ID of the resource. */ resourceId: string; + /** + * The name of the group + */ + groupName?: string | undefined; + /** + * The name of the resource + */ + resourceName?: string | undefined; + /** + * The day and time the group's access will expire. + */ + expirationDate?: Date | null | undefined; /** * # Access Level Object * @@ -52,19 +64,29 @@ export const GroupResource$inboundSchema: z.ZodType< > = z.object({ group_id: z.string(), resource_id: z.string(), + group_name: z.string().optional(), + resource_name: z.string().optional(), + expiration_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), access_level: ResourceAccessLevel$inboundSchema, }).transform((v) => { return remap$(v, { "group_id": "groupId", "resource_id": "resourceId", + "group_name": "groupName", + "resource_name": "resourceName", + "expiration_date": "expirationDate", "access_level": "accessLevel", }); }); - /** @internal */ export type GroupResource$Outbound = { group_id: string; resource_id: string; + group_name?: string | undefined; + resource_name?: string | undefined; + expiration_date?: string | null | undefined; access_level: ResourceAccessLevel$Outbound; }; @@ -76,32 +98,25 @@ export const GroupResource$outboundSchema: z.ZodType< > = z.object({ groupId: z.string(), resourceId: z.string(), + groupName: z.string().optional(), + resourceName: z.string().optional(), + expirationDate: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), accessLevel: ResourceAccessLevel$outboundSchema, }).transform((v) => { return remap$(v, { groupId: "group_id", resourceId: "resource_id", + groupName: "group_name", + resourceName: "resource_name", + expirationDate: "expiration_date", accessLevel: "access_level", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupResource$ { - /** @deprecated use `GroupResource$inboundSchema` instead. */ - export const inboundSchema = GroupResource$inboundSchema; - /** @deprecated use `GroupResource$outboundSchema` instead. */ - export const outboundSchema = GroupResource$outboundSchema; - /** @deprecated use `GroupResource$Outbound` instead. */ - export type Outbound = GroupResource$Outbound; -} - export function groupResourceToJSON(groupResource: GroupResource): string { return JSON.stringify(GroupResource$outboundSchema.parse(groupResource)); } - export function groupResourceFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupresourcelist.ts b/src/models/components/groupresourcelist.ts index 629ca923..273950d4 100644 --- a/src/models/components/groupresourcelist.ts +++ b/src/models/components/groupresourcelist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -30,7 +30,6 @@ export const GroupResourceList$inboundSchema: z.ZodType< "group_resources": "groupResources", }); }); - /** @internal */ export type GroupResourceList$Outbound = { group_resources: Array; @@ -49,19 +48,6 @@ export const GroupResourceList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupResourceList$ { - /** @deprecated use `GroupResourceList$inboundSchema` instead. */ - export const inboundSchema = GroupResourceList$inboundSchema; - /** @deprecated use `GroupResourceList$outboundSchema` instead. */ - export const outboundSchema = GroupResourceList$outboundSchema; - /** @deprecated use `GroupResourceList$Outbound` instead. */ - export type Outbound = GroupResourceList$Outbound; -} - export function groupResourceListToJSON( groupResourceList: GroupResourceList, ): string { @@ -69,7 +55,6 @@ export function groupResourceListToJSON( GroupResourceList$outboundSchema.parse(groupResourceList), ); } - export function groupResourceListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/grouptypeenum.ts b/src/models/components/grouptypeenum.ts index ba6273b7..e5edb58f 100644 --- a/src/models/components/grouptypeenum.ts +++ b/src/models/components/grouptypeenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -28,6 +28,24 @@ export const GroupTypeEnum = { ConnectorGroup: "CONNECTOR_GROUP", SnowflakeRole: "SNOWFLAKE_ROLE", WorkdayUserSecurityGroup: "WORKDAY_USER_SECURITY_GROUP", + PagerdutyOnCallSchedule: "PAGERDUTY_ON_CALL_SCHEDULE", + IncidentioOnCallSchedule: "INCIDENTIO_ON_CALL_SCHEDULE", + RootlyOnCallSchedule: "ROOTLY_ON_CALL_SCHEDULE", + DevinGroup: "DEVIN_GROUP", + GitHubEnterpriseTeam: "GIT_HUB_ENTERPRISE_TEAM", + GrafanaTeam: "GRAFANA_TEAM", + ClickhouseRole: "CLICKHOUSE_ROLE", + SlackUserGroup: "SLACK_USER_GROUP", + TwingateGroup: "TWINGATE_GROUP", + TwingateGroupSynced: "TWINGATE_GROUP_SYNCED", + ZendeskGroup: "ZENDESK_GROUP", + ZendeskOrganization: "ZENDESK_ORGANIZATION", + HubspotTeam: "HUBSPOT_TEAM", + TableauGroup: "TABLEAU_GROUP", + ConfluenceGroup: "CONFLUENCE_GROUP", + JiraGroup: "JIRA_GROUP", + DocusignGroup: "DOCUSIGN_GROUP", + ZoomGroup: "ZOOM_GROUP", } as const; /** * The type of the group. @@ -38,19 +56,7 @@ export type GroupTypeEnum = ClosedEnum; export const GroupTypeEnum$inboundSchema: z.ZodNativeEnum< typeof GroupTypeEnum > = z.nativeEnum(GroupTypeEnum); - /** @internal */ export const GroupTypeEnum$outboundSchema: z.ZodNativeEnum< typeof GroupTypeEnum > = GroupTypeEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupTypeEnum$ { - /** @deprecated use `GroupTypeEnum$inboundSchema` instead. */ - export const inboundSchema = GroupTypeEnum$inboundSchema; - /** @deprecated use `GroupTypeEnum$outboundSchema` instead. */ - export const outboundSchema = GroupTypeEnum$outboundSchema; -} diff --git a/src/models/components/groupuser.ts b/src/models/components/groupuser.ts index a1edebaa..cdcf28cd 100644 --- a/src/models/components/groupuser.ts +++ b/src/models/components/groupuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -35,6 +35,14 @@ export type GroupUser = { * The ID of the group. */ groupId: string; + /** + * The name of the group. + */ + groupName: string; + /** + * The description of the group. + */ + description: string; /** * The ID of the user. */ @@ -76,6 +84,8 @@ export const GroupUser$inboundSchema: z.ZodType< unknown > = z.object({ group_id: z.string(), + group_name: z.string(), + description: z.string(), user_id: z.string(), access_level: GroupAccessLevel$inboundSchema.optional(), full_name: z.string(), @@ -87,6 +97,7 @@ export const GroupUser$inboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { "group_id": "groupId", + "group_name": "groupName", "user_id": "userId", "access_level": "accessLevel", "full_name": "fullName", @@ -94,10 +105,11 @@ export const GroupUser$inboundSchema: z.ZodType< "propagation_status": "propagationStatus", }); }); - /** @internal */ export type GroupUser$Outbound = { group_id: string; + group_name: string; + description: string; user_id: string; access_level?: GroupAccessLevel$Outbound | undefined; full_name: string; @@ -113,6 +125,8 @@ export const GroupUser$outboundSchema: z.ZodType< GroupUser > = z.object({ groupId: z.string(), + groupName: z.string(), + description: z.string(), userId: z.string(), accessLevel: GroupAccessLevel$outboundSchema.optional(), fullName: z.string(), @@ -123,6 +137,7 @@ export const GroupUser$outboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { groupId: "group_id", + groupName: "group_name", userId: "user_id", accessLevel: "access_level", fullName: "full_name", @@ -131,23 +146,9 @@ export const GroupUser$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupUser$ { - /** @deprecated use `GroupUser$inboundSchema` instead. */ - export const inboundSchema = GroupUser$inboundSchema; - /** @deprecated use `GroupUser$outboundSchema` instead. */ - export const outboundSchema = GroupUser$outboundSchema; - /** @deprecated use `GroupUser$Outbound` instead. */ - export type Outbound = GroupUser$Outbound; -} - export function groupUserToJSON(groupUser: GroupUser): string { return JSON.stringify(GroupUser$outboundSchema.parse(groupUser)); } - export function groupUserFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/groupuserlist.ts b/src/models/components/groupuserlist.ts index 2b2c380f..3c68c814 100644 --- a/src/models/components/groupuserlist.ts +++ b/src/models/components/groupuserlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -15,6 +15,14 @@ import { export type GroupUserList = { results?: Array | undefined; + /** + * The cursor with which to continue pagination if additional result pages exist. + */ + next?: string | null | undefined; + /** + * The cursor used to obtain the current result page. + */ + previous?: string | null | undefined; }; /** @internal */ @@ -24,11 +32,14 @@ export const GroupUserList$inboundSchema: z.ZodType< unknown > = z.object({ results: z.array(GroupUser$inboundSchema).optional(), + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), }); - /** @internal */ export type GroupUserList$Outbound = { results?: Array | undefined; + next?: string | null | undefined; + previous?: string | null | undefined; }; /** @internal */ @@ -38,25 +49,13 @@ export const GroupUserList$outboundSchema: z.ZodType< GroupUserList > = z.object({ results: z.array(GroupUser$outboundSchema).optional(), + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupUserList$ { - /** @deprecated use `GroupUserList$inboundSchema` instead. */ - export const inboundSchema = GroupUserList$inboundSchema; - /** @deprecated use `GroupUserList$outboundSchema` instead. */ - export const outboundSchema = GroupUserList$outboundSchema; - /** @deprecated use `GroupUserList$Outbound` instead. */ - export type Outbound = GroupUserList$Outbound; -} - export function groupUserListToJSON(groupUserList: GroupUserList): string { return JSON.stringify(GroupUserList$outboundSchema.parse(groupUserList)); } - export function groupUserListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/idpgroupmapping.ts b/src/models/components/idpgroupmapping.ts index e48f8414..0bba99d7 100644 --- a/src/models/components/idpgroupmapping.ts +++ b/src/models/components/idpgroupmapping.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -12,6 +12,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Information about a group mapping. */ export type IdpGroupMapping = { + /** + * The ID of the app resource. + */ + appResourceId?: string | undefined; /** * The ID of the group. */ @@ -32,18 +36,20 @@ export const IdpGroupMapping$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + app_resource_id: z.string().optional(), group_id: z.string(), alias: z.string().optional(), hidden_from_end_user: z.boolean(), }).transform((v) => { return remap$(v, { + "app_resource_id": "appResourceId", "group_id": "groupId", "hidden_from_end_user": "hiddenFromEndUser", }); }); - /** @internal */ export type IdpGroupMapping$Outbound = { + app_resource_id?: string | undefined; group_id: string; alias?: string | undefined; hidden_from_end_user: boolean; @@ -55,35 +61,23 @@ export const IdpGroupMapping$outboundSchema: z.ZodType< z.ZodTypeDef, IdpGroupMapping > = z.object({ + appResourceId: z.string().optional(), groupId: z.string(), alias: z.string().optional(), hiddenFromEndUser: z.boolean(), }).transform((v) => { return remap$(v, { + appResourceId: "app_resource_id", groupId: "group_id", hiddenFromEndUser: "hidden_from_end_user", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IdpGroupMapping$ { - /** @deprecated use `IdpGroupMapping$inboundSchema` instead. */ - export const inboundSchema = IdpGroupMapping$inboundSchema; - /** @deprecated use `IdpGroupMapping$outboundSchema` instead. */ - export const outboundSchema = IdpGroupMapping$outboundSchema; - /** @deprecated use `IdpGroupMapping$Outbound` instead. */ - export type Outbound = IdpGroupMapping$Outbound; -} - export function idpGroupMappingToJSON( idpGroupMapping: IdpGroupMapping, ): string { return JSON.stringify(IdpGroupMapping$outboundSchema.parse(idpGroupMapping)); } - export function idpGroupMappingFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/idpgroupmappinglist.ts b/src/models/components/idpgroupmappinglist.ts index 8971b920..275eae1e 100644 --- a/src/models/components/idpgroupmappinglist.ts +++ b/src/models/components/idpgroupmappinglist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -25,7 +25,6 @@ export const IdpGroupMappingList$inboundSchema: z.ZodType< > = z.object({ mappings: z.array(IdpGroupMapping$inboundSchema), }); - /** @internal */ export type IdpGroupMappingList$Outbound = { mappings: Array; @@ -40,19 +39,6 @@ export const IdpGroupMappingList$outboundSchema: z.ZodType< mappings: z.array(IdpGroupMapping$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IdpGroupMappingList$ { - /** @deprecated use `IdpGroupMappingList$inboundSchema` instead. */ - export const inboundSchema = IdpGroupMappingList$inboundSchema; - /** @deprecated use `IdpGroupMappingList$outboundSchema` instead. */ - export const outboundSchema = IdpGroupMappingList$outboundSchema; - /** @deprecated use `IdpGroupMappingList$Outbound` instead. */ - export type Outbound = IdpGroupMappingList$Outbound; -} - export function idpGroupMappingListToJSON( idpGroupMappingList: IdpGroupMappingList, ): string { @@ -60,7 +46,6 @@ export function idpGroupMappingListToJSON( IdpGroupMappingList$outboundSchema.parse(idpGroupMappingList), ); } - export function idpGroupMappingListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/idpstatusfilter.ts b/src/models/components/idpstatusfilter.ts new file mode 100644 index 00000000..5c6e5009 --- /dev/null +++ b/src/models/components/idpstatusfilter.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + UserHrIdpStatusEnum, + UserHrIdpStatusEnum$inboundSchema, + UserHrIdpStatusEnum$outboundSchema, +} from "./userhridpstatusenum.js"; + +/** + * Filters USER entities by their HR/IDP lifecycle status. Only applies to USER entities; GROUP and RESOURCE entities never match, in either polarity. `statuses` combine with OR. `not` inverts the match within the user domain (e.g. "IDP status is NOT active"), so it still returns only users rather than sweeping in groups/resources. + * + * @remarks + */ +export type IdpStatusFilter = { + /** + * Match users whose HR/IDP status is one of these values. + */ + statuses?: Array | undefined; + /** + * Invert the match within the user domain (e.g. "IDP status is NOT active"). + */ + not?: boolean | undefined; +}; + +/** @internal */ +export const IdpStatusFilter$inboundSchema: z.ZodType< + IdpStatusFilter, + z.ZodTypeDef, + unknown +> = z.object({ + statuses: z.array(UserHrIdpStatusEnum$inboundSchema).optional(), + not: z.boolean().optional(), +}); +/** @internal */ +export type IdpStatusFilter$Outbound = { + statuses?: Array | undefined; + not?: boolean | undefined; +}; + +/** @internal */ +export const IdpStatusFilter$outboundSchema: z.ZodType< + IdpStatusFilter$Outbound, + z.ZodTypeDef, + IdpStatusFilter +> = z.object({ + statuses: z.array(UserHrIdpStatusEnum$outboundSchema).optional(), + not: z.boolean().optional(), +}); + +export function idpStatusFilterToJSON( + idpStatusFilter: IdpStatusFilter, +): string { + return JSON.stringify(IdpStatusFilter$outboundSchema.parse(idpStatusFilter)); +} +export function idpStatusFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IdpStatusFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IdpStatusFilter' from JSON`, + ); +} diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 17512f04..9262e9d4 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -3,8 +3,11 @@ */ export * from "./access.js"; +export * from "./accessentityfilters.js"; export * from "./accesslist.js"; +export * from "./accessrelationshipfilters.js"; export * from "./accessrule.js"; +export * from "./apiaccesslevelenum.js"; export * from "./app.js"; export * from "./appslist.js"; export * from "./apptypeenum.js"; @@ -15,22 +18,41 @@ export * from "./bundle.js"; export * from "./bundlegroup.js"; export * from "./bundleinput.js"; export * from "./bundleresource.js"; +export * from "./campaign.js"; +export * from "./campaigngroupassetvisibilitypolicyenum.js"; +export * from "./campaignrevokeonenum.js"; +export * from "./campaignstatusenum.js"; export * from "./condition.js"; export * from "./configurationtemplate.js"; export * from "./createbundleinfo.js"; +export * from "./createcampaignconfigurationinfo.js"; +export * from "./createcampaigninfo.js"; export * from "./createconfigurationtemplateinfo.js"; +export * from "./createdelegationrequest.js"; +export * from "./createeventstreaminfo.js"; export * from "./creategroupbindinginfo.js"; export * from "./creategroupinfo.js"; export * from "./createmessagechannelinfo.js"; export * from "./createoncallscheduleinfo.js"; export * from "./createownerinfo.js"; +export * from "./createpaladincontextsourceinfo.js"; +export * from "./createpaladininfo.js"; export * from "./createrequestconfigurationinfolist.js"; export * from "./createrequestinfo.js"; export * from "./createresourceinfo.js"; export * from "./createtaginfo.js"; export * from "./createuarinfo.js"; +export * from "./delegation.js"; +export * from "./entityadminfilter.js"; +export * from "./entityitemtypeenum.js"; +export * from "./entitynamefilter.js"; +export * from "./entitytagfilter.js"; export * from "./entitytypeenum.js"; export * from "./event.js"; +export * from "./eventstream.js"; +export * from "./eventstreamconnection.js"; +export * from "./eventstreamconnectiontypeenum.js"; +export * from "./eventstreamlist.js"; export * from "./group.js"; export * from "./groupaccesslevel.js"; export * from "./groupbinding.js"; @@ -45,6 +67,7 @@ export * from "./groupuser.js"; export * from "./groupuserlist.js"; export * from "./idpgroupmapping.js"; export * from "./idpgroupmappinglist.js"; +export * from "./idpstatusfilter.js"; export * from "./messagechannel.js"; export * from "./messagechannelidlist.js"; export * from "./messagechannellist.js"; @@ -53,23 +76,52 @@ export * from "./oncallschedule.js"; export * from "./oncallscheduleidlist.js"; export * from "./oncallschedulelist.js"; export * from "./oncallscheduleproviderenum.js"; +export * from "./opalaccesspathedgefilter.js"; +export * from "./opalaccesspathquery.js"; +export * from "./opalaccesspathquerybody.js"; +export * from "./opalaccesspathqueryresults.js"; +export * from "./opalaccesspathresultedge.js"; +export * from "./opalaccesspathresultnode.js"; +export * from "./opalnodequery.js"; +export * from "./opalnodequerybody.js"; +export * from "./opalnodequeryresults.js"; +export * from "./opalqueryresultedge.js"; +export * from "./opalqueryresultnode.js"; +export * from "./opalqueryresults.js"; export * from "./owner.js"; export * from "./pageinfo.js"; +export * from "./paginatedaccessruleslist.js"; export * from "./paginatedbundlegrouplist.js"; export * from "./paginatedbundlelist.js"; export * from "./paginatedbundleresourcelist.js"; +export * from "./paginatedcampaignslist.js"; export * from "./paginatedconfigurationtemplatelist.js"; +export * from "./paginateddelegationslist.js"; export * from "./paginatedeventlist.js"; export * from "./paginatedgroupbindingslist.js"; export * from "./paginatedgroupslist.js"; export * from "./paginatedownerslist.js"; +export * from "./paginatedremoteuserslist.js"; export * from "./paginatedresourceslist.js"; export * from "./paginatedtagslist.js"; +export * from "./paginatedtokenslist.js"; export * from "./paginateduarslist.js"; export * from "./paginateduserslist.js"; +export * from "./paladin.js"; +export * from "./paladinconnector.js"; +export * from "./paladincontextsource.js"; +export * from "./paladincontextsourcekind.js"; +export * from "./paladincontextsourcelist.js"; +export * from "./paladincontextsourceprovider.js"; +export * from "./paladinlist.js"; export * from "./propagationstatus.js"; export * from "./propagationstatusenum.js"; +export * from "./rdsengineenum.js"; +export * from "./remoteuser.js"; export * from "./request.js"; +export * from "./requestapprovalenum.js"; +export * from "./requestcomment.js"; +export * from "./requestcommentlist.js"; export * from "./requestconfiguration.js"; export * from "./requestconnection.js"; export * from "./requestcustomfieldresponse.js"; @@ -78,6 +130,7 @@ export * from "./requesteditem.js"; export * from "./requestitemstages.js"; export * from "./requestlist.js"; export * from "./requestreviewer.js"; +export * from "./requestreviewerstages.js"; export * from "./requeststage.js"; export * from "./requeststatusenum.js"; export * from "./requesttemplatecustomfieldtypeenum.js"; @@ -102,25 +155,34 @@ export * from "./rolepermissiontargettypeenum.js"; export * from "./ruleclauses.js"; export * from "./ruleconjunction.js"; export * from "./ruledisjunction.js"; +export * from "./runopalqueryrequest.js"; export * from "./scopedrolepermission.js"; export * from "./scopedrolepermissionlist.js"; export * from "./security.js"; export * from "./session.js"; export * from "./sessionslist.js"; +export * from "./stopcampaignrequest.js"; +export * from "./stringmatchtype.js"; export * from "./subevent.js"; export * from "./syncerror.js"; export * from "./syncerrorlist.js"; +export * from "./synctask.js"; export * from "./tag.js"; export * from "./tagfilter.js"; export * from "./tagselector.js"; export * from "./tagslist.js"; +export * from "./thirdpartyproviderenum.js"; export * from "./ticketingproviderenum.js"; export * from "./ticketpropagationconfiguration.js"; +export * from "./token.js"; export * from "./uar.js"; export * from "./uarreviewerassignmentpolicyenum.js"; export * from "./uarscope.js"; export * from "./updateaccessruleinfo.js"; +export * from "./updatecampaignconfigurationinfo.js"; +export * from "./updatecampaigninfo.js"; export * from "./updateconfigurationtemplateinfo.js"; +export * from "./updateeventstreaminfo.js"; export * from "./updategroupbindinginfo.js"; export * from "./updategroupbindinginfolist.js"; export * from "./updategroupinfo.js"; @@ -128,11 +190,18 @@ export * from "./updategroupinfolist.js"; export * from "./updategroupresourcesinfo.js"; export * from "./updateownerinfo.js"; export * from "./updateownerinfolist.js"; +export * from "./updatepaladininfo.js"; export * from "./updateresourceinfo.js"; export * from "./updateresourceinfolist.js"; export * from "./user.js"; +export * from "./userattributeselector.js"; export * from "./userhridpstatusenum.js"; export * from "./useridlist.js"; export * from "./userlist.js"; export * from "./visibilityinfo.js"; export * from "./visibilitytypeenum.js"; +export * from "./webhookapikeycredential.js"; +export * from "./webhookapikeylocationenum.js"; +export * from "./webhookauthtypeenum.js"; +export * from "./webhookcredentials.js"; +export * from "./webhookhmaccredential.js"; diff --git a/src/models/components/messagechannel.ts b/src/models/components/messagechannel.ts index efbacc1b..86a407ac 100644 --- a/src/models/components/messagechannel.ts +++ b/src/models/components/messagechannel.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -65,7 +65,6 @@ export const MessageChannel$inboundSchema: z.ZodType< "is_private": "isPrivate", }); }); - /** @internal */ export type MessageChannel$Outbound = { message_channel_id: string; @@ -95,23 +94,9 @@ export const MessageChannel$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MessageChannel$ { - /** @deprecated use `MessageChannel$inboundSchema` instead. */ - export const inboundSchema = MessageChannel$inboundSchema; - /** @deprecated use `MessageChannel$outboundSchema` instead. */ - export const outboundSchema = MessageChannel$outboundSchema; - /** @deprecated use `MessageChannel$Outbound` instead. */ - export type Outbound = MessageChannel$Outbound; -} - export function messageChannelToJSON(messageChannel: MessageChannel): string { return JSON.stringify(MessageChannel$outboundSchema.parse(messageChannel)); } - export function messageChannelFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/messagechannelidlist.ts b/src/models/components/messagechannelidlist.ts index 4b0592a8..a239aa30 100644 --- a/src/models/components/messagechannelidlist.ts +++ b/src/models/components/messagechannelidlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const MessageChannelIDList$inboundSchema: z.ZodType< "message_channel_ids": "messageChannelIds", }); }); - /** @internal */ export type MessageChannelIDList$Outbound = { message_channel_ids: Array; @@ -46,19 +45,6 @@ export const MessageChannelIDList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MessageChannelIDList$ { - /** @deprecated use `MessageChannelIDList$inboundSchema` instead. */ - export const inboundSchema = MessageChannelIDList$inboundSchema; - /** @deprecated use `MessageChannelIDList$outboundSchema` instead. */ - export const outboundSchema = MessageChannelIDList$outboundSchema; - /** @deprecated use `MessageChannelIDList$Outbound` instead. */ - export type Outbound = MessageChannelIDList$Outbound; -} - export function messageChannelIDListToJSON( messageChannelIDList: MessageChannelIDList, ): string { @@ -66,7 +52,6 @@ export function messageChannelIDListToJSON( MessageChannelIDList$outboundSchema.parse(messageChannelIDList), ); } - export function messageChannelIDListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/messagechannellist.ts b/src/models/components/messagechannellist.ts index f1d1a478..a2107e4d 100644 --- a/src/models/components/messagechannellist.ts +++ b/src/models/components/messagechannellist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -25,7 +25,6 @@ export const MessageChannelList$inboundSchema: z.ZodType< > = z.object({ channels: z.array(MessageChannel$inboundSchema), }); - /** @internal */ export type MessageChannelList$Outbound = { channels: Array; @@ -40,19 +39,6 @@ export const MessageChannelList$outboundSchema: z.ZodType< channels: z.array(MessageChannel$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MessageChannelList$ { - /** @deprecated use `MessageChannelList$inboundSchema` instead. */ - export const inboundSchema = MessageChannelList$inboundSchema; - /** @deprecated use `MessageChannelList$outboundSchema` instead. */ - export const outboundSchema = MessageChannelList$outboundSchema; - /** @deprecated use `MessageChannelList$Outbound` instead. */ - export type Outbound = MessageChannelList$Outbound; -} - export function messageChannelListToJSON( messageChannelList: MessageChannelList, ): string { @@ -60,7 +46,6 @@ export function messageChannelListToJSON( MessageChannelList$outboundSchema.parse(messageChannelList), ); } - export function messageChannelListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/messagechannelproviderenum.ts b/src/models/components/messagechannelproviderenum.ts index b717d4cb..32a12b1a 100644 --- a/src/models/components/messagechannelproviderenum.ts +++ b/src/models/components/messagechannelproviderenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -22,19 +22,7 @@ export type MessageChannelProviderEnum = ClosedEnum< export const MessageChannelProviderEnum$inboundSchema: z.ZodNativeEnum< typeof MessageChannelProviderEnum > = z.nativeEnum(MessageChannelProviderEnum); - /** @internal */ export const MessageChannelProviderEnum$outboundSchema: z.ZodNativeEnum< typeof MessageChannelProviderEnum > = MessageChannelProviderEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MessageChannelProviderEnum$ { - /** @deprecated use `MessageChannelProviderEnum$inboundSchema` instead. */ - export const inboundSchema = MessageChannelProviderEnum$inboundSchema; - /** @deprecated use `MessageChannelProviderEnum$outboundSchema` instead. */ - export const outboundSchema = MessageChannelProviderEnum$outboundSchema; -} diff --git a/src/models/components/oncallschedule.ts b/src/models/components/oncallschedule.ts index 40fad171..6722a579 100644 --- a/src/models/components/oncallschedule.ts +++ b/src/models/components/oncallschedule.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -59,7 +59,6 @@ export const OnCallSchedule$inboundSchema: z.ZodType< "remote_id": "remoteId", }); }); - /** @internal */ export type OnCallSchedule$Outbound = { on_call_schedule_id?: string | undefined; @@ -86,23 +85,9 @@ export const OnCallSchedule$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OnCallSchedule$ { - /** @deprecated use `OnCallSchedule$inboundSchema` instead. */ - export const inboundSchema = OnCallSchedule$inboundSchema; - /** @deprecated use `OnCallSchedule$outboundSchema` instead. */ - export const outboundSchema = OnCallSchedule$outboundSchema; - /** @deprecated use `OnCallSchedule$Outbound` instead. */ - export type Outbound = OnCallSchedule$Outbound; -} - export function onCallScheduleToJSON(onCallSchedule: OnCallSchedule): string { return JSON.stringify(OnCallSchedule$outboundSchema.parse(onCallSchedule)); } - export function onCallScheduleFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/oncallscheduleidlist.ts b/src/models/components/oncallscheduleidlist.ts index 21a77bfd..8951f926 100644 --- a/src/models/components/oncallscheduleidlist.ts +++ b/src/models/components/oncallscheduleidlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const OnCallScheduleIDList$inboundSchema: z.ZodType< "on_call_schedule_ids": "onCallScheduleIds", }); }); - /** @internal */ export type OnCallScheduleIDList$Outbound = { on_call_schedule_ids: Array; @@ -46,19 +45,6 @@ export const OnCallScheduleIDList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OnCallScheduleIDList$ { - /** @deprecated use `OnCallScheduleIDList$inboundSchema` instead. */ - export const inboundSchema = OnCallScheduleIDList$inboundSchema; - /** @deprecated use `OnCallScheduleIDList$outboundSchema` instead. */ - export const outboundSchema = OnCallScheduleIDList$outboundSchema; - /** @deprecated use `OnCallScheduleIDList$Outbound` instead. */ - export type Outbound = OnCallScheduleIDList$Outbound; -} - export function onCallScheduleIDListToJSON( onCallScheduleIDList: OnCallScheduleIDList, ): string { @@ -66,7 +52,6 @@ export function onCallScheduleIDListToJSON( OnCallScheduleIDList$outboundSchema.parse(onCallScheduleIDList), ); } - export function onCallScheduleIDListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/oncallschedulelist.ts b/src/models/components/oncallschedulelist.ts index 656a2ec4..cc9dfe33 100644 --- a/src/models/components/oncallschedulelist.ts +++ b/src/models/components/oncallschedulelist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -30,7 +30,6 @@ export const OnCallScheduleList$inboundSchema: z.ZodType< "on_call_schedules": "onCallSchedules", }); }); - /** @internal */ export type OnCallScheduleList$Outbound = { on_call_schedules: Array; @@ -49,19 +48,6 @@ export const OnCallScheduleList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OnCallScheduleList$ { - /** @deprecated use `OnCallScheduleList$inboundSchema` instead. */ - export const inboundSchema = OnCallScheduleList$inboundSchema; - /** @deprecated use `OnCallScheduleList$outboundSchema` instead. */ - export const outboundSchema = OnCallScheduleList$outboundSchema; - /** @deprecated use `OnCallScheduleList$Outbound` instead. */ - export type Outbound = OnCallScheduleList$Outbound; -} - export function onCallScheduleListToJSON( onCallScheduleList: OnCallScheduleList, ): string { @@ -69,7 +55,6 @@ export function onCallScheduleListToJSON( OnCallScheduleList$outboundSchema.parse(onCallScheduleList), ); } - export function onCallScheduleListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/oncallscheduleproviderenum.ts b/src/models/components/oncallscheduleproviderenum.ts index eed8e6d8..8927e201 100644 --- a/src/models/components/oncallscheduleproviderenum.ts +++ b/src/models/components/oncallscheduleproviderenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -23,19 +23,7 @@ export type OnCallScheduleProviderEnum = ClosedEnum< export const OnCallScheduleProviderEnum$inboundSchema: z.ZodNativeEnum< typeof OnCallScheduleProviderEnum > = z.nativeEnum(OnCallScheduleProviderEnum); - /** @internal */ export const OnCallScheduleProviderEnum$outboundSchema: z.ZodNativeEnum< typeof OnCallScheduleProviderEnum > = OnCallScheduleProviderEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OnCallScheduleProviderEnum$ { - /** @deprecated use `OnCallScheduleProviderEnum$inboundSchema` instead. */ - export const inboundSchema = OnCallScheduleProviderEnum$inboundSchema; - /** @deprecated use `OnCallScheduleProviderEnum$outboundSchema` instead. */ - export const outboundSchema = OnCallScheduleProviderEnum$outboundSchema; -} diff --git a/src/models/components/opalaccesspathedgefilter.ts b/src/models/components/opalaccesspathedgefilter.ts new file mode 100644 index 00000000..b01bfbb6 --- /dev/null +++ b/src/models/components/opalaccesspathedgefilter.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Constrain results by whether the terminal access expires. + */ +export const AccessDurationType = { + ExpiringOnly: "EXPIRING_ONLY", + PermanentOnly: "PERMANENT_ONLY", +} as const; +/** + * Constrain results by whether the terminal access expires. + */ +export type AccessDurationType = ClosedEnum; + +/** + * Constraints on the access path edges themselves. + */ +export type OpalAccessPathEdgeFilter = { + /** + * When true, only return direct (depth-1) principal-to-entitlement edges. + */ + directOnly?: boolean | undefined; + /** + * Constrain results by whether the terminal access expires. + */ + accessDurationType?: AccessDurationType | undefined; +}; + +/** @internal */ +export const AccessDurationType$inboundSchema: z.ZodNativeEnum< + typeof AccessDurationType +> = z.nativeEnum(AccessDurationType); +/** @internal */ +export const AccessDurationType$outboundSchema: z.ZodNativeEnum< + typeof AccessDurationType +> = AccessDurationType$inboundSchema; + +/** @internal */ +export const OpalAccessPathEdgeFilter$inboundSchema: z.ZodType< + OpalAccessPathEdgeFilter, + z.ZodTypeDef, + unknown +> = z.object({ + directOnly: z.boolean().optional(), + accessDurationType: AccessDurationType$inboundSchema.optional(), +}); +/** @internal */ +export type OpalAccessPathEdgeFilter$Outbound = { + directOnly?: boolean | undefined; + accessDurationType?: string | undefined; +}; + +/** @internal */ +export const OpalAccessPathEdgeFilter$outboundSchema: z.ZodType< + OpalAccessPathEdgeFilter$Outbound, + z.ZodTypeDef, + OpalAccessPathEdgeFilter +> = z.object({ + directOnly: z.boolean().optional(), + accessDurationType: AccessDurationType$outboundSchema.optional(), +}); + +export function opalAccessPathEdgeFilterToJSON( + opalAccessPathEdgeFilter: OpalAccessPathEdgeFilter, +): string { + return JSON.stringify( + OpalAccessPathEdgeFilter$outboundSchema.parse(opalAccessPathEdgeFilter), + ); +} +export function opalAccessPathEdgeFilterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalAccessPathEdgeFilter$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalAccessPathEdgeFilter' from JSON`, + ); +} diff --git a/src/models/components/opalaccesspathquery.ts b/src/models/components/opalaccesspathquery.ts new file mode 100644 index 00000000..180a2c51 --- /dev/null +++ b/src/models/components/opalaccesspathquery.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OpalAccessPathQueryBody, + OpalAccessPathQueryBody$inboundSchema, + OpalAccessPathQueryBody$Outbound, + OpalAccessPathQueryBody$outboundSchema, +} from "./opalaccesspathquerybody.js"; + +/** + * Request body for an ACCESS_PATH-type OpalQuery. Returns principal-to- entitlement access paths matching the given edge filters. + */ +export type OpalAccessPathQuery = { + type: "ACCESS_PATH"; + /** + * Edge-query filters for an ACCESS_PATH OpalQuery. At least one of principalFilter or entitlementFilter is required. + */ + query?: OpalAccessPathQueryBody | undefined; + /** + * Maximum number of results to return. Defaults to 200. + */ + first?: number | undefined; + /** + * Opaque cursor from a previous ACCESS_PATH response to fetch the next page of results. + */ + after?: string | undefined; + /** + * When true, populate totalCount in the response. Defaults to false. + */ + includeCount?: boolean | undefined; +}; + +/** @internal */ +export const OpalAccessPathQuery$inboundSchema: z.ZodType< + OpalAccessPathQuery, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.literal("ACCESS_PATH"), + query: OpalAccessPathQueryBody$inboundSchema.optional(), + first: z.number().int().optional(), + after: z.string().optional(), + includeCount: z.boolean().optional(), +}); +/** @internal */ +export type OpalAccessPathQuery$Outbound = { + type: "ACCESS_PATH"; + query?: OpalAccessPathQueryBody$Outbound | undefined; + first?: number | undefined; + after?: string | undefined; + includeCount?: boolean | undefined; +}; + +/** @internal */ +export const OpalAccessPathQuery$outboundSchema: z.ZodType< + OpalAccessPathQuery$Outbound, + z.ZodTypeDef, + OpalAccessPathQuery +> = z.object({ + type: z.literal("ACCESS_PATH"), + query: OpalAccessPathQueryBody$outboundSchema.optional(), + first: z.number().int().optional(), + after: z.string().optional(), + includeCount: z.boolean().optional(), +}); + +export function opalAccessPathQueryToJSON( + opalAccessPathQuery: OpalAccessPathQuery, +): string { + return JSON.stringify( + OpalAccessPathQuery$outboundSchema.parse(opalAccessPathQuery), + ); +} +export function opalAccessPathQueryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalAccessPathQuery$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalAccessPathQuery' from JSON`, + ); +} diff --git a/src/models/components/opalaccesspathquerybody.ts b/src/models/components/opalaccesspathquerybody.ts new file mode 100644 index 00000000..d132bd86 --- /dev/null +++ b/src/models/components/opalaccesspathquerybody.ts @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AccessEntityFilters, + AccessEntityFilters$inboundSchema, + AccessEntityFilters$Outbound, + AccessEntityFilters$outboundSchema, +} from "./accessentityfilters.js"; +import { + AccessRelationshipFilters, + AccessRelationshipFilters$inboundSchema, + AccessRelationshipFilters$Outbound, + AccessRelationshipFilters$outboundSchema, +} from "./accessrelationshipfilters.js"; +import { + OpalAccessPathEdgeFilter, + OpalAccessPathEdgeFilter$inboundSchema, + OpalAccessPathEdgeFilter$Outbound, + OpalAccessPathEdgeFilter$outboundSchema, +} from "./opalaccesspathedgefilter.js"; + +/** + * Edge-query filters for an ACCESS_PATH OpalQuery. At least one of principalFilter or entitlementFilter is required. + */ +export type OpalAccessPathQueryBody = { + /** + * Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + */ + principalFilter?: AccessEntityFilters | undefined; + /** + * Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + */ + entitlementFilter?: AccessEntityFilters | undefined; + /** + * Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously. + * + * @remarks + */ + principalAccessFilters?: AccessRelationshipFilters | undefined; + /** + * Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously. + * + * @remarks + */ + entitlementAccessFilters?: AccessRelationshipFilters | undefined; + /** + * Filter by access-level remote IDs on the terminal edge. + */ + accessLevelRemoteIds?: Array | undefined; + /** + * Filter by access-level display names on the terminal edge. + */ + accessLevelNames?: Array | undefined; + /** + * Constraints on the access path edges themselves. + */ + edgeFilter?: OpalAccessPathEdgeFilter | undefined; +}; + +/** @internal */ +export const OpalAccessPathQueryBody$inboundSchema: z.ZodType< + OpalAccessPathQueryBody, + z.ZodTypeDef, + unknown +> = z.object({ + principalFilter: AccessEntityFilters$inboundSchema.optional(), + entitlementFilter: AccessEntityFilters$inboundSchema.optional(), + principalAccessFilters: AccessRelationshipFilters$inboundSchema.optional(), + entitlementAccessFilters: AccessRelationshipFilters$inboundSchema.optional(), + accessLevelRemoteIds: z.array(z.string()).optional(), + accessLevelNames: z.array(z.string()).optional(), + edgeFilter: OpalAccessPathEdgeFilter$inboundSchema.optional(), +}); +/** @internal */ +export type OpalAccessPathQueryBody$Outbound = { + principalFilter?: AccessEntityFilters$Outbound | undefined; + entitlementFilter?: AccessEntityFilters$Outbound | undefined; + principalAccessFilters?: AccessRelationshipFilters$Outbound | undefined; + entitlementAccessFilters?: AccessRelationshipFilters$Outbound | undefined; + accessLevelRemoteIds?: Array | undefined; + accessLevelNames?: Array | undefined; + edgeFilter?: OpalAccessPathEdgeFilter$Outbound | undefined; +}; + +/** @internal */ +export const OpalAccessPathQueryBody$outboundSchema: z.ZodType< + OpalAccessPathQueryBody$Outbound, + z.ZodTypeDef, + OpalAccessPathQueryBody +> = z.object({ + principalFilter: AccessEntityFilters$outboundSchema.optional(), + entitlementFilter: AccessEntityFilters$outboundSchema.optional(), + principalAccessFilters: AccessRelationshipFilters$outboundSchema.optional(), + entitlementAccessFilters: AccessRelationshipFilters$outboundSchema.optional(), + accessLevelRemoteIds: z.array(z.string()).optional(), + accessLevelNames: z.array(z.string()).optional(), + edgeFilter: OpalAccessPathEdgeFilter$outboundSchema.optional(), +}); + +export function opalAccessPathQueryBodyToJSON( + opalAccessPathQueryBody: OpalAccessPathQueryBody, +): string { + return JSON.stringify( + OpalAccessPathQueryBody$outboundSchema.parse(opalAccessPathQueryBody), + ); +} +export function opalAccessPathQueryBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalAccessPathQueryBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalAccessPathQueryBody' from JSON`, + ); +} diff --git a/src/models/components/opalaccesspathqueryresults.ts b/src/models/components/opalaccesspathqueryresults.ts new file mode 100644 index 00000000..51b49c06 --- /dev/null +++ b/src/models/components/opalaccesspathqueryresults.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OpalAccessPathResultEdge, + OpalAccessPathResultEdge$inboundSchema, + OpalAccessPathResultEdge$Outbound, + OpalAccessPathResultEdge$outboundSchema, +} from "./opalaccesspathresultedge.js"; +import { + PageInfo, + PageInfo$inboundSchema, + PageInfo$Outbound, + PageInfo$outboundSchema, +} from "./pageinfo.js"; + +/** + * Paginated results of an ACCESS_PATH-type OpalQuery — one edge per matched principal-to-entitlement access path. + */ +export type OpalAccessPathQueryResults = { + type: "ACCESS_PATH"; + /** + * List of matched access paths. + */ + edges: Array; + pageInfo: PageInfo; + /** + * Exact total number of matching paths when includeCount was true on the request; otherwise null. + */ + totalCount?: number | null | undefined; +}; + +/** @internal */ +export const OpalAccessPathQueryResults$inboundSchema: z.ZodType< + OpalAccessPathQueryResults, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.literal("ACCESS_PATH"), + edges: z.array(OpalAccessPathResultEdge$inboundSchema), + pageInfo: PageInfo$inboundSchema, + totalCount: z.nullable(z.number().int()).optional(), +}); +/** @internal */ +export type OpalAccessPathQueryResults$Outbound = { + type: "ACCESS_PATH"; + edges: Array; + pageInfo: PageInfo$Outbound; + totalCount?: number | null | undefined; +}; + +/** @internal */ +export const OpalAccessPathQueryResults$outboundSchema: z.ZodType< + OpalAccessPathQueryResults$Outbound, + z.ZodTypeDef, + OpalAccessPathQueryResults +> = z.object({ + type: z.literal("ACCESS_PATH"), + edges: z.array(OpalAccessPathResultEdge$outboundSchema), + pageInfo: PageInfo$outboundSchema, + totalCount: z.nullable(z.number().int()).optional(), +}); + +export function opalAccessPathQueryResultsToJSON( + opalAccessPathQueryResults: OpalAccessPathQueryResults, +): string { + return JSON.stringify( + OpalAccessPathQueryResults$outboundSchema.parse(opalAccessPathQueryResults), + ); +} +export function opalAccessPathQueryResultsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalAccessPathQueryResults$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalAccessPathQueryResults' from JSON`, + ); +} diff --git a/src/models/components/opalaccesspathresultedge.ts b/src/models/components/opalaccesspathresultedge.ts new file mode 100644 index 00000000..1e910be0 --- /dev/null +++ b/src/models/components/opalaccesspathresultedge.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OpalAccessPathResultNode, + OpalAccessPathResultNode$inboundSchema, + OpalAccessPathResultNode$Outbound, + OpalAccessPathResultNode$outboundSchema, +} from "./opalaccesspathresultnode.js"; + +/** + * A single ACCESS_PATH result edge containing the matched path and its pagination cursor. + */ +export type OpalAccessPathResultEdge = { + /** + * A matched access path from an ACCESS_PATH OpalQuery. + */ + node: OpalAccessPathResultNode; + /** + * Opaque cursor for this path, used for pagination. + */ + cursor: string; +}; + +/** @internal */ +export const OpalAccessPathResultEdge$inboundSchema: z.ZodType< + OpalAccessPathResultEdge, + z.ZodTypeDef, + unknown +> = z.object({ + node: OpalAccessPathResultNode$inboundSchema, + cursor: z.string(), +}); +/** @internal */ +export type OpalAccessPathResultEdge$Outbound = { + node: OpalAccessPathResultNode$Outbound; + cursor: string; +}; + +/** @internal */ +export const OpalAccessPathResultEdge$outboundSchema: z.ZodType< + OpalAccessPathResultEdge$Outbound, + z.ZodTypeDef, + OpalAccessPathResultEdge +> = z.object({ + node: OpalAccessPathResultNode$outboundSchema, + cursor: z.string(), +}); + +export function opalAccessPathResultEdgeToJSON( + opalAccessPathResultEdge: OpalAccessPathResultEdge, +): string { + return JSON.stringify( + OpalAccessPathResultEdge$outboundSchema.parse(opalAccessPathResultEdge), + ); +} +export function opalAccessPathResultEdgeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalAccessPathResultEdge$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalAccessPathResultEdge' from JSON`, + ); +} diff --git a/src/models/components/opalaccesspathresultnode.ts b/src/models/components/opalaccesspathresultnode.ts new file mode 100644 index 00000000..2aea6845 --- /dev/null +++ b/src/models/components/opalaccesspathresultnode.ts @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A matched access path from an ACCESS_PATH OpalQuery. + */ +export type OpalAccessPathResultNode = { + /** + * The principal entity ID. + */ + principalId: string; + /** + * The entitlement entity ID. + */ + entitlementId: string; + /** + * Remote ID of the terminal access level. + */ + accessLevelRemoteId?: string | null | undefined; + /** + * Display name of the terminal access level. + */ + accessLevelName?: string | null | undefined; + /** + * Expiration of the terminal access, if any. + */ + expiration?: Date | null | undefined; + /** + * Number of hops from principal to entitlement (path length - 1). + */ + depth: number; + /** + * Entity IDs along the path from principal to entitlement. + */ + path: Array; +}; + +/** @internal */ +export const OpalAccessPathResultNode$inboundSchema: z.ZodType< + OpalAccessPathResultNode, + z.ZodTypeDef, + unknown +> = z.object({ + principalId: z.string(), + entitlementId: z.string(), + accessLevelRemoteId: z.nullable(z.string()).optional(), + accessLevelName: z.nullable(z.string()).optional(), + expiration: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + depth: z.number().int(), + path: z.array(z.string()), +}); +/** @internal */ +export type OpalAccessPathResultNode$Outbound = { + principalId: string; + entitlementId: string; + accessLevelRemoteId?: string | null | undefined; + accessLevelName?: string | null | undefined; + expiration?: string | null | undefined; + depth: number; + path: Array; +}; + +/** @internal */ +export const OpalAccessPathResultNode$outboundSchema: z.ZodType< + OpalAccessPathResultNode$Outbound, + z.ZodTypeDef, + OpalAccessPathResultNode +> = z.object({ + principalId: z.string(), + entitlementId: z.string(), + accessLevelRemoteId: z.nullable(z.string()).optional(), + accessLevelName: z.nullable(z.string()).optional(), + expiration: z.nullable(z.date().transform(v => v.toISOString())).optional(), + depth: z.number().int(), + path: z.array(z.string()), +}); + +export function opalAccessPathResultNodeToJSON( + opalAccessPathResultNode: OpalAccessPathResultNode, +): string { + return JSON.stringify( + OpalAccessPathResultNode$outboundSchema.parse(opalAccessPathResultNode), + ); +} +export function opalAccessPathResultNodeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalAccessPathResultNode$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalAccessPathResultNode' from JSON`, + ); +} diff --git a/src/models/components/opalnodequery.ts b/src/models/components/opalnodequery.ts new file mode 100644 index 00000000..58ad02e8 --- /dev/null +++ b/src/models/components/opalnodequery.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OpalNodeQueryBody, + OpalNodeQueryBody$inboundSchema, + OpalNodeQueryBody$Outbound, + OpalNodeQueryBody$outboundSchema, +} from "./opalnodequerybody.js"; + +/** + * Request body for a NODE-type OpalQuery. Returns entities (users, resources, groups) matching the given filters. + */ +export type OpalNodeQuery = { + type: "NODE"; + /** + * The filter body for a NODE-type OpalQuery. + */ + query?: OpalNodeQueryBody | undefined; + /** + * Maximum number of results to return. Defaults to 200. + */ + first?: number | undefined; + /** + * Cursor from a previous response to fetch the next page of results. + */ + after?: string | undefined; +}; + +/** @internal */ +export const OpalNodeQuery$inboundSchema: z.ZodType< + OpalNodeQuery, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.literal("NODE"), + query: OpalNodeQueryBody$inboundSchema.optional(), + first: z.number().int().optional(), + after: z.string().optional(), +}); +/** @internal */ +export type OpalNodeQuery$Outbound = { + type: "NODE"; + query?: OpalNodeQueryBody$Outbound | undefined; + first?: number | undefined; + after?: string | undefined; +}; + +/** @internal */ +export const OpalNodeQuery$outboundSchema: z.ZodType< + OpalNodeQuery$Outbound, + z.ZodTypeDef, + OpalNodeQuery +> = z.object({ + type: z.literal("NODE"), + query: OpalNodeQueryBody$outboundSchema.optional(), + first: z.number().int().optional(), + after: z.string().optional(), +}); + +export function opalNodeQueryToJSON(opalNodeQuery: OpalNodeQuery): string { + return JSON.stringify(OpalNodeQuery$outboundSchema.parse(opalNodeQuery)); +} +export function opalNodeQueryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalNodeQuery$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalNodeQuery' from JSON`, + ); +} diff --git a/src/models/components/opalnodequerybody.ts b/src/models/components/opalnodequerybody.ts new file mode 100644 index 00000000..17599d1a --- /dev/null +++ b/src/models/components/opalnodequerybody.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AccessEntityFilters, + AccessEntityFilters$inboundSchema, + AccessEntityFilters$Outbound, + AccessEntityFilters$outboundSchema, +} from "./accessentityfilters.js"; +import { + AccessRelationshipFilters, + AccessRelationshipFilters$inboundSchema, + AccessRelationshipFilters$Outbound, + AccessRelationshipFilters$outboundSchema, +} from "./accessrelationshipfilters.js"; + +/** + * The filter body for a NODE-type OpalQuery. + */ +export type OpalNodeQueryBody = { + /** + * Filters for matching entities by type, name, tag, IDs, connections, or access levels. Supports recursive logical composition via allOf/anyOf. + */ + nodeFilters?: AccessEntityFilters | undefined; + /** + * Filters the returned nodes by the access edges connected to them. When `isAccessibleBy` and `hasAccessTo` are provided, the returned nodes must satisfy both edge constraints simultaneously. + * + * @remarks + */ + accessFilters?: AccessRelationshipFilters | undefined; +}; + +/** @internal */ +export const OpalNodeQueryBody$inboundSchema: z.ZodType< + OpalNodeQueryBody, + z.ZodTypeDef, + unknown +> = z.object({ + nodeFilters: AccessEntityFilters$inboundSchema.optional(), + accessFilters: AccessRelationshipFilters$inboundSchema.optional(), +}); +/** @internal */ +export type OpalNodeQueryBody$Outbound = { + nodeFilters?: AccessEntityFilters$Outbound | undefined; + accessFilters?: AccessRelationshipFilters$Outbound | undefined; +}; + +/** @internal */ +export const OpalNodeQueryBody$outboundSchema: z.ZodType< + OpalNodeQueryBody$Outbound, + z.ZodTypeDef, + OpalNodeQueryBody +> = z.object({ + nodeFilters: AccessEntityFilters$outboundSchema.optional(), + accessFilters: AccessRelationshipFilters$outboundSchema.optional(), +}); + +export function opalNodeQueryBodyToJSON( + opalNodeQueryBody: OpalNodeQueryBody, +): string { + return JSON.stringify( + OpalNodeQueryBody$outboundSchema.parse(opalNodeQueryBody), + ); +} +export function opalNodeQueryBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalNodeQueryBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalNodeQueryBody' from JSON`, + ); +} diff --git a/src/models/components/opalnodequeryresults.ts b/src/models/components/opalnodequeryresults.ts new file mode 100644 index 00000000..7052f7ee --- /dev/null +++ b/src/models/components/opalnodequeryresults.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OpalQueryResultEdge, + OpalQueryResultEdge$inboundSchema, + OpalQueryResultEdge$Outbound, + OpalQueryResultEdge$outboundSchema, +} from "./opalqueryresultedge.js"; +import { + PageInfo, + PageInfo$inboundSchema, + PageInfo$Outbound, + PageInfo$outboundSchema, +} from "./pageinfo.js"; + +/** + * Paginated results of a NODE-type OpalQuery — one edge per matched entity (user, resource, or group). + */ +export type OpalNodeQueryResults = { + type: "NODE"; + /** + * List of matched entities. + */ + edges: Array; + pageInfo: PageInfo; +}; + +/** @internal */ +export const OpalNodeQueryResults$inboundSchema: z.ZodType< + OpalNodeQueryResults, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.literal("NODE"), + edges: z.array(OpalQueryResultEdge$inboundSchema), + pageInfo: PageInfo$inboundSchema, +}); +/** @internal */ +export type OpalNodeQueryResults$Outbound = { + type: "NODE"; + edges: Array; + pageInfo: PageInfo$Outbound; +}; + +/** @internal */ +export const OpalNodeQueryResults$outboundSchema: z.ZodType< + OpalNodeQueryResults$Outbound, + z.ZodTypeDef, + OpalNodeQueryResults +> = z.object({ + type: z.literal("NODE"), + edges: z.array(OpalQueryResultEdge$outboundSchema), + pageInfo: PageInfo$outboundSchema, +}); + +export function opalNodeQueryResultsToJSON( + opalNodeQueryResults: OpalNodeQueryResults, +): string { + return JSON.stringify( + OpalNodeQueryResults$outboundSchema.parse(opalNodeQueryResults), + ); +} +export function opalNodeQueryResultsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalNodeQueryResults$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalNodeQueryResults' from JSON`, + ); +} diff --git a/src/models/components/opalqueryresultedge.ts b/src/models/components/opalqueryresultedge.ts new file mode 100644 index 00000000..2ce65344 --- /dev/null +++ b/src/models/components/opalqueryresultedge.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OpalQueryResultNode, + OpalQueryResultNode$inboundSchema, + OpalQueryResultNode$Outbound, + OpalQueryResultNode$outboundSchema, +} from "./opalqueryresultnode.js"; + +/** + * A single result edge from an OpalQuery, containing the matched entity and its pagination cursor. + */ +export type OpalQueryResultEdge = { + /** + * A matched entity from an OpalQuery result. + */ + node: OpalQueryResultNode; + /** + * Opaque cursor for this entity, used for pagination. + */ + cursor: string; +}; + +/** @internal */ +export const OpalQueryResultEdge$inboundSchema: z.ZodType< + OpalQueryResultEdge, + z.ZodTypeDef, + unknown +> = z.object({ + node: OpalQueryResultNode$inboundSchema, + cursor: z.string(), +}); +/** @internal */ +export type OpalQueryResultEdge$Outbound = { + node: OpalQueryResultNode$Outbound; + cursor: string; +}; + +/** @internal */ +export const OpalQueryResultEdge$outboundSchema: z.ZodType< + OpalQueryResultEdge$Outbound, + z.ZodTypeDef, + OpalQueryResultEdge +> = z.object({ + node: OpalQueryResultNode$outboundSchema, + cursor: z.string(), +}); + +export function opalQueryResultEdgeToJSON( + opalQueryResultEdge: OpalQueryResultEdge, +): string { + return JSON.stringify( + OpalQueryResultEdge$outboundSchema.parse(opalQueryResultEdge), + ); +} +export function opalQueryResultEdgeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalQueryResultEdge$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalQueryResultEdge' from JSON`, + ); +} diff --git a/src/models/components/opalqueryresultnode.ts b/src/models/components/opalqueryresultnode.ts new file mode 100644 index 00000000..54eacbd3 --- /dev/null +++ b/src/models/components/opalqueryresultnode.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + EntityItemTypeEnum, + EntityItemTypeEnum$inboundSchema, + EntityItemTypeEnum$outboundSchema, +} from "./entityitemtypeenum.js"; + +/** + * The top-level entity type. + */ +export const OpalQueryResultNodeEntityType = { + User: "USER", + Group: "GROUP", + Resource: "RESOURCE", +} as const; +/** + * The top-level entity type. + */ +export type OpalQueryResultNodeEntityType = ClosedEnum< + typeof OpalQueryResultNodeEntityType +>; + +/** + * A matched entity from an OpalQuery result. + */ +export type OpalQueryResultNode = { + /** + * The entity's unique identifier. + */ + id: string; + /** + * The display name of the entity. + */ + name: string; + /** + * The top-level entity type. + */ + entityType: OpalQueryResultNodeEntityType; + /** + * Granular subtype of an entity. + */ + entityItemType: EntityItemTypeEnum; +}; + +/** @internal */ +export const OpalQueryResultNodeEntityType$inboundSchema: z.ZodNativeEnum< + typeof OpalQueryResultNodeEntityType +> = z.nativeEnum(OpalQueryResultNodeEntityType); +/** @internal */ +export const OpalQueryResultNodeEntityType$outboundSchema: z.ZodNativeEnum< + typeof OpalQueryResultNodeEntityType +> = OpalQueryResultNodeEntityType$inboundSchema; + +/** @internal */ +export const OpalQueryResultNode$inboundSchema: z.ZodType< + OpalQueryResultNode, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + name: z.string(), + entityType: OpalQueryResultNodeEntityType$inboundSchema, + entityItemType: EntityItemTypeEnum$inboundSchema, +}); +/** @internal */ +export type OpalQueryResultNode$Outbound = { + id: string; + name: string; + entityType: string; + entityItemType: string; +}; + +/** @internal */ +export const OpalQueryResultNode$outboundSchema: z.ZodType< + OpalQueryResultNode$Outbound, + z.ZodTypeDef, + OpalQueryResultNode +> = z.object({ + id: z.string(), + name: z.string(), + entityType: OpalQueryResultNodeEntityType$outboundSchema, + entityItemType: EntityItemTypeEnum$outboundSchema, +}); + +export function opalQueryResultNodeToJSON( + opalQueryResultNode: OpalQueryResultNode, +): string { + return JSON.stringify( + OpalQueryResultNode$outboundSchema.parse(opalQueryResultNode), + ); +} +export function opalQueryResultNodeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalQueryResultNode$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalQueryResultNode' from JSON`, + ); +} diff --git a/src/models/components/opalqueryresults.ts b/src/models/components/opalqueryresults.ts new file mode 100644 index 00000000..da970839 --- /dev/null +++ b/src/models/components/opalqueryresults.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OpalAccessPathQueryResults, + OpalAccessPathQueryResults$inboundSchema, + OpalAccessPathQueryResults$Outbound, + OpalAccessPathQueryResults$outboundSchema, +} from "./opalaccesspathqueryresults.js"; +import { + OpalNodeQueryResults, + OpalNodeQueryResults$inboundSchema, + OpalNodeQueryResults$Outbound, + OpalNodeQueryResults$outboundSchema, +} from "./opalnodequeryresults.js"; + +/** + * Paginated results of an OpalQuery. The `type` field discriminates which result schema applies and mirrors the `type` field on the request. + */ +export type OpalQueryResults = + | OpalNodeQueryResults + | OpalAccessPathQueryResults; + +/** @internal */ +export const OpalQueryResults$inboundSchema: z.ZodType< + OpalQueryResults, + z.ZodTypeDef, + unknown +> = z.union([ + OpalNodeQueryResults$inboundSchema, + OpalAccessPathQueryResults$inboundSchema, +]); +/** @internal */ +export type OpalQueryResults$Outbound = + | OpalNodeQueryResults$Outbound + | OpalAccessPathQueryResults$Outbound; + +/** @internal */ +export const OpalQueryResults$outboundSchema: z.ZodType< + OpalQueryResults$Outbound, + z.ZodTypeDef, + OpalQueryResults +> = z.union([ + OpalNodeQueryResults$outboundSchema, + OpalAccessPathQueryResults$outboundSchema, +]); + +export function opalQueryResultsToJSON( + opalQueryResults: OpalQueryResults, +): string { + return JSON.stringify( + OpalQueryResults$outboundSchema.parse(opalQueryResults), + ); +} +export function opalQueryResultsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OpalQueryResults$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpalQueryResults' from JSON`, + ); +} diff --git a/src/models/components/owner.ts b/src/models/components/owner.ts index 9311870b..a7f33c3b 100644 --- a/src/models/components/owner.ts +++ b/src/models/components/owner.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -53,7 +53,6 @@ export const Owner$inboundSchema: z.ZodType = z "source_group_id": "sourceGroupId", }); }); - /** @internal */ export type Owner$Outbound = { owner_id: string; @@ -85,23 +84,9 @@ export const Owner$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Owner$ { - /** @deprecated use `Owner$inboundSchema` instead. */ - export const inboundSchema = Owner$inboundSchema; - /** @deprecated use `Owner$outboundSchema` instead. */ - export const outboundSchema = Owner$outboundSchema; - /** @deprecated use `Owner$Outbound` instead. */ - export type Outbound = Owner$Outbound; -} - export function ownerToJSON(owner: Owner): string { return JSON.stringify(Owner$outboundSchema.parse(owner)); } - export function ownerFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/pageinfo.ts b/src/models/components/pageinfo.ts index d316bc72..7f98ec1b 100644 --- a/src/models/components/pageinfo.ts +++ b/src/models/components/pageinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -37,7 +37,6 @@ export const PageInfo$inboundSchema: z.ZodType< hasPreviousPage: z.boolean(), startCursor: z.string(), }); - /** @internal */ export type PageInfo$Outbound = { hasNextPage: boolean; @@ -58,23 +57,9 @@ export const PageInfo$outboundSchema: z.ZodType< startCursor: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PageInfo$ { - /** @deprecated use `PageInfo$inboundSchema` instead. */ - export const inboundSchema = PageInfo$inboundSchema; - /** @deprecated use `PageInfo$outboundSchema` instead. */ - export const outboundSchema = PageInfo$outboundSchema; - /** @deprecated use `PageInfo$Outbound` instead. */ - export type Outbound = PageInfo$Outbound; -} - export function pageInfoToJSON(pageInfo: PageInfo): string { return JSON.stringify(PageInfo$outboundSchema.parse(pageInfo)); } - export function pageInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedaccessruleslist.ts b/src/models/components/paginatedaccessruleslist.ts new file mode 100644 index 00000000..aef06785 --- /dev/null +++ b/src/models/components/paginatedaccessruleslist.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AccessRule, + AccessRule$inboundSchema, + AccessRule$Outbound, + AccessRule$outboundSchema, +} from "./accessrule.js"; + +export type PaginatedAccessRulesList = { + /** + * The cursor with which to continue pagination if additional result pages exist. + */ + next?: string | undefined; + /** + * The cursor used to retrieve the previous page of results. + */ + previous?: string | undefined; + results: Array; +}; + +/** @internal */ +export const PaginatedAccessRulesList$inboundSchema: z.ZodType< + PaginatedAccessRulesList, + z.ZodTypeDef, + unknown +> = z.object({ + next: z.string().optional(), + previous: z.string().optional(), + results: z.array(AccessRule$inboundSchema), +}); +/** @internal */ +export type PaginatedAccessRulesList$Outbound = { + next?: string | undefined; + previous?: string | undefined; + results: Array; +}; + +/** @internal */ +export const PaginatedAccessRulesList$outboundSchema: z.ZodType< + PaginatedAccessRulesList$Outbound, + z.ZodTypeDef, + PaginatedAccessRulesList +> = z.object({ + next: z.string().optional(), + previous: z.string().optional(), + results: z.array(AccessRule$outboundSchema), +}); + +export function paginatedAccessRulesListToJSON( + paginatedAccessRulesList: PaginatedAccessRulesList, +): string { + return JSON.stringify( + PaginatedAccessRulesList$outboundSchema.parse(paginatedAccessRulesList), + ); +} +export function paginatedAccessRulesListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PaginatedAccessRulesList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PaginatedAccessRulesList' from JSON`, + ); +} diff --git a/src/models/components/paginatedbundlegrouplist.ts b/src/models/components/paginatedbundlegrouplist.ts index 444521f6..e84a6501 100644 --- a/src/models/components/paginatedbundlegrouplist.ts +++ b/src/models/components/paginatedbundlegrouplist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -46,7 +46,6 @@ export const PaginatedBundleGroupList$inboundSchema: z.ZodType< "bundle_groups": "bundleGroups", }); }); - /** @internal */ export type PaginatedBundleGroupList$Outbound = { previous?: string | null | undefined; @@ -72,19 +71,6 @@ export const PaginatedBundleGroupList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedBundleGroupList$ { - /** @deprecated use `PaginatedBundleGroupList$inboundSchema` instead. */ - export const inboundSchema = PaginatedBundleGroupList$inboundSchema; - /** @deprecated use `PaginatedBundleGroupList$outboundSchema` instead. */ - export const outboundSchema = PaginatedBundleGroupList$outboundSchema; - /** @deprecated use `PaginatedBundleGroupList$Outbound` instead. */ - export type Outbound = PaginatedBundleGroupList$Outbound; -} - export function paginatedBundleGroupListToJSON( paginatedBundleGroupList: PaginatedBundleGroupList, ): string { @@ -92,7 +78,6 @@ export function paginatedBundleGroupListToJSON( PaginatedBundleGroupList$outboundSchema.parse(paginatedBundleGroupList), ); } - export function paginatedBundleGroupListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedbundlelist.ts b/src/models/components/paginatedbundlelist.ts index 3456be97..0c38909b 100644 --- a/src/models/components/paginatedbundlelist.ts +++ b/src/models/components/paginatedbundlelist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -45,7 +45,6 @@ export const PaginatedBundleList$inboundSchema: z.ZodType< "total_count": "totalCount", }); }); - /** @internal */ export type PaginatedBundleList$Outbound = { previous?: string | null | undefined; @@ -70,19 +69,6 @@ export const PaginatedBundleList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedBundleList$ { - /** @deprecated use `PaginatedBundleList$inboundSchema` instead. */ - export const inboundSchema = PaginatedBundleList$inboundSchema; - /** @deprecated use `PaginatedBundleList$outboundSchema` instead. */ - export const outboundSchema = PaginatedBundleList$outboundSchema; - /** @deprecated use `PaginatedBundleList$Outbound` instead. */ - export type Outbound = PaginatedBundleList$Outbound; -} - export function paginatedBundleListToJSON( paginatedBundleList: PaginatedBundleList, ): string { @@ -90,7 +76,6 @@ export function paginatedBundleListToJSON( PaginatedBundleList$outboundSchema.parse(paginatedBundleList), ); } - export function paginatedBundleListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedbundleresourcelist.ts b/src/models/components/paginatedbundleresourcelist.ts index 0eabbf29..6187cb46 100644 --- a/src/models/components/paginatedbundleresourcelist.ts +++ b/src/models/components/paginatedbundleresourcelist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -46,7 +46,6 @@ export const PaginatedBundleResourceList$inboundSchema: z.ZodType< "bundle_resources": "bundleResources", }); }); - /** @internal */ export type PaginatedBundleResourceList$Outbound = { previous?: string | null | undefined; @@ -72,19 +71,6 @@ export const PaginatedBundleResourceList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedBundleResourceList$ { - /** @deprecated use `PaginatedBundleResourceList$inboundSchema` instead. */ - export const inboundSchema = PaginatedBundleResourceList$inboundSchema; - /** @deprecated use `PaginatedBundleResourceList$outboundSchema` instead. */ - export const outboundSchema = PaginatedBundleResourceList$outboundSchema; - /** @deprecated use `PaginatedBundleResourceList$Outbound` instead. */ - export type Outbound = PaginatedBundleResourceList$Outbound; -} - export function paginatedBundleResourceListToJSON( paginatedBundleResourceList: PaginatedBundleResourceList, ): string { @@ -94,7 +80,6 @@ export function paginatedBundleResourceListToJSON( ), ); } - export function paginatedBundleResourceListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedcampaignslist.ts b/src/models/components/paginatedcampaignslist.ts new file mode 100644 index 00000000..dabc7e56 --- /dev/null +++ b/src/models/components/paginatedcampaignslist.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + Campaign, + Campaign$inboundSchema, + Campaign$Outbound, + Campaign$outboundSchema, +} from "./campaign.js"; + +/** + * A list of campaigns. + */ +export type PaginatedCampaignsList = { + /** + * The cursor with which to continue pagination if additional result pages exist. + */ + next?: string | null | undefined; + /** + * The cursor used to obtain the current result page. + */ + previous?: string | null | undefined; + results: Array; +}; + +/** @internal */ +export const PaginatedCampaignsList$inboundSchema: z.ZodType< + PaginatedCampaignsList, + z.ZodTypeDef, + unknown +> = z.object({ + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), + results: z.array(Campaign$inboundSchema), +}); +/** @internal */ +export type PaginatedCampaignsList$Outbound = { + next?: string | null | undefined; + previous?: string | null | undefined; + results: Array; +}; + +/** @internal */ +export const PaginatedCampaignsList$outboundSchema: z.ZodType< + PaginatedCampaignsList$Outbound, + z.ZodTypeDef, + PaginatedCampaignsList +> = z.object({ + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), + results: z.array(Campaign$outboundSchema), +}); + +export function paginatedCampaignsListToJSON( + paginatedCampaignsList: PaginatedCampaignsList, +): string { + return JSON.stringify( + PaginatedCampaignsList$outboundSchema.parse(paginatedCampaignsList), + ); +} +export function paginatedCampaignsListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PaginatedCampaignsList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PaginatedCampaignsList' from JSON`, + ); +} diff --git a/src/models/components/paginatedconfigurationtemplatelist.ts b/src/models/components/paginatedconfigurationtemplatelist.ts index 602b189d..2bc348e5 100644 --- a/src/models/components/paginatedconfigurationtemplatelist.ts +++ b/src/models/components/paginatedconfigurationtemplatelist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const PaginatedConfigurationTemplateList$inboundSchema: z.ZodType< > = z.object({ results: z.array(ConfigurationTemplate$inboundSchema).optional(), }); - /** @internal */ export type PaginatedConfigurationTemplateList$Outbound = { results?: Array | undefined; @@ -50,20 +49,6 @@ export const PaginatedConfigurationTemplateList$outboundSchema: z.ZodType< results: z.array(ConfigurationTemplate$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedConfigurationTemplateList$ { - /** @deprecated use `PaginatedConfigurationTemplateList$inboundSchema` instead. */ - export const inboundSchema = PaginatedConfigurationTemplateList$inboundSchema; - /** @deprecated use `PaginatedConfigurationTemplateList$outboundSchema` instead. */ - export const outboundSchema = - PaginatedConfigurationTemplateList$outboundSchema; - /** @deprecated use `PaginatedConfigurationTemplateList$Outbound` instead. */ - export type Outbound = PaginatedConfigurationTemplateList$Outbound; -} - export function paginatedConfigurationTemplateListToJSON( paginatedConfigurationTemplateList: PaginatedConfigurationTemplateList, ): string { @@ -73,7 +58,6 @@ export function paginatedConfigurationTemplateListToJSON( ), ); } - export function paginatedConfigurationTemplateListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginateddelegationslist.ts b/src/models/components/paginateddelegationslist.ts new file mode 100644 index 00000000..8632aff2 --- /dev/null +++ b/src/models/components/paginateddelegationslist.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + Delegation, + Delegation$inboundSchema, + Delegation$Outbound, + Delegation$outboundSchema, +} from "./delegation.js"; + +/** + * A list of delegations for your organization. + */ +export type PaginatedDelegationsList = { + /** + * The delegations in the result set. + */ + results?: Array | undefined; + /** + * The cursor with which to continue pagination if additional result pages exist. + */ + next?: string | null | undefined; + /** + * The cursor used to obtain the current result page. + */ + previous?: string | null | undefined; + /** + * The total number of items in the result set. + */ + totalCount?: number | undefined; +}; + +/** @internal */ +export const PaginatedDelegationsList$inboundSchema: z.ZodType< + PaginatedDelegationsList, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(Delegation$inboundSchema).optional(), + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), + total_count: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "total_count": "totalCount", + }); +}); +/** @internal */ +export type PaginatedDelegationsList$Outbound = { + results?: Array | undefined; + next?: string | null | undefined; + previous?: string | null | undefined; + total_count?: number | undefined; +}; + +/** @internal */ +export const PaginatedDelegationsList$outboundSchema: z.ZodType< + PaginatedDelegationsList$Outbound, + z.ZodTypeDef, + PaginatedDelegationsList +> = z.object({ + results: z.array(Delegation$outboundSchema).optional(), + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), + totalCount: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + totalCount: "total_count", + }); +}); + +export function paginatedDelegationsListToJSON( + paginatedDelegationsList: PaginatedDelegationsList, +): string { + return JSON.stringify( + PaginatedDelegationsList$outboundSchema.parse(paginatedDelegationsList), + ); +} +export function paginatedDelegationsListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PaginatedDelegationsList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PaginatedDelegationsList' from JSON`, + ); +} diff --git a/src/models/components/paginatedeventlist.ts b/src/models/components/paginatedeventlist.ts index 4e4b5ce6..be9f4606 100644 --- a/src/models/components/paginatedeventlist.ts +++ b/src/models/components/paginatedeventlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const PaginatedEventList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(Event$inboundSchema).optional(), }); - /** @internal */ export type PaginatedEventList$Outbound = { next?: string | null | undefined; @@ -54,19 +53,6 @@ export const PaginatedEventList$outboundSchema: z.ZodType< results: z.array(Event$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedEventList$ { - /** @deprecated use `PaginatedEventList$inboundSchema` instead. */ - export const inboundSchema = PaginatedEventList$inboundSchema; - /** @deprecated use `PaginatedEventList$outboundSchema` instead. */ - export const outboundSchema = PaginatedEventList$outboundSchema; - /** @deprecated use `PaginatedEventList$Outbound` instead. */ - export type Outbound = PaginatedEventList$Outbound; -} - export function paginatedEventListToJSON( paginatedEventList: PaginatedEventList, ): string { @@ -74,7 +60,6 @@ export function paginatedEventListToJSON( PaginatedEventList$outboundSchema.parse(paginatedEventList), ); } - export function paginatedEventListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedgroupbindingslist.ts b/src/models/components/paginatedgroupbindingslist.ts index bfe1dda7..d48c19cd 100644 --- a/src/models/components/paginatedgroupbindingslist.ts +++ b/src/models/components/paginatedgroupbindingslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const PaginatedGroupBindingsList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(GroupBinding$inboundSchema), }); - /** @internal */ export type PaginatedGroupBindingsList$Outbound = { next?: string | null | undefined; @@ -54,19 +53,6 @@ export const PaginatedGroupBindingsList$outboundSchema: z.ZodType< results: z.array(GroupBinding$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedGroupBindingsList$ { - /** @deprecated use `PaginatedGroupBindingsList$inboundSchema` instead. */ - export const inboundSchema = PaginatedGroupBindingsList$inboundSchema; - /** @deprecated use `PaginatedGroupBindingsList$outboundSchema` instead. */ - export const outboundSchema = PaginatedGroupBindingsList$outboundSchema; - /** @deprecated use `PaginatedGroupBindingsList$Outbound` instead. */ - export type Outbound = PaginatedGroupBindingsList$Outbound; -} - export function paginatedGroupBindingsListToJSON( paginatedGroupBindingsList: PaginatedGroupBindingsList, ): string { @@ -74,7 +60,6 @@ export function paginatedGroupBindingsListToJSON( PaginatedGroupBindingsList$outboundSchema.parse(paginatedGroupBindingsList), ); } - export function paginatedGroupBindingsListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedgroupslist.ts b/src/models/components/paginatedgroupslist.ts index 7ffdd3cd..57778bea 100644 --- a/src/models/components/paginatedgroupslist.ts +++ b/src/models/components/paginatedgroupslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const PaginatedGroupsList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(Group$inboundSchema), }); - /** @internal */ export type PaginatedGroupsList$Outbound = { next?: string | null | undefined; @@ -54,19 +53,6 @@ export const PaginatedGroupsList$outboundSchema: z.ZodType< results: z.array(Group$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedGroupsList$ { - /** @deprecated use `PaginatedGroupsList$inboundSchema` instead. */ - export const inboundSchema = PaginatedGroupsList$inboundSchema; - /** @deprecated use `PaginatedGroupsList$outboundSchema` instead. */ - export const outboundSchema = PaginatedGroupsList$outboundSchema; - /** @deprecated use `PaginatedGroupsList$Outbound` instead. */ - export type Outbound = PaginatedGroupsList$Outbound; -} - export function paginatedGroupsListToJSON( paginatedGroupsList: PaginatedGroupsList, ): string { @@ -74,7 +60,6 @@ export function paginatedGroupsListToJSON( PaginatedGroupsList$outboundSchema.parse(paginatedGroupsList), ); } - export function paginatedGroupsListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedownerslist.ts b/src/models/components/paginatedownerslist.ts index 1c61dc1f..3da7c5c6 100644 --- a/src/models/components/paginatedownerslist.ts +++ b/src/models/components/paginatedownerslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const PaginatedOwnersList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(Owner$inboundSchema), }); - /** @internal */ export type PaginatedOwnersList$Outbound = { next?: string | null | undefined; @@ -54,19 +53,6 @@ export const PaginatedOwnersList$outboundSchema: z.ZodType< results: z.array(Owner$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedOwnersList$ { - /** @deprecated use `PaginatedOwnersList$inboundSchema` instead. */ - export const inboundSchema = PaginatedOwnersList$inboundSchema; - /** @deprecated use `PaginatedOwnersList$outboundSchema` instead. */ - export const outboundSchema = PaginatedOwnersList$outboundSchema; - /** @deprecated use `PaginatedOwnersList$Outbound` instead. */ - export type Outbound = PaginatedOwnersList$Outbound; -} - export function paginatedOwnersListToJSON( paginatedOwnersList: PaginatedOwnersList, ): string { @@ -74,7 +60,6 @@ export function paginatedOwnersListToJSON( PaginatedOwnersList$outboundSchema.parse(paginatedOwnersList), ); } - export function paginatedOwnersListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedremoteuserslist.ts b/src/models/components/paginatedremoteuserslist.ts new file mode 100644 index 00000000..2c6c077d --- /dev/null +++ b/src/models/components/paginatedremoteuserslist.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + RemoteUser, + RemoteUser$inboundSchema, + RemoteUser$Outbound, + RemoteUser$outboundSchema, +} from "./remoteuser.js"; + +export type PaginatedRemoteUsersList = { + /** + * The cursor with which to continue pagination if additional result pages exist. + */ + next?: string | null | undefined; + /** + * The cursor used to obtain the current result page. + */ + previous?: string | null | undefined; + results: Array; +}; + +/** @internal */ +export const PaginatedRemoteUsersList$inboundSchema: z.ZodType< + PaginatedRemoteUsersList, + z.ZodTypeDef, + unknown +> = z.object({ + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), + results: z.array(RemoteUser$inboundSchema), +}); +/** @internal */ +export type PaginatedRemoteUsersList$Outbound = { + next?: string | null | undefined; + previous?: string | null | undefined; + results: Array; +}; + +/** @internal */ +export const PaginatedRemoteUsersList$outboundSchema: z.ZodType< + PaginatedRemoteUsersList$Outbound, + z.ZodTypeDef, + PaginatedRemoteUsersList +> = z.object({ + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), + results: z.array(RemoteUser$outboundSchema), +}); + +export function paginatedRemoteUsersListToJSON( + paginatedRemoteUsersList: PaginatedRemoteUsersList, +): string { + return JSON.stringify( + PaginatedRemoteUsersList$outboundSchema.parse(paginatedRemoteUsersList), + ); +} +export function paginatedRemoteUsersListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PaginatedRemoteUsersList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PaginatedRemoteUsersList' from JSON`, + ); +} diff --git a/src/models/components/paginatedresourceslist.ts b/src/models/components/paginatedresourceslist.ts index dda67c8b..cd3b3069 100644 --- a/src/models/components/paginatedresourceslist.ts +++ b/src/models/components/paginatedresourceslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const PaginatedResourcesList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(Resource$inboundSchema), }); - /** @internal */ export type PaginatedResourcesList$Outbound = { next?: string | null | undefined; @@ -54,19 +53,6 @@ export const PaginatedResourcesList$outboundSchema: z.ZodType< results: z.array(Resource$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedResourcesList$ { - /** @deprecated use `PaginatedResourcesList$inboundSchema` instead. */ - export const inboundSchema = PaginatedResourcesList$inboundSchema; - /** @deprecated use `PaginatedResourcesList$outboundSchema` instead. */ - export const outboundSchema = PaginatedResourcesList$outboundSchema; - /** @deprecated use `PaginatedResourcesList$Outbound` instead. */ - export type Outbound = PaginatedResourcesList$Outbound; -} - export function paginatedResourcesListToJSON( paginatedResourcesList: PaginatedResourcesList, ): string { @@ -74,7 +60,6 @@ export function paginatedResourcesListToJSON( PaginatedResourcesList$outboundSchema.parse(paginatedResourcesList), ); } - export function paginatedResourcesListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedtagslist.ts b/src/models/components/paginatedtagslist.ts index ce906873..1ede6cb6 100644 --- a/src/models/components/paginatedtagslist.ts +++ b/src/models/components/paginatedtagslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const PaginatedTagsList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(Tag$inboundSchema), }); - /** @internal */ export type PaginatedTagsList$Outbound = { next?: string | null | undefined; @@ -54,19 +53,6 @@ export const PaginatedTagsList$outboundSchema: z.ZodType< results: z.array(Tag$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedTagsList$ { - /** @deprecated use `PaginatedTagsList$inboundSchema` instead. */ - export const inboundSchema = PaginatedTagsList$inboundSchema; - /** @deprecated use `PaginatedTagsList$outboundSchema` instead. */ - export const outboundSchema = PaginatedTagsList$outboundSchema; - /** @deprecated use `PaginatedTagsList$Outbound` instead. */ - export type Outbound = PaginatedTagsList$Outbound; -} - export function paginatedTagsListToJSON( paginatedTagsList: PaginatedTagsList, ): string { @@ -74,7 +60,6 @@ export function paginatedTagsListToJSON( PaginatedTagsList$outboundSchema.parse(paginatedTagsList), ); } - export function paginatedTagsListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginatedtokenslist.ts b/src/models/components/paginatedtokenslist.ts new file mode 100644 index 00000000..a8dfa7e4 --- /dev/null +++ b/src/models/components/paginatedtokenslist.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + Token, + Token$inboundSchema, + Token$Outbound, + Token$outboundSchema, +} from "./token.js"; + +export type PaginatedTokensList = { + /** + * The cursor with which to continue pagination if additional result pages exist. + */ + next?: string | null | undefined; + /** + * The cursor used to obtain the current result page. + */ + previous?: string | null | undefined; + results: Array; +}; + +/** @internal */ +export const PaginatedTokensList$inboundSchema: z.ZodType< + PaginatedTokensList, + z.ZodTypeDef, + unknown +> = z.object({ + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), + results: z.array(Token$inboundSchema), +}); +/** @internal */ +export type PaginatedTokensList$Outbound = { + next?: string | null | undefined; + previous?: string | null | undefined; + results: Array; +}; + +/** @internal */ +export const PaginatedTokensList$outboundSchema: z.ZodType< + PaginatedTokensList$Outbound, + z.ZodTypeDef, + PaginatedTokensList +> = z.object({ + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), + results: z.array(Token$outboundSchema), +}); + +export function paginatedTokensListToJSON( + paginatedTokensList: PaginatedTokensList, +): string { + return JSON.stringify( + PaginatedTokensList$outboundSchema.parse(paginatedTokensList), + ); +} +export function paginatedTokensListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PaginatedTokensList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PaginatedTokensList' from JSON`, + ); +} diff --git a/src/models/components/paginateduarslist.ts b/src/models/components/paginateduarslist.ts index 390e063e..0b4c1c03 100644 --- a/src/models/components/paginateduarslist.ts +++ b/src/models/components/paginateduarslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -38,7 +38,6 @@ export const PaginatedUARsList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(Uar$inboundSchema), }); - /** @internal */ export type PaginatedUARsList$Outbound = { next?: string | null | undefined; @@ -57,19 +56,6 @@ export const PaginatedUARsList$outboundSchema: z.ZodType< results: z.array(Uar$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedUARsList$ { - /** @deprecated use `PaginatedUARsList$inboundSchema` instead. */ - export const inboundSchema = PaginatedUARsList$inboundSchema; - /** @deprecated use `PaginatedUARsList$outboundSchema` instead. */ - export const outboundSchema = PaginatedUARsList$outboundSchema; - /** @deprecated use `PaginatedUARsList$Outbound` instead. */ - export type Outbound = PaginatedUARsList$Outbound; -} - export function paginatedUARsListToJSON( paginatedUARsList: PaginatedUARsList, ): string { @@ -77,7 +63,6 @@ export function paginatedUARsListToJSON( PaginatedUARsList$outboundSchema.parse(paginatedUARsList), ); } - export function paginatedUARsListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paginateduserslist.ts b/src/models/components/paginateduserslist.ts index 6a706c81..dec15acc 100644 --- a/src/models/components/paginateduserslist.ts +++ b/src/models/components/paginateduserslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const PaginatedUsersList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(User$inboundSchema), }); - /** @internal */ export type PaginatedUsersList$Outbound = { next?: string | null | undefined; @@ -54,19 +53,6 @@ export const PaginatedUsersList$outboundSchema: z.ZodType< results: z.array(User$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginatedUsersList$ { - /** @deprecated use `PaginatedUsersList$inboundSchema` instead. */ - export const inboundSchema = PaginatedUsersList$inboundSchema; - /** @deprecated use `PaginatedUsersList$outboundSchema` instead. */ - export const outboundSchema = PaginatedUsersList$outboundSchema; - /** @deprecated use `PaginatedUsersList$Outbound` instead. */ - export type Outbound = PaginatedUsersList$Outbound; -} - export function paginatedUsersListToJSON( paginatedUsersList: PaginatedUsersList, ): string { @@ -74,7 +60,6 @@ export function paginatedUsersListToJSON( PaginatedUsersList$outboundSchema.parse(paginatedUsersList), ); } - export function paginatedUsersListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/paladin.ts b/src/models/components/paladin.ts new file mode 100644 index 00000000..f45c8b82 --- /dev/null +++ b/src/models/components/paladin.ts @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PaladinConnector, + PaladinConnector$inboundSchema, + PaladinConnector$outboundSchema, +} from "./paladinconnector.js"; + +/** + * # Paladin Object + * + * @remarks + * ### Description + * The `Paladin` object represents a Paladin, Opal's AI access-request + * reviewer. + */ +export type Paladin = { + /** + * The ID of the Paladin. Use this value as a reviewer in a request configuration's service_user_ids. + */ + paladinId: string; + /** + * The name of the Paladin. + */ + name: string; + /** + * The ID of the owner of the Paladin. + */ + ownerId: string; + /** + * When true, the Paladin reasons about requests but takes no action. Shown as "Monitor mode" in the UI. + */ + monitorMode: boolean; + /** + * When true, the Paladin's recommendations are visible only to admins. Only meaningful when monitor_mode is true. + */ + adminViewOnly: boolean; + /** + * The connectors the Paladin is allowed to use. + */ + enabledConnectors: Array; + /** + * The free-form instructions that guide the Paladin's decisions. + */ + instructions: string; +}; + +/** @internal */ +export const Paladin$inboundSchema: z.ZodType = + z.object({ + paladin_id: z.string(), + name: z.string(), + owner_id: z.string(), + monitor_mode: z.boolean(), + admin_view_only: z.boolean(), + enabled_connectors: z.array(PaladinConnector$inboundSchema), + instructions: z.string(), + }).transform((v) => { + return remap$(v, { + "paladin_id": "paladinId", + "owner_id": "ownerId", + "monitor_mode": "monitorMode", + "admin_view_only": "adminViewOnly", + "enabled_connectors": "enabledConnectors", + }); + }); +/** @internal */ +export type Paladin$Outbound = { + paladin_id: string; + name: string; + owner_id: string; + monitor_mode: boolean; + admin_view_only: boolean; + enabled_connectors: Array; + instructions: string; +}; + +/** @internal */ +export const Paladin$outboundSchema: z.ZodType< + Paladin$Outbound, + z.ZodTypeDef, + Paladin +> = z.object({ + paladinId: z.string(), + name: z.string(), + ownerId: z.string(), + monitorMode: z.boolean(), + adminViewOnly: z.boolean(), + enabledConnectors: z.array(PaladinConnector$outboundSchema), + instructions: z.string(), +}).transform((v) => { + return remap$(v, { + paladinId: "paladin_id", + ownerId: "owner_id", + monitorMode: "monitor_mode", + adminViewOnly: "admin_view_only", + enabledConnectors: "enabled_connectors", + }); +}); + +export function paladinToJSON(paladin: Paladin): string { + return JSON.stringify(Paladin$outboundSchema.parse(paladin)); +} +export function paladinFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Paladin$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Paladin' from JSON`, + ); +} diff --git a/src/models/components/paladinconnector.ts b/src/models/components/paladinconnector.ts new file mode 100644 index 00000000..ea9375a4 --- /dev/null +++ b/src/models/components/paladinconnector.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * A connector a Paladin is allowed to use. + */ +export const PaladinConnector = { + Notion: "NOTION", + Jira: "JIRA", + Linear: "LINEAR", + ServiceNow: "SERVICE_NOW", + NotionTickets: "NOTION_TICKETS", + FreshService: "FRESH_SERVICE", + Shortcut: "SHORTCUT", + Slack: "SLACK", + PagerDuty: "PAGER_DUTY", + Confluence: "CONFLUENCE", + FleetDm: "FLEET_DM", +} as const; +/** + * A connector a Paladin is allowed to use. + */ +export type PaladinConnector = ClosedEnum; + +/** @internal */ +export const PaladinConnector$inboundSchema: z.ZodNativeEnum< + typeof PaladinConnector +> = z.nativeEnum(PaladinConnector); +/** @internal */ +export const PaladinConnector$outboundSchema: z.ZodNativeEnum< + typeof PaladinConnector +> = PaladinConnector$inboundSchema; diff --git a/src/models/components/paladincontextsource.ts b/src/models/components/paladincontextsource.ts new file mode 100644 index 00000000..e0b3ef31 --- /dev/null +++ b/src/models/components/paladincontextsource.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PaladinContextSourceKind, + PaladinContextSourceKind$inboundSchema, + PaladinContextSourceKind$outboundSchema, +} from "./paladincontextsourcekind.js"; +import { + PaladinContextSourceProvider, + PaladinContextSourceProvider$inboundSchema, + PaladinContextSourceProvider$outboundSchema, +} from "./paladincontextsourceprovider.js"; + +/** + * # PaladinContextSource Object + * + * @remarks + * ### Description + * A context source (a Slack channel or a document) that a Paladin is + * configured to read during access-request review. + */ +export type PaladinContextSource = { + /** + * The ID of the context source. + */ + id: string; + /** + * The ID of the Paladin this source belongs to. + */ + paladinId: string; + /** + * The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page. + */ + sourceKind: PaladinContextSourceKind; + /** + * The integration a Paladin context source comes from. + */ + thirdPartyProvider: PaladinContextSourceProvider; + /** + * The provider's identifier for the source. The Slack channel ID for a channel, or the Notion/Confluence page ID for a document. + */ + remoteId: string; + /** + * A human-readable name for the source. + */ + name: string; + /** + * A link to the source. + */ + url: string; +}; + +/** @internal */ +export const PaladinContextSource$inboundSchema: z.ZodType< + PaladinContextSource, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + paladin_id: z.string(), + source_kind: PaladinContextSourceKind$inboundSchema, + third_party_provider: PaladinContextSourceProvider$inboundSchema, + remote_id: z.string(), + name: z.string(), + url: z.string(), +}).transform((v) => { + return remap$(v, { + "paladin_id": "paladinId", + "source_kind": "sourceKind", + "third_party_provider": "thirdPartyProvider", + "remote_id": "remoteId", + }); +}); +/** @internal */ +export type PaladinContextSource$Outbound = { + id: string; + paladin_id: string; + source_kind: string; + third_party_provider: string; + remote_id: string; + name: string; + url: string; +}; + +/** @internal */ +export const PaladinContextSource$outboundSchema: z.ZodType< + PaladinContextSource$Outbound, + z.ZodTypeDef, + PaladinContextSource +> = z.object({ + id: z.string(), + paladinId: z.string(), + sourceKind: PaladinContextSourceKind$outboundSchema, + thirdPartyProvider: PaladinContextSourceProvider$outboundSchema, + remoteId: z.string(), + name: z.string(), + url: z.string(), +}).transform((v) => { + return remap$(v, { + paladinId: "paladin_id", + sourceKind: "source_kind", + thirdPartyProvider: "third_party_provider", + remoteId: "remote_id", + }); +}); + +export function paladinContextSourceToJSON( + paladinContextSource: PaladinContextSource, +): string { + return JSON.stringify( + PaladinContextSource$outboundSchema.parse(paladinContextSource), + ); +} +export function paladinContextSourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PaladinContextSource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PaladinContextSource' from JSON`, + ); +} diff --git a/src/models/components/paladincontextsourcekind.ts b/src/models/components/paladincontextsourcekind.ts new file mode 100644 index 00000000..6b275d39 --- /dev/null +++ b/src/models/components/paladincontextsourcekind.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page. + */ +export const PaladinContextSourceKind = { + SlackChannel: "SLACK_CHANNEL", + Document: "DOCUMENT", +} as const; +/** + * The kind of source a Paladin can read. A SLACK_CHANNEL is a Slack channel; a DOCUMENT is a Notion or Confluence page. + */ +export type PaladinContextSourceKind = ClosedEnum< + typeof PaladinContextSourceKind +>; + +/** @internal */ +export const PaladinContextSourceKind$inboundSchema: z.ZodNativeEnum< + typeof PaladinContextSourceKind +> = z.nativeEnum(PaladinContextSourceKind); +/** @internal */ +export const PaladinContextSourceKind$outboundSchema: z.ZodNativeEnum< + typeof PaladinContextSourceKind +> = PaladinContextSourceKind$inboundSchema; diff --git a/src/models/components/paladincontextsourcelist.ts b/src/models/components/paladincontextsourcelist.ts new file mode 100644 index 00000000..231c363b --- /dev/null +++ b/src/models/components/paladincontextsourcelist.ts @@ -0,0 +1,64 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PaladinContextSource, + PaladinContextSource$inboundSchema, + PaladinContextSource$Outbound, + PaladinContextSource$outboundSchema, +} from "./paladincontextsource.js"; + +/** + * # PaladinContextSourceList Object + * + * @remarks + * ### Description + * A list of `PaladinContextSource` objects. + */ +export type PaladinContextSourceList = { + results: Array; +}; + +/** @internal */ +export const PaladinContextSourceList$inboundSchema: z.ZodType< + PaladinContextSourceList, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(PaladinContextSource$inboundSchema), +}); +/** @internal */ +export type PaladinContextSourceList$Outbound = { + results: Array; +}; + +/** @internal */ +export const PaladinContextSourceList$outboundSchema: z.ZodType< + PaladinContextSourceList$Outbound, + z.ZodTypeDef, + PaladinContextSourceList +> = z.object({ + results: z.array(PaladinContextSource$outboundSchema), +}); + +export function paladinContextSourceListToJSON( + paladinContextSourceList: PaladinContextSourceList, +): string { + return JSON.stringify( + PaladinContextSourceList$outboundSchema.parse(paladinContextSourceList), + ); +} +export function paladinContextSourceListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PaladinContextSourceList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PaladinContextSourceList' from JSON`, + ); +} diff --git a/src/models/components/paladincontextsourceprovider.ts b/src/models/components/paladincontextsourceprovider.ts new file mode 100644 index 00000000..dad0c4b3 --- /dev/null +++ b/src/models/components/paladincontextsourceprovider.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The integration a Paladin context source comes from. + */ +export const PaladinContextSourceProvider = { + Slack: "SLACK", + Notion: "NOTION", + Confluence: "CONFLUENCE", +} as const; +/** + * The integration a Paladin context source comes from. + */ +export type PaladinContextSourceProvider = ClosedEnum< + typeof PaladinContextSourceProvider +>; + +/** @internal */ +export const PaladinContextSourceProvider$inboundSchema: z.ZodNativeEnum< + typeof PaladinContextSourceProvider +> = z.nativeEnum(PaladinContextSourceProvider); +/** @internal */ +export const PaladinContextSourceProvider$outboundSchema: z.ZodNativeEnum< + typeof PaladinContextSourceProvider +> = PaladinContextSourceProvider$inboundSchema; diff --git a/src/models/components/paladinlist.ts b/src/models/components/paladinlist.ts new file mode 100644 index 00000000..71a71bcc --- /dev/null +++ b/src/models/components/paladinlist.ts @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + Paladin, + Paladin$inboundSchema, + Paladin$Outbound, + Paladin$outboundSchema, +} from "./paladin.js"; + +/** + * # PaladinList Object + * + * @remarks + * ### Description + * A list of `Paladin` objects. + */ +export type PaladinList = { + results: Array; +}; + +/** @internal */ +export const PaladinList$inboundSchema: z.ZodType< + PaladinList, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(Paladin$inboundSchema), +}); +/** @internal */ +export type PaladinList$Outbound = { + results: Array; +}; + +/** @internal */ +export const PaladinList$outboundSchema: z.ZodType< + PaladinList$Outbound, + z.ZodTypeDef, + PaladinList +> = z.object({ + results: z.array(Paladin$outboundSchema), +}); + +export function paladinListToJSON(paladinList: PaladinList): string { + return JSON.stringify(PaladinList$outboundSchema.parse(paladinList)); +} +export function paladinListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PaladinList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PaladinList' from JSON`, + ); +} diff --git a/src/models/components/propagationstatus.ts b/src/models/components/propagationstatus.ts index 0ece451e..b1199899 100644 --- a/src/models/components/propagationstatus.ts +++ b/src/models/components/propagationstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -30,7 +30,6 @@ export const PropagationStatus$inboundSchema: z.ZodType< > = z.object({ status: PropagationStatusEnum$inboundSchema, }); - /** @internal */ export type PropagationStatus$Outbound = { status: string; @@ -45,19 +44,6 @@ export const PropagationStatus$outboundSchema: z.ZodType< status: PropagationStatusEnum$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PropagationStatus$ { - /** @deprecated use `PropagationStatus$inboundSchema` instead. */ - export const inboundSchema = PropagationStatus$inboundSchema; - /** @deprecated use `PropagationStatus$outboundSchema` instead. */ - export const outboundSchema = PropagationStatus$outboundSchema; - /** @deprecated use `PropagationStatus$Outbound` instead. */ - export type Outbound = PropagationStatus$Outbound; -} - export function propagationStatusToJSON( propagationStatus: PropagationStatus, ): string { @@ -65,7 +51,6 @@ export function propagationStatusToJSON( PropagationStatus$outboundSchema.parse(propagationStatus), ); } - export function propagationStatusFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/propagationstatusenum.ts b/src/models/components/propagationstatusenum.ts index fad44375..a793da83 100644 --- a/src/models/components/propagationstatusenum.ts +++ b/src/models/components/propagationstatusenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -30,6 +30,7 @@ export const PropagationStatusEnum = { ErrDryRunModeEnabled: "ERR_DRY_RUN_MODE_ENABLED", ErrHrIdpProviderNotLinked: "ERR_HR_IDP_PROVIDER_NOT_LINKED", ErrRemoteUnrecoverableError: "ERR_REMOTE_UNRECOVERABLE_ERROR", + ErrRemoteTicketNotFound: "ERR_REMOTE_TICKET_NOT_FOUND", } as const; /** * The status of whether the user has been synced to the group or resource in the remote system. @@ -40,19 +41,7 @@ export type PropagationStatusEnum = ClosedEnum; export const PropagationStatusEnum$inboundSchema: z.ZodNativeEnum< typeof PropagationStatusEnum > = z.nativeEnum(PropagationStatusEnum); - /** @internal */ export const PropagationStatusEnum$outboundSchema: z.ZodNativeEnum< typeof PropagationStatusEnum > = PropagationStatusEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PropagationStatusEnum$ { - /** @deprecated use `PropagationStatusEnum$inboundSchema` instead. */ - export const inboundSchema = PropagationStatusEnum$inboundSchema; - /** @deprecated use `PropagationStatusEnum$outboundSchema` instead. */ - export const outboundSchema = PropagationStatusEnum$outboundSchema; -} diff --git a/src/models/components/rdsengineenum.ts b/src/models/components/rdsengineenum.ts new file mode 100644 index 00000000..0151f159 --- /dev/null +++ b/src/models/components/rdsengineenum.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The database engine for the RDS instance. + */ +export const RDSEngineEnum = { + Mysql: "MYSQL", + Postgresql: "POSTGRESQL", +} as const; +/** + * The database engine for the RDS instance. + */ +export type RDSEngineEnum = ClosedEnum; + +/** @internal */ +export const RDSEngineEnum$inboundSchema: z.ZodNativeEnum< + typeof RDSEngineEnum +> = z.nativeEnum(RDSEngineEnum); +/** @internal */ +export const RDSEngineEnum$outboundSchema: z.ZodNativeEnum< + typeof RDSEngineEnum +> = RDSEngineEnum$inboundSchema; diff --git a/src/models/components/remoteuser.ts b/src/models/components/remoteuser.ts new file mode 100644 index 00000000..3a328562 --- /dev/null +++ b/src/models/components/remoteuser.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ThirdPartyProviderEnum, + ThirdPartyProviderEnum$inboundSchema, + ThirdPartyProviderEnum$outboundSchema, +} from "./thirdpartyproviderenum.js"; + +/** + * # RemoteUser Object + * + * @remarks + * ### Description + * The `RemoteUser` object is used to represent a remote user. + */ +export type RemoteUser = { + /** + * The ID of the user. + */ + userId: string; + /** + * The ID of the remote user. + */ + remoteId: string; + /** + * The third party provider of the remote user. + */ + thirdPartyProvider: ThirdPartyProviderEnum; +}; + +/** @internal */ +export const RemoteUser$inboundSchema: z.ZodType< + RemoteUser, + z.ZodTypeDef, + unknown +> = z.object({ + user_id: z.string(), + remote_id: z.string(), + third_party_provider: ThirdPartyProviderEnum$inboundSchema, +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + "remote_id": "remoteId", + "third_party_provider": "thirdPartyProvider", + }); +}); +/** @internal */ +export type RemoteUser$Outbound = { + user_id: string; + remote_id: string; + third_party_provider: string; +}; + +/** @internal */ +export const RemoteUser$outboundSchema: z.ZodType< + RemoteUser$Outbound, + z.ZodTypeDef, + RemoteUser +> = z.object({ + userId: z.string(), + remoteId: z.string(), + thirdPartyProvider: ThirdPartyProviderEnum$outboundSchema, +}).transform((v) => { + return remap$(v, { + userId: "user_id", + remoteId: "remote_id", + thirdPartyProvider: "third_party_provider", + }); +}); + +export function remoteUserToJSON(remoteUser: RemoteUser): string { + return JSON.stringify(RemoteUser$outboundSchema.parse(remoteUser)); +} +export function remoteUserFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RemoteUser$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RemoteUser' from JSON`, + ); +} diff --git a/src/models/components/request.ts b/src/models/components/request.ts index a2286148..2493f2ce 100644 --- a/src/models/components/request.ts +++ b/src/models/components/request.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -25,12 +25,23 @@ import { RequestItemStages$Outbound, RequestItemStages$outboundSchema, } from "./requestitemstages.js"; +import { + RequestReviewerStages, + RequestReviewerStages$inboundSchema, + RequestReviewerStages$Outbound, + RequestReviewerStages$outboundSchema, +} from "./requestreviewerstages.js"; import { RequestStatusEnum, RequestStatusEnum$inboundSchema, RequestStatusEnum$outboundSchema, } from "./requeststatusenum.js"; +/** + * The configured reviewer stages for every item in this request, or an error message if reviewers could not be loaded + */ +export type ReviewerStages = Array | string; + /** * # Request Object * @@ -95,10 +106,47 @@ export type RequestT = { customFieldsResponses?: Array | undefined; /** * The stages configuration for a request item + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ stages?: RequestItemStages | undefined; + /** + * The configured reviewer stages for every item in this request, or an error message if reviewers could not be loaded + */ + reviewerStages?: Array | string | undefined; }; +/** @internal */ +export const ReviewerStages$inboundSchema: z.ZodType< + ReviewerStages, + z.ZodTypeDef, + unknown +> = z.union([z.array(RequestReviewerStages$inboundSchema), z.string()]); +/** @internal */ +export type ReviewerStages$Outbound = + | Array + | string; + +/** @internal */ +export const ReviewerStages$outboundSchema: z.ZodType< + ReviewerStages$Outbound, + z.ZodTypeDef, + ReviewerStages +> = z.union([z.array(RequestReviewerStages$outboundSchema), z.string()]); + +export function reviewerStagesToJSON(reviewerStages: ReviewerStages): string { + return JSON.stringify(ReviewerStages$outboundSchema.parse(reviewerStages)); +} +export function reviewerStagesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ReviewerStages$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ReviewerStages' from JSON`, + ); +} + /** @internal */ export const RequestT$inboundSchema: z.ZodType< RequestT, @@ -118,6 +166,10 @@ export const RequestT$inboundSchema: z.ZodType< custom_fields_responses: z.array(RequestCustomFieldResponse$inboundSchema) .optional(), stages: RequestItemStages$inboundSchema.optional(), + reviewer_stages: z.union([ + z.array(RequestReviewerStages$inboundSchema), + z.string(), + ]).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -128,9 +180,9 @@ export const RequestT$inboundSchema: z.ZodType< "duration_minutes": "durationMinutes", "requested_items_list": "requestedItemsList", "custom_fields_responses": "customFieldsResponses", + "reviewer_stages": "reviewerStages", }); }); - /** @internal */ export type RequestT$Outbound = { id: string; @@ -147,6 +199,7 @@ export type RequestT$Outbound = { | Array | undefined; stages?: RequestItemStages$Outbound | undefined; + reviewer_stages?: Array | string | undefined; }; /** @internal */ @@ -168,6 +221,10 @@ export const RequestT$outboundSchema: z.ZodType< customFieldsResponses: z.array(RequestCustomFieldResponse$outboundSchema) .optional(), stages: RequestItemStages$outboundSchema.optional(), + reviewerStages: z.union([ + z.array(RequestReviewerStages$outboundSchema), + z.string(), + ]).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", @@ -178,26 +235,13 @@ export const RequestT$outboundSchema: z.ZodType< durationMinutes: "duration_minutes", requestedItemsList: "requested_items_list", customFieldsResponses: "custom_fields_responses", + reviewerStages: "reviewer_stages", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestT$ { - /** @deprecated use `RequestT$inboundSchema` instead. */ - export const inboundSchema = RequestT$inboundSchema; - /** @deprecated use `RequestT$outboundSchema` instead. */ - export const outboundSchema = RequestT$outboundSchema; - /** @deprecated use `RequestT$Outbound` instead. */ - export type Outbound = RequestT$Outbound; -} - export function requestToJSON(requestT: RequestT): string { return JSON.stringify(RequestT$outboundSchema.parse(requestT)); } - export function requestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requestapprovalenum.ts b/src/models/components/requestapprovalenum.ts new file mode 100644 index 00000000..1e06894c --- /dev/null +++ b/src/models/components/requestapprovalenum.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The decision level for the approval + */ +export const RequestApprovalEnum = { + Regular: "REGULAR", + Admin: "ADMIN", +} as const; +/** + * The decision level for the approval + */ +export type RequestApprovalEnum = ClosedEnum; + +/** @internal */ +export const RequestApprovalEnum$inboundSchema: z.ZodNativeEnum< + typeof RequestApprovalEnum +> = z.nativeEnum(RequestApprovalEnum); +/** @internal */ +export const RequestApprovalEnum$outboundSchema: z.ZodNativeEnum< + typeof RequestApprovalEnum +> = RequestApprovalEnum$inboundSchema; diff --git a/src/models/components/requestcomment.ts b/src/models/components/requestcomment.ts new file mode 100644 index 00000000..8ac529b2 --- /dev/null +++ b/src/models/components/requestcomment.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * # Request Comment Object + * + * @remarks + * ### Description + * The `RequestComment` object is used to represent a comment on a request. + * + * ### Usage Example + * Returned from the `GET Requests` endpoint as part of a `Request` object. + */ +export type RequestComment = { + /** + * The date and time the comment was created. + */ + createdAt: Date; + /** + * The unique identifier of the request the comment is associated with. + */ + requestId: string; + /** + * The unique identifier of the user who made the comment. + */ + userId: string; + /** + * The user's full name. + */ + userFullName?: string | undefined; + /** + * The user's email address. + */ + userEmail?: string | undefined; + /** + * The content of the comment. + */ + comment: string; +}; + +/** @internal */ +export const RequestComment$inboundSchema: z.ZodType< + RequestComment, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + request_id: z.string(), + user_id: z.string(), + user_full_name: z.string().optional(), + user_email: z.string().optional(), + comment: z.string(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "request_id": "requestId", + "user_id": "userId", + "user_full_name": "userFullName", + "user_email": "userEmail", + }); +}); +/** @internal */ +export type RequestComment$Outbound = { + created_at: string; + request_id: string; + user_id: string; + user_full_name?: string | undefined; + user_email?: string | undefined; + comment: string; +}; + +/** @internal */ +export const RequestComment$outboundSchema: z.ZodType< + RequestComment$Outbound, + z.ZodTypeDef, + RequestComment +> = z.object({ + createdAt: z.date().transform(v => v.toISOString()), + requestId: z.string(), + userId: z.string(), + userFullName: z.string().optional(), + userEmail: z.string().optional(), + comment: z.string(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + requestId: "request_id", + userId: "user_id", + userFullName: "user_full_name", + userEmail: "user_email", + }); +}); + +export function requestCommentToJSON(requestComment: RequestComment): string { + return JSON.stringify(RequestComment$outboundSchema.parse(requestComment)); +} +export function requestCommentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RequestComment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RequestComment' from JSON`, + ); +} diff --git a/src/models/components/requestcommentlist.ts b/src/models/components/requestcommentlist.ts new file mode 100644 index 00000000..e6b5270f --- /dev/null +++ b/src/models/components/requestcommentlist.ts @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + RequestComment, + RequestComment$inboundSchema, + RequestComment$Outbound, + RequestComment$outboundSchema, +} from "./requestcomment.js"; + +/** + * A paginated list of request comments + */ +export type RequestCommentList = { + comments: Array; +}; + +/** @internal */ +export const RequestCommentList$inboundSchema: z.ZodType< + RequestCommentList, + z.ZodTypeDef, + unknown +> = z.object({ + comments: z.array(RequestComment$inboundSchema), +}); +/** @internal */ +export type RequestCommentList$Outbound = { + comments: Array; +}; + +/** @internal */ +export const RequestCommentList$outboundSchema: z.ZodType< + RequestCommentList$Outbound, + z.ZodTypeDef, + RequestCommentList +> = z.object({ + comments: z.array(RequestComment$outboundSchema), +}); + +export function requestCommentListToJSON( + requestCommentList: RequestCommentList, +): string { + return JSON.stringify( + RequestCommentList$outboundSchema.parse(requestCommentList), + ); +} +export function requestCommentListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RequestCommentList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RequestCommentList' from JSON`, + ); +} diff --git a/src/models/components/requestconfiguration.ts b/src/models/components/requestconfiguration.ts index eb09b813..3085da24 100644 --- a/src/models/components/requestconfiguration.ts +++ b/src/models/components/requestconfiguration.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -66,6 +66,10 @@ export type RequestConfiguration = { * A bool representing whether or not access requests to the resource require an access ticket. */ requireSupportTicket: boolean; + /** + * The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. + */ + extensionsDurationInMinutes?: number | undefined; /** * The ID of the associated request template. */ @@ -93,6 +97,7 @@ export const RequestConfiguration$inboundSchema: z.ZodType< max_duration_minutes: z.number().int().optional(), recommended_duration_minutes: z.number().int().optional(), require_support_ticket: z.boolean(), + extensions_duration_in_minutes: z.number().int().optional(), request_template_id: z.string().optional(), reviewer_stages: z.array(ReviewerStage$inboundSchema).optional(), priority: z.number().int(), @@ -104,11 +109,11 @@ export const RequestConfiguration$inboundSchema: z.ZodType< "max_duration_minutes": "maxDurationMinutes", "recommended_duration_minutes": "recommendedDurationMinutes", "require_support_ticket": "requireSupportTicket", + "extensions_duration_in_minutes": "extensionsDurationInMinutes", "request_template_id": "requestTemplateId", "reviewer_stages": "reviewerStages", }); }); - /** @internal */ export type RequestConfiguration$Outbound = { condition?: Condition$Outbound | undefined; @@ -118,6 +123,7 @@ export type RequestConfiguration$Outbound = { max_duration_minutes?: number | undefined; recommended_duration_minutes?: number | undefined; require_support_ticket: boolean; + extensions_duration_in_minutes?: number | undefined; request_template_id?: string | undefined; reviewer_stages?: Array | undefined; priority: number; @@ -136,6 +142,7 @@ export const RequestConfiguration$outboundSchema: z.ZodType< maxDurationMinutes: z.number().int().optional(), recommendedDurationMinutes: z.number().int().optional(), requireSupportTicket: z.boolean(), + extensionsDurationInMinutes: z.number().int().optional(), requestTemplateId: z.string().optional(), reviewerStages: z.array(ReviewerStage$outboundSchema).optional(), priority: z.number().int(), @@ -147,24 +154,12 @@ export const RequestConfiguration$outboundSchema: z.ZodType< maxDurationMinutes: "max_duration_minutes", recommendedDurationMinutes: "recommended_duration_minutes", requireSupportTicket: "require_support_ticket", + extensionsDurationInMinutes: "extensions_duration_in_minutes", requestTemplateId: "request_template_id", reviewerStages: "reviewer_stages", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestConfiguration$ { - /** @deprecated use `RequestConfiguration$inboundSchema` instead. */ - export const inboundSchema = RequestConfiguration$inboundSchema; - /** @deprecated use `RequestConfiguration$outboundSchema` instead. */ - export const outboundSchema = RequestConfiguration$outboundSchema; - /** @deprecated use `RequestConfiguration$Outbound` instead. */ - export type Outbound = RequestConfiguration$Outbound; -} - export function requestConfigurationToJSON( requestConfiguration: RequestConfiguration, ): string { @@ -172,7 +167,6 @@ export function requestConfigurationToJSON( RequestConfiguration$outboundSchema.parse(requestConfiguration), ); } - export function requestConfigurationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requestconnection.ts b/src/models/components/requestconnection.ts index bda7b132..dd807afa 100644 --- a/src/models/components/requestconnection.ts +++ b/src/models/components/requestconnection.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -38,7 +38,6 @@ export const RequestConnection$inboundSchema: z.ZodType< pageInfo: PageInfo$inboundSchema, totalCount: z.number().int(), }); - /** @internal */ export type RequestConnection$Outbound = { edges: Array; @@ -57,19 +56,6 @@ export const RequestConnection$outboundSchema: z.ZodType< totalCount: z.number().int(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestConnection$ { - /** @deprecated use `RequestConnection$inboundSchema` instead. */ - export const inboundSchema = RequestConnection$inboundSchema; - /** @deprecated use `RequestConnection$outboundSchema` instead. */ - export const outboundSchema = RequestConnection$outboundSchema; - /** @deprecated use `RequestConnection$Outbound` instead. */ - export type Outbound = RequestConnection$Outbound; -} - export function requestConnectionToJSON( requestConnection: RequestConnection, ): string { @@ -77,7 +63,6 @@ export function requestConnectionToJSON( RequestConnection$outboundSchema.parse(requestConnection), ); } - export function requestConnectionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requestcustomfieldresponse.ts b/src/models/components/requestcustomfieldresponse.ts index 611e183c..f29f87cb 100644 --- a/src/models/components/requestcustomfieldresponse.ts +++ b/src/models/components/requestcustomfieldresponse.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -30,7 +30,6 @@ export const FieldValue$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.union([z.string(), z.boolean()]); - /** @internal */ export type FieldValue$Outbound = string | boolean; @@ -41,23 +40,9 @@ export const FieldValue$outboundSchema: z.ZodType< FieldValue > = z.union([z.string(), z.boolean()]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FieldValue$ { - /** @deprecated use `FieldValue$inboundSchema` instead. */ - export const inboundSchema = FieldValue$inboundSchema; - /** @deprecated use `FieldValue$outboundSchema` instead. */ - export const outboundSchema = FieldValue$outboundSchema; - /** @deprecated use `FieldValue$Outbound` instead. */ - export type Outbound = FieldValue$Outbound; -} - export function fieldValueToJSON(fieldValue: FieldValue): string { return JSON.stringify(FieldValue$outboundSchema.parse(fieldValue)); } - export function fieldValueFromJSON( jsonString: string, ): SafeParseResult { @@ -84,7 +69,6 @@ export const RequestCustomFieldResponse$inboundSchema: z.ZodType< "field_value": "fieldValue", }); }); - /** @internal */ export type RequestCustomFieldResponse$Outbound = { field_name: string; @@ -109,19 +93,6 @@ export const RequestCustomFieldResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestCustomFieldResponse$ { - /** @deprecated use `RequestCustomFieldResponse$inboundSchema` instead. */ - export const inboundSchema = RequestCustomFieldResponse$inboundSchema; - /** @deprecated use `RequestCustomFieldResponse$outboundSchema` instead. */ - export const outboundSchema = RequestCustomFieldResponse$outboundSchema; - /** @deprecated use `RequestCustomFieldResponse$Outbound` instead. */ - export type Outbound = RequestCustomFieldResponse$Outbound; -} - export function requestCustomFieldResponseToJSON( requestCustomFieldResponse: RequestCustomFieldResponse, ): string { @@ -129,7 +100,6 @@ export function requestCustomFieldResponseToJSON( RequestCustomFieldResponse$outboundSchema.parse(requestCustomFieldResponse), ); } - export function requestCustomFieldResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requestedge.ts b/src/models/components/requestedge.ts index 22cbc78e..79c7ff85 100644 --- a/src/models/components/requestedge.ts +++ b/src/models/components/requestedge.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -40,7 +40,6 @@ export const RequestEdge$inboundSchema: z.ZodType< node: RequestT$inboundSchema, cursor: z.string(), }); - /** @internal */ export type RequestEdge$Outbound = { node: RequestT$Outbound; @@ -57,23 +56,9 @@ export const RequestEdge$outboundSchema: z.ZodType< cursor: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestEdge$ { - /** @deprecated use `RequestEdge$inboundSchema` instead. */ - export const inboundSchema = RequestEdge$inboundSchema; - /** @deprecated use `RequestEdge$outboundSchema` instead. */ - export const outboundSchema = RequestEdge$outboundSchema; - /** @deprecated use `RequestEdge$Outbound` instead. */ - export type Outbound = RequestEdge$Outbound; -} - export function requestEdgeToJSON(requestEdge: RequestEdge): string { return JSON.stringify(RequestEdge$outboundSchema.parse(requestEdge)); } - export function requestEdgeFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requesteditem.ts b/src/models/components/requesteditem.ts index 11a3b1bd..e00e4b83 100644 --- a/src/models/components/requesteditem.ts +++ b/src/models/components/requesteditem.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -72,7 +72,6 @@ export const RequestedItem$inboundSchema: z.ZodType< "remote_name": "remoteName", }); }); - /** @internal */ export type RequestedItem$Outbound = { resource_id?: string | undefined; @@ -108,23 +107,9 @@ export const RequestedItem$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestedItem$ { - /** @deprecated use `RequestedItem$inboundSchema` instead. */ - export const inboundSchema = RequestedItem$inboundSchema; - /** @deprecated use `RequestedItem$outboundSchema` instead. */ - export const outboundSchema = RequestedItem$outboundSchema; - /** @deprecated use `RequestedItem$Outbound` instead. */ - export type Outbound = RequestedItem$Outbound; -} - export function requestedItemToJSON(requestedItem: RequestedItem): string { return JSON.stringify(RequestedItem$outboundSchema.parse(requestedItem)); } - export function requestedItemFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requestitemstages.ts b/src/models/components/requestitemstages.ts index 007d6a50..33544938 100644 --- a/src/models/components/requestitemstages.ts +++ b/src/models/components/requestitemstages.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -15,6 +15,8 @@ import { /** * The stages configuration for a request item + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. */ export type RequestItemStages = { /** @@ -41,7 +43,6 @@ export const RequestItemStages$inboundSchema: z.ZodType< requestedItemName: z.string(), stages: z.array(RequestStage$inboundSchema), }); - /** @internal */ export type RequestItemStages$Outbound = { requestedRoleName?: string | undefined; @@ -60,19 +61,6 @@ export const RequestItemStages$outboundSchema: z.ZodType< stages: z.array(RequestStage$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestItemStages$ { - /** @deprecated use `RequestItemStages$inboundSchema` instead. */ - export const inboundSchema = RequestItemStages$inboundSchema; - /** @deprecated use `RequestItemStages$outboundSchema` instead. */ - export const outboundSchema = RequestItemStages$outboundSchema; - /** @deprecated use `RequestItemStages$Outbound` instead. */ - export type Outbound = RequestItemStages$Outbound; -} - export function requestItemStagesToJSON( requestItemStages: RequestItemStages, ): string { @@ -80,7 +68,6 @@ export function requestItemStagesToJSON( RequestItemStages$outboundSchema.parse(requestItemStages), ); } - export function requestItemStagesFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requestlist.ts b/src/models/components/requestlist.ts index bfbc407e..3c435f73 100644 --- a/src/models/components/requestlist.ts +++ b/src/models/components/requestlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -43,7 +43,6 @@ export const RequestList$inboundSchema: z.ZodType< requests: z.array(RequestT$inboundSchema).optional(), cursor: z.string().optional(), }); - /** @internal */ export type RequestList$Outbound = { requests?: Array | undefined; @@ -60,23 +59,9 @@ export const RequestList$outboundSchema: z.ZodType< cursor: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestList$ { - /** @deprecated use `RequestList$inboundSchema` instead. */ - export const inboundSchema = RequestList$inboundSchema; - /** @deprecated use `RequestList$outboundSchema` instead. */ - export const outboundSchema = RequestList$outboundSchema; - /** @deprecated use `RequestList$Outbound` instead. */ - export type Outbound = RequestList$Outbound; -} - export function requestListToJSON(requestList: RequestList): string { return JSON.stringify(RequestList$outboundSchema.parse(requestList)); } - export function requestListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requestreviewer.ts b/src/models/components/requestreviewer.ts index f637bdf3..e3baaed6 100644 --- a/src/models/components/requestreviewer.ts +++ b/src/models/components/requestreviewer.ts @@ -2,7 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -29,6 +30,10 @@ export type RequestReviewer = { * The unique identifier of the reviewer */ id: string; + /** + * The user's full name. + */ + fullName?: string | undefined; /** * The status of this reviewer's review */ @@ -39,23 +44,11 @@ export type RequestReviewer = { export const RequestReviewerStatus$inboundSchema: z.ZodNativeEnum< typeof RequestReviewerStatus > = z.nativeEnum(RequestReviewerStatus); - /** @internal */ export const RequestReviewerStatus$outboundSchema: z.ZodNativeEnum< typeof RequestReviewerStatus > = RequestReviewerStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestReviewerStatus$ { - /** @deprecated use `RequestReviewerStatus$inboundSchema` instead. */ - export const inboundSchema = RequestReviewerStatus$inboundSchema; - /** @deprecated use `RequestReviewerStatus$outboundSchema` instead. */ - export const outboundSchema = RequestReviewerStatus$outboundSchema; -} - /** @internal */ export const RequestReviewer$inboundSchema: z.ZodType< RequestReviewer, @@ -63,12 +56,17 @@ export const RequestReviewer$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), + full_name: z.string().optional(), status: RequestReviewerStatus$inboundSchema, +}).transform((v) => { + return remap$(v, { + "full_name": "fullName", + }); }); - /** @internal */ export type RequestReviewer$Outbound = { id: string; + full_name?: string | undefined; status: string; }; @@ -79,28 +77,19 @@ export const RequestReviewer$outboundSchema: z.ZodType< RequestReviewer > = z.object({ id: z.string(), + fullName: z.string().optional(), status: RequestReviewerStatus$outboundSchema, +}).transform((v) => { + return remap$(v, { + fullName: "full_name", + }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestReviewer$ { - /** @deprecated use `RequestReviewer$inboundSchema` instead. */ - export const inboundSchema = RequestReviewer$inboundSchema; - /** @deprecated use `RequestReviewer$outboundSchema` instead. */ - export const outboundSchema = RequestReviewer$outboundSchema; - /** @deprecated use `RequestReviewer$Outbound` instead. */ - export type Outbound = RequestReviewer$Outbound; -} - export function requestReviewerToJSON( requestReviewer: RequestReviewer, ): string { return JSON.stringify(RequestReviewer$outboundSchema.parse(requestReviewer)); } - export function requestReviewerFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requestreviewerstages.ts b/src/models/components/requestreviewerstages.ts new file mode 100644 index 00000000..ebed97c3 --- /dev/null +++ b/src/models/components/requestreviewerstages.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + RequestStage, + RequestStage$inboundSchema, + RequestStage$Outbound, + RequestStage$outboundSchema, +} from "./requeststage.js"; + +/** + * The stages configuration for a request item + */ +export type RequestReviewerStages = { + /** + * The name of the access level requested. + */ + accessLevelName?: string | undefined; + /** + * The ID of the access level requested on the remote system. + */ + accessLevelRemoteId?: string | undefined; + /** + * The name of the requested item + */ + itemName: string; + /** + * The ID of the resource requested. + */ + itemId: string; + /** + * The stages of review for this request + */ + stages: Array; +}; + +/** @internal */ +export const RequestReviewerStages$inboundSchema: z.ZodType< + RequestReviewerStages, + z.ZodTypeDef, + unknown +> = z.object({ + access_level_name: z.string().optional(), + access_level_remote_id: z.string().optional(), + item_name: z.string(), + item_id: z.string(), + stages: z.array(RequestStage$inboundSchema), +}).transform((v) => { + return remap$(v, { + "access_level_name": "accessLevelName", + "access_level_remote_id": "accessLevelRemoteId", + "item_name": "itemName", + "item_id": "itemId", + }); +}); +/** @internal */ +export type RequestReviewerStages$Outbound = { + access_level_name?: string | undefined; + access_level_remote_id?: string | undefined; + item_name: string; + item_id: string; + stages: Array; +}; + +/** @internal */ +export const RequestReviewerStages$outboundSchema: z.ZodType< + RequestReviewerStages$Outbound, + z.ZodTypeDef, + RequestReviewerStages +> = z.object({ + accessLevelName: z.string().optional(), + accessLevelRemoteId: z.string().optional(), + itemName: z.string(), + itemId: z.string(), + stages: z.array(RequestStage$outboundSchema), +}).transform((v) => { + return remap$(v, { + accessLevelName: "access_level_name", + accessLevelRemoteId: "access_level_remote_id", + itemName: "item_name", + itemId: "item_id", + }); +}); + +export function requestReviewerStagesToJSON( + requestReviewerStages: RequestReviewerStages, +): string { + return JSON.stringify( + RequestReviewerStages$outboundSchema.parse(requestReviewerStages), + ); +} +export function requestReviewerStagesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RequestReviewerStages$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RequestReviewerStages' from JSON`, + ); +} diff --git a/src/models/components/requeststage.ts b/src/models/components/requeststage.ts index c502da8d..7486adfe 100644 --- a/src/models/components/requeststage.ts +++ b/src/models/components/requeststage.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -46,7 +46,6 @@ export const RequestStage$inboundSchema: z.ZodType< operator: ReviewStageOperator$inboundSchema, reviewers: z.array(RequestReviewer$inboundSchema), }); - /** @internal */ export type RequestStage$Outbound = { stage: number; @@ -65,23 +64,9 @@ export const RequestStage$outboundSchema: z.ZodType< reviewers: z.array(RequestReviewer$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestStage$ { - /** @deprecated use `RequestStage$inboundSchema` instead. */ - export const inboundSchema = RequestStage$inboundSchema; - /** @deprecated use `RequestStage$outboundSchema` instead. */ - export const outboundSchema = RequestStage$outboundSchema; - /** @deprecated use `RequestStage$Outbound` instead. */ - export type Outbound = RequestStage$Outbound; -} - export function requestStageToJSON(requestStage: RequestStage): string { return JSON.stringify(RequestStage$outboundSchema.parse(requestStage)); } - export function requestStageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/requeststatusenum.ts b/src/models/components/requeststatusenum.ts index fd9f8847..16285e1e 100644 --- a/src/models/components/requeststatusenum.ts +++ b/src/models/components/requeststatusenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -37,19 +37,7 @@ export type RequestStatusEnum = ClosedEnum; export const RequestStatusEnum$inboundSchema: z.ZodNativeEnum< typeof RequestStatusEnum > = z.nativeEnum(RequestStatusEnum); - /** @internal */ export const RequestStatusEnum$outboundSchema: z.ZodNativeEnum< typeof RequestStatusEnum > = RequestStatusEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestStatusEnum$ { - /** @deprecated use `RequestStatusEnum$inboundSchema` instead. */ - export const inboundSchema = RequestStatusEnum$inboundSchema; - /** @deprecated use `RequestStatusEnum$outboundSchema` instead. */ - export const outboundSchema = RequestStatusEnum$outboundSchema; -} diff --git a/src/models/components/requesttemplatecustomfieldtypeenum.ts b/src/models/components/requesttemplatecustomfieldtypeenum.ts index 47d95bf1..556c09dd 100644 --- a/src/models/components/requesttemplatecustomfieldtypeenum.ts +++ b/src/models/components/requesttemplatecustomfieldtypeenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -25,20 +25,7 @@ export type RequestTemplateCustomFieldTypeEnum = ClosedEnum< export const RequestTemplateCustomFieldTypeEnum$inboundSchema: z.ZodNativeEnum< typeof RequestTemplateCustomFieldTypeEnum > = z.nativeEnum(RequestTemplateCustomFieldTypeEnum); - /** @internal */ export const RequestTemplateCustomFieldTypeEnum$outboundSchema: z.ZodNativeEnum< typeof RequestTemplateCustomFieldTypeEnum > = RequestTemplateCustomFieldTypeEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestTemplateCustomFieldTypeEnum$ { - /** @deprecated use `RequestTemplateCustomFieldTypeEnum$inboundSchema` instead. */ - export const inboundSchema = RequestTemplateCustomFieldTypeEnum$inboundSchema; - /** @deprecated use `RequestTemplateCustomFieldTypeEnum$outboundSchema` instead. */ - export const outboundSchema = - RequestTemplateCustomFieldTypeEnum$outboundSchema; -} diff --git a/src/models/components/resource.ts b/src/models/components/resource.ts index f40c2b9e..97b3e667 100644 --- a/src/models/components/resource.ts +++ b/src/models/components/resource.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; @@ -30,6 +30,12 @@ import { RiskSensitivityEnum$inboundSchema, RiskSensitivityEnum$outboundSchema, } from "./risksensitivityenum.js"; +import { + SyncTask, + SyncTask$inboundSchema, + SyncTask$Outbound, + SyncTask$outboundSchema, +} from "./synctask.js"; import { TicketPropagationConfiguration, TicketPropagationConfiguration$inboundSchema, @@ -106,6 +112,10 @@ export type Resource = { * The recommended duration for which the resource should be requested (in minutes). -1 represents an indefinite duration. */ recommendedDuration?: number | undefined; + /** + * The duration for which access can be extended (in minutes). Set to 0 to disable extensions. When > 0, extensions are enabled for the specified duration. + */ + extensionsDurationInMinutes?: number | undefined; /** * A bool representing whether or not access requests to the resource require manager approval. * @@ -189,29 +199,29 @@ export type Resource = { * List of resource IDs that are descendants of this resource. */ descendantResourceIds?: Array | undefined; + /** + * A bool representing whether or not the resource's name is synced from the end system. When true, the name is overwritten with the remote name on each sync. Defaults to false. + */ + matchRemoteName?: boolean | undefined; + /** + * A bool representing whether or not the resource's description is synced from the end system. When true, the description is overwritten with the remote description on each sync. Defaults to false. + */ + matchRemoteDescription?: boolean | undefined; + /** + * Represents a sync task that has been completed, either successfully or with errors. + */ + lastSuccessfulSync?: SyncTask | undefined; }; /** @internal */ export const ResourceRiskSensitivity$inboundSchema: z.ZodNativeEnum< typeof ResourceRiskSensitivity > = z.nativeEnum(ResourceRiskSensitivity); - /** @internal */ export const ResourceRiskSensitivity$outboundSchema: z.ZodNativeEnum< typeof ResourceRiskSensitivity > = ResourceRiskSensitivity$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceRiskSensitivity$ { - /** @deprecated use `ResourceRiskSensitivity$inboundSchema` instead. */ - export const inboundSchema = ResourceRiskSensitivity$inboundSchema; - /** @deprecated use `ResourceRiskSensitivity$outboundSchema` instead. */ - export const outboundSchema = ResourceRiskSensitivity$outboundSchema; -} - /** @internal */ export const Resource$inboundSchema: z.ZodType< Resource, @@ -228,6 +238,7 @@ export const Resource$inboundSchema: z.ZodType< resource_type: ResourceTypeEnum$inboundSchema.optional(), max_duration: z.number().int().optional(), recommended_duration: z.number().int().optional(), + extensions_duration_in_minutes: z.number().int().optional(), require_manager_approval: z.boolean().optional(), require_support_ticket: z.boolean().optional(), require_mfa_to_approve: z.boolean().optional(), @@ -250,6 +261,9 @@ export const Resource$inboundSchema: z.ZodType< remote_info: ResourceRemoteInfo$inboundSchema.optional(), ancestor_resource_ids: z.array(z.string()).optional(), descendant_resource_ids: z.array(z.string()).optional(), + match_remote_name: z.boolean().optional(), + match_remote_description: z.boolean().optional(), + last_successful_sync: SyncTask$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "resource_id": "resourceId", @@ -260,6 +274,7 @@ export const Resource$inboundSchema: z.ZodType< "resource_type": "resourceType", "max_duration": "maxDuration", "recommended_duration": "recommendedDuration", + "extensions_duration_in_minutes": "extensionsDurationInMinutes", "require_manager_approval": "requireManagerApproval", "require_support_ticket": "requireSupportTicket", "require_mfa_to_approve": "requireMfaToApprove", @@ -279,9 +294,11 @@ export const Resource$inboundSchema: z.ZodType< "remote_info": "remoteInfo", "ancestor_resource_ids": "ancestorResourceIds", "descendant_resource_ids": "descendantResourceIds", + "match_remote_name": "matchRemoteName", + "match_remote_description": "matchRemoteDescription", + "last_successful_sync": "lastSuccessfulSync", }); }); - /** @internal */ export type Resource$Outbound = { resource_id: string; @@ -294,6 +311,7 @@ export type Resource$Outbound = { resource_type?: string | undefined; max_duration?: number | undefined; recommended_duration?: number | undefined; + extensions_duration_in_minutes?: number | undefined; require_manager_approval?: boolean | undefined; require_support_ticket?: boolean | undefined; require_mfa_to_approve?: boolean | undefined; @@ -314,6 +332,9 @@ export type Resource$Outbound = { remote_info?: ResourceRemoteInfo$Outbound | undefined; ancestor_resource_ids?: Array | undefined; descendant_resource_ids?: Array | undefined; + match_remote_name?: boolean | undefined; + match_remote_description?: boolean | undefined; + last_successful_sync?: SyncTask$Outbound | undefined; }; /** @internal */ @@ -332,6 +353,7 @@ export const Resource$outboundSchema: z.ZodType< resourceType: ResourceTypeEnum$outboundSchema.optional(), maxDuration: z.number().int().optional(), recommendedDuration: z.number().int().optional(), + extensionsDurationInMinutes: z.number().int().optional(), requireManagerApproval: z.boolean().optional(), requireSupportTicket: z.boolean().optional(), requireMfaToApprove: z.boolean().optional(), @@ -354,6 +376,9 @@ export const Resource$outboundSchema: z.ZodType< remoteInfo: ResourceRemoteInfo$outboundSchema.optional(), ancestorResourceIds: z.array(z.string()).optional(), descendantResourceIds: z.array(z.string()).optional(), + matchRemoteName: z.boolean().optional(), + matchRemoteDescription: z.boolean().optional(), + lastSuccessfulSync: SyncTask$outboundSchema.optional(), }).transform((v) => { return remap$(v, { resourceId: "resource_id", @@ -364,6 +389,7 @@ export const Resource$outboundSchema: z.ZodType< resourceType: "resource_type", maxDuration: "max_duration", recommendedDuration: "recommended_duration", + extensionsDurationInMinutes: "extensions_duration_in_minutes", requireManagerApproval: "require_manager_approval", requireSupportTicket: "require_support_ticket", requireMfaToApprove: "require_mfa_to_approve", @@ -383,26 +409,15 @@ export const Resource$outboundSchema: z.ZodType< remoteInfo: "remote_info", ancestorResourceIds: "ancestor_resource_ids", descendantResourceIds: "descendant_resource_ids", + matchRemoteName: "match_remote_name", + matchRemoteDescription: "match_remote_description", + lastSuccessfulSync: "last_successful_sync", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Resource$ { - /** @deprecated use `Resource$inboundSchema` instead. */ - export const inboundSchema = Resource$inboundSchema; - /** @deprecated use `Resource$outboundSchema` instead. */ - export const outboundSchema = Resource$outboundSchema; - /** @deprecated use `Resource$Outbound` instead. */ - export type Outbound = Resource$Outbound; -} - export function resourceToJSON(resource: Resource): string { return JSON.stringify(Resource$outboundSchema.parse(resource)); } - export function resourceFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/resourceaccesslevel.ts b/src/models/components/resourceaccesslevel.ts index 8d85b3c6..9bfe2234 100644 --- a/src/models/components/resourceaccesslevel.ts +++ b/src/models/components/resourceaccesslevel.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -44,7 +44,6 @@ export const ResourceAccessLevel$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type ResourceAccessLevel$Outbound = { access_level_name: string; @@ -66,19 +65,6 @@ export const ResourceAccessLevel$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceAccessLevel$ { - /** @deprecated use `ResourceAccessLevel$inboundSchema` instead. */ - export const inboundSchema = ResourceAccessLevel$inboundSchema; - /** @deprecated use `ResourceAccessLevel$outboundSchema` instead. */ - export const outboundSchema = ResourceAccessLevel$outboundSchema; - /** @deprecated use `ResourceAccessLevel$Outbound` instead. */ - export type Outbound = ResourceAccessLevel$Outbound; -} - export function resourceAccessLevelToJSON( resourceAccessLevel: ResourceAccessLevel, ): string { @@ -86,7 +72,6 @@ export function resourceAccessLevelToJSON( ResourceAccessLevel$outboundSchema.parse(resourceAccessLevel), ); } - export function resourceAccessLevelFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/resourceaccessuser.ts b/src/models/components/resourceaccessuser.ts index d48b49e7..0177e59c 100644 --- a/src/models/components/resourceaccessuser.ts +++ b/src/models/components/resourceaccessuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -35,6 +35,14 @@ export type ResourceAccessUser = { * The ID of the resource. */ resourceId: string; + /** + * The name of the resource. + */ + resourceName?: string | undefined; + /** + * The description of the resource. + */ + description?: string | undefined; /** * The ID of the user. */ @@ -84,6 +92,8 @@ export const ResourceAccessUser$inboundSchema: z.ZodType< unknown > = z.object({ resource_id: z.string(), + resource_name: z.string().optional(), + description: z.string().optional(), user_id: z.string(), access_level: ResourceAccessLevel$inboundSchema, full_name: z.string(), @@ -97,6 +107,7 @@ export const ResourceAccessUser$inboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { "resource_id": "resourceId", + "resource_name": "resourceName", "user_id": "userId", "access_level": "accessLevel", "full_name": "fullName", @@ -106,10 +117,11 @@ export const ResourceAccessUser$inboundSchema: z.ZodType< "propagation_status": "propagationStatus", }); }); - /** @internal */ export type ResourceAccessUser$Outbound = { resource_id: string; + resource_name?: string | undefined; + description?: string | undefined; user_id: string; access_level: ResourceAccessLevel$Outbound; full_name: string; @@ -127,6 +139,8 @@ export const ResourceAccessUser$outboundSchema: z.ZodType< ResourceAccessUser > = z.object({ resourceId: z.string(), + resourceName: z.string().optional(), + description: z.string().optional(), userId: z.string(), accessLevel: ResourceAccessLevel$outboundSchema, fullName: z.string(), @@ -139,6 +153,7 @@ export const ResourceAccessUser$outboundSchema: z.ZodType< }).transform((v) => { return remap$(v, { resourceId: "resource_id", + resourceName: "resource_name", userId: "user_id", accessLevel: "access_level", fullName: "full_name", @@ -149,19 +164,6 @@ export const ResourceAccessUser$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceAccessUser$ { - /** @deprecated use `ResourceAccessUser$inboundSchema` instead. */ - export const inboundSchema = ResourceAccessUser$inboundSchema; - /** @deprecated use `ResourceAccessUser$outboundSchema` instead. */ - export const outboundSchema = ResourceAccessUser$outboundSchema; - /** @deprecated use `ResourceAccessUser$Outbound` instead. */ - export type Outbound = ResourceAccessUser$Outbound; -} - export function resourceAccessUserToJSON( resourceAccessUser: ResourceAccessUser, ): string { @@ -169,7 +171,6 @@ export function resourceAccessUserToJSON( ResourceAccessUser$outboundSchema.parse(resourceAccessUser), ); } - export function resourceAccessUserFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/resourceaccessuserlist.ts b/src/models/components/resourceaccessuserlist.ts index 0e4b0bb5..cdd74941 100644 --- a/src/models/components/resourceaccessuserlist.ts +++ b/src/models/components/resourceaccessuserlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -14,6 +14,14 @@ import { } from "./resourceaccessuser.js"; export type ResourceAccessUserList = { + /** + * The cursor with which to continue pagination if additional result pages exist. + */ + next?: string | null | undefined; + /** + * The cursor used to obtain the current result page. + */ + previous?: string | null | undefined; results?: Array | undefined; }; @@ -23,11 +31,14 @@ export const ResourceAccessUserList$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), results: z.array(ResourceAccessUser$inboundSchema).optional(), }); - /** @internal */ export type ResourceAccessUserList$Outbound = { + next?: string | null | undefined; + previous?: string | null | undefined; results?: Array | undefined; }; @@ -37,22 +48,11 @@ export const ResourceAccessUserList$outboundSchema: z.ZodType< z.ZodTypeDef, ResourceAccessUserList > = z.object({ + next: z.nullable(z.string()).optional(), + previous: z.nullable(z.string()).optional(), results: z.array(ResourceAccessUser$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceAccessUserList$ { - /** @deprecated use `ResourceAccessUserList$inboundSchema` instead. */ - export const inboundSchema = ResourceAccessUserList$inboundSchema; - /** @deprecated use `ResourceAccessUserList$outboundSchema` instead. */ - export const outboundSchema = ResourceAccessUserList$outboundSchema; - /** @deprecated use `ResourceAccessUserList$Outbound` instead. */ - export type Outbound = ResourceAccessUserList$Outbound; -} - export function resourceAccessUserListToJSON( resourceAccessUserList: ResourceAccessUserList, ): string { @@ -60,7 +60,6 @@ export function resourceAccessUserListToJSON( ResourceAccessUserList$outboundSchema.parse(resourceAccessUserList), ); } - export function resourceAccessUserListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/resourcenhi.ts b/src/models/components/resourcenhi.ts index 77f7aa69..cc84352e 100644 --- a/src/models/components/resourcenhi.ts +++ b/src/models/components/resourcenhi.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -68,7 +68,6 @@ export const ResourceNHI$inboundSchema: z.ZodType< "expiration_date": "expirationDate", }); }); - /** @internal */ export type ResourceNHI$Outbound = { resource_id: string; @@ -97,23 +96,9 @@ export const ResourceNHI$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceNHI$ { - /** @deprecated use `ResourceNHI$inboundSchema` instead. */ - export const inboundSchema = ResourceNHI$inboundSchema; - /** @deprecated use `ResourceNHI$outboundSchema` instead. */ - export const outboundSchema = ResourceNHI$outboundSchema; - /** @deprecated use `ResourceNHI$Outbound` instead. */ - export type Outbound = ResourceNHI$Outbound; -} - export function resourceNHIToJSON(resourceNHI: ResourceNHI): string { return JSON.stringify(ResourceNHI$outboundSchema.parse(resourceNHI)); } - export function resourceNHIFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/resourceremoteinfo.ts b/src/models/components/resourceremoteinfo.ts index b271ff3a..f19adca9 100644 --- a/src/models/components/resourceremoteinfo.ts +++ b/src/models/components/resourceremoteinfo.ts @@ -2,11 +2,160 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + RDSEngineEnum, + RDSEngineEnum$inboundSchema, + RDSEngineEnum$outboundSchema, +} from "./rdsengineenum.js"; + +/** + * Remote info for Databricks account service principal. + */ +export type DatabricksAccountServicePrincipal = { + /** + * The application ID of the service principal. + */ + applicationId: string; + /** + * The resource ID of the service principal. + */ + resourceId: string; +}; + +/** + * Remote info for Azure subscription. + */ +export type AzureSubscription = { + /** + * The ARM resource ID of the subscription. + */ + resourceId: string; +}; + +/** + * Remote info for Azure resource group. + */ +export type AzureResourceGroup = { + /** + * The ARM resource ID of the resource group. + */ + resourceId: string; +}; + +/** + * Remote info for Azure management group. + */ +export type AzureManagementGroup = { + /** + * The ARM resource ID of the management group. + */ + resourceId: string; +}; + +/** + * Remote info for Azure virtual machine. + */ +export type AzureVirtualMachine = { + /** + * The ARM resource ID of the virtual machine. + */ + resourceId: string; +}; + +/** + * Remote info for Azure storage account. + */ +export type AzureStorageAccount = { + /** + * The ARM resource ID of the storage account. + */ + resourceId: string; +}; + +/** + * Remote info for Azure storage container. + */ +export type AzureStorageContainer = { + /** + * The ARM resource ID of the storage container. + */ + resourceId: string; +}; + +/** + * Remote info for Azure SQL server. + */ +export type AzureSqlServer = { + /** + * The ARM resource ID of the SQL server. + */ + resourceId: string; +}; + +/** + * Remote info for Azure SQL database. + */ +export type AzureSqlDatabase = { + /** + * The ARM resource ID of the SQL database. + */ + resourceId: string; +}; + +/** + * Remote info for Azure SQL managed instance. + */ +export type AzureSqlManagedInstance = { + /** + * The ARM resource ID of the SQL managed instance. + */ + resourceId: string; +}; + +/** + * Remote info for Azure SQL managed database. + */ +export type AzureSqlManagedDatabase = { + /** + * The ARM resource ID of the SQL managed database. + */ + resourceId: string; +}; + +/** + * Remote info for Azure user assigned managed identity. + */ +export type AzureUserAssignedManagedIdentity = { + /** + * The ARM resource ID of the user assigned managed identity. + */ + resourceId: string; +}; + +/** + * Remote info for Azure Enterprise App. + */ +export type AzureEnterpriseApp = { + /** + * The remote application identifier (service principal or application object ID). + */ + resourceId: string; +}; + +/** + * Remote info for Azure Entra ID role. + */ +export type AzureEntraIdRole = { + /** + * The remote role identifier from Entra (object ID). + */ + resourceId: string; +}; /** * Remote info for AWS organizational unit. @@ -82,6 +231,33 @@ export type AwsEc2Instance = { accountId?: string | undefined; }; +/** + * Remote info for AWS RDS cluster. + */ +export type AwsRdsCluster = { + /** + * The clusterId of the RDS cluster. + */ + clusterId: string; + /** + * The region of the RDS cluster. + */ + region: string; + /** + * The resourceId of the RDS cluster. + */ + resourceId: string; + /** + * The id of the AWS account. Required for AWS Organizations. + */ + accountId: string; + /** + * The name of the database in the RDS cluster. This can be the value of the tag `opal:database-name` or the database name. + */ + databaseName: string; + engine: RDSEngineEnum; +}; + /** * Remote info for AWS RDS instance. */ @@ -288,6 +464,44 @@ export type GithubRepo = { * The name of the repository. */ repoName: string; + /** + * GitHub repo's org name, required only for Enterprise. + */ + orgName?: string | undefined; +}; + +/** + * Remote info for GitHub organization role. + */ +export type GithubOrgRole = { + /** + * The id of the role. + */ + roleId: string; + /** + * GitHub org role's org name, required only for Enterprise. + */ + orgName?: string | undefined; +}; + +/** + * Remote info for GitHub organization. + */ +export type GithubOrg = { + /** + * The name of the organization. + */ + orgName: string; +}; + +/** + * Remote info for GitHub Enterprise role. + */ +export type GithubEnterpriseRole = { + /** + * The id of the role. + */ + roleId: string; }; /** @@ -330,6 +544,78 @@ export type OktaCustomRole = { roleId: string; }; +/** + * Remote info for Snowflake database. + */ +export type SnowflakeDatabase = { + /** + * The name of the database. + */ + databaseName: string; +}; + +/** + * Remote info for Snowflake schema. + */ +export type SnowflakeSchema = { + /** + * The name of the database the schema is in. + */ + databaseName: string; + /** + * The name of the schema. + */ + schemaName: string; +}; + +/** + * Remote info for Snowflake table. + */ +export type SnowflakeTable = { + /** + * The name of the database the table is in. + */ + databaseName: string; + /** + * The name of the schema the table is in. + */ + schemaName: string; + /** + * The name of the table. + */ + tableName: string; +}; + +/** + * Remote info for iLevel Advanced role. + */ +export type IlevelAdvancedRole = { + /** + * The name of the role. + */ + roleName: string; +}; + +/** + * Remote info for Tailscale SSH tag. + */ +export type TailscaleSsh = { + /** + * The name of the tag. + */ + tagName: string; +}; + +/** + * Remote info for Twingate resource. + */ +export type TwingateResource = { + /** + * The id of the Twingate resource. + */ + resourceId: string; +}; + /** * Remote info for Pagerduty role. */ @@ -340,6 +626,16 @@ export type PagerdutyRole = { roleName: string; }; +/** + * Remote info for Workday role. + */ +export type WorkdayRole = { + /** + * The id of the role. + */ + roleId: string; +}; + /** * Remote info for Salesforce permission set. */ @@ -364,6 +660,16 @@ export type SalesforceProfile = { userLicenseId: string; }; +/** + * Remote info for Docusign permission profile. + */ +export type DocusignPermissionProfile = { + /** + * The ID of the Docusign permission profile. + */ + permissionProfileId: string; +}; + /** * Remote info for Salesforce role. */ @@ -385,41 +691,333 @@ export type TeleportRole = { }; /** - * Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields. + * Remote info for an Astra role. */ -export type ResourceRemoteInfo = { +export type DatastaxAstraRole = { /** - * Remote info for AWS organizational unit. + * The id of the role. */ - awsOrganizationalUnit?: AwsOrganizationalUnit | undefined; + roleId: string; +}; + +/** + * Remote info for Coupa role. + */ +export type CoupaRole = { /** - * Remote info for AWS account. + * The id of the role. */ - awsAccount?: AwsAccount | undefined; + roleId: string; +}; + +/** + * Remote info for a Cursor organization. + */ +export type CursorOrganization = { /** - * Remote info for AWS Identity Center permission set. + * The id of the organization. */ - awsPermissionSet?: AwsPermissionSet | undefined; + orgId: string; +}; + +/** + * Remote info for OpenAI Platform project. + */ +export type OpenaiPlatformProject = { /** - * Remote info for AWS IAM role. + * The id of the project. */ - awsIamRole?: AwsIamRole | undefined; + projectId: string; +}; + +/** + * Remote info for OpenAI Platform service account. + */ +export type OpenaiPlatformServiceAccount = { /** - * Remote info for AWS EC2 instance. + * The id of the project for the service account. */ - awsEc2Instance?: AwsEc2Instance | undefined; + projectId: string; /** - * Remote info for AWS RDS instance. + * The id of the service account. */ - awsRdsInstance?: AwsRdsInstance | undefined; + serviceAccountId: string; +}; + +/** + * Remote info for Anthropic workspace. + */ +export type AnthropicWorkspace = { /** - * Remote info for AWS EKS cluster. + * The id of the workspace. */ - awsEksCluster?: AwsEksCluster | undefined; + workspaceId: string; +}; + +/** + * Remote info for Oracle Fusion role. + */ +export type OracleFusionRole = { /** - * Remote info for a custom connector resource. + * The id of the role. */ - customConnector?: CustomConnector | undefined; + roleId: string; +}; + +/** + * Remote info for Devin organization. + */ +export type DevinOrganization = { + /** + * The id of the organization. + */ + orgId: string; +}; + +/** + * Remote info for Devin role. + */ +export type DevinRole = { + /** + * The id of the role. + */ + roleId: string; +}; + +/** + * Remote info for NetSuite role. + */ +export type NetsuiteRole = { + /** + * The id of the role. + */ + roleId: string; +}; + +/** + * Remote info for Datadog role. + */ +export type DatadogRole = { + /** + * The id of the role. + */ + roleId: string; +}; + +/** + * Remote info for ClickHouse database. + */ +export type ClickhouseDatabase = { + /** + * The name of the ClickHouse database. + */ + databaseName: string; +}; + +/** + * Remote info for ClickHouse table. + */ +export type ClickhouseTable = { + /** + * The name of the ClickHouse database containing the table. + */ + databaseName: string; + /** + * The name of the ClickHouse table. + */ + tableName: string; +}; + +/** + * Remote info for Grafana folder. + */ +export type GrafanaFolder = { + /** + * The UID of the Grafana folder. + */ + folderUid: string; +}; + +/** + * Remote info for Grafana dashboard. + */ +export type GrafanaDashboard = { + /** + * The UID of the Grafana dashboard. + */ + dashboardUid: string; +}; + +/** + * Remote info for Grafana role(fixed or custom). + */ +export type GrafanaRole = { + /** + * The UID of the Grafana role. + */ + roleUid: string; +}; + +/** + * Remote info for Zendesk custom role. + */ +export type ZendeskRole = { + /** + * The ID of the Zendesk custom role. + */ + roleId: string; +}; + +/** + * Remote info for HubSpot role. + */ +export type HubspotRole = { + /** + * The ID of the HubSpot role. + */ + roleId: string; +}; + +/** + * Remote info for AliCloud RAM role. + */ +export type AlicloudRamRole = { + /** + * The ARN of the AliCloud RAM role. + */ + roleArn: string; +}; + +/** + * Remote info for AliCloud ECS instance. + */ +export type AlicloudEcsInstance = { + /** + * The ID of the ECS instance. + */ + instanceId: string; +}; + +/** + * Remote info for Zoom role. + */ +export type ZoomRole = { + /** + * The ID of the Zoom role. + */ + roleId: string; +}; + +/** + * Remote info for Zoom license (user type). + */ +export type ZoomLicense = { + /** + * The Zoom user type representing the license (e.g. "2" for Licensed). + */ + licenseType: string; +}; + +/** + * Information that defines the remote resource. This replaces the deprecated remote_id and metadata fields. + */ +export type ResourceRemoteInfo = { + /** + * Remote info for Databricks account service principal. + */ + databricksAccountServicePrincipal?: + | DatabricksAccountServicePrincipal + | undefined; + /** + * Remote info for Azure subscription. + */ + azureSubscription?: AzureSubscription | undefined; + /** + * Remote info for Azure resource group. + */ + azureResourceGroup?: AzureResourceGroup | undefined; + /** + * Remote info for Azure management group. + */ + azureManagementGroup?: AzureManagementGroup | undefined; + /** + * Remote info for Azure virtual machine. + */ + azureVirtualMachine?: AzureVirtualMachine | undefined; + /** + * Remote info for Azure storage account. + */ + azureStorageAccount?: AzureStorageAccount | undefined; + /** + * Remote info for Azure storage container. + */ + azureStorageContainer?: AzureStorageContainer | undefined; + /** + * Remote info for Azure SQL server. + */ + azureSqlServer?: AzureSqlServer | undefined; + /** + * Remote info for Azure SQL database. + */ + azureSqlDatabase?: AzureSqlDatabase | undefined; + /** + * Remote info for Azure SQL managed instance. + */ + azureSqlManagedInstance?: AzureSqlManagedInstance | undefined; + /** + * Remote info for Azure SQL managed database. + */ + azureSqlManagedDatabase?: AzureSqlManagedDatabase | undefined; + /** + * Remote info for Azure user assigned managed identity. + */ + azureUserAssignedManagedIdentity?: + | AzureUserAssignedManagedIdentity + | undefined; + /** + * Remote info for Azure Enterprise App. + */ + azureEnterpriseApp?: AzureEnterpriseApp | undefined; + /** + * Remote info for Azure Entra ID role. + */ + azureEntraIdRole?: AzureEntraIdRole | undefined; + /** + * Remote info for AWS organizational unit. + */ + awsOrganizationalUnit?: AwsOrganizationalUnit | undefined; + /** + * Remote info for AWS account. + */ + awsAccount?: AwsAccount | undefined; + /** + * Remote info for AWS Identity Center permission set. + */ + awsPermissionSet?: AwsPermissionSet | undefined; + /** + * Remote info for AWS IAM role. + */ + awsIamRole?: AwsIamRole | undefined; + /** + * Remote info for AWS EC2 instance. + */ + awsEc2Instance?: AwsEc2Instance | undefined; + /** + * Remote info for AWS RDS cluster. + */ + awsRdsCluster?: AwsRdsCluster | undefined; + /** + * Remote info for AWS RDS instance. + */ + awsRdsInstance?: AwsRdsInstance | undefined; + /** + * Remote info for AWS EKS cluster. + */ + awsEksCluster?: AwsEksCluster | undefined; + /** + * Remote info for a custom connector resource. + */ + customConnector?: CustomConnector | undefined; /** * Remote info for GCP organization. */ @@ -468,6 +1066,18 @@ export type ResourceRemoteInfo = { * Remote info for GitHub repository. */ githubRepo?: GithubRepo | undefined; + /** + * Remote info for GitHub organization role. + */ + githubOrgRole?: GithubOrgRole | undefined; + /** + * Remote info for GitHub organization. + */ + githubOrg?: GithubOrg | undefined; + /** + * Remote info for GitHub Enterprise role. + */ + githubEnterpriseRole?: GithubEnterpriseRole | undefined; /** * Remote info for Gitlab project. */ @@ -484,10 +1094,38 @@ export type ResourceRemoteInfo = { * Remote info for Okta directory custom role. */ oktaCustomRole?: OktaCustomRole | undefined; + /** + * Remote info for Snowflake database. + */ + snowflakeDatabase?: SnowflakeDatabase | undefined; + /** + * Remote info for Snowflake schema. + */ + snowflakeSchema?: SnowflakeSchema | undefined; + /** + * Remote info for Snowflake table. + */ + snowflakeTable?: SnowflakeTable | undefined; + /** + * Remote info for iLevel Advanced role. + */ + ilevelAdvancedRole?: IlevelAdvancedRole | undefined; + /** + * Remote info for Tailscale SSH tag. + */ + tailscaleSsh?: TailscaleSsh | undefined; + /** + * Remote info for Twingate resource. + */ + twingateResource?: TwingateResource | undefined; /** * Remote info for Pagerduty role. */ pagerdutyRole?: PagerdutyRole | undefined; + /** + * Remote info for Workday role. + */ + workdayRole?: WorkdayRole | undefined; /** * Remote info for Salesforce permission set. */ @@ -496,6 +1134,10 @@ export type ResourceRemoteInfo = { * Remote info for Salesforce profile. */ salesforceProfile?: SalesforceProfile | undefined; + /** + * Remote info for Docusign permission profile. + */ + docusignPermissionProfile?: DocusignPermissionProfile | undefined; /** * Remote info for Salesforce role. */ @@ -504,1464 +1146,3463 @@ export type ResourceRemoteInfo = { * Remote info for Teleport role. */ teleportRole?: TeleportRole | undefined; + /** + * Remote info for an Astra role. + */ + datastaxAstraRole?: DatastaxAstraRole | undefined; + /** + * Remote info for Coupa role. + */ + coupaRole?: CoupaRole | undefined; + /** + * Remote info for a Cursor organization. + */ + cursorOrganization?: CursorOrganization | undefined; + /** + * Remote info for OpenAI Platform project. + */ + openaiPlatformProject?: OpenaiPlatformProject | undefined; + /** + * Remote info for OpenAI Platform service account. + */ + openaiPlatformServiceAccount?: OpenaiPlatformServiceAccount | undefined; + /** + * Remote info for Anthropic workspace. + */ + anthropicWorkspace?: AnthropicWorkspace | undefined; + /** + * Remote info for Oracle Fusion role. + */ + oracleFusionRole?: OracleFusionRole | undefined; + /** + * Remote info for Devin organization. + */ + devinOrganization?: DevinOrganization | undefined; + /** + * Remote info for Devin role. + */ + devinRole?: DevinRole | undefined; + /** + * Remote info for NetSuite role. + */ + netsuiteRole?: NetsuiteRole | undefined; + /** + * Remote info for Datadog role. + */ + datadogRole?: DatadogRole | undefined; + /** + * Remote info for ClickHouse database. + */ + clickhouseDatabase?: ClickhouseDatabase | undefined; + /** + * Remote info for ClickHouse table. + */ + clickhouseTable?: ClickhouseTable | undefined; + /** + * Remote info for Grafana folder. + */ + grafanaFolder?: GrafanaFolder | undefined; + /** + * Remote info for Grafana dashboard. + */ + grafanaDashboard?: GrafanaDashboard | undefined; + /** + * Remote info for Grafana role(fixed or custom). + */ + grafanaRole?: GrafanaRole | undefined; + /** + * Remote info for Zendesk custom role. + */ + zendeskRole?: ZendeskRole | undefined; + /** + * Remote info for HubSpot role. + */ + hubspotRole?: HubspotRole | undefined; + /** + * Remote info for AliCloud RAM role. + */ + alicloudRamRole?: AlicloudRamRole | undefined; + /** + * Remote info for AliCloud ECS instance. + */ + alicloudEcsInstance?: AlicloudEcsInstance | undefined; + /** + * Remote info for Zoom role. + */ + zoomRole?: ZoomRole | undefined; + /** + * Remote info for Zoom license (user type). + */ + zoomLicense?: ZoomLicense | undefined; +}; + +/** @internal */ +export const DatabricksAccountServicePrincipal$inboundSchema: z.ZodType< + DatabricksAccountServicePrincipal, + z.ZodTypeDef, + unknown +> = z.object({ + application_id: z.string(), + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "application_id": "applicationId", + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type DatabricksAccountServicePrincipal$Outbound = { + application_id: string; + resource_id: string; }; /** @internal */ -export const AwsOrganizationalUnit$inboundSchema: z.ZodType< - AwsOrganizationalUnit, +export const DatabricksAccountServicePrincipal$outboundSchema: z.ZodType< + DatabricksAccountServicePrincipal$Outbound, + z.ZodTypeDef, + DatabricksAccountServicePrincipal +> = z.object({ + applicationId: z.string(), + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + applicationId: "application_id", + resourceId: "resource_id", + }); +}); + +export function databricksAccountServicePrincipalToJSON( + databricksAccountServicePrincipal: DatabricksAccountServicePrincipal, +): string { + return JSON.stringify( + DatabricksAccountServicePrincipal$outboundSchema.parse( + databricksAccountServicePrincipal, + ), + ); +} +export function databricksAccountServicePrincipalFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DatabricksAccountServicePrincipal$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DatabricksAccountServicePrincipal' from JSON`, + ); +} + +/** @internal */ +export const AzureSubscription$inboundSchema: z.ZodType< + AzureSubscription, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureSubscription$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureSubscription$outboundSchema: z.ZodType< + AzureSubscription$Outbound, + z.ZodTypeDef, + AzureSubscription +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureSubscriptionToJSON( + azureSubscription: AzureSubscription, +): string { + return JSON.stringify( + AzureSubscription$outboundSchema.parse(azureSubscription), + ); +} +export function azureSubscriptionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureSubscription$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureSubscription' from JSON`, + ); +} + +/** @internal */ +export const AzureResourceGroup$inboundSchema: z.ZodType< + AzureResourceGroup, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureResourceGroup$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureResourceGroup$outboundSchema: z.ZodType< + AzureResourceGroup$Outbound, + z.ZodTypeDef, + AzureResourceGroup +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureResourceGroupToJSON( + azureResourceGroup: AzureResourceGroup, +): string { + return JSON.stringify( + AzureResourceGroup$outboundSchema.parse(azureResourceGroup), + ); +} +export function azureResourceGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureResourceGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureResourceGroup' from JSON`, + ); +} + +/** @internal */ +export const AzureManagementGroup$inboundSchema: z.ZodType< + AzureManagementGroup, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureManagementGroup$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureManagementGroup$outboundSchema: z.ZodType< + AzureManagementGroup$Outbound, + z.ZodTypeDef, + AzureManagementGroup +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureManagementGroupToJSON( + azureManagementGroup: AzureManagementGroup, +): string { + return JSON.stringify( + AzureManagementGroup$outboundSchema.parse(azureManagementGroup), + ); +} +export function azureManagementGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureManagementGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureManagementGroup' from JSON`, + ); +} + +/** @internal */ +export const AzureVirtualMachine$inboundSchema: z.ZodType< + AzureVirtualMachine, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureVirtualMachine$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureVirtualMachine$outboundSchema: z.ZodType< + AzureVirtualMachine$Outbound, + z.ZodTypeDef, + AzureVirtualMachine +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureVirtualMachineToJSON( + azureVirtualMachine: AzureVirtualMachine, +): string { + return JSON.stringify( + AzureVirtualMachine$outboundSchema.parse(azureVirtualMachine), + ); +} +export function azureVirtualMachineFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureVirtualMachine$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureVirtualMachine' from JSON`, + ); +} + +/** @internal */ +export const AzureStorageAccount$inboundSchema: z.ZodType< + AzureStorageAccount, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureStorageAccount$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureStorageAccount$outboundSchema: z.ZodType< + AzureStorageAccount$Outbound, + z.ZodTypeDef, + AzureStorageAccount +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureStorageAccountToJSON( + azureStorageAccount: AzureStorageAccount, +): string { + return JSON.stringify( + AzureStorageAccount$outboundSchema.parse(azureStorageAccount), + ); +} +export function azureStorageAccountFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureStorageAccount$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureStorageAccount' from JSON`, + ); +} + +/** @internal */ +export const AzureStorageContainer$inboundSchema: z.ZodType< + AzureStorageContainer, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureStorageContainer$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureStorageContainer$outboundSchema: z.ZodType< + AzureStorageContainer$Outbound, + z.ZodTypeDef, + AzureStorageContainer +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureStorageContainerToJSON( + azureStorageContainer: AzureStorageContainer, +): string { + return JSON.stringify( + AzureStorageContainer$outboundSchema.parse(azureStorageContainer), + ); +} +export function azureStorageContainerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureStorageContainer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureStorageContainer' from JSON`, + ); +} + +/** @internal */ +export const AzureSqlServer$inboundSchema: z.ZodType< + AzureSqlServer, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureSqlServer$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureSqlServer$outboundSchema: z.ZodType< + AzureSqlServer$Outbound, + z.ZodTypeDef, + AzureSqlServer +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureSqlServerToJSON(azureSqlServer: AzureSqlServer): string { + return JSON.stringify(AzureSqlServer$outboundSchema.parse(azureSqlServer)); +} +export function azureSqlServerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureSqlServer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureSqlServer' from JSON`, + ); +} + +/** @internal */ +export const AzureSqlDatabase$inboundSchema: z.ZodType< + AzureSqlDatabase, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureSqlDatabase$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureSqlDatabase$outboundSchema: z.ZodType< + AzureSqlDatabase$Outbound, + z.ZodTypeDef, + AzureSqlDatabase +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureSqlDatabaseToJSON( + azureSqlDatabase: AzureSqlDatabase, +): string { + return JSON.stringify( + AzureSqlDatabase$outboundSchema.parse(azureSqlDatabase), + ); +} +export function azureSqlDatabaseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureSqlDatabase$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureSqlDatabase' from JSON`, + ); +} + +/** @internal */ +export const AzureSqlManagedInstance$inboundSchema: z.ZodType< + AzureSqlManagedInstance, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureSqlManagedInstance$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureSqlManagedInstance$outboundSchema: z.ZodType< + AzureSqlManagedInstance$Outbound, + z.ZodTypeDef, + AzureSqlManagedInstance +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureSqlManagedInstanceToJSON( + azureSqlManagedInstance: AzureSqlManagedInstance, +): string { + return JSON.stringify( + AzureSqlManagedInstance$outboundSchema.parse(azureSqlManagedInstance), + ); +} +export function azureSqlManagedInstanceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureSqlManagedInstance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureSqlManagedInstance' from JSON`, + ); +} + +/** @internal */ +export const AzureSqlManagedDatabase$inboundSchema: z.ZodType< + AzureSqlManagedDatabase, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureSqlManagedDatabase$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureSqlManagedDatabase$outboundSchema: z.ZodType< + AzureSqlManagedDatabase$Outbound, + z.ZodTypeDef, + AzureSqlManagedDatabase +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureSqlManagedDatabaseToJSON( + azureSqlManagedDatabase: AzureSqlManagedDatabase, +): string { + return JSON.stringify( + AzureSqlManagedDatabase$outboundSchema.parse(azureSqlManagedDatabase), + ); +} +export function azureSqlManagedDatabaseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureSqlManagedDatabase$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureSqlManagedDatabase' from JSON`, + ); +} + +/** @internal */ +export const AzureUserAssignedManagedIdentity$inboundSchema: z.ZodType< + AzureUserAssignedManagedIdentity, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureUserAssignedManagedIdentity$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureUserAssignedManagedIdentity$outboundSchema: z.ZodType< + AzureUserAssignedManagedIdentity$Outbound, + z.ZodTypeDef, + AzureUserAssignedManagedIdentity +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureUserAssignedManagedIdentityToJSON( + azureUserAssignedManagedIdentity: AzureUserAssignedManagedIdentity, +): string { + return JSON.stringify( + AzureUserAssignedManagedIdentity$outboundSchema.parse( + azureUserAssignedManagedIdentity, + ), + ); +} +export function azureUserAssignedManagedIdentityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureUserAssignedManagedIdentity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureUserAssignedManagedIdentity' from JSON`, + ); +} + +/** @internal */ +export const AzureEnterpriseApp$inboundSchema: z.ZodType< + AzureEnterpriseApp, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureEnterpriseApp$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureEnterpriseApp$outboundSchema: z.ZodType< + AzureEnterpriseApp$Outbound, + z.ZodTypeDef, + AzureEnterpriseApp +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureEnterpriseAppToJSON( + azureEnterpriseApp: AzureEnterpriseApp, +): string { + return JSON.stringify( + AzureEnterpriseApp$outboundSchema.parse(azureEnterpriseApp), + ); +} +export function azureEnterpriseAppFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureEnterpriseApp$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureEnterpriseApp' from JSON`, + ); +} + +/** @internal */ +export const AzureEntraIdRole$inboundSchema: z.ZodType< + AzureEntraIdRole, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type AzureEntraIdRole$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const AzureEntraIdRole$outboundSchema: z.ZodType< + AzureEntraIdRole$Outbound, + z.ZodTypeDef, + AzureEntraIdRole +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function azureEntraIdRoleToJSON( + azureEntraIdRole: AzureEntraIdRole, +): string { + return JSON.stringify( + AzureEntraIdRole$outboundSchema.parse(azureEntraIdRole), + ); +} +export function azureEntraIdRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AzureEntraIdRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AzureEntraIdRole' from JSON`, + ); +} + +/** @internal */ +export const AwsOrganizationalUnit$inboundSchema: z.ZodType< + AwsOrganizationalUnit, + z.ZodTypeDef, + unknown +> = z.object({ + parent_id: z.string().optional(), + organizational_unit_id: z.string(), +}).transform((v) => { + return remap$(v, { + "parent_id": "parentId", + "organizational_unit_id": "organizationalUnitId", + }); +}); +/** @internal */ +export type AwsOrganizationalUnit$Outbound = { + parent_id?: string | undefined; + organizational_unit_id: string; +}; + +/** @internal */ +export const AwsOrganizationalUnit$outboundSchema: z.ZodType< + AwsOrganizationalUnit$Outbound, + z.ZodTypeDef, + AwsOrganizationalUnit +> = z.object({ + parentId: z.string().optional(), + organizationalUnitId: z.string(), +}).transform((v) => { + return remap$(v, { + parentId: "parent_id", + organizationalUnitId: "organizational_unit_id", + }); +}); + +export function awsOrganizationalUnitToJSON( + awsOrganizationalUnit: AwsOrganizationalUnit, +): string { + return JSON.stringify( + AwsOrganizationalUnit$outboundSchema.parse(awsOrganizationalUnit), + ); +} +export function awsOrganizationalUnitFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsOrganizationalUnit$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsOrganizationalUnit' from JSON`, + ); +} + +/** @internal */ +export const AwsAccount$inboundSchema: z.ZodType< + AwsAccount, + z.ZodTypeDef, + unknown +> = z.object({ + account_id: z.string(), + organizational_unit_id: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "account_id": "accountId", + "organizational_unit_id": "organizationalUnitId", + }); +}); +/** @internal */ +export type AwsAccount$Outbound = { + account_id: string; + organizational_unit_id?: string | undefined; +}; + +/** @internal */ +export const AwsAccount$outboundSchema: z.ZodType< + AwsAccount$Outbound, + z.ZodTypeDef, + AwsAccount +> = z.object({ + accountId: z.string(), + organizationalUnitId: z.string().optional(), +}).transform((v) => { + return remap$(v, { + accountId: "account_id", + organizationalUnitId: "organizational_unit_id", + }); +}); + +export function awsAccountToJSON(awsAccount: AwsAccount): string { + return JSON.stringify(AwsAccount$outboundSchema.parse(awsAccount)); +} +export function awsAccountFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsAccount$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsAccount' from JSON`, + ); +} + +/** @internal */ +export const AwsPermissionSet$inboundSchema: z.ZodType< + AwsPermissionSet, + z.ZodTypeDef, + unknown +> = z.object({ + arn: z.string(), + account_id: z.string(), +}).transform((v) => { + return remap$(v, { + "account_id": "accountId", + }); +}); +/** @internal */ +export type AwsPermissionSet$Outbound = { + arn: string; + account_id: string; +}; + +/** @internal */ +export const AwsPermissionSet$outboundSchema: z.ZodType< + AwsPermissionSet$Outbound, + z.ZodTypeDef, + AwsPermissionSet +> = z.object({ + arn: z.string(), + accountId: z.string(), +}).transform((v) => { + return remap$(v, { + accountId: "account_id", + }); +}); + +export function awsPermissionSetToJSON( + awsPermissionSet: AwsPermissionSet, +): string { + return JSON.stringify( + AwsPermissionSet$outboundSchema.parse(awsPermissionSet), + ); +} +export function awsPermissionSetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsPermissionSet$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsPermissionSet' from JSON`, + ); +} + +/** @internal */ +export const AwsIamRole$inboundSchema: z.ZodType< + AwsIamRole, + z.ZodTypeDef, + unknown +> = z.object({ + arn: z.string(), + account_id: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "account_id": "accountId", + }); +}); +/** @internal */ +export type AwsIamRole$Outbound = { + arn: string; + account_id?: string | undefined; +}; + +/** @internal */ +export const AwsIamRole$outboundSchema: z.ZodType< + AwsIamRole$Outbound, + z.ZodTypeDef, + AwsIamRole +> = z.object({ + arn: z.string(), + accountId: z.string().optional(), +}).transform((v) => { + return remap$(v, { + accountId: "account_id", + }); +}); + +export function awsIamRoleToJSON(awsIamRole: AwsIamRole): string { + return JSON.stringify(AwsIamRole$outboundSchema.parse(awsIamRole)); +} +export function awsIamRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsIamRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsIamRole' from JSON`, + ); +} + +/** @internal */ +export const AwsEc2Instance$inboundSchema: z.ZodType< + AwsEc2Instance, + z.ZodTypeDef, + unknown +> = z.object({ + instance_id: z.string(), + region: z.string(), + account_id: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "instance_id": "instanceId", + "account_id": "accountId", + }); +}); +/** @internal */ +export type AwsEc2Instance$Outbound = { + instance_id: string; + region: string; + account_id?: string | undefined; +}; + +/** @internal */ +export const AwsEc2Instance$outboundSchema: z.ZodType< + AwsEc2Instance$Outbound, + z.ZodTypeDef, + AwsEc2Instance +> = z.object({ + instanceId: z.string(), + region: z.string(), + accountId: z.string().optional(), +}).transform((v) => { + return remap$(v, { + instanceId: "instance_id", + accountId: "account_id", + }); +}); + +export function awsEc2InstanceToJSON(awsEc2Instance: AwsEc2Instance): string { + return JSON.stringify(AwsEc2Instance$outboundSchema.parse(awsEc2Instance)); +} +export function awsEc2InstanceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsEc2Instance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsEc2Instance' from JSON`, + ); +} + +/** @internal */ +export const AwsRdsCluster$inboundSchema: z.ZodType< + AwsRdsCluster, + z.ZodTypeDef, + unknown +> = z.object({ + cluster_id: z.string(), + region: z.string(), + resource_id: z.string(), + account_id: z.string(), + database_name: z.string(), + engine: RDSEngineEnum$inboundSchema, +}).transform((v) => { + return remap$(v, { + "cluster_id": "clusterId", + "resource_id": "resourceId", + "account_id": "accountId", + "database_name": "databaseName", + }); +}); +/** @internal */ +export type AwsRdsCluster$Outbound = { + cluster_id: string; + region: string; + resource_id: string; + account_id: string; + database_name: string; + engine: string; +}; + +/** @internal */ +export const AwsRdsCluster$outboundSchema: z.ZodType< + AwsRdsCluster$Outbound, + z.ZodTypeDef, + AwsRdsCluster +> = z.object({ + clusterId: z.string(), + region: z.string(), + resourceId: z.string(), + accountId: z.string(), + databaseName: z.string(), + engine: RDSEngineEnum$outboundSchema, +}).transform((v) => { + return remap$(v, { + clusterId: "cluster_id", + resourceId: "resource_id", + accountId: "account_id", + databaseName: "database_name", + }); +}); + +export function awsRdsClusterToJSON(awsRdsCluster: AwsRdsCluster): string { + return JSON.stringify(AwsRdsCluster$outboundSchema.parse(awsRdsCluster)); +} +export function awsRdsClusterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsRdsCluster$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsRdsCluster' from JSON`, + ); +} + +/** @internal */ +export const AwsRdsInstance$inboundSchema: z.ZodType< + AwsRdsInstance, + z.ZodTypeDef, + unknown +> = z.object({ + instance_id: z.string(), + region: z.string(), + resource_id: z.string(), + account_id: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "instance_id": "instanceId", + "resource_id": "resourceId", + "account_id": "accountId", + }); +}); +/** @internal */ +export type AwsRdsInstance$Outbound = { + instance_id: string; + region: string; + resource_id: string; + account_id?: string | undefined; +}; + +/** @internal */ +export const AwsRdsInstance$outboundSchema: z.ZodType< + AwsRdsInstance$Outbound, + z.ZodTypeDef, + AwsRdsInstance +> = z.object({ + instanceId: z.string(), + region: z.string(), + resourceId: z.string(), + accountId: z.string().optional(), +}).transform((v) => { + return remap$(v, { + instanceId: "instance_id", + resourceId: "resource_id", + accountId: "account_id", + }); +}); + +export function awsRdsInstanceToJSON(awsRdsInstance: AwsRdsInstance): string { + return JSON.stringify(AwsRdsInstance$outboundSchema.parse(awsRdsInstance)); +} +export function awsRdsInstanceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsRdsInstance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsRdsInstance' from JSON`, + ); +} + +/** @internal */ +export const AwsEksCluster$inboundSchema: z.ZodType< + AwsEksCluster, + z.ZodTypeDef, + unknown +> = z.object({ + arn: z.string(), + account_id: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "account_id": "accountId", + }); +}); +/** @internal */ +export type AwsEksCluster$Outbound = { + arn: string; + account_id?: string | undefined; +}; + +/** @internal */ +export const AwsEksCluster$outboundSchema: z.ZodType< + AwsEksCluster$Outbound, + z.ZodTypeDef, + AwsEksCluster +> = z.object({ + arn: z.string(), + accountId: z.string().optional(), +}).transform((v) => { + return remap$(v, { + accountId: "account_id", + }); +}); + +export function awsEksClusterToJSON(awsEksCluster: AwsEksCluster): string { + return JSON.stringify(AwsEksCluster$outboundSchema.parse(awsEksCluster)); +} +export function awsEksClusterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AwsEksCluster$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AwsEksCluster' from JSON`, + ); +} + +/** @internal */ +export const CustomConnector$inboundSchema: z.ZodType< + CustomConnector, + z.ZodTypeDef, + unknown +> = z.object({ + remote_resource_id: z.string(), + can_have_usage_events: z.boolean(), +}).transform((v) => { + return remap$(v, { + "remote_resource_id": "remoteResourceId", + "can_have_usage_events": "canHaveUsageEvents", + }); +}); +/** @internal */ +export type CustomConnector$Outbound = { + remote_resource_id: string; + can_have_usage_events: boolean; +}; + +/** @internal */ +export const CustomConnector$outboundSchema: z.ZodType< + CustomConnector$Outbound, + z.ZodTypeDef, + CustomConnector +> = z.object({ + remoteResourceId: z.string(), + canHaveUsageEvents: z.boolean(), +}).transform((v) => { + return remap$(v, { + remoteResourceId: "remote_resource_id", + canHaveUsageEvents: "can_have_usage_events", + }); +}); + +export function customConnectorToJSON( + customConnector: CustomConnector, +): string { + return JSON.stringify(CustomConnector$outboundSchema.parse(customConnector)); +} +export function customConnectorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CustomConnector$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CustomConnector' from JSON`, + ); +} + +/** @internal */ +export const GcpOrganization$inboundSchema: z.ZodType< + GcpOrganization, + z.ZodTypeDef, + unknown +> = z.object({ + organization_id: z.string(), +}).transform((v) => { + return remap$(v, { + "organization_id": "organizationId", + }); +}); +/** @internal */ +export type GcpOrganization$Outbound = { + organization_id: string; +}; + +/** @internal */ +export const GcpOrganization$outboundSchema: z.ZodType< + GcpOrganization$Outbound, + z.ZodTypeDef, + GcpOrganization +> = z.object({ + organizationId: z.string(), +}).transform((v) => { + return remap$(v, { + organizationId: "organization_id", + }); +}); + +export function gcpOrganizationToJSON( + gcpOrganization: GcpOrganization, +): string { + return JSON.stringify(GcpOrganization$outboundSchema.parse(gcpOrganization)); +} +export function gcpOrganizationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpOrganization$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpOrganization' from JSON`, + ); +} + +/** @internal */ +export const GcpBucket$inboundSchema: z.ZodType< + GcpBucket, + z.ZodTypeDef, + unknown +> = z.object({ + bucket_id: z.string(), +}).transform((v) => { + return remap$(v, { + "bucket_id": "bucketId", + }); +}); +/** @internal */ +export type GcpBucket$Outbound = { + bucket_id: string; +}; + +/** @internal */ +export const GcpBucket$outboundSchema: z.ZodType< + GcpBucket$Outbound, + z.ZodTypeDef, + GcpBucket +> = z.object({ + bucketId: z.string(), +}).transform((v) => { + return remap$(v, { + bucketId: "bucket_id", + }); +}); + +export function gcpBucketToJSON(gcpBucket: GcpBucket): string { + return JSON.stringify(GcpBucket$outboundSchema.parse(gcpBucket)); +} +export function gcpBucketFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpBucket$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpBucket' from JSON`, + ); +} + +/** @internal */ +export const GcpComputeInstance$inboundSchema: z.ZodType< + GcpComputeInstance, + z.ZodTypeDef, + unknown +> = z.object({ + instance_id: z.string(), + project_id: z.string(), + zone: z.string(), +}).transform((v) => { + return remap$(v, { + "instance_id": "instanceId", + "project_id": "projectId", + }); +}); +/** @internal */ +export type GcpComputeInstance$Outbound = { + instance_id: string; + project_id: string; + zone: string; +}; + +/** @internal */ +export const GcpComputeInstance$outboundSchema: z.ZodType< + GcpComputeInstance$Outbound, + z.ZodTypeDef, + GcpComputeInstance +> = z.object({ + instanceId: z.string(), + projectId: z.string(), + zone: z.string(), +}).transform((v) => { + return remap$(v, { + instanceId: "instance_id", + projectId: "project_id", + }); +}); + +export function gcpComputeInstanceToJSON( + gcpComputeInstance: GcpComputeInstance, +): string { + return JSON.stringify( + GcpComputeInstance$outboundSchema.parse(gcpComputeInstance), + ); +} +export function gcpComputeInstanceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpComputeInstance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpComputeInstance' from JSON`, + ); +} + +/** @internal */ +export const GcpBigQueryDataset$inboundSchema: z.ZodType< + GcpBigQueryDataset, + z.ZodTypeDef, + unknown +> = z.object({ + project_id: z.string(), + dataset_id: z.string(), +}).transform((v) => { + return remap$(v, { + "project_id": "projectId", + "dataset_id": "datasetId", + }); +}); +/** @internal */ +export type GcpBigQueryDataset$Outbound = { + project_id: string; + dataset_id: string; +}; + +/** @internal */ +export const GcpBigQueryDataset$outboundSchema: z.ZodType< + GcpBigQueryDataset$Outbound, + z.ZodTypeDef, + GcpBigQueryDataset +> = z.object({ + projectId: z.string(), + datasetId: z.string(), +}).transform((v) => { + return remap$(v, { + projectId: "project_id", + datasetId: "dataset_id", + }); +}); + +export function gcpBigQueryDatasetToJSON( + gcpBigQueryDataset: GcpBigQueryDataset, +): string { + return JSON.stringify( + GcpBigQueryDataset$outboundSchema.parse(gcpBigQueryDataset), + ); +} +export function gcpBigQueryDatasetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpBigQueryDataset$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpBigQueryDataset' from JSON`, + ); +} + +/** @internal */ +export const GcpBigQueryTable$inboundSchema: z.ZodType< + GcpBigQueryTable, + z.ZodTypeDef, + unknown +> = z.object({ + project_id: z.string(), + dataset_id: z.string(), + table_id: z.string(), +}).transform((v) => { + return remap$(v, { + "project_id": "projectId", + "dataset_id": "datasetId", + "table_id": "tableId", + }); +}); +/** @internal */ +export type GcpBigQueryTable$Outbound = { + project_id: string; + dataset_id: string; + table_id: string; +}; + +/** @internal */ +export const GcpBigQueryTable$outboundSchema: z.ZodType< + GcpBigQueryTable$Outbound, + z.ZodTypeDef, + GcpBigQueryTable +> = z.object({ + projectId: z.string(), + datasetId: z.string(), + tableId: z.string(), +}).transform((v) => { + return remap$(v, { + projectId: "project_id", + datasetId: "dataset_id", + tableId: "table_id", + }); +}); + +export function gcpBigQueryTableToJSON( + gcpBigQueryTable: GcpBigQueryTable, +): string { + return JSON.stringify( + GcpBigQueryTable$outboundSchema.parse(gcpBigQueryTable), + ); +} +export function gcpBigQueryTableFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpBigQueryTable$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpBigQueryTable' from JSON`, + ); +} + +/** @internal */ +export const GcpFolder$inboundSchema: z.ZodType< + GcpFolder, + z.ZodTypeDef, + unknown +> = z.object({ + folder_id: z.string(), +}).transform((v) => { + return remap$(v, { + "folder_id": "folderId", + }); +}); +/** @internal */ +export type GcpFolder$Outbound = { + folder_id: string; +}; + +/** @internal */ +export const GcpFolder$outboundSchema: z.ZodType< + GcpFolder$Outbound, + z.ZodTypeDef, + GcpFolder +> = z.object({ + folderId: z.string(), +}).transform((v) => { + return remap$(v, { + folderId: "folder_id", + }); +}); + +export function gcpFolderToJSON(gcpFolder: GcpFolder): string { + return JSON.stringify(GcpFolder$outboundSchema.parse(gcpFolder)); +} +export function gcpFolderFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpFolder$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpFolder' from JSON`, + ); +} + +/** @internal */ +export const GcpGkeCluster$inboundSchema: z.ZodType< + GcpGkeCluster, + z.ZodTypeDef, + unknown +> = z.object({ + cluster_name: z.string(), +}).transform((v) => { + return remap$(v, { + "cluster_name": "clusterName", + }); +}); +/** @internal */ +export type GcpGkeCluster$Outbound = { + cluster_name: string; +}; + +/** @internal */ +export const GcpGkeCluster$outboundSchema: z.ZodType< + GcpGkeCluster$Outbound, + z.ZodTypeDef, + GcpGkeCluster +> = z.object({ + clusterName: z.string(), +}).transform((v) => { + return remap$(v, { + clusterName: "cluster_name", + }); +}); + +export function gcpGkeClusterToJSON(gcpGkeCluster: GcpGkeCluster): string { + return JSON.stringify(GcpGkeCluster$outboundSchema.parse(gcpGkeCluster)); +} +export function gcpGkeClusterFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpGkeCluster$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpGkeCluster' from JSON`, + ); +} + +/** @internal */ +export const GcpProject$inboundSchema: z.ZodType< + GcpProject, + z.ZodTypeDef, + unknown +> = z.object({ + project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "project_id": "projectId", + }); +}); +/** @internal */ +export type GcpProject$Outbound = { + project_id: string; +}; + +/** @internal */ +export const GcpProject$outboundSchema: z.ZodType< + GcpProject$Outbound, + z.ZodTypeDef, + GcpProject +> = z.object({ + projectId: z.string(), +}).transform((v) => { + return remap$(v, { + projectId: "project_id", + }); +}); + +export function gcpProjectToJSON(gcpProject: GcpProject): string { + return JSON.stringify(GcpProject$outboundSchema.parse(gcpProject)); +} +export function gcpProjectFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpProject$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpProject' from JSON`, + ); +} + +/** @internal */ +export const GcpSqlInstance$inboundSchema: z.ZodType< + GcpSqlInstance, + z.ZodTypeDef, + unknown +> = z.object({ + instance_id: z.string(), + project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "instance_id": "instanceId", + "project_id": "projectId", + }); +}); +/** @internal */ +export type GcpSqlInstance$Outbound = { + instance_id: string; + project_id: string; +}; + +/** @internal */ +export const GcpSqlInstance$outboundSchema: z.ZodType< + GcpSqlInstance$Outbound, + z.ZodTypeDef, + GcpSqlInstance +> = z.object({ + instanceId: z.string(), + projectId: z.string(), +}).transform((v) => { + return remap$(v, { + instanceId: "instance_id", + projectId: "project_id", + }); +}); + +export function gcpSqlInstanceToJSON(gcpSqlInstance: GcpSqlInstance): string { + return JSON.stringify(GcpSqlInstance$outboundSchema.parse(gcpSqlInstance)); +} +export function gcpSqlInstanceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpSqlInstance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpSqlInstance' from JSON`, + ); +} + +/** @internal */ +export const GcpServiceAccount$inboundSchema: z.ZodType< + GcpServiceAccount, + z.ZodTypeDef, + unknown +> = z.object({ + email: z.string(), + service_account_id: z.string(), + project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "service_account_id": "serviceAccountId", + "project_id": "projectId", + }); +}); +/** @internal */ +export type GcpServiceAccount$Outbound = { + email: string; + service_account_id: string; + project_id: string; +}; + +/** @internal */ +export const GcpServiceAccount$outboundSchema: z.ZodType< + GcpServiceAccount$Outbound, + z.ZodTypeDef, + GcpServiceAccount +> = z.object({ + email: z.string(), + serviceAccountId: z.string(), + projectId: z.string(), +}).transform((v) => { + return remap$(v, { + serviceAccountId: "service_account_id", + projectId: "project_id", + }); +}); + +export function gcpServiceAccountToJSON( + gcpServiceAccount: GcpServiceAccount, +): string { + return JSON.stringify( + GcpServiceAccount$outboundSchema.parse(gcpServiceAccount), + ); +} +export function gcpServiceAccountFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GcpServiceAccount$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GcpServiceAccount' from JSON`, + ); +} + +/** @internal */ +export const GoogleWorkspaceRole$inboundSchema: z.ZodType< + GoogleWorkspaceRole, + z.ZodTypeDef, + unknown +> = z.object({ + role_id: z.string(), +}).transform((v) => { + return remap$(v, { + "role_id": "roleId", + }); +}); +/** @internal */ +export type GoogleWorkspaceRole$Outbound = { + role_id: string; +}; + +/** @internal */ +export const GoogleWorkspaceRole$outboundSchema: z.ZodType< + GoogleWorkspaceRole$Outbound, + z.ZodTypeDef, + GoogleWorkspaceRole +> = z.object({ + roleId: z.string(), +}).transform((v) => { + return remap$(v, { + roleId: "role_id", + }); +}); + +export function googleWorkspaceRoleToJSON( + googleWorkspaceRole: GoogleWorkspaceRole, +): string { + return JSON.stringify( + GoogleWorkspaceRole$outboundSchema.parse(googleWorkspaceRole), + ); +} +export function googleWorkspaceRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GoogleWorkspaceRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GoogleWorkspaceRole' from JSON`, + ); +} + +/** @internal */ +export const GithubRepo$inboundSchema: z.ZodType< + GithubRepo, + z.ZodTypeDef, + unknown +> = z.object({ + repo_id: z.string().optional(), + repo_name: z.string(), + org_name: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "repo_id": "repoId", + "repo_name": "repoName", + "org_name": "orgName", + }); +}); +/** @internal */ +export type GithubRepo$Outbound = { + repo_id?: string | undefined; + repo_name: string; + org_name?: string | undefined; +}; + +/** @internal */ +export const GithubRepo$outboundSchema: z.ZodType< + GithubRepo$Outbound, + z.ZodTypeDef, + GithubRepo +> = z.object({ + repoId: z.string().optional(), + repoName: z.string(), + orgName: z.string().optional(), +}).transform((v) => { + return remap$(v, { + repoId: "repo_id", + repoName: "repo_name", + orgName: "org_name", + }); +}); + +export function githubRepoToJSON(githubRepo: GithubRepo): string { + return JSON.stringify(GithubRepo$outboundSchema.parse(githubRepo)); +} +export function githubRepoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubRepo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubRepo' from JSON`, + ); +} + +/** @internal */ +export const GithubOrgRole$inboundSchema: z.ZodType< + GithubOrgRole, + z.ZodTypeDef, + unknown +> = z.object({ + role_id: z.string(), + org_name: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "role_id": "roleId", + "org_name": "orgName", + }); +}); +/** @internal */ +export type GithubOrgRole$Outbound = { + role_id: string; + org_name?: string | undefined; +}; + +/** @internal */ +export const GithubOrgRole$outboundSchema: z.ZodType< + GithubOrgRole$Outbound, + z.ZodTypeDef, + GithubOrgRole +> = z.object({ + roleId: z.string(), + orgName: z.string().optional(), +}).transform((v) => { + return remap$(v, { + roleId: "role_id", + orgName: "org_name", + }); +}); + +export function githubOrgRoleToJSON(githubOrgRole: GithubOrgRole): string { + return JSON.stringify(GithubOrgRole$outboundSchema.parse(githubOrgRole)); +} +export function githubOrgRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubOrgRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubOrgRole' from JSON`, + ); +} + +/** @internal */ +export const GithubOrg$inboundSchema: z.ZodType< + GithubOrg, + z.ZodTypeDef, + unknown +> = z.object({ + org_name: z.string(), +}).transform((v) => { + return remap$(v, { + "org_name": "orgName", + }); +}); +/** @internal */ +export type GithubOrg$Outbound = { + org_name: string; +}; + +/** @internal */ +export const GithubOrg$outboundSchema: z.ZodType< + GithubOrg$Outbound, + z.ZodTypeDef, + GithubOrg +> = z.object({ + orgName: z.string(), +}).transform((v) => { + return remap$(v, { + orgName: "org_name", + }); +}); + +export function githubOrgToJSON(githubOrg: GithubOrg): string { + return JSON.stringify(GithubOrg$outboundSchema.parse(githubOrg)); +} +export function githubOrgFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubOrg$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubOrg' from JSON`, + ); +} + +/** @internal */ +export const GithubEnterpriseRole$inboundSchema: z.ZodType< + GithubEnterpriseRole, + z.ZodTypeDef, + unknown +> = z.object({ + role_id: z.string(), +}).transform((v) => { + return remap$(v, { + "role_id": "roleId", + }); +}); +/** @internal */ +export type GithubEnterpriseRole$Outbound = { + role_id: string; +}; + +/** @internal */ +export const GithubEnterpriseRole$outboundSchema: z.ZodType< + GithubEnterpriseRole$Outbound, + z.ZodTypeDef, + GithubEnterpriseRole +> = z.object({ + roleId: z.string(), +}).transform((v) => { + return remap$(v, { + roleId: "role_id", + }); +}); + +export function githubEnterpriseRoleToJSON( + githubEnterpriseRole: GithubEnterpriseRole, +): string { + return JSON.stringify( + GithubEnterpriseRole$outboundSchema.parse(githubEnterpriseRole), + ); +} +export function githubEnterpriseRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GithubEnterpriseRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GithubEnterpriseRole' from JSON`, + ); +} + +/** @internal */ +export const GitlabProject$inboundSchema: z.ZodType< + GitlabProject, + z.ZodTypeDef, + unknown +> = z.object({ + project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "project_id": "projectId", + }); +}); +/** @internal */ +export type GitlabProject$Outbound = { + project_id: string; +}; + +/** @internal */ +export const GitlabProject$outboundSchema: z.ZodType< + GitlabProject$Outbound, + z.ZodTypeDef, + GitlabProject +> = z.object({ + projectId: z.string(), +}).transform((v) => { + return remap$(v, { + projectId: "project_id", + }); +}); + +export function gitlabProjectToJSON(gitlabProject: GitlabProject): string { + return JSON.stringify(GitlabProject$outboundSchema.parse(gitlabProject)); +} +export function gitlabProjectFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GitlabProject$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GitlabProject' from JSON`, + ); +} + +/** @internal */ +export const OktaApp$inboundSchema: z.ZodType = + z.object({ + app_id: z.string(), + }).transform((v) => { + return remap$(v, { + "app_id": "appId", + }); + }); +/** @internal */ +export type OktaApp$Outbound = { + app_id: string; +}; + +/** @internal */ +export const OktaApp$outboundSchema: z.ZodType< + OktaApp$Outbound, + z.ZodTypeDef, + OktaApp +> = z.object({ + appId: z.string(), +}).transform((v) => { + return remap$(v, { + appId: "app_id", + }); +}); + +export function oktaAppToJSON(oktaApp: OktaApp): string { + return JSON.stringify(OktaApp$outboundSchema.parse(oktaApp)); +} +export function oktaAppFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OktaApp$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OktaApp' from JSON`, + ); +} + +/** @internal */ +export const OktaStandardRole$inboundSchema: z.ZodType< + OktaStandardRole, + z.ZodTypeDef, + unknown +> = z.object({ + role_type: z.string(), +}).transform((v) => { + return remap$(v, { + "role_type": "roleType", + }); +}); +/** @internal */ +export type OktaStandardRole$Outbound = { + role_type: string; +}; + +/** @internal */ +export const OktaStandardRole$outboundSchema: z.ZodType< + OktaStandardRole$Outbound, + z.ZodTypeDef, + OktaStandardRole +> = z.object({ + roleType: z.string(), +}).transform((v) => { + return remap$(v, { + roleType: "role_type", + }); +}); + +export function oktaStandardRoleToJSON( + oktaStandardRole: OktaStandardRole, +): string { + return JSON.stringify( + OktaStandardRole$outboundSchema.parse(oktaStandardRole), + ); +} +export function oktaStandardRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OktaStandardRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OktaStandardRole' from JSON`, + ); +} + +/** @internal */ +export const OktaCustomRole$inboundSchema: z.ZodType< + OktaCustomRole, + z.ZodTypeDef, + unknown +> = z.object({ + role_id: z.string(), +}).transform((v) => { + return remap$(v, { + "role_id": "roleId", + }); +}); +/** @internal */ +export type OktaCustomRole$Outbound = { + role_id: string; +}; + +/** @internal */ +export const OktaCustomRole$outboundSchema: z.ZodType< + OktaCustomRole$Outbound, + z.ZodTypeDef, + OktaCustomRole +> = z.object({ + roleId: z.string(), +}).transform((v) => { + return remap$(v, { + roleId: "role_id", + }); +}); + +export function oktaCustomRoleToJSON(oktaCustomRole: OktaCustomRole): string { + return JSON.stringify(OktaCustomRole$outboundSchema.parse(oktaCustomRole)); +} +export function oktaCustomRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => OktaCustomRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OktaCustomRole' from JSON`, + ); +} + +/** @internal */ +export const SnowflakeDatabase$inboundSchema: z.ZodType< + SnowflakeDatabase, + z.ZodTypeDef, + unknown +> = z.object({ + database_name: z.string(), +}).transform((v) => { + return remap$(v, { + "database_name": "databaseName", + }); +}); +/** @internal */ +export type SnowflakeDatabase$Outbound = { + database_name: string; +}; + +/** @internal */ +export const SnowflakeDatabase$outboundSchema: z.ZodType< + SnowflakeDatabase$Outbound, + z.ZodTypeDef, + SnowflakeDatabase +> = z.object({ + databaseName: z.string(), +}).transform((v) => { + return remap$(v, { + databaseName: "database_name", + }); +}); + +export function snowflakeDatabaseToJSON( + snowflakeDatabase: SnowflakeDatabase, +): string { + return JSON.stringify( + SnowflakeDatabase$outboundSchema.parse(snowflakeDatabase), + ); +} +export function snowflakeDatabaseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SnowflakeDatabase$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SnowflakeDatabase' from JSON`, + ); +} + +/** @internal */ +export const SnowflakeSchema$inboundSchema: z.ZodType< + SnowflakeSchema, + z.ZodTypeDef, + unknown +> = z.object({ + database_name: z.string(), + schema_name: z.string(), +}).transform((v) => { + return remap$(v, { + "database_name": "databaseName", + "schema_name": "schemaName", + }); +}); +/** @internal */ +export type SnowflakeSchema$Outbound = { + database_name: string; + schema_name: string; +}; + +/** @internal */ +export const SnowflakeSchema$outboundSchema: z.ZodType< + SnowflakeSchema$Outbound, + z.ZodTypeDef, + SnowflakeSchema +> = z.object({ + databaseName: z.string(), + schemaName: z.string(), +}).transform((v) => { + return remap$(v, { + databaseName: "database_name", + schemaName: "schema_name", + }); +}); + +export function snowflakeSchemaToJSON( + snowflakeSchema: SnowflakeSchema, +): string { + return JSON.stringify(SnowflakeSchema$outboundSchema.parse(snowflakeSchema)); +} +export function snowflakeSchemaFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SnowflakeSchema$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SnowflakeSchema' from JSON`, + ); +} + +/** @internal */ +export const SnowflakeTable$inboundSchema: z.ZodType< + SnowflakeTable, + z.ZodTypeDef, + unknown +> = z.object({ + database_name: z.string(), + schema_name: z.string(), + table_name: z.string(), +}).transform((v) => { + return remap$(v, { + "database_name": "databaseName", + "schema_name": "schemaName", + "table_name": "tableName", + }); +}); +/** @internal */ +export type SnowflakeTable$Outbound = { + database_name: string; + schema_name: string; + table_name: string; +}; + +/** @internal */ +export const SnowflakeTable$outboundSchema: z.ZodType< + SnowflakeTable$Outbound, + z.ZodTypeDef, + SnowflakeTable +> = z.object({ + databaseName: z.string(), + schemaName: z.string(), + tableName: z.string(), +}).transform((v) => { + return remap$(v, { + databaseName: "database_name", + schemaName: "schema_name", + tableName: "table_name", + }); +}); + +export function snowflakeTableToJSON(snowflakeTable: SnowflakeTable): string { + return JSON.stringify(SnowflakeTable$outboundSchema.parse(snowflakeTable)); +} +export function snowflakeTableFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SnowflakeTable$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SnowflakeTable' from JSON`, + ); +} + +/** @internal */ +export const IlevelAdvancedRole$inboundSchema: z.ZodType< + IlevelAdvancedRole, + z.ZodTypeDef, + unknown +> = z.object({ + role_name: z.string(), +}).transform((v) => { + return remap$(v, { + "role_name": "roleName", + }); +}); +/** @internal */ +export type IlevelAdvancedRole$Outbound = { + role_name: string; +}; + +/** @internal */ +export const IlevelAdvancedRole$outboundSchema: z.ZodType< + IlevelAdvancedRole$Outbound, + z.ZodTypeDef, + IlevelAdvancedRole +> = z.object({ + roleName: z.string(), +}).transform((v) => { + return remap$(v, { + roleName: "role_name", + }); +}); + +export function ilevelAdvancedRoleToJSON( + ilevelAdvancedRole: IlevelAdvancedRole, +): string { + return JSON.stringify( + IlevelAdvancedRole$outboundSchema.parse(ilevelAdvancedRole), + ); +} +export function ilevelAdvancedRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IlevelAdvancedRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IlevelAdvancedRole' from JSON`, + ); +} + +/** @internal */ +export const TailscaleSsh$inboundSchema: z.ZodType< + TailscaleSsh, z.ZodTypeDef, unknown > = z.object({ - parent_id: z.string().optional(), - organizational_unit_id: z.string(), + tag_name: z.string(), }).transform((v) => { return remap$(v, { - "parent_id": "parentId", - "organizational_unit_id": "organizationalUnitId", + "tag_name": "tagName", }); }); - /** @internal */ -export type AwsOrganizationalUnit$Outbound = { - parent_id?: string | undefined; - organizational_unit_id: string; +export type TailscaleSsh$Outbound = { + tag_name: string; }; /** @internal */ -export const AwsOrganizationalUnit$outboundSchema: z.ZodType< - AwsOrganizationalUnit$Outbound, +export const TailscaleSsh$outboundSchema: z.ZodType< + TailscaleSsh$Outbound, z.ZodTypeDef, - AwsOrganizationalUnit + TailscaleSsh > = z.object({ - parentId: z.string().optional(), - organizationalUnitId: z.string(), + tagName: z.string(), }).transform((v) => { return remap$(v, { - parentId: "parent_id", - organizationalUnitId: "organizational_unit_id", + tagName: "tag_name", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AwsOrganizationalUnit$ { - /** @deprecated use `AwsOrganizationalUnit$inboundSchema` instead. */ - export const inboundSchema = AwsOrganizationalUnit$inboundSchema; - /** @deprecated use `AwsOrganizationalUnit$outboundSchema` instead. */ - export const outboundSchema = AwsOrganizationalUnit$outboundSchema; - /** @deprecated use `AwsOrganizationalUnit$Outbound` instead. */ - export type Outbound = AwsOrganizationalUnit$Outbound; +export function tailscaleSshToJSON(tailscaleSsh: TailscaleSsh): string { + return JSON.stringify(TailscaleSsh$outboundSchema.parse(tailscaleSsh)); +} +export function tailscaleSshFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => TailscaleSsh$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TailscaleSsh' from JSON`, + ); } -export function awsOrganizationalUnitToJSON( - awsOrganizationalUnit: AwsOrganizationalUnit, +/** @internal */ +export const TwingateResource$inboundSchema: z.ZodType< + TwingateResource, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type TwingateResource$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const TwingateResource$outboundSchema: z.ZodType< + TwingateResource$Outbound, + z.ZodTypeDef, + TwingateResource +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function twingateResourceToJSON( + twingateResource: TwingateResource, ): string { return JSON.stringify( - AwsOrganizationalUnit$outboundSchema.parse(awsOrganizationalUnit), + TwingateResource$outboundSchema.parse(twingateResource), ); } - -export function awsOrganizationalUnitFromJSON( +export function twingateResourceFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AwsOrganizationalUnit$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AwsOrganizationalUnit' from JSON`, + (x) => TwingateResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TwingateResource' from JSON`, ); } /** @internal */ -export const AwsAccount$inboundSchema: z.ZodType< - AwsAccount, +export const PagerdutyRole$inboundSchema: z.ZodType< + PagerdutyRole, z.ZodTypeDef, unknown > = z.object({ - account_id: z.string(), - organizational_unit_id: z.string().optional(), + role_name: z.string(), }).transform((v) => { return remap$(v, { - "account_id": "accountId", - "organizational_unit_id": "organizationalUnitId", + "role_name": "roleName", }); }); - /** @internal */ -export type AwsAccount$Outbound = { - account_id: string; - organizational_unit_id?: string | undefined; +export type PagerdutyRole$Outbound = { + role_name: string; }; /** @internal */ -export const AwsAccount$outboundSchema: z.ZodType< - AwsAccount$Outbound, +export const PagerdutyRole$outboundSchema: z.ZodType< + PagerdutyRole$Outbound, z.ZodTypeDef, - AwsAccount + PagerdutyRole > = z.object({ - accountId: z.string(), - organizationalUnitId: z.string().optional(), + roleName: z.string(), }).transform((v) => { return remap$(v, { - accountId: "account_id", - organizationalUnitId: "organizational_unit_id", + roleName: "role_name", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AwsAccount$ { - /** @deprecated use `AwsAccount$inboundSchema` instead. */ - export const inboundSchema = AwsAccount$inboundSchema; - /** @deprecated use `AwsAccount$outboundSchema` instead. */ - export const outboundSchema = AwsAccount$outboundSchema; - /** @deprecated use `AwsAccount$Outbound` instead. */ - export type Outbound = AwsAccount$Outbound; -} - -export function awsAccountToJSON(awsAccount: AwsAccount): string { - return JSON.stringify(AwsAccount$outboundSchema.parse(awsAccount)); +export function pagerdutyRoleToJSON(pagerdutyRole: PagerdutyRole): string { + return JSON.stringify(PagerdutyRole$outboundSchema.parse(pagerdutyRole)); } - -export function awsAccountFromJSON( +export function pagerdutyRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AwsAccount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AwsAccount' from JSON`, + (x) => PagerdutyRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PagerdutyRole' from JSON`, ); } /** @internal */ -export const AwsPermissionSet$inboundSchema: z.ZodType< - AwsPermissionSet, +export const WorkdayRole$inboundSchema: z.ZodType< + WorkdayRole, z.ZodTypeDef, unknown > = z.object({ - arn: z.string(), - account_id: z.string(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "account_id": "accountId", + "role_id": "roleId", }); }); - /** @internal */ -export type AwsPermissionSet$Outbound = { - arn: string; - account_id: string; +export type WorkdayRole$Outbound = { + role_id: string; }; /** @internal */ -export const AwsPermissionSet$outboundSchema: z.ZodType< - AwsPermissionSet$Outbound, +export const WorkdayRole$outboundSchema: z.ZodType< + WorkdayRole$Outbound, z.ZodTypeDef, - AwsPermissionSet + WorkdayRole > = z.object({ - arn: z.string(), - accountId: z.string(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - accountId: "account_id", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AwsPermissionSet$ { - /** @deprecated use `AwsPermissionSet$inboundSchema` instead. */ - export const inboundSchema = AwsPermissionSet$inboundSchema; - /** @deprecated use `AwsPermissionSet$outboundSchema` instead. */ - export const outboundSchema = AwsPermissionSet$outboundSchema; - /** @deprecated use `AwsPermissionSet$Outbound` instead. */ - export type Outbound = AwsPermissionSet$Outbound; +export function workdayRoleToJSON(workdayRole: WorkdayRole): string { + return JSON.stringify(WorkdayRole$outboundSchema.parse(workdayRole)); +} +export function workdayRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WorkdayRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WorkdayRole' from JSON`, + ); } -export function awsPermissionSetToJSON( - awsPermissionSet: AwsPermissionSet, +/** @internal */ +export const SalesforcePermissionSet$inboundSchema: z.ZodType< + SalesforcePermissionSet, + z.ZodTypeDef, + unknown +> = z.object({ + permission_set_id: z.string(), +}).transform((v) => { + return remap$(v, { + "permission_set_id": "permissionSetId", + }); +}); +/** @internal */ +export type SalesforcePermissionSet$Outbound = { + permission_set_id: string; +}; + +/** @internal */ +export const SalesforcePermissionSet$outboundSchema: z.ZodType< + SalesforcePermissionSet$Outbound, + z.ZodTypeDef, + SalesforcePermissionSet +> = z.object({ + permissionSetId: z.string(), +}).transform((v) => { + return remap$(v, { + permissionSetId: "permission_set_id", + }); +}); + +export function salesforcePermissionSetToJSON( + salesforcePermissionSet: SalesforcePermissionSet, ): string { return JSON.stringify( - AwsPermissionSet$outboundSchema.parse(awsPermissionSet), + SalesforcePermissionSet$outboundSchema.parse(salesforcePermissionSet), ); } - -export function awsPermissionSetFromJSON( +export function salesforcePermissionSetFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AwsPermissionSet$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AwsPermissionSet' from JSON`, + (x) => SalesforcePermissionSet$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SalesforcePermissionSet' from JSON`, ); } /** @internal */ -export const AwsIamRole$inboundSchema: z.ZodType< - AwsIamRole, +export const SalesforceProfile$inboundSchema: z.ZodType< + SalesforceProfile, z.ZodTypeDef, unknown > = z.object({ - arn: z.string(), - account_id: z.string().optional(), + profile_id: z.string(), + user_license_id: z.string(), }).transform((v) => { return remap$(v, { - "account_id": "accountId", + "profile_id": "profileId", + "user_license_id": "userLicenseId", }); }); - /** @internal */ -export type AwsIamRole$Outbound = { - arn: string; - account_id?: string | undefined; +export type SalesforceProfile$Outbound = { + profile_id: string; + user_license_id: string; }; /** @internal */ -export const AwsIamRole$outboundSchema: z.ZodType< - AwsIamRole$Outbound, +export const SalesforceProfile$outboundSchema: z.ZodType< + SalesforceProfile$Outbound, z.ZodTypeDef, - AwsIamRole + SalesforceProfile > = z.object({ - arn: z.string(), - accountId: z.string().optional(), + profileId: z.string(), + userLicenseId: z.string(), }).transform((v) => { return remap$(v, { - accountId: "account_id", + profileId: "profile_id", + userLicenseId: "user_license_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AwsIamRole$ { - /** @deprecated use `AwsIamRole$inboundSchema` instead. */ - export const inboundSchema = AwsIamRole$inboundSchema; - /** @deprecated use `AwsIamRole$outboundSchema` instead. */ - export const outboundSchema = AwsIamRole$outboundSchema; - /** @deprecated use `AwsIamRole$Outbound` instead. */ - export type Outbound = AwsIamRole$Outbound; -} - -export function awsIamRoleToJSON(awsIamRole: AwsIamRole): string { - return JSON.stringify(AwsIamRole$outboundSchema.parse(awsIamRole)); +export function salesforceProfileToJSON( + salesforceProfile: SalesforceProfile, +): string { + return JSON.stringify( + SalesforceProfile$outboundSchema.parse(salesforceProfile), + ); } - -export function awsIamRoleFromJSON( +export function salesforceProfileFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AwsIamRole$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AwsIamRole' from JSON`, + (x) => SalesforceProfile$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SalesforceProfile' from JSON`, ); } /** @internal */ -export const AwsEc2Instance$inboundSchema: z.ZodType< - AwsEc2Instance, +export const DocusignPermissionProfile$inboundSchema: z.ZodType< + DocusignPermissionProfile, z.ZodTypeDef, unknown > = z.object({ - instance_id: z.string(), - region: z.string(), - account_id: z.string().optional(), + permission_profile_id: z.string(), }).transform((v) => { return remap$(v, { - "instance_id": "instanceId", - "account_id": "accountId", + "permission_profile_id": "permissionProfileId", }); }); - /** @internal */ -export type AwsEc2Instance$Outbound = { - instance_id: string; - region: string; - account_id?: string | undefined; +export type DocusignPermissionProfile$Outbound = { + permission_profile_id: string; }; /** @internal */ -export const AwsEc2Instance$outboundSchema: z.ZodType< - AwsEc2Instance$Outbound, +export const DocusignPermissionProfile$outboundSchema: z.ZodType< + DocusignPermissionProfile$Outbound, z.ZodTypeDef, - AwsEc2Instance + DocusignPermissionProfile > = z.object({ - instanceId: z.string(), - region: z.string(), - accountId: z.string().optional(), + permissionProfileId: z.string(), }).transform((v) => { return remap$(v, { - instanceId: "instance_id", - accountId: "account_id", + permissionProfileId: "permission_profile_id", }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AwsEc2Instance$ { - /** @deprecated use `AwsEc2Instance$inboundSchema` instead. */ - export const inboundSchema = AwsEc2Instance$inboundSchema; - /** @deprecated use `AwsEc2Instance$outboundSchema` instead. */ - export const outboundSchema = AwsEc2Instance$outboundSchema; - /** @deprecated use `AwsEc2Instance$Outbound` instead. */ - export type Outbound = AwsEc2Instance$Outbound; -} +}); -export function awsEc2InstanceToJSON(awsEc2Instance: AwsEc2Instance): string { - return JSON.stringify(AwsEc2Instance$outboundSchema.parse(awsEc2Instance)); +export function docusignPermissionProfileToJSON( + docusignPermissionProfile: DocusignPermissionProfile, +): string { + return JSON.stringify( + DocusignPermissionProfile$outboundSchema.parse(docusignPermissionProfile), + ); } - -export function awsEc2InstanceFromJSON( +export function docusignPermissionProfileFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AwsEc2Instance$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AwsEc2Instance' from JSON`, + (x) => DocusignPermissionProfile$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DocusignPermissionProfile' from JSON`, ); } /** @internal */ -export const AwsRdsInstance$inboundSchema: z.ZodType< - AwsRdsInstance, +export const SalesforceRole$inboundSchema: z.ZodType< + SalesforceRole, z.ZodTypeDef, unknown > = z.object({ - instance_id: z.string(), - region: z.string(), - resource_id: z.string(), - account_id: z.string().optional(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "instance_id": "instanceId", - "resource_id": "resourceId", - "account_id": "accountId", + "role_id": "roleId", }); }); - /** @internal */ -export type AwsRdsInstance$Outbound = { - instance_id: string; - region: string; - resource_id: string; - account_id?: string | undefined; +export type SalesforceRole$Outbound = { + role_id: string; }; /** @internal */ -export const AwsRdsInstance$outboundSchema: z.ZodType< - AwsRdsInstance$Outbound, +export const SalesforceRole$outboundSchema: z.ZodType< + SalesforceRole$Outbound, z.ZodTypeDef, - AwsRdsInstance + SalesforceRole > = z.object({ - instanceId: z.string(), - region: z.string(), - resourceId: z.string(), - accountId: z.string().optional(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - instanceId: "instance_id", - resourceId: "resource_id", - accountId: "account_id", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AwsRdsInstance$ { - /** @deprecated use `AwsRdsInstance$inboundSchema` instead. */ - export const inboundSchema = AwsRdsInstance$inboundSchema; - /** @deprecated use `AwsRdsInstance$outboundSchema` instead. */ - export const outboundSchema = AwsRdsInstance$outboundSchema; - /** @deprecated use `AwsRdsInstance$Outbound` instead. */ - export type Outbound = AwsRdsInstance$Outbound; -} - -export function awsRdsInstanceToJSON(awsRdsInstance: AwsRdsInstance): string { - return JSON.stringify(AwsRdsInstance$outboundSchema.parse(awsRdsInstance)); +export function salesforceRoleToJSON(salesforceRole: SalesforceRole): string { + return JSON.stringify(SalesforceRole$outboundSchema.parse(salesforceRole)); } - -export function awsRdsInstanceFromJSON( +export function salesforceRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AwsRdsInstance$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AwsRdsInstance' from JSON`, + (x) => SalesforceRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SalesforceRole' from JSON`, ); } /** @internal */ -export const AwsEksCluster$inboundSchema: z.ZodType< - AwsEksCluster, +export const TeleportRole$inboundSchema: z.ZodType< + TeleportRole, z.ZodTypeDef, unknown > = z.object({ - arn: z.string(), - account_id: z.string().optional(), + role_name: z.string(), }).transform((v) => { return remap$(v, { - "account_id": "accountId", + "role_name": "roleName", }); }); - /** @internal */ -export type AwsEksCluster$Outbound = { - arn: string; - account_id?: string | undefined; +export type TeleportRole$Outbound = { + role_name: string; }; /** @internal */ -export const AwsEksCluster$outboundSchema: z.ZodType< - AwsEksCluster$Outbound, +export const TeleportRole$outboundSchema: z.ZodType< + TeleportRole$Outbound, z.ZodTypeDef, - AwsEksCluster + TeleportRole > = z.object({ - arn: z.string(), - accountId: z.string().optional(), + roleName: z.string(), }).transform((v) => { return remap$(v, { - accountId: "account_id", + roleName: "role_name", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AwsEksCluster$ { - /** @deprecated use `AwsEksCluster$inboundSchema` instead. */ - export const inboundSchema = AwsEksCluster$inboundSchema; - /** @deprecated use `AwsEksCluster$outboundSchema` instead. */ - export const outboundSchema = AwsEksCluster$outboundSchema; - /** @deprecated use `AwsEksCluster$Outbound` instead. */ - export type Outbound = AwsEksCluster$Outbound; -} - -export function awsEksClusterToJSON(awsEksCluster: AwsEksCluster): string { - return JSON.stringify(AwsEksCluster$outboundSchema.parse(awsEksCluster)); +export function teleportRoleToJSON(teleportRole: TeleportRole): string { + return JSON.stringify(TeleportRole$outboundSchema.parse(teleportRole)); } - -export function awsEksClusterFromJSON( +export function teleportRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => AwsEksCluster$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AwsEksCluster' from JSON`, + (x) => TeleportRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TeleportRole' from JSON`, ); } /** @internal */ -export const CustomConnector$inboundSchema: z.ZodType< - CustomConnector, +export const DatastaxAstraRole$inboundSchema: z.ZodType< + DatastaxAstraRole, z.ZodTypeDef, unknown > = z.object({ - remote_resource_id: z.string(), - can_have_usage_events: z.boolean(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "remote_resource_id": "remoteResourceId", - "can_have_usage_events": "canHaveUsageEvents", + "role_id": "roleId", }); }); - /** @internal */ -export type CustomConnector$Outbound = { - remote_resource_id: string; - can_have_usage_events: boolean; +export type DatastaxAstraRole$Outbound = { + role_id: string; }; /** @internal */ -export const CustomConnector$outboundSchema: z.ZodType< - CustomConnector$Outbound, +export const DatastaxAstraRole$outboundSchema: z.ZodType< + DatastaxAstraRole$Outbound, z.ZodTypeDef, - CustomConnector + DatastaxAstraRole > = z.object({ - remoteResourceId: z.string(), - canHaveUsageEvents: z.boolean(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - remoteResourceId: "remote_resource_id", - canHaveUsageEvents: "can_have_usage_events", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CustomConnector$ { - /** @deprecated use `CustomConnector$inboundSchema` instead. */ - export const inboundSchema = CustomConnector$inboundSchema; - /** @deprecated use `CustomConnector$outboundSchema` instead. */ - export const outboundSchema = CustomConnector$outboundSchema; - /** @deprecated use `CustomConnector$Outbound` instead. */ - export type Outbound = CustomConnector$Outbound; -} - -export function customConnectorToJSON( - customConnector: CustomConnector, +export function datastaxAstraRoleToJSON( + datastaxAstraRole: DatastaxAstraRole, ): string { - return JSON.stringify(CustomConnector$outboundSchema.parse(customConnector)); + return JSON.stringify( + DatastaxAstraRole$outboundSchema.parse(datastaxAstraRole), + ); } - -export function customConnectorFromJSON( +export function datastaxAstraRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => CustomConnector$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CustomConnector' from JSON`, + (x) => DatastaxAstraRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DatastaxAstraRole' from JSON`, ); } /** @internal */ -export const GcpOrganization$inboundSchema: z.ZodType< - GcpOrganization, +export const CoupaRole$inboundSchema: z.ZodType< + CoupaRole, z.ZodTypeDef, unknown > = z.object({ - organization_id: z.string(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "organization_id": "organizationId", + "role_id": "roleId", }); }); - /** @internal */ -export type GcpOrganization$Outbound = { - organization_id: string; +export type CoupaRole$Outbound = { + role_id: string; }; /** @internal */ -export const GcpOrganization$outboundSchema: z.ZodType< - GcpOrganization$Outbound, +export const CoupaRole$outboundSchema: z.ZodType< + CoupaRole$Outbound, z.ZodTypeDef, - GcpOrganization + CoupaRole > = z.object({ - organizationId: z.string(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - organizationId: "organization_id", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpOrganization$ { - /** @deprecated use `GcpOrganization$inboundSchema` instead. */ - export const inboundSchema = GcpOrganization$inboundSchema; - /** @deprecated use `GcpOrganization$outboundSchema` instead. */ - export const outboundSchema = GcpOrganization$outboundSchema; - /** @deprecated use `GcpOrganization$Outbound` instead. */ - export type Outbound = GcpOrganization$Outbound; -} - -export function gcpOrganizationToJSON( - gcpOrganization: GcpOrganization, -): string { - return JSON.stringify(GcpOrganization$outboundSchema.parse(gcpOrganization)); +export function coupaRoleToJSON(coupaRole: CoupaRole): string { + return JSON.stringify(CoupaRole$outboundSchema.parse(coupaRole)); } - -export function gcpOrganizationFromJSON( +export function coupaRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpOrganization$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpOrganization' from JSON`, + (x) => CoupaRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CoupaRole' from JSON`, ); } /** @internal */ -export const GcpBucket$inboundSchema: z.ZodType< - GcpBucket, +export const CursorOrganization$inboundSchema: z.ZodType< + CursorOrganization, z.ZodTypeDef, unknown > = z.object({ - bucket_id: z.string(), + org_id: z.string(), }).transform((v) => { return remap$(v, { - "bucket_id": "bucketId", + "org_id": "orgId", }); }); - /** @internal */ -export type GcpBucket$Outbound = { - bucket_id: string; +export type CursorOrganization$Outbound = { + org_id: string; }; /** @internal */ -export const GcpBucket$outboundSchema: z.ZodType< - GcpBucket$Outbound, +export const CursorOrganization$outboundSchema: z.ZodType< + CursorOrganization$Outbound, z.ZodTypeDef, - GcpBucket + CursorOrganization > = z.object({ - bucketId: z.string(), + orgId: z.string(), }).transform((v) => { return remap$(v, { - bucketId: "bucket_id", + orgId: "org_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpBucket$ { - /** @deprecated use `GcpBucket$inboundSchema` instead. */ - export const inboundSchema = GcpBucket$inboundSchema; - /** @deprecated use `GcpBucket$outboundSchema` instead. */ - export const outboundSchema = GcpBucket$outboundSchema; - /** @deprecated use `GcpBucket$Outbound` instead. */ - export type Outbound = GcpBucket$Outbound; -} - -export function gcpBucketToJSON(gcpBucket: GcpBucket): string { - return JSON.stringify(GcpBucket$outboundSchema.parse(gcpBucket)); +export function cursorOrganizationToJSON( + cursorOrganization: CursorOrganization, +): string { + return JSON.stringify( + CursorOrganization$outboundSchema.parse(cursorOrganization), + ); } - -export function gcpBucketFromJSON( +export function cursorOrganizationFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpBucket$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpBucket' from JSON`, + (x) => CursorOrganization$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CursorOrganization' from JSON`, ); } /** @internal */ -export const GcpComputeInstance$inboundSchema: z.ZodType< - GcpComputeInstance, +export const OpenaiPlatformProject$inboundSchema: z.ZodType< + OpenaiPlatformProject, z.ZodTypeDef, unknown > = z.object({ - instance_id: z.string(), project_id: z.string(), - zone: z.string(), }).transform((v) => { return remap$(v, { - "instance_id": "instanceId", "project_id": "projectId", }); }); - /** @internal */ -export type GcpComputeInstance$Outbound = { - instance_id: string; +export type OpenaiPlatformProject$Outbound = { project_id: string; - zone: string; }; /** @internal */ -export const GcpComputeInstance$outboundSchema: z.ZodType< - GcpComputeInstance$Outbound, +export const OpenaiPlatformProject$outboundSchema: z.ZodType< + OpenaiPlatformProject$Outbound, z.ZodTypeDef, - GcpComputeInstance + OpenaiPlatformProject > = z.object({ - instanceId: z.string(), projectId: z.string(), - zone: z.string(), }).transform((v) => { return remap$(v, { - instanceId: "instance_id", projectId: "project_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpComputeInstance$ { - /** @deprecated use `GcpComputeInstance$inboundSchema` instead. */ - export const inboundSchema = GcpComputeInstance$inboundSchema; - /** @deprecated use `GcpComputeInstance$outboundSchema` instead. */ - export const outboundSchema = GcpComputeInstance$outboundSchema; - /** @deprecated use `GcpComputeInstance$Outbound` instead. */ - export type Outbound = GcpComputeInstance$Outbound; -} - -export function gcpComputeInstanceToJSON( - gcpComputeInstance: GcpComputeInstance, +export function openaiPlatformProjectToJSON( + openaiPlatformProject: OpenaiPlatformProject, ): string { return JSON.stringify( - GcpComputeInstance$outboundSchema.parse(gcpComputeInstance), + OpenaiPlatformProject$outboundSchema.parse(openaiPlatformProject), ); } - -export function gcpComputeInstanceFromJSON( +export function openaiPlatformProjectFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpComputeInstance$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpComputeInstance' from JSON`, + (x) => OpenaiPlatformProject$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenaiPlatformProject' from JSON`, ); } /** @internal */ -export const GcpBigQueryDataset$inboundSchema: z.ZodType< - GcpBigQueryDataset, +export const OpenaiPlatformServiceAccount$inboundSchema: z.ZodType< + OpenaiPlatformServiceAccount, z.ZodTypeDef, unknown > = z.object({ project_id: z.string(), - dataset_id: z.string(), + service_account_id: z.string(), }).transform((v) => { return remap$(v, { "project_id": "projectId", - "dataset_id": "datasetId", + "service_account_id": "serviceAccountId", }); }); - /** @internal */ -export type GcpBigQueryDataset$Outbound = { +export type OpenaiPlatformServiceAccount$Outbound = { project_id: string; - dataset_id: string; + service_account_id: string; }; /** @internal */ -export const GcpBigQueryDataset$outboundSchema: z.ZodType< - GcpBigQueryDataset$Outbound, +export const OpenaiPlatformServiceAccount$outboundSchema: z.ZodType< + OpenaiPlatformServiceAccount$Outbound, z.ZodTypeDef, - GcpBigQueryDataset + OpenaiPlatformServiceAccount > = z.object({ projectId: z.string(), - datasetId: z.string(), + serviceAccountId: z.string(), }).transform((v) => { return remap$(v, { projectId: "project_id", - datasetId: "dataset_id", + serviceAccountId: "service_account_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpBigQueryDataset$ { - /** @deprecated use `GcpBigQueryDataset$inboundSchema` instead. */ - export const inboundSchema = GcpBigQueryDataset$inboundSchema; - /** @deprecated use `GcpBigQueryDataset$outboundSchema` instead. */ - export const outboundSchema = GcpBigQueryDataset$outboundSchema; - /** @deprecated use `GcpBigQueryDataset$Outbound` instead. */ - export type Outbound = GcpBigQueryDataset$Outbound; -} - -export function gcpBigQueryDatasetToJSON( - gcpBigQueryDataset: GcpBigQueryDataset, +export function openaiPlatformServiceAccountToJSON( + openaiPlatformServiceAccount: OpenaiPlatformServiceAccount, ): string { return JSON.stringify( - GcpBigQueryDataset$outboundSchema.parse(gcpBigQueryDataset), + OpenaiPlatformServiceAccount$outboundSchema.parse( + openaiPlatformServiceAccount, + ), ); } - -export function gcpBigQueryDatasetFromJSON( +export function openaiPlatformServiceAccountFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( - jsonString, - (x) => GcpBigQueryDataset$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpBigQueryDataset' from JSON`, + jsonString, + (x) => OpenaiPlatformServiceAccount$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OpenaiPlatformServiceAccount' from JSON`, ); } /** @internal */ -export const GcpBigQueryTable$inboundSchema: z.ZodType< - GcpBigQueryTable, +export const AnthropicWorkspace$inboundSchema: z.ZodType< + AnthropicWorkspace, z.ZodTypeDef, unknown > = z.object({ - project_id: z.string(), - dataset_id: z.string(), - table_id: z.string(), + workspace_id: z.string(), }).transform((v) => { return remap$(v, { - "project_id": "projectId", - "dataset_id": "datasetId", - "table_id": "tableId", + "workspace_id": "workspaceId", }); }); - /** @internal */ -export type GcpBigQueryTable$Outbound = { - project_id: string; - dataset_id: string; - table_id: string; +export type AnthropicWorkspace$Outbound = { + workspace_id: string; }; /** @internal */ -export const GcpBigQueryTable$outboundSchema: z.ZodType< - GcpBigQueryTable$Outbound, +export const AnthropicWorkspace$outboundSchema: z.ZodType< + AnthropicWorkspace$Outbound, z.ZodTypeDef, - GcpBigQueryTable + AnthropicWorkspace > = z.object({ - projectId: z.string(), - datasetId: z.string(), - tableId: z.string(), + workspaceId: z.string(), }).transform((v) => { return remap$(v, { - projectId: "project_id", - datasetId: "dataset_id", - tableId: "table_id", + workspaceId: "workspace_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpBigQueryTable$ { - /** @deprecated use `GcpBigQueryTable$inboundSchema` instead. */ - export const inboundSchema = GcpBigQueryTable$inboundSchema; - /** @deprecated use `GcpBigQueryTable$outboundSchema` instead. */ - export const outboundSchema = GcpBigQueryTable$outboundSchema; - /** @deprecated use `GcpBigQueryTable$Outbound` instead. */ - export type Outbound = GcpBigQueryTable$Outbound; -} - -export function gcpBigQueryTableToJSON( - gcpBigQueryTable: GcpBigQueryTable, +export function anthropicWorkspaceToJSON( + anthropicWorkspace: AnthropicWorkspace, ): string { return JSON.stringify( - GcpBigQueryTable$outboundSchema.parse(gcpBigQueryTable), + AnthropicWorkspace$outboundSchema.parse(anthropicWorkspace), ); } - -export function gcpBigQueryTableFromJSON( +export function anthropicWorkspaceFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpBigQueryTable$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpBigQueryTable' from JSON`, + (x) => AnthropicWorkspace$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AnthropicWorkspace' from JSON`, ); } /** @internal */ -export const GcpFolder$inboundSchema: z.ZodType< - GcpFolder, +export const OracleFusionRole$inboundSchema: z.ZodType< + OracleFusionRole, z.ZodTypeDef, unknown > = z.object({ - folder_id: z.string(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "folder_id": "folderId", + "role_id": "roleId", }); }); - /** @internal */ -export type GcpFolder$Outbound = { - folder_id: string; +export type OracleFusionRole$Outbound = { + role_id: string; }; /** @internal */ -export const GcpFolder$outboundSchema: z.ZodType< - GcpFolder$Outbound, +export const OracleFusionRole$outboundSchema: z.ZodType< + OracleFusionRole$Outbound, z.ZodTypeDef, - GcpFolder + OracleFusionRole > = z.object({ - folderId: z.string(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - folderId: "folder_id", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpFolder$ { - /** @deprecated use `GcpFolder$inboundSchema` instead. */ - export const inboundSchema = GcpFolder$inboundSchema; - /** @deprecated use `GcpFolder$outboundSchema` instead. */ - export const outboundSchema = GcpFolder$outboundSchema; - /** @deprecated use `GcpFolder$Outbound` instead. */ - export type Outbound = GcpFolder$Outbound; -} - -export function gcpFolderToJSON(gcpFolder: GcpFolder): string { - return JSON.stringify(GcpFolder$outboundSchema.parse(gcpFolder)); +export function oracleFusionRoleToJSON( + oracleFusionRole: OracleFusionRole, +): string { + return JSON.stringify( + OracleFusionRole$outboundSchema.parse(oracleFusionRole), + ); } - -export function gcpFolderFromJSON( +export function oracleFusionRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpFolder$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpFolder' from JSON`, + (x) => OracleFusionRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'OracleFusionRole' from JSON`, ); } /** @internal */ -export const GcpGkeCluster$inboundSchema: z.ZodType< - GcpGkeCluster, +export const DevinOrganization$inboundSchema: z.ZodType< + DevinOrganization, z.ZodTypeDef, unknown > = z.object({ - cluster_name: z.string(), + org_id: z.string(), }).transform((v) => { return remap$(v, { - "cluster_name": "clusterName", + "org_id": "orgId", }); }); - /** @internal */ -export type GcpGkeCluster$Outbound = { - cluster_name: string; +export type DevinOrganization$Outbound = { + org_id: string; }; /** @internal */ -export const GcpGkeCluster$outboundSchema: z.ZodType< - GcpGkeCluster$Outbound, +export const DevinOrganization$outboundSchema: z.ZodType< + DevinOrganization$Outbound, z.ZodTypeDef, - GcpGkeCluster + DevinOrganization > = z.object({ - clusterName: z.string(), + orgId: z.string(), }).transform((v) => { return remap$(v, { - clusterName: "cluster_name", + orgId: "org_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpGkeCluster$ { - /** @deprecated use `GcpGkeCluster$inboundSchema` instead. */ - export const inboundSchema = GcpGkeCluster$inboundSchema; - /** @deprecated use `GcpGkeCluster$outboundSchema` instead. */ - export const outboundSchema = GcpGkeCluster$outboundSchema; - /** @deprecated use `GcpGkeCluster$Outbound` instead. */ - export type Outbound = GcpGkeCluster$Outbound; -} - -export function gcpGkeClusterToJSON(gcpGkeCluster: GcpGkeCluster): string { - return JSON.stringify(GcpGkeCluster$outboundSchema.parse(gcpGkeCluster)); +export function devinOrganizationToJSON( + devinOrganization: DevinOrganization, +): string { + return JSON.stringify( + DevinOrganization$outboundSchema.parse(devinOrganization), + ); } - -export function gcpGkeClusterFromJSON( +export function devinOrganizationFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpGkeCluster$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpGkeCluster' from JSON`, + (x) => DevinOrganization$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DevinOrganization' from JSON`, ); } /** @internal */ -export const GcpProject$inboundSchema: z.ZodType< - GcpProject, +export const DevinRole$inboundSchema: z.ZodType< + DevinRole, z.ZodTypeDef, unknown > = z.object({ - project_id: z.string(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "project_id": "projectId", + "role_id": "roleId", }); }); - /** @internal */ -export type GcpProject$Outbound = { - project_id: string; +export type DevinRole$Outbound = { + role_id: string; }; /** @internal */ -export const GcpProject$outboundSchema: z.ZodType< - GcpProject$Outbound, +export const DevinRole$outboundSchema: z.ZodType< + DevinRole$Outbound, z.ZodTypeDef, - GcpProject + DevinRole > = z.object({ - projectId: z.string(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - projectId: "project_id", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpProject$ { - /** @deprecated use `GcpProject$inboundSchema` instead. */ - export const inboundSchema = GcpProject$inboundSchema; - /** @deprecated use `GcpProject$outboundSchema` instead. */ - export const outboundSchema = GcpProject$outboundSchema; - /** @deprecated use `GcpProject$Outbound` instead. */ - export type Outbound = GcpProject$Outbound; -} - -export function gcpProjectToJSON(gcpProject: GcpProject): string { - return JSON.stringify(GcpProject$outboundSchema.parse(gcpProject)); +export function devinRoleToJSON(devinRole: DevinRole): string { + return JSON.stringify(DevinRole$outboundSchema.parse(devinRole)); } - -export function gcpProjectFromJSON( +export function devinRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpProject$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpProject' from JSON`, + (x) => DevinRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DevinRole' from JSON`, ); } /** @internal */ -export const GcpSqlInstance$inboundSchema: z.ZodType< - GcpSqlInstance, +export const NetsuiteRole$inboundSchema: z.ZodType< + NetsuiteRole, z.ZodTypeDef, unknown > = z.object({ - instance_id: z.string(), - project_id: z.string(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "instance_id": "instanceId", - "project_id": "projectId", + "role_id": "roleId", }); }); - /** @internal */ -export type GcpSqlInstance$Outbound = { - instance_id: string; - project_id: string; +export type NetsuiteRole$Outbound = { + role_id: string; }; /** @internal */ -export const GcpSqlInstance$outboundSchema: z.ZodType< - GcpSqlInstance$Outbound, +export const NetsuiteRole$outboundSchema: z.ZodType< + NetsuiteRole$Outbound, z.ZodTypeDef, - GcpSqlInstance + NetsuiteRole > = z.object({ - instanceId: z.string(), - projectId: z.string(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - instanceId: "instance_id", - projectId: "project_id", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpSqlInstance$ { - /** @deprecated use `GcpSqlInstance$inboundSchema` instead. */ - export const inboundSchema = GcpSqlInstance$inboundSchema; - /** @deprecated use `GcpSqlInstance$outboundSchema` instead. */ - export const outboundSchema = GcpSqlInstance$outboundSchema; - /** @deprecated use `GcpSqlInstance$Outbound` instead. */ - export type Outbound = GcpSqlInstance$Outbound; -} - -export function gcpSqlInstanceToJSON(gcpSqlInstance: GcpSqlInstance): string { - return JSON.stringify(GcpSqlInstance$outboundSchema.parse(gcpSqlInstance)); +export function netsuiteRoleToJSON(netsuiteRole: NetsuiteRole): string { + return JSON.stringify(NetsuiteRole$outboundSchema.parse(netsuiteRole)); } - -export function gcpSqlInstanceFromJSON( +export function netsuiteRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpSqlInstance$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpSqlInstance' from JSON`, + (x) => NetsuiteRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NetsuiteRole' from JSON`, ); } /** @internal */ -export const GcpServiceAccount$inboundSchema: z.ZodType< - GcpServiceAccount, +export const DatadogRole$inboundSchema: z.ZodType< + DatadogRole, z.ZodTypeDef, unknown > = z.object({ - email: z.string(), - service_account_id: z.string(), - project_id: z.string(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "service_account_id": "serviceAccountId", - "project_id": "projectId", + "role_id": "roleId", }); }); - /** @internal */ -export type GcpServiceAccount$Outbound = { - email: string; - service_account_id: string; - project_id: string; +export type DatadogRole$Outbound = { + role_id: string; }; /** @internal */ -export const GcpServiceAccount$outboundSchema: z.ZodType< - GcpServiceAccount$Outbound, +export const DatadogRole$outboundSchema: z.ZodType< + DatadogRole$Outbound, z.ZodTypeDef, - GcpServiceAccount + DatadogRole > = z.object({ - email: z.string(), - serviceAccountId: z.string(), - projectId: z.string(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - serviceAccountId: "service_account_id", - projectId: "project_id", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GcpServiceAccount$ { - /** @deprecated use `GcpServiceAccount$inboundSchema` instead. */ - export const inboundSchema = GcpServiceAccount$inboundSchema; - /** @deprecated use `GcpServiceAccount$outboundSchema` instead. */ - export const outboundSchema = GcpServiceAccount$outboundSchema; - /** @deprecated use `GcpServiceAccount$Outbound` instead. */ - export type Outbound = GcpServiceAccount$Outbound; -} - -export function gcpServiceAccountToJSON( - gcpServiceAccount: GcpServiceAccount, -): string { - return JSON.stringify( - GcpServiceAccount$outboundSchema.parse(gcpServiceAccount), - ); +export function datadogRoleToJSON(datadogRole: DatadogRole): string { + return JSON.stringify(DatadogRole$outboundSchema.parse(datadogRole)); } - -export function gcpServiceAccountFromJSON( +export function datadogRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GcpServiceAccount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GcpServiceAccount' from JSON`, + (x) => DatadogRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DatadogRole' from JSON`, ); } /** @internal */ -export const GoogleWorkspaceRole$inboundSchema: z.ZodType< - GoogleWorkspaceRole, +export const ClickhouseDatabase$inboundSchema: z.ZodType< + ClickhouseDatabase, z.ZodTypeDef, unknown > = z.object({ - role_id: z.string(), + database_name: z.string(), }).transform((v) => { return remap$(v, { - "role_id": "roleId", + "database_name": "databaseName", }); }); - /** @internal */ -export type GoogleWorkspaceRole$Outbound = { - role_id: string; +export type ClickhouseDatabase$Outbound = { + database_name: string; }; /** @internal */ -export const GoogleWorkspaceRole$outboundSchema: z.ZodType< - GoogleWorkspaceRole$Outbound, +export const ClickhouseDatabase$outboundSchema: z.ZodType< + ClickhouseDatabase$Outbound, z.ZodTypeDef, - GoogleWorkspaceRole + ClickhouseDatabase > = z.object({ - roleId: z.string(), + databaseName: z.string(), }).transform((v) => { return remap$(v, { - roleId: "role_id", + databaseName: "database_name", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GoogleWorkspaceRole$ { - /** @deprecated use `GoogleWorkspaceRole$inboundSchema` instead. */ - export const inboundSchema = GoogleWorkspaceRole$inboundSchema; - /** @deprecated use `GoogleWorkspaceRole$outboundSchema` instead. */ - export const outboundSchema = GoogleWorkspaceRole$outboundSchema; - /** @deprecated use `GoogleWorkspaceRole$Outbound` instead. */ - export type Outbound = GoogleWorkspaceRole$Outbound; -} - -export function googleWorkspaceRoleToJSON( - googleWorkspaceRole: GoogleWorkspaceRole, +export function clickhouseDatabaseToJSON( + clickhouseDatabase: ClickhouseDatabase, ): string { return JSON.stringify( - GoogleWorkspaceRole$outboundSchema.parse(googleWorkspaceRole), + ClickhouseDatabase$outboundSchema.parse(clickhouseDatabase), ); } - -export function googleWorkspaceRoleFromJSON( +export function clickhouseDatabaseFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GoogleWorkspaceRole$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GoogleWorkspaceRole' from JSON`, + (x) => ClickhouseDatabase$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClickhouseDatabase' from JSON`, ); } /** @internal */ -export const GithubRepo$inboundSchema: z.ZodType< - GithubRepo, +export const ClickhouseTable$inboundSchema: z.ZodType< + ClickhouseTable, z.ZodTypeDef, unknown > = z.object({ - repo_id: z.string().optional(), - repo_name: z.string(), + database_name: z.string(), + table_name: z.string(), }).transform((v) => { return remap$(v, { - "repo_id": "repoId", - "repo_name": "repoName", + "database_name": "databaseName", + "table_name": "tableName", }); }); - /** @internal */ -export type GithubRepo$Outbound = { - repo_id?: string | undefined; - repo_name: string; +export type ClickhouseTable$Outbound = { + database_name: string; + table_name: string; }; /** @internal */ -export const GithubRepo$outboundSchema: z.ZodType< - GithubRepo$Outbound, +export const ClickhouseTable$outboundSchema: z.ZodType< + ClickhouseTable$Outbound, z.ZodTypeDef, - GithubRepo + ClickhouseTable > = z.object({ - repoId: z.string().optional(), - repoName: z.string(), + databaseName: z.string(), + tableName: z.string(), }).transform((v) => { return remap$(v, { - repoId: "repo_id", - repoName: "repo_name", + databaseName: "database_name", + tableName: "table_name", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GithubRepo$ { - /** @deprecated use `GithubRepo$inboundSchema` instead. */ - export const inboundSchema = GithubRepo$inboundSchema; - /** @deprecated use `GithubRepo$outboundSchema` instead. */ - export const outboundSchema = GithubRepo$outboundSchema; - /** @deprecated use `GithubRepo$Outbound` instead. */ - export type Outbound = GithubRepo$Outbound; -} - -export function githubRepoToJSON(githubRepo: GithubRepo): string { - return JSON.stringify(GithubRepo$outboundSchema.parse(githubRepo)); +export function clickhouseTableToJSON( + clickhouseTable: ClickhouseTable, +): string { + return JSON.stringify(ClickhouseTable$outboundSchema.parse(clickhouseTable)); } - -export function githubRepoFromJSON( +export function clickhouseTableFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GithubRepo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GithubRepo' from JSON`, + (x) => ClickhouseTable$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ClickhouseTable' from JSON`, ); } /** @internal */ -export const GitlabProject$inboundSchema: z.ZodType< - GitlabProject, +export const GrafanaFolder$inboundSchema: z.ZodType< + GrafanaFolder, z.ZodTypeDef, unknown > = z.object({ - project_id: z.string(), + folder_uid: z.string(), }).transform((v) => { return remap$(v, { - "project_id": "projectId", + "folder_uid": "folderUid", }); }); - /** @internal */ -export type GitlabProject$Outbound = { - project_id: string; +export type GrafanaFolder$Outbound = { + folder_uid: string; }; /** @internal */ -export const GitlabProject$outboundSchema: z.ZodType< - GitlabProject$Outbound, +export const GrafanaFolder$outboundSchema: z.ZodType< + GrafanaFolder$Outbound, z.ZodTypeDef, - GitlabProject + GrafanaFolder > = z.object({ - projectId: z.string(), + folderUid: z.string(), }).transform((v) => { return remap$(v, { - projectId: "project_id", + folderUid: "folder_uid", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GitlabProject$ { - /** @deprecated use `GitlabProject$inboundSchema` instead. */ - export const inboundSchema = GitlabProject$inboundSchema; - /** @deprecated use `GitlabProject$outboundSchema` instead. */ - export const outboundSchema = GitlabProject$outboundSchema; - /** @deprecated use `GitlabProject$Outbound` instead. */ - export type Outbound = GitlabProject$Outbound; -} - -export function gitlabProjectToJSON(gitlabProject: GitlabProject): string { - return JSON.stringify(GitlabProject$outboundSchema.parse(gitlabProject)); +export function grafanaFolderToJSON(grafanaFolder: GrafanaFolder): string { + return JSON.stringify(GrafanaFolder$outboundSchema.parse(grafanaFolder)); } - -export function gitlabProjectFromJSON( +export function grafanaFolderFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GitlabProject$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GitlabProject' from JSON`, + (x) => GrafanaFolder$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GrafanaFolder' from JSON`, ); } /** @internal */ -export const OktaApp$inboundSchema: z.ZodType = - z.object({ - app_id: z.string(), - }).transform((v) => { - return remap$(v, { - "app_id": "appId", - }); +export const GrafanaDashboard$inboundSchema: z.ZodType< + GrafanaDashboard, + z.ZodTypeDef, + unknown +> = z.object({ + dashboard_uid: z.string(), +}).transform((v) => { + return remap$(v, { + "dashboard_uid": "dashboardUid", }); - +}); /** @internal */ -export type OktaApp$Outbound = { - app_id: string; +export type GrafanaDashboard$Outbound = { + dashboard_uid: string; }; /** @internal */ -export const OktaApp$outboundSchema: z.ZodType< - OktaApp$Outbound, +export const GrafanaDashboard$outboundSchema: z.ZodType< + GrafanaDashboard$Outbound, z.ZodTypeDef, - OktaApp + GrafanaDashboard > = z.object({ - appId: z.string(), + dashboardUid: z.string(), }).transform((v) => { return remap$(v, { - appId: "app_id", + dashboardUid: "dashboard_uid", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OktaApp$ { - /** @deprecated use `OktaApp$inboundSchema` instead. */ - export const inboundSchema = OktaApp$inboundSchema; - /** @deprecated use `OktaApp$outboundSchema` instead. */ - export const outboundSchema = OktaApp$outboundSchema; - /** @deprecated use `OktaApp$Outbound` instead. */ - export type Outbound = OktaApp$Outbound; -} - -export function oktaAppToJSON(oktaApp: OktaApp): string { - return JSON.stringify(OktaApp$outboundSchema.parse(oktaApp)); +export function grafanaDashboardToJSON( + grafanaDashboard: GrafanaDashboard, +): string { + return JSON.stringify( + GrafanaDashboard$outboundSchema.parse(grafanaDashboard), + ); } - -export function oktaAppFromJSON( +export function grafanaDashboardFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => OktaApp$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OktaApp' from JSON`, + (x) => GrafanaDashboard$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GrafanaDashboard' from JSON`, ); } /** @internal */ -export const OktaStandardRole$inboundSchema: z.ZodType< - OktaStandardRole, +export const GrafanaRole$inboundSchema: z.ZodType< + GrafanaRole, z.ZodTypeDef, unknown > = z.object({ - role_type: z.string(), + role_uid: z.string(), }).transform((v) => { return remap$(v, { - "role_type": "roleType", + "role_uid": "roleUid", }); }); - /** @internal */ -export type OktaStandardRole$Outbound = { - role_type: string; +export type GrafanaRole$Outbound = { + role_uid: string; }; /** @internal */ -export const OktaStandardRole$outboundSchema: z.ZodType< - OktaStandardRole$Outbound, +export const GrafanaRole$outboundSchema: z.ZodType< + GrafanaRole$Outbound, z.ZodTypeDef, - OktaStandardRole + GrafanaRole > = z.object({ - roleType: z.string(), + roleUid: z.string(), }).transform((v) => { return remap$(v, { - roleType: "role_type", + roleUid: "role_uid", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OktaStandardRole$ { - /** @deprecated use `OktaStandardRole$inboundSchema` instead. */ - export const inboundSchema = OktaStandardRole$inboundSchema; - /** @deprecated use `OktaStandardRole$outboundSchema` instead. */ - export const outboundSchema = OktaStandardRole$outboundSchema; - /** @deprecated use `OktaStandardRole$Outbound` instead. */ - export type Outbound = OktaStandardRole$Outbound; -} - -export function oktaStandardRoleToJSON( - oktaStandardRole: OktaStandardRole, -): string { - return JSON.stringify( - OktaStandardRole$outboundSchema.parse(oktaStandardRole), - ); +export function grafanaRoleToJSON(grafanaRole: GrafanaRole): string { + return JSON.stringify(GrafanaRole$outboundSchema.parse(grafanaRole)); } - -export function oktaStandardRoleFromJSON( +export function grafanaRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => OktaStandardRole$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OktaStandardRole' from JSON`, + (x) => GrafanaRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GrafanaRole' from JSON`, ); } /** @internal */ -export const OktaCustomRole$inboundSchema: z.ZodType< - OktaCustomRole, +export const ZendeskRole$inboundSchema: z.ZodType< + ZendeskRole, z.ZodTypeDef, unknown > = z.object({ @@ -1971,17 +4612,16 @@ export const OktaCustomRole$inboundSchema: z.ZodType< "role_id": "roleId", }); }); - /** @internal */ -export type OktaCustomRole$Outbound = { +export type ZendeskRole$Outbound = { role_id: string; }; /** @internal */ -export const OktaCustomRole$outboundSchema: z.ZodType< - OktaCustomRole$Outbound, +export const ZendeskRole$outboundSchema: z.ZodType< + ZendeskRole$Outbound, z.ZodTypeDef, - OktaCustomRole + ZendeskRole > = z.object({ roleId: z.string(), }).transform((v) => { @@ -1990,223 +4630,157 @@ export const OktaCustomRole$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OktaCustomRole$ { - /** @deprecated use `OktaCustomRole$inboundSchema` instead. */ - export const inboundSchema = OktaCustomRole$inboundSchema; - /** @deprecated use `OktaCustomRole$outboundSchema` instead. */ - export const outboundSchema = OktaCustomRole$outboundSchema; - /** @deprecated use `OktaCustomRole$Outbound` instead. */ - export type Outbound = OktaCustomRole$Outbound; -} - -export function oktaCustomRoleToJSON(oktaCustomRole: OktaCustomRole): string { - return JSON.stringify(OktaCustomRole$outboundSchema.parse(oktaCustomRole)); +export function zendeskRoleToJSON(zendeskRole: ZendeskRole): string { + return JSON.stringify(ZendeskRole$outboundSchema.parse(zendeskRole)); } - -export function oktaCustomRoleFromJSON( +export function zendeskRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => OktaCustomRole$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OktaCustomRole' from JSON`, + (x) => ZendeskRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ZendeskRole' from JSON`, ); } /** @internal */ -export const PagerdutyRole$inboundSchema: z.ZodType< - PagerdutyRole, +export const HubspotRole$inboundSchema: z.ZodType< + HubspotRole, z.ZodTypeDef, unknown > = z.object({ - role_name: z.string(), + role_id: z.string(), }).transform((v) => { return remap$(v, { - "role_name": "roleName", + "role_id": "roleId", }); }); - /** @internal */ -export type PagerdutyRole$Outbound = { - role_name: string; +export type HubspotRole$Outbound = { + role_id: string; }; /** @internal */ -export const PagerdutyRole$outboundSchema: z.ZodType< - PagerdutyRole$Outbound, +export const HubspotRole$outboundSchema: z.ZodType< + HubspotRole$Outbound, z.ZodTypeDef, - PagerdutyRole + HubspotRole > = z.object({ - roleName: z.string(), + roleId: z.string(), }).transform((v) => { return remap$(v, { - roleName: "role_name", + roleId: "role_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PagerdutyRole$ { - /** @deprecated use `PagerdutyRole$inboundSchema` instead. */ - export const inboundSchema = PagerdutyRole$inboundSchema; - /** @deprecated use `PagerdutyRole$outboundSchema` instead. */ - export const outboundSchema = PagerdutyRole$outboundSchema; - /** @deprecated use `PagerdutyRole$Outbound` instead. */ - export type Outbound = PagerdutyRole$Outbound; -} - -export function pagerdutyRoleToJSON(pagerdutyRole: PagerdutyRole): string { - return JSON.stringify(PagerdutyRole$outboundSchema.parse(pagerdutyRole)); +export function hubspotRoleToJSON(hubspotRole: HubspotRole): string { + return JSON.stringify(HubspotRole$outboundSchema.parse(hubspotRole)); } - -export function pagerdutyRoleFromJSON( +export function hubspotRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => PagerdutyRole$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PagerdutyRole' from JSON`, + (x) => HubspotRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'HubspotRole' from JSON`, ); } /** @internal */ -export const SalesforcePermissionSet$inboundSchema: z.ZodType< - SalesforcePermissionSet, +export const AlicloudRamRole$inboundSchema: z.ZodType< + AlicloudRamRole, z.ZodTypeDef, unknown > = z.object({ - permission_set_id: z.string(), + role_arn: z.string(), }).transform((v) => { return remap$(v, { - "permission_set_id": "permissionSetId", + "role_arn": "roleArn", }); }); - /** @internal */ -export type SalesforcePermissionSet$Outbound = { - permission_set_id: string; +export type AlicloudRamRole$Outbound = { + role_arn: string; }; /** @internal */ -export const SalesforcePermissionSet$outboundSchema: z.ZodType< - SalesforcePermissionSet$Outbound, +export const AlicloudRamRole$outboundSchema: z.ZodType< + AlicloudRamRole$Outbound, z.ZodTypeDef, - SalesforcePermissionSet + AlicloudRamRole > = z.object({ - permissionSetId: z.string(), + roleArn: z.string(), }).transform((v) => { return remap$(v, { - permissionSetId: "permission_set_id", + roleArn: "role_arn", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SalesforcePermissionSet$ { - /** @deprecated use `SalesforcePermissionSet$inboundSchema` instead. */ - export const inboundSchema = SalesforcePermissionSet$inboundSchema; - /** @deprecated use `SalesforcePermissionSet$outboundSchema` instead. */ - export const outboundSchema = SalesforcePermissionSet$outboundSchema; - /** @deprecated use `SalesforcePermissionSet$Outbound` instead. */ - export type Outbound = SalesforcePermissionSet$Outbound; -} - -export function salesforcePermissionSetToJSON( - salesforcePermissionSet: SalesforcePermissionSet, +export function alicloudRamRoleToJSON( + alicloudRamRole: AlicloudRamRole, ): string { - return JSON.stringify( - SalesforcePermissionSet$outboundSchema.parse(salesforcePermissionSet), - ); + return JSON.stringify(AlicloudRamRole$outboundSchema.parse(alicloudRamRole)); } - -export function salesforcePermissionSetFromJSON( +export function alicloudRamRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => SalesforcePermissionSet$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SalesforcePermissionSet' from JSON`, + (x) => AlicloudRamRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AlicloudRamRole' from JSON`, ); } /** @internal */ -export const SalesforceProfile$inboundSchema: z.ZodType< - SalesforceProfile, +export const AlicloudEcsInstance$inboundSchema: z.ZodType< + AlicloudEcsInstance, z.ZodTypeDef, unknown > = z.object({ - profile_id: z.string(), - user_license_id: z.string(), + instance_id: z.string(), }).transform((v) => { return remap$(v, { - "profile_id": "profileId", - "user_license_id": "userLicenseId", + "instance_id": "instanceId", }); }); - /** @internal */ -export type SalesforceProfile$Outbound = { - profile_id: string; - user_license_id: string; +export type AlicloudEcsInstance$Outbound = { + instance_id: string; }; /** @internal */ -export const SalesforceProfile$outboundSchema: z.ZodType< - SalesforceProfile$Outbound, +export const AlicloudEcsInstance$outboundSchema: z.ZodType< + AlicloudEcsInstance$Outbound, z.ZodTypeDef, - SalesforceProfile + AlicloudEcsInstance > = z.object({ - profileId: z.string(), - userLicenseId: z.string(), + instanceId: z.string(), }).transform((v) => { return remap$(v, { - profileId: "profile_id", - userLicenseId: "user_license_id", + instanceId: "instance_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SalesforceProfile$ { - /** @deprecated use `SalesforceProfile$inboundSchema` instead. */ - export const inboundSchema = SalesforceProfile$inboundSchema; - /** @deprecated use `SalesforceProfile$outboundSchema` instead. */ - export const outboundSchema = SalesforceProfile$outboundSchema; - /** @deprecated use `SalesforceProfile$Outbound` instead. */ - export type Outbound = SalesforceProfile$Outbound; -} - -export function salesforceProfileToJSON( - salesforceProfile: SalesforceProfile, +export function alicloudEcsInstanceToJSON( + alicloudEcsInstance: AlicloudEcsInstance, ): string { return JSON.stringify( - SalesforceProfile$outboundSchema.parse(salesforceProfile), + AlicloudEcsInstance$outboundSchema.parse(alicloudEcsInstance), ); } - -export function salesforceProfileFromJSON( +export function alicloudEcsInstanceFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => SalesforceProfile$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SalesforceProfile' from JSON`, + (x) => AlicloudEcsInstance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AlicloudEcsInstance' from JSON`, ); } /** @internal */ -export const SalesforceRole$inboundSchema: z.ZodType< - SalesforceRole, +export const ZoomRole$inboundSchema: z.ZodType< + ZoomRole, z.ZodTypeDef, unknown > = z.object({ @@ -2216,17 +4790,16 @@ export const SalesforceRole$inboundSchema: z.ZodType< "role_id": "roleId", }); }); - /** @internal */ -export type SalesforceRole$Outbound = { +export type ZoomRole$Outbound = { role_id: string; }; /** @internal */ -export const SalesforceRole$outboundSchema: z.ZodType< - SalesforceRole$Outbound, +export const ZoomRole$outboundSchema: z.ZodType< + ZoomRole$Outbound, z.ZodTypeDef, - SalesforceRole + ZoomRole > = z.object({ roleId: z.string(), }).transform((v) => { @@ -2235,88 +4808,59 @@ export const SalesforceRole$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SalesforceRole$ { - /** @deprecated use `SalesforceRole$inboundSchema` instead. */ - export const inboundSchema = SalesforceRole$inboundSchema; - /** @deprecated use `SalesforceRole$outboundSchema` instead. */ - export const outboundSchema = SalesforceRole$outboundSchema; - /** @deprecated use `SalesforceRole$Outbound` instead. */ - export type Outbound = SalesforceRole$Outbound; -} - -export function salesforceRoleToJSON(salesforceRole: SalesforceRole): string { - return JSON.stringify(SalesforceRole$outboundSchema.parse(salesforceRole)); +export function zoomRoleToJSON(zoomRole: ZoomRole): string { + return JSON.stringify(ZoomRole$outboundSchema.parse(zoomRole)); } - -export function salesforceRoleFromJSON( +export function zoomRoleFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => SalesforceRole$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SalesforceRole' from JSON`, + (x) => ZoomRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ZoomRole' from JSON`, ); } /** @internal */ -export const TeleportRole$inboundSchema: z.ZodType< - TeleportRole, +export const ZoomLicense$inboundSchema: z.ZodType< + ZoomLicense, z.ZodTypeDef, unknown > = z.object({ - role_name: z.string(), + license_type: z.string(), }).transform((v) => { return remap$(v, { - "role_name": "roleName", + "license_type": "licenseType", }); }); - /** @internal */ -export type TeleportRole$Outbound = { - role_name: string; +export type ZoomLicense$Outbound = { + license_type: string; }; /** @internal */ -export const TeleportRole$outboundSchema: z.ZodType< - TeleportRole$Outbound, +export const ZoomLicense$outboundSchema: z.ZodType< + ZoomLicense$Outbound, z.ZodTypeDef, - TeleportRole + ZoomLicense > = z.object({ - roleName: z.string(), + licenseType: z.string(), }).transform((v) => { return remap$(v, { - roleName: "role_name", + licenseType: "license_type", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TeleportRole$ { - /** @deprecated use `TeleportRole$inboundSchema` instead. */ - export const inboundSchema = TeleportRole$inboundSchema; - /** @deprecated use `TeleportRole$outboundSchema` instead. */ - export const outboundSchema = TeleportRole$outboundSchema; - /** @deprecated use `TeleportRole$Outbound` instead. */ - export type Outbound = TeleportRole$Outbound; -} - -export function teleportRoleToJSON(teleportRole: TeleportRole): string { - return JSON.stringify(TeleportRole$outboundSchema.parse(teleportRole)); +export function zoomLicenseToJSON(zoomLicense: ZoomLicense): string { + return JSON.stringify(ZoomLicense$outboundSchema.parse(zoomLicense)); } - -export function teleportRoleFromJSON( +export function zoomLicenseFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => TeleportRole$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TeleportRole' from JSON`, + (x) => ZoomLicense$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ZoomLicense' from JSON`, ); } @@ -2326,12 +4870,41 @@ export const ResourceRemoteInfo$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ + databricks_account_service_principal: z.lazy(() => + DatabricksAccountServicePrincipal$inboundSchema + ).optional(), + azure_subscription: z.lazy(() => AzureSubscription$inboundSchema).optional(), + azure_resource_group: z.lazy(() => AzureResourceGroup$inboundSchema) + .optional(), + azure_management_group: z.lazy(() => AzureManagementGroup$inboundSchema) + .optional(), + azure_virtual_machine: z.lazy(() => AzureVirtualMachine$inboundSchema) + .optional(), + azure_storage_account: z.lazy(() => AzureStorageAccount$inboundSchema) + .optional(), + azure_storage_container: z.lazy(() => AzureStorageContainer$inboundSchema) + .optional(), + azure_sql_server: z.lazy(() => AzureSqlServer$inboundSchema).optional(), + azure_sql_database: z.lazy(() => AzureSqlDatabase$inboundSchema).optional(), + azure_sql_managed_instance: z.lazy(() => + AzureSqlManagedInstance$inboundSchema + ).optional(), + azure_sql_managed_database: z.lazy(() => + AzureSqlManagedDatabase$inboundSchema + ).optional(), + azure_user_assigned_managed_identity: z.lazy(() => + AzureUserAssignedManagedIdentity$inboundSchema + ).optional(), + azure_enterprise_app: z.lazy(() => AzureEnterpriseApp$inboundSchema) + .optional(), + azure_entra_id_role: z.lazy(() => AzureEntraIdRole$inboundSchema).optional(), aws_organizational_unit: z.lazy(() => AwsOrganizationalUnit$inboundSchema) .optional(), aws_account: z.lazy(() => AwsAccount$inboundSchema).optional(), aws_permission_set: z.lazy(() => AwsPermissionSet$inboundSchema).optional(), aws_iam_role: z.lazy(() => AwsIamRole$inboundSchema).optional(), aws_ec2_instance: z.lazy(() => AwsEc2Instance$inboundSchema).optional(), + aws_rds_cluster: z.lazy(() => AwsRdsCluster$inboundSchema).optional(), aws_rds_instance: z.lazy(() => AwsRdsInstance$inboundSchema).optional(), aws_eks_cluster: z.lazy(() => AwsEksCluster$inboundSchema).optional(), custom_connector: z.lazy(() => CustomConnector$inboundSchema).optional(), @@ -2350,23 +4923,82 @@ export const ResourceRemoteInfo$inboundSchema: z.ZodType< google_workspace_role: z.lazy(() => GoogleWorkspaceRole$inboundSchema) .optional(), github_repo: z.lazy(() => GithubRepo$inboundSchema).optional(), + github_org_role: z.lazy(() => GithubOrgRole$inboundSchema).optional(), + github_org: z.lazy(() => GithubOrg$inboundSchema).optional(), + github_enterprise_role: z.lazy(() => GithubEnterpriseRole$inboundSchema) + .optional(), gitlab_project: z.lazy(() => GitlabProject$inboundSchema).optional(), okta_app: z.lazy(() => OktaApp$inboundSchema).optional(), okta_standard_role: z.lazy(() => OktaStandardRole$inboundSchema).optional(), okta_custom_role: z.lazy(() => OktaCustomRole$inboundSchema).optional(), + snowflake_database: z.lazy(() => SnowflakeDatabase$inboundSchema).optional(), + snowflake_schema: z.lazy(() => SnowflakeSchema$inboundSchema).optional(), + snowflake_table: z.lazy(() => SnowflakeTable$inboundSchema).optional(), + ilevel_advanced_role: z.lazy(() => IlevelAdvancedRole$inboundSchema) + .optional(), + tailscale_ssh: z.lazy(() => TailscaleSsh$inboundSchema).optional(), + twingate_resource: z.lazy(() => TwingateResource$inboundSchema).optional(), pagerduty_role: z.lazy(() => PagerdutyRole$inboundSchema).optional(), + workday_role: z.lazy(() => WorkdayRole$inboundSchema).optional(), salesforce_permission_set: z.lazy(() => SalesforcePermissionSet$inboundSchema) .optional(), salesforce_profile: z.lazy(() => SalesforceProfile$inboundSchema).optional(), + docusign_permission_profile: z.lazy(() => + DocusignPermissionProfile$inboundSchema + ).optional(), salesforce_role: z.lazy(() => SalesforceRole$inboundSchema).optional(), teleport_role: z.lazy(() => TeleportRole$inboundSchema).optional(), + datastax_astra_role: z.lazy(() => DatastaxAstraRole$inboundSchema).optional(), + coupa_role: z.lazy(() => CoupaRole$inboundSchema).optional(), + cursor_organization: z.lazy(() => CursorOrganization$inboundSchema) + .optional(), + openai_platform_project: z.lazy(() => OpenaiPlatformProject$inboundSchema) + .optional(), + openai_platform_service_account: z.lazy(() => + OpenaiPlatformServiceAccount$inboundSchema + ).optional(), + anthropic_workspace: z.lazy(() => AnthropicWorkspace$inboundSchema) + .optional(), + oracle_fusion_role: z.lazy(() => OracleFusionRole$inboundSchema).optional(), + devin_organization: z.lazy(() => DevinOrganization$inboundSchema).optional(), + devin_role: z.lazy(() => DevinRole$inboundSchema).optional(), + netsuite_role: z.lazy(() => NetsuiteRole$inboundSchema).optional(), + datadog_role: z.lazy(() => DatadogRole$inboundSchema).optional(), + clickhouse_database: z.lazy(() => ClickhouseDatabase$inboundSchema) + .optional(), + clickhouse_table: z.lazy(() => ClickhouseTable$inboundSchema).optional(), + grafana_folder: z.lazy(() => GrafanaFolder$inboundSchema).optional(), + grafana_dashboard: z.lazy(() => GrafanaDashboard$inboundSchema).optional(), + grafana_role: z.lazy(() => GrafanaRole$inboundSchema).optional(), + zendesk_role: z.lazy(() => ZendeskRole$inboundSchema).optional(), + hubspot_role: z.lazy(() => HubspotRole$inboundSchema).optional(), + alicloud_ram_role: z.lazy(() => AlicloudRamRole$inboundSchema).optional(), + alicloud_ecs_instance: z.lazy(() => AlicloudEcsInstance$inboundSchema) + .optional(), + zoom_role: z.lazy(() => ZoomRole$inboundSchema).optional(), + zoom_license: z.lazy(() => ZoomLicense$inboundSchema).optional(), }).transform((v) => { return remap$(v, { + "databricks_account_service_principal": "databricksAccountServicePrincipal", + "azure_subscription": "azureSubscription", + "azure_resource_group": "azureResourceGroup", + "azure_management_group": "azureManagementGroup", + "azure_virtual_machine": "azureVirtualMachine", + "azure_storage_account": "azureStorageAccount", + "azure_storage_container": "azureStorageContainer", + "azure_sql_server": "azureSqlServer", + "azure_sql_database": "azureSqlDatabase", + "azure_sql_managed_instance": "azureSqlManagedInstance", + "azure_sql_managed_database": "azureSqlManagedDatabase", + "azure_user_assigned_managed_identity": "azureUserAssignedManagedIdentity", + "azure_enterprise_app": "azureEnterpriseApp", + "azure_entra_id_role": "azureEntraIdRole", "aws_organizational_unit": "awsOrganizationalUnit", "aws_account": "awsAccount", "aws_permission_set": "awsPermissionSet", "aws_iam_role": "awsIamRole", "aws_ec2_instance": "awsEc2Instance", + "aws_rds_cluster": "awsRdsCluster", "aws_rds_instance": "awsRdsInstance", "aws_eks_cluster": "awsEksCluster", "custom_connector": "customConnector", @@ -2382,25 +5014,76 @@ export const ResourceRemoteInfo$inboundSchema: z.ZodType< "gcp_service_account": "gcpServiceAccount", "google_workspace_role": "googleWorkspaceRole", "github_repo": "githubRepo", + "github_org_role": "githubOrgRole", + "github_org": "githubOrg", + "github_enterprise_role": "githubEnterpriseRole", "gitlab_project": "gitlabProject", "okta_app": "oktaApp", "okta_standard_role": "oktaStandardRole", "okta_custom_role": "oktaCustomRole", + "snowflake_database": "snowflakeDatabase", + "snowflake_schema": "snowflakeSchema", + "snowflake_table": "snowflakeTable", + "ilevel_advanced_role": "ilevelAdvancedRole", + "tailscale_ssh": "tailscaleSsh", + "twingate_resource": "twingateResource", "pagerduty_role": "pagerdutyRole", + "workday_role": "workdayRole", "salesforce_permission_set": "salesforcePermissionSet", "salesforce_profile": "salesforceProfile", + "docusign_permission_profile": "docusignPermissionProfile", "salesforce_role": "salesforceRole", "teleport_role": "teleportRole", + "datastax_astra_role": "datastaxAstraRole", + "coupa_role": "coupaRole", + "cursor_organization": "cursorOrganization", + "openai_platform_project": "openaiPlatformProject", + "openai_platform_service_account": "openaiPlatformServiceAccount", + "anthropic_workspace": "anthropicWorkspace", + "oracle_fusion_role": "oracleFusionRole", + "devin_organization": "devinOrganization", + "devin_role": "devinRole", + "netsuite_role": "netsuiteRole", + "datadog_role": "datadogRole", + "clickhouse_database": "clickhouseDatabase", + "clickhouse_table": "clickhouseTable", + "grafana_folder": "grafanaFolder", + "grafana_dashboard": "grafanaDashboard", + "grafana_role": "grafanaRole", + "zendesk_role": "zendeskRole", + "hubspot_role": "hubspotRole", + "alicloud_ram_role": "alicloudRamRole", + "alicloud_ecs_instance": "alicloudEcsInstance", + "zoom_role": "zoomRole", + "zoom_license": "zoomLicense", }); }); - /** @internal */ export type ResourceRemoteInfo$Outbound = { + databricks_account_service_principal?: + | DatabricksAccountServicePrincipal$Outbound + | undefined; + azure_subscription?: AzureSubscription$Outbound | undefined; + azure_resource_group?: AzureResourceGroup$Outbound | undefined; + azure_management_group?: AzureManagementGroup$Outbound | undefined; + azure_virtual_machine?: AzureVirtualMachine$Outbound | undefined; + azure_storage_account?: AzureStorageAccount$Outbound | undefined; + azure_storage_container?: AzureStorageContainer$Outbound | undefined; + azure_sql_server?: AzureSqlServer$Outbound | undefined; + azure_sql_database?: AzureSqlDatabase$Outbound | undefined; + azure_sql_managed_instance?: AzureSqlManagedInstance$Outbound | undefined; + azure_sql_managed_database?: AzureSqlManagedDatabase$Outbound | undefined; + azure_user_assigned_managed_identity?: + | AzureUserAssignedManagedIdentity$Outbound + | undefined; + azure_enterprise_app?: AzureEnterpriseApp$Outbound | undefined; + azure_entra_id_role?: AzureEntraIdRole$Outbound | undefined; aws_organizational_unit?: AwsOrganizationalUnit$Outbound | undefined; aws_account?: AwsAccount$Outbound | undefined; aws_permission_set?: AwsPermissionSet$Outbound | undefined; aws_iam_role?: AwsIamRole$Outbound | undefined; aws_ec2_instance?: AwsEc2Instance$Outbound | undefined; + aws_rds_cluster?: AwsRdsCluster$Outbound | undefined; aws_rds_instance?: AwsRdsInstance$Outbound | undefined; aws_eks_cluster?: AwsEksCluster$Outbound | undefined; custom_connector?: CustomConnector$Outbound | undefined; @@ -2416,15 +5099,50 @@ export type ResourceRemoteInfo$Outbound = { gcp_service_account?: GcpServiceAccount$Outbound | undefined; google_workspace_role?: GoogleWorkspaceRole$Outbound | undefined; github_repo?: GithubRepo$Outbound | undefined; + github_org_role?: GithubOrgRole$Outbound | undefined; + github_org?: GithubOrg$Outbound | undefined; + github_enterprise_role?: GithubEnterpriseRole$Outbound | undefined; gitlab_project?: GitlabProject$Outbound | undefined; okta_app?: OktaApp$Outbound | undefined; okta_standard_role?: OktaStandardRole$Outbound | undefined; okta_custom_role?: OktaCustomRole$Outbound | undefined; + snowflake_database?: SnowflakeDatabase$Outbound | undefined; + snowflake_schema?: SnowflakeSchema$Outbound | undefined; + snowflake_table?: SnowflakeTable$Outbound | undefined; + ilevel_advanced_role?: IlevelAdvancedRole$Outbound | undefined; + tailscale_ssh?: TailscaleSsh$Outbound | undefined; + twingate_resource?: TwingateResource$Outbound | undefined; pagerduty_role?: PagerdutyRole$Outbound | undefined; + workday_role?: WorkdayRole$Outbound | undefined; salesforce_permission_set?: SalesforcePermissionSet$Outbound | undefined; salesforce_profile?: SalesforceProfile$Outbound | undefined; + docusign_permission_profile?: DocusignPermissionProfile$Outbound | undefined; salesforce_role?: SalesforceRole$Outbound | undefined; teleport_role?: TeleportRole$Outbound | undefined; + datastax_astra_role?: DatastaxAstraRole$Outbound | undefined; + coupa_role?: CoupaRole$Outbound | undefined; + cursor_organization?: CursorOrganization$Outbound | undefined; + openai_platform_project?: OpenaiPlatformProject$Outbound | undefined; + openai_platform_service_account?: + | OpenaiPlatformServiceAccount$Outbound + | undefined; + anthropic_workspace?: AnthropicWorkspace$Outbound | undefined; + oracle_fusion_role?: OracleFusionRole$Outbound | undefined; + devin_organization?: DevinOrganization$Outbound | undefined; + devin_role?: DevinRole$Outbound | undefined; + netsuite_role?: NetsuiteRole$Outbound | undefined; + datadog_role?: DatadogRole$Outbound | undefined; + clickhouse_database?: ClickhouseDatabase$Outbound | undefined; + clickhouse_table?: ClickhouseTable$Outbound | undefined; + grafana_folder?: GrafanaFolder$Outbound | undefined; + grafana_dashboard?: GrafanaDashboard$Outbound | undefined; + grafana_role?: GrafanaRole$Outbound | undefined; + zendesk_role?: ZendeskRole$Outbound | undefined; + hubspot_role?: HubspotRole$Outbound | undefined; + alicloud_ram_role?: AlicloudRamRole$Outbound | undefined; + alicloud_ecs_instance?: AlicloudEcsInstance$Outbound | undefined; + zoom_role?: ZoomRole$Outbound | undefined; + zoom_license?: ZoomLicense$Outbound | undefined; }; /** @internal */ @@ -2433,12 +5151,39 @@ export const ResourceRemoteInfo$outboundSchema: z.ZodType< z.ZodTypeDef, ResourceRemoteInfo > = z.object({ + databricksAccountServicePrincipal: z.lazy(() => + DatabricksAccountServicePrincipal$outboundSchema + ).optional(), + azureSubscription: z.lazy(() => AzureSubscription$outboundSchema).optional(), + azureResourceGroup: z.lazy(() => AzureResourceGroup$outboundSchema) + .optional(), + azureManagementGroup: z.lazy(() => AzureManagementGroup$outboundSchema) + .optional(), + azureVirtualMachine: z.lazy(() => AzureVirtualMachine$outboundSchema) + .optional(), + azureStorageAccount: z.lazy(() => AzureStorageAccount$outboundSchema) + .optional(), + azureStorageContainer: z.lazy(() => AzureStorageContainer$outboundSchema) + .optional(), + azureSqlServer: z.lazy(() => AzureSqlServer$outboundSchema).optional(), + azureSqlDatabase: z.lazy(() => AzureSqlDatabase$outboundSchema).optional(), + azureSqlManagedInstance: z.lazy(() => AzureSqlManagedInstance$outboundSchema) + .optional(), + azureSqlManagedDatabase: z.lazy(() => AzureSqlManagedDatabase$outboundSchema) + .optional(), + azureUserAssignedManagedIdentity: z.lazy(() => + AzureUserAssignedManagedIdentity$outboundSchema + ).optional(), + azureEnterpriseApp: z.lazy(() => AzureEnterpriseApp$outboundSchema) + .optional(), + azureEntraIdRole: z.lazy(() => AzureEntraIdRole$outboundSchema).optional(), awsOrganizationalUnit: z.lazy(() => AwsOrganizationalUnit$outboundSchema) .optional(), awsAccount: z.lazy(() => AwsAccount$outboundSchema).optional(), awsPermissionSet: z.lazy(() => AwsPermissionSet$outboundSchema).optional(), awsIamRole: z.lazy(() => AwsIamRole$outboundSchema).optional(), awsEc2Instance: z.lazy(() => AwsEc2Instance$outboundSchema).optional(), + awsRdsCluster: z.lazy(() => AwsRdsCluster$outboundSchema).optional(), awsRdsInstance: z.lazy(() => AwsRdsInstance$outboundSchema).optional(), awsEksCluster: z.lazy(() => AwsEksCluster$outboundSchema).optional(), customConnector: z.lazy(() => CustomConnector$outboundSchema).optional(), @@ -2457,23 +5202,82 @@ export const ResourceRemoteInfo$outboundSchema: z.ZodType< googleWorkspaceRole: z.lazy(() => GoogleWorkspaceRole$outboundSchema) .optional(), githubRepo: z.lazy(() => GithubRepo$outboundSchema).optional(), + githubOrgRole: z.lazy(() => GithubOrgRole$outboundSchema).optional(), + githubOrg: z.lazy(() => GithubOrg$outboundSchema).optional(), + githubEnterpriseRole: z.lazy(() => GithubEnterpriseRole$outboundSchema) + .optional(), gitlabProject: z.lazy(() => GitlabProject$outboundSchema).optional(), oktaApp: z.lazy(() => OktaApp$outboundSchema).optional(), oktaStandardRole: z.lazy(() => OktaStandardRole$outboundSchema).optional(), oktaCustomRole: z.lazy(() => OktaCustomRole$outboundSchema).optional(), + snowflakeDatabase: z.lazy(() => SnowflakeDatabase$outboundSchema).optional(), + snowflakeSchema: z.lazy(() => SnowflakeSchema$outboundSchema).optional(), + snowflakeTable: z.lazy(() => SnowflakeTable$outboundSchema).optional(), + ilevelAdvancedRole: z.lazy(() => IlevelAdvancedRole$outboundSchema) + .optional(), + tailscaleSsh: z.lazy(() => TailscaleSsh$outboundSchema).optional(), + twingateResource: z.lazy(() => TwingateResource$outboundSchema).optional(), pagerdutyRole: z.lazy(() => PagerdutyRole$outboundSchema).optional(), + workdayRole: z.lazy(() => WorkdayRole$outboundSchema).optional(), salesforcePermissionSet: z.lazy(() => SalesforcePermissionSet$outboundSchema) .optional(), salesforceProfile: z.lazy(() => SalesforceProfile$outboundSchema).optional(), + docusignPermissionProfile: z.lazy(() => + DocusignPermissionProfile$outboundSchema + ).optional(), salesforceRole: z.lazy(() => SalesforceRole$outboundSchema).optional(), teleportRole: z.lazy(() => TeleportRole$outboundSchema).optional(), + datastaxAstraRole: z.lazy(() => DatastaxAstraRole$outboundSchema).optional(), + coupaRole: z.lazy(() => CoupaRole$outboundSchema).optional(), + cursorOrganization: z.lazy(() => CursorOrganization$outboundSchema) + .optional(), + openaiPlatformProject: z.lazy(() => OpenaiPlatformProject$outboundSchema) + .optional(), + openaiPlatformServiceAccount: z.lazy(() => + OpenaiPlatformServiceAccount$outboundSchema + ).optional(), + anthropicWorkspace: z.lazy(() => AnthropicWorkspace$outboundSchema) + .optional(), + oracleFusionRole: z.lazy(() => OracleFusionRole$outboundSchema).optional(), + devinOrganization: z.lazy(() => DevinOrganization$outboundSchema).optional(), + devinRole: z.lazy(() => DevinRole$outboundSchema).optional(), + netsuiteRole: z.lazy(() => NetsuiteRole$outboundSchema).optional(), + datadogRole: z.lazy(() => DatadogRole$outboundSchema).optional(), + clickhouseDatabase: z.lazy(() => ClickhouseDatabase$outboundSchema) + .optional(), + clickhouseTable: z.lazy(() => ClickhouseTable$outboundSchema).optional(), + grafanaFolder: z.lazy(() => GrafanaFolder$outboundSchema).optional(), + grafanaDashboard: z.lazy(() => GrafanaDashboard$outboundSchema).optional(), + grafanaRole: z.lazy(() => GrafanaRole$outboundSchema).optional(), + zendeskRole: z.lazy(() => ZendeskRole$outboundSchema).optional(), + hubspotRole: z.lazy(() => HubspotRole$outboundSchema).optional(), + alicloudRamRole: z.lazy(() => AlicloudRamRole$outboundSchema).optional(), + alicloudEcsInstance: z.lazy(() => AlicloudEcsInstance$outboundSchema) + .optional(), + zoomRole: z.lazy(() => ZoomRole$outboundSchema).optional(), + zoomLicense: z.lazy(() => ZoomLicense$outboundSchema).optional(), }).transform((v) => { return remap$(v, { + databricksAccountServicePrincipal: "databricks_account_service_principal", + azureSubscription: "azure_subscription", + azureResourceGroup: "azure_resource_group", + azureManagementGroup: "azure_management_group", + azureVirtualMachine: "azure_virtual_machine", + azureStorageAccount: "azure_storage_account", + azureStorageContainer: "azure_storage_container", + azureSqlServer: "azure_sql_server", + azureSqlDatabase: "azure_sql_database", + azureSqlManagedInstance: "azure_sql_managed_instance", + azureSqlManagedDatabase: "azure_sql_managed_database", + azureUserAssignedManagedIdentity: "azure_user_assigned_managed_identity", + azureEnterpriseApp: "azure_enterprise_app", + azureEntraIdRole: "azure_entra_id_role", awsOrganizationalUnit: "aws_organizational_unit", awsAccount: "aws_account", awsPermissionSet: "aws_permission_set", awsIamRole: "aws_iam_role", awsEc2Instance: "aws_ec2_instance", + awsRdsCluster: "aws_rds_cluster", awsRdsInstance: "aws_rds_instance", awsEksCluster: "aws_eks_cluster", customConnector: "custom_connector", @@ -2489,31 +5293,51 @@ export const ResourceRemoteInfo$outboundSchema: z.ZodType< gcpServiceAccount: "gcp_service_account", googleWorkspaceRole: "google_workspace_role", githubRepo: "github_repo", + githubOrgRole: "github_org_role", + githubOrg: "github_org", + githubEnterpriseRole: "github_enterprise_role", gitlabProject: "gitlab_project", oktaApp: "okta_app", oktaStandardRole: "okta_standard_role", oktaCustomRole: "okta_custom_role", + snowflakeDatabase: "snowflake_database", + snowflakeSchema: "snowflake_schema", + snowflakeTable: "snowflake_table", + ilevelAdvancedRole: "ilevel_advanced_role", + tailscaleSsh: "tailscale_ssh", + twingateResource: "twingate_resource", pagerdutyRole: "pagerduty_role", + workdayRole: "workday_role", salesforcePermissionSet: "salesforce_permission_set", salesforceProfile: "salesforce_profile", + docusignPermissionProfile: "docusign_permission_profile", salesforceRole: "salesforce_role", teleportRole: "teleport_role", + datastaxAstraRole: "datastax_astra_role", + coupaRole: "coupa_role", + cursorOrganization: "cursor_organization", + openaiPlatformProject: "openai_platform_project", + openaiPlatformServiceAccount: "openai_platform_service_account", + anthropicWorkspace: "anthropic_workspace", + oracleFusionRole: "oracle_fusion_role", + devinOrganization: "devin_organization", + devinRole: "devin_role", + netsuiteRole: "netsuite_role", + datadogRole: "datadog_role", + clickhouseDatabase: "clickhouse_database", + clickhouseTable: "clickhouse_table", + grafanaFolder: "grafana_folder", + grafanaDashboard: "grafana_dashboard", + grafanaRole: "grafana_role", + zendeskRole: "zendesk_role", + hubspotRole: "hubspot_role", + alicloudRamRole: "alicloud_ram_role", + alicloudEcsInstance: "alicloud_ecs_instance", + zoomRole: "zoom_role", + zoomLicense: "zoom_license", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceRemoteInfo$ { - /** @deprecated use `ResourceRemoteInfo$inboundSchema` instead. */ - export const inboundSchema = ResourceRemoteInfo$inboundSchema; - /** @deprecated use `ResourceRemoteInfo$outboundSchema` instead. */ - export const outboundSchema = ResourceRemoteInfo$outboundSchema; - /** @deprecated use `ResourceRemoteInfo$Outbound` instead. */ - export type Outbound = ResourceRemoteInfo$Outbound; -} - export function resourceRemoteInfoToJSON( resourceRemoteInfo: ResourceRemoteInfo, ): string { @@ -2521,7 +5345,6 @@ export function resourceRemoteInfoToJSON( ResourceRemoteInfo$outboundSchema.parse(resourceRemoteInfo), ); } - export function resourceRemoteInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/resourcetypeenum.ts b/src/models/components/resourcetypeenum.ts index 94cb1af1..37f68459 100644 --- a/src/models/components/resourcetypeenum.ts +++ b/src/models/components/resourcetypeenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -52,6 +52,8 @@ export const ResourceTypeEnum = { GoogleWorkspaceRole: "GOOGLE_WORKSPACE_ROLE", MongoInstance: "MONGO_INSTANCE", MongoAtlasInstance: "MONGO_ATLAS_INSTANCE", + NetsuiteRole: "NETSUITE_ROLE", + DatadogRole: "DATADOG_ROLE", OktaApp: "OKTA_APP", OktaRole: "OKTA_ROLE", OpalRole: "OPAL_ROLE", @@ -69,6 +71,35 @@ export const ResourceTypeEnum = { MariadbInstance: "MARIADB_INSTANCE", PostgresInstance: "POSTGRES_INSTANCE", TeleportRole: "TELEPORT_ROLE", + IlevelAdvancedRole: "ILEVEL_ADVANCED_ROLE", + DatastaxAstraRole: "DATASTAX_ASTRA_ROLE", + CoupaRole: "COUPA_ROLE", + CursorOrganization: "CURSOR_ORGANIZATION", + OpenaiPlatformProject: "OPENAI_PLATFORM_PROJECT", + OpenaiPlatformServiceAccount: "OPENAI_PLATFORM_SERVICE_ACCOUNT", + AnthropicWorkspace: "ANTHROPIC_WORKSPACE", + GitHubOrg: "GIT_HUB_ORG", + OracleFusionRole: "ORACLE_FUSION_ROLE", + DevinOrganization: "DEVIN_ORGANIZATION", + DevinRole: "DEVIN_ROLE", + VaultSecret: "VAULT_SECRET", + VaultPolicy: "VAULT_POLICY", + VaultOidcRole: "VAULT_OIDC_ROLE", + GitHubEnterpriseRole: "GIT_HUB_ENTERPRISE_ROLE", + GrafanaFolder: "GRAFANA_FOLDER", + GrafanaDashboard: "GRAFANA_DASHBOARD", + GrafanaBasicRole: "GRAFANA_BASIC_ROLE", + GrafanaRole: "GRAFANA_ROLE", + ClickhouseDatabase: "CLICKHOUSE_DATABASE", + ClickhouseTable: "CLICKHOUSE_TABLE", + TwingateResource: "TWINGATE_RESOURCE", + ZendeskRole: "ZENDESK_ROLE", + HubspotRole: "HUBSPOT_ROLE", + AlicloudRamRole: "ALICLOUD_RAM_ROLE", + AlicloudEcsInstance: "ALICLOUD_ECS_INSTANCE", + DocusignPermissionProfile: "DOCUSIGN_PERMISSION_PROFILE", + ZoomRole: "ZOOM_ROLE", + ZoomLicense: "ZOOM_LICENSE", } as const; /** * The type of the resource. @@ -79,19 +110,7 @@ export type ResourceTypeEnum = ClosedEnum; export const ResourceTypeEnum$inboundSchema: z.ZodNativeEnum< typeof ResourceTypeEnum > = z.nativeEnum(ResourceTypeEnum); - /** @internal */ export const ResourceTypeEnum$outboundSchema: z.ZodNativeEnum< typeof ResourceTypeEnum > = ResourceTypeEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceTypeEnum$ { - /** @deprecated use `ResourceTypeEnum$inboundSchema` instead. */ - export const inboundSchema = ResourceTypeEnum$inboundSchema; - /** @deprecated use `ResourceTypeEnum$outboundSchema` instead. */ - export const outboundSchema = ResourceTypeEnum$outboundSchema; -} diff --git a/src/models/components/resourceuser.ts b/src/models/components/resourceuser.ts index 16f6189c..c831b066 100644 --- a/src/models/components/resourceuser.ts +++ b/src/models/components/resourceuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -79,7 +79,6 @@ export const ResourceUser$inboundSchema: z.ZodType< "expiration_date": "expirationDate", }); }); - /** @internal */ export type ResourceUser$Outbound = { resource_id: string; @@ -113,23 +112,9 @@ export const ResourceUser$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceUser$ { - /** @deprecated use `ResourceUser$inboundSchema` instead. */ - export const inboundSchema = ResourceUser$inboundSchema; - /** @deprecated use `ResourceUser$outboundSchema` instead. */ - export const outboundSchema = ResourceUser$outboundSchema; - /** @deprecated use `ResourceUser$Outbound` instead. */ - export type Outbound = ResourceUser$Outbound; -} - export function resourceUserToJSON(resourceUser: ResourceUser): string { return JSON.stringify(ResourceUser$outboundSchema.parse(resourceUser)); } - export function resourceUserFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/resourceuseraccessstatus.ts b/src/models/components/resourceuseraccessstatus.ts index c6f12191..6bc24e39 100644 --- a/src/models/components/resourceuseraccessstatus.ts +++ b/src/models/components/resourceuseraccessstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -81,7 +81,6 @@ export const ResourceUserAccessStatus$inboundSchema: z.ZodType< "expiration_date": "expirationDate", }); }); - /** @internal */ export type ResourceUserAccessStatus$Outbound = { resource_id: string; @@ -112,19 +111,6 @@ export const ResourceUserAccessStatus$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceUserAccessStatus$ { - /** @deprecated use `ResourceUserAccessStatus$inboundSchema` instead. */ - export const inboundSchema = ResourceUserAccessStatus$inboundSchema; - /** @deprecated use `ResourceUserAccessStatus$outboundSchema` instead. */ - export const outboundSchema = ResourceUserAccessStatus$outboundSchema; - /** @deprecated use `ResourceUserAccessStatus$Outbound` instead. */ - export type Outbound = ResourceUserAccessStatus$Outbound; -} - export function resourceUserAccessStatusToJSON( resourceUserAccessStatus: ResourceUserAccessStatus, ): string { @@ -132,7 +118,6 @@ export function resourceUserAccessStatusToJSON( ResourceUserAccessStatus$outboundSchema.parse(resourceUserAccessStatus), ); } - export function resourceUserAccessStatusFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/resourceuseraccessstatusenum.ts b/src/models/components/resourceuseraccessstatusenum.ts index 8f04223f..ccb119c2 100644 --- a/src/models/components/resourceuseraccessstatusenum.ts +++ b/src/models/components/resourceuseraccessstatusenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -24,19 +24,7 @@ export type ResourceUserAccessStatusEnum = ClosedEnum< export const ResourceUserAccessStatusEnum$inboundSchema: z.ZodNativeEnum< typeof ResourceUserAccessStatusEnum > = z.nativeEnum(ResourceUserAccessStatusEnum); - /** @internal */ export const ResourceUserAccessStatusEnum$outboundSchema: z.ZodNativeEnum< typeof ResourceUserAccessStatusEnum > = ResourceUserAccessStatusEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceUserAccessStatusEnum$ { - /** @deprecated use `ResourceUserAccessStatusEnum$inboundSchema` instead. */ - export const inboundSchema = ResourceUserAccessStatusEnum$inboundSchema; - /** @deprecated use `ResourceUserAccessStatusEnum$outboundSchema` instead. */ - export const outboundSchema = ResourceUserAccessStatusEnum$outboundSchema; -} diff --git a/src/models/components/resourcewithaccesslevel.ts b/src/models/components/resourcewithaccesslevel.ts index 86ffc524..64635dd7 100644 --- a/src/models/components/resourcewithaccesslevel.ts +++ b/src/models/components/resourcewithaccesslevel.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -36,7 +36,6 @@ export const ResourceWithAccessLevel$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type ResourceWithAccessLevel$Outbound = { resource_id: string; @@ -58,19 +57,6 @@ export const ResourceWithAccessLevel$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceWithAccessLevel$ { - /** @deprecated use `ResourceWithAccessLevel$inboundSchema` instead. */ - export const inboundSchema = ResourceWithAccessLevel$inboundSchema; - /** @deprecated use `ResourceWithAccessLevel$outboundSchema` instead. */ - export const outboundSchema = ResourceWithAccessLevel$outboundSchema; - /** @deprecated use `ResourceWithAccessLevel$Outbound` instead. */ - export type Outbound = ResourceWithAccessLevel$Outbound; -} - export function resourceWithAccessLevelToJSON( resourceWithAccessLevel: ResourceWithAccessLevel, ): string { @@ -78,7 +64,6 @@ export function resourceWithAccessLevelToJSON( ResourceWithAccessLevel$outboundSchema.parse(resourceWithAccessLevel), ); } - export function resourceWithAccessLevelFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/revieweridlist.ts b/src/models/components/revieweridlist.ts index 3750f3a4..cec952b3 100644 --- a/src/models/components/revieweridlist.ts +++ b/src/models/components/revieweridlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const ReviewerIDList$inboundSchema: z.ZodType< "reviewer_ids": "reviewerIds", }); }); - /** @internal */ export type ReviewerIDList$Outbound = { reviewer_ids: Array; @@ -46,23 +45,9 @@ export const ReviewerIDList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReviewerIDList$ { - /** @deprecated use `ReviewerIDList$inboundSchema` instead. */ - export const inboundSchema = ReviewerIDList$inboundSchema; - /** @deprecated use `ReviewerIDList$outboundSchema` instead. */ - export const outboundSchema = ReviewerIDList$outboundSchema; - /** @deprecated use `ReviewerIDList$Outbound` instead. */ - export type Outbound = ReviewerIDList$Outbound; -} - export function reviewerIDListToJSON(reviewerIDList: ReviewerIDList): string { return JSON.stringify(ReviewerIDList$outboundSchema.parse(reviewerIDList)); } - export function reviewerIDListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/reviewerstage.ts b/src/models/components/reviewerstage.ts index bb2b7634..9c3c6877 100644 --- a/src/models/components/reviewerstage.ts +++ b/src/models/components/reviewerstage.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; @@ -37,28 +37,23 @@ export type ReviewerStage = { * The operator of the reviewer stage. Admin and manager approval are also treated as reviewers. */ operator: Operator; + /** + * The IDs of owners assigned as reviewers for this stage. + */ ownerIds: Array; + /** + * The IDs of service users assigned as reviewers for this stage. + */ + serviceUserIds?: Array | undefined; }; /** @internal */ export const Operator$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Operator); - /** @internal */ export const Operator$outboundSchema: z.ZodNativeEnum = Operator$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Operator$ { - /** @deprecated use `Operator$inboundSchema` instead. */ - export const inboundSchema = Operator$inboundSchema; - /** @deprecated use `Operator$outboundSchema` instead. */ - export const outboundSchema = Operator$outboundSchema; -} - /** @internal */ export const ReviewerStage$inboundSchema: z.ZodType< ReviewerStage, @@ -69,20 +64,22 @@ export const ReviewerStage$inboundSchema: z.ZodType< require_admin_approval: z.boolean().optional(), operator: Operator$inboundSchema, owner_ids: z.array(z.string()), + service_user_ids: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { "require_manager_approval": "requireManagerApproval", "require_admin_approval": "requireAdminApproval", "owner_ids": "ownerIds", + "service_user_ids": "serviceUserIds", }); }); - /** @internal */ export type ReviewerStage$Outbound = { require_manager_approval: boolean; require_admin_approval?: boolean | undefined; operator: string; owner_ids: Array; + service_user_ids?: Array | undefined; }; /** @internal */ @@ -95,31 +92,19 @@ export const ReviewerStage$outboundSchema: z.ZodType< requireAdminApproval: z.boolean().optional(), operator: Operator$outboundSchema, ownerIds: z.array(z.string()), + serviceUserIds: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { requireManagerApproval: "require_manager_approval", requireAdminApproval: "require_admin_approval", ownerIds: "owner_ids", + serviceUserIds: "service_user_ids", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReviewerStage$ { - /** @deprecated use `ReviewerStage$inboundSchema` instead. */ - export const inboundSchema = ReviewerStage$inboundSchema; - /** @deprecated use `ReviewerStage$outboundSchema` instead. */ - export const outboundSchema = ReviewerStage$outboundSchema; - /** @deprecated use `ReviewerStage$Outbound` instead. */ - export type Outbound = ReviewerStage$Outbound; -} - export function reviewerStageToJSON(reviewerStage: ReviewerStage): string { return JSON.stringify(ReviewerStage$outboundSchema.parse(reviewerStage)); } - export function reviewerStageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/reviewerstagelist.ts b/src/models/components/reviewerstagelist.ts index 0b60d2e6..ee50c4dd 100644 --- a/src/models/components/reviewerstagelist.ts +++ b/src/models/components/reviewerstagelist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,7 +28,6 @@ export const ReviewerStageList$inboundSchema: z.ZodType< > = z.object({ stages: z.array(ReviewerStage$inboundSchema), }); - /** @internal */ export type ReviewerStageList$Outbound = { stages: Array; @@ -43,19 +42,6 @@ export const ReviewerStageList$outboundSchema: z.ZodType< stages: z.array(ReviewerStage$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReviewerStageList$ { - /** @deprecated use `ReviewerStageList$inboundSchema` instead. */ - export const inboundSchema = ReviewerStageList$inboundSchema; - /** @deprecated use `ReviewerStageList$outboundSchema` instead. */ - export const outboundSchema = ReviewerStageList$outboundSchema; - /** @deprecated use `ReviewerStageList$Outbound` instead. */ - export type Outbound = ReviewerStageList$Outbound; -} - export function reviewerStageListToJSON( reviewerStageList: ReviewerStageList, ): string { @@ -63,7 +49,6 @@ export function reviewerStageListToJSON( ReviewerStageList$outboundSchema.parse(reviewerStageList), ); } - export function reviewerStageListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/reviewstageoperator.ts b/src/models/components/reviewstageoperator.ts index 13df8d7c..859db2e8 100644 --- a/src/models/components/reviewstageoperator.ts +++ b/src/models/components/reviewstageoperator.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -21,19 +21,7 @@ export type ReviewStageOperator = ClosedEnum; export const ReviewStageOperator$inboundSchema: z.ZodNativeEnum< typeof ReviewStageOperator > = z.nativeEnum(ReviewStageOperator); - /** @internal */ export const ReviewStageOperator$outboundSchema: z.ZodNativeEnum< typeof ReviewStageOperator > = ReviewStageOperator$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReviewStageOperator$ { - /** @deprecated use `ReviewStageOperator$inboundSchema` instead. */ - export const inboundSchema = ReviewStageOperator$inboundSchema; - /** @deprecated use `ReviewStageOperator$outboundSchema` instead. */ - export const outboundSchema = ReviewStageOperator$outboundSchema; -} diff --git a/src/models/components/risksensitivityenum.ts b/src/models/components/risksensitivityenum.ts index 29b3f5c4..77847084 100644 --- a/src/models/components/risksensitivityenum.ts +++ b/src/models/components/risksensitivityenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -25,19 +25,7 @@ export type RiskSensitivityEnum = ClosedEnum; export const RiskSensitivityEnum$inboundSchema: z.ZodNativeEnum< typeof RiskSensitivityEnum > = z.nativeEnum(RiskSensitivityEnum); - /** @internal */ export const RiskSensitivityEnum$outboundSchema: z.ZodNativeEnum< typeof RiskSensitivityEnum > = RiskSensitivityEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RiskSensitivityEnum$ { - /** @deprecated use `RiskSensitivityEnum$inboundSchema` instead. */ - export const inboundSchema = RiskSensitivityEnum$inboundSchema; - /** @deprecated use `RiskSensitivityEnum$outboundSchema` instead. */ - export const outboundSchema = RiskSensitivityEnum$outboundSchema; -} diff --git a/src/models/components/rolepermissionnameenum.ts b/src/models/components/rolepermissionnameenum.ts index ec500865..61facb92 100644 --- a/src/models/components/rolepermissionnameenum.ts +++ b/src/models/components/rolepermissionnameenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -38,19 +38,7 @@ export type RolePermissionNameEnum = ClosedEnum; export const RolePermissionNameEnum$inboundSchema: z.ZodNativeEnum< typeof RolePermissionNameEnum > = z.nativeEnum(RolePermissionNameEnum); - /** @internal */ export const RolePermissionNameEnum$outboundSchema: z.ZodNativeEnum< typeof RolePermissionNameEnum > = RolePermissionNameEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RolePermissionNameEnum$ { - /** @deprecated use `RolePermissionNameEnum$inboundSchema` instead. */ - export const inboundSchema = RolePermissionNameEnum$inboundSchema; - /** @deprecated use `RolePermissionNameEnum$outboundSchema` instead. */ - export const outboundSchema = RolePermissionNameEnum$outboundSchema; -} diff --git a/src/models/components/rolepermissiontargettypeenum.ts b/src/models/components/rolepermissiontargettypeenum.ts index 4e7f0ff4..8d94f655 100644 --- a/src/models/components/rolepermissiontargettypeenum.ts +++ b/src/models/components/rolepermissiontargettypeenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -15,6 +15,7 @@ export const RolePermissionTargetTypeEnum = { Bundle: "BUNDLE", User: "USER", AccessReview: "ACCESS_REVIEW", + Owner: "OWNER", } as const; /** * The type of the target for the role permission. @@ -27,19 +28,7 @@ export type RolePermissionTargetTypeEnum = ClosedEnum< export const RolePermissionTargetTypeEnum$inboundSchema: z.ZodNativeEnum< typeof RolePermissionTargetTypeEnum > = z.nativeEnum(RolePermissionTargetTypeEnum); - /** @internal */ export const RolePermissionTargetTypeEnum$outboundSchema: z.ZodNativeEnum< typeof RolePermissionTargetTypeEnum > = RolePermissionTargetTypeEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RolePermissionTargetTypeEnum$ { - /** @deprecated use `RolePermissionTargetTypeEnum$inboundSchema` instead. */ - export const inboundSchema = RolePermissionTargetTypeEnum$inboundSchema; - /** @deprecated use `RolePermissionTargetTypeEnum$outboundSchema` instead. */ - export const outboundSchema = RolePermissionTargetTypeEnum$outboundSchema; -} diff --git a/src/models/components/ruleclauses.ts b/src/models/components/ruleclauses.ts index 1fd347d1..dfc38af1 100644 --- a/src/models/components/ruleclauses.ts +++ b/src/models/components/ruleclauses.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,7 +27,6 @@ export const RuleClauses$inboundSchema: z.ZodType< when: RuleConjunction$inboundSchema, unless: RuleConjunction$inboundSchema.optional(), }); - /** @internal */ export type RuleClauses$Outbound = { when: RuleConjunction$Outbound; @@ -44,23 +43,9 @@ export const RuleClauses$outboundSchema: z.ZodType< unless: RuleConjunction$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RuleClauses$ { - /** @deprecated use `RuleClauses$inboundSchema` instead. */ - export const inboundSchema = RuleClauses$inboundSchema; - /** @deprecated use `RuleClauses$outboundSchema` instead. */ - export const outboundSchema = RuleClauses$outboundSchema; - /** @deprecated use `RuleClauses$Outbound` instead. */ - export type Outbound = RuleClauses$Outbound; -} - export function ruleClausesToJSON(ruleClauses: RuleClauses): string { return JSON.stringify(RuleClauses$outboundSchema.parse(ruleClauses)); } - export function ruleClausesFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/ruleconjunction.ts b/src/models/components/ruleconjunction.ts index 2fa5eefc..7ad1704a 100644 --- a/src/models/components/ruleconjunction.ts +++ b/src/models/components/ruleconjunction.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -25,7 +25,6 @@ export const RuleConjunction$inboundSchema: z.ZodType< > = z.object({ clauses: z.array(RuleDisjunction$inboundSchema), }); - /** @internal */ export type RuleConjunction$Outbound = { clauses: Array; @@ -40,25 +39,11 @@ export const RuleConjunction$outboundSchema: z.ZodType< clauses: z.array(RuleDisjunction$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RuleConjunction$ { - /** @deprecated use `RuleConjunction$inboundSchema` instead. */ - export const inboundSchema = RuleConjunction$inboundSchema; - /** @deprecated use `RuleConjunction$outboundSchema` instead. */ - export const outboundSchema = RuleConjunction$outboundSchema; - /** @deprecated use `RuleConjunction$Outbound` instead. */ - export type Outbound = RuleConjunction$Outbound; -} - export function ruleConjunctionToJSON( ruleConjunction: RuleConjunction, ): string { return JSON.stringify(RuleConjunction$outboundSchema.parse(ruleConjunction)); } - export function ruleConjunctionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/ruledisjunction.ts b/src/models/components/ruledisjunction.ts index 733ba900..b0fa6737 100644 --- a/src/models/components/ruledisjunction.ts +++ b/src/models/components/ruledisjunction.ts @@ -2,7 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -12,9 +13,16 @@ import { TagSelector$Outbound, TagSelector$outboundSchema, } from "./tagselector.js"; +import { + UserAttributeSelector, + UserAttributeSelector$inboundSchema, + UserAttributeSelector$Outbound, + UserAttributeSelector$outboundSchema, +} from "./userattributeselector.js"; export type RuleDisjunction = { selectors: Array; + attributeSelectors?: Array | undefined; }; /** @internal */ @@ -24,11 +32,16 @@ export const RuleDisjunction$inboundSchema: z.ZodType< unknown > = z.object({ selectors: z.array(TagSelector$inboundSchema), + attribute_selectors: z.array(UserAttributeSelector$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "attribute_selectors": "attributeSelectors", + }); }); - /** @internal */ export type RuleDisjunction$Outbound = { selectors: Array; + attribute_selectors?: Array | undefined; }; /** @internal */ @@ -38,27 +51,18 @@ export const RuleDisjunction$outboundSchema: z.ZodType< RuleDisjunction > = z.object({ selectors: z.array(TagSelector$outboundSchema), + attributeSelectors: z.array(UserAttributeSelector$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + attributeSelectors: "attribute_selectors", + }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RuleDisjunction$ { - /** @deprecated use `RuleDisjunction$inboundSchema` instead. */ - export const inboundSchema = RuleDisjunction$inboundSchema; - /** @deprecated use `RuleDisjunction$outboundSchema` instead. */ - export const outboundSchema = RuleDisjunction$outboundSchema; - /** @deprecated use `RuleDisjunction$Outbound` instead. */ - export type Outbound = RuleDisjunction$Outbound; -} - export function ruleDisjunctionToJSON( ruleDisjunction: RuleDisjunction, ): string { return JSON.stringify(RuleDisjunction$outboundSchema.parse(ruleDisjunction)); } - export function ruleDisjunctionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/runopalqueryrequest.ts b/src/models/components/runopalqueryrequest.ts new file mode 100644 index 00000000..7be0dbb6 --- /dev/null +++ b/src/models/components/runopalqueryrequest.ts @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + OpalAccessPathQuery, + OpalAccessPathQuery$inboundSchema, + OpalAccessPathQuery$Outbound, + OpalAccessPathQuery$outboundSchema, +} from "./opalaccesspathquery.js"; +import { + OpalNodeQuery, + OpalNodeQuery$inboundSchema, + OpalNodeQuery$Outbound, + OpalNodeQuery$outboundSchema, +} from "./opalnodequery.js"; + +/** + * Request body for running an ad-hoc OpalQuery. The `type` field determines which query schema applies. + */ +export type RunOpalQueryRequest = OpalNodeQuery | OpalAccessPathQuery; + +/** @internal */ +export const RunOpalQueryRequest$inboundSchema: z.ZodType< + RunOpalQueryRequest, + z.ZodTypeDef, + unknown +> = z.union([OpalNodeQuery$inboundSchema, OpalAccessPathQuery$inboundSchema]); +/** @internal */ +export type RunOpalQueryRequest$Outbound = + | OpalNodeQuery$Outbound + | OpalAccessPathQuery$Outbound; + +/** @internal */ +export const RunOpalQueryRequest$outboundSchema: z.ZodType< + RunOpalQueryRequest$Outbound, + z.ZodTypeDef, + RunOpalQueryRequest +> = z.union([OpalNodeQuery$outboundSchema, OpalAccessPathQuery$outboundSchema]); + +export function runOpalQueryRequestToJSON( + runOpalQueryRequest: RunOpalQueryRequest, +): string { + return JSON.stringify( + RunOpalQueryRequest$outboundSchema.parse(runOpalQueryRequest), + ); +} +export function runOpalQueryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RunOpalQueryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RunOpalQueryRequest' from JSON`, + ); +} diff --git a/src/models/components/scopedrolepermission.ts b/src/models/components/scopedrolepermission.ts index 0b655ffd..6be9e182 100644 --- a/src/models/components/scopedrolepermission.ts +++ b/src/models/components/scopedrolepermission.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -52,7 +52,6 @@ export const ScopedRolePermission$inboundSchema: z.ZodType< "allow_all": "allowAll", }); }); - /** @internal */ export type ScopedRolePermission$Outbound = { target_ids?: Array | undefined; @@ -80,19 +79,6 @@ export const ScopedRolePermission$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ScopedRolePermission$ { - /** @deprecated use `ScopedRolePermission$inboundSchema` instead. */ - export const inboundSchema = ScopedRolePermission$inboundSchema; - /** @deprecated use `ScopedRolePermission$outboundSchema` instead. */ - export const outboundSchema = ScopedRolePermission$outboundSchema; - /** @deprecated use `ScopedRolePermission$Outbound` instead. */ - export type Outbound = ScopedRolePermission$Outbound; -} - export function scopedRolePermissionToJSON( scopedRolePermission: ScopedRolePermission, ): string { @@ -100,7 +86,6 @@ export function scopedRolePermissionToJSON( ScopedRolePermission$outboundSchema.parse(scopedRolePermission), ); } - export function scopedRolePermissionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/scopedrolepermissionlist.ts b/src/models/components/scopedrolepermissionlist.ts index 9081afe7..5d0ccad6 100644 --- a/src/models/components/scopedrolepermissionlist.ts +++ b/src/models/components/scopedrolepermissionlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -25,7 +25,6 @@ export const ScopedRolePermissionList$inboundSchema: z.ZodType< > = z.object({ permissions: z.array(ScopedRolePermission$inboundSchema), }); - /** @internal */ export type ScopedRolePermissionList$Outbound = { permissions: Array; @@ -40,19 +39,6 @@ export const ScopedRolePermissionList$outboundSchema: z.ZodType< permissions: z.array(ScopedRolePermission$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ScopedRolePermissionList$ { - /** @deprecated use `ScopedRolePermissionList$inboundSchema` instead. */ - export const inboundSchema = ScopedRolePermissionList$inboundSchema; - /** @deprecated use `ScopedRolePermissionList$outboundSchema` instead. */ - export const outboundSchema = ScopedRolePermissionList$outboundSchema; - /** @deprecated use `ScopedRolePermissionList$Outbound` instead. */ - export type Outbound = ScopedRolePermissionList$Outbound; -} - export function scopedRolePermissionListToJSON( scopedRolePermissionList: ScopedRolePermissionList, ): string { @@ -60,7 +46,6 @@ export function scopedRolePermissionListToJSON( ScopedRolePermissionList$outboundSchema.parse(scopedRolePermissionList), ); } - export function scopedRolePermissionListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/security.ts b/src/models/components/security.ts index c88c60cb..3f574f46 100644 --- a/src/models/components/security.ts +++ b/src/models/components/security.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -24,7 +24,6 @@ export const Security$inboundSchema: z.ZodType< "BearerAuth": "bearerAuth", }); }); - /** @internal */ export type Security$Outbound = { BearerAuth?: string | undefined; @@ -43,23 +42,9 @@ export const Security$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Security$ { - /** @deprecated use `Security$inboundSchema` instead. */ - export const inboundSchema = Security$inboundSchema; - /** @deprecated use `Security$outboundSchema` instead. */ - export const outboundSchema = Security$outboundSchema; - /** @deprecated use `Security$Outbound` instead. */ - export type Outbound = Security$Outbound; -} - export function securityToJSON(security: Security): string { return JSON.stringify(Security$outboundSchema.parse(security)); } - export function securityFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/session.ts b/src/models/components/session.ts index 517e5fc6..395a338b 100644 --- a/src/models/components/session.ts +++ b/src/models/components/session.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -74,7 +74,6 @@ export const Session$inboundSchema: z.ZodType = "expiration_date": "expirationDate", }); }); - /** @internal */ export type Session$Outbound = { connection_id: string; @@ -105,23 +104,9 @@ export const Session$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Session$ { - /** @deprecated use `Session$inboundSchema` instead. */ - export const inboundSchema = Session$inboundSchema; - /** @deprecated use `Session$outboundSchema` instead. */ - export const outboundSchema = Session$outboundSchema; - /** @deprecated use `Session$Outbound` instead. */ - export type Outbound = Session$Outbound; -} - export function sessionToJSON(session: Session): string { return JSON.stringify(Session$outboundSchema.parse(session)); } - export function sessionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/sessionslist.ts b/src/models/components/sessionslist.ts index b5030598..738fb962 100644 --- a/src/models/components/sessionslist.ts +++ b/src/models/components/sessionslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -35,7 +35,6 @@ export const SessionsList$inboundSchema: z.ZodType< previous: z.nullable(z.string()).optional(), results: z.array(Session$inboundSchema).optional(), }); - /** @internal */ export type SessionsList$Outbound = { next?: string | null | undefined; @@ -54,23 +53,9 @@ export const SessionsList$outboundSchema: z.ZodType< results: z.array(Session$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SessionsList$ { - /** @deprecated use `SessionsList$inboundSchema` instead. */ - export const inboundSchema = SessionsList$inboundSchema; - /** @deprecated use `SessionsList$outboundSchema` instead. */ - export const outboundSchema = SessionsList$outboundSchema; - /** @deprecated use `SessionsList$Outbound` instead. */ - export type Outbound = SessionsList$Outbound; -} - export function sessionsListToJSON(sessionsList: SessionsList): string { return JSON.stringify(SessionsList$outboundSchema.parse(sessionsList)); } - export function sessionsListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/stopcampaignrequest.ts b/src/models/components/stopcampaignrequest.ts new file mode 100644 index 00000000..55e26c95 --- /dev/null +++ b/src/models/components/stopcampaignrequest.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type StopCampaignRequest = { + /** + * Revoke all unreviewed access grants. Access grants with no reviewer decision will be immediately revoked. + */ + revokeUnreviewed?: boolean | undefined; +}; + +/** @internal */ +export const StopCampaignRequest$inboundSchema: z.ZodType< + StopCampaignRequest, + z.ZodTypeDef, + unknown +> = z.object({ + revoke_unreviewed: z.boolean().default(false), +}).transform((v) => { + return remap$(v, { + "revoke_unreviewed": "revokeUnreviewed", + }); +}); +/** @internal */ +export type StopCampaignRequest$Outbound = { + revoke_unreviewed: boolean; +}; + +/** @internal */ +export const StopCampaignRequest$outboundSchema: z.ZodType< + StopCampaignRequest$Outbound, + z.ZodTypeDef, + StopCampaignRequest +> = z.object({ + revokeUnreviewed: z.boolean().default(false), +}).transform((v) => { + return remap$(v, { + revokeUnreviewed: "revoke_unreviewed", + }); +}); + +export function stopCampaignRequestToJSON( + stopCampaignRequest: StopCampaignRequest, +): string { + return JSON.stringify( + StopCampaignRequest$outboundSchema.parse(stopCampaignRequest), + ); +} +export function stopCampaignRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StopCampaignRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StopCampaignRequest' from JSON`, + ); +} diff --git a/src/models/components/stringmatchtype.ts b/src/models/components/stringmatchtype.ts new file mode 100644 index 00000000..8f393676 --- /dev/null +++ b/src/models/components/stringmatchtype.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * How to match a string value against entity names. REGEX matches the value as a case-insensitive regular expression. + */ +export const StringMatchType = { + Contains: "CONTAINS", + Equals: "EQUALS", + StartsWith: "STARTS_WITH", + EndsWith: "ENDS_WITH", + Regex: "REGEX", +} as const; +/** + * How to match a string value against entity names. REGEX matches the value as a case-insensitive regular expression. + */ +export type StringMatchType = ClosedEnum; + +/** @internal */ +export const StringMatchType$inboundSchema: z.ZodNativeEnum< + typeof StringMatchType +> = z.nativeEnum(StringMatchType); +/** @internal */ +export const StringMatchType$outboundSchema: z.ZodNativeEnum< + typeof StringMatchType +> = StringMatchType$inboundSchema; diff --git a/src/models/components/subevent.ts b/src/models/components/subevent.ts index 472ab5b7..1d751e22 100644 --- a/src/models/components/subevent.ts +++ b/src/models/components/subevent.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$, @@ -26,7 +26,7 @@ export type SubEvent = { * The subevent type. */ subEventType: string; - additionalProperties?: { [k: string]: any }; + additionalProperties?: { [k: string]: any } | undefined; }; /** @internal */ @@ -45,7 +45,6 @@ export const SubEvent$inboundSchema: z.ZodType< "sub_event_type": "subEventType", }); }); - /** @internal */ export type SubEvent$Outbound = { sub_event_type: string; @@ -59,7 +58,7 @@ export const SubEvent$outboundSchema: z.ZodType< SubEvent > = z.object({ subEventType: z.string(), - additionalProperties: z.record(z.any()), + additionalProperties: z.record(z.any()).optional(), }).transform((v) => { return { ...v.additionalProperties, @@ -70,23 +69,9 @@ export const SubEvent$outboundSchema: z.ZodType< }; }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SubEvent$ { - /** @deprecated use `SubEvent$inboundSchema` instead. */ - export const inboundSchema = SubEvent$inboundSchema; - /** @deprecated use `SubEvent$outboundSchema` instead. */ - export const outboundSchema = SubEvent$outboundSchema; - /** @deprecated use `SubEvent$Outbound` instead. */ - export type Outbound = SubEvent$Outbound; -} - export function subEventToJSON(subEvent: SubEvent): string { return JSON.stringify(SubEvent$outboundSchema.parse(subEvent)); } - export function subEventFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/syncerror.ts b/src/models/components/syncerror.ts index 94b4bb41..940a6193 100644 --- a/src/models/components/syncerror.ts +++ b/src/models/components/syncerror.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -55,7 +55,6 @@ export const SyncError$inboundSchema: z.ZodType< "app_id": "appId", }); }); - /** @internal */ export type SyncError$Outbound = { first_seen: string; @@ -83,23 +82,9 @@ export const SyncError$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SyncError$ { - /** @deprecated use `SyncError$inboundSchema` instead. */ - export const inboundSchema = SyncError$inboundSchema; - /** @deprecated use `SyncError$outboundSchema` instead. */ - export const outboundSchema = SyncError$outboundSchema; - /** @deprecated use `SyncError$Outbound` instead. */ - export type Outbound = SyncError$Outbound; -} - export function syncErrorToJSON(syncError: SyncError): string { return JSON.stringify(SyncError$outboundSchema.parse(syncError)); } - export function syncErrorFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/syncerrorlist.ts b/src/models/components/syncerrorlist.ts index 837ff094..386d4b38 100644 --- a/src/models/components/syncerrorlist.ts +++ b/src/models/components/syncerrorlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -30,7 +30,6 @@ export const SyncErrorList$inboundSchema: z.ZodType< "sync_errors": "syncErrors", }); }); - /** @internal */ export type SyncErrorList$Outbound = { sync_errors: Array; @@ -49,23 +48,9 @@ export const SyncErrorList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SyncErrorList$ { - /** @deprecated use `SyncErrorList$inboundSchema` instead. */ - export const inboundSchema = SyncErrorList$inboundSchema; - /** @deprecated use `SyncErrorList$outboundSchema` instead. */ - export const outboundSchema = SyncErrorList$outboundSchema; - /** @deprecated use `SyncErrorList$Outbound` instead. */ - export type Outbound = SyncErrorList$Outbound; -} - export function syncErrorListToJSON(syncErrorList: SyncErrorList): string { return JSON.stringify(SyncErrorList$outboundSchema.parse(syncErrorList)); } - export function syncErrorListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/synctask.ts b/src/models/components/synctask.ts new file mode 100644 index 00000000..b333d489 --- /dev/null +++ b/src/models/components/synctask.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Represents a sync task that has been completed, either successfully or with errors. + */ +export type SyncTask = { + /** + * The ID of the sync task. + */ + id: string; + /** + * The time when the sync task was completed. + */ + completedAt: Date; +}; + +/** @internal */ +export const SyncTask$inboundSchema: z.ZodType< + SyncTask, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + completed_at: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), +}).transform((v) => { + return remap$(v, { + "completed_at": "completedAt", + }); +}); +/** @internal */ +export type SyncTask$Outbound = { + id: string; + completed_at: string; +}; + +/** @internal */ +export const SyncTask$outboundSchema: z.ZodType< + SyncTask$Outbound, + z.ZodTypeDef, + SyncTask +> = z.object({ + id: z.string(), + completedAt: z.date().transform(v => v.toISOString()), +}).transform((v) => { + return remap$(v, { + completedAt: "completed_at", + }); +}); + +export function syncTaskToJSON(syncTask: SyncTask): string { + return JSON.stringify(SyncTask$outboundSchema.parse(syncTask)); +} +export function syncTaskFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SyncTask$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SyncTask' from JSON`, + ); +} diff --git a/src/models/components/tag.ts b/src/models/components/tag.ts index 73b3e523..964c2493 100644 --- a/src/models/components/tag.ts +++ b/src/models/components/tag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -66,7 +66,6 @@ export const Tag$inboundSchema: z.ZodType = z "user_creator_id": "userCreatorId", }); }); - /** @internal */ export type Tag$Outbound = { tag_id: string; @@ -95,23 +94,9 @@ export const Tag$outboundSchema: z.ZodType = z }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Tag$ { - /** @deprecated use `Tag$inboundSchema` instead. */ - export const inboundSchema = Tag$inboundSchema; - /** @deprecated use `Tag$outboundSchema` instead. */ - export const outboundSchema = Tag$outboundSchema; - /** @deprecated use `Tag$Outbound` instead. */ - export type Outbound = Tag$Outbound; -} - export function tagToJSON(tag: Tag): string { return JSON.stringify(Tag$outboundSchema.parse(tag)); } - export function tagFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/tagfilter.ts b/src/models/components/tagfilter.ts index f775561e..c4975b45 100644 --- a/src/models/components/tagfilter.ts +++ b/src/models/components/tagfilter.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -30,7 +30,6 @@ export const TagFilter$inboundSchema: z.ZodType< key: z.string(), value: z.string().optional(), }); - /** @internal */ export type TagFilter$Outbound = { key: string; @@ -47,23 +46,9 @@ export const TagFilter$outboundSchema: z.ZodType< value: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TagFilter$ { - /** @deprecated use `TagFilter$inboundSchema` instead. */ - export const inboundSchema = TagFilter$inboundSchema; - /** @deprecated use `TagFilter$outboundSchema` instead. */ - export const outboundSchema = TagFilter$outboundSchema; - /** @deprecated use `TagFilter$Outbound` instead. */ - export type Outbound = TagFilter$Outbound; -} - export function tagFilterToJSON(tagFilter: TagFilter): string { return JSON.stringify(TagFilter$outboundSchema.parse(tagFilter)); } - export function tagFilterFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/tagselector.ts b/src/models/components/tagselector.ts index 66b2edec..7df41a07 100644 --- a/src/models/components/tagselector.ts +++ b/src/models/components/tagselector.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -28,7 +28,6 @@ export const TagSelector$inboundSchema: z.ZodType< "connection_id": "connectionId", }); }); - /** @internal */ export type TagSelector$Outbound = { key: string; @@ -51,23 +50,9 @@ export const TagSelector$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TagSelector$ { - /** @deprecated use `TagSelector$inboundSchema` instead. */ - export const inboundSchema = TagSelector$inboundSchema; - /** @deprecated use `TagSelector$outboundSchema` instead. */ - export const outboundSchema = TagSelector$outboundSchema; - /** @deprecated use `TagSelector$Outbound` instead. */ - export type Outbound = TagSelector$Outbound; -} - export function tagSelectorToJSON(tagSelector: TagSelector): string { return JSON.stringify(TagSelector$outboundSchema.parse(tagSelector)); } - export function tagSelectorFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/tagslist.ts b/src/models/components/tagslist.ts index c756935e..8d818682 100644 --- a/src/models/components/tagslist.ts +++ b/src/models/components/tagslist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -25,7 +25,6 @@ export const TagsList$inboundSchema: z.ZodType< > = z.object({ tags: z.array(Tag$inboundSchema), }); - /** @internal */ export type TagsList$Outbound = { tags: Array; @@ -40,23 +39,9 @@ export const TagsList$outboundSchema: z.ZodType< tags: z.array(Tag$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TagsList$ { - /** @deprecated use `TagsList$inboundSchema` instead. */ - export const inboundSchema = TagsList$inboundSchema; - /** @deprecated use `TagsList$outboundSchema` instead. */ - export const outboundSchema = TagsList$outboundSchema; - /** @deprecated use `TagsList$Outbound` instead. */ - export type Outbound = TagsList$Outbound; -} - export function tagsListToJSON(tagsList: TagsList): string { return JSON.stringify(TagsList$outboundSchema.parse(tagsList)); } - export function tagsListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/thirdpartyproviderenum.ts b/src/models/components/thirdpartyproviderenum.ts new file mode 100644 index 00000000..21e614e7 --- /dev/null +++ b/src/models/components/thirdpartyproviderenum.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The third party provider of the remote user. + */ +export const ThirdPartyProviderEnum = { + Auth0: "AUTH0", + Slack: "SLACK", + GoogleChat: "GOOGLE_CHAT", + Jira: "JIRA", + Linear: "LINEAR", + ServiceNow: "SERVICE_NOW", + FreshService: "FRESH_SERVICE", + Shortcut: "SHORTCUT", + PagerDuty: "PAGER_DUTY", + Opsgenie: "OPSGENIE", + GitHub: "GIT_HUB", + GitLab: "GIT_LAB", + GitLabConnection: "GIT_LAB_CONNECTION", + Teleport: "TELEPORT", +} as const; +/** + * The third party provider of the remote user. + */ +export type ThirdPartyProviderEnum = ClosedEnum; + +/** @internal */ +export const ThirdPartyProviderEnum$inboundSchema: z.ZodNativeEnum< + typeof ThirdPartyProviderEnum +> = z.nativeEnum(ThirdPartyProviderEnum); +/** @internal */ +export const ThirdPartyProviderEnum$outboundSchema: z.ZodNativeEnum< + typeof ThirdPartyProviderEnum +> = ThirdPartyProviderEnum$inboundSchema; diff --git a/src/models/components/ticketingproviderenum.ts b/src/models/components/ticketingproviderenum.ts index f6837b6e..423b03da 100644 --- a/src/models/components/ticketingproviderenum.ts +++ b/src/models/components/ticketingproviderenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -22,19 +22,7 @@ export type TicketingProviderEnum = ClosedEnum; export const TicketingProviderEnum$inboundSchema: z.ZodNativeEnum< typeof TicketingProviderEnum > = z.nativeEnum(TicketingProviderEnum); - /** @internal */ export const TicketingProviderEnum$outboundSchema: z.ZodNativeEnum< typeof TicketingProviderEnum > = TicketingProviderEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TicketingProviderEnum$ { - /** @deprecated use `TicketingProviderEnum$inboundSchema` instead. */ - export const inboundSchema = TicketingProviderEnum$inboundSchema; - /** @deprecated use `TicketingProviderEnum$outboundSchema` instead. */ - export const outboundSchema = TicketingProviderEnum$outboundSchema; -} diff --git a/src/models/components/ticketpropagationconfiguration.ts b/src/models/components/ticketpropagationconfiguration.ts index 5aa82e16..c81aeaf3 100644 --- a/src/models/components/ticketpropagationconfiguration.ts +++ b/src/models/components/ticketpropagationconfiguration.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -44,7 +44,6 @@ export const TicketPropagationConfiguration$inboundSchema: z.ZodType< "ticket_project_id": "ticketProjectId", }); }); - /** @internal */ export type TicketPropagationConfiguration$Outbound = { enabled_on_grant: boolean; @@ -72,19 +71,6 @@ export const TicketPropagationConfiguration$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TicketPropagationConfiguration$ { - /** @deprecated use `TicketPropagationConfiguration$inboundSchema` instead. */ - export const inboundSchema = TicketPropagationConfiguration$inboundSchema; - /** @deprecated use `TicketPropagationConfiguration$outboundSchema` instead. */ - export const outboundSchema = TicketPropagationConfiguration$outboundSchema; - /** @deprecated use `TicketPropagationConfiguration$Outbound` instead. */ - export type Outbound = TicketPropagationConfiguration$Outbound; -} - export function ticketPropagationConfigurationToJSON( ticketPropagationConfiguration: TicketPropagationConfiguration, ): string { @@ -94,7 +80,6 @@ export function ticketPropagationConfigurationToJSON( ), ); } - export function ticketPropagationConfigurationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/token.ts b/src/models/components/token.ts new file mode 100644 index 00000000..d9b0d000 --- /dev/null +++ b/src/models/components/token.ts @@ -0,0 +1,133 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ApiAccessLevelEnum, + ApiAccessLevelEnum$inboundSchema, + ApiAccessLevelEnum$outboundSchema, +} from "./apiaccesslevelenum.js"; + +/** + * A first-party API token. + */ +export type Token = { + /** + * The ID of the API token. + */ + tokenId: string; + /** + * The date and time the token was created. + */ + createdAt: Date; + /** + * A human-readable label for the token. + */ + tokenLabel: string; + /** + * The ID of the user who created the token. + */ + creatorUserId: string; + /** + * The ID of the user the token authenticates as. + */ + userId: string; + /** + * The date and time the token was last used. + */ + lastUsedAt?: Date | null | undefined; + /** + * The access level of an API token. + */ + accessLevel: ApiAccessLevelEnum; + /** + * The date and time the token expires. + */ + expiresAt?: Date | null | undefined; +}; + +/** @internal */ +export const Token$inboundSchema: z.ZodType = z + .object({ + token_id: z.string(), + created_at: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + token_label: z.string(), + creator_user_id: z.string(), + user_id: z.string(), + last_used_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + access_level: ApiAccessLevelEnum$inboundSchema, + expires_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + }).transform((v) => { + return remap$(v, { + "token_id": "tokenId", + "created_at": "createdAt", + "token_label": "tokenLabel", + "creator_user_id": "creatorUserId", + "user_id": "userId", + "last_used_at": "lastUsedAt", + "access_level": "accessLevel", + "expires_at": "expiresAt", + }); + }); +/** @internal */ +export type Token$Outbound = { + token_id: string; + created_at: string; + token_label: string; + creator_user_id: string; + user_id: string; + last_used_at?: string | null | undefined; + access_level: string; + expires_at?: string | null | undefined; +}; + +/** @internal */ +export const Token$outboundSchema: z.ZodType< + Token$Outbound, + z.ZodTypeDef, + Token +> = z.object({ + tokenId: z.string(), + createdAt: z.date().transform(v => v.toISOString()), + tokenLabel: z.string(), + creatorUserId: z.string(), + userId: z.string(), + lastUsedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + accessLevel: ApiAccessLevelEnum$outboundSchema, + expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + tokenId: "token_id", + createdAt: "created_at", + tokenLabel: "token_label", + creatorUserId: "creator_user_id", + userId: "user_id", + lastUsedAt: "last_used_at", + accessLevel: "access_level", + expiresAt: "expires_at", + }); +}); + +export function tokenToJSON(token: Token): string { + return JSON.stringify(Token$outboundSchema.parse(token)); +} +export function tokenFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Token$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Token' from JSON`, + ); +} diff --git a/src/models/components/uar.ts b/src/models/components/uar.ts index cd23d286..24fab0e5 100644 --- a/src/models/components/uar.ts +++ b/src/models/components/uar.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -32,7 +32,7 @@ export type Uar = { */ name: string; /** - * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. + * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. */ reviewerAssignmentPolicy: UARReviewerAssignmentPolicyEnum; /** @@ -51,6 +51,10 @@ export type Uar = { * A bool representing whether to present a warning when a user is the only reviewer for themself. Default is False. */ selfReviewAllowed: boolean; + /** + * A bool representing whether to instantly action changes when reviewers submit their decision. Default is False. + */ + instantlyActionReviews: boolean; /** * If set, the access review will only contain resources and groups that match at least one of the filters in scope. */ @@ -67,6 +71,7 @@ export const Uar$inboundSchema: z.ZodType = z deadline: z.string().datetime({ offset: true }).transform(v => new Date(v)), time_zone: z.string(), self_review_allowed: z.boolean(), + instantly_action_reviews: z.boolean(), uar_scope: UARScope$inboundSchema.optional(), }).transform((v) => { return remap$(v, { @@ -76,10 +81,10 @@ export const Uar$inboundSchema: z.ZodType = z "sendReviewerAssignmentNotification", "time_zone": "timeZone", "self_review_allowed": "selfReviewAllowed", + "instantly_action_reviews": "instantlyActionReviews", "uar_scope": "uarScope", }); }); - /** @internal */ export type Uar$Outbound = { uar_id: string; @@ -89,6 +94,7 @@ export type Uar$Outbound = { deadline: string; time_zone: string; self_review_allowed: boolean; + instantly_action_reviews: boolean; uar_scope?: UARScope$Outbound | undefined; }; @@ -102,6 +108,7 @@ export const Uar$outboundSchema: z.ZodType = z deadline: z.date().transform(v => v.toISOString()), timeZone: z.string(), selfReviewAllowed: z.boolean(), + instantlyActionReviews: z.boolean(), uarScope: UARScope$outboundSchema.optional(), }).transform((v) => { return remap$(v, { @@ -111,27 +118,14 @@ export const Uar$outboundSchema: z.ZodType = z "send_reviewer_assignment_notification", timeZone: "time_zone", selfReviewAllowed: "self_review_allowed", + instantlyActionReviews: "instantly_action_reviews", uarScope: "uar_scope", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Uar$ { - /** @deprecated use `Uar$inboundSchema` instead. */ - export const inboundSchema = Uar$inboundSchema; - /** @deprecated use `Uar$outboundSchema` instead. */ - export const outboundSchema = Uar$outboundSchema; - /** @deprecated use `Uar$Outbound` instead. */ - export type Outbound = Uar$Outbound; -} - export function uarToJSON(uar: Uar): string { return JSON.stringify(Uar$outboundSchema.parse(uar)); } - export function uarFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/uarreviewerassignmentpolicyenum.ts b/src/models/components/uarreviewerassignmentpolicyenum.ts index f2740a1a..f224ac98 100644 --- a/src/models/components/uarreviewerassignmentpolicyenum.ts +++ b/src/models/components/uarreviewerassignmentpolicyenum.ts @@ -2,19 +2,22 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** - * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. + * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. */ export const UARReviewerAssignmentPolicyEnum = { Manually: "MANUALLY", ByOwningTeamAdmin: "BY_OWNING_TEAM_ADMIN", + ByOwningTeamAdminAll: "BY_OWNING_TEAM_ADMIN_ALL", ByManager: "BY_MANAGER", + ByApprovers: "BY_APPROVERS", + ByApproversAll: "BY_APPROVERS_ALL", } as const; /** - * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. + * A policy for auto-assigning reviewers. If auto-assignment is on, specific assignments can still be manually adjusted after the access review is started. Default is Manually. BY_OWNING_TEAM_ADMIN assigns reviews to resource admins in round-robin fashion. BY_OWNING_TEAM_ADMIN_ALL assigns reviews to all resource admins. BY_APPROVERS assigns reviews to resource approvers in round-robin fashion. BY_APPROVERS_ALL assigns reviews to all resource approvers. */ export type UARReviewerAssignmentPolicyEnum = ClosedEnum< typeof UARReviewerAssignmentPolicyEnum @@ -24,19 +27,7 @@ export type UARReviewerAssignmentPolicyEnum = ClosedEnum< export const UARReviewerAssignmentPolicyEnum$inboundSchema: z.ZodNativeEnum< typeof UARReviewerAssignmentPolicyEnum > = z.nativeEnum(UARReviewerAssignmentPolicyEnum); - /** @internal */ export const UARReviewerAssignmentPolicyEnum$outboundSchema: z.ZodNativeEnum< typeof UARReviewerAssignmentPolicyEnum > = UARReviewerAssignmentPolicyEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UARReviewerAssignmentPolicyEnum$ { - /** @deprecated use `UARReviewerAssignmentPolicyEnum$inboundSchema` instead. */ - export const inboundSchema = UARReviewerAssignmentPolicyEnum$inboundSchema; - /** @deprecated use `UARReviewerAssignmentPolicyEnum$outboundSchema` instead. */ - export const outboundSchema = UARReviewerAssignmentPolicyEnum$outboundSchema; -} diff --git a/src/models/components/uarscope.ts b/src/models/components/uarscope.ts index 66640ae0..4b56583c 100644 --- a/src/models/components/uarscope.ts +++ b/src/models/components/uarscope.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; @@ -101,44 +101,20 @@ export type UARScope = { export const GroupVisibility$inboundSchema: z.ZodNativeEnum< typeof GroupVisibility > = z.nativeEnum(GroupVisibility); - /** @internal */ export const GroupVisibility$outboundSchema: z.ZodNativeEnum< typeof GroupVisibility > = GroupVisibility$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupVisibility$ { - /** @deprecated use `GroupVisibility$inboundSchema` instead. */ - export const inboundSchema = GroupVisibility$inboundSchema; - /** @deprecated use `GroupVisibility$outboundSchema` instead. */ - export const outboundSchema = GroupVisibility$outboundSchema; -} - /** @internal */ export const FilterOperator$inboundSchema: z.ZodNativeEnum< typeof FilterOperator > = z.nativeEnum(FilterOperator); - /** @internal */ export const FilterOperator$outboundSchema: z.ZodNativeEnum< typeof FilterOperator > = FilterOperator$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FilterOperator$ { - /** @deprecated use `FilterOperator$inboundSchema` instead. */ - export const inboundSchema = FilterOperator$inboundSchema; - /** @deprecated use `FilterOperator$outboundSchema` instead. */ - export const outboundSchema = FilterOperator$outboundSchema; -} - /** @internal */ export const UARScope$inboundSchema: z.ZodType< UARScope, @@ -165,7 +141,6 @@ export const UARScope$inboundSchema: z.ZodType< "include_group_bindings": "includeGroupBindings", }); }); - /** @internal */ export type UARScope$Outbound = { group_visibility?: string | undefined; @@ -208,23 +183,9 @@ export const UARScope$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UARScope$ { - /** @deprecated use `UARScope$inboundSchema` instead. */ - export const inboundSchema = UARScope$inboundSchema; - /** @deprecated use `UARScope$outboundSchema` instead. */ - export const outboundSchema = UARScope$outboundSchema; - /** @deprecated use `UARScope$Outbound` instead. */ - export type Outbound = UARScope$Outbound; -} - export function uarScopeToJSON(uarScope: UARScope): string { return JSON.stringify(UARScope$outboundSchema.parse(uarScope)); } - export function uarScopeFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updateaccessruleinfo.ts b/src/models/components/updateaccessruleinfo.ts index 3ff2aa08..26c761aa 100644 --- a/src/models/components/updateaccessruleinfo.ts +++ b/src/models/components/updateaccessruleinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; @@ -60,23 +60,11 @@ export type UpdateAccessRuleInfo = { export const UpdateAccessRuleInfoStatus$inboundSchema: z.ZodNativeEnum< typeof UpdateAccessRuleInfoStatus > = z.nativeEnum(UpdateAccessRuleInfoStatus); - /** @internal */ export const UpdateAccessRuleInfoStatus$outboundSchema: z.ZodNativeEnum< typeof UpdateAccessRuleInfoStatus > = UpdateAccessRuleInfoStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateAccessRuleInfoStatus$ { - /** @deprecated use `UpdateAccessRuleInfoStatus$inboundSchema` instead. */ - export const inboundSchema = UpdateAccessRuleInfoStatus$inboundSchema; - /** @deprecated use `UpdateAccessRuleInfoStatus$outboundSchema` instead. */ - export const outboundSchema = UpdateAccessRuleInfoStatus$outboundSchema; -} - /** @internal */ export const UpdateAccessRuleInfo$inboundSchema: z.ZodType< UpdateAccessRuleInfo, @@ -93,7 +81,6 @@ export const UpdateAccessRuleInfo$inboundSchema: z.ZodType< "admin_owner_id": "adminOwnerId", }); }); - /** @internal */ export type UpdateAccessRuleInfo$Outbound = { name: string; @@ -120,19 +107,6 @@ export const UpdateAccessRuleInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateAccessRuleInfo$ { - /** @deprecated use `UpdateAccessRuleInfo$inboundSchema` instead. */ - export const inboundSchema = UpdateAccessRuleInfo$inboundSchema; - /** @deprecated use `UpdateAccessRuleInfo$outboundSchema` instead. */ - export const outboundSchema = UpdateAccessRuleInfo$outboundSchema; - /** @deprecated use `UpdateAccessRuleInfo$Outbound` instead. */ - export type Outbound = UpdateAccessRuleInfo$Outbound; -} - export function updateAccessRuleInfoToJSON( updateAccessRuleInfo: UpdateAccessRuleInfo, ): string { @@ -140,7 +114,6 @@ export function updateAccessRuleInfoToJSON( UpdateAccessRuleInfo$outboundSchema.parse(updateAccessRuleInfo), ); } - export function updateAccessRuleInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updatecampaignconfigurationinfo.ts b/src/models/components/updatecampaignconfigurationinfo.ts new file mode 100644 index 00000000..9bd322ba --- /dev/null +++ b/src/models/components/updatecampaignconfigurationinfo.ts @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + CampaignGroupAssetVisibilityPolicyEnum, + CampaignGroupAssetVisibilityPolicyEnum$inboundSchema, + CampaignGroupAssetVisibilityPolicyEnum$outboundSchema, +} from "./campaigngroupassetvisibilitypolicyenum.js"; +import { + CampaignRevokeOnEnum, + CampaignRevokeOnEnum$inboundSchema, + CampaignRevokeOnEnum$outboundSchema, +} from "./campaignrevokeonenum.js"; + +/** + * Configuration fields to update on a campaign. All fields are optional; + * + * @remarks + * omitted fields are left unchanged. `query` and + * `reviewer_assignment_policy` are set at create time and cannot be + * updated here; including either field returns 400. + * `cron_expression` and `recurring_duration_days` may only be set when + * the campaign is a template; setting them on a one-off campaign returns + * 400. `is_template` is immutable and not accepted on update. + */ +export type UpdateCampaignConfigurationInfo = { + /** + * Whether reviewers can review their own access. + */ + allowSelfReview?: boolean | undefined; + /** + * Whether to notify reviewers upon assignment. + */ + sendReviewerAssignmentNotification?: boolean | undefined; + /** + * Whether reviewers may reassign their reviews to another user. + */ + allowReviewerReassignment?: boolean | undefined; + /** + * Scheduled start date of the campaign. May only be updated while the + * + * @remarks + * campaign has not started (started_at is null). When set, the date's + * calendar day in the campaign timezone must be at least tomorrow. + */ + startDate?: Date | null | undefined; + /** + * Scheduled end date of the campaign. When set, the date's calendar + * + * @remarks + * day in the campaign timezone must be at least tomorrow. + */ + endDate?: Date | null | undefined; + /** + * IANA timezone used to interpret campaign deadlines (e.g. America/Los_Angeles). + */ + timezone?: string | undefined; + /** + * When access decisions take effect during a campaign. + */ + revokeOn?: CampaignRevokeOnEnum | undefined; + /** + * Days before end date to send reminder notifications. + */ + reminderSchedule?: Array | undefined; + /** + * Whether to include the reviewer's manager in reminders. + */ + reminderIncludeManager?: boolean | undefined; + /** + * Whether reviewers must provide a reason when denying (revoking) access. + */ + requireReasonOnDenial?: boolean | undefined; + /** + * Whether AI suggestions are hidden from reviewers. + */ + hideAiSuggestions?: boolean | undefined; + /** + * Optional custom message included when notifying reviewers that the campaign started. + */ + customStartMessage?: string | null | undefined; + /** + * Controls what group assets reviewers can see during the campaign. + */ + groupAssetVisibilityPolicy?: + | CampaignGroupAssetVisibilityPolicyEnum + | undefined; + /** + * Cron expression driving the recurring schedule. Only valid on template campaigns. Pass an empty string to clear the active months (next_scheduled_run is cleared); the campaign remains a template. + */ + cronExpression?: string | null | undefined; + /** + * Deadline window in days applied to each draft generated from this template. Only valid on template campaigns. + */ + recurringDurationDays?: number | null | undefined; +}; + +/** @internal */ +export const UpdateCampaignConfigurationInfo$inboundSchema: z.ZodType< + UpdateCampaignConfigurationInfo, + z.ZodTypeDef, + unknown +> = z.object({ + allow_self_review: z.boolean().optional(), + send_reviewer_assignment_notification: z.boolean().optional(), + allow_reviewer_reassignment: z.boolean().optional(), + start_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + end_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + timezone: z.string().optional(), + revoke_on: CampaignRevokeOnEnum$inboundSchema.optional(), + reminder_schedule: z.array(z.number().int()).optional(), + reminder_include_manager: z.boolean().optional(), + require_reason_on_denial: z.boolean().optional(), + hide_ai_suggestions: z.boolean().optional(), + custom_start_message: z.nullable(z.string()).optional(), + group_asset_visibility_policy: + CampaignGroupAssetVisibilityPolicyEnum$inboundSchema.optional(), + cron_expression: z.nullable(z.string()).optional(), + recurring_duration_days: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "allow_self_review": "allowSelfReview", + "send_reviewer_assignment_notification": + "sendReviewerAssignmentNotification", + "allow_reviewer_reassignment": "allowReviewerReassignment", + "start_date": "startDate", + "end_date": "endDate", + "revoke_on": "revokeOn", + "reminder_schedule": "reminderSchedule", + "reminder_include_manager": "reminderIncludeManager", + "require_reason_on_denial": "requireReasonOnDenial", + "hide_ai_suggestions": "hideAiSuggestions", + "custom_start_message": "customStartMessage", + "group_asset_visibility_policy": "groupAssetVisibilityPolicy", + "cron_expression": "cronExpression", + "recurring_duration_days": "recurringDurationDays", + }); +}); +/** @internal */ +export type UpdateCampaignConfigurationInfo$Outbound = { + allow_self_review?: boolean | undefined; + send_reviewer_assignment_notification?: boolean | undefined; + allow_reviewer_reassignment?: boolean | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; + timezone?: string | undefined; + revoke_on?: string | undefined; + reminder_schedule?: Array | undefined; + reminder_include_manager?: boolean | undefined; + require_reason_on_denial?: boolean | undefined; + hide_ai_suggestions?: boolean | undefined; + custom_start_message?: string | null | undefined; + group_asset_visibility_policy?: string | undefined; + cron_expression?: string | null | undefined; + recurring_duration_days?: number | null | undefined; +}; + +/** @internal */ +export const UpdateCampaignConfigurationInfo$outboundSchema: z.ZodType< + UpdateCampaignConfigurationInfo$Outbound, + z.ZodTypeDef, + UpdateCampaignConfigurationInfo +> = z.object({ + allowSelfReview: z.boolean().optional(), + sendReviewerAssignmentNotification: z.boolean().optional(), + allowReviewerReassignment: z.boolean().optional(), + startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + timezone: z.string().optional(), + revokeOn: CampaignRevokeOnEnum$outboundSchema.optional(), + reminderSchedule: z.array(z.number().int()).optional(), + reminderIncludeManager: z.boolean().optional(), + requireReasonOnDenial: z.boolean().optional(), + hideAiSuggestions: z.boolean().optional(), + customStartMessage: z.nullable(z.string()).optional(), + groupAssetVisibilityPolicy: + CampaignGroupAssetVisibilityPolicyEnum$outboundSchema.optional(), + cronExpression: z.nullable(z.string()).optional(), + recurringDurationDays: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + allowSelfReview: "allow_self_review", + sendReviewerAssignmentNotification: "send_reviewer_assignment_notification", + allowReviewerReassignment: "allow_reviewer_reassignment", + startDate: "start_date", + endDate: "end_date", + revokeOn: "revoke_on", + reminderSchedule: "reminder_schedule", + reminderIncludeManager: "reminder_include_manager", + requireReasonOnDenial: "require_reason_on_denial", + hideAiSuggestions: "hide_ai_suggestions", + customStartMessage: "custom_start_message", + groupAssetVisibilityPolicy: "group_asset_visibility_policy", + cronExpression: "cron_expression", + recurringDurationDays: "recurring_duration_days", + }); +}); + +export function updateCampaignConfigurationInfoToJSON( + updateCampaignConfigurationInfo: UpdateCampaignConfigurationInfo, +): string { + return JSON.stringify( + UpdateCampaignConfigurationInfo$outboundSchema.parse( + updateCampaignConfigurationInfo, + ), + ); +} +export function updateCampaignConfigurationInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateCampaignConfigurationInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateCampaignConfigurationInfo' from JSON`, + ); +} diff --git a/src/models/components/updatecampaigninfo.ts b/src/models/components/updatecampaigninfo.ts new file mode 100644 index 00000000..4ae74786 --- /dev/null +++ b/src/models/components/updatecampaigninfo.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + UpdateCampaignConfigurationInfo, + UpdateCampaignConfigurationInfo$inboundSchema, + UpdateCampaignConfigurationInfo$Outbound, + UpdateCampaignConfigurationInfo$outboundSchema, +} from "./updatecampaignconfigurationinfo.js"; + +/** + * # UpdateCampaignInfo Object + * + * @remarks + * ### Description + * The `UpdateCampaignInfo` object is used to partially update a campaign. + * Omitted fields are left unchanged. + * + * ### Usage Example + * Use in the `PUT Campaign` endpoint. + */ +export type UpdateCampaignInfo = { + /** + * The name of the campaign. + */ + name?: string | undefined; + /** + * Configuration fields to create or update. + */ + configuration?: UpdateCampaignConfigurationInfo | undefined; +}; + +/** @internal */ +export const UpdateCampaignInfo$inboundSchema: z.ZodType< + UpdateCampaignInfo, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + configuration: UpdateCampaignConfigurationInfo$inboundSchema.optional(), +}); +/** @internal */ +export type UpdateCampaignInfo$Outbound = { + name?: string | undefined; + configuration?: UpdateCampaignConfigurationInfo$Outbound | undefined; +}; + +/** @internal */ +export const UpdateCampaignInfo$outboundSchema: z.ZodType< + UpdateCampaignInfo$Outbound, + z.ZodTypeDef, + UpdateCampaignInfo +> = z.object({ + name: z.string().optional(), + configuration: UpdateCampaignConfigurationInfo$outboundSchema.optional(), +}); + +export function updateCampaignInfoToJSON( + updateCampaignInfo: UpdateCampaignInfo, +): string { + return JSON.stringify( + UpdateCampaignInfo$outboundSchema.parse(updateCampaignInfo), + ); +} +export function updateCampaignInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateCampaignInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateCampaignInfo' from JSON`, + ); +} diff --git a/src/models/components/updateconfigurationtemplateinfo.ts b/src/models/components/updateconfigurationtemplateinfo.ts index 3ad19a9b..0398e0e7 100644 --- a/src/models/components/updateconfigurationtemplateinfo.ts +++ b/src/models/components/updateconfigurationtemplateinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -152,7 +152,6 @@ export const UpdateConfigurationTemplateInfo$inboundSchema: z.ZodType< "custom_request_notification": "customRequestNotification", }); }); - /** @internal */ export type UpdateConfigurationTemplateInfo$Outbound = { configuration_template_id: string; @@ -209,19 +208,6 @@ export const UpdateConfigurationTemplateInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateConfigurationTemplateInfo$ { - /** @deprecated use `UpdateConfigurationTemplateInfo$inboundSchema` instead. */ - export const inboundSchema = UpdateConfigurationTemplateInfo$inboundSchema; - /** @deprecated use `UpdateConfigurationTemplateInfo$outboundSchema` instead. */ - export const outboundSchema = UpdateConfigurationTemplateInfo$outboundSchema; - /** @deprecated use `UpdateConfigurationTemplateInfo$Outbound` instead. */ - export type Outbound = UpdateConfigurationTemplateInfo$Outbound; -} - export function updateConfigurationTemplateInfoToJSON( updateConfigurationTemplateInfo: UpdateConfigurationTemplateInfo, ): string { @@ -231,7 +217,6 @@ export function updateConfigurationTemplateInfoToJSON( ), ); } - export function updateConfigurationTemplateInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updateeventstreaminfo.ts b/src/models/components/updateeventstreaminfo.ts new file mode 100644 index 00000000..7a710636 --- /dev/null +++ b/src/models/components/updateeventstreaminfo.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + WebhookCredentials, + WebhookCredentials$inboundSchema, + WebhookCredentials$Outbound, + WebhookCredentials$outboundSchema, +} from "./webhookcredentials.js"; + +/** + * Information needed to update an event stream. + */ +export type UpdateEventStreamInfo = { + /** + * Updated name for the event stream. + */ + name?: string | undefined; + /** + * Whether the event stream should be enabled. + */ + enabled?: boolean | undefined; + /** + * Updated webhook URL. + */ + webhookUrl?: string | undefined; + /** + * Authentication credentials for a webhook connection. + */ + credentials?: WebhookCredentials | undefined; +}; + +/** @internal */ +export const UpdateEventStreamInfo$inboundSchema: z.ZodType< + UpdateEventStreamInfo, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + enabled: z.boolean().optional(), + webhook_url: z.string().optional(), + credentials: WebhookCredentials$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "webhook_url": "webhookUrl", + }); +}); +/** @internal */ +export type UpdateEventStreamInfo$Outbound = { + name?: string | undefined; + enabled?: boolean | undefined; + webhook_url?: string | undefined; + credentials?: WebhookCredentials$Outbound | undefined; +}; + +/** @internal */ +export const UpdateEventStreamInfo$outboundSchema: z.ZodType< + UpdateEventStreamInfo$Outbound, + z.ZodTypeDef, + UpdateEventStreamInfo +> = z.object({ + name: z.string().optional(), + enabled: z.boolean().optional(), + webhookUrl: z.string().optional(), + credentials: WebhookCredentials$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + webhookUrl: "webhook_url", + }); +}); + +export function updateEventStreamInfoToJSON( + updateEventStreamInfo: UpdateEventStreamInfo, +): string { + return JSON.stringify( + UpdateEventStreamInfo$outboundSchema.parse(updateEventStreamInfo), + ); +} +export function updateEventStreamInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateEventStreamInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEventStreamInfo' from JSON`, + ); +} diff --git a/src/models/components/updategroupbindinginfo.ts b/src/models/components/updategroupbindinginfo.ts index 1c34d987..ed590d0f 100644 --- a/src/models/components/updategroupbindinginfo.ts +++ b/src/models/components/updategroupbindinginfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -49,7 +49,6 @@ export const UpdateGroupBindingInfoGroup$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type UpdateGroupBindingInfoGroup$Outbound = { group_id: string; @@ -68,19 +67,6 @@ export const UpdateGroupBindingInfoGroup$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateGroupBindingInfoGroup$ { - /** @deprecated use `UpdateGroupBindingInfoGroup$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupBindingInfoGroup$inboundSchema; - /** @deprecated use `UpdateGroupBindingInfoGroup$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupBindingInfoGroup$outboundSchema; - /** @deprecated use `UpdateGroupBindingInfoGroup$Outbound` instead. */ - export type Outbound = UpdateGroupBindingInfoGroup$Outbound; -} - export function updateGroupBindingInfoGroupToJSON( updateGroupBindingInfoGroup: UpdateGroupBindingInfoGroup, ): string { @@ -90,7 +76,6 @@ export function updateGroupBindingInfoGroupToJSON( ), ); } - export function updateGroupBindingInfoGroupFromJSON( jsonString: string, ): SafeParseResult { @@ -116,7 +101,6 @@ export const UpdateGroupBindingInfo$inboundSchema: z.ZodType< "source_group_id": "sourceGroupId", }); }); - /** @internal */ export type UpdateGroupBindingInfo$Outbound = { group_binding_id: string; @@ -140,19 +124,6 @@ export const UpdateGroupBindingInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateGroupBindingInfo$ { - /** @deprecated use `UpdateGroupBindingInfo$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupBindingInfo$inboundSchema; - /** @deprecated use `UpdateGroupBindingInfo$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupBindingInfo$outboundSchema; - /** @deprecated use `UpdateGroupBindingInfo$Outbound` instead. */ - export type Outbound = UpdateGroupBindingInfo$Outbound; -} - export function updateGroupBindingInfoToJSON( updateGroupBindingInfo: UpdateGroupBindingInfo, ): string { @@ -160,7 +131,6 @@ export function updateGroupBindingInfoToJSON( UpdateGroupBindingInfo$outboundSchema.parse(updateGroupBindingInfo), ); } - export function updateGroupBindingInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updategroupbindinginfolist.ts b/src/models/components/updategroupbindinginfolist.ts index 242fd8dd..19b40ae8 100644 --- a/src/models/components/updategroupbindinginfolist.ts +++ b/src/models/components/updategroupbindinginfolist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const UpdateGroupBindingInfoList$inboundSchema: z.ZodType< "group_bindings": "groupBindings", }); }); - /** @internal */ export type UpdateGroupBindingInfoList$Outbound = { group_bindings: Array; @@ -52,19 +51,6 @@ export const UpdateGroupBindingInfoList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateGroupBindingInfoList$ { - /** @deprecated use `UpdateGroupBindingInfoList$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupBindingInfoList$inboundSchema; - /** @deprecated use `UpdateGroupBindingInfoList$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupBindingInfoList$outboundSchema; - /** @deprecated use `UpdateGroupBindingInfoList$Outbound` instead. */ - export type Outbound = UpdateGroupBindingInfoList$Outbound; -} - export function updateGroupBindingInfoListToJSON( updateGroupBindingInfoList: UpdateGroupBindingInfoList, ): string { @@ -72,7 +58,6 @@ export function updateGroupBindingInfoListToJSON( UpdateGroupBindingInfoList$outboundSchema.parse(updateGroupBindingInfoList), ); } - export function updateGroupBindingInfoListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updategroupinfo.ts b/src/models/components/updategroupinfo.ts index 2535ee57..b5c2cee4 100644 --- a/src/models/components/updategroupinfo.ts +++ b/src/models/components/updategroupinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -115,6 +115,12 @@ export type UpdateGroupInfo = { * A list of User IDs for the group leaders of the group */ groupLeaderUserIds?: Array | undefined; + /** + * The duration for which access can be extended (in minutes). Deprecated, set the extension duration in the request_configuration you want it to apply to. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + extensionsDurationInMinutes?: number | undefined; /** * The request configuration list of the configuration template. If not provided, the default request configuration will be used. */ @@ -147,6 +153,14 @@ export type UpdateGroupInfo = { */ customRequestNotification?: string | null | undefined; riskSensitivityOverride?: RiskSensitivityEnum | undefined; + /** + * A bool representing whether or not the group's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. + */ + matchRemoteName?: boolean | undefined; + /** + * A bool representing whether or not the group's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. + */ + matchRemoteDescription?: boolean | undefined; }; /** @internal */ @@ -171,12 +185,15 @@ export const UpdateGroupInfo$inboundSchema: z.ZodType< request_template_id: z.string().optional(), is_requestable: z.boolean().optional(), group_leader_user_ids: z.array(z.string()).optional(), + extensions_duration_in_minutes: z.number().int().optional(), request_configurations: z.array(RequestConfiguration$inboundSchema) .optional(), request_configuration_list: CreateRequestConfigurationInfoList$inboundSchema .optional(), custom_request_notification: z.nullable(z.string()).optional(), risk_sensitivity_override: RiskSensitivityEnum$inboundSchema.optional(), + match_remote_name: z.boolean().optional(), + match_remote_description: z.boolean().optional(), }).transform((v) => { return remap$(v, { "group_id": "groupId", @@ -193,13 +210,15 @@ export const UpdateGroupInfo$inboundSchema: z.ZodType< "request_template_id": "requestTemplateId", "is_requestable": "isRequestable", "group_leader_user_ids": "groupLeaderUserIds", + "extensions_duration_in_minutes": "extensionsDurationInMinutes", "request_configurations": "requestConfigurations", "request_configuration_list": "requestConfigurationList", "custom_request_notification": "customRequestNotification", "risk_sensitivity_override": "riskSensitivityOverride", + "match_remote_name": "matchRemoteName", + "match_remote_description": "matchRemoteDescription", }); }); - /** @internal */ export type UpdateGroupInfo$Outbound = { group_id: string; @@ -218,12 +237,15 @@ export type UpdateGroupInfo$Outbound = { request_template_id?: string | undefined; is_requestable?: boolean | undefined; group_leader_user_ids?: Array | undefined; + extensions_duration_in_minutes?: number | undefined; request_configurations?: Array | undefined; request_configuration_list?: | CreateRequestConfigurationInfoList$Outbound | undefined; custom_request_notification?: string | null | undefined; risk_sensitivity_override?: string | undefined; + match_remote_name?: boolean | undefined; + match_remote_description?: boolean | undefined; }; /** @internal */ @@ -248,12 +270,15 @@ export const UpdateGroupInfo$outboundSchema: z.ZodType< requestTemplateId: z.string().optional(), isRequestable: z.boolean().optional(), groupLeaderUserIds: z.array(z.string()).optional(), + extensionsDurationInMinutes: z.number().int().optional(), requestConfigurations: z.array(RequestConfiguration$outboundSchema) .optional(), requestConfigurationList: CreateRequestConfigurationInfoList$outboundSchema .optional(), customRequestNotification: z.nullable(z.string()).optional(), riskSensitivityOverride: RiskSensitivityEnum$outboundSchema.optional(), + matchRemoteName: z.boolean().optional(), + matchRemoteDescription: z.boolean().optional(), }).transform((v) => { return remap$(v, { groupId: "group_id", @@ -270,32 +295,21 @@ export const UpdateGroupInfo$outboundSchema: z.ZodType< requestTemplateId: "request_template_id", isRequestable: "is_requestable", groupLeaderUserIds: "group_leader_user_ids", + extensionsDurationInMinutes: "extensions_duration_in_minutes", requestConfigurations: "request_configurations", requestConfigurationList: "request_configuration_list", customRequestNotification: "custom_request_notification", riskSensitivityOverride: "risk_sensitivity_override", + matchRemoteName: "match_remote_name", + matchRemoteDescription: "match_remote_description", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateGroupInfo$ { - /** @deprecated use `UpdateGroupInfo$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupInfo$inboundSchema; - /** @deprecated use `UpdateGroupInfo$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupInfo$outboundSchema; - /** @deprecated use `UpdateGroupInfo$Outbound` instead. */ - export type Outbound = UpdateGroupInfo$Outbound; -} - export function updateGroupInfoToJSON( updateGroupInfo: UpdateGroupInfo, ): string { return JSON.stringify(UpdateGroupInfo$outboundSchema.parse(updateGroupInfo)); } - export function updateGroupInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updategroupinfolist.ts b/src/models/components/updategroupinfolist.ts index 45ed58f4..0b74c71c 100644 --- a/src/models/components/updategroupinfolist.ts +++ b/src/models/components/updategroupinfolist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,7 +28,6 @@ export const UpdateGroupInfoList$inboundSchema: z.ZodType< > = z.object({ groups: z.array(UpdateGroupInfo$inboundSchema), }); - /** @internal */ export type UpdateGroupInfoList$Outbound = { groups: Array; @@ -43,19 +42,6 @@ export const UpdateGroupInfoList$outboundSchema: z.ZodType< groups: z.array(UpdateGroupInfo$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateGroupInfoList$ { - /** @deprecated use `UpdateGroupInfoList$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupInfoList$inboundSchema; - /** @deprecated use `UpdateGroupInfoList$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupInfoList$outboundSchema; - /** @deprecated use `UpdateGroupInfoList$Outbound` instead. */ - export type Outbound = UpdateGroupInfoList$Outbound; -} - export function updateGroupInfoListToJSON( updateGroupInfoList: UpdateGroupInfoList, ): string { @@ -63,7 +49,6 @@ export function updateGroupInfoListToJSON( UpdateGroupInfoList$outboundSchema.parse(updateGroupInfoList), ); } - export function updateGroupInfoListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updategroupresourcesinfo.ts b/src/models/components/updategroupresourcesinfo.ts index 820bd17d..17d1673c 100644 --- a/src/models/components/updategroupresourcesinfo.ts +++ b/src/models/components/updategroupresourcesinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -25,7 +25,6 @@ export const UpdateGroupResourcesInfo$inboundSchema: z.ZodType< > = z.object({ resources: z.array(ResourceWithAccessLevel$inboundSchema), }); - /** @internal */ export type UpdateGroupResourcesInfo$Outbound = { resources: Array; @@ -40,19 +39,6 @@ export const UpdateGroupResourcesInfo$outboundSchema: z.ZodType< resources: z.array(ResourceWithAccessLevel$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateGroupResourcesInfo$ { - /** @deprecated use `UpdateGroupResourcesInfo$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupResourcesInfo$inboundSchema; - /** @deprecated use `UpdateGroupResourcesInfo$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupResourcesInfo$outboundSchema; - /** @deprecated use `UpdateGroupResourcesInfo$Outbound` instead. */ - export type Outbound = UpdateGroupResourcesInfo$Outbound; -} - export function updateGroupResourcesInfoToJSON( updateGroupResourcesInfo: UpdateGroupResourcesInfo, ): string { @@ -60,7 +46,6 @@ export function updateGroupResourcesInfoToJSON( UpdateGroupResourcesInfo$outboundSchema.parse(updateGroupResourcesInfo), ); } - export function updateGroupResourcesInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updateownerinfo.ts b/src/models/components/updateownerinfo.ts index c52924fb..8dc0dc49 100644 --- a/src/models/components/updateownerinfo.ts +++ b/src/models/components/updateownerinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -62,7 +62,6 @@ export const UpdateOwnerInfo$inboundSchema: z.ZodType< "source_group_id": "sourceGroupId", }); }); - /** @internal */ export type UpdateOwnerInfo$Outbound = { owner_id: string; @@ -94,25 +93,11 @@ export const UpdateOwnerInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateOwnerInfo$ { - /** @deprecated use `UpdateOwnerInfo$inboundSchema` instead. */ - export const inboundSchema = UpdateOwnerInfo$inboundSchema; - /** @deprecated use `UpdateOwnerInfo$outboundSchema` instead. */ - export const outboundSchema = UpdateOwnerInfo$outboundSchema; - /** @deprecated use `UpdateOwnerInfo$Outbound` instead. */ - export type Outbound = UpdateOwnerInfo$Outbound; -} - export function updateOwnerInfoToJSON( updateOwnerInfo: UpdateOwnerInfo, ): string { return JSON.stringify(UpdateOwnerInfo$outboundSchema.parse(updateOwnerInfo)); } - export function updateOwnerInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updateownerinfolist.ts b/src/models/components/updateownerinfolist.ts index 326b9909..158101f9 100644 --- a/src/models/components/updateownerinfolist.ts +++ b/src/models/components/updateownerinfolist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,7 +28,6 @@ export const UpdateOwnerInfoList$inboundSchema: z.ZodType< > = z.object({ owners: z.array(UpdateOwnerInfo$inboundSchema), }); - /** @internal */ export type UpdateOwnerInfoList$Outbound = { owners: Array; @@ -43,19 +42,6 @@ export const UpdateOwnerInfoList$outboundSchema: z.ZodType< owners: z.array(UpdateOwnerInfo$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateOwnerInfoList$ { - /** @deprecated use `UpdateOwnerInfoList$inboundSchema` instead. */ - export const inboundSchema = UpdateOwnerInfoList$inboundSchema; - /** @deprecated use `UpdateOwnerInfoList$outboundSchema` instead. */ - export const outboundSchema = UpdateOwnerInfoList$outboundSchema; - /** @deprecated use `UpdateOwnerInfoList$Outbound` instead. */ - export type Outbound = UpdateOwnerInfoList$Outbound; -} - export function updateOwnerInfoListToJSON( updateOwnerInfoList: UpdateOwnerInfoList, ): string { @@ -63,7 +49,6 @@ export function updateOwnerInfoListToJSON( UpdateOwnerInfoList$outboundSchema.parse(updateOwnerInfoList), ); } - export function updateOwnerInfoListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updatepaladininfo.ts b/src/models/components/updatepaladininfo.ts new file mode 100644 index 00000000..2b4996a1 --- /dev/null +++ b/src/models/components/updatepaladininfo.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PaladinConnector, + PaladinConnector$inboundSchema, + PaladinConnector$outboundSchema, +} from "./paladinconnector.js"; + +/** + * Information for updating a Paladin. + */ +export type UpdatePaladinInfo = { + /** + * The name of the Paladin. + */ + name: string; + /** + * When true, the Paladin reasons about requests but takes no action. If omitted, the existing value is preserved. + */ + monitorMode?: boolean | undefined; + /** + * When true, recommendations are visible only to admins. Only meaningful when monitor_mode is true. If omitted, the existing value is preserved. + */ + adminViewOnly?: boolean | undefined; + /** + * The connectors the Paladin is allowed to use. If omitted, the existing connectors are preserved. + */ + enabledConnectors?: Array | undefined; + /** + * The free-form instructions that guide the Paladin's decisions. If omitted, the existing instructions are preserved. + */ + instructions?: string | undefined; +}; + +/** @internal */ +export const UpdatePaladinInfo$inboundSchema: z.ZodType< + UpdatePaladinInfo, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + monitor_mode: z.boolean().optional(), + admin_view_only: z.boolean().optional(), + enabled_connectors: z.array(PaladinConnector$inboundSchema).optional(), + instructions: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "monitor_mode": "monitorMode", + "admin_view_only": "adminViewOnly", + "enabled_connectors": "enabledConnectors", + }); +}); +/** @internal */ +export type UpdatePaladinInfo$Outbound = { + name: string; + monitor_mode?: boolean | undefined; + admin_view_only?: boolean | undefined; + enabled_connectors?: Array | undefined; + instructions?: string | undefined; +}; + +/** @internal */ +export const UpdatePaladinInfo$outboundSchema: z.ZodType< + UpdatePaladinInfo$Outbound, + z.ZodTypeDef, + UpdatePaladinInfo +> = z.object({ + name: z.string(), + monitorMode: z.boolean().optional(), + adminViewOnly: z.boolean().optional(), + enabledConnectors: z.array(PaladinConnector$outboundSchema).optional(), + instructions: z.string().optional(), +}).transform((v) => { + return remap$(v, { + monitorMode: "monitor_mode", + adminViewOnly: "admin_view_only", + enabledConnectors: "enabled_connectors", + }); +}); + +export function updatePaladinInfoToJSON( + updatePaladinInfo: UpdatePaladinInfo, +): string { + return JSON.stringify( + UpdatePaladinInfo$outboundSchema.parse(updatePaladinInfo), + ); +} +export function updatePaladinInfoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePaladinInfo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePaladinInfo' from JSON`, + ); +} diff --git a/src/models/components/updateresourceinfo.ts b/src/models/components/updateresourceinfo.ts index c768f0c6..0d766a37 100644 --- a/src/models/components/updateresourceinfo.ts +++ b/src/models/components/updateresourceinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -114,6 +114,14 @@ export type UpdateResourceInfo = { */ customRequestNotification?: string | null | undefined; riskSensitivityOverride?: RiskSensitivityEnum | undefined; + /** + * A bool representing whether or not the resource's name should be synced from the end system. When true, the name is overwritten with the remote name on each sync, so a `name` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. + */ + matchRemoteName?: boolean | undefined; + /** + * A bool representing whether or not the resource's description should be synced from the end system. When true, the description is overwritten with the remote description on each sync, so a `description` provided together with this field set to true will be replaced at the next sync. If not provided, the current value is left unchanged. + */ + matchRemoteDescription?: boolean | undefined; /** * The ID of the associated configuration template. */ @@ -130,6 +138,16 @@ export type UpdateResourceInfo = { * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ isRequestable?: boolean | undefined; + /** + * The duration for which access can be extended (in minutes). Deprecated, set the extension duration in the request_configuration you want it to apply to. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + extensionsDurationInMinutes?: number | undefined; + /** + * The ID of the parent resource. + */ + parentResourceId?: string | null | undefined; /** * A list of configurations for requests to this resource. If not provided, the default request configuration will be used. */ @@ -181,9 +199,13 @@ export const UpdateResourceInfo$inboundSchema: z.ZodType< ticket_propagation: TicketPropagationConfiguration$inboundSchema.optional(), custom_request_notification: z.nullable(z.string()).optional(), risk_sensitivity_override: RiskSensitivityEnum$inboundSchema.optional(), + match_remote_name: z.boolean().optional(), + match_remote_description: z.boolean().optional(), configuration_template_id: z.string().optional(), request_template_id: z.string().optional(), is_requestable: z.boolean().optional(), + extensions_duration_in_minutes: z.number().int().optional(), + parent_resource_id: z.nullable(z.string()).optional(), request_configurations: z.array(RequestConfiguration$inboundSchema) .optional(), request_configuration_list: CreateRequestConfigurationInfoList$inboundSchema @@ -204,14 +226,17 @@ export const UpdateResourceInfo$inboundSchema: z.ZodType< "ticket_propagation": "ticketPropagation", "custom_request_notification": "customRequestNotification", "risk_sensitivity_override": "riskSensitivityOverride", + "match_remote_name": "matchRemoteName", + "match_remote_description": "matchRemoteDescription", "configuration_template_id": "configurationTemplateId", "request_template_id": "requestTemplateId", "is_requestable": "isRequestable", + "extensions_duration_in_minutes": "extensionsDurationInMinutes", + "parent_resource_id": "parentResourceId", "request_configurations": "requestConfigurations", "request_configuration_list": "requestConfigurationList", }); }); - /** @internal */ export type UpdateResourceInfo$Outbound = { resource_id: string; @@ -230,9 +255,13 @@ export type UpdateResourceInfo$Outbound = { ticket_propagation?: TicketPropagationConfiguration$Outbound | undefined; custom_request_notification?: string | null | undefined; risk_sensitivity_override?: string | undefined; + match_remote_name?: boolean | undefined; + match_remote_description?: boolean | undefined; configuration_template_id?: string | undefined; request_template_id?: string | undefined; is_requestable?: boolean | undefined; + extensions_duration_in_minutes?: number | undefined; + parent_resource_id?: string | null | undefined; request_configurations?: Array | undefined; request_configuration_list?: | CreateRequestConfigurationInfoList$Outbound @@ -261,9 +290,13 @@ export const UpdateResourceInfo$outboundSchema: z.ZodType< ticketPropagation: TicketPropagationConfiguration$outboundSchema.optional(), customRequestNotification: z.nullable(z.string()).optional(), riskSensitivityOverride: RiskSensitivityEnum$outboundSchema.optional(), + matchRemoteName: z.boolean().optional(), + matchRemoteDescription: z.boolean().optional(), configurationTemplateId: z.string().optional(), requestTemplateId: z.string().optional(), isRequestable: z.boolean().optional(), + extensionsDurationInMinutes: z.number().int().optional(), + parentResourceId: z.nullable(z.string()).optional(), requestConfigurations: z.array(RequestConfiguration$outboundSchema) .optional(), requestConfigurationList: CreateRequestConfigurationInfoList$outboundSchema @@ -284,27 +317,18 @@ export const UpdateResourceInfo$outboundSchema: z.ZodType< ticketPropagation: "ticket_propagation", customRequestNotification: "custom_request_notification", riskSensitivityOverride: "risk_sensitivity_override", + matchRemoteName: "match_remote_name", + matchRemoteDescription: "match_remote_description", configurationTemplateId: "configuration_template_id", requestTemplateId: "request_template_id", isRequestable: "is_requestable", + extensionsDurationInMinutes: "extensions_duration_in_minutes", + parentResourceId: "parent_resource_id", requestConfigurations: "request_configurations", requestConfigurationList: "request_configuration_list", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateResourceInfo$ { - /** @deprecated use `UpdateResourceInfo$inboundSchema` instead. */ - export const inboundSchema = UpdateResourceInfo$inboundSchema; - /** @deprecated use `UpdateResourceInfo$outboundSchema` instead. */ - export const outboundSchema = UpdateResourceInfo$outboundSchema; - /** @deprecated use `UpdateResourceInfo$Outbound` instead. */ - export type Outbound = UpdateResourceInfo$Outbound; -} - export function updateResourceInfoToJSON( updateResourceInfo: UpdateResourceInfo, ): string { @@ -312,7 +336,6 @@ export function updateResourceInfoToJSON( UpdateResourceInfo$outboundSchema.parse(updateResourceInfo), ); } - export function updateResourceInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updateresourceinfolist.ts b/src/models/components/updateresourceinfolist.ts index c39761cd..6930048b 100644 --- a/src/models/components/updateresourceinfolist.ts +++ b/src/models/components/updateresourceinfolist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,7 +28,6 @@ export const UpdateResourceInfoList$inboundSchema: z.ZodType< > = z.object({ resources: z.array(UpdateResourceInfo$inboundSchema), }); - /** @internal */ export type UpdateResourceInfoList$Outbound = { resources: Array; @@ -43,19 +42,6 @@ export const UpdateResourceInfoList$outboundSchema: z.ZodType< resources: z.array(UpdateResourceInfo$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateResourceInfoList$ { - /** @deprecated use `UpdateResourceInfoList$inboundSchema` instead. */ - export const inboundSchema = UpdateResourceInfoList$inboundSchema; - /** @deprecated use `UpdateResourceInfoList$outboundSchema` instead. */ - export const outboundSchema = UpdateResourceInfoList$outboundSchema; - /** @deprecated use `UpdateResourceInfoList$Outbound` instead. */ - export type Outbound = UpdateResourceInfoList$Outbound; -} - export function updateResourceInfoListToJSON( updateResourceInfoList: UpdateResourceInfoList, ): string { @@ -63,7 +49,6 @@ export function updateResourceInfoListToJSON( UpdateResourceInfoList$outboundSchema.parse(updateResourceInfoList), ); } - export function updateResourceInfoListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/user.ts b/src/models/components/user.ts index f188c0e3..73a3bf27 100644 --- a/src/models/components/user.ts +++ b/src/models/components/user.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -113,7 +113,6 @@ export const User$inboundSchema: z.ZodType = z "hr_idp_status": "hrIdpStatus", }); }); - /** @internal */ export type User$Outbound = { user_id: string; @@ -145,23 +144,9 @@ export const User$outboundSchema: z.ZodType = }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace User$ { - /** @deprecated use `User$inboundSchema` instead. */ - export const inboundSchema = User$inboundSchema; - /** @deprecated use `User$outboundSchema` instead. */ - export const outboundSchema = User$outboundSchema; - /** @deprecated use `User$Outbound` instead. */ - export type Outbound = User$Outbound; -} - export function userToJSON(user: User): string { return JSON.stringify(User$outboundSchema.parse(user)); } - export function userFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/userattributeselector.ts b/src/models/components/userattributeselector.ts new file mode 100644 index 00000000..0ec8d7c6 --- /dev/null +++ b/src/models/components/userattributeselector.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const Attribute = { + HrIdpStatus: "HR_IDP_STATUS", +} as const; +export type Attribute = ClosedEnum; + +export type UserAttributeSelector = { + attribute: Attribute; + values: Array; +}; + +/** @internal */ +export const Attribute$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Attribute); +/** @internal */ +export const Attribute$outboundSchema: z.ZodNativeEnum = + Attribute$inboundSchema; + +/** @internal */ +export const UserAttributeSelector$inboundSchema: z.ZodType< + UserAttributeSelector, + z.ZodTypeDef, + unknown +> = z.object({ + attribute: Attribute$inboundSchema, + values: z.array(z.string()), +}); +/** @internal */ +export type UserAttributeSelector$Outbound = { + attribute: string; + values: Array; +}; + +/** @internal */ +export const UserAttributeSelector$outboundSchema: z.ZodType< + UserAttributeSelector$Outbound, + z.ZodTypeDef, + UserAttributeSelector +> = z.object({ + attribute: Attribute$outboundSchema, + values: z.array(z.string()), +}); + +export function userAttributeSelectorToJSON( + userAttributeSelector: UserAttributeSelector, +): string { + return JSON.stringify( + UserAttributeSelector$outboundSchema.parse(userAttributeSelector), + ); +} +export function userAttributeSelectorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UserAttributeSelector$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UserAttributeSelector' from JSON`, + ); +} diff --git a/src/models/components/userhridpstatusenum.ts b/src/models/components/userhridpstatusenum.ts index be1741ec..d24dd35d 100644 --- a/src/models/components/userhridpstatusenum.ts +++ b/src/models/components/userhridpstatusenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -76,19 +76,7 @@ export type UserHrIdpStatusEnum = ClosedEnum; export const UserHrIdpStatusEnum$inboundSchema: z.ZodNativeEnum< typeof UserHrIdpStatusEnum > = z.nativeEnum(UserHrIdpStatusEnum); - /** @internal */ export const UserHrIdpStatusEnum$outboundSchema: z.ZodNativeEnum< typeof UserHrIdpStatusEnum > = UserHrIdpStatusEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UserHrIdpStatusEnum$ { - /** @deprecated use `UserHrIdpStatusEnum$inboundSchema` instead. */ - export const inboundSchema = UserHrIdpStatusEnum$inboundSchema; - /** @deprecated use `UserHrIdpStatusEnum$outboundSchema` instead. */ - export const outboundSchema = UserHrIdpStatusEnum$outboundSchema; -} diff --git a/src/models/components/useridlist.ts b/src/models/components/useridlist.ts index c9c53507..3aa1f7a1 100644 --- a/src/models/components/useridlist.ts +++ b/src/models/components/useridlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const UserIDList$inboundSchema: z.ZodType< "user_ids": "userIds", }); }); - /** @internal */ export type UserIDList$Outbound = { user_ids: Array; @@ -46,23 +45,9 @@ export const UserIDList$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UserIDList$ { - /** @deprecated use `UserIDList$inboundSchema` instead. */ - export const inboundSchema = UserIDList$inboundSchema; - /** @deprecated use `UserIDList$outboundSchema` instead. */ - export const outboundSchema = UserIDList$outboundSchema; - /** @deprecated use `UserIDList$Outbound` instead. */ - export type Outbound = UserIDList$Outbound; -} - export function userIDListToJSON(userIDList: UserIDList): string { return JSON.stringify(UserIDList$outboundSchema.parse(userIDList)); } - export function userIDListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/userlist.ts b/src/models/components/userlist.ts index d321defd..c1c0d724 100644 --- a/src/models/components/userlist.ts +++ b/src/models/components/userlist.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,7 +28,6 @@ export const UserList$inboundSchema: z.ZodType< > = z.object({ users: z.array(User$inboundSchema), }); - /** @internal */ export type UserList$Outbound = { users: Array; @@ -43,23 +42,9 @@ export const UserList$outboundSchema: z.ZodType< users: z.array(User$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UserList$ { - /** @deprecated use `UserList$inboundSchema` instead. */ - export const inboundSchema = UserList$inboundSchema; - /** @deprecated use `UserList$outboundSchema` instead. */ - export const outboundSchema = UserList$outboundSchema; - /** @deprecated use `UserList$Outbound` instead. */ - export type Outbound = UserList$Outbound; -} - export function userListToJSON(userList: UserList): string { return JSON.stringify(UserList$outboundSchema.parse(userList)); } - export function userListFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/visibilityinfo.ts b/src/models/components/visibilityinfo.ts index 0f2fd4fa..fc895772 100644 --- a/src/models/components/visibilityinfo.ts +++ b/src/models/components/visibilityinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -37,7 +37,6 @@ export const VisibilityInfo$inboundSchema: z.ZodType< "visibility_group_ids": "visibilityGroupIds", }); }); - /** @internal */ export type VisibilityInfo$Outbound = { visibility: string; @@ -58,23 +57,9 @@ export const VisibilityInfo$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VisibilityInfo$ { - /** @deprecated use `VisibilityInfo$inboundSchema` instead. */ - export const inboundSchema = VisibilityInfo$inboundSchema; - /** @deprecated use `VisibilityInfo$outboundSchema` instead. */ - export const outboundSchema = VisibilityInfo$outboundSchema; - /** @deprecated use `VisibilityInfo$Outbound` instead. */ - export type Outbound = VisibilityInfo$Outbound; -} - export function visibilityInfoToJSON(visibilityInfo: VisibilityInfo): string { return JSON.stringify(VisibilityInfo$outboundSchema.parse(visibilityInfo)); } - export function visibilityInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/visibilitytypeenum.ts b/src/models/components/visibilitytypeenum.ts index c25b8359..83d14bfd 100644 --- a/src/models/components/visibilitytypeenum.ts +++ b/src/models/components/visibilitytypeenum.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -21,19 +21,7 @@ export type VisibilityTypeEnum = ClosedEnum; export const VisibilityTypeEnum$inboundSchema: z.ZodNativeEnum< typeof VisibilityTypeEnum > = z.nativeEnum(VisibilityTypeEnum); - /** @internal */ export const VisibilityTypeEnum$outboundSchema: z.ZodNativeEnum< typeof VisibilityTypeEnum > = VisibilityTypeEnum$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VisibilityTypeEnum$ { - /** @deprecated use `VisibilityTypeEnum$inboundSchema` instead. */ - export const inboundSchema = VisibilityTypeEnum$inboundSchema; - /** @deprecated use `VisibilityTypeEnum$outboundSchema` instead. */ - export const outboundSchema = VisibilityTypeEnum$outboundSchema; -} diff --git a/src/models/components/webhookapikeycredential.ts b/src/models/components/webhookapikeycredential.ts new file mode 100644 index 00000000..1056a595 --- /dev/null +++ b/src/models/components/webhookapikeycredential.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + WebhookApiKeyLocationEnum, + WebhookApiKeyLocationEnum$inboundSchema, + WebhookApiKeyLocationEnum$outboundSchema, +} from "./webhookapikeylocationenum.js"; + +/** + * An API key credential for webhook authentication. + */ +export type WebhookApiKeyCredential = { + /** + * The unique identifier for the credential. + */ + id: string; + /** + * The name of the API key. + */ + name: string; + /** + * The value of the API key. + */ + value: string; + /** + * Where the API key is placed in webhook requests. + */ + location: WebhookApiKeyLocationEnum; +}; + +/** @internal */ +export const WebhookApiKeyCredential$inboundSchema: z.ZodType< + WebhookApiKeyCredential, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + name: z.string(), + value: z.string(), + location: WebhookApiKeyLocationEnum$inboundSchema, +}); +/** @internal */ +export type WebhookApiKeyCredential$Outbound = { + id: string; + name: string; + value: string; + location: string; +}; + +/** @internal */ +export const WebhookApiKeyCredential$outboundSchema: z.ZodType< + WebhookApiKeyCredential$Outbound, + z.ZodTypeDef, + WebhookApiKeyCredential +> = z.object({ + id: z.string(), + name: z.string(), + value: z.string(), + location: WebhookApiKeyLocationEnum$outboundSchema, +}); + +export function webhookApiKeyCredentialToJSON( + webhookApiKeyCredential: WebhookApiKeyCredential, +): string { + return JSON.stringify( + WebhookApiKeyCredential$outboundSchema.parse(webhookApiKeyCredential), + ); +} +export function webhookApiKeyCredentialFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WebhookApiKeyCredential$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebhookApiKeyCredential' from JSON`, + ); +} diff --git a/src/models/components/webhookapikeylocationenum.ts b/src/models/components/webhookapikeylocationenum.ts new file mode 100644 index 00000000..36be91d2 --- /dev/null +++ b/src/models/components/webhookapikeylocationenum.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Where the API key is placed in webhook requests. + */ +export const WebhookApiKeyLocationEnum = { + Header: "HEADER", + QueryParam: "QUERY_PARAM", +} as const; +/** + * Where the API key is placed in webhook requests. + */ +export type WebhookApiKeyLocationEnum = ClosedEnum< + typeof WebhookApiKeyLocationEnum +>; + +/** @internal */ +export const WebhookApiKeyLocationEnum$inboundSchema: z.ZodNativeEnum< + typeof WebhookApiKeyLocationEnum +> = z.nativeEnum(WebhookApiKeyLocationEnum); +/** @internal */ +export const WebhookApiKeyLocationEnum$outboundSchema: z.ZodNativeEnum< + typeof WebhookApiKeyLocationEnum +> = WebhookApiKeyLocationEnum$inboundSchema; diff --git a/src/models/components/webhookauthtypeenum.ts b/src/models/components/webhookauthtypeenum.ts new file mode 100644 index 00000000..e6942450 --- /dev/null +++ b/src/models/components/webhookauthtypeenum.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The authentication type for webhook connections. + */ +export const WebhookAuthTypeEnum = { + None: "NONE", + ApiKey: "API_KEY", + Hmac: "HMAC", +} as const; +/** + * The authentication type for webhook connections. + */ +export type WebhookAuthTypeEnum = ClosedEnum; + +/** @internal */ +export const WebhookAuthTypeEnum$inboundSchema: z.ZodNativeEnum< + typeof WebhookAuthTypeEnum +> = z.nativeEnum(WebhookAuthTypeEnum); +/** @internal */ +export const WebhookAuthTypeEnum$outboundSchema: z.ZodNativeEnum< + typeof WebhookAuthTypeEnum +> = WebhookAuthTypeEnum$inboundSchema; diff --git a/src/models/components/webhookcredentials.ts b/src/models/components/webhookcredentials.ts new file mode 100644 index 00000000..6ef6659e --- /dev/null +++ b/src/models/components/webhookcredentials.ts @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + WebhookApiKeyCredential, + WebhookApiKeyCredential$inboundSchema, + WebhookApiKeyCredential$Outbound, + WebhookApiKeyCredential$outboundSchema, +} from "./webhookapikeycredential.js"; +import { + WebhookAuthTypeEnum, + WebhookAuthTypeEnum$inboundSchema, + WebhookAuthTypeEnum$outboundSchema, +} from "./webhookauthtypeenum.js"; +import { + WebhookHmacCredential, + WebhookHmacCredential$inboundSchema, + WebhookHmacCredential$Outbound, + WebhookHmacCredential$outboundSchema, +} from "./webhookhmaccredential.js"; + +/** + * Authentication credentials for a webhook connection. + */ +export type WebhookCredentials = { + /** + * The authentication type for webhook connections. + */ + authType: WebhookAuthTypeEnum; + /** + * API key credentials, present when auth_type is API_KEY. + */ + apiKeyCredentials?: Array | undefined; + /** + * An HMAC credential for webhook authentication. + */ + hmacCredential1?: WebhookHmacCredential | undefined; + /** + * An HMAC credential for webhook authentication. + */ + hmacCredential2?: WebhookHmacCredential | undefined; +}; + +/** @internal */ +export const WebhookCredentials$inboundSchema: z.ZodType< + WebhookCredentials, + z.ZodTypeDef, + unknown +> = z.object({ + auth_type: WebhookAuthTypeEnum$inboundSchema, + api_key_credentials: z.array(WebhookApiKeyCredential$inboundSchema) + .optional(), + hmac_credential_1: WebhookHmacCredential$inboundSchema.optional(), + hmac_credential_2: WebhookHmacCredential$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "auth_type": "authType", + "api_key_credentials": "apiKeyCredentials", + "hmac_credential_1": "hmacCredential1", + "hmac_credential_2": "hmacCredential2", + }); +}); +/** @internal */ +export type WebhookCredentials$Outbound = { + auth_type: string; + api_key_credentials?: Array | undefined; + hmac_credential_1?: WebhookHmacCredential$Outbound | undefined; + hmac_credential_2?: WebhookHmacCredential$Outbound | undefined; +}; + +/** @internal */ +export const WebhookCredentials$outboundSchema: z.ZodType< + WebhookCredentials$Outbound, + z.ZodTypeDef, + WebhookCredentials +> = z.object({ + authType: WebhookAuthTypeEnum$outboundSchema, + apiKeyCredentials: z.array(WebhookApiKeyCredential$outboundSchema).optional(), + hmacCredential1: WebhookHmacCredential$outboundSchema.optional(), + hmacCredential2: WebhookHmacCredential$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + authType: "auth_type", + apiKeyCredentials: "api_key_credentials", + hmacCredential1: "hmac_credential_1", + hmacCredential2: "hmac_credential_2", + }); +}); + +export function webhookCredentialsToJSON( + webhookCredentials: WebhookCredentials, +): string { + return JSON.stringify( + WebhookCredentials$outboundSchema.parse(webhookCredentials), + ); +} +export function webhookCredentialsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WebhookCredentials$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebhookCredentials' from JSON`, + ); +} diff --git a/src/models/components/webhookhmaccredential.ts b/src/models/components/webhookhmaccredential.ts new file mode 100644 index 00000000..bbdfb40d --- /dev/null +++ b/src/models/components/webhookhmaccredential.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * An HMAC credential for webhook authentication. + */ +export type WebhookHmacCredential = { + /** + * The unique identifier for the credential. + */ + id: string; + /** + * The HMAC secret value. + */ + secret: string; + /** + * When the credential was created. + */ + createdAt: Date; +}; + +/** @internal */ +export const WebhookHmacCredential$inboundSchema: z.ZodType< + WebhookHmacCredential, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + secret: z.string(), + created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + }); +}); +/** @internal */ +export type WebhookHmacCredential$Outbound = { + id: string; + secret: string; + created_at: string; +}; + +/** @internal */ +export const WebhookHmacCredential$outboundSchema: z.ZodType< + WebhookHmacCredential$Outbound, + z.ZodTypeDef, + WebhookHmacCredential +> = z.object({ + id: z.string(), + secret: z.string(), + createdAt: z.date().transform(v => v.toISOString()), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + }); +}); + +export function webhookHmacCredentialToJSON( + webhookHmacCredential: WebhookHmacCredential, +): string { + return JSON.stringify( + WebhookHmacCredential$outboundSchema.parse(webhookHmacCredential), + ); +} +export function webhookHmacCredentialFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => WebhookHmacCredential$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'WebhookHmacCredential' from JSON`, + ); +} diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 8fae1578..4a0ce790 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -4,5 +4,6 @@ export * from "./apierror.js"; export * from "./httpclienterrors.js"; +export * from "./opalmcperror.js"; export * from "./responsevalidationerror.js"; export * from "./sdkvalidationerror.js"; diff --git a/src/models/errors/responsevalidationerror.ts b/src/models/errors/responsevalidationerror.ts index c220d2f6..881c0a00 100644 --- a/src/models/errors/responsevalidationerror.ts +++ b/src/models/errors/responsevalidationerror.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { OpalMcpError } from "./opalmcperror.js"; import { formatZodError } from "./sdkvalidationerror.js"; diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts index 37face8a..6826e120 100644 --- a/src/models/errors/sdkvalidationerror.ts +++ b/src/models/errors/sdkvalidationerror.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export class SDKValidationError extends Error { /** diff --git a/src/models/operations/addbundlegroup.ts b/src/models/operations/addbundlegroup.ts index c28012cd..e741c7f7 100644 --- a/src/models/operations/addbundlegroup.ts +++ b/src/models/operations/addbundlegroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -47,7 +47,6 @@ export const AddBundleGroupRequestBody$inboundSchema: z.ZodType< "access_level_name": "accessLevelName", }); }); - /** @internal */ export type AddBundleGroupRequestBody$Outbound = { group_id: string; @@ -72,19 +71,6 @@ export const AddBundleGroupRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddBundleGroupRequestBody$ { - /** @deprecated use `AddBundleGroupRequestBody$inboundSchema` instead. */ - export const inboundSchema = AddBundleGroupRequestBody$inboundSchema; - /** @deprecated use `AddBundleGroupRequestBody$outboundSchema` instead. */ - export const outboundSchema = AddBundleGroupRequestBody$outboundSchema; - /** @deprecated use `AddBundleGroupRequestBody$Outbound` instead. */ - export type Outbound = AddBundleGroupRequestBody$Outbound; -} - export function addBundleGroupRequestBodyToJSON( addBundleGroupRequestBody: AddBundleGroupRequestBody, ): string { @@ -92,7 +78,6 @@ export function addBundleGroupRequestBodyToJSON( AddBundleGroupRequestBody$outboundSchema.parse(addBundleGroupRequestBody), ); } - export function addBundleGroupRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -117,7 +102,6 @@ export const AddBundleGroupRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type AddBundleGroupRequest$Outbound = { bundle_id: string; @@ -139,19 +123,6 @@ export const AddBundleGroupRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddBundleGroupRequest$ { - /** @deprecated use `AddBundleGroupRequest$inboundSchema` instead. */ - export const inboundSchema = AddBundleGroupRequest$inboundSchema; - /** @deprecated use `AddBundleGroupRequest$outboundSchema` instead. */ - export const outboundSchema = AddBundleGroupRequest$outboundSchema; - /** @deprecated use `AddBundleGroupRequest$Outbound` instead. */ - export type Outbound = AddBundleGroupRequest$Outbound; -} - export function addBundleGroupRequestToJSON( addBundleGroupRequest: AddBundleGroupRequest, ): string { @@ -159,7 +130,6 @@ export function addBundleGroupRequestToJSON( AddBundleGroupRequest$outboundSchema.parse(addBundleGroupRequest), ); } - export function addBundleGroupRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addbundleresource.ts b/src/models/operations/addbundleresource.ts index db43102b..6a1c209c 100644 --- a/src/models/operations/addbundleresource.ts +++ b/src/models/operations/addbundleresource.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -47,7 +47,6 @@ export const AddBundleResourceRequestBody$inboundSchema: z.ZodType< "access_level_name": "accessLevelName", }); }); - /** @internal */ export type AddBundleResourceRequestBody$Outbound = { resource_id: string; @@ -72,19 +71,6 @@ export const AddBundleResourceRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddBundleResourceRequestBody$ { - /** @deprecated use `AddBundleResourceRequestBody$inboundSchema` instead. */ - export const inboundSchema = AddBundleResourceRequestBody$inboundSchema; - /** @deprecated use `AddBundleResourceRequestBody$outboundSchema` instead. */ - export const outboundSchema = AddBundleResourceRequestBody$outboundSchema; - /** @deprecated use `AddBundleResourceRequestBody$Outbound` instead. */ - export type Outbound = AddBundleResourceRequestBody$Outbound; -} - export function addBundleResourceRequestBodyToJSON( addBundleResourceRequestBody: AddBundleResourceRequestBody, ): string { @@ -94,7 +80,6 @@ export function addBundleResourceRequestBodyToJSON( ), ); } - export function addBundleResourceRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -120,7 +105,6 @@ export const AddBundleResourceRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type AddBundleResourceRequest$Outbound = { bundle_id: string; @@ -143,19 +127,6 @@ export const AddBundleResourceRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddBundleResourceRequest$ { - /** @deprecated use `AddBundleResourceRequest$inboundSchema` instead. */ - export const inboundSchema = AddBundleResourceRequest$inboundSchema; - /** @deprecated use `AddBundleResourceRequest$outboundSchema` instead. */ - export const outboundSchema = AddBundleResourceRequest$outboundSchema; - /** @deprecated use `AddBundleResourceRequest$Outbound` instead. */ - export type Outbound = AddBundleResourceRequest$Outbound; -} - export function addBundleResourceRequestToJSON( addBundleResourceRequest: AddBundleResourceRequest, ): string { @@ -163,7 +134,6 @@ export function addBundleResourceRequestToJSON( AddBundleResourceRequest$outboundSchema.parse(addBundleResourceRequest), ); } - export function addBundleResourceRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addgroupcontaininggroup.ts b/src/models/operations/addgroupcontaininggroup.ts index d26e07a0..aa39ce4b 100644 --- a/src/models/operations/addgroupcontaininggroup.ts +++ b/src/models/operations/addgroupcontaininggroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const AddGroupContainingGroupRequest$inboundSchema: z.ZodType< "GroupContainingGroup": "groupContainingGroup", }); }); - /** @internal */ export type AddGroupContainingGroupRequest$Outbound = { group_id: string; @@ -53,19 +52,6 @@ export const AddGroupContainingGroupRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddGroupContainingGroupRequest$ { - /** @deprecated use `AddGroupContainingGroupRequest$inboundSchema` instead. */ - export const inboundSchema = AddGroupContainingGroupRequest$inboundSchema; - /** @deprecated use `AddGroupContainingGroupRequest$outboundSchema` instead. */ - export const outboundSchema = AddGroupContainingGroupRequest$outboundSchema; - /** @deprecated use `AddGroupContainingGroupRequest$Outbound` instead. */ - export type Outbound = AddGroupContainingGroupRequest$Outbound; -} - export function addGroupContainingGroupRequestToJSON( addGroupContainingGroupRequest: AddGroupContainingGroupRequest, ): string { @@ -75,7 +61,6 @@ export function addGroupContainingGroupRequestToJSON( ), ); } - export function addGroupContainingGroupRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addgroupresource.ts b/src/models/operations/addgroupresource.ts index d0c88db2..b47ac688 100644 --- a/src/models/operations/addgroupresource.ts +++ b/src/models/operations/addgroupresource.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -51,7 +51,6 @@ export const AddGroupResourceRequestBody$inboundSchema: z.ZodType< "duration_minutes": "durationMinutes", }); }); - /** @internal */ export type AddGroupResourceRequestBody$Outbound = { access_level_remote_id?: string | undefined; @@ -73,19 +72,6 @@ export const AddGroupResourceRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddGroupResourceRequestBody$ { - /** @deprecated use `AddGroupResourceRequestBody$inboundSchema` instead. */ - export const inboundSchema = AddGroupResourceRequestBody$inboundSchema; - /** @deprecated use `AddGroupResourceRequestBody$outboundSchema` instead. */ - export const outboundSchema = AddGroupResourceRequestBody$outboundSchema; - /** @deprecated use `AddGroupResourceRequestBody$Outbound` instead. */ - export type Outbound = AddGroupResourceRequestBody$Outbound; -} - export function addGroupResourceRequestBodyToJSON( addGroupResourceRequestBody: AddGroupResourceRequestBody, ): string { @@ -95,7 +81,6 @@ export function addGroupResourceRequestBodyToJSON( ), ); } - export function addGroupResourceRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -125,7 +110,6 @@ export const AddGroupResourceRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type AddGroupResourceRequest$Outbound = { group_id: string; @@ -154,19 +138,6 @@ export const AddGroupResourceRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddGroupResourceRequest$ { - /** @deprecated use `AddGroupResourceRequest$inboundSchema` instead. */ - export const inboundSchema = AddGroupResourceRequest$inboundSchema; - /** @deprecated use `AddGroupResourceRequest$outboundSchema` instead. */ - export const outboundSchema = AddGroupResourceRequest$outboundSchema; - /** @deprecated use `AddGroupResourceRequest$Outbound` instead. */ - export type Outbound = AddGroupResourceRequest$Outbound; -} - export function addGroupResourceRequestToJSON( addGroupResourceRequest: AddGroupResourceRequest, ): string { @@ -174,7 +145,6 @@ export function addGroupResourceRequestToJSON( AddGroupResourceRequest$outboundSchema.parse(addGroupResourceRequest), ); } - export function addGroupResourceRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addgrouptag.ts b/src/models/operations/addgrouptag.ts index 80cd8c9c..96ab0f54 100644 --- a/src/models/operations/addgrouptag.ts +++ b/src/models/operations/addgrouptag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const AddGroupTagRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type AddGroupTagRequest$Outbound = { tag_id: string; @@ -55,19 +54,6 @@ export const AddGroupTagRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddGroupTagRequest$ { - /** @deprecated use `AddGroupTagRequest$inboundSchema` instead. */ - export const inboundSchema = AddGroupTagRequest$inboundSchema; - /** @deprecated use `AddGroupTagRequest$outboundSchema` instead. */ - export const outboundSchema = AddGroupTagRequest$outboundSchema; - /** @deprecated use `AddGroupTagRequest$Outbound` instead. */ - export type Outbound = AddGroupTagRequest$Outbound; -} - export function addGroupTagRequestToJSON( addGroupTagRequest: AddGroupTagRequest, ): string { @@ -75,7 +61,6 @@ export function addGroupTagRequestToJSON( AddGroupTagRequest$outboundSchema.parse(addGroupTagRequest), ); } - export function addGroupTagRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addgroupuser.ts b/src/models/operations/addgroupuser.ts index 6d5ecfc7..77b14492 100644 --- a/src/models/operations/addgroupuser.ts +++ b/src/models/operations/addgroupuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -57,7 +57,6 @@ export const AddGroupUserRequestBody$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type AddGroupUserRequestBody$Outbound = { duration_minutes: number; @@ -79,19 +78,6 @@ export const AddGroupUserRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddGroupUserRequestBody$ { - /** @deprecated use `AddGroupUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = AddGroupUserRequestBody$inboundSchema; - /** @deprecated use `AddGroupUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = AddGroupUserRequestBody$outboundSchema; - /** @deprecated use `AddGroupUserRequestBody$Outbound` instead. */ - export type Outbound = AddGroupUserRequestBody$Outbound; -} - export function addGroupUserRequestBodyToJSON( addGroupUserRequestBody: AddGroupUserRequestBody, ): string { @@ -99,7 +85,6 @@ export function addGroupUserRequestBodyToJSON( AddGroupUserRequestBody$outboundSchema.parse(addGroupUserRequestBody), ); } - export function addGroupUserRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -130,7 +115,6 @@ export const AddGroupUserRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type AddGroupUserRequest$Outbound = { group_id: string; @@ -161,19 +145,6 @@ export const AddGroupUserRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddGroupUserRequest$ { - /** @deprecated use `AddGroupUserRequest$inboundSchema` instead. */ - export const inboundSchema = AddGroupUserRequest$inboundSchema; - /** @deprecated use `AddGroupUserRequest$outboundSchema` instead. */ - export const outboundSchema = AddGroupUserRequest$outboundSchema; - /** @deprecated use `AddGroupUserRequest$Outbound` instead. */ - export type Outbound = AddGroupUserRequest$Outbound; -} - export function addGroupUserRequestToJSON( addGroupUserRequest: AddGroupUserRequest, ): string { @@ -181,7 +152,6 @@ export function addGroupUserRequestToJSON( AddGroupUserRequest$outboundSchema.parse(addGroupUserRequest), ); } - export function addGroupUserRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addresourcenhi.ts b/src/models/operations/addresourcenhi.ts index a272bdb8..8bc247b9 100644 --- a/src/models/operations/addresourcenhi.ts +++ b/src/models/operations/addresourcenhi.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -45,7 +45,6 @@ export const AddResourceNhiRequestBody$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type AddResourceNhiRequestBody$Outbound = { duration_minutes: number; @@ -67,19 +66,6 @@ export const AddResourceNhiRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddResourceNhiRequestBody$ { - /** @deprecated use `AddResourceNhiRequestBody$inboundSchema` instead. */ - export const inboundSchema = AddResourceNhiRequestBody$inboundSchema; - /** @deprecated use `AddResourceNhiRequestBody$outboundSchema` instead. */ - export const outboundSchema = AddResourceNhiRequestBody$outboundSchema; - /** @deprecated use `AddResourceNhiRequestBody$Outbound` instead. */ - export type Outbound = AddResourceNhiRequestBody$Outbound; -} - export function addResourceNhiRequestBodyToJSON( addResourceNhiRequestBody: AddResourceNhiRequestBody, ): string { @@ -87,7 +73,6 @@ export function addResourceNhiRequestBodyToJSON( AddResourceNhiRequestBody$outboundSchema.parse(addResourceNhiRequestBody), ); } - export function addResourceNhiRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -114,7 +99,6 @@ export const AddResourceNhiRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type AddResourceNhiRequest$Outbound = { resource_id: string; @@ -140,19 +124,6 @@ export const AddResourceNhiRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddResourceNhiRequest$ { - /** @deprecated use `AddResourceNhiRequest$inboundSchema` instead. */ - export const inboundSchema = AddResourceNhiRequest$inboundSchema; - /** @deprecated use `AddResourceNhiRequest$outboundSchema` instead. */ - export const outboundSchema = AddResourceNhiRequest$outboundSchema; - /** @deprecated use `AddResourceNhiRequest$Outbound` instead. */ - export type Outbound = AddResourceNhiRequest$Outbound; -} - export function addResourceNhiRequestToJSON( addResourceNhiRequest: AddResourceNhiRequest, ): string { @@ -160,7 +131,6 @@ export function addResourceNhiRequestToJSON( AddResourceNhiRequest$outboundSchema.parse(addResourceNhiRequest), ); } - export function addResourceNhiRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addresourcetag.ts b/src/models/operations/addresourcetag.ts index 4a521cb9..9337cff6 100644 --- a/src/models/operations/addresourcetag.ts +++ b/src/models/operations/addresourcetag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const AddResourceTagRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type AddResourceTagRequest$Outbound = { tag_id: string; @@ -55,19 +54,6 @@ export const AddResourceTagRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddResourceTagRequest$ { - /** @deprecated use `AddResourceTagRequest$inboundSchema` instead. */ - export const inboundSchema = AddResourceTagRequest$inboundSchema; - /** @deprecated use `AddResourceTagRequest$outboundSchema` instead. */ - export const outboundSchema = AddResourceTagRequest$outboundSchema; - /** @deprecated use `AddResourceTagRequest$Outbound` instead. */ - export type Outbound = AddResourceTagRequest$Outbound; -} - export function addResourceTagRequestToJSON( addResourceTagRequest: AddResourceTagRequest, ): string { @@ -75,7 +61,6 @@ export function addResourceTagRequestToJSON( AddResourceTagRequest$outboundSchema.parse(addResourceTagRequest), ); } - export function addResourceTagRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addresourceuser.ts b/src/models/operations/addresourceuser.ts index 71f4932d..47fda97e 100644 --- a/src/models/operations/addresourceuser.ts +++ b/src/models/operations/addresourceuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -57,7 +57,6 @@ export const AddResourceUserRequestBody$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type AddResourceUserRequestBody$Outbound = { duration_minutes: number; @@ -79,19 +78,6 @@ export const AddResourceUserRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddResourceUserRequestBody$ { - /** @deprecated use `AddResourceUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = AddResourceUserRequestBody$inboundSchema; - /** @deprecated use `AddResourceUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = AddResourceUserRequestBody$outboundSchema; - /** @deprecated use `AddResourceUserRequestBody$Outbound` instead. */ - export type Outbound = AddResourceUserRequestBody$Outbound; -} - export function addResourceUserRequestBodyToJSON( addResourceUserRequestBody: AddResourceUserRequestBody, ): string { @@ -99,7 +85,6 @@ export function addResourceUserRequestBodyToJSON( AddResourceUserRequestBody$outboundSchema.parse(addResourceUserRequestBody), ); } - export function addResourceUserRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -131,7 +116,6 @@ export const AddResourceUserRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type AddResourceUserRequest$Outbound = { resource_id: string; @@ -163,19 +147,6 @@ export const AddResourceUserRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddResourceUserRequest$ { - /** @deprecated use `AddResourceUserRequest$inboundSchema` instead. */ - export const inboundSchema = AddResourceUserRequest$inboundSchema; - /** @deprecated use `AddResourceUserRequest$outboundSchema` instead. */ - export const outboundSchema = AddResourceUserRequest$outboundSchema; - /** @deprecated use `AddResourceUserRequest$Outbound` instead. */ - export type Outbound = AddResourceUserRequest$Outbound; -} - export function addResourceUserRequestToJSON( addResourceUserRequest: AddResourceUserRequest, ): string { @@ -183,7 +154,6 @@ export function addResourceUserRequestToJSON( AddResourceUserRequest$outboundSchema.parse(addResourceUserRequest), ); } - export function addResourceUserRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/addusertag.ts b/src/models/operations/addusertag.ts index 512b7bd9..0d7b7c0b 100644 --- a/src/models/operations/addusertag.ts +++ b/src/models/operations/addusertag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -28,7 +28,6 @@ export const AddUserTagRequestBody$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({}); - /** @internal */ export type AddUserTagRequestBody$Outbound = {}; @@ -39,19 +38,6 @@ export const AddUserTagRequestBody$outboundSchema: z.ZodType< AddUserTagRequestBody > = z.object({}); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddUserTagRequestBody$ { - /** @deprecated use `AddUserTagRequestBody$inboundSchema` instead. */ - export const inboundSchema = AddUserTagRequestBody$inboundSchema; - /** @deprecated use `AddUserTagRequestBody$outboundSchema` instead. */ - export const outboundSchema = AddUserTagRequestBody$outboundSchema; - /** @deprecated use `AddUserTagRequestBody$Outbound` instead. */ - export type Outbound = AddUserTagRequestBody$Outbound; -} - export function addUserTagRequestBodyToJSON( addUserTagRequestBody: AddUserTagRequestBody, ): string { @@ -59,7 +45,6 @@ export function addUserTagRequestBodyToJSON( AddUserTagRequestBody$outboundSchema.parse(addUserTagRequestBody), ); } - export function addUserTagRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -86,7 +71,6 @@ export const AddUserTagRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type AddUserTagRequest$Outbound = { tag_id: string; @@ -111,19 +95,6 @@ export const AddUserTagRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AddUserTagRequest$ { - /** @deprecated use `AddUserTagRequest$inboundSchema` instead. */ - export const inboundSchema = AddUserTagRequest$inboundSchema; - /** @deprecated use `AddUserTagRequest$outboundSchema` instead. */ - export const outboundSchema = AddUserTagRequest$outboundSchema; - /** @deprecated use `AddUserTagRequest$Outbound` instead. */ - export type Outbound = AddUserTagRequest$Outbound; -} - export function addUserTagRequestToJSON( addUserTagRequest: AddUserTagRequest, ): string { @@ -131,7 +102,6 @@ export function addUserTagRequestToJSON( AddUserTagRequest$outboundSchema.parse(addUserTagRequest), ); } - export function addUserTagRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/approverequest.ts b/src/models/operations/approverequest.ts index 0f6ce6f4..1413653d 100644 --- a/src/models/operations/approverequest.ts +++ b/src/models/operations/approverequest.ts @@ -2,26 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -/** - * The decision level for the approval - */ -export const Level = { - Regular: "REGULAR", - Admin: "ADMIN", -} as const; -/** - * The decision level for the approval - */ -export type Level = ClosedEnum; - /** * Approval parameters */ @@ -29,7 +16,7 @@ export type ApproveRequestRequestBody = { /** * The decision level for the approval */ - level: Level; + level: components.RequestApprovalEnum; /** * Optional comment for the approval */ @@ -62,42 +49,17 @@ export type ApproveRequestResponse = { * Returned from the `GET Requests` endpoint. */ request?: components.RequestT | undefined; - /** - * ID of the task created for propagating access - */ - taskId?: string | undefined; }; -/** @internal */ -export const Level$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Level, -); - -/** @internal */ -export const Level$outboundSchema: z.ZodNativeEnum = - Level$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Level$ { - /** @deprecated use `Level$inboundSchema` instead. */ - export const inboundSchema = Level$inboundSchema; - /** @deprecated use `Level$outboundSchema` instead. */ - export const outboundSchema = Level$outboundSchema; -} - /** @internal */ export const ApproveRequestRequestBody$inboundSchema: z.ZodType< ApproveRequestRequestBody, z.ZodTypeDef, unknown > = z.object({ - level: Level$inboundSchema, + level: components.RequestApprovalEnum$inboundSchema, comment: z.string().optional(), }); - /** @internal */ export type ApproveRequestRequestBody$Outbound = { level: string; @@ -110,23 +72,10 @@ export const ApproveRequestRequestBody$outboundSchema: z.ZodType< z.ZodTypeDef, ApproveRequestRequestBody > = z.object({ - level: Level$outboundSchema, + level: components.RequestApprovalEnum$outboundSchema, comment: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ApproveRequestRequestBody$ { - /** @deprecated use `ApproveRequestRequestBody$inboundSchema` instead. */ - export const inboundSchema = ApproveRequestRequestBody$inboundSchema; - /** @deprecated use `ApproveRequestRequestBody$outboundSchema` instead. */ - export const outboundSchema = ApproveRequestRequestBody$outboundSchema; - /** @deprecated use `ApproveRequestRequestBody$Outbound` instead. */ - export type Outbound = ApproveRequestRequestBody$Outbound; -} - export function approveRequestRequestBodyToJSON( approveRequestRequestBody: ApproveRequestRequestBody, ): string { @@ -134,7 +83,6 @@ export function approveRequestRequestBodyToJSON( ApproveRequestRequestBody$outboundSchema.parse(approveRequestRequestBody), ); } - export function approveRequestRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -158,7 +106,6 @@ export const ApproveRequestRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type ApproveRequestRequest$Outbound = { id: string; @@ -179,19 +126,6 @@ export const ApproveRequestRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ApproveRequestRequest$ { - /** @deprecated use `ApproveRequestRequest$inboundSchema` instead. */ - export const inboundSchema = ApproveRequestRequest$inboundSchema; - /** @deprecated use `ApproveRequestRequest$outboundSchema` instead. */ - export const outboundSchema = ApproveRequestRequest$outboundSchema; - /** @deprecated use `ApproveRequestRequest$Outbound` instead. */ - export type Outbound = ApproveRequestRequest$Outbound; -} - export function approveRequestRequestToJSON( approveRequestRequest: ApproveRequestRequest, ): string { @@ -199,7 +133,6 @@ export function approveRequestRequestToJSON( ApproveRequestRequest$outboundSchema.parse(approveRequestRequest), ); } - export function approveRequestRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -217,13 +150,10 @@ export const ApproveRequestResponse$inboundSchema: z.ZodType< unknown > = z.object({ request: components.RequestT$inboundSchema.optional(), - taskId: z.string().optional(), }); - /** @internal */ export type ApproveRequestResponse$Outbound = { request?: components.RequestT$Outbound | undefined; - taskId?: string | undefined; }; /** @internal */ @@ -233,22 +163,8 @@ export const ApproveRequestResponse$outboundSchema: z.ZodType< ApproveRequestResponse > = z.object({ request: components.RequestT$outboundSchema.optional(), - taskId: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ApproveRequestResponse$ { - /** @deprecated use `ApproveRequestResponse$inboundSchema` instead. */ - export const inboundSchema = ApproveRequestResponse$inboundSchema; - /** @deprecated use `ApproveRequestResponse$outboundSchema` instead. */ - export const outboundSchema = ApproveRequestResponse$outboundSchema; - /** @deprecated use `ApproveRequestResponse$Outbound` instead. */ - export type Outbound = ApproveRequestResponse$Outbound; -} - export function approveRequestResponseToJSON( approveRequestResponse: ApproveRequestResponse, ): string { @@ -256,7 +172,6 @@ export function approveRequestResponseToJSON( ApproveRequestResponse$outboundSchema.parse(approveRequestResponse), ); } - export function approveRequestResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/createidpgroupmapping.ts b/src/models/operations/createidpgroupmapping.ts new file mode 100644 index 00000000..7c845b6f --- /dev/null +++ b/src/models/operations/createidpgroupmapping.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateIdpGroupMappingRequestBody = { + /** + * Optional alias for the group mapping + */ + alias?: string | null | undefined; + /** + * Whether this mapping should be hidden from end users. + * + * @remarks + * - **New mappings**: If not provided, defaults to `false` + * - **Existing mappings**: If not provided, existing value is preserved (no change) + * - **Explicit values**: If provided, value is updated to the specified boolean + */ + hiddenFromEndUser?: boolean | null | undefined; +}; + +export type CreateIdpGroupMappingRequest = { + /** + * The ID of the Okta app. + */ + appResourceId: string; + /** + * The ID of the group. + */ + groupId: string; + requestBody?: CreateIdpGroupMappingRequestBody | undefined; +}; + +/** @internal */ +export const CreateIdpGroupMappingRequestBody$inboundSchema: z.ZodType< + CreateIdpGroupMappingRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + alias: z.nullable(z.string()).optional(), + hidden_from_end_user: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "hidden_from_end_user": "hiddenFromEndUser", + }); +}); +/** @internal */ +export type CreateIdpGroupMappingRequestBody$Outbound = { + alias?: string | null | undefined; + hidden_from_end_user?: boolean | null | undefined; +}; + +/** @internal */ +export const CreateIdpGroupMappingRequestBody$outboundSchema: z.ZodType< + CreateIdpGroupMappingRequestBody$Outbound, + z.ZodTypeDef, + CreateIdpGroupMappingRequestBody +> = z.object({ + alias: z.nullable(z.string()).optional(), + hiddenFromEndUser: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + hiddenFromEndUser: "hidden_from_end_user", + }); +}); + +export function createIdpGroupMappingRequestBodyToJSON( + createIdpGroupMappingRequestBody: CreateIdpGroupMappingRequestBody, +): string { + return JSON.stringify( + CreateIdpGroupMappingRequestBody$outboundSchema.parse( + createIdpGroupMappingRequestBody, + ), + ); +} +export function createIdpGroupMappingRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIdpGroupMappingRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIdpGroupMappingRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateIdpGroupMappingRequest$inboundSchema: z.ZodType< + CreateIdpGroupMappingRequest, + z.ZodTypeDef, + unknown +> = z.object({ + app_resource_id: z.string(), + group_id: z.string(), + RequestBody: z.lazy(() => CreateIdpGroupMappingRequestBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "app_resource_id": "appResourceId", + "group_id": "groupId", + "RequestBody": "requestBody", + }); +}); +/** @internal */ +export type CreateIdpGroupMappingRequest$Outbound = { + app_resource_id: string; + group_id: string; + RequestBody?: CreateIdpGroupMappingRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const CreateIdpGroupMappingRequest$outboundSchema: z.ZodType< + CreateIdpGroupMappingRequest$Outbound, + z.ZodTypeDef, + CreateIdpGroupMappingRequest +> = z.object({ + appResourceId: z.string(), + groupId: z.string(), + requestBody: z.lazy(() => CreateIdpGroupMappingRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + appResourceId: "app_resource_id", + groupId: "group_id", + requestBody: "RequestBody", + }); +}); + +export function createIdpGroupMappingRequestToJSON( + createIdpGroupMappingRequest: CreateIdpGroupMappingRequest, +): string { + return JSON.stringify( + CreateIdpGroupMappingRequest$outboundSchema.parse( + createIdpGroupMappingRequest, + ), + ); +} +export function createIdpGroupMappingRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIdpGroupMappingRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIdpGroupMappingRequest' from JSON`, + ); +} diff --git a/src/models/operations/createpaladincontextsource.ts b/src/models/operations/createpaladincontextsource.ts new file mode 100644 index 00000000..cb5227e0 --- /dev/null +++ b/src/models/operations/createpaladincontextsource.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreatePaladinContextSourceRequest = { + /** + * The ID of the Paladin. + */ + paladinId: string; + createPaladinContextSourceInfo: components.CreatePaladinContextSourceInfo; +}; + +/** @internal */ +export const CreatePaladinContextSourceRequest$inboundSchema: z.ZodType< + CreatePaladinContextSourceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + paladin_id: z.string(), + CreatePaladinContextSourceInfo: + components.CreatePaladinContextSourceInfo$inboundSchema, +}).transform((v) => { + return remap$(v, { + "paladin_id": "paladinId", + "CreatePaladinContextSourceInfo": "createPaladinContextSourceInfo", + }); +}); +/** @internal */ +export type CreatePaladinContextSourceRequest$Outbound = { + paladin_id: string; + CreatePaladinContextSourceInfo: + components.CreatePaladinContextSourceInfo$Outbound; +}; + +/** @internal */ +export const CreatePaladinContextSourceRequest$outboundSchema: z.ZodType< + CreatePaladinContextSourceRequest$Outbound, + z.ZodTypeDef, + CreatePaladinContextSourceRequest +> = z.object({ + paladinId: z.string(), + createPaladinContextSourceInfo: + components.CreatePaladinContextSourceInfo$outboundSchema, +}).transform((v) => { + return remap$(v, { + paladinId: "paladin_id", + createPaladinContextSourceInfo: "CreatePaladinContextSourceInfo", + }); +}); + +export function createPaladinContextSourceRequestToJSON( + createPaladinContextSourceRequest: CreatePaladinContextSourceRequest, +): string { + return JSON.stringify( + CreatePaladinContextSourceRequest$outboundSchema.parse( + createPaladinContextSourceRequest, + ), + ); +} +export function createPaladinContextSourceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePaladinContextSourceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePaladinContextSourceRequest' from JSON`, + ); +} diff --git a/src/models/operations/createrequest.ts b/src/models/operations/createrequest.ts index cfae9675..161d34af 100644 --- a/src/models/operations/createrequest.ts +++ b/src/models/operations/createrequest.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const CreateRequestResponse$inboundSchema: z.ZodType< > = z.object({ id: z.string().optional(), }); - /** @internal */ export type CreateRequestResponse$Outbound = { id?: string | undefined; @@ -37,19 +36,6 @@ export const CreateRequestResponse$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateRequestResponse$ { - /** @deprecated use `CreateRequestResponse$inboundSchema` instead. */ - export const inboundSchema = CreateRequestResponse$inboundSchema; - /** @deprecated use `CreateRequestResponse$outboundSchema` instead. */ - export const outboundSchema = CreateRequestResponse$outboundSchema; - /** @deprecated use `CreateRequestResponse$Outbound` instead. */ - export type Outbound = CreateRequestResponse$Outbound; -} - export function createRequestResponseToJSON( createRequestResponse: CreateRequestResponse, ): string { @@ -57,7 +43,6 @@ export function createRequestResponseToJSON( CreateRequestResponse$outboundSchema.parse(createRequestResponse), ); } - export function createRequestResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/createrequestcomment.ts b/src/models/operations/createrequestcomment.ts new file mode 100644 index 00000000..f346bee3 --- /dev/null +++ b/src/models/operations/createrequestcomment.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Comment parameters + */ +export type CreateRequestCommentRequestBody = { + /** + * comment + */ + comment: string; +}; + +export type CreateRequestCommentRequest = { + /** + * The ID of the request to comment on + */ + id: string; + /** + * Comment parameters + */ + requestBody: CreateRequestCommentRequestBody; +}; + +/** + * Request successfully commented + */ +export type CreateRequestCommentResponse = { + /** + * # Request Object + * + * @remarks + * ### Description + * The `Request` object is used to represent a request. + * + * ### Usage Example + * Returned from the `GET Requests` endpoint. + */ + request?: components.RequestT | undefined; +}; + +/** @internal */ +export const CreateRequestCommentRequestBody$inboundSchema: z.ZodType< + CreateRequestCommentRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + comment: z.string(), +}); +/** @internal */ +export type CreateRequestCommentRequestBody$Outbound = { + comment: string; +}; + +/** @internal */ +export const CreateRequestCommentRequestBody$outboundSchema: z.ZodType< + CreateRequestCommentRequestBody$Outbound, + z.ZodTypeDef, + CreateRequestCommentRequestBody +> = z.object({ + comment: z.string(), +}); + +export function createRequestCommentRequestBodyToJSON( + createRequestCommentRequestBody: CreateRequestCommentRequestBody, +): string { + return JSON.stringify( + CreateRequestCommentRequestBody$outboundSchema.parse( + createRequestCommentRequestBody, + ), + ); +} +export function createRequestCommentRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRequestCommentRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRequestCommentRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateRequestCommentRequest$inboundSchema: z.ZodType< + CreateRequestCommentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + RequestBody: z.lazy(() => CreateRequestCommentRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); +/** @internal */ +export type CreateRequestCommentRequest$Outbound = { + id: string; + RequestBody: CreateRequestCommentRequestBody$Outbound; +}; + +/** @internal */ +export const CreateRequestCommentRequest$outboundSchema: z.ZodType< + CreateRequestCommentRequest$Outbound, + z.ZodTypeDef, + CreateRequestCommentRequest +> = z.object({ + id: z.string(), + requestBody: z.lazy(() => CreateRequestCommentRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +export function createRequestCommentRequestToJSON( + createRequestCommentRequest: CreateRequestCommentRequest, +): string { + return JSON.stringify( + CreateRequestCommentRequest$outboundSchema.parse( + createRequestCommentRequest, + ), + ); +} +export function createRequestCommentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRequestCommentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRequestCommentRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateRequestCommentResponse$inboundSchema: z.ZodType< + CreateRequestCommentResponse, + z.ZodTypeDef, + unknown +> = z.object({ + request: components.RequestT$inboundSchema.optional(), +}); +/** @internal */ +export type CreateRequestCommentResponse$Outbound = { + request?: components.RequestT$Outbound | undefined; +}; + +/** @internal */ +export const CreateRequestCommentResponse$outboundSchema: z.ZodType< + CreateRequestCommentResponse$Outbound, + z.ZodTypeDef, + CreateRequestCommentResponse +> = z.object({ + request: components.RequestT$outboundSchema.optional(), +}); + +export function createRequestCommentResponseToJSON( + createRequestCommentResponse: CreateRequestCommentResponse, +): string { + return JSON.stringify( + CreateRequestCommentResponse$outboundSchema.parse( + createRequestCommentResponse, + ), + ); +} +export function createRequestCommentResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRequestCommentResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRequestCommentResponse' from JSON`, + ); +} diff --git a/src/models/operations/createtag.ts b/src/models/operations/createtag.ts index e6077eeb..926753d3 100644 --- a/src/models/operations/createtag.ts +++ b/src/models/operations/createtag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -49,7 +49,6 @@ export const CreateTagRequest$inboundSchema: z.ZodType< "CreateTagInfo": "createTagInfo", }); }); - /** @internal */ export type CreateTagRequest$Outbound = { tag_key?: string | undefined; @@ -77,19 +76,6 @@ export const CreateTagRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateTagRequest$ { - /** @deprecated use `CreateTagRequest$inboundSchema` instead. */ - export const inboundSchema = CreateTagRequest$inboundSchema; - /** @deprecated use `CreateTagRequest$outboundSchema` instead. */ - export const outboundSchema = CreateTagRequest$outboundSchema; - /** @deprecated use `CreateTagRequest$Outbound` instead. */ - export type Outbound = CreateTagRequest$Outbound; -} - export function createTagRequestToJSON( createTagRequest: CreateTagRequest, ): string { @@ -97,7 +83,6 @@ export function createTagRequestToJSON( CreateTagRequest$outboundSchema.parse(createTagRequest), ); } - export function createTagRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletebundle.ts b/src/models/operations/deletebundle.ts index 3c18a583..e9d8cd61 100644 --- a/src/models/operations/deletebundle.ts +++ b/src/models/operations/deletebundle.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const DeleteBundleRequest$inboundSchema: z.ZodType< "bundle_id": "bundleId", }); }); - /** @internal */ export type DeleteBundleRequest$Outbound = { bundle_id: string; @@ -46,19 +45,6 @@ export const DeleteBundleRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteBundleRequest$ { - /** @deprecated use `DeleteBundleRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteBundleRequest$inboundSchema; - /** @deprecated use `DeleteBundleRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteBundleRequest$outboundSchema; - /** @deprecated use `DeleteBundleRequest$Outbound` instead. */ - export type Outbound = DeleteBundleRequest$Outbound; -} - export function deleteBundleRequestToJSON( deleteBundleRequest: DeleteBundleRequest, ): string { @@ -66,7 +52,6 @@ export function deleteBundleRequestToJSON( DeleteBundleRequest$outboundSchema.parse(deleteBundleRequest), ); } - export function deleteBundleRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deleteconfigurationtemplate.ts b/src/models/operations/deleteconfigurationtemplate.ts index 7849e363..ceadfdfd 100644 --- a/src/models/operations/deleteconfigurationtemplate.ts +++ b/src/models/operations/deleteconfigurationtemplate.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const DeleteConfigurationTemplateRequest$inboundSchema: z.ZodType< "configuration_template_id": "configurationTemplateId", }); }); - /** @internal */ export type DeleteConfigurationTemplateRequest$Outbound = { configuration_template_id: string; @@ -46,20 +45,6 @@ export const DeleteConfigurationTemplateRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteConfigurationTemplateRequest$ { - /** @deprecated use `DeleteConfigurationTemplateRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteConfigurationTemplateRequest$inboundSchema; - /** @deprecated use `DeleteConfigurationTemplateRequest$outboundSchema` instead. */ - export const outboundSchema = - DeleteConfigurationTemplateRequest$outboundSchema; - /** @deprecated use `DeleteConfigurationTemplateRequest$Outbound` instead. */ - export type Outbound = DeleteConfigurationTemplateRequest$Outbound; -} - export function deleteConfigurationTemplateRequestToJSON( deleteConfigurationTemplateRequest: DeleteConfigurationTemplateRequest, ): string { @@ -69,7 +54,6 @@ export function deleteConfigurationTemplateRequestToJSON( ), ); } - export function deleteConfigurationTemplateRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletedelegation.ts b/src/models/operations/deletedelegation.ts new file mode 100644 index 00000000..1ada1f22 --- /dev/null +++ b/src/models/operations/deletedelegation.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteDelegationRequest = { + /** + * The ID of the delegation to remove. + */ + delegationId: string; +}; + +/** @internal */ +export const DeleteDelegationRequest$inboundSchema: z.ZodType< + DeleteDelegationRequest, + z.ZodTypeDef, + unknown +> = z.object({ + delegation_id: z.string(), +}).transform((v) => { + return remap$(v, { + "delegation_id": "delegationId", + }); +}); +/** @internal */ +export type DeleteDelegationRequest$Outbound = { + delegation_id: string; +}; + +/** @internal */ +export const DeleteDelegationRequest$outboundSchema: z.ZodType< + DeleteDelegationRequest$Outbound, + z.ZodTypeDef, + DeleteDelegationRequest +> = z.object({ + delegationId: z.string(), +}).transform((v) => { + return remap$(v, { + delegationId: "delegation_id", + }); +}); + +export function deleteDelegationRequestToJSON( + deleteDelegationRequest: DeleteDelegationRequest, +): string { + return JSON.stringify( + DeleteDelegationRequest$outboundSchema.parse(deleteDelegationRequest), + ); +} +export function deleteDelegationRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteDelegationRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteDelegationRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteeventstream.ts b/src/models/operations/deleteeventstream.ts new file mode 100644 index 00000000..7b9b73ea --- /dev/null +++ b/src/models/operations/deleteeventstream.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteEventStreamRequest = { + /** + * The ID of the event stream. + */ + eventStreamId: string; +}; + +/** @internal */ +export const DeleteEventStreamRequest$inboundSchema: z.ZodType< + DeleteEventStreamRequest, + z.ZodTypeDef, + unknown +> = z.object({ + event_stream_id: z.string(), +}).transform((v) => { + return remap$(v, { + "event_stream_id": "eventStreamId", + }); +}); +/** @internal */ +export type DeleteEventStreamRequest$Outbound = { + event_stream_id: string; +}; + +/** @internal */ +export const DeleteEventStreamRequest$outboundSchema: z.ZodType< + DeleteEventStreamRequest$Outbound, + z.ZodTypeDef, + DeleteEventStreamRequest +> = z.object({ + eventStreamId: z.string(), +}).transform((v) => { + return remap$(v, { + eventStreamId: "event_stream_id", + }); +}); + +export function deleteEventStreamRequestToJSON( + deleteEventStreamRequest: DeleteEventStreamRequest, +): string { + return JSON.stringify( + DeleteEventStreamRequest$outboundSchema.parse(deleteEventStreamRequest), + ); +} +export function deleteEventStreamRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteEventStreamRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteEventStreamRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletegroup.ts b/src/models/operations/deletegroup.ts index a99b195e..56663495 100644 --- a/src/models/operations/deletegroup.ts +++ b/src/models/operations/deletegroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const DeleteGroupRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type DeleteGroupRequest$Outbound = { group_id: string; @@ -46,19 +45,6 @@ export const DeleteGroupRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteGroupRequest$ { - /** @deprecated use `DeleteGroupRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteGroupRequest$inboundSchema; - /** @deprecated use `DeleteGroupRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteGroupRequest$outboundSchema; - /** @deprecated use `DeleteGroupRequest$Outbound` instead. */ - export type Outbound = DeleteGroupRequest$Outbound; -} - export function deleteGroupRequestToJSON( deleteGroupRequest: DeleteGroupRequest, ): string { @@ -66,7 +52,6 @@ export function deleteGroupRequestToJSON( DeleteGroupRequest$outboundSchema.parse(deleteGroupRequest), ); } - export function deleteGroupRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletegroupbinding.ts b/src/models/operations/deletegroupbinding.ts index 92ae1326..803a3f41 100644 --- a/src/models/operations/deletegroupbinding.ts +++ b/src/models/operations/deletegroupbinding.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const DeleteGroupBindingRequest$inboundSchema: z.ZodType< "group_binding_id": "groupBindingId", }); }); - /** @internal */ export type DeleteGroupBindingRequest$Outbound = { group_binding_id: string; @@ -46,19 +45,6 @@ export const DeleteGroupBindingRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteGroupBindingRequest$ { - /** @deprecated use `DeleteGroupBindingRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteGroupBindingRequest$inboundSchema; - /** @deprecated use `DeleteGroupBindingRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteGroupBindingRequest$outboundSchema; - /** @deprecated use `DeleteGroupBindingRequest$Outbound` instead. */ - export type Outbound = DeleteGroupBindingRequest$Outbound; -} - export function deleteGroupBindingRequestToJSON( deleteGroupBindingRequest: DeleteGroupBindingRequest, ): string { @@ -66,7 +52,6 @@ export function deleteGroupBindingRequestToJSON( DeleteGroupBindingRequest$outboundSchema.parse(deleteGroupBindingRequest), ); } - export function deleteGroupBindingRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletegroupuser.ts b/src/models/operations/deletegroupuser.ts index 9d441eab..9233fa65 100644 --- a/src/models/operations/deletegroupuser.ts +++ b/src/models/operations/deletegroupuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -39,7 +39,6 @@ export const DeleteGroupUserRequest$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type DeleteGroupUserRequest$Outbound = { group_id: string; @@ -64,19 +63,6 @@ export const DeleteGroupUserRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteGroupUserRequest$ { - /** @deprecated use `DeleteGroupUserRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteGroupUserRequest$inboundSchema; - /** @deprecated use `DeleteGroupUserRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteGroupUserRequest$outboundSchema; - /** @deprecated use `DeleteGroupUserRequest$Outbound` instead. */ - export type Outbound = DeleteGroupUserRequest$Outbound; -} - export function deleteGroupUserRequestToJSON( deleteGroupUserRequest: DeleteGroupUserRequest, ): string { @@ -84,7 +70,6 @@ export function deleteGroupUserRequestToJSON( DeleteGroupUserRequest$outboundSchema.parse(deleteGroupUserRequest), ); } - export function deleteGroupUserRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deleteidpgroupmappings.ts b/src/models/operations/deleteidpgroupmappings.ts index e190bd05..8ddb83cd 100644 --- a/src/models/operations/deleteidpgroupmappings.ts +++ b/src/models/operations/deleteidpgroupmappings.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const DeleteIdpGroupMappingsRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type DeleteIdpGroupMappingsRequest$Outbound = { app_resource_id: string; @@ -55,19 +54,6 @@ export const DeleteIdpGroupMappingsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteIdpGroupMappingsRequest$ { - /** @deprecated use `DeleteIdpGroupMappingsRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteIdpGroupMappingsRequest$inboundSchema; - /** @deprecated use `DeleteIdpGroupMappingsRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteIdpGroupMappingsRequest$outboundSchema; - /** @deprecated use `DeleteIdpGroupMappingsRequest$Outbound` instead. */ - export type Outbound = DeleteIdpGroupMappingsRequest$Outbound; -} - export function deleteIdpGroupMappingsRequestToJSON( deleteIdpGroupMappingsRequest: DeleteIdpGroupMappingsRequest, ): string { @@ -77,7 +63,6 @@ export function deleteIdpGroupMappingsRequestToJSON( ), ); } - export function deleteIdpGroupMappingsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deleteowner.ts b/src/models/operations/deleteowner.ts index d4b25af9..c6400cff 100644 --- a/src/models/operations/deleteowner.ts +++ b/src/models/operations/deleteowner.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const DeleteOwnerRequest$inboundSchema: z.ZodType< "owner_id": "ownerId", }); }); - /** @internal */ export type DeleteOwnerRequest$Outbound = { owner_id: string; @@ -46,19 +45,6 @@ export const DeleteOwnerRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteOwnerRequest$ { - /** @deprecated use `DeleteOwnerRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteOwnerRequest$inboundSchema; - /** @deprecated use `DeleteOwnerRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteOwnerRequest$outboundSchema; - /** @deprecated use `DeleteOwnerRequest$Outbound` instead. */ - export type Outbound = DeleteOwnerRequest$Outbound; -} - export function deleteOwnerRequestToJSON( deleteOwnerRequest: DeleteOwnerRequest, ): string { @@ -66,7 +52,6 @@ export function deleteOwnerRequestToJSON( DeleteOwnerRequest$outboundSchema.parse(deleteOwnerRequest), ); } - export function deleteOwnerRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletepaladin.ts b/src/models/operations/deletepaladin.ts new file mode 100644 index 00000000..8047b6de --- /dev/null +++ b/src/models/operations/deletepaladin.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeletePaladinRequest = { + /** + * The ID of the Paladin. + */ + paladinId: string; +}; + +/** @internal */ +export const DeletePaladinRequest$inboundSchema: z.ZodType< + DeletePaladinRequest, + z.ZodTypeDef, + unknown +> = z.object({ + paladin_id: z.string(), +}).transform((v) => { + return remap$(v, { + "paladin_id": "paladinId", + }); +}); +/** @internal */ +export type DeletePaladinRequest$Outbound = { + paladin_id: string; +}; + +/** @internal */ +export const DeletePaladinRequest$outboundSchema: z.ZodType< + DeletePaladinRequest$Outbound, + z.ZodTypeDef, + DeletePaladinRequest +> = z.object({ + paladinId: z.string(), +}).transform((v) => { + return remap$(v, { + paladinId: "paladin_id", + }); +}); + +export function deletePaladinRequestToJSON( + deletePaladinRequest: DeletePaladinRequest, +): string { + return JSON.stringify( + DeletePaladinRequest$outboundSchema.parse(deletePaladinRequest), + ); +} +export function deletePaladinRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePaladinRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePaladinRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletepaladincontextsource.ts b/src/models/operations/deletepaladincontextsource.ts new file mode 100644 index 00000000..945e2802 --- /dev/null +++ b/src/models/operations/deletepaladincontextsource.ts @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeletePaladinContextSourceRequest = { + /** + * The ID of the Paladin. + */ + paladinId: string; + /** + * The ID of the context source. + */ + contextSourceId: string; +}; + +/** @internal */ +export const DeletePaladinContextSourceRequest$inboundSchema: z.ZodType< + DeletePaladinContextSourceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + paladin_id: z.string(), + context_source_id: z.string(), +}).transform((v) => { + return remap$(v, { + "paladin_id": "paladinId", + "context_source_id": "contextSourceId", + }); +}); +/** @internal */ +export type DeletePaladinContextSourceRequest$Outbound = { + paladin_id: string; + context_source_id: string; +}; + +/** @internal */ +export const DeletePaladinContextSourceRequest$outboundSchema: z.ZodType< + DeletePaladinContextSourceRequest$Outbound, + z.ZodTypeDef, + DeletePaladinContextSourceRequest +> = z.object({ + paladinId: z.string(), + contextSourceId: z.string(), +}).transform((v) => { + return remap$(v, { + paladinId: "paladin_id", + contextSourceId: "context_source_id", + }); +}); + +export function deletePaladinContextSourceRequestToJSON( + deletePaladinContextSourceRequest: DeletePaladinContextSourceRequest, +): string { + return JSON.stringify( + DeletePaladinContextSourceRequest$outboundSchema.parse( + deletePaladinContextSourceRequest, + ), + ); +} +export function deletePaladinContextSourceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePaladinContextSourceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePaladinContextSourceRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteresource.ts b/src/models/operations/deleteresource.ts index a60aa449..bc355c79 100644 --- a/src/models/operations/deleteresource.ts +++ b/src/models/operations/deleteresource.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const DeleteResourceRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type DeleteResourceRequest$Outbound = { resource_id: string; @@ -46,19 +45,6 @@ export const DeleteResourceRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteResourceRequest$ { - /** @deprecated use `DeleteResourceRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteResourceRequest$inboundSchema; - /** @deprecated use `DeleteResourceRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteResourceRequest$outboundSchema; - /** @deprecated use `DeleteResourceRequest$Outbound` instead. */ - export type Outbound = DeleteResourceRequest$Outbound; -} - export function deleteResourceRequestToJSON( deleteResourceRequest: DeleteResourceRequest, ): string { @@ -66,7 +52,6 @@ export function deleteResourceRequestToJSON( DeleteResourceRequest$outboundSchema.parse(deleteResourceRequest), ); } - export function deleteResourceRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deleteresourcenhi.ts b/src/models/operations/deleteresourcenhi.ts index f3967930..251efeaa 100644 --- a/src/models/operations/deleteresourcenhi.ts +++ b/src/models/operations/deleteresourcenhi.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -39,7 +39,6 @@ export const DeleteResourceNhiRequest$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type DeleteResourceNhiRequest$Outbound = { resource_id: string; @@ -64,19 +63,6 @@ export const DeleteResourceNhiRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteResourceNhiRequest$ { - /** @deprecated use `DeleteResourceNhiRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteResourceNhiRequest$inboundSchema; - /** @deprecated use `DeleteResourceNhiRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteResourceNhiRequest$outboundSchema; - /** @deprecated use `DeleteResourceNhiRequest$Outbound` instead. */ - export type Outbound = DeleteResourceNhiRequest$Outbound; -} - export function deleteResourceNhiRequestToJSON( deleteResourceNhiRequest: DeleteResourceNhiRequest, ): string { @@ -84,7 +70,6 @@ export function deleteResourceNhiRequestToJSON( DeleteResourceNhiRequest$outboundSchema.parse(deleteResourceNhiRequest), ); } - export function deleteResourceNhiRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deleteresourceuser.ts b/src/models/operations/deleteresourceuser.ts index c7b51abd..b32a48dc 100644 --- a/src/models/operations/deleteresourceuser.ts +++ b/src/models/operations/deleteresourceuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -39,7 +39,6 @@ export const DeleteResourceUserRequest$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type DeleteResourceUserRequest$Outbound = { resource_id: string; @@ -64,19 +63,6 @@ export const DeleteResourceUserRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteResourceUserRequest$ { - /** @deprecated use `DeleteResourceUserRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteResourceUserRequest$inboundSchema; - /** @deprecated use `DeleteResourceUserRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteResourceUserRequest$outboundSchema; - /** @deprecated use `DeleteResourceUserRequest$Outbound` instead. */ - export type Outbound = DeleteResourceUserRequest$Outbound; -} - export function deleteResourceUserRequestToJSON( deleteResourceUserRequest: DeleteResourceUserRequest, ): string { @@ -84,7 +70,6 @@ export function deleteResourceUserRequestToJSON( DeleteResourceUserRequest$outboundSchema.parse(deleteResourceUserRequest), ); } - export function deleteResourceUserRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletetagbyid.ts b/src/models/operations/deletetagbyid.ts index a4e6174d..64bb22de 100644 --- a/src/models/operations/deletetagbyid.ts +++ b/src/models/operations/deletetagbyid.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const DeleteTagByIDRequest$inboundSchema: z.ZodType< "tag_id": "tagId", }); }); - /** @internal */ export type DeleteTagByIDRequest$Outbound = { tag_id: string; @@ -46,19 +45,6 @@ export const DeleteTagByIDRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteTagByIDRequest$ { - /** @deprecated use `DeleteTagByIDRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteTagByIDRequest$inboundSchema; - /** @deprecated use `DeleteTagByIDRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteTagByIDRequest$outboundSchema; - /** @deprecated use `DeleteTagByIDRequest$Outbound` instead. */ - export type Outbound = DeleteTagByIDRequest$Outbound; -} - export function deleteTagByIDRequestToJSON( deleteTagByIDRequest: DeleteTagByIDRequest, ): string { @@ -66,7 +52,6 @@ export function deleteTagByIDRequestToJSON( DeleteTagByIDRequest$outboundSchema.parse(deleteTagByIDRequest), ); } - export function deleteTagByIDRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletetoken.ts b/src/models/operations/deletetoken.ts new file mode 100644 index 00000000..420696a2 --- /dev/null +++ b/src/models/operations/deletetoken.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteTokenRequest = { + /** + * The ID of the token to delete. + */ + tokenId: string; +}; + +/** @internal */ +export const DeleteTokenRequest$inboundSchema: z.ZodType< + DeleteTokenRequest, + z.ZodTypeDef, + unknown +> = z.object({ + token_id: z.string(), +}).transform((v) => { + return remap$(v, { + "token_id": "tokenId", + }); +}); +/** @internal */ +export type DeleteTokenRequest$Outbound = { + token_id: string; +}; + +/** @internal */ +export const DeleteTokenRequest$outboundSchema: z.ZodType< + DeleteTokenRequest$Outbound, + z.ZodTypeDef, + DeleteTokenRequest +> = z.object({ + tokenId: z.string(), +}).transform((v) => { + return remap$(v, { + tokenId: "token_id", + }); +}); + +export function deleteTokenRequestToJSON( + deleteTokenRequest: DeleteTokenRequest, +): string { + return JSON.stringify( + DeleteTokenRequest$outboundSchema.parse(deleteTokenRequest), + ); +} +export function deleteTokenRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteTokenRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteTokenRequest' from JSON`, + ); +} diff --git a/src/models/operations/denyrequest.ts b/src/models/operations/denyrequest.ts new file mode 100644 index 00000000..36d7ecbf --- /dev/null +++ b/src/models/operations/denyrequest.ts @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Denial parameters + */ +export type DenyRequestRequestBody = { + /** + * Comment for the denial + */ + comment: string; + /** + * The decision level for the approval + */ + level?: components.RequestApprovalEnum | undefined; +}; + +export type DenyRequestRequest = { + /** + * The ID of the request to deny + */ + id: string; + /** + * Denial parameters + */ + requestBody: DenyRequestRequestBody; +}; + +/** + * Request successfully denied + */ +export type DenyRequestResponse = { + /** + * # Request Object + * + * @remarks + * ### Description + * The `Request` object is used to represent a request. + * + * ### Usage Example + * Returned from the `GET Requests` endpoint. + */ + request?: components.RequestT | undefined; +}; + +/** @internal */ +export const DenyRequestRequestBody$inboundSchema: z.ZodType< + DenyRequestRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + comment: z.string(), + level: components.RequestApprovalEnum$inboundSchema.optional(), +}); +/** @internal */ +export type DenyRequestRequestBody$Outbound = { + comment: string; + level?: string | undefined; +}; + +/** @internal */ +export const DenyRequestRequestBody$outboundSchema: z.ZodType< + DenyRequestRequestBody$Outbound, + z.ZodTypeDef, + DenyRequestRequestBody +> = z.object({ + comment: z.string(), + level: components.RequestApprovalEnum$outboundSchema.optional(), +}); + +export function denyRequestRequestBodyToJSON( + denyRequestRequestBody: DenyRequestRequestBody, +): string { + return JSON.stringify( + DenyRequestRequestBody$outboundSchema.parse(denyRequestRequestBody), + ); +} +export function denyRequestRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DenyRequestRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DenyRequestRequestBody' from JSON`, + ); +} + +/** @internal */ +export const DenyRequestRequest$inboundSchema: z.ZodType< + DenyRequestRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + RequestBody: z.lazy(() => DenyRequestRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "RequestBody": "requestBody", + }); +}); +/** @internal */ +export type DenyRequestRequest$Outbound = { + id: string; + RequestBody: DenyRequestRequestBody$Outbound; +}; + +/** @internal */ +export const DenyRequestRequest$outboundSchema: z.ZodType< + DenyRequestRequest$Outbound, + z.ZodTypeDef, + DenyRequestRequest +> = z.object({ + id: z.string(), + requestBody: z.lazy(() => DenyRequestRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +export function denyRequestRequestToJSON( + denyRequestRequest: DenyRequestRequest, +): string { + return JSON.stringify( + DenyRequestRequest$outboundSchema.parse(denyRequestRequest), + ); +} +export function denyRequestRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DenyRequestRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DenyRequestRequest' from JSON`, + ); +} + +/** @internal */ +export const DenyRequestResponse$inboundSchema: z.ZodType< + DenyRequestResponse, + z.ZodTypeDef, + unknown +> = z.object({ + request: components.RequestT$inboundSchema.optional(), +}); +/** @internal */ +export type DenyRequestResponse$Outbound = { + request?: components.RequestT$Outbound | undefined; +}; + +/** @internal */ +export const DenyRequestResponse$outboundSchema: z.ZodType< + DenyRequestResponse$Outbound, + z.ZodTypeDef, + DenyRequestResponse +> = z.object({ + request: components.RequestT$outboundSchema.optional(), +}); + +export function denyRequestResponseToJSON( + denyRequestResponse: DenyRequestResponse, +): string { + return JSON.stringify( + DenyRequestResponse$outboundSchema.parse(denyRequestResponse), + ); +} +export function denyRequestResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DenyRequestResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DenyRequestResponse' from JSON`, + ); +} diff --git a/src/models/operations/endcampaign.ts b/src/models/operations/endcampaign.ts new file mode 100644 index 00000000..e351840d --- /dev/null +++ b/src/models/operations/endcampaign.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type EndCampaignRequest = { + /** + * The ID of the campaign. + */ + campaignId: string; +}; + +/** @internal */ +export const EndCampaignRequest$inboundSchema: z.ZodType< + EndCampaignRequest, + z.ZodTypeDef, + unknown +> = z.object({ + campaign_id: z.string(), +}).transform((v) => { + return remap$(v, { + "campaign_id": "campaignId", + }); +}); +/** @internal */ +export type EndCampaignRequest$Outbound = { + campaign_id: string; +}; + +/** @internal */ +export const EndCampaignRequest$outboundSchema: z.ZodType< + EndCampaignRequest$Outbound, + z.ZodTypeDef, + EndCampaignRequest +> = z.object({ + campaignId: z.string(), +}).transform((v) => { + return remap$(v, { + campaignId: "campaign_id", + }); +}); + +export function endCampaignRequestToJSON( + endCampaignRequest: EndCampaignRequest, +): string { + return JSON.stringify( + EndCampaignRequest$outboundSchema.parse(endCampaignRequest), + ); +} +export function endCampaignRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EndCampaignRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EndCampaignRequest' from JSON`, + ); +} diff --git a/src/models/operations/events.ts b/src/models/operations/events.ts index 5d0af995..e90718d9 100644 --- a/src/models/operations/events.ts +++ b/src/models/operations/events.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -73,7 +73,6 @@ export const EventsRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type EventsRequest$Outbound = { start_date_filter?: string | undefined; @@ -112,23 +111,9 @@ export const EventsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EventsRequest$ { - /** @deprecated use `EventsRequest$inboundSchema` instead. */ - export const inboundSchema = EventsRequest$inboundSchema; - /** @deprecated use `EventsRequest$outboundSchema` instead. */ - export const outboundSchema = EventsRequest$outboundSchema; - /** @deprecated use `EventsRequest$Outbound` instead. */ - export type Outbound = EventsRequest$Outbound; -} - export function eventsRequestToJSON(eventsRequest: EventsRequest): string { return JSON.stringify(EventsRequest$outboundSchema.parse(eventsRequest)); } - export function eventsRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -151,7 +136,6 @@ export const EventsResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type EventsResponse$Outbound = { Result: components.PaginatedEventList$Outbound; @@ -170,23 +154,9 @@ export const EventsResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EventsResponse$ { - /** @deprecated use `EventsResponse$inboundSchema` instead. */ - export const inboundSchema = EventsResponse$inboundSchema; - /** @deprecated use `EventsResponse$outboundSchema` instead. */ - export const outboundSchema = EventsResponse$outboundSchema; - /** @deprecated use `EventsResponse$Outbound` instead. */ - export type Outbound = EventsResponse$Outbound; -} - export function eventsResponseToJSON(eventsResponse: EventsResponse): string { return JSON.stringify(EventsResponse$outboundSchema.parse(eventsResponse)); } - export function eventsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getaccessrule.ts b/src/models/operations/getaccessrule.ts index 075c416e..8d84814a 100644 --- a/src/models/operations/getaccessrule.ts +++ b/src/models/operations/getaccessrule.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetAccessRuleRequest$inboundSchema: z.ZodType< "access_rule_id": "accessRuleId", }); }); - /** @internal */ export type GetAccessRuleRequest$Outbound = { access_rule_id: string; @@ -46,19 +45,6 @@ export const GetAccessRuleRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetAccessRuleRequest$ { - /** @deprecated use `GetAccessRuleRequest$inboundSchema` instead. */ - export const inboundSchema = GetAccessRuleRequest$inboundSchema; - /** @deprecated use `GetAccessRuleRequest$outboundSchema` instead. */ - export const outboundSchema = GetAccessRuleRequest$outboundSchema; - /** @deprecated use `GetAccessRuleRequest$Outbound` instead. */ - export type Outbound = GetAccessRuleRequest$Outbound; -} - export function getAccessRuleRequestToJSON( getAccessRuleRequest: GetAccessRuleRequest, ): string { @@ -66,7 +52,6 @@ export function getAccessRuleRequestToJSON( GetAccessRuleRequest$outboundSchema.parse(getAccessRuleRequest), ); } - export function getAccessRuleRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getaccessrules.ts b/src/models/operations/getaccessrules.ts new file mode 100644 index 00000000..f343d925 --- /dev/null +++ b/src/models/operations/getaccessrules.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetAccessRulesRequest = { + /** + * The pagination cursor value. + */ + cursor?: string | undefined; + /** + * Number of results to return per page. Default is 200. + */ + pageSize?: number | undefined; +}; + +/** @internal */ +export const GetAccessRulesRequest$inboundSchema: z.ZodType< + GetAccessRulesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + cursor: z.string().optional(), + page_size: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "page_size": "pageSize", + }); +}); +/** @internal */ +export type GetAccessRulesRequest$Outbound = { + cursor?: string | undefined; + page_size?: number | undefined; +}; + +/** @internal */ +export const GetAccessRulesRequest$outboundSchema: z.ZodType< + GetAccessRulesRequest$Outbound, + z.ZodTypeDef, + GetAccessRulesRequest +> = z.object({ + cursor: z.string().optional(), + pageSize: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + pageSize: "page_size", + }); +}); + +export function getAccessRulesRequestToJSON( + getAccessRulesRequest: GetAccessRulesRequest, +): string { + return JSON.stringify( + GetAccessRulesRequest$outboundSchema.parse(getAccessRulesRequest), + ); +} +export function getAccessRulesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAccessRulesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAccessRulesRequest' from JSON`, + ); +} diff --git a/src/models/operations/getapp.ts b/src/models/operations/getapp.ts index d234bc33..f11f0b9a 100644 --- a/src/models/operations/getapp.ts +++ b/src/models/operations/getapp.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetAppRequest$inboundSchema: z.ZodType< "app_id": "appId", }); }); - /** @internal */ export type GetAppRequest$Outbound = { app_id: string; @@ -46,23 +45,9 @@ export const GetAppRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetAppRequest$ { - /** @deprecated use `GetAppRequest$inboundSchema` instead. */ - export const inboundSchema = GetAppRequest$inboundSchema; - /** @deprecated use `GetAppRequest$outboundSchema` instead. */ - export const outboundSchema = GetAppRequest$outboundSchema; - /** @deprecated use `GetAppRequest$Outbound` instead. */ - export type Outbound = GetAppRequest$Outbound; -} - export function getAppRequestToJSON(getAppRequest: GetAppRequest): string { return JSON.stringify(GetAppRequest$outboundSchema.parse(getAppRequest)); } - export function getAppRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getapps.ts b/src/models/operations/getapps.ts index 270f6cc0..ccd1120c 100644 --- a/src/models/operations/getapps.ts +++ b/src/models/operations/getapps.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -34,7 +34,6 @@ export const GetAppsRequest$inboundSchema: z.ZodType< "owner_filter": "ownerFilter", }); }); - /** @internal */ export type GetAppsRequest$Outbound = { app_type_filter?: Array | undefined; @@ -56,23 +55,9 @@ export const GetAppsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetAppsRequest$ { - /** @deprecated use `GetAppsRequest$inboundSchema` instead. */ - export const inboundSchema = GetAppsRequest$inboundSchema; - /** @deprecated use `GetAppsRequest$outboundSchema` instead. */ - export const outboundSchema = GetAppsRequest$outboundSchema; - /** @deprecated use `GetAppsRequest$Outbound` instead. */ - export type Outbound = GetAppsRequest$Outbound; -} - export function getAppsRequestToJSON(getAppsRequest: GetAppsRequest): string { return JSON.stringify(GetAppsRequest$outboundSchema.parse(getAppsRequest)); } - export function getAppsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getbundle.ts b/src/models/operations/getbundle.ts index df111eb4..e470cd0e 100644 --- a/src/models/operations/getbundle.ts +++ b/src/models/operations/getbundle.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetBundleRequest$inboundSchema: z.ZodType< "bundle_id": "bundleId", }); }); - /** @internal */ export type GetBundleRequest$Outbound = { bundle_id: string; @@ -46,19 +45,6 @@ export const GetBundleRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetBundleRequest$ { - /** @deprecated use `GetBundleRequest$inboundSchema` instead. */ - export const inboundSchema = GetBundleRequest$inboundSchema; - /** @deprecated use `GetBundleRequest$outboundSchema` instead. */ - export const outboundSchema = GetBundleRequest$outboundSchema; - /** @deprecated use `GetBundleRequest$Outbound` instead. */ - export type Outbound = GetBundleRequest$Outbound; -} - export function getBundleRequestToJSON( getBundleRequest: GetBundleRequest, ): string { @@ -66,7 +52,6 @@ export function getBundleRequestToJSON( GetBundleRequest$outboundSchema.parse(getBundleRequest), ); } - export function getBundleRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getbundlegroups.ts b/src/models/operations/getbundlegroups.ts index d1b1332e..3f850cc0 100644 --- a/src/models/operations/getbundlegroups.ts +++ b/src/models/operations/getbundlegroups.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -43,7 +43,6 @@ export const GetBundleGroupsRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type GetBundleGroupsRequest$Outbound = { bundle_id: string; @@ -67,19 +66,6 @@ export const GetBundleGroupsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetBundleGroupsRequest$ { - /** @deprecated use `GetBundleGroupsRequest$inboundSchema` instead. */ - export const inboundSchema = GetBundleGroupsRequest$inboundSchema; - /** @deprecated use `GetBundleGroupsRequest$outboundSchema` instead. */ - export const outboundSchema = GetBundleGroupsRequest$outboundSchema; - /** @deprecated use `GetBundleGroupsRequest$Outbound` instead. */ - export type Outbound = GetBundleGroupsRequest$Outbound; -} - export function getBundleGroupsRequestToJSON( getBundleGroupsRequest: GetBundleGroupsRequest, ): string { @@ -87,7 +73,6 @@ export function getBundleGroupsRequestToJSON( GetBundleGroupsRequest$outboundSchema.parse(getBundleGroupsRequest), ); } - export function getBundleGroupsRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -110,7 +95,6 @@ export const GetBundleGroupsResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetBundleGroupsResponse$Outbound = { Result: components.PaginatedBundleGroupList$Outbound; @@ -129,19 +113,6 @@ export const GetBundleGroupsResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetBundleGroupsResponse$ { - /** @deprecated use `GetBundleGroupsResponse$inboundSchema` instead. */ - export const inboundSchema = GetBundleGroupsResponse$inboundSchema; - /** @deprecated use `GetBundleGroupsResponse$outboundSchema` instead. */ - export const outboundSchema = GetBundleGroupsResponse$outboundSchema; - /** @deprecated use `GetBundleGroupsResponse$Outbound` instead. */ - export type Outbound = GetBundleGroupsResponse$Outbound; -} - export function getBundleGroupsResponseToJSON( getBundleGroupsResponse: GetBundleGroupsResponse, ): string { @@ -149,7 +120,6 @@ export function getBundleGroupsResponseToJSON( GetBundleGroupsResponse$outboundSchema.parse(getBundleGroupsResponse), ); } - export function getBundleGroupsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getbundleresources.ts b/src/models/operations/getbundleresources.ts index dad3199d..5604b410 100644 --- a/src/models/operations/getbundleresources.ts +++ b/src/models/operations/getbundleresources.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -43,7 +43,6 @@ export const GetBundleResourcesRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type GetBundleResourcesRequest$Outbound = { bundle_id: string; @@ -67,19 +66,6 @@ export const GetBundleResourcesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetBundleResourcesRequest$ { - /** @deprecated use `GetBundleResourcesRequest$inboundSchema` instead. */ - export const inboundSchema = GetBundleResourcesRequest$inboundSchema; - /** @deprecated use `GetBundleResourcesRequest$outboundSchema` instead. */ - export const outboundSchema = GetBundleResourcesRequest$outboundSchema; - /** @deprecated use `GetBundleResourcesRequest$Outbound` instead. */ - export type Outbound = GetBundleResourcesRequest$Outbound; -} - export function getBundleResourcesRequestToJSON( getBundleResourcesRequest: GetBundleResourcesRequest, ): string { @@ -87,7 +73,6 @@ export function getBundleResourcesRequestToJSON( GetBundleResourcesRequest$outboundSchema.parse(getBundleResourcesRequest), ); } - export function getBundleResourcesRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -110,7 +95,6 @@ export const GetBundleResourcesResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetBundleResourcesResponse$Outbound = { Result: components.PaginatedBundleResourceList$Outbound; @@ -129,19 +113,6 @@ export const GetBundleResourcesResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetBundleResourcesResponse$ { - /** @deprecated use `GetBundleResourcesResponse$inboundSchema` instead. */ - export const inboundSchema = GetBundleResourcesResponse$inboundSchema; - /** @deprecated use `GetBundleResourcesResponse$outboundSchema` instead. */ - export const outboundSchema = GetBundleResourcesResponse$outboundSchema; - /** @deprecated use `GetBundleResourcesResponse$Outbound` instead. */ - export type Outbound = GetBundleResourcesResponse$Outbound; -} - export function getBundleResourcesResponseToJSON( getBundleResourcesResponse: GetBundleResourcesResponse, ): string { @@ -149,7 +120,6 @@ export function getBundleResourcesResponseToJSON( GetBundleResourcesResponse$outboundSchema.parse(getBundleResourcesResponse), ); } - export function getBundleResourcesResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getbundles.ts b/src/models/operations/getbundles.ts index 82e89e69..575de926 100644 --- a/src/models/operations/getbundles.ts +++ b/src/models/operations/getbundles.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -42,7 +42,6 @@ export const GetBundlesRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type GetBundlesRequest$Outbound = { page_size?: number | undefined; @@ -65,19 +64,6 @@ export const GetBundlesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetBundlesRequest$ { - /** @deprecated use `GetBundlesRequest$inboundSchema` instead. */ - export const inboundSchema = GetBundlesRequest$inboundSchema; - /** @deprecated use `GetBundlesRequest$outboundSchema` instead. */ - export const outboundSchema = GetBundlesRequest$outboundSchema; - /** @deprecated use `GetBundlesRequest$Outbound` instead. */ - export type Outbound = GetBundlesRequest$Outbound; -} - export function getBundlesRequestToJSON( getBundlesRequest: GetBundlesRequest, ): string { @@ -85,7 +71,6 @@ export function getBundlesRequestToJSON( GetBundlesRequest$outboundSchema.parse(getBundlesRequest), ); } - export function getBundlesRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -108,7 +93,6 @@ export const GetBundlesResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetBundlesResponse$Outbound = { Result: components.PaginatedBundleList$Outbound; @@ -127,19 +111,6 @@ export const GetBundlesResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetBundlesResponse$ { - /** @deprecated use `GetBundlesResponse$inboundSchema` instead. */ - export const inboundSchema = GetBundlesResponse$inboundSchema; - /** @deprecated use `GetBundlesResponse$outboundSchema` instead. */ - export const outboundSchema = GetBundlesResponse$outboundSchema; - /** @deprecated use `GetBundlesResponse$Outbound` instead. */ - export type Outbound = GetBundlesResponse$Outbound; -} - export function getBundlesResponseToJSON( getBundlesResponse: GetBundlesResponse, ): string { @@ -147,7 +118,6 @@ export function getBundlesResponseToJSON( GetBundlesResponse$outboundSchema.parse(getBundlesResponse), ); } - export function getBundlesResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getbundlevisibility.ts b/src/models/operations/getbundlevisibility.ts index e8001ec8..d05d6b5f 100644 --- a/src/models/operations/getbundlevisibility.ts +++ b/src/models/operations/getbundlevisibility.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetBundleVisibilityRequest$inboundSchema: z.ZodType< "bundle_id": "bundleId", }); }); - /** @internal */ export type GetBundleVisibilityRequest$Outbound = { bundle_id: string; @@ -46,19 +45,6 @@ export const GetBundleVisibilityRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetBundleVisibilityRequest$ { - /** @deprecated use `GetBundleVisibilityRequest$inboundSchema` instead. */ - export const inboundSchema = GetBundleVisibilityRequest$inboundSchema; - /** @deprecated use `GetBundleVisibilityRequest$outboundSchema` instead. */ - export const outboundSchema = GetBundleVisibilityRequest$outboundSchema; - /** @deprecated use `GetBundleVisibilityRequest$Outbound` instead. */ - export type Outbound = GetBundleVisibilityRequest$Outbound; -} - export function getBundleVisibilityRequestToJSON( getBundleVisibilityRequest: GetBundleVisibilityRequest, ): string { @@ -66,7 +52,6 @@ export function getBundleVisibilityRequestToJSON( GetBundleVisibilityRequest$outboundSchema.parse(getBundleVisibilityRequest), ); } - export function getBundleVisibilityRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getcampaign.ts b/src/models/operations/getcampaign.ts new file mode 100644 index 00000000..0b6d77e1 --- /dev/null +++ b/src/models/operations/getcampaign.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetCampaignRequest = { + /** + * The ID of the campaign. + */ + campaignId: string; +}; + +/** @internal */ +export const GetCampaignRequest$inboundSchema: z.ZodType< + GetCampaignRequest, + z.ZodTypeDef, + unknown +> = z.object({ + campaign_id: z.string(), +}).transform((v) => { + return remap$(v, { + "campaign_id": "campaignId", + }); +}); +/** @internal */ +export type GetCampaignRequest$Outbound = { + campaign_id: string; +}; + +/** @internal */ +export const GetCampaignRequest$outboundSchema: z.ZodType< + GetCampaignRequest$Outbound, + z.ZodTypeDef, + GetCampaignRequest +> = z.object({ + campaignId: z.string(), +}).transform((v) => { + return remap$(v, { + campaignId: "campaign_id", + }); +}); + +export function getCampaignRequestToJSON( + getCampaignRequest: GetCampaignRequest, +): string { + return JSON.stringify( + GetCampaignRequest$outboundSchema.parse(getCampaignRequest), + ); +} +export function getCampaignRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetCampaignRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetCampaignRequest' from JSON`, + ); +} diff --git a/src/models/operations/getcampaigns.ts b/src/models/operations/getcampaigns.ts new file mode 100644 index 00000000..0226c9d4 --- /dev/null +++ b/src/models/operations/getcampaigns.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetCampaignsRequest = { + /** + * The pagination cursor value. + */ + cursor?: string | undefined; + /** + * Number of results to return per page. Default is 200. + */ + pageSize?: number | undefined; + /** + * Campaign name to filter by. Returns campaigns whose names contain this substring (case-insensitive). + */ + name?: string | undefined; + /** + * Filter by campaign status. Status is derived from lifecycle timestamps and review progress. + */ + status?: components.CampaignStatusEnum | undefined; + /** + * Include campaigns created after this timestamp (exclusive). ISO 8601 format. + */ + createdAtAfter?: Date | undefined; + /** + * Include campaigns created before this timestamp (exclusive). ISO 8601 format. + */ + createdAtBefore?: Date | undefined; + /** + * Include campaigns started after this timestamp (exclusive). ISO 8601 format. + */ + startedAtAfter?: Date | undefined; + /** + * Include campaigns started before this timestamp (exclusive). ISO 8601 format. + */ + startedAtBefore?: Date | undefined; + /** + * Include campaigns ended after this timestamp (exclusive). ISO 8601 format. + */ + endedAtAfter?: Date | undefined; + /** + * Include campaigns ended before this timestamp (exclusive). ISO 8601 format. + */ + endedAtBefore?: Date | undefined; + /** + * Include campaigns stopped after this timestamp (exclusive). ISO 8601 format. + */ + stoppedAtAfter?: Date | undefined; + /** + * Include campaigns stopped before this timestamp (exclusive). ISO 8601 format. + */ + stoppedAtBefore?: Date | undefined; +}; + +/** @internal */ +export const GetCampaignsRequest$inboundSchema: z.ZodType< + GetCampaignsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + cursor: z.string().optional(), + page_size: z.number().int().optional(), + name: z.string().optional(), + status: components.CampaignStatusEnum$inboundSchema.optional(), + created_at_after: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + created_at_before: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + started_at_after: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + started_at_before: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + ended_at_after: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + ended_at_before: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + stopped_at_after: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + stopped_at_before: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), +}).transform((v) => { + return remap$(v, { + "page_size": "pageSize", + "created_at_after": "createdAtAfter", + "created_at_before": "createdAtBefore", + "started_at_after": "startedAtAfter", + "started_at_before": "startedAtBefore", + "ended_at_after": "endedAtAfter", + "ended_at_before": "endedAtBefore", + "stopped_at_after": "stoppedAtAfter", + "stopped_at_before": "stoppedAtBefore", + }); +}); +/** @internal */ +export type GetCampaignsRequest$Outbound = { + cursor?: string | undefined; + page_size?: number | undefined; + name?: string | undefined; + status?: string | undefined; + created_at_after?: string | undefined; + created_at_before?: string | undefined; + started_at_after?: string | undefined; + started_at_before?: string | undefined; + ended_at_after?: string | undefined; + ended_at_before?: string | undefined; + stopped_at_after?: string | undefined; + stopped_at_before?: string | undefined; +}; + +/** @internal */ +export const GetCampaignsRequest$outboundSchema: z.ZodType< + GetCampaignsRequest$Outbound, + z.ZodTypeDef, + GetCampaignsRequest +> = z.object({ + cursor: z.string().optional(), + pageSize: z.number().int().optional(), + name: z.string().optional(), + status: components.CampaignStatusEnum$outboundSchema.optional(), + createdAtAfter: z.date().transform(v => v.toISOString()).optional(), + createdAtBefore: z.date().transform(v => v.toISOString()).optional(), + startedAtAfter: z.date().transform(v => v.toISOString()).optional(), + startedAtBefore: z.date().transform(v => v.toISOString()).optional(), + endedAtAfter: z.date().transform(v => v.toISOString()).optional(), + endedAtBefore: z.date().transform(v => v.toISOString()).optional(), + stoppedAtAfter: z.date().transform(v => v.toISOString()).optional(), + stoppedAtBefore: z.date().transform(v => v.toISOString()).optional(), +}).transform((v) => { + return remap$(v, { + pageSize: "page_size", + createdAtAfter: "created_at_after", + createdAtBefore: "created_at_before", + startedAtAfter: "started_at_after", + startedAtBefore: "started_at_before", + endedAtAfter: "ended_at_after", + endedAtBefore: "ended_at_before", + stoppedAtAfter: "stopped_at_after", + stoppedAtBefore: "stopped_at_before", + }); +}); + +export function getCampaignsRequestToJSON( + getCampaignsRequest: GetCampaignsRequest, +): string { + return JSON.stringify( + GetCampaignsRequest$outboundSchema.parse(getCampaignsRequest), + ); +} +export function getCampaignsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetCampaignsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetCampaignsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getdelegation.ts b/src/models/operations/getdelegation.ts new file mode 100644 index 00000000..0717c934 --- /dev/null +++ b/src/models/operations/getdelegation.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetDelegationRequest = { + /** + * The ID of the delegation to retrieve. + */ + delegationId: string; +}; + +/** @internal */ +export const GetDelegationRequest$inboundSchema: z.ZodType< + GetDelegationRequest, + z.ZodTypeDef, + unknown +> = z.object({ + delegation_id: z.string(), +}).transform((v) => { + return remap$(v, { + "delegation_id": "delegationId", + }); +}); +/** @internal */ +export type GetDelegationRequest$Outbound = { + delegation_id: string; +}; + +/** @internal */ +export const GetDelegationRequest$outboundSchema: z.ZodType< + GetDelegationRequest$Outbound, + z.ZodTypeDef, + GetDelegationRequest +> = z.object({ + delegationId: z.string(), +}).transform((v) => { + return remap$(v, { + delegationId: "delegation_id", + }); +}); + +export function getDelegationRequestToJSON( + getDelegationRequest: GetDelegationRequest, +): string { + return JSON.stringify( + GetDelegationRequest$outboundSchema.parse(getDelegationRequest), + ); +} +export function getDelegationRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetDelegationRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetDelegationRequest' from JSON`, + ); +} diff --git a/src/models/operations/getdelegations.ts b/src/models/operations/getdelegations.ts new file mode 100644 index 00000000..293de6b8 --- /dev/null +++ b/src/models/operations/getdelegations.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetDelegationsRequest = { + /** + * The delegator user ID to filter delegations by the user delegating their access review requests. + */ + delegatorUserId?: string | undefined; + /** + * The delegate user ID to filter delegations by the user being delegated to. + */ + delegateUserId?: string | undefined; + /** + * A cursor to indicate where to start fetching results. + */ + cursor?: string | undefined; + /** + * The maximum number of results to return per page. The default is 200. + */ + pageSize?: number | undefined; +}; + +/** @internal */ +export const GetDelegationsRequest$inboundSchema: z.ZodType< + GetDelegationsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + delegator_user_id: z.string().optional(), + delegate_user_id: z.string().optional(), + cursor: z.string().optional(), + page_size: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "delegator_user_id": "delegatorUserId", + "delegate_user_id": "delegateUserId", + "page_size": "pageSize", + }); +}); +/** @internal */ +export type GetDelegationsRequest$Outbound = { + delegator_user_id?: string | undefined; + delegate_user_id?: string | undefined; + cursor?: string | undefined; + page_size?: number | undefined; +}; + +/** @internal */ +export const GetDelegationsRequest$outboundSchema: z.ZodType< + GetDelegationsRequest$Outbound, + z.ZodTypeDef, + GetDelegationsRequest +> = z.object({ + delegatorUserId: z.string().optional(), + delegateUserId: z.string().optional(), + cursor: z.string().optional(), + pageSize: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + delegatorUserId: "delegator_user_id", + delegateUserId: "delegate_user_id", + pageSize: "page_size", + }); +}); + +export function getDelegationsRequestToJSON( + getDelegationsRequest: GetDelegationsRequest, +): string { + return JSON.stringify( + GetDelegationsRequest$outboundSchema.parse(getDelegationsRequest), + ); +} +export function getDelegationsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetDelegationsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetDelegationsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getevent.ts b/src/models/operations/getevent.ts new file mode 100644 index 00000000..60b1f257 --- /dev/null +++ b/src/models/operations/getevent.ts @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetEventRequest = { + /** + * The ID of the event. + */ + eventId: string; +}; + +/** @internal */ +export const GetEventRequest$inboundSchema: z.ZodType< + GetEventRequest, + z.ZodTypeDef, + unknown +> = z.object({ + event_id: z.string(), +}).transform((v) => { + return remap$(v, { + "event_id": "eventId", + }); +}); +/** @internal */ +export type GetEventRequest$Outbound = { + event_id: string; +}; + +/** @internal */ +export const GetEventRequest$outboundSchema: z.ZodType< + GetEventRequest$Outbound, + z.ZodTypeDef, + GetEventRequest +> = z.object({ + eventId: z.string(), +}).transform((v) => { + return remap$(v, { + eventId: "event_id", + }); +}); + +export function getEventRequestToJSON( + getEventRequest: GetEventRequest, +): string { + return JSON.stringify(GetEventRequest$outboundSchema.parse(getEventRequest)); +} +export function getEventRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetEventRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetEventRequest' from JSON`, + ); +} diff --git a/src/models/operations/getgroup.ts b/src/models/operations/getgroup.ts index f6a3dbb6..0cbf1706 100644 --- a/src/models/operations/getgroup.ts +++ b/src/models/operations/getgroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetGroupRequest$Outbound = { group_id: string; @@ -46,25 +45,11 @@ export const GetGroupRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupRequest$ { - /** @deprecated use `GetGroupRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupRequest$inboundSchema; - /** @deprecated use `GetGroupRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupRequest$outboundSchema; - /** @deprecated use `GetGroupRequest$Outbound` instead. */ - export type Outbound = GetGroupRequest$Outbound; -} - export function getGroupRequestToJSON( getGroupRequest: GetGroupRequest, ): string { return JSON.stringify(GetGroupRequest$outboundSchema.parse(getGroupRequest)); } - export function getGroupRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupbinding.ts b/src/models/operations/getgroupbinding.ts index e4fa9fef..543c7e29 100644 --- a/src/models/operations/getgroupbinding.ts +++ b/src/models/operations/getgroupbinding.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupBindingRequest$inboundSchema: z.ZodType< "group_binding_id": "groupBindingId", }); }); - /** @internal */ export type GetGroupBindingRequest$Outbound = { group_binding_id: string; @@ -46,19 +45,6 @@ export const GetGroupBindingRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupBindingRequest$ { - /** @deprecated use `GetGroupBindingRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupBindingRequest$inboundSchema; - /** @deprecated use `GetGroupBindingRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupBindingRequest$outboundSchema; - /** @deprecated use `GetGroupBindingRequest$Outbound` instead. */ - export type Outbound = GetGroupBindingRequest$Outbound; -} - export function getGroupBindingRequestToJSON( getGroupBindingRequest: GetGroupBindingRequest, ): string { @@ -66,7 +52,6 @@ export function getGroupBindingRequestToJSON( GetGroupBindingRequest$outboundSchema.parse(getGroupBindingRequest), ); } - export function getGroupBindingRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupbindings.ts b/src/models/operations/getgroupbindings.ts index 4d286347..f37765c2 100644 --- a/src/models/operations/getgroupbindings.ts +++ b/src/models/operations/getgroupbindings.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -37,7 +37,6 @@ export const GetGroupBindingsRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type GetGroupBindingsRequest$Outbound = { cursor?: string | undefined; @@ -58,19 +57,6 @@ export const GetGroupBindingsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupBindingsRequest$ { - /** @deprecated use `GetGroupBindingsRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupBindingsRequest$inboundSchema; - /** @deprecated use `GetGroupBindingsRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupBindingsRequest$outboundSchema; - /** @deprecated use `GetGroupBindingsRequest$Outbound` instead. */ - export type Outbound = GetGroupBindingsRequest$Outbound; -} - export function getGroupBindingsRequestToJSON( getGroupBindingsRequest: GetGroupBindingsRequest, ): string { @@ -78,7 +64,6 @@ export function getGroupBindingsRequestToJSON( GetGroupBindingsRequest$outboundSchema.parse(getGroupBindingsRequest), ); } - export function getGroupBindingsRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -101,7 +86,6 @@ export const GetGroupBindingsResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetGroupBindingsResponse$Outbound = { Result: components.PaginatedGroupBindingsList$Outbound; @@ -120,19 +104,6 @@ export const GetGroupBindingsResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupBindingsResponse$ { - /** @deprecated use `GetGroupBindingsResponse$inboundSchema` instead. */ - export const inboundSchema = GetGroupBindingsResponse$inboundSchema; - /** @deprecated use `GetGroupBindingsResponse$outboundSchema` instead. */ - export const outboundSchema = GetGroupBindingsResponse$outboundSchema; - /** @deprecated use `GetGroupBindingsResponse$Outbound` instead. */ - export type Outbound = GetGroupBindingsResponse$Outbound; -} - export function getGroupBindingsResponseToJSON( getGroupBindingsResponse: GetGroupBindingsResponse, ): string { @@ -140,7 +111,6 @@ export function getGroupBindingsResponseToJSON( GetGroupBindingsResponse$outboundSchema.parse(getGroupBindingsResponse), ); } - export function getGroupBindingsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupcontaininggroup.ts b/src/models/operations/getgroupcontaininggroup.ts index 91cae0f8..7174330b 100644 --- a/src/models/operations/getgroupcontaininggroup.ts +++ b/src/models/operations/getgroupcontaininggroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const GetGroupContainingGroupRequest$inboundSchema: z.ZodType< "containing_group_id": "containingGroupId", }); }); - /** @internal */ export type GetGroupContainingGroupRequest$Outbound = { group_id: string; @@ -55,19 +54,6 @@ export const GetGroupContainingGroupRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupContainingGroupRequest$ { - /** @deprecated use `GetGroupContainingGroupRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupContainingGroupRequest$inboundSchema; - /** @deprecated use `GetGroupContainingGroupRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupContainingGroupRequest$outboundSchema; - /** @deprecated use `GetGroupContainingGroupRequest$Outbound` instead. */ - export type Outbound = GetGroupContainingGroupRequest$Outbound; -} - export function getGroupContainingGroupRequestToJSON( getGroupContainingGroupRequest: GetGroupContainingGroupRequest, ): string { @@ -77,7 +63,6 @@ export function getGroupContainingGroupRequestToJSON( ), ); } - export function getGroupContainingGroupRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupcontaininggroups.ts b/src/models/operations/getgroupcontaininggroups.ts index 0c7beabe..7b969f85 100644 --- a/src/models/operations/getgroupcontaininggroups.ts +++ b/src/models/operations/getgroupcontaininggroups.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -13,6 +13,10 @@ export type GetGroupContainingGroupsRequest = { * The ID of the group. */ groupId: string; + /** + * The access level's remote ID to filter by. + */ + accessLevelRemoteId?: string | undefined; }; /** @internal */ @@ -22,15 +26,17 @@ export const GetGroupContainingGroupsRequest$inboundSchema: z.ZodType< unknown > = z.object({ group_id: z.string(), + access_level_remote_id: z.string().optional(), }).transform((v) => { return remap$(v, { "group_id": "groupId", + "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type GetGroupContainingGroupsRequest$Outbound = { group_id: string; + access_level_remote_id?: string | undefined; }; /** @internal */ @@ -40,25 +46,14 @@ export const GetGroupContainingGroupsRequest$outboundSchema: z.ZodType< GetGroupContainingGroupsRequest > = z.object({ groupId: z.string(), + accessLevelRemoteId: z.string().optional(), }).transform((v) => { return remap$(v, { groupId: "group_id", + accessLevelRemoteId: "access_level_remote_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupContainingGroupsRequest$ { - /** @deprecated use `GetGroupContainingGroupsRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupContainingGroupsRequest$inboundSchema; - /** @deprecated use `GetGroupContainingGroupsRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupContainingGroupsRequest$outboundSchema; - /** @deprecated use `GetGroupContainingGroupsRequest$Outbound` instead. */ - export type Outbound = GetGroupContainingGroupsRequest$Outbound; -} - export function getGroupContainingGroupsRequestToJSON( getGroupContainingGroupsRequest: GetGroupContainingGroupsRequest, ): string { @@ -68,7 +63,6 @@ export function getGroupContainingGroupsRequestToJSON( ), ); } - export function getGroupContainingGroupsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupmessagechannels.ts b/src/models/operations/getgroupmessagechannels.ts index 32a2763b..41df416c 100644 --- a/src/models/operations/getgroupmessagechannels.ts +++ b/src/models/operations/getgroupmessagechannels.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupMessageChannelsRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetGroupMessageChannelsRequest$Outbound = { group_id: string; @@ -46,19 +45,6 @@ export const GetGroupMessageChannelsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupMessageChannelsRequest$ { - /** @deprecated use `GetGroupMessageChannelsRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupMessageChannelsRequest$inboundSchema; - /** @deprecated use `GetGroupMessageChannelsRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupMessageChannelsRequest$outboundSchema; - /** @deprecated use `GetGroupMessageChannelsRequest$Outbound` instead. */ - export type Outbound = GetGroupMessageChannelsRequest$Outbound; -} - export function getGroupMessageChannelsRequestToJSON( getGroupMessageChannelsRequest: GetGroupMessageChannelsRequest, ): string { @@ -68,7 +54,6 @@ export function getGroupMessageChannelsRequestToJSON( ), ); } - export function getGroupMessageChannelsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgrouponcallschedules.ts b/src/models/operations/getgrouponcallschedules.ts index 82ef6fd7..d8a248a6 100644 --- a/src/models/operations/getgrouponcallschedules.ts +++ b/src/models/operations/getgrouponcallschedules.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupOnCallSchedulesRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetGroupOnCallSchedulesRequest$Outbound = { group_id: string; @@ -46,19 +45,6 @@ export const GetGroupOnCallSchedulesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupOnCallSchedulesRequest$ { - /** @deprecated use `GetGroupOnCallSchedulesRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupOnCallSchedulesRequest$inboundSchema; - /** @deprecated use `GetGroupOnCallSchedulesRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupOnCallSchedulesRequest$outboundSchema; - /** @deprecated use `GetGroupOnCallSchedulesRequest$Outbound` instead. */ - export type Outbound = GetGroupOnCallSchedulesRequest$Outbound; -} - export function getGroupOnCallSchedulesRequestToJSON( getGroupOnCallSchedulesRequest: GetGroupOnCallSchedulesRequest, ): string { @@ -68,7 +54,6 @@ export function getGroupOnCallSchedulesRequestToJSON( ), ); } - export function getGroupOnCallSchedulesRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupresources.ts b/src/models/operations/getgroupresources.ts index abdf7220..9a9bc730 100644 --- a/src/models/operations/getgroupresources.ts +++ b/src/models/operations/getgroupresources.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupResourcesRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetGroupResourcesRequest$Outbound = { group_id: string; @@ -46,19 +45,6 @@ export const GetGroupResourcesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupResourcesRequest$ { - /** @deprecated use `GetGroupResourcesRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupResourcesRequest$inboundSchema; - /** @deprecated use `GetGroupResourcesRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupResourcesRequest$outboundSchema; - /** @deprecated use `GetGroupResourcesRequest$Outbound` instead. */ - export type Outbound = GetGroupResourcesRequest$Outbound; -} - export function getGroupResourcesRequestToJSON( getGroupResourcesRequest: GetGroupResourcesRequest, ): string { @@ -66,7 +52,6 @@ export function getGroupResourcesRequestToJSON( GetGroupResourcesRequest$outboundSchema.parse(getGroupResourcesRequest), ); } - export function getGroupResourcesRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupreviewers.ts b/src/models/operations/getgroupreviewers.ts index 745c145d..0ec3ac3c 100644 --- a/src/models/operations/getgroupreviewers.ts +++ b/src/models/operations/getgroupreviewers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupReviewersRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetGroupReviewersRequest$Outbound = { group_id: string; @@ -46,19 +45,6 @@ export const GetGroupReviewersRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupReviewersRequest$ { - /** @deprecated use `GetGroupReviewersRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupReviewersRequest$inboundSchema; - /** @deprecated use `GetGroupReviewersRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupReviewersRequest$outboundSchema; - /** @deprecated use `GetGroupReviewersRequest$Outbound` instead. */ - export type Outbound = GetGroupReviewersRequest$Outbound; -} - export function getGroupReviewersRequestToJSON( getGroupReviewersRequest: GetGroupReviewersRequest, ): string { @@ -66,7 +52,6 @@ export function getGroupReviewersRequestToJSON( GetGroupReviewersRequest$outboundSchema.parse(getGroupReviewersRequest), ); } - export function getGroupReviewersRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupreviewerstages.ts b/src/models/operations/getgroupreviewerstages.ts index d47a4a52..d331e6f7 100644 --- a/src/models/operations/getgroupreviewerstages.ts +++ b/src/models/operations/getgroupreviewerstages.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupReviewerStagesRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetGroupReviewerStagesRequest$Outbound = { group_id: string; @@ -46,19 +45,6 @@ export const GetGroupReviewerStagesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupReviewerStagesRequest$ { - /** @deprecated use `GetGroupReviewerStagesRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupReviewerStagesRequest$inboundSchema; - /** @deprecated use `GetGroupReviewerStagesRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupReviewerStagesRequest$outboundSchema; - /** @deprecated use `GetGroupReviewerStagesRequest$Outbound` instead. */ - export type Outbound = GetGroupReviewerStagesRequest$Outbound; -} - export function getGroupReviewerStagesRequestToJSON( getGroupReviewerStagesRequest: GetGroupReviewerStagesRequest, ): string { @@ -68,7 +54,6 @@ export function getGroupReviewerStagesRequestToJSON( ), ); } - export function getGroupReviewerStagesRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroups.ts b/src/models/operations/getgroups.ts index fb5e0340..90e21c9f 100644 --- a/src/models/operations/getgroups.ts +++ b/src/models/operations/getgroups.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -30,6 +30,10 @@ export type GetGroupsRequest = { * Group name. */ groupName?: string | undefined; + /** + * The IDs of the tags to filter by. Returns only groups that have any of these tags applied. + */ + tagIds?: Array | undefined; }; export type GetGroupsResponse = { @@ -47,15 +51,16 @@ export const GetGroupsRequest$inboundSchema: z.ZodType< group_type_filter: components.GroupTypeEnum$inboundSchema.optional(), group_ids: z.array(z.string()).optional(), group_name: z.string().optional(), + tag_ids: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { "page_size": "pageSize", "group_type_filter": "groupTypeFilter", "group_ids": "groupIds", "group_name": "groupName", + "tag_ids": "tagIds", }); }); - /** @internal */ export type GetGroupsRequest$Outbound = { cursor?: string | undefined; @@ -63,6 +68,7 @@ export type GetGroupsRequest$Outbound = { group_type_filter?: string | undefined; group_ids?: Array | undefined; group_name?: string | undefined; + tag_ids?: Array | undefined; }; /** @internal */ @@ -76,28 +82,17 @@ export const GetGroupsRequest$outboundSchema: z.ZodType< groupTypeFilter: components.GroupTypeEnum$outboundSchema.optional(), groupIds: z.array(z.string()).optional(), groupName: z.string().optional(), + tagIds: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { pageSize: "page_size", groupTypeFilter: "group_type_filter", groupIds: "group_ids", groupName: "group_name", + tagIds: "tag_ids", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupsRequest$ { - /** @deprecated use `GetGroupsRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupsRequest$inboundSchema; - /** @deprecated use `GetGroupsRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupsRequest$outboundSchema; - /** @deprecated use `GetGroupsRequest$Outbound` instead. */ - export type Outbound = GetGroupsRequest$Outbound; -} - export function getGroupsRequestToJSON( getGroupsRequest: GetGroupsRequest, ): string { @@ -105,7 +100,6 @@ export function getGroupsRequestToJSON( GetGroupsRequest$outboundSchema.parse(getGroupsRequest), ); } - export function getGroupsRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -128,7 +122,6 @@ export const GetGroupsResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetGroupsResponse$Outbound = { Result: components.PaginatedGroupsList$Outbound; @@ -147,19 +140,6 @@ export const GetGroupsResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupsResponse$ { - /** @deprecated use `GetGroupsResponse$inboundSchema` instead. */ - export const inboundSchema = GetGroupsResponse$inboundSchema; - /** @deprecated use `GetGroupsResponse$outboundSchema` instead. */ - export const outboundSchema = GetGroupsResponse$outboundSchema; - /** @deprecated use `GetGroupsResponse$Outbound` instead. */ - export type Outbound = GetGroupsResponse$Outbound; -} - export function getGroupsResponseToJSON( getGroupsResponse: GetGroupsResponse, ): string { @@ -167,7 +147,6 @@ export function getGroupsResponseToJSON( GetGroupsResponse$outboundSchema.parse(getGroupsResponse), ); } - export function getGroupsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgrouptags.ts b/src/models/operations/getgrouptags.ts index 6253b920..0a05117f 100644 --- a/src/models/operations/getgrouptags.ts +++ b/src/models/operations/getgrouptags.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupTagsRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetGroupTagsRequest$Outbound = { group_id: string; @@ -46,19 +45,6 @@ export const GetGroupTagsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupTagsRequest$ { - /** @deprecated use `GetGroupTagsRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupTagsRequest$inboundSchema; - /** @deprecated use `GetGroupTagsRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupTagsRequest$outboundSchema; - /** @deprecated use `GetGroupTagsRequest$Outbound` instead. */ - export type Outbound = GetGroupTagsRequest$Outbound; -} - export function getGroupTagsRequestToJSON( getGroupTagsRequest: GetGroupTagsRequest, ): string { @@ -66,7 +52,6 @@ export function getGroupTagsRequestToJSON( GetGroupTagsRequest$outboundSchema.parse(getGroupTagsRequest), ); } - export function getGroupTagsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupusers.ts b/src/models/operations/getgroupusers.ts index 604f6505..8a5ff98a 100644 --- a/src/models/operations/getgroupusers.ts +++ b/src/models/operations/getgroupusers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -13,6 +13,14 @@ export type GetGroupUsersRequest = { * The ID of the group. */ groupId: string; + /** + * The pagination cursor value. + */ + cursor?: string | undefined; + /** + * Number of results to return per page, up to 1000. When set (or when a cursor is provided), the response contains a single page of results and a `next` cursor; the default page size is 200. When both page_size and cursor are omitted, the entire group membership is returned in one response with no `next` cursor. For large groups, prefer setting page_size and following `next`. + */ + pageSize?: number | undefined; }; /** @internal */ @@ -22,15 +30,19 @@ export const GetGroupUsersRequest$inboundSchema: z.ZodType< unknown > = z.object({ group_id: z.string(), + cursor: z.string().optional(), + page_size: z.number().int().optional(), }).transform((v) => { return remap$(v, { "group_id": "groupId", + "page_size": "pageSize", }); }); - /** @internal */ export type GetGroupUsersRequest$Outbound = { group_id: string; + cursor?: string | undefined; + page_size?: number | undefined; }; /** @internal */ @@ -40,25 +52,15 @@ export const GetGroupUsersRequest$outboundSchema: z.ZodType< GetGroupUsersRequest > = z.object({ groupId: z.string(), + cursor: z.string().optional(), + pageSize: z.number().int().optional(), }).transform((v) => { return remap$(v, { groupId: "group_id", + pageSize: "page_size", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupUsersRequest$ { - /** @deprecated use `GetGroupUsersRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupUsersRequest$inboundSchema; - /** @deprecated use `GetGroupUsersRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupUsersRequest$outboundSchema; - /** @deprecated use `GetGroupUsersRequest$Outbound` instead. */ - export type Outbound = GetGroupUsersRequest$Outbound; -} - export function getGroupUsersRequestToJSON( getGroupUsersRequest: GetGroupUsersRequest, ): string { @@ -66,7 +68,6 @@ export function getGroupUsersRequestToJSON( GetGroupUsersRequest$outboundSchema.parse(getGroupUsersRequest), ); } - export function getGroupUsersRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgroupvisibility.ts b/src/models/operations/getgroupvisibility.ts index e52be423..7533476b 100644 --- a/src/models/operations/getgroupvisibility.ts +++ b/src/models/operations/getgroupvisibility.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetGroupVisibilityRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetGroupVisibilityRequest$Outbound = { group_id: string; @@ -46,19 +45,6 @@ export const GetGroupVisibilityRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGroupVisibilityRequest$ { - /** @deprecated use `GetGroupVisibilityRequest$inboundSchema` instead. */ - export const inboundSchema = GetGroupVisibilityRequest$inboundSchema; - /** @deprecated use `GetGroupVisibilityRequest$outboundSchema` instead. */ - export const outboundSchema = GetGroupVisibilityRequest$outboundSchema; - /** @deprecated use `GetGroupVisibilityRequest$Outbound` instead. */ - export type Outbound = GetGroupVisibilityRequest$Outbound; -} - export function getGroupVisibilityRequestToJSON( getGroupVisibilityRequest: GetGroupVisibilityRequest, ): string { @@ -66,7 +52,6 @@ export function getGroupVisibilityRequestToJSON( GetGroupVisibilityRequest$outboundSchema.parse(getGroupVisibilityRequest), ); } - export function getGroupVisibilityRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getidpgroupmapping.ts b/src/models/operations/getidpgroupmapping.ts new file mode 100644 index 00000000..7fdc9f59 --- /dev/null +++ b/src/models/operations/getidpgroupmapping.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetIdpGroupMappingRequest = { + /** + * The ID of the Okta app. + */ + appResourceId: string; + /** + * The ID of the group. + */ + groupId: string; +}; + +/** @internal */ +export const GetIdpGroupMappingRequest$inboundSchema: z.ZodType< + GetIdpGroupMappingRequest, + z.ZodTypeDef, + unknown +> = z.object({ + app_resource_id: z.string(), + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "app_resource_id": "appResourceId", + "group_id": "groupId", + }); +}); +/** @internal */ +export type GetIdpGroupMappingRequest$Outbound = { + app_resource_id: string; + group_id: string; +}; + +/** @internal */ +export const GetIdpGroupMappingRequest$outboundSchema: z.ZodType< + GetIdpGroupMappingRequest$Outbound, + z.ZodTypeDef, + GetIdpGroupMappingRequest +> = z.object({ + appResourceId: z.string(), + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + appResourceId: "app_resource_id", + groupId: "group_id", + }); +}); + +export function getIdpGroupMappingRequestToJSON( + getIdpGroupMappingRequest: GetIdpGroupMappingRequest, +): string { + return JSON.stringify( + GetIdpGroupMappingRequest$outboundSchema.parse(getIdpGroupMappingRequest), + ); +} +export function getIdpGroupMappingRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetIdpGroupMappingRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetIdpGroupMappingRequest' from JSON`, + ); +} diff --git a/src/models/operations/getidpgroupmappings.ts b/src/models/operations/getidpgroupmappings.ts index 77b51e67..d05d3a96 100644 --- a/src/models/operations/getidpgroupmappings.ts +++ b/src/models/operations/getidpgroupmappings.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetIdpGroupMappingsRequest$inboundSchema: z.ZodType< "app_resource_id": "appResourceId", }); }); - /** @internal */ export type GetIdpGroupMappingsRequest$Outbound = { app_resource_id: string; @@ -46,19 +45,6 @@ export const GetIdpGroupMappingsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetIdpGroupMappingsRequest$ { - /** @deprecated use `GetIdpGroupMappingsRequest$inboundSchema` instead. */ - export const inboundSchema = GetIdpGroupMappingsRequest$inboundSchema; - /** @deprecated use `GetIdpGroupMappingsRequest$outboundSchema` instead. */ - export const outboundSchema = GetIdpGroupMappingsRequest$outboundSchema; - /** @deprecated use `GetIdpGroupMappingsRequest$Outbound` instead. */ - export type Outbound = GetIdpGroupMappingsRequest$Outbound; -} - export function getIdpGroupMappingsRequestToJSON( getIdpGroupMappingsRequest: GetIdpGroupMappingsRequest, ): string { @@ -66,7 +52,6 @@ export function getIdpGroupMappingsRequestToJSON( GetIdpGroupMappingsRequest$outboundSchema.parse(getIdpGroupMappingsRequest), ); } - export function getIdpGroupMappingsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getmessagechannel.ts b/src/models/operations/getmessagechannel.ts index 249a015c..01489529 100644 --- a/src/models/operations/getmessagechannel.ts +++ b/src/models/operations/getmessagechannel.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetMessageChannelRequest$inboundSchema: z.ZodType< "message_channel_id": "messageChannelId", }); }); - /** @internal */ export type GetMessageChannelRequest$Outbound = { message_channel_id: string; @@ -46,19 +45,6 @@ export const GetMessageChannelRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetMessageChannelRequest$ { - /** @deprecated use `GetMessageChannelRequest$inboundSchema` instead. */ - export const inboundSchema = GetMessageChannelRequest$inboundSchema; - /** @deprecated use `GetMessageChannelRequest$outboundSchema` instead. */ - export const outboundSchema = GetMessageChannelRequest$outboundSchema; - /** @deprecated use `GetMessageChannelRequest$Outbound` instead. */ - export type Outbound = GetMessageChannelRequest$Outbound; -} - export function getMessageChannelRequestToJSON( getMessageChannelRequest: GetMessageChannelRequest, ): string { @@ -66,7 +52,6 @@ export function getMessageChannelRequestToJSON( GetMessageChannelRequest$outboundSchema.parse(getMessageChannelRequest), ); } - export function getMessageChannelRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getnhis.ts b/src/models/operations/getnhis.ts index 1e6676ab..965b69be 100644 --- a/src/models/operations/getnhis.ts +++ b/src/models/operations/getnhis.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -37,7 +37,6 @@ export const GetNhisRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type GetNhisRequest$Outbound = { cursor?: string | undefined; @@ -58,23 +57,9 @@ export const GetNhisRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetNhisRequest$ { - /** @deprecated use `GetNhisRequest$inboundSchema` instead. */ - export const inboundSchema = GetNhisRequest$inboundSchema; - /** @deprecated use `GetNhisRequest$outboundSchema` instead. */ - export const outboundSchema = GetNhisRequest$outboundSchema; - /** @deprecated use `GetNhisRequest$Outbound` instead. */ - export type Outbound = GetNhisRequest$Outbound; -} - export function getNhisRequestToJSON(getNhisRequest: GetNhisRequest): string { return JSON.stringify(GetNhisRequest$outboundSchema.parse(getNhisRequest)); } - export function getNhisRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -97,7 +82,6 @@ export const GetNhisResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetNhisResponse$Outbound = { Result: components.PaginatedResourcesList$Outbound; @@ -116,25 +100,11 @@ export const GetNhisResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetNhisResponse$ { - /** @deprecated use `GetNhisResponse$inboundSchema` instead. */ - export const inboundSchema = GetNhisResponse$inboundSchema; - /** @deprecated use `GetNhisResponse$outboundSchema` instead. */ - export const outboundSchema = GetNhisResponse$outboundSchema; - /** @deprecated use `GetNhisResponse$Outbound` instead. */ - export type Outbound = GetNhisResponse$Outbound; -} - export function getNhisResponseToJSON( getNhisResponse: GetNhisResponse, ): string { return JSON.stringify(GetNhisResponse$outboundSchema.parse(getNhisResponse)); } - export function getNhisResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getoncallschedule.ts b/src/models/operations/getoncallschedule.ts index 8034a102..fa45a7a0 100644 --- a/src/models/operations/getoncallschedule.ts +++ b/src/models/operations/getoncallschedule.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetOnCallScheduleRequest$inboundSchema: z.ZodType< "on_call_schedule_id": "onCallScheduleId", }); }); - /** @internal */ export type GetOnCallScheduleRequest$Outbound = { on_call_schedule_id: string; @@ -46,19 +45,6 @@ export const GetOnCallScheduleRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetOnCallScheduleRequest$ { - /** @deprecated use `GetOnCallScheduleRequest$inboundSchema` instead. */ - export const inboundSchema = GetOnCallScheduleRequest$inboundSchema; - /** @deprecated use `GetOnCallScheduleRequest$outboundSchema` instead. */ - export const outboundSchema = GetOnCallScheduleRequest$outboundSchema; - /** @deprecated use `GetOnCallScheduleRequest$Outbound` instead. */ - export type Outbound = GetOnCallScheduleRequest$Outbound; -} - export function getOnCallScheduleRequestToJSON( getOnCallScheduleRequest: GetOnCallScheduleRequest, ): string { @@ -66,7 +52,6 @@ export function getOnCallScheduleRequestToJSON( GetOnCallScheduleRequest$outboundSchema.parse(getOnCallScheduleRequest), ); } - export function getOnCallScheduleRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getowner.ts b/src/models/operations/getowner.ts index 82bde7bf..44d3a299 100644 --- a/src/models/operations/getowner.ts +++ b/src/models/operations/getowner.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetOwnerRequest$inboundSchema: z.ZodType< "owner_id": "ownerId", }); }); - /** @internal */ export type GetOwnerRequest$Outbound = { owner_id: string; @@ -46,25 +45,11 @@ export const GetOwnerRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetOwnerRequest$ { - /** @deprecated use `GetOwnerRequest$inboundSchema` instead. */ - export const inboundSchema = GetOwnerRequest$inboundSchema; - /** @deprecated use `GetOwnerRequest$outboundSchema` instead. */ - export const outboundSchema = GetOwnerRequest$outboundSchema; - /** @deprecated use `GetOwnerRequest$Outbound` instead. */ - export type Outbound = GetOwnerRequest$Outbound; -} - export function getOwnerRequestToJSON( getOwnerRequest: GetOwnerRequest, ): string { return JSON.stringify(GetOwnerRequest$outboundSchema.parse(getOwnerRequest)); } - export function getOwnerRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getownerfromname.ts b/src/models/operations/getownerfromname.ts index 3b1e1a45..46a46e3b 100644 --- a/src/models/operations/getownerfromname.ts +++ b/src/models/operations/getownerfromname.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetOwnerFromNameRequest$inboundSchema: z.ZodType< "owner_name": "ownerName", }); }); - /** @internal */ export type GetOwnerFromNameRequest$Outbound = { owner_name: string; @@ -46,19 +45,6 @@ export const GetOwnerFromNameRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetOwnerFromNameRequest$ { - /** @deprecated use `GetOwnerFromNameRequest$inboundSchema` instead. */ - export const inboundSchema = GetOwnerFromNameRequest$inboundSchema; - /** @deprecated use `GetOwnerFromNameRequest$outboundSchema` instead. */ - export const outboundSchema = GetOwnerFromNameRequest$outboundSchema; - /** @deprecated use `GetOwnerFromNameRequest$Outbound` instead. */ - export type Outbound = GetOwnerFromNameRequest$Outbound; -} - export function getOwnerFromNameRequestToJSON( getOwnerFromNameRequest: GetOwnerFromNameRequest, ): string { @@ -66,7 +52,6 @@ export function getOwnerFromNameRequestToJSON( GetOwnerFromNameRequest$outboundSchema.parse(getOwnerFromNameRequest), ); } - export function getOwnerFromNameRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getowners.ts b/src/models/operations/getowners.ts index 52efa7d3..11368aeb 100644 --- a/src/models/operations/getowners.ts +++ b/src/models/operations/getowners.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -42,7 +42,6 @@ export const GetOwnersRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type GetOwnersRequest$Outbound = { cursor?: string | undefined; @@ -65,19 +64,6 @@ export const GetOwnersRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetOwnersRequest$ { - /** @deprecated use `GetOwnersRequest$inboundSchema` instead. */ - export const inboundSchema = GetOwnersRequest$inboundSchema; - /** @deprecated use `GetOwnersRequest$outboundSchema` instead. */ - export const outboundSchema = GetOwnersRequest$outboundSchema; - /** @deprecated use `GetOwnersRequest$Outbound` instead. */ - export type Outbound = GetOwnersRequest$Outbound; -} - export function getOwnersRequestToJSON( getOwnersRequest: GetOwnersRequest, ): string { @@ -85,7 +71,6 @@ export function getOwnersRequestToJSON( GetOwnersRequest$outboundSchema.parse(getOwnersRequest), ); } - export function getOwnersRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -108,7 +93,6 @@ export const GetOwnersResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetOwnersResponse$Outbound = { Result: components.PaginatedOwnersList$Outbound; @@ -127,19 +111,6 @@ export const GetOwnersResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetOwnersResponse$ { - /** @deprecated use `GetOwnersResponse$inboundSchema` instead. */ - export const inboundSchema = GetOwnersResponse$inboundSchema; - /** @deprecated use `GetOwnersResponse$outboundSchema` instead. */ - export const outboundSchema = GetOwnersResponse$outboundSchema; - /** @deprecated use `GetOwnersResponse$Outbound` instead. */ - export type Outbound = GetOwnersResponse$Outbound; -} - export function getOwnersResponseToJSON( getOwnersResponse: GetOwnersResponse, ): string { @@ -147,7 +118,6 @@ export function getOwnersResponseToJSON( GetOwnersResponse$outboundSchema.parse(getOwnersResponse), ); } - export function getOwnersResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getownerusers.ts b/src/models/operations/getownerusers.ts index d681e4ea..4d3140df 100644 --- a/src/models/operations/getownerusers.ts +++ b/src/models/operations/getownerusers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetOwnerUsersRequest$inboundSchema: z.ZodType< "owner_id": "ownerId", }); }); - /** @internal */ export type GetOwnerUsersRequest$Outbound = { owner_id: string; @@ -46,19 +45,6 @@ export const GetOwnerUsersRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetOwnerUsersRequest$ { - /** @deprecated use `GetOwnerUsersRequest$inboundSchema` instead. */ - export const inboundSchema = GetOwnerUsersRequest$inboundSchema; - /** @deprecated use `GetOwnerUsersRequest$outboundSchema` instead. */ - export const outboundSchema = GetOwnerUsersRequest$outboundSchema; - /** @deprecated use `GetOwnerUsersRequest$Outbound` instead. */ - export type Outbound = GetOwnerUsersRequest$Outbound; -} - export function getOwnerUsersRequestToJSON( getOwnerUsersRequest: GetOwnerUsersRequest, ): string { @@ -66,7 +52,6 @@ export function getOwnerUsersRequestToJSON( GetOwnerUsersRequest$outboundSchema.parse(getOwnerUsersRequest), ); } - export function getOwnerUsersRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getpaladin.ts b/src/models/operations/getpaladin.ts new file mode 100644 index 00000000..51112c8f --- /dev/null +++ b/src/models/operations/getpaladin.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetPaladinRequest = { + /** + * The ID of the Paladin. + */ + paladinId: string; +}; + +/** @internal */ +export const GetPaladinRequest$inboundSchema: z.ZodType< + GetPaladinRequest, + z.ZodTypeDef, + unknown +> = z.object({ + paladin_id: z.string(), +}).transform((v) => { + return remap$(v, { + "paladin_id": "paladinId", + }); +}); +/** @internal */ +export type GetPaladinRequest$Outbound = { + paladin_id: string; +}; + +/** @internal */ +export const GetPaladinRequest$outboundSchema: z.ZodType< + GetPaladinRequest$Outbound, + z.ZodTypeDef, + GetPaladinRequest +> = z.object({ + paladinId: z.string(), +}).transform((v) => { + return remap$(v, { + paladinId: "paladin_id", + }); +}); + +export function getPaladinRequestToJSON( + getPaladinRequest: GetPaladinRequest, +): string { + return JSON.stringify( + GetPaladinRequest$outboundSchema.parse(getPaladinRequest), + ); +} +export function getPaladinRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetPaladinRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetPaladinRequest' from JSON`, + ); +} diff --git a/src/models/operations/getpaladinfromname.ts b/src/models/operations/getpaladinfromname.ts new file mode 100644 index 00000000..ddb84c8c --- /dev/null +++ b/src/models/operations/getpaladinfromname.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetPaladinFromNameRequest = { + /** + * The name of the Paladin. + */ + paladinName: string; +}; + +/** @internal */ +export const GetPaladinFromNameRequest$inboundSchema: z.ZodType< + GetPaladinFromNameRequest, + z.ZodTypeDef, + unknown +> = z.object({ + paladin_name: z.string(), +}).transform((v) => { + return remap$(v, { + "paladin_name": "paladinName", + }); +}); +/** @internal */ +export type GetPaladinFromNameRequest$Outbound = { + paladin_name: string; +}; + +/** @internal */ +export const GetPaladinFromNameRequest$outboundSchema: z.ZodType< + GetPaladinFromNameRequest$Outbound, + z.ZodTypeDef, + GetPaladinFromNameRequest +> = z.object({ + paladinName: z.string(), +}).transform((v) => { + return remap$(v, { + paladinName: "paladin_name", + }); +}); + +export function getPaladinFromNameRequestToJSON( + getPaladinFromNameRequest: GetPaladinFromNameRequest, +): string { + return JSON.stringify( + GetPaladinFromNameRequest$outboundSchema.parse(getPaladinFromNameRequest), + ); +} +export function getPaladinFromNameRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetPaladinFromNameRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetPaladinFromNameRequest' from JSON`, + ); +} diff --git a/src/models/operations/getremoteusers.ts b/src/models/operations/getremoteusers.ts new file mode 100644 index 00000000..e41a95ca --- /dev/null +++ b/src/models/operations/getremoteusers.ts @@ -0,0 +1,100 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetRemoteUsersRequest = { + /** + * Filter remote users by their third party provider. + */ + thirdPartyProvider?: Array | undefined; + /** + * Filter remote users by their user ID. + */ + userId?: Array | undefined; + /** + * Filter remote users by their remote ID. + */ + remoteId?: Array | undefined; + /** + * The pagination cursor value. + */ + cursor?: string | undefined; + /** + * Number of results to return per page. Default is 200. + */ + pageSize?: number | undefined; +}; + +/** @internal */ +export const GetRemoteUsersRequest$inboundSchema: z.ZodType< + GetRemoteUsersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + third_party_provider: z.array(components.ThirdPartyProviderEnum$inboundSchema) + .optional(), + user_id: z.array(z.string()).optional(), + remote_id: z.array(z.string()).optional(), + cursor: z.string().optional(), + page_size: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "third_party_provider": "thirdPartyProvider", + "user_id": "userId", + "remote_id": "remoteId", + "page_size": "pageSize", + }); +}); +/** @internal */ +export type GetRemoteUsersRequest$Outbound = { + third_party_provider?: Array | undefined; + user_id?: Array | undefined; + remote_id?: Array | undefined; + cursor?: string | undefined; + page_size?: number | undefined; +}; + +/** @internal */ +export const GetRemoteUsersRequest$outboundSchema: z.ZodType< + GetRemoteUsersRequest$Outbound, + z.ZodTypeDef, + GetRemoteUsersRequest +> = z.object({ + thirdPartyProvider: z.array(components.ThirdPartyProviderEnum$outboundSchema) + .optional(), + userId: z.array(z.string()).optional(), + remoteId: z.array(z.string()).optional(), + cursor: z.string().optional(), + pageSize: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + thirdPartyProvider: "third_party_provider", + userId: "user_id", + remoteId: "remote_id", + pageSize: "page_size", + }); +}); + +export function getRemoteUsersRequestToJSON( + getRemoteUsersRequest: GetRemoteUsersRequest, +): string { + return JSON.stringify( + GetRemoteUsersRequest$outboundSchema.parse(getRemoteUsersRequest), + ); +} +export function getRemoteUsersRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetRemoteUsersRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetRemoteUsersRequest' from JSON`, + ); +} diff --git a/src/models/operations/getrequest.ts b/src/models/operations/getrequest.ts index 6fbde21b..35dab44b 100644 --- a/src/models/operations/getrequest.ts +++ b/src/models/operations/getrequest.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetRequestRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type GetRequestRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const GetRequestRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRequestRequest$ { - /** @deprecated use `GetRequestRequest$inboundSchema` instead. */ - export const inboundSchema = GetRequestRequest$inboundSchema; - /** @deprecated use `GetRequestRequest$outboundSchema` instead. */ - export const outboundSchema = GetRequestRequest$outboundSchema; - /** @deprecated use `GetRequestRequest$Outbound` instead. */ - export type Outbound = GetRequestRequest$Outbound; -} - export function getRequestRequestToJSON( getRequestRequest: GetRequestRequest, ): string { @@ -57,7 +43,6 @@ export function getRequestRequestToJSON( GetRequestRequest$outboundSchema.parse(getRequestRequest), ); } - export function getRequestRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getrequestcomments.ts b/src/models/operations/getrequestcomments.ts new file mode 100644 index 00000000..ddc8af1c --- /dev/null +++ b/src/models/operations/getrequestcomments.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetRequestCommentsRequest = { + /** + * The ID of the request to get comments for + */ + id: string; +}; + +/** @internal */ +export const GetRequestCommentsRequest$inboundSchema: z.ZodType< + GetRequestCommentsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); +/** @internal */ +export type GetRequestCommentsRequest$Outbound = { + id: string; +}; + +/** @internal */ +export const GetRequestCommentsRequest$outboundSchema: z.ZodType< + GetRequestCommentsRequest$Outbound, + z.ZodTypeDef, + GetRequestCommentsRequest +> = z.object({ + id: z.string(), +}); + +export function getRequestCommentsRequestToJSON( + getRequestCommentsRequest: GetRequestCommentsRequest, +): string { + return JSON.stringify( + GetRequestCommentsRequest$outboundSchema.parse(getRequestCommentsRequest), + ); +} +export function getRequestCommentsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetRequestCommentsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetRequestCommentsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getrequests.ts b/src/models/operations/getrequests.ts index faa67fbd..6e975e20 100644 --- a/src/models/operations/getrequests.ts +++ b/src/models/operations/getrequests.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -18,6 +18,22 @@ export type GetRequestsRequest = { * An end date filter for the events. */ endDateFilter?: string | undefined; + /** + * Filter requests by their requester ID. + */ + requesterId?: string | undefined; + /** + * Filter requests by their target user ID. + */ + targetUserId?: string | undefined; + /** + * Filter requests by the resource ID that was requested. + */ + resourceId?: string | undefined; + /** + * Filter requests by the group ID that was requested. + */ + groupId?: string | undefined; /** * The pagination cursor value. */ @@ -44,6 +60,10 @@ export const GetRequestsRequest$inboundSchema: z.ZodType< > = z.object({ start_date_filter: z.string().optional(), end_date_filter: z.string().optional(), + requester_id: z.string().optional(), + target_user_id: z.string().optional(), + resource_id: z.string().optional(), + group_id: z.string().optional(), cursor: z.string().optional(), page_size: z.number().int().optional(), show_pending_only: z.boolean().optional(), @@ -51,15 +71,22 @@ export const GetRequestsRequest$inboundSchema: z.ZodType< return remap$(v, { "start_date_filter": "startDateFilter", "end_date_filter": "endDateFilter", + "requester_id": "requesterId", + "target_user_id": "targetUserId", + "resource_id": "resourceId", + "group_id": "groupId", "page_size": "pageSize", "show_pending_only": "showPendingOnly", }); }); - /** @internal */ export type GetRequestsRequest$Outbound = { start_date_filter?: string | undefined; end_date_filter?: string | undefined; + requester_id?: string | undefined; + target_user_id?: string | undefined; + resource_id?: string | undefined; + group_id?: string | undefined; cursor?: string | undefined; page_size?: number | undefined; show_pending_only?: boolean | undefined; @@ -73,6 +100,10 @@ export const GetRequestsRequest$outboundSchema: z.ZodType< > = z.object({ startDateFilter: z.string().optional(), endDateFilter: z.string().optional(), + requesterId: z.string().optional(), + targetUserId: z.string().optional(), + resourceId: z.string().optional(), + groupId: z.string().optional(), cursor: z.string().optional(), pageSize: z.number().int().optional(), showPendingOnly: z.boolean().optional(), @@ -80,24 +111,15 @@ export const GetRequestsRequest$outboundSchema: z.ZodType< return remap$(v, { startDateFilter: "start_date_filter", endDateFilter: "end_date_filter", + requesterId: "requester_id", + targetUserId: "target_user_id", + resourceId: "resource_id", + groupId: "group_id", pageSize: "page_size", showPendingOnly: "show_pending_only", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRequestsRequest$ { - /** @deprecated use `GetRequestsRequest$inboundSchema` instead. */ - export const inboundSchema = GetRequestsRequest$inboundSchema; - /** @deprecated use `GetRequestsRequest$outboundSchema` instead. */ - export const outboundSchema = GetRequestsRequest$outboundSchema; - /** @deprecated use `GetRequestsRequest$Outbound` instead. */ - export type Outbound = GetRequestsRequest$Outbound; -} - export function getRequestsRequestToJSON( getRequestsRequest: GetRequestsRequest, ): string { @@ -105,7 +127,6 @@ export function getRequestsRequestToJSON( GetRequestsRequest$outboundSchema.parse(getRequestsRequest), ); } - export function getRequestsRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -128,7 +149,6 @@ export const GetRequestsResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetRequestsResponse$Outbound = { Result: components.RequestList$Outbound; @@ -147,19 +167,6 @@ export const GetRequestsResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRequestsResponse$ { - /** @deprecated use `GetRequestsResponse$inboundSchema` instead. */ - export const inboundSchema = GetRequestsResponse$inboundSchema; - /** @deprecated use `GetRequestsResponse$outboundSchema` instead. */ - export const outboundSchema = GetRequestsResponse$outboundSchema; - /** @deprecated use `GetRequestsResponse$Outbound` instead. */ - export type Outbound = GetRequestsResponse$Outbound; -} - export function getRequestsResponseToJSON( getRequestsResponse: GetRequestsResponse, ): string { @@ -167,7 +174,6 @@ export function getRequestsResponseToJSON( GetRequestsResponse$outboundSchema.parse(getRequestsResponse), ); } - export function getRequestsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getrequestsrelay.ts b/src/models/operations/getrequestsrelay.ts index 3e074778..d5c83aa0 100644 --- a/src/models/operations/getrequestsrelay.ts +++ b/src/models/operations/getrequestsrelay.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; @@ -53,7 +53,6 @@ export const GetRequestsRelayRequest$inboundSchema: z.ZodType< to: z.string().optional(), from: z.string().optional(), }); - /** @internal */ export type GetRequestsRelayRequest$Outbound = { first?: number | undefined; @@ -80,19 +79,6 @@ export const GetRequestsRelayRequest$outboundSchema: z.ZodType< from: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRequestsRelayRequest$ { - /** @deprecated use `GetRequestsRelayRequest$inboundSchema` instead. */ - export const inboundSchema = GetRequestsRelayRequest$inboundSchema; - /** @deprecated use `GetRequestsRelayRequest$outboundSchema` instead. */ - export const outboundSchema = GetRequestsRelayRequest$outboundSchema; - /** @deprecated use `GetRequestsRelayRequest$Outbound` instead. */ - export type Outbound = GetRequestsRelayRequest$Outbound; -} - export function getRequestsRelayRequestToJSON( getRequestsRelayRequest: GetRequestsRelayRequest, ): string { @@ -100,7 +86,6 @@ export function getRequestsRelayRequestToJSON( GetRequestsRelayRequest$outboundSchema.parse(getRequestsRelayRequest), ); } - export function getRequestsRelayRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresource.ts b/src/models/operations/getresource.ts index 681cfd30..54ca9350 100644 --- a/src/models/operations/getresource.ts +++ b/src/models/operations/getresource.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetResourceRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceRequest$Outbound = { resource_id: string; @@ -46,19 +45,6 @@ export const GetResourceRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceRequest$ { - /** @deprecated use `GetResourceRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceRequest$inboundSchema; - /** @deprecated use `GetResourceRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourceRequest$outboundSchema; - /** @deprecated use `GetResourceRequest$Outbound` instead. */ - export type Outbound = GetResourceRequest$Outbound; -} - export function getResourceRequestToJSON( getResourceRequest: GetResourceRequest, ): string { @@ -66,7 +52,6 @@ export function getResourceRequestToJSON( GetResourceRequest$outboundSchema.parse(getResourceRequest), ); } - export function getResourceRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresourcegroups.ts b/src/models/operations/getresourcegroups.ts new file mode 100644 index 00000000..6e972c68 --- /dev/null +++ b/src/models/operations/getresourcegroups.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetResourceGroupsRequest = { + /** + * The ID of the resource that the groups grant access to. + */ + resourceId: string; +}; + +/** @internal */ +export const GetResourceGroupsRequest$inboundSchema: z.ZodType< + GetResourceGroupsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + resource_id: z.string(), +}).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + }); +}); +/** @internal */ +export type GetResourceGroupsRequest$Outbound = { + resource_id: string; +}; + +/** @internal */ +export const GetResourceGroupsRequest$outboundSchema: z.ZodType< + GetResourceGroupsRequest$Outbound, + z.ZodTypeDef, + GetResourceGroupsRequest +> = z.object({ + resourceId: z.string(), +}).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + }); +}); + +export function getResourceGroupsRequestToJSON( + getResourceGroupsRequest: GetResourceGroupsRequest, +): string { + return JSON.stringify( + GetResourceGroupsRequest$outboundSchema.parse(getResourceGroupsRequest), + ); +} +export function getResourceGroupsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetResourceGroupsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetResourceGroupsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getresourcemessagechannels.ts b/src/models/operations/getresourcemessagechannels.ts index 9a913fd2..a3b32c9a 100644 --- a/src/models/operations/getresourcemessagechannels.ts +++ b/src/models/operations/getresourcemessagechannels.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetResourceMessageChannelsRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceMessageChannelsRequest$Outbound = { resource_id: string; @@ -46,20 +45,6 @@ export const GetResourceMessageChannelsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceMessageChannelsRequest$ { - /** @deprecated use `GetResourceMessageChannelsRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceMessageChannelsRequest$inboundSchema; - /** @deprecated use `GetResourceMessageChannelsRequest$outboundSchema` instead. */ - export const outboundSchema = - GetResourceMessageChannelsRequest$outboundSchema; - /** @deprecated use `GetResourceMessageChannelsRequest$Outbound` instead. */ - export type Outbound = GetResourceMessageChannelsRequest$Outbound; -} - export function getResourceMessageChannelsRequestToJSON( getResourceMessageChannelsRequest: GetResourceMessageChannelsRequest, ): string { @@ -69,7 +54,6 @@ export function getResourceMessageChannelsRequestToJSON( ), ); } - export function getResourceMessageChannelsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresourcenhis.ts b/src/models/operations/getresourcenhis.ts index 3ff590d0..323957ca 100644 --- a/src/models/operations/getresourcenhis.ts +++ b/src/models/operations/getresourcenhis.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -32,7 +32,6 @@ export const GetResourceNhisRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceNhisRequest$Outbound = { resource_id: string; @@ -53,19 +52,6 @@ export const GetResourceNhisRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceNhisRequest$ { - /** @deprecated use `GetResourceNhisRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceNhisRequest$inboundSchema; - /** @deprecated use `GetResourceNhisRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourceNhisRequest$outboundSchema; - /** @deprecated use `GetResourceNhisRequest$Outbound` instead. */ - export type Outbound = GetResourceNhisRequest$Outbound; -} - export function getResourceNhisRequestToJSON( getResourceNhisRequest: GetResourceNhisRequest, ): string { @@ -73,7 +59,6 @@ export function getResourceNhisRequestToJSON( GetResourceNhisRequest$outboundSchema.parse(getResourceNhisRequest), ); } - export function getResourceNhisRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresourcereviewers.ts b/src/models/operations/getresourcereviewers.ts index 990a39a3..494ec492 100644 --- a/src/models/operations/getresourcereviewers.ts +++ b/src/models/operations/getresourcereviewers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetResourceReviewersRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceReviewersRequest$Outbound = { resource_id: string; @@ -46,19 +45,6 @@ export const GetResourceReviewersRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceReviewersRequest$ { - /** @deprecated use `GetResourceReviewersRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceReviewersRequest$inboundSchema; - /** @deprecated use `GetResourceReviewersRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourceReviewersRequest$outboundSchema; - /** @deprecated use `GetResourceReviewersRequest$Outbound` instead. */ - export type Outbound = GetResourceReviewersRequest$Outbound; -} - export function getResourceReviewersRequestToJSON( getResourceReviewersRequest: GetResourceReviewersRequest, ): string { @@ -68,7 +54,6 @@ export function getResourceReviewersRequestToJSON( ), ); } - export function getResourceReviewersRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresourcereviewerstages.ts b/src/models/operations/getresourcereviewerstages.ts index bd91c59e..fab7c326 100644 --- a/src/models/operations/getresourcereviewerstages.ts +++ b/src/models/operations/getresourcereviewerstages.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetResourceReviewerStagesRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceReviewerStagesRequest$Outbound = { resource_id: string; @@ -46,19 +45,6 @@ export const GetResourceReviewerStagesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceReviewerStagesRequest$ { - /** @deprecated use `GetResourceReviewerStagesRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceReviewerStagesRequest$inboundSchema; - /** @deprecated use `GetResourceReviewerStagesRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourceReviewerStagesRequest$outboundSchema; - /** @deprecated use `GetResourceReviewerStagesRequest$Outbound` instead. */ - export type Outbound = GetResourceReviewerStagesRequest$Outbound; -} - export function getResourceReviewerStagesRequestToJSON( getResourceReviewerStagesRequest: GetResourceReviewerStagesRequest, ): string { @@ -68,7 +54,6 @@ export function getResourceReviewerStagesRequestToJSON( ), ); } - export function getResourceReviewerStagesRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresources.ts b/src/models/operations/getresources.ts index 0bb164b7..cea13d6d 100644 --- a/src/models/operations/getresources.ts +++ b/src/models/operations/getresources.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -19,7 +19,7 @@ export type GetResourcesRequest = { */ pageSize?: number | undefined; /** - * The resource type to filter by. + * The resource type to filter by. Required when remote_id is provided. */ resourceTypeFilter?: components.ResourceTypeEnum | undefined; /** @@ -38,6 +38,14 @@ export type GetResourcesRequest = { * The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource. */ ancestorResourceId?: string | undefined; + /** + * Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided. + */ + remoteId?: string | undefined; + /** + * The IDs of the tags to filter by. Returns only resources that have any of these tags applied. + */ + tagIds?: Array | undefined; }; export type GetResourcesResponse = { @@ -57,6 +65,8 @@ export const GetResourcesRequest$inboundSchema: z.ZodType< resource_name: z.string().optional(), parent_resource_id: z.string().optional(), ancestor_resource_id: z.string().optional(), + remote_id: z.string().optional(), + tag_ids: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { "page_size": "pageSize", @@ -65,9 +75,10 @@ export const GetResourcesRequest$inboundSchema: z.ZodType< "resource_name": "resourceName", "parent_resource_id": "parentResourceId", "ancestor_resource_id": "ancestorResourceId", + "remote_id": "remoteId", + "tag_ids": "tagIds", }); }); - /** @internal */ export type GetResourcesRequest$Outbound = { cursor?: string | undefined; @@ -77,6 +88,8 @@ export type GetResourcesRequest$Outbound = { resource_name?: string | undefined; parent_resource_id?: string | undefined; ancestor_resource_id?: string | undefined; + remote_id?: string | undefined; + tag_ids?: Array | undefined; }; /** @internal */ @@ -92,6 +105,8 @@ export const GetResourcesRequest$outboundSchema: z.ZodType< resourceName: z.string().optional(), parentResourceId: z.string().optional(), ancestorResourceId: z.string().optional(), + remoteId: z.string().optional(), + tagIds: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { pageSize: "page_size", @@ -100,22 +115,11 @@ export const GetResourcesRequest$outboundSchema: z.ZodType< resourceName: "resource_name", parentResourceId: "parent_resource_id", ancestorResourceId: "ancestor_resource_id", + remoteId: "remote_id", + tagIds: "tag_ids", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourcesRequest$ { - /** @deprecated use `GetResourcesRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourcesRequest$inboundSchema; - /** @deprecated use `GetResourcesRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourcesRequest$outboundSchema; - /** @deprecated use `GetResourcesRequest$Outbound` instead. */ - export type Outbound = GetResourcesRequest$Outbound; -} - export function getResourcesRequestToJSON( getResourcesRequest: GetResourcesRequest, ): string { @@ -123,7 +127,6 @@ export function getResourcesRequestToJSON( GetResourcesRequest$outboundSchema.parse(getResourcesRequest), ); } - export function getResourcesRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -146,7 +149,6 @@ export const GetResourcesResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetResourcesResponse$Outbound = { Result: components.PaginatedResourcesList$Outbound; @@ -165,19 +167,6 @@ export const GetResourcesResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourcesResponse$ { - /** @deprecated use `GetResourcesResponse$inboundSchema` instead. */ - export const inboundSchema = GetResourcesResponse$inboundSchema; - /** @deprecated use `GetResourcesResponse$outboundSchema` instead. */ - export const outboundSchema = GetResourcesResponse$outboundSchema; - /** @deprecated use `GetResourcesResponse$Outbound` instead. */ - export type Outbound = GetResourcesResponse$Outbound; -} - export function getResourcesResponseToJSON( getResourcesResponse: GetResourcesResponse, ): string { @@ -185,7 +174,6 @@ export function getResourcesResponseToJSON( GetResourcesResponse$outboundSchema.parse(getResourcesResponse), ); } - export function getResourcesResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresourcescopedrolepermissions.ts b/src/models/operations/getresourcescopedrolepermissions.ts index 13a1e6c2..fc1b4dfc 100644 --- a/src/models/operations/getresourcescopedrolepermissions.ts +++ b/src/models/operations/getresourcescopedrolepermissions.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetResourceScopedRolePermissionsRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceScopedRolePermissionsRequest$Outbound = { resource_id: string; @@ -46,21 +45,6 @@ export const GetResourceScopedRolePermissionsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceScopedRolePermissionsRequest$ { - /** @deprecated use `GetResourceScopedRolePermissionsRequest$inboundSchema` instead. */ - export const inboundSchema = - GetResourceScopedRolePermissionsRequest$inboundSchema; - /** @deprecated use `GetResourceScopedRolePermissionsRequest$outboundSchema` instead. */ - export const outboundSchema = - GetResourceScopedRolePermissionsRequest$outboundSchema; - /** @deprecated use `GetResourceScopedRolePermissionsRequest$Outbound` instead. */ - export type Outbound = GetResourceScopedRolePermissionsRequest$Outbound; -} - export function getResourceScopedRolePermissionsRequestToJSON( getResourceScopedRolePermissionsRequest: GetResourceScopedRolePermissionsRequest, @@ -71,7 +55,6 @@ export function getResourceScopedRolePermissionsRequestToJSON( ), ); } - export function getResourceScopedRolePermissionsRequestFromJSON( jsonString: string, ): SafeParseResult< diff --git a/src/models/operations/getresourcetags.ts b/src/models/operations/getresourcetags.ts index bd3e1a9f..76629346 100644 --- a/src/models/operations/getresourcetags.ts +++ b/src/models/operations/getresourcetags.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetResourceTagsRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceTagsRequest$Outbound = { resource_id: string; @@ -46,19 +45,6 @@ export const GetResourceTagsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceTagsRequest$ { - /** @deprecated use `GetResourceTagsRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceTagsRequest$inboundSchema; - /** @deprecated use `GetResourceTagsRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourceTagsRequest$outboundSchema; - /** @deprecated use `GetResourceTagsRequest$Outbound` instead. */ - export type Outbound = GetResourceTagsRequest$Outbound; -} - export function getResourceTagsRequestToJSON( getResourceTagsRequest: GetResourceTagsRequest, ): string { @@ -66,7 +52,6 @@ export function getResourceTagsRequestToJSON( GetResourceTagsRequest$outboundSchema.parse(getResourceTagsRequest), ); } - export function getResourceTagsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresourceuser.ts b/src/models/operations/getresourceuser.ts index 271fc439..9c096bfa 100644 --- a/src/models/operations/getresourceuser.ts +++ b/src/models/operations/getresourceuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -54,7 +54,6 @@ export const GetResourceUserRequest$inboundSchema: z.ZodType< "user_id": "userId", }); }); - /** @internal */ export type GetResourceUserRequest$Outbound = { resource_id: string; @@ -78,19 +77,6 @@ export const GetResourceUserRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceUserRequest$ { - /** @deprecated use `GetResourceUserRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceUserRequest$inboundSchema; - /** @deprecated use `GetResourceUserRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourceUserRequest$outboundSchema; - /** @deprecated use `GetResourceUserRequest$Outbound` instead. */ - export type Outbound = GetResourceUserRequest$Outbound; -} - export function getResourceUserRequestToJSON( getResourceUserRequest: GetResourceUserRequest, ): string { @@ -98,7 +84,6 @@ export function getResourceUserRequestToJSON( GetResourceUserRequest$outboundSchema.parse(getResourceUserRequest), ); } - export function getResourceUserRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -123,7 +108,6 @@ export const GetResourceUserResponse$inboundSchema: z.ZodType< "total_count": "totalCount", }); }); - /** @internal */ export type GetResourceUserResponse$Outbound = { data: Array; @@ -146,19 +130,6 @@ export const GetResourceUserResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceUserResponse$ { - /** @deprecated use `GetResourceUserResponse$inboundSchema` instead. */ - export const inboundSchema = GetResourceUserResponse$inboundSchema; - /** @deprecated use `GetResourceUserResponse$outboundSchema` instead. */ - export const outboundSchema = GetResourceUserResponse$outboundSchema; - /** @deprecated use `GetResourceUserResponse$Outbound` instead. */ - export type Outbound = GetResourceUserResponse$Outbound; -} - export function getResourceUserResponseToJSON( getResourceUserResponse: GetResourceUserResponse, ): string { @@ -166,7 +137,6 @@ export function getResourceUserResponseToJSON( GetResourceUserResponse$outboundSchema.parse(getResourceUserResponse), ); } - export function getResourceUserResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresourceusers.ts b/src/models/operations/getresourceusers.ts index 4b76778e..6464af21 100644 --- a/src/models/operations/getresourceusers.ts +++ b/src/models/operations/getresourceusers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -32,7 +32,6 @@ export const GetResourceUsersRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceUsersRequest$Outbound = { resource_id: string; @@ -53,19 +52,6 @@ export const GetResourceUsersRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceUsersRequest$ { - /** @deprecated use `GetResourceUsersRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceUsersRequest$inboundSchema; - /** @deprecated use `GetResourceUsersRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourceUsersRequest$outboundSchema; - /** @deprecated use `GetResourceUsersRequest$Outbound` instead. */ - export type Outbound = GetResourceUsersRequest$Outbound; -} - export function getResourceUsersRequestToJSON( getResourceUsersRequest: GetResourceUsersRequest, ): string { @@ -73,7 +59,6 @@ export function getResourceUsersRequestToJSON( GetResourceUsersRequest$outboundSchema.parse(getResourceUsersRequest), ); } - export function getResourceUsersRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getresourcevisibility.ts b/src/models/operations/getresourcevisibility.ts index 13a7370e..6b983075 100644 --- a/src/models/operations/getresourcevisibility.ts +++ b/src/models/operations/getresourcevisibility.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetResourceVisibilityRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type GetResourceVisibilityRequest$Outbound = { resource_id: string; @@ -46,19 +45,6 @@ export const GetResourceVisibilityRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetResourceVisibilityRequest$ { - /** @deprecated use `GetResourceVisibilityRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourceVisibilityRequest$inboundSchema; - /** @deprecated use `GetResourceVisibilityRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourceVisibilityRequest$outboundSchema; - /** @deprecated use `GetResourceVisibilityRequest$Outbound` instead. */ - export type Outbound = GetResourceVisibilityRequest$Outbound; -} - export function getResourceVisibilityRequestToJSON( getResourceVisibilityRequest: GetResourceVisibilityRequest, ): string { @@ -68,7 +54,6 @@ export function getResourceVisibilityRequestToJSON( ), ); } - export function getResourceVisibilityRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getsyncerrors.ts b/src/models/operations/getsyncerrors.ts index 476bc05f..d74bf47e 100644 --- a/src/models/operations/getsyncerrors.ts +++ b/src/models/operations/getsyncerrors.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -39,7 +39,6 @@ export const GetSyncErrorsRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type GetSyncErrorsRequest$Outbound = { app_id?: string | undefined; @@ -64,19 +63,6 @@ export const GetSyncErrorsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSyncErrorsRequest$ { - /** @deprecated use `GetSyncErrorsRequest$inboundSchema` instead. */ - export const inboundSchema = GetSyncErrorsRequest$inboundSchema; - /** @deprecated use `GetSyncErrorsRequest$outboundSchema` instead. */ - export const outboundSchema = GetSyncErrorsRequest$outboundSchema; - /** @deprecated use `GetSyncErrorsRequest$Outbound` instead. */ - export type Outbound = GetSyncErrorsRequest$Outbound; -} - export function getSyncErrorsRequestToJSON( getSyncErrorsRequest: GetSyncErrorsRequest, ): string { @@ -84,7 +70,6 @@ export function getSyncErrorsRequestToJSON( GetSyncErrorsRequest$outboundSchema.parse(getSyncErrorsRequest), ); } - export function getSyncErrorsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/gettag.ts b/src/models/operations/gettag.ts index fbaab15c..ffcbb92f 100644 --- a/src/models/operations/gettag.ts +++ b/src/models/operations/gettag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const GetTagRequest$inboundSchema: z.ZodType< "tag_value": "tagValue", }); }); - /** @internal */ export type GetTagRequest$Outbound = { tag_key: string; @@ -55,23 +54,9 @@ export const GetTagRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTagRequest$ { - /** @deprecated use `GetTagRequest$inboundSchema` instead. */ - export const inboundSchema = GetTagRequest$inboundSchema; - /** @deprecated use `GetTagRequest$outboundSchema` instead. */ - export const outboundSchema = GetTagRequest$outboundSchema; - /** @deprecated use `GetTagRequest$Outbound` instead. */ - export type Outbound = GetTagRequest$Outbound; -} - export function getTagRequestToJSON(getTagRequest: GetTagRequest): string { return JSON.stringify(GetTagRequest$outboundSchema.parse(getTagRequest)); } - export function getTagRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/gettagbyid.ts b/src/models/operations/gettagbyid.ts index 8480673a..913a4355 100644 --- a/src/models/operations/gettagbyid.ts +++ b/src/models/operations/gettagbyid.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetTagByIDRequest$inboundSchema: z.ZodType< "tag_id": "tagId", }); }); - /** @internal */ export type GetTagByIDRequest$Outbound = { tag_id: string; @@ -46,19 +45,6 @@ export const GetTagByIDRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTagByIDRequest$ { - /** @deprecated use `GetTagByIDRequest$inboundSchema` instead. */ - export const inboundSchema = GetTagByIDRequest$inboundSchema; - /** @deprecated use `GetTagByIDRequest$outboundSchema` instead. */ - export const outboundSchema = GetTagByIDRequest$outboundSchema; - /** @deprecated use `GetTagByIDRequest$Outbound` instead. */ - export type Outbound = GetTagByIDRequest$Outbound; -} - export function getTagByIDRequestToJSON( getTagByIDRequest: GetTagByIDRequest, ): string { @@ -66,7 +52,6 @@ export function getTagByIDRequestToJSON( GetTagByIDRequest$outboundSchema.parse(getTagByIDRequest), ); } - export function getTagByIDRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/gettags.ts b/src/models/operations/gettags.ts index 17f2e4f8..00bff021 100644 --- a/src/models/operations/gettags.ts +++ b/src/models/operations/gettags.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -37,7 +37,6 @@ export const GetTagsRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type GetTagsRequest$Outbound = { cursor?: string | undefined; @@ -58,23 +57,9 @@ export const GetTagsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTagsRequest$ { - /** @deprecated use `GetTagsRequest$inboundSchema` instead. */ - export const inboundSchema = GetTagsRequest$inboundSchema; - /** @deprecated use `GetTagsRequest$outboundSchema` instead. */ - export const outboundSchema = GetTagsRequest$outboundSchema; - /** @deprecated use `GetTagsRequest$Outbound` instead. */ - export type Outbound = GetTagsRequest$Outbound; -} - export function getTagsRequestToJSON(getTagsRequest: GetTagsRequest): string { return JSON.stringify(GetTagsRequest$outboundSchema.parse(getTagsRequest)); } - export function getTagsRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -97,7 +82,6 @@ export const GetTagsResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetTagsResponse$Outbound = { Result: components.PaginatedTagsList$Outbound; @@ -116,25 +100,11 @@ export const GetTagsResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTagsResponse$ { - /** @deprecated use `GetTagsResponse$inboundSchema` instead. */ - export const inboundSchema = GetTagsResponse$inboundSchema; - /** @deprecated use `GetTagsResponse$outboundSchema` instead. */ - export const outboundSchema = GetTagsResponse$outboundSchema; - /** @deprecated use `GetTagsResponse$Outbound` instead. */ - export type Outbound = GetTagsResponse$Outbound; -} - export function getTagsResponseToJSON( getTagsResponse: GetTagsResponse, ): string { return JSON.stringify(GetTagsResponse$outboundSchema.parse(getTagsResponse)); } - export function getTagsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/gettokens.ts b/src/models/operations/gettokens.ts new file mode 100644 index 00000000..6dc5d5fb --- /dev/null +++ b/src/models/operations/gettokens.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetTokensRequest = { + /** + * The pagination cursor value. + */ + cursor?: string | undefined; + /** + * Number of results to return per page. Default is 200. + */ + pageSize?: number | undefined; + /** + * Filter by token IDs. + */ + tokenIds?: Array | undefined; + /** + * Filter by user ID. + */ + userId?: string | undefined; +}; + +/** @internal */ +export const GetTokensRequest$inboundSchema: z.ZodType< + GetTokensRequest, + z.ZodTypeDef, + unknown +> = z.object({ + cursor: z.string().optional(), + page_size: z.number().int().optional(), + token_ids: z.array(z.string()).optional(), + user_id: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "page_size": "pageSize", + "token_ids": "tokenIds", + "user_id": "userId", + }); +}); +/** @internal */ +export type GetTokensRequest$Outbound = { + cursor?: string | undefined; + page_size?: number | undefined; + token_ids?: Array | undefined; + user_id?: string | undefined; +}; + +/** @internal */ +export const GetTokensRequest$outboundSchema: z.ZodType< + GetTokensRequest$Outbound, + z.ZodTypeDef, + GetTokensRequest +> = z.object({ + cursor: z.string().optional(), + pageSize: z.number().int().optional(), + tokenIds: z.array(z.string()).optional(), + userId: z.string().optional(), +}).transform((v) => { + return remap$(v, { + pageSize: "page_size", + tokenIds: "token_ids", + userId: "user_id", + }); +}); + +export function getTokensRequestToJSON( + getTokensRequest: GetTokensRequest, +): string { + return JSON.stringify( + GetTokensRequest$outboundSchema.parse(getTokensRequest), + ); +} +export function getTokensRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetTokensRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetTokensRequest' from JSON`, + ); +} diff --git a/src/models/operations/getuar.ts b/src/models/operations/getuar.ts index 28f213d1..a2f24086 100644 --- a/src/models/operations/getuar.ts +++ b/src/models/operations/getuar.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetUarRequest$inboundSchema: z.ZodType< "uar_id": "uarId", }); }); - /** @internal */ export type GetUarRequest$Outbound = { uar_id: string; @@ -46,23 +45,9 @@ export const GetUarRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUarRequest$ { - /** @deprecated use `GetUarRequest$inboundSchema` instead. */ - export const inboundSchema = GetUarRequest$inboundSchema; - /** @deprecated use `GetUarRequest$outboundSchema` instead. */ - export const outboundSchema = GetUarRequest$outboundSchema; - /** @deprecated use `GetUarRequest$Outbound` instead. */ - export type Outbound = GetUarRequest$Outbound; -} - export function getUarRequestToJSON(getUarRequest: GetUarRequest): string { return JSON.stringify(GetUarRequest$outboundSchema.parse(getUarRequest)); } - export function getUarRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getuars.ts b/src/models/operations/getuars.ts index 46fc9240..854e28b4 100644 --- a/src/models/operations/getuars.ts +++ b/src/models/operations/getuars.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -37,7 +37,6 @@ export const GetUARsRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type GetUARsRequest$Outbound = { cursor?: string | undefined; @@ -58,23 +57,9 @@ export const GetUARsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUARsRequest$ { - /** @deprecated use `GetUARsRequest$inboundSchema` instead. */ - export const inboundSchema = GetUARsRequest$inboundSchema; - /** @deprecated use `GetUARsRequest$outboundSchema` instead. */ - export const outboundSchema = GetUARsRequest$outboundSchema; - /** @deprecated use `GetUARsRequest$Outbound` instead. */ - export type Outbound = GetUARsRequest$Outbound; -} - export function getUARsRequestToJSON(getUARsRequest: GetUARsRequest): string { return JSON.stringify(GetUARsRequest$outboundSchema.parse(getUARsRequest)); } - export function getUARsRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -97,7 +82,6 @@ export const GetUARsResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetUARsResponse$Outbound = { Result: components.PaginatedUARsList$Outbound; @@ -116,25 +100,11 @@ export const GetUARsResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUARsResponse$ { - /** @deprecated use `GetUARsResponse$inboundSchema` instead. */ - export const inboundSchema = GetUARsResponse$inboundSchema; - /** @deprecated use `GetUARsResponse$outboundSchema` instead. */ - export const outboundSchema = GetUARsResponse$outboundSchema; - /** @deprecated use `GetUARsResponse$Outbound` instead. */ - export type Outbound = GetUARsResponse$Outbound; -} - export function getUARsResponseToJSON( getUARsResponse: GetUARsResponse, ): string { return JSON.stringify(GetUARsResponse$outboundSchema.parse(getUARsResponse)); } - export function getUARsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getusergroups.ts b/src/models/operations/getusergroups.ts new file mode 100644 index 00000000..e7381c07 --- /dev/null +++ b/src/models/operations/getusergroups.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetUserGroupsRequest = { + /** + * The ID of the user whose groups to return. + */ + userId: string; + /** + * The pagination cursor value. + */ + cursor?: string | undefined; + /** + * Number of results to return per page. Default is 200. + */ + pageSize?: number | undefined; +}; + +/** @internal */ +export const GetUserGroupsRequest$inboundSchema: z.ZodType< + GetUserGroupsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + user_id: z.string(), + cursor: z.string().optional(), + page_size: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + "page_size": "pageSize", + }); +}); +/** @internal */ +export type GetUserGroupsRequest$Outbound = { + user_id: string; + cursor?: string | undefined; + page_size?: number | undefined; +}; + +/** @internal */ +export const GetUserGroupsRequest$outboundSchema: z.ZodType< + GetUserGroupsRequest$Outbound, + z.ZodTypeDef, + GetUserGroupsRequest +> = z.object({ + userId: z.string(), + cursor: z.string().optional(), + pageSize: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + pageSize: "page_size", + }); +}); + +export function getUserGroupsRequestToJSON( + getUserGroupsRequest: GetUserGroupsRequest, +): string { + return JSON.stringify( + GetUserGroupsRequest$outboundSchema.parse(getUserGroupsRequest), + ); +} +export function getUserGroupsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetUserGroupsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetUserGroupsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getuserresources.ts b/src/models/operations/getuserresources.ts new file mode 100644 index 00000000..024be985 --- /dev/null +++ b/src/models/operations/getuserresources.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetUserResourcesRequest = { + /** + * The ID of the user. + */ + userId: string; + /** + * Limit the number of results returned. + */ + limit?: number | undefined; + /** + * The pagination cursor value. + */ + cursor?: string | undefined; + /** + * Include user's access to unmanaged resources. + */ + includeUnmanaged?: boolean | undefined; +}; + +/** @internal */ +export const GetUserResourcesRequest$inboundSchema: z.ZodType< + GetUserResourcesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + user_id: z.string(), + limit: z.number().int().optional(), + cursor: z.string().optional(), + include_unmanaged: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + "include_unmanaged": "includeUnmanaged", + }); +}); +/** @internal */ +export type GetUserResourcesRequest$Outbound = { + user_id: string; + limit?: number | undefined; + cursor?: string | undefined; + include_unmanaged?: boolean | undefined; +}; + +/** @internal */ +export const GetUserResourcesRequest$outboundSchema: z.ZodType< + GetUserResourcesRequest$Outbound, + z.ZodTypeDef, + GetUserResourcesRequest +> = z.object({ + userId: z.string(), + limit: z.number().int().optional(), + cursor: z.string().optional(), + includeUnmanaged: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + includeUnmanaged: "include_unmanaged", + }); +}); + +export function getUserResourcesRequestToJSON( + getUserResourcesRequest: GetUserResourcesRequest, +): string { + return JSON.stringify( + GetUserResourcesRequest$outboundSchema.parse(getUserResourcesRequest), + ); +} +export function getUserResourcesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetUserResourcesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetUserResourcesRequest' from JSON`, + ); +} diff --git a/src/models/operations/getusers.ts b/src/models/operations/getusers.ts index b4b658d7..0f54aba1 100644 --- a/src/models/operations/getusers.ts +++ b/src/models/operations/getusers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -18,6 +18,10 @@ export type GetUsersRequest = { * Number of results to return per page. Default is 200. */ pageSize?: number | undefined; + /** + * The IDs of the tags to filter by. Returns only users that have any of these tags applied. + */ + tagIds?: Array | undefined; }; export type GetUsersResponse = { @@ -32,16 +36,18 @@ export const GetUsersRequest$inboundSchema: z.ZodType< > = z.object({ cursor: z.string().optional(), page_size: z.number().int().optional(), + tag_ids: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { "page_size": "pageSize", + "tag_ids": "tagIds", }); }); - /** @internal */ export type GetUsersRequest$Outbound = { cursor?: string | undefined; page_size?: number | undefined; + tag_ids?: Array | undefined; }; /** @internal */ @@ -52,31 +58,19 @@ export const GetUsersRequest$outboundSchema: z.ZodType< > = z.object({ cursor: z.string().optional(), pageSize: z.number().int().optional(), + tagIds: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { pageSize: "page_size", + tagIds: "tag_ids", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUsersRequest$ { - /** @deprecated use `GetUsersRequest$inboundSchema` instead. */ - export const inboundSchema = GetUsersRequest$inboundSchema; - /** @deprecated use `GetUsersRequest$outboundSchema` instead. */ - export const outboundSchema = GetUsersRequest$outboundSchema; - /** @deprecated use `GetUsersRequest$Outbound` instead. */ - export type Outbound = GetUsersRequest$Outbound; -} - export function getUsersRequestToJSON( getUsersRequest: GetUsersRequest, ): string { return JSON.stringify(GetUsersRequest$outboundSchema.parse(getUsersRequest)); } - export function getUsersRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -99,7 +93,6 @@ export const GetUsersResponse$inboundSchema: z.ZodType< "Result": "result", }); }); - /** @internal */ export type GetUsersResponse$Outbound = { Result: components.PaginatedUsersList$Outbound; @@ -118,19 +111,6 @@ export const GetUsersResponse$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUsersResponse$ { - /** @deprecated use `GetUsersResponse$inboundSchema` instead. */ - export const inboundSchema = GetUsersResponse$inboundSchema; - /** @deprecated use `GetUsersResponse$outboundSchema` instead. */ - export const outboundSchema = GetUsersResponse$outboundSchema; - /** @deprecated use `GetUsersResponse$Outbound` instead. */ - export type Outbound = GetUsersResponse$Outbound; -} - export function getUsersResponseToJSON( getUsersResponse: GetUsersResponse, ): string { @@ -138,7 +118,6 @@ export function getUsersResponseToJSON( GetUsersResponse$outboundSchema.parse(getUsersResponse), ); } - export function getUsersResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getusertags.ts b/src/models/operations/getusertags.ts index f284fdc5..288f62e0 100644 --- a/src/models/operations/getusertags.ts +++ b/src/models/operations/getusertags.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -27,7 +27,6 @@ export const GetUserTagsRequest$inboundSchema: z.ZodType< "user_id": "userId", }); }); - /** @internal */ export type GetUserTagsRequest$Outbound = { user_id: string; @@ -46,19 +45,6 @@ export const GetUserTagsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserTagsRequest$ { - /** @deprecated use `GetUserTagsRequest$inboundSchema` instead. */ - export const inboundSchema = GetUserTagsRequest$inboundSchema; - /** @deprecated use `GetUserTagsRequest$outboundSchema` instead. */ - export const outboundSchema = GetUserTagsRequest$outboundSchema; - /** @deprecated use `GetUserTagsRequest$Outbound` instead. */ - export type Outbound = GetUserTagsRequest$Outbound; -} - export function getUserTagsRequestToJSON( getUserTagsRequest: GetUserTagsRequest, ): string { @@ -66,7 +52,6 @@ export function getUserTagsRequestToJSON( GetUserTagsRequest$outboundSchema.parse(getUserTagsRequest), ); } - export function getUserTagsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index c2063594..6f143dd2 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -13,21 +13,32 @@ export * from "./addresourcetag.js"; export * from "./addresourceuser.js"; export * from "./addusertag.js"; export * from "./approverequest.js"; +export * from "./createidpgroupmapping.js"; +export * from "./createpaladincontextsource.js"; export * from "./createrequest.js"; +export * from "./createrequestcomment.js"; export * from "./createtag.js"; export * from "./deletebundle.js"; export * from "./deleteconfigurationtemplate.js"; +export * from "./deletedelegation.js"; +export * from "./deleteeventstream.js"; export * from "./deletegroup.js"; export * from "./deletegroupbinding.js"; export * from "./deletegroupuser.js"; export * from "./deleteidpgroupmappings.js"; export * from "./deleteowner.js"; +export * from "./deletepaladin.js"; +export * from "./deletepaladincontextsource.js"; export * from "./deleteresource.js"; export * from "./deleteresourcenhi.js"; export * from "./deleteresourceuser.js"; export * from "./deletetagbyid.js"; +export * from "./deletetoken.js"; +export * from "./denyrequest.js"; +export * from "./endcampaign.js"; export * from "./events.js"; export * from "./getaccessrule.js"; +export * from "./getaccessrules.js"; export * from "./getapp.js"; export * from "./getapps.js"; export * from "./getbundle.js"; @@ -35,6 +46,11 @@ export * from "./getbundlegroups.js"; export * from "./getbundleresources.js"; export * from "./getbundles.js"; export * from "./getbundlevisibility.js"; +export * from "./getcampaign.js"; +export * from "./getcampaigns.js"; +export * from "./getdelegation.js"; +export * from "./getdelegations.js"; +export * from "./getevent.js"; export * from "./getgroup.js"; export * from "./getgroupbinding.js"; export * from "./getgroupbindings.js"; @@ -49,6 +65,7 @@ export * from "./getgroups.js"; export * from "./getgrouptags.js"; export * from "./getgroupusers.js"; export * from "./getgroupvisibility.js"; +export * from "./getidpgroupmapping.js"; export * from "./getidpgroupmappings.js"; export * from "./getmessagechannel.js"; export * from "./getnhis.js"; @@ -57,10 +74,15 @@ export * from "./getowner.js"; export * from "./getownerfromname.js"; export * from "./getowners.js"; export * from "./getownerusers.js"; +export * from "./getpaladin.js"; +export * from "./getpaladinfromname.js"; +export * from "./getremoteusers.js"; export * from "./getrequest.js"; +export * from "./getrequestcomments.js"; export * from "./getrequests.js"; export * from "./getrequestsrelay.js"; export * from "./getresource.js"; +export * from "./getresourcegroups.js"; export * from "./getresourcemessagechannels.js"; export * from "./getresourcenhis.js"; export * from "./getresourcereviewers.js"; @@ -75,10 +97,14 @@ export * from "./getsyncerrors.js"; export * from "./gettag.js"; export * from "./gettagbyid.js"; export * from "./gettags.js"; +export * from "./gettokens.js"; export * from "./getuar.js"; export * from "./getuars.js"; +export * from "./getusergroups.js"; +export * from "./getuserresources.js"; export * from "./getusers.js"; export * from "./getusertags.js"; +export * from "./listpaladincontextsources.js"; export * from "./removebundlegroup.js"; export * from "./removebundleresource.js"; export * from "./removegroupcontaininggroup.js"; @@ -100,9 +126,14 @@ export * from "./setresourcereviewers.js"; export * from "./setresourcereviewerstages.js"; export * from "./setresourcescopedrolepermissions.js"; export * from "./setresourcevisibility.js"; +export * from "./startcampaign.js"; +export * from "./stopcampaign.js"; export * from "./updateaccessrule.js"; export * from "./updatebundle.js"; +export * from "./updatecampaign.js"; +export * from "./updateeventstream.js"; export * from "./updategroupuser.js"; export * from "./updateidpgroupmappings.js"; +export * from "./updatepaladin.js"; export * from "./updateresourceuser.js"; export * from "./user.js"; diff --git a/src/models/operations/listpaladincontextsources.ts b/src/models/operations/listpaladincontextsources.ts new file mode 100644 index 00000000..5f9d5ad2 --- /dev/null +++ b/src/models/operations/listpaladincontextsources.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListPaladinContextSourcesRequest = { + /** + * The ID of the Paladin. + */ + paladinId: string; +}; + +/** @internal */ +export const ListPaladinContextSourcesRequest$inboundSchema: z.ZodType< + ListPaladinContextSourcesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + paladin_id: z.string(), +}).transform((v) => { + return remap$(v, { + "paladin_id": "paladinId", + }); +}); +/** @internal */ +export type ListPaladinContextSourcesRequest$Outbound = { + paladin_id: string; +}; + +/** @internal */ +export const ListPaladinContextSourcesRequest$outboundSchema: z.ZodType< + ListPaladinContextSourcesRequest$Outbound, + z.ZodTypeDef, + ListPaladinContextSourcesRequest +> = z.object({ + paladinId: z.string(), +}).transform((v) => { + return remap$(v, { + paladinId: "paladin_id", + }); +}); + +export function listPaladinContextSourcesRequestToJSON( + listPaladinContextSourcesRequest: ListPaladinContextSourcesRequest, +): string { + return JSON.stringify( + ListPaladinContextSourcesRequest$outboundSchema.parse( + listPaladinContextSourcesRequest, + ), + ); +} +export function listPaladinContextSourcesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListPaladinContextSourcesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListPaladinContextSourcesRequest' from JSON`, + ); +} diff --git a/src/models/operations/removebundlegroup.ts b/src/models/operations/removebundlegroup.ts index 7871f304..287a146c 100644 --- a/src/models/operations/removebundlegroup.ts +++ b/src/models/operations/removebundlegroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -39,7 +39,6 @@ export const RemoveBundleGroupRequest$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type RemoveBundleGroupRequest$Outbound = { bundle_id: string; @@ -64,19 +63,6 @@ export const RemoveBundleGroupRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RemoveBundleGroupRequest$ { - /** @deprecated use `RemoveBundleGroupRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveBundleGroupRequest$inboundSchema; - /** @deprecated use `RemoveBundleGroupRequest$outboundSchema` instead. */ - export const outboundSchema = RemoveBundleGroupRequest$outboundSchema; - /** @deprecated use `RemoveBundleGroupRequest$Outbound` instead. */ - export type Outbound = RemoveBundleGroupRequest$Outbound; -} - export function removeBundleGroupRequestToJSON( removeBundleGroupRequest: RemoveBundleGroupRequest, ): string { @@ -84,7 +70,6 @@ export function removeBundleGroupRequestToJSON( RemoveBundleGroupRequest$outboundSchema.parse(removeBundleGroupRequest), ); } - export function removeBundleGroupRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/removebundleresource.ts b/src/models/operations/removebundleresource.ts index b88ff0a8..fbe1a464 100644 --- a/src/models/operations/removebundleresource.ts +++ b/src/models/operations/removebundleresource.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -39,7 +39,6 @@ export const RemoveBundleResourceRequest$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type RemoveBundleResourceRequest$Outbound = { bundle_id: string; @@ -64,19 +63,6 @@ export const RemoveBundleResourceRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RemoveBundleResourceRequest$ { - /** @deprecated use `RemoveBundleResourceRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveBundleResourceRequest$inboundSchema; - /** @deprecated use `RemoveBundleResourceRequest$outboundSchema` instead. */ - export const outboundSchema = RemoveBundleResourceRequest$outboundSchema; - /** @deprecated use `RemoveBundleResourceRequest$Outbound` instead. */ - export type Outbound = RemoveBundleResourceRequest$Outbound; -} - export function removeBundleResourceRequestToJSON( removeBundleResourceRequest: RemoveBundleResourceRequest, ): string { @@ -86,7 +72,6 @@ export function removeBundleResourceRequestToJSON( ), ); } - export function removeBundleResourceRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/removegroupcontaininggroup.ts b/src/models/operations/removegroupcontaininggroup.ts index f5d4bf64..efed1fe7 100644 --- a/src/models/operations/removegroupcontaininggroup.ts +++ b/src/models/operations/removegroupcontaininggroup.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -10,13 +10,17 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type RemoveGroupContainingGroupRequest = { /** - * The ID of the group. + * The ID of the member group to remove. */ groupId: string; /** * The ID of the containing group. */ containingGroupId: string; + /** + * The remote ID of the member group's access level to filter by. + */ + accessLevelRemoteId?: string | undefined; }; /** @internal */ @@ -27,17 +31,19 @@ export const RemoveGroupContainingGroupRequest$inboundSchema: z.ZodType< > = z.object({ group_id: z.string(), containing_group_id: z.string(), + access_level_remote_id: z.string().optional(), }).transform((v) => { return remap$(v, { "group_id": "groupId", "containing_group_id": "containingGroupId", + "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type RemoveGroupContainingGroupRequest$Outbound = { group_id: string; containing_group_id: string; + access_level_remote_id?: string | undefined; }; /** @internal */ @@ -48,27 +54,15 @@ export const RemoveGroupContainingGroupRequest$outboundSchema: z.ZodType< > = z.object({ groupId: z.string(), containingGroupId: z.string(), + accessLevelRemoteId: z.string().optional(), }).transform((v) => { return remap$(v, { groupId: "group_id", containingGroupId: "containing_group_id", + accessLevelRemoteId: "access_level_remote_id", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RemoveGroupContainingGroupRequest$ { - /** @deprecated use `RemoveGroupContainingGroupRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveGroupContainingGroupRequest$inboundSchema; - /** @deprecated use `RemoveGroupContainingGroupRequest$outboundSchema` instead. */ - export const outboundSchema = - RemoveGroupContainingGroupRequest$outboundSchema; - /** @deprecated use `RemoveGroupContainingGroupRequest$Outbound` instead. */ - export type Outbound = RemoveGroupContainingGroupRequest$Outbound; -} - export function removeGroupContainingGroupRequestToJSON( removeGroupContainingGroupRequest: RemoveGroupContainingGroupRequest, ): string { @@ -78,7 +72,6 @@ export function removeGroupContainingGroupRequestToJSON( ), ); } - export function removeGroupContainingGroupRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/removegrouptag.ts b/src/models/operations/removegrouptag.ts index 6b71b734..34147999 100644 --- a/src/models/operations/removegrouptag.ts +++ b/src/models/operations/removegrouptag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const RemoveGroupTagRequest$inboundSchema: z.ZodType< "group_id": "groupId", }); }); - /** @internal */ export type RemoveGroupTagRequest$Outbound = { tag_id: string; @@ -55,19 +54,6 @@ export const RemoveGroupTagRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RemoveGroupTagRequest$ { - /** @deprecated use `RemoveGroupTagRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveGroupTagRequest$inboundSchema; - /** @deprecated use `RemoveGroupTagRequest$outboundSchema` instead. */ - export const outboundSchema = RemoveGroupTagRequest$outboundSchema; - /** @deprecated use `RemoveGroupTagRequest$Outbound` instead. */ - export type Outbound = RemoveGroupTagRequest$Outbound; -} - export function removeGroupTagRequestToJSON( removeGroupTagRequest: RemoveGroupTagRequest, ): string { @@ -75,7 +61,6 @@ export function removeGroupTagRequestToJSON( RemoveGroupTagRequest$outboundSchema.parse(removeGroupTagRequest), ); } - export function removeGroupTagRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/removeresourcetag.ts b/src/models/operations/removeresourcetag.ts index a309a7c5..d985bf6a 100644 --- a/src/models/operations/removeresourcetag.ts +++ b/src/models/operations/removeresourcetag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const RemoveResourceTagRequest$inboundSchema: z.ZodType< "resource_id": "resourceId", }); }); - /** @internal */ export type RemoveResourceTagRequest$Outbound = { tag_id: string; @@ -55,19 +54,6 @@ export const RemoveResourceTagRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RemoveResourceTagRequest$ { - /** @deprecated use `RemoveResourceTagRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveResourceTagRequest$inboundSchema; - /** @deprecated use `RemoveResourceTagRequest$outboundSchema` instead. */ - export const outboundSchema = RemoveResourceTagRequest$outboundSchema; - /** @deprecated use `RemoveResourceTagRequest$Outbound` instead. */ - export type Outbound = RemoveResourceTagRequest$Outbound; -} - export function removeResourceTagRequestToJSON( removeResourceTagRequest: RemoveResourceTagRequest, ): string { @@ -75,7 +61,6 @@ export function removeResourceTagRequestToJSON( RemoveResourceTagRequest$outboundSchema.parse(removeResourceTagRequest), ); } - export function removeResourceTagRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/removeusertag.ts b/src/models/operations/removeusertag.ts index 7e9622b4..47bafac1 100644 --- a/src/models/operations/removeusertag.ts +++ b/src/models/operations/removeusertag.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const RemoveUserTagRequest$inboundSchema: z.ZodType< "user_id": "userId", }); }); - /** @internal */ export type RemoveUserTagRequest$Outbound = { tag_id: string; @@ -55,19 +54,6 @@ export const RemoveUserTagRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RemoveUserTagRequest$ { - /** @deprecated use `RemoveUserTagRequest$inboundSchema` instead. */ - export const inboundSchema = RemoveUserTagRequest$inboundSchema; - /** @deprecated use `RemoveUserTagRequest$outboundSchema` instead. */ - export const outboundSchema = RemoveUserTagRequest$outboundSchema; - /** @deprecated use `RemoveUserTagRequest$Outbound` instead. */ - export type Outbound = RemoveUserTagRequest$Outbound; -} - export function removeUserTagRequestToJSON( removeUserTagRequest: RemoveUserTagRequest, ): string { @@ -75,7 +61,6 @@ export function removeUserTagRequestToJSON( RemoveUserTagRequest$outboundSchema.parse(removeUserTagRequest), ); } - export function removeUserTagRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/resourceuseraccessstatusretrieve.ts b/src/models/operations/resourceuseraccessstatusretrieve.ts index fc824dac..4456ffd9 100644 --- a/src/models/operations/resourceuseraccessstatusretrieve.ts +++ b/src/models/operations/resourceuseraccessstatusretrieve.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -50,7 +50,6 @@ export const ResourceUserAccessStatusRetrieveRequest$inboundSchema: z.ZodType< "page_size": "pageSize", }); }); - /** @internal */ export type ResourceUserAccessStatusRetrieveRequest$Outbound = { resource_id: string; @@ -80,21 +79,6 @@ export const ResourceUserAccessStatusRetrieveRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResourceUserAccessStatusRetrieveRequest$ { - /** @deprecated use `ResourceUserAccessStatusRetrieveRequest$inboundSchema` instead. */ - export const inboundSchema = - ResourceUserAccessStatusRetrieveRequest$inboundSchema; - /** @deprecated use `ResourceUserAccessStatusRetrieveRequest$outboundSchema` instead. */ - export const outboundSchema = - ResourceUserAccessStatusRetrieveRequest$outboundSchema; - /** @deprecated use `ResourceUserAccessStatusRetrieveRequest$Outbound` instead. */ - export type Outbound = ResourceUserAccessStatusRetrieveRequest$Outbound; -} - export function resourceUserAccessStatusRetrieveRequestToJSON( resourceUserAccessStatusRetrieveRequest: ResourceUserAccessStatusRetrieveRequest, @@ -105,7 +89,6 @@ export function resourceUserAccessStatusRetrieveRequestToJSON( ), ); } - export function resourceUserAccessStatusRetrieveRequestFromJSON( jsonString: string, ): SafeParseResult< diff --git a/src/models/operations/sessions.ts b/src/models/operations/sessions.ts index f3fcc1fd..54ed4d3a 100644 --- a/src/models/operations/sessions.ts +++ b/src/models/operations/sessions.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const SessionsRequest$inboundSchema: z.ZodType< "user_id": "userId", }); }); - /** @internal */ export type SessionsRequest$Outbound = { resource_id: string; @@ -55,25 +54,11 @@ export const SessionsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SessionsRequest$ { - /** @deprecated use `SessionsRequest$inboundSchema` instead. */ - export const inboundSchema = SessionsRequest$inboundSchema; - /** @deprecated use `SessionsRequest$outboundSchema` instead. */ - export const outboundSchema = SessionsRequest$outboundSchema; - /** @deprecated use `SessionsRequest$Outbound` instead. */ - export type Outbound = SessionsRequest$Outbound; -} - export function sessionsRequestToJSON( sessionsRequest: SessionsRequest, ): string { return JSON.stringify(SessionsRequest$outboundSchema.parse(sessionsRequest)); } - export function sessionsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setbundlevisibility.ts b/src/models/operations/setbundlevisibility.ts index 1d61267c..be1ca783 100644 --- a/src/models/operations/setbundlevisibility.ts +++ b/src/models/operations/setbundlevisibility.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetBundleVisibilityRequest$inboundSchema: z.ZodType< "VisibilityInfo": "visibilityInfo", }); }); - /** @internal */ export type SetBundleVisibilityRequest$Outbound = { bundle_id: string; @@ -53,19 +52,6 @@ export const SetBundleVisibilityRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetBundleVisibilityRequest$ { - /** @deprecated use `SetBundleVisibilityRequest$inboundSchema` instead. */ - export const inboundSchema = SetBundleVisibilityRequest$inboundSchema; - /** @deprecated use `SetBundleVisibilityRequest$outboundSchema` instead. */ - export const outboundSchema = SetBundleVisibilityRequest$outboundSchema; - /** @deprecated use `SetBundleVisibilityRequest$Outbound` instead. */ - export type Outbound = SetBundleVisibilityRequest$Outbound; -} - export function setBundleVisibilityRequestToJSON( setBundleVisibilityRequest: SetBundleVisibilityRequest, ): string { @@ -73,7 +59,6 @@ export function setBundleVisibilityRequestToJSON( SetBundleVisibilityRequest$outboundSchema.parse(setBundleVisibilityRequest), ); } - export function setBundleVisibilityRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setgroupmessagechannels.ts b/src/models/operations/setgroupmessagechannels.ts index 70ff39af..6c707a37 100644 --- a/src/models/operations/setgroupmessagechannels.ts +++ b/src/models/operations/setgroupmessagechannels.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetGroupMessageChannelsRequest$inboundSchema: z.ZodType< "MessageChannelIDList": "messageChannelIDList", }); }); - /** @internal */ export type SetGroupMessageChannelsRequest$Outbound = { group_id: string; @@ -53,19 +52,6 @@ export const SetGroupMessageChannelsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetGroupMessageChannelsRequest$ { - /** @deprecated use `SetGroupMessageChannelsRequest$inboundSchema` instead. */ - export const inboundSchema = SetGroupMessageChannelsRequest$inboundSchema; - /** @deprecated use `SetGroupMessageChannelsRequest$outboundSchema` instead. */ - export const outboundSchema = SetGroupMessageChannelsRequest$outboundSchema; - /** @deprecated use `SetGroupMessageChannelsRequest$Outbound` instead. */ - export type Outbound = SetGroupMessageChannelsRequest$Outbound; -} - export function setGroupMessageChannelsRequestToJSON( setGroupMessageChannelsRequest: SetGroupMessageChannelsRequest, ): string { @@ -75,7 +61,6 @@ export function setGroupMessageChannelsRequestToJSON( ), ); } - export function setGroupMessageChannelsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setgrouponcallschedules.ts b/src/models/operations/setgrouponcallschedules.ts index b5cd28a4..1f2de6a9 100644 --- a/src/models/operations/setgrouponcallschedules.ts +++ b/src/models/operations/setgrouponcallschedules.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetGroupOnCallSchedulesRequest$inboundSchema: z.ZodType< "OnCallScheduleIDList": "onCallScheduleIDList", }); }); - /** @internal */ export type SetGroupOnCallSchedulesRequest$Outbound = { group_id: string; @@ -53,19 +52,6 @@ export const SetGroupOnCallSchedulesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetGroupOnCallSchedulesRequest$ { - /** @deprecated use `SetGroupOnCallSchedulesRequest$inboundSchema` instead. */ - export const inboundSchema = SetGroupOnCallSchedulesRequest$inboundSchema; - /** @deprecated use `SetGroupOnCallSchedulesRequest$outboundSchema` instead. */ - export const outboundSchema = SetGroupOnCallSchedulesRequest$outboundSchema; - /** @deprecated use `SetGroupOnCallSchedulesRequest$Outbound` instead. */ - export type Outbound = SetGroupOnCallSchedulesRequest$Outbound; -} - export function setGroupOnCallSchedulesRequestToJSON( setGroupOnCallSchedulesRequest: SetGroupOnCallSchedulesRequest, ): string { @@ -75,7 +61,6 @@ export function setGroupOnCallSchedulesRequestToJSON( ), ); } - export function setGroupOnCallSchedulesRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setgroupresources.ts b/src/models/operations/setgroupresources.ts index 0f93e60e..e7f8c39b 100644 --- a/src/models/operations/setgroupresources.ts +++ b/src/models/operations/setgroupresources.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetGroupResourcesRequest$inboundSchema: z.ZodType< "UpdateGroupResourcesInfo": "updateGroupResourcesInfo", }); }); - /** @internal */ export type SetGroupResourcesRequest$Outbound = { group_id: string; @@ -53,19 +52,6 @@ export const SetGroupResourcesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetGroupResourcesRequest$ { - /** @deprecated use `SetGroupResourcesRequest$inboundSchema` instead. */ - export const inboundSchema = SetGroupResourcesRequest$inboundSchema; - /** @deprecated use `SetGroupResourcesRequest$outboundSchema` instead. */ - export const outboundSchema = SetGroupResourcesRequest$outboundSchema; - /** @deprecated use `SetGroupResourcesRequest$Outbound` instead. */ - export type Outbound = SetGroupResourcesRequest$Outbound; -} - export function setGroupResourcesRequestToJSON( setGroupResourcesRequest: SetGroupResourcesRequest, ): string { @@ -73,7 +59,6 @@ export function setGroupResourcesRequestToJSON( SetGroupResourcesRequest$outboundSchema.parse(setGroupResourcesRequest), ); } - export function setGroupResourcesRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setgroupreviewers.ts b/src/models/operations/setgroupreviewers.ts index d94e56d9..f434c89b 100644 --- a/src/models/operations/setgroupreviewers.ts +++ b/src/models/operations/setgroupreviewers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetGroupReviewersRequest$inboundSchema: z.ZodType< "ReviewerIDList": "reviewerIDList", }); }); - /** @internal */ export type SetGroupReviewersRequest$Outbound = { group_id: string; @@ -53,19 +52,6 @@ export const SetGroupReviewersRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetGroupReviewersRequest$ { - /** @deprecated use `SetGroupReviewersRequest$inboundSchema` instead. */ - export const inboundSchema = SetGroupReviewersRequest$inboundSchema; - /** @deprecated use `SetGroupReviewersRequest$outboundSchema` instead. */ - export const outboundSchema = SetGroupReviewersRequest$outboundSchema; - /** @deprecated use `SetGroupReviewersRequest$Outbound` instead. */ - export type Outbound = SetGroupReviewersRequest$Outbound; -} - export function setGroupReviewersRequestToJSON( setGroupReviewersRequest: SetGroupReviewersRequest, ): string { @@ -73,7 +59,6 @@ export function setGroupReviewersRequestToJSON( SetGroupReviewersRequest$outboundSchema.parse(setGroupReviewersRequest), ); } - export function setGroupReviewersRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setgroupreviewerstages.ts b/src/models/operations/setgroupreviewerstages.ts index 91d2689e..5315907a 100644 --- a/src/models/operations/setgroupreviewerstages.ts +++ b/src/models/operations/setgroupreviewerstages.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetGroupReviewerStagesRequest$inboundSchema: z.ZodType< "ReviewerStageList": "reviewerStageList", }); }); - /** @internal */ export type SetGroupReviewerStagesRequest$Outbound = { group_id: string; @@ -53,19 +52,6 @@ export const SetGroupReviewerStagesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetGroupReviewerStagesRequest$ { - /** @deprecated use `SetGroupReviewerStagesRequest$inboundSchema` instead. */ - export const inboundSchema = SetGroupReviewerStagesRequest$inboundSchema; - /** @deprecated use `SetGroupReviewerStagesRequest$outboundSchema` instead. */ - export const outboundSchema = SetGroupReviewerStagesRequest$outboundSchema; - /** @deprecated use `SetGroupReviewerStagesRequest$Outbound` instead. */ - export type Outbound = SetGroupReviewerStagesRequest$Outbound; -} - export function setGroupReviewerStagesRequestToJSON( setGroupReviewerStagesRequest: SetGroupReviewerStagesRequest, ): string { @@ -75,7 +61,6 @@ export function setGroupReviewerStagesRequestToJSON( ), ); } - export function setGroupReviewerStagesRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setgroupvisibility.ts b/src/models/operations/setgroupvisibility.ts index de1c0381..3564910d 100644 --- a/src/models/operations/setgroupvisibility.ts +++ b/src/models/operations/setgroupvisibility.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetGroupVisibilityRequest$inboundSchema: z.ZodType< "VisibilityInfo": "visibilityInfo", }); }); - /** @internal */ export type SetGroupVisibilityRequest$Outbound = { group_id: string; @@ -53,19 +52,6 @@ export const SetGroupVisibilityRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetGroupVisibilityRequest$ { - /** @deprecated use `SetGroupVisibilityRequest$inboundSchema` instead. */ - export const inboundSchema = SetGroupVisibilityRequest$inboundSchema; - /** @deprecated use `SetGroupVisibilityRequest$outboundSchema` instead. */ - export const outboundSchema = SetGroupVisibilityRequest$outboundSchema; - /** @deprecated use `SetGroupVisibilityRequest$Outbound` instead. */ - export type Outbound = SetGroupVisibilityRequest$Outbound; -} - export function setGroupVisibilityRequestToJSON( setGroupVisibilityRequest: SetGroupVisibilityRequest, ): string { @@ -73,7 +59,6 @@ export function setGroupVisibilityRequestToJSON( SetGroupVisibilityRequest$outboundSchema.parse(setGroupVisibilityRequest), ); } - export function setGroupVisibilityRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setownerusers.ts b/src/models/operations/setownerusers.ts index e4c1090a..a769f1a2 100644 --- a/src/models/operations/setownerusers.ts +++ b/src/models/operations/setownerusers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetOwnerUsersRequest$inboundSchema: z.ZodType< "UserIDList": "userIDList", }); }); - /** @internal */ export type SetOwnerUsersRequest$Outbound = { owner_id: string; @@ -53,19 +52,6 @@ export const SetOwnerUsersRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetOwnerUsersRequest$ { - /** @deprecated use `SetOwnerUsersRequest$inboundSchema` instead. */ - export const inboundSchema = SetOwnerUsersRequest$inboundSchema; - /** @deprecated use `SetOwnerUsersRequest$outboundSchema` instead. */ - export const outboundSchema = SetOwnerUsersRequest$outboundSchema; - /** @deprecated use `SetOwnerUsersRequest$Outbound` instead. */ - export type Outbound = SetOwnerUsersRequest$Outbound; -} - export function setOwnerUsersRequestToJSON( setOwnerUsersRequest: SetOwnerUsersRequest, ): string { @@ -73,7 +59,6 @@ export function setOwnerUsersRequestToJSON( SetOwnerUsersRequest$outboundSchema.parse(setOwnerUsersRequest), ); } - export function setOwnerUsersRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setresourcemessagechannels.ts b/src/models/operations/setresourcemessagechannels.ts index 83509a8a..d5801b29 100644 --- a/src/models/operations/setresourcemessagechannels.ts +++ b/src/models/operations/setresourcemessagechannels.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetResourceMessageChannelsRequest$inboundSchema: z.ZodType< "MessageChannelIDList": "messageChannelIDList", }); }); - /** @internal */ export type SetResourceMessageChannelsRequest$Outbound = { resource_id: string; @@ -53,20 +52,6 @@ export const SetResourceMessageChannelsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetResourceMessageChannelsRequest$ { - /** @deprecated use `SetResourceMessageChannelsRequest$inboundSchema` instead. */ - export const inboundSchema = SetResourceMessageChannelsRequest$inboundSchema; - /** @deprecated use `SetResourceMessageChannelsRequest$outboundSchema` instead. */ - export const outboundSchema = - SetResourceMessageChannelsRequest$outboundSchema; - /** @deprecated use `SetResourceMessageChannelsRequest$Outbound` instead. */ - export type Outbound = SetResourceMessageChannelsRequest$Outbound; -} - export function setResourceMessageChannelsRequestToJSON( setResourceMessageChannelsRequest: SetResourceMessageChannelsRequest, ): string { @@ -76,7 +61,6 @@ export function setResourceMessageChannelsRequestToJSON( ), ); } - export function setResourceMessageChannelsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setresourcereviewers.ts b/src/models/operations/setresourcereviewers.ts index 8b05e933..4465d3f0 100644 --- a/src/models/operations/setresourcereviewers.ts +++ b/src/models/operations/setresourcereviewers.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetResourceReviewersRequest$inboundSchema: z.ZodType< "ReviewerIDList": "reviewerIDList", }); }); - /** @internal */ export type SetResourceReviewersRequest$Outbound = { resource_id: string; @@ -53,19 +52,6 @@ export const SetResourceReviewersRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetResourceReviewersRequest$ { - /** @deprecated use `SetResourceReviewersRequest$inboundSchema` instead. */ - export const inboundSchema = SetResourceReviewersRequest$inboundSchema; - /** @deprecated use `SetResourceReviewersRequest$outboundSchema` instead. */ - export const outboundSchema = SetResourceReviewersRequest$outboundSchema; - /** @deprecated use `SetResourceReviewersRequest$Outbound` instead. */ - export type Outbound = SetResourceReviewersRequest$Outbound; -} - export function setResourceReviewersRequestToJSON( setResourceReviewersRequest: SetResourceReviewersRequest, ): string { @@ -75,7 +61,6 @@ export function setResourceReviewersRequestToJSON( ), ); } - export function setResourceReviewersRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setresourcereviewerstages.ts b/src/models/operations/setresourcereviewerstages.ts index 4d70c75b..dde5779e 100644 --- a/src/models/operations/setresourcereviewerstages.ts +++ b/src/models/operations/setresourcereviewerstages.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetResourceReviewerStagesRequest$inboundSchema: z.ZodType< "ReviewerStageList": "reviewerStageList", }); }); - /** @internal */ export type SetResourceReviewerStagesRequest$Outbound = { resource_id: string; @@ -53,19 +52,6 @@ export const SetResourceReviewerStagesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetResourceReviewerStagesRequest$ { - /** @deprecated use `SetResourceReviewerStagesRequest$inboundSchema` instead. */ - export const inboundSchema = SetResourceReviewerStagesRequest$inboundSchema; - /** @deprecated use `SetResourceReviewerStagesRequest$outboundSchema` instead. */ - export const outboundSchema = SetResourceReviewerStagesRequest$outboundSchema; - /** @deprecated use `SetResourceReviewerStagesRequest$Outbound` instead. */ - export type Outbound = SetResourceReviewerStagesRequest$Outbound; -} - export function setResourceReviewerStagesRequestToJSON( setResourceReviewerStagesRequest: SetResourceReviewerStagesRequest, ): string { @@ -75,7 +61,6 @@ export function setResourceReviewerStagesRequestToJSON( ), ); } - export function setResourceReviewerStagesRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/setresourcescopedrolepermissions.ts b/src/models/operations/setresourcescopedrolepermissions.ts index a43d650a..2cef6b92 100644 --- a/src/models/operations/setresourcescopedrolepermissions.ts +++ b/src/models/operations/setresourcescopedrolepermissions.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetResourceScopedRolePermissionsRequest$inboundSchema: z.ZodType< "ScopedRolePermissionList": "scopedRolePermissionList", }); }); - /** @internal */ export type SetResourceScopedRolePermissionsRequest$Outbound = { resource_id: string; @@ -53,21 +52,6 @@ export const SetResourceScopedRolePermissionsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetResourceScopedRolePermissionsRequest$ { - /** @deprecated use `SetResourceScopedRolePermissionsRequest$inboundSchema` instead. */ - export const inboundSchema = - SetResourceScopedRolePermissionsRequest$inboundSchema; - /** @deprecated use `SetResourceScopedRolePermissionsRequest$outboundSchema` instead. */ - export const outboundSchema = - SetResourceScopedRolePermissionsRequest$outboundSchema; - /** @deprecated use `SetResourceScopedRolePermissionsRequest$Outbound` instead. */ - export type Outbound = SetResourceScopedRolePermissionsRequest$Outbound; -} - export function setResourceScopedRolePermissionsRequestToJSON( setResourceScopedRolePermissionsRequest: SetResourceScopedRolePermissionsRequest, @@ -78,7 +62,6 @@ export function setResourceScopedRolePermissionsRequestToJSON( ), ); } - export function setResourceScopedRolePermissionsRequestFromJSON( jsonString: string, ): SafeParseResult< diff --git a/src/models/operations/setresourcevisibility.ts b/src/models/operations/setresourcevisibility.ts index 12f074f5..2429df2e 100644 --- a/src/models/operations/setresourcevisibility.ts +++ b/src/models/operations/setresourcevisibility.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const SetResourceVisibilityRequest$inboundSchema: z.ZodType< "VisibilityInfo": "visibilityInfo", }); }); - /** @internal */ export type SetResourceVisibilityRequest$Outbound = { resource_id: string; @@ -53,19 +52,6 @@ export const SetResourceVisibilityRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetResourceVisibilityRequest$ { - /** @deprecated use `SetResourceVisibilityRequest$inboundSchema` instead. */ - export const inboundSchema = SetResourceVisibilityRequest$inboundSchema; - /** @deprecated use `SetResourceVisibilityRequest$outboundSchema` instead. */ - export const outboundSchema = SetResourceVisibilityRequest$outboundSchema; - /** @deprecated use `SetResourceVisibilityRequest$Outbound` instead. */ - export type Outbound = SetResourceVisibilityRequest$Outbound; -} - export function setResourceVisibilityRequestToJSON( setResourceVisibilityRequest: SetResourceVisibilityRequest, ): string { @@ -75,7 +61,6 @@ export function setResourceVisibilityRequestToJSON( ), ); } - export function setResourceVisibilityRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/startcampaign.ts b/src/models/operations/startcampaign.ts new file mode 100644 index 00000000..943772a5 --- /dev/null +++ b/src/models/operations/startcampaign.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type StartCampaignRequest = { + /** + * The ID of the campaign. + */ + campaignId: string; +}; + +/** @internal */ +export const StartCampaignRequest$inboundSchema: z.ZodType< + StartCampaignRequest, + z.ZodTypeDef, + unknown +> = z.object({ + campaign_id: z.string(), +}).transform((v) => { + return remap$(v, { + "campaign_id": "campaignId", + }); +}); +/** @internal */ +export type StartCampaignRequest$Outbound = { + campaign_id: string; +}; + +/** @internal */ +export const StartCampaignRequest$outboundSchema: z.ZodType< + StartCampaignRequest$Outbound, + z.ZodTypeDef, + StartCampaignRequest +> = z.object({ + campaignId: z.string(), +}).transform((v) => { + return remap$(v, { + campaignId: "campaign_id", + }); +}); + +export function startCampaignRequestToJSON( + startCampaignRequest: StartCampaignRequest, +): string { + return JSON.stringify( + StartCampaignRequest$outboundSchema.parse(startCampaignRequest), + ); +} +export function startCampaignRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StartCampaignRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StartCampaignRequest' from JSON`, + ); +} diff --git a/src/models/operations/stopcampaign.ts b/src/models/operations/stopcampaign.ts new file mode 100644 index 00000000..508f8ea8 --- /dev/null +++ b/src/models/operations/stopcampaign.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type StopCampaignRequest = { + /** + * The ID of the campaign. + */ + campaignId: string; + stopCampaignRequest?: components.StopCampaignRequest | undefined; +}; + +/** @internal */ +export const StopCampaignRequest$inboundSchema: z.ZodType< + StopCampaignRequest, + z.ZodTypeDef, + unknown +> = z.object({ + campaign_id: z.string(), + StopCampaignRequest: components.StopCampaignRequest$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "campaign_id": "campaignId", + "StopCampaignRequest": "stopCampaignRequest", + }); +}); +/** @internal */ +export type StopCampaignRequest$Outbound = { + campaign_id: string; + StopCampaignRequest?: components.StopCampaignRequest$Outbound | undefined; +}; + +/** @internal */ +export const StopCampaignRequest$outboundSchema: z.ZodType< + StopCampaignRequest$Outbound, + z.ZodTypeDef, + StopCampaignRequest +> = z.object({ + campaignId: z.string(), + stopCampaignRequest: components.StopCampaignRequest$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + campaignId: "campaign_id", + stopCampaignRequest: "StopCampaignRequest", + }); +}); + +export function stopCampaignRequestToJSON( + stopCampaignRequest: StopCampaignRequest, +): string { + return JSON.stringify( + StopCampaignRequest$outboundSchema.parse(stopCampaignRequest), + ); +} +export function stopCampaignRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => StopCampaignRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'StopCampaignRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateaccessrule.ts b/src/models/operations/updateaccessrule.ts index 1baa4d73..a27563a6 100644 --- a/src/models/operations/updateaccessrule.ts +++ b/src/models/operations/updateaccessrule.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const UpdateAccessRuleRequest$inboundSchema: z.ZodType< "UpdateAccessRuleInfo": "updateAccessRuleInfo", }); }); - /** @internal */ export type UpdateAccessRuleRequest$Outbound = { access_rule_id: string; @@ -53,19 +52,6 @@ export const UpdateAccessRuleRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateAccessRuleRequest$ { - /** @deprecated use `UpdateAccessRuleRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateAccessRuleRequest$inboundSchema; - /** @deprecated use `UpdateAccessRuleRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateAccessRuleRequest$outboundSchema; - /** @deprecated use `UpdateAccessRuleRequest$Outbound` instead. */ - export type Outbound = UpdateAccessRuleRequest$Outbound; -} - export function updateAccessRuleRequestToJSON( updateAccessRuleRequest: UpdateAccessRuleRequest, ): string { @@ -73,7 +59,6 @@ export function updateAccessRuleRequestToJSON( UpdateAccessRuleRequest$outboundSchema.parse(updateAccessRuleRequest), ); } - export function updateAccessRuleRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/updatebundle.ts b/src/models/operations/updatebundle.ts index 8612e911..cf21c6c1 100644 --- a/src/models/operations/updatebundle.ts +++ b/src/models/operations/updatebundle.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const UpdateBundleRequest$inboundSchema: z.ZodType< "Bundle": "bundle", }); }); - /** @internal */ export type UpdateBundleRequest$Outbound = { bundle_id: string; @@ -53,19 +52,6 @@ export const UpdateBundleRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateBundleRequest$ { - /** @deprecated use `UpdateBundleRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateBundleRequest$inboundSchema; - /** @deprecated use `UpdateBundleRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateBundleRequest$outboundSchema; - /** @deprecated use `UpdateBundleRequest$Outbound` instead. */ - export type Outbound = UpdateBundleRequest$Outbound; -} - export function updateBundleRequestToJSON( updateBundleRequest: UpdateBundleRequest, ): string { @@ -73,7 +59,6 @@ export function updateBundleRequestToJSON( UpdateBundleRequest$outboundSchema.parse(updateBundleRequest), ); } - export function updateBundleRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/updatecampaign.ts b/src/models/operations/updatecampaign.ts new file mode 100644 index 00000000..be5cf985 --- /dev/null +++ b/src/models/operations/updatecampaign.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateCampaignRequest = { + /** + * The ID of the campaign. + */ + campaignId: string; + updateCampaignInfo: components.UpdateCampaignInfo; +}; + +/** @internal */ +export const UpdateCampaignRequest$inboundSchema: z.ZodType< + UpdateCampaignRequest, + z.ZodTypeDef, + unknown +> = z.object({ + campaign_id: z.string(), + UpdateCampaignInfo: components.UpdateCampaignInfo$inboundSchema, +}).transform((v) => { + return remap$(v, { + "campaign_id": "campaignId", + "UpdateCampaignInfo": "updateCampaignInfo", + }); +}); +/** @internal */ +export type UpdateCampaignRequest$Outbound = { + campaign_id: string; + UpdateCampaignInfo: components.UpdateCampaignInfo$Outbound; +}; + +/** @internal */ +export const UpdateCampaignRequest$outboundSchema: z.ZodType< + UpdateCampaignRequest$Outbound, + z.ZodTypeDef, + UpdateCampaignRequest +> = z.object({ + campaignId: z.string(), + updateCampaignInfo: components.UpdateCampaignInfo$outboundSchema, +}).transform((v) => { + return remap$(v, { + campaignId: "campaign_id", + updateCampaignInfo: "UpdateCampaignInfo", + }); +}); + +export function updateCampaignRequestToJSON( + updateCampaignRequest: UpdateCampaignRequest, +): string { + return JSON.stringify( + UpdateCampaignRequest$outboundSchema.parse(updateCampaignRequest), + ); +} +export function updateCampaignRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateCampaignRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateCampaignRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateeventstream.ts b/src/models/operations/updateeventstream.ts new file mode 100644 index 00000000..e174c7fb --- /dev/null +++ b/src/models/operations/updateeventstream.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateEventStreamRequest = { + /** + * The ID of the event stream. + */ + eventStreamId: string; + updateEventStreamInfo: components.UpdateEventStreamInfo; +}; + +/** @internal */ +export const UpdateEventStreamRequest$inboundSchema: z.ZodType< + UpdateEventStreamRequest, + z.ZodTypeDef, + unknown +> = z.object({ + event_stream_id: z.string(), + UpdateEventStreamInfo: components.UpdateEventStreamInfo$inboundSchema, +}).transform((v) => { + return remap$(v, { + "event_stream_id": "eventStreamId", + "UpdateEventStreamInfo": "updateEventStreamInfo", + }); +}); +/** @internal */ +export type UpdateEventStreamRequest$Outbound = { + event_stream_id: string; + UpdateEventStreamInfo: components.UpdateEventStreamInfo$Outbound; +}; + +/** @internal */ +export const UpdateEventStreamRequest$outboundSchema: z.ZodType< + UpdateEventStreamRequest$Outbound, + z.ZodTypeDef, + UpdateEventStreamRequest +> = z.object({ + eventStreamId: z.string(), + updateEventStreamInfo: components.UpdateEventStreamInfo$outboundSchema, +}).transform((v) => { + return remap$(v, { + eventStreamId: "event_stream_id", + updateEventStreamInfo: "UpdateEventStreamInfo", + }); +}); + +export function updateEventStreamRequestToJSON( + updateEventStreamRequest: UpdateEventStreamRequest, +): string { + return JSON.stringify( + UpdateEventStreamRequest$outboundSchema.parse(updateEventStreamRequest), + ); +} +export function updateEventStreamRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateEventStreamRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEventStreamRequest' from JSON`, + ); +} diff --git a/src/models/operations/updategroupuser.ts b/src/models/operations/updategroupuser.ts index 1a21b95f..50f3f0e3 100644 --- a/src/models/operations/updategroupuser.ts +++ b/src/models/operations/updategroupuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -10,7 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateGroupUserRequestBody = { /** - * The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite. + * The updated duration for which the group can be accessed (in minutes). Use 0 for indefinite, or a negative value to revoke access. */ durationMinutes: number; /** @@ -45,7 +45,6 @@ export const UpdateGroupUserRequestBody$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type UpdateGroupUserRequestBody$Outbound = { duration_minutes: number; @@ -67,19 +66,6 @@ export const UpdateGroupUserRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateGroupUserRequestBody$ { - /** @deprecated use `UpdateGroupUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupUserRequestBody$inboundSchema; - /** @deprecated use `UpdateGroupUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupUserRequestBody$outboundSchema; - /** @deprecated use `UpdateGroupUserRequestBody$Outbound` instead. */ - export type Outbound = UpdateGroupUserRequestBody$Outbound; -} - export function updateGroupUserRequestBodyToJSON( updateGroupUserRequestBody: UpdateGroupUserRequestBody, ): string { @@ -87,7 +73,6 @@ export function updateGroupUserRequestBodyToJSON( UpdateGroupUserRequestBody$outboundSchema.parse(updateGroupUserRequestBody), ); } - export function updateGroupUserRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -114,7 +99,6 @@ export const UpdateGroupUserRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type UpdateGroupUserRequest$Outbound = { group_id: string; @@ -139,19 +123,6 @@ export const UpdateGroupUserRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateGroupUserRequest$ { - /** @deprecated use `UpdateGroupUserRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateGroupUserRequest$inboundSchema; - /** @deprecated use `UpdateGroupUserRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateGroupUserRequest$outboundSchema; - /** @deprecated use `UpdateGroupUserRequest$Outbound` instead. */ - export type Outbound = UpdateGroupUserRequest$Outbound; -} - export function updateGroupUserRequestToJSON( updateGroupUserRequest: UpdateGroupUserRequest, ): string { @@ -159,7 +130,6 @@ export function updateGroupUserRequestToJSON( UpdateGroupUserRequest$outboundSchema.parse(updateGroupUserRequest), ); } - export function updateGroupUserRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/updateidpgroupmappings.ts b/src/models/operations/updateidpgroupmappings.ts index 2531cd0d..bde7515f 100644 --- a/src/models/operations/updateidpgroupmappings.ts +++ b/src/models/operations/updateidpgroupmappings.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -38,7 +38,6 @@ export const Mapping$inboundSchema: z.ZodType = "hidden_from_end_user": "hiddenFromEndUser", }); }); - /** @internal */ export type Mapping$Outbound = { group_id?: string | undefined; @@ -62,23 +61,9 @@ export const Mapping$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Mapping$ { - /** @deprecated use `Mapping$inboundSchema` instead. */ - export const inboundSchema = Mapping$inboundSchema; - /** @deprecated use `Mapping$outboundSchema` instead. */ - export const outboundSchema = Mapping$outboundSchema; - /** @deprecated use `Mapping$Outbound` instead. */ - export type Outbound = Mapping$Outbound; -} - export function mappingToJSON(mapping: Mapping): string { return JSON.stringify(Mapping$outboundSchema.parse(mapping)); } - export function mappingFromJSON( jsonString: string, ): SafeParseResult { @@ -97,7 +82,6 @@ export const UpdateIdpGroupMappingsRequestBody$inboundSchema: z.ZodType< > = z.object({ mappings: z.array(z.lazy(() => Mapping$inboundSchema)), }); - /** @internal */ export type UpdateIdpGroupMappingsRequestBody$Outbound = { mappings: Array; @@ -112,20 +96,6 @@ export const UpdateIdpGroupMappingsRequestBody$outboundSchema: z.ZodType< mappings: z.array(z.lazy(() => Mapping$outboundSchema)), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateIdpGroupMappingsRequestBody$ { - /** @deprecated use `UpdateIdpGroupMappingsRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateIdpGroupMappingsRequestBody$inboundSchema; - /** @deprecated use `UpdateIdpGroupMappingsRequestBody$outboundSchema` instead. */ - export const outboundSchema = - UpdateIdpGroupMappingsRequestBody$outboundSchema; - /** @deprecated use `UpdateIdpGroupMappingsRequestBody$Outbound` instead. */ - export type Outbound = UpdateIdpGroupMappingsRequestBody$Outbound; -} - export function updateIdpGroupMappingsRequestBodyToJSON( updateIdpGroupMappingsRequestBody: UpdateIdpGroupMappingsRequestBody, ): string { @@ -135,7 +105,6 @@ export function updateIdpGroupMappingsRequestBodyToJSON( ), ); } - export function updateIdpGroupMappingsRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -160,7 +129,6 @@ export const UpdateIdpGroupMappingsRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type UpdateIdpGroupMappingsRequest$Outbound = { app_resource_id: string; @@ -182,19 +150,6 @@ export const UpdateIdpGroupMappingsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateIdpGroupMappingsRequest$ { - /** @deprecated use `UpdateIdpGroupMappingsRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateIdpGroupMappingsRequest$inboundSchema; - /** @deprecated use `UpdateIdpGroupMappingsRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateIdpGroupMappingsRequest$outboundSchema; - /** @deprecated use `UpdateIdpGroupMappingsRequest$Outbound` instead. */ - export type Outbound = UpdateIdpGroupMappingsRequest$Outbound; -} - export function updateIdpGroupMappingsRequestToJSON( updateIdpGroupMappingsRequest: UpdateIdpGroupMappingsRequest, ): string { @@ -204,7 +159,6 @@ export function updateIdpGroupMappingsRequestToJSON( ), ); } - export function updateIdpGroupMappingsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/updatepaladin.ts b/src/models/operations/updatepaladin.ts new file mode 100644 index 00000000..b07f2bac --- /dev/null +++ b/src/models/operations/updatepaladin.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdatePaladinRequest = { + /** + * The ID of the Paladin. + */ + paladinId: string; + updatePaladinInfo: components.UpdatePaladinInfo; +}; + +/** @internal */ +export const UpdatePaladinRequest$inboundSchema: z.ZodType< + UpdatePaladinRequest, + z.ZodTypeDef, + unknown +> = z.object({ + paladin_id: z.string(), + UpdatePaladinInfo: components.UpdatePaladinInfo$inboundSchema, +}).transform((v) => { + return remap$(v, { + "paladin_id": "paladinId", + "UpdatePaladinInfo": "updatePaladinInfo", + }); +}); +/** @internal */ +export type UpdatePaladinRequest$Outbound = { + paladin_id: string; + UpdatePaladinInfo: components.UpdatePaladinInfo$Outbound; +}; + +/** @internal */ +export const UpdatePaladinRequest$outboundSchema: z.ZodType< + UpdatePaladinRequest$Outbound, + z.ZodTypeDef, + UpdatePaladinRequest +> = z.object({ + paladinId: z.string(), + updatePaladinInfo: components.UpdatePaladinInfo$outboundSchema, +}).transform((v) => { + return remap$(v, { + paladinId: "paladin_id", + updatePaladinInfo: "UpdatePaladinInfo", + }); +}); + +export function updatePaladinRequestToJSON( + updatePaladinRequest: UpdatePaladinRequest, +): string { + return JSON.stringify( + UpdatePaladinRequest$outboundSchema.parse(updatePaladinRequest), + ); +} +export function updatePaladinRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePaladinRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePaladinRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateresourceuser.ts b/src/models/operations/updateresourceuser.ts index 19fc6d8d..59b84148 100644 --- a/src/models/operations/updateresourceuser.ts +++ b/src/models/operations/updateresourceuser.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -45,7 +45,6 @@ export const UpdateResourceUserRequestBody$inboundSchema: z.ZodType< "access_level_remote_id": "accessLevelRemoteId", }); }); - /** @internal */ export type UpdateResourceUserRequestBody$Outbound = { duration_minutes: number; @@ -67,19 +66,6 @@ export const UpdateResourceUserRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateResourceUserRequestBody$ { - /** @deprecated use `UpdateResourceUserRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateResourceUserRequestBody$inboundSchema; - /** @deprecated use `UpdateResourceUserRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateResourceUserRequestBody$outboundSchema; - /** @deprecated use `UpdateResourceUserRequestBody$Outbound` instead. */ - export type Outbound = UpdateResourceUserRequestBody$Outbound; -} - export function updateResourceUserRequestBodyToJSON( updateResourceUserRequestBody: UpdateResourceUserRequestBody, ): string { @@ -89,7 +75,6 @@ export function updateResourceUserRequestBodyToJSON( ), ); } - export function updateResourceUserRequestBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -116,7 +101,6 @@ export const UpdateResourceUserRequest$inboundSchema: z.ZodType< "RequestBody": "requestBody", }); }); - /** @internal */ export type UpdateResourceUserRequest$Outbound = { resource_id: string; @@ -141,19 +125,6 @@ export const UpdateResourceUserRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateResourceUserRequest$ { - /** @deprecated use `UpdateResourceUserRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateResourceUserRequest$inboundSchema; - /** @deprecated use `UpdateResourceUserRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateResourceUserRequest$outboundSchema; - /** @deprecated use `UpdateResourceUserRequest$Outbound` instead. */ - export type Outbound = UpdateResourceUserRequest$Outbound; -} - export function updateResourceUserRequestToJSON( updateResourceUserRequest: UpdateResourceUserRequest, ): string { @@ -161,7 +132,6 @@ export function updateResourceUserRequestToJSON( UpdateResourceUserRequest$outboundSchema.parse(updateResourceUserRequest), ); } - export function updateResourceUserRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/user.ts b/src/models/operations/user.ts index 39d3de01..e34f9379 100644 --- a/src/models/operations/user.ts +++ b/src/models/operations/user.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -32,7 +32,6 @@ export const UserRequest$inboundSchema: z.ZodType< "user_id": "userId", }); }); - /** @internal */ export type UserRequest$Outbound = { user_id?: string | undefined; @@ -53,23 +52,9 @@ export const UserRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UserRequest$ { - /** @deprecated use `UserRequest$inboundSchema` instead. */ - export const inboundSchema = UserRequest$inboundSchema; - /** @deprecated use `UserRequest$outboundSchema` instead. */ - export const outboundSchema = UserRequest$outboundSchema; - /** @deprecated use `UserRequest$Outbound` instead. */ - export type Outbound = UserRequest$Outbound; -} - export function userRequestToJSON(userRequest: UserRequest): string { return JSON.stringify(UserRequest$outboundSchema.parse(userRequest)); } - export function userRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/sdk/accessrules.ts b/src/sdk/accessrules.ts index 7131d89f..1d06d8d5 100644 --- a/src/sdk/accessrules.ts +++ b/src/sdk/accessrules.ts @@ -4,6 +4,7 @@ import { accessRulesCreateAccessRule } from "../funcs/accessRulesCreateAccessRule.js"; import { accessRulesGetAccessRule } from "../funcs/accessRulesGetAccessRule.js"; +import { accessRulesGetAccessRules } from "../funcs/accessRulesGetAccessRules.js"; import { accessRulesUpdateAccessRule } from "../funcs/accessRulesUpdateAccessRule.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; @@ -11,6 +12,20 @@ import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class AccessRules extends ClientSDK { + /** + * Returns a list of access rules for your organization. + */ + async getAccessRules( + request: operations.GetAccessRulesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(accessRulesGetAccessRules( + this, + request, + options, + )); + } + /** * Creates a new access rule config for the given group_id. */ diff --git a/src/sdk/apps.ts b/src/sdk/apps.ts index f4c36729..8f414c92 100644 --- a/src/sdk/apps.ts +++ b/src/sdk/apps.ts @@ -12,6 +12,9 @@ import { unwrapAsync } from "../types/fp.js"; export class Apps extends ClientSDK { /** + * Get apps + * + * @remarks * Returns a list of `App` objects. */ async getApps( @@ -26,6 +29,9 @@ export class Apps extends ClientSDK { } /** + * Get app by ID + * + * @remarks * Returns an `App` object. */ async getApp( diff --git a/src/sdk/bundles.ts b/src/sdk/bundles.ts index 4350e9fa..85299198 100644 --- a/src/sdk/bundles.ts +++ b/src/sdk/bundles.ts @@ -23,6 +23,9 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Bundles extends ClientSDK { /** + * Get bundles + * + * @remarks * Returns a list of `Bundle` objects. */ async getBundles( @@ -51,6 +54,9 @@ export class Bundles extends ClientSDK { } /** + * Get bundle by ID + * + * @remarks * Returns a `Bundle` object. */ async getBundle( diff --git a/src/sdk/campaigns.ts b/src/sdk/campaigns.ts new file mode 100644 index 00000000..30b0b193 --- /dev/null +++ b/src/sdk/campaigns.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { campaignsCreateCampaign } from "../funcs/campaignsCreateCampaign.js"; +import { campaignsEndCampaign } from "../funcs/campaignsEndCampaign.js"; +import { campaignsGetCampaign } from "../funcs/campaignsGetCampaign.js"; +import { campaignsGetCampaigns } from "../funcs/campaignsGetCampaigns.js"; +import { campaignsStartCampaign } from "../funcs/campaignsStartCampaign.js"; +import { campaignsStopCampaign } from "../funcs/campaignsStopCampaign.js"; +import { campaignsUpdateCampaign } from "../funcs/campaignsUpdateCampaign.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Campaigns extends ClientSDK { + /** + * Returns a list of `Campaign` objects. + */ + async getCampaigns( + request: operations.GetCampaignsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(campaignsGetCampaigns( + this, + request, + options, + )); + } + + /** + * Creates a campaign. Campaign scope only supports direct access edges: + * `configuration.query.edgeFilter.directOnly` defaults to `true`, is + * always stored as `true`, and passing `false` returns 400. + */ + async createCampaign( + request: components.CreateCampaignInfo, + options?: RequestOptions, + ): Promise { + return unwrapAsync(campaignsCreateCampaign( + this, + request, + options, + )); + } + + /** + * Get campaign by ID + * + * @remarks + * Returns a `Campaign` object. + */ + async getCampaign( + request: operations.GetCampaignRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(campaignsGetCampaign( + this, + request, + options, + )); + } + + /** + * Update campaign + * + * @remarks + * Partially updates a campaign. Omitted fields are left unchanged. + * `configuration.query` and `configuration.reviewer_assignment_policy` + * cannot be updated after create; including either field returns 400. + * `configuration.cron_expression` and + * `configuration.recurring_duration_days` may only be set on template + * campaigns; setting them on a one-off campaign returns 400. + * `configuration.is_template` is immutable and not accepted on update. + * Configuration updates on a stopped or ended (non-template) campaign + * return 400. Name-only updates are still allowed. + */ + async updateCampaign( + request: operations.UpdateCampaignRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(campaignsUpdateCampaign( + this, + request, + options, + )); + } + + /** + * Start campaign + * + * @remarks + * Starts a draft campaign immediately, setting `started_at` and + * `started_by_user_id`. Returns 400 if the campaign is not in draft + * state, or if it is a recurring template (`is_template: true`) — + * templates spawn draft campaigns on their schedule and cannot be + * started directly. + */ + async startCampaign( + request: operations.StartCampaignRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(campaignsStartCampaign( + this, + request, + options, + )); + } + + /** + * Stop campaign + * + * @remarks + * Stops an ongoing campaign immediately, setting `stopped_at` and + * `stopped_by_user_id`. Returns 400 if the campaign has not started or + * has already stopped. + */ + async stopCampaign( + request: operations.StopCampaignRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(campaignsStopCampaign( + this, + request, + options, + )); + } + + /** + * End campaign + * + * @remarks + * Ends a stopped campaign, setting `ended_at` and `ended_by_user_id`, + * applying pending access changes, and queuing report generation. + * Returns 400 unless the campaign is started and stopped and not already + * ended. + */ + async endCampaign( + request: operations.EndCampaignRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(campaignsEndCampaign( + this, + request, + options, + )); + } +} diff --git a/src/sdk/delegations.ts b/src/sdk/delegations.ts new file mode 100644 index 00000000..763453f7 --- /dev/null +++ b/src/sdk/delegations.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { delegationsCreateDelegation } from "../funcs/delegationsCreateDelegation.js"; +import { delegationsDeleteDelegation } from "../funcs/delegationsDeleteDelegation.js"; +import { delegationsGetDelegation } from "../funcs/delegationsGetDelegation.js"; +import { delegationsGetDelegations } from "../funcs/delegationsGetDelegations.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Delegations extends ClientSDK { + /** + * Get delegations + * + * @remarks + * Returns a list of request reviewer delegations configured for your organization. + */ + async getDelegations( + request: operations.GetDelegationsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(delegationsGetDelegations( + this, + request, + options, + )); + } + + /** + * Creates a new request reviewer delegation to delegate access review requests from one user to another. + */ + async createDelegation( + request: components.CreateDelegationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(delegationsCreateDelegation( + this, + request, + options, + )); + } + + /** + * Get delegation by ID + * + * @remarks + * Returns a specific delegation by its ID. + */ + async getDelegation( + request: operations.GetDelegationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(delegationsGetDelegation( + this, + request, + options, + )); + } + + /** + * Deletes a delegation by its ID. + */ + async deleteDelegation( + request: operations.DeleteDelegationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(delegationsDeleteDelegation( + this, + request, + options, + )); + } +} diff --git a/src/sdk/events.ts b/src/sdk/events.ts index f6ae040b..30d6b6c7 100644 --- a/src/sdk/events.ts +++ b/src/sdk/events.ts @@ -3,8 +3,11 @@ */ import { eventsEvents } from "../funcs/eventsEvents.js"; +import { eventsGetEvent } from "../funcs/eventsGetEvent.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Events extends ClientSDK { @@ -21,4 +24,21 @@ export class Events extends ClientSDK { options, )); } + + /** + * Get event by ID + * + * @remarks + * Returns an `Event` object. + */ + async getEvent( + request: operations.GetEventRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(eventsGetEvent( + this, + request, + options, + )); + } } diff --git a/src/sdk/eventstreams.ts b/src/sdk/eventstreams.ts new file mode 100644 index 00000000..3ce4922e --- /dev/null +++ b/src/sdk/eventstreams.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { eventStreamsCreateEventStream } from "../funcs/eventStreamsCreateEventStream.js"; +import { eventStreamsDeleteEventStream } from "../funcs/eventStreamsDeleteEventStream.js"; +import { eventStreamsGetEventStreams } from "../funcs/eventStreamsGetEventStreams.js"; +import { eventStreamsUpdateEventStream } from "../funcs/eventStreamsUpdateEventStream.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class EventStreams extends ClientSDK { + /** + * Get event streams + * + * @remarks + * Returns a list of configured event streaming connections for your organization. + */ + async getEventStreams( + options?: RequestOptions, + ): Promise { + return unwrapAsync(eventStreamsGetEventStreams( + this, + options, + )); + } + + /** + * Create event stream + * + * @remarks + * Creates a new event streaming connection. + */ + async createEventStream( + request: components.CreateEventStreamInfo, + options?: RequestOptions, + ): Promise { + return unwrapAsync(eventStreamsCreateEventStream( + this, + request, + options, + )); + } + + /** + * Update event stream + * + * @remarks + * Updates an existing event streaming connection. + */ + async updateEventStream( + request: operations.UpdateEventStreamRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(eventStreamsUpdateEventStream( + this, + request, + options, + )); + } + + /** + * Delete event stream + * + * @remarks + * Deletes an event streaming connection. + */ + async deleteEventStream( + request: operations.DeleteEventStreamRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(eventStreamsDeleteEventStream( + this, + request, + options, + )); + } +} diff --git a/src/sdk/groupbindings.ts b/src/sdk/groupbindings.ts index 9a8da48a..ea4f31f2 100644 --- a/src/sdk/groupbindings.ts +++ b/src/sdk/groupbindings.ts @@ -15,6 +15,9 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class GroupBindings extends ClientSDK { /** + * Get group bindings + * + * @remarks * Returns a list of `GroupBinding` objects. */ async getGroupBindings( @@ -59,6 +62,9 @@ export class GroupBindings extends ClientSDK { } /** + * Get group binding by ID + * + * @remarks * Returns a `GroupBinding` object. */ async getGroupBinding( diff --git a/src/sdk/groups.ts b/src/sdk/groups.ts index 883cc7ca..b46d7e83 100644 --- a/src/sdk/groups.ts +++ b/src/sdk/groups.ts @@ -20,6 +20,7 @@ import { groupsGetGroups } from "../funcs/groupsGetGroups.js"; import { groupsGetGroupTags } from "../funcs/groupsGetGroupTags.js"; import { groupsGetGroupUsers } from "../funcs/groupsGetGroupUsers.js"; import { groupsGetGroupVisibility } from "../funcs/groupsGetGroupVisibility.js"; +import { groupsGetUserGroups } from "../funcs/groupsGetUserGroups.js"; import { groupsRemoveGroupContainingGroup } from "../funcs/groupsRemoveGroupContainingGroup.js"; import { groupsSetGroupMessageChannels } from "../funcs/groupsSetGroupMessageChannels.js"; import { groupsSetGroupOnCallSchedules } from "../funcs/groupsSetGroupOnCallSchedules.js"; @@ -37,6 +38,9 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Groups extends ClientSDK { /** + * Get groups + * + * @remarks * Returns a list of groups for your organization. */ async getGroups( @@ -79,6 +83,9 @@ export class Groups extends ClientSDK { } /** + * Get group by ID + * + * @remarks * Returns a `Group` object. */ async getGroup( @@ -191,6 +198,9 @@ export class Groups extends ClientSDK { } /** + * Get nested groups + * + * @remarks * Gets the list of groups that the group gives access to. */ async getGroupContainingGroups( @@ -219,6 +229,9 @@ export class Groups extends ClientSDK { } /** + * Get nested group by ID + * + * @remarks * Gets a specific containing group for a group. */ async getGroupContainingGroup( @@ -421,4 +434,18 @@ export class Groups extends ClientSDK { options, )); } + + /** + * Returns all groups that the user is a member of. + */ + async getUserGroups( + request: operations.GetUserGroupsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(groupsGetUserGroups( + this, + request, + options, + )); + } } diff --git a/src/sdk/idpgroupmappings.ts b/src/sdk/idpgroupmappings.ts index f2b80984..512ea73e 100644 --- a/src/sdk/idpgroupmappings.ts +++ b/src/sdk/idpgroupmappings.ts @@ -2,7 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { idpGroupMappingsCreateIdpGroupMapping } from "../funcs/idpGroupMappingsCreateIdpGroupMapping.js"; import { idpGroupMappingsDeleteIdpGroupMappings } from "../funcs/idpGroupMappingsDeleteIdpGroupMappings.js"; +import { idpGroupMappingsGetIdpGroupMapping } from "../funcs/idpGroupMappingsGetIdpGroupMapping.js"; import { idpGroupMappingsGetIdpGroupMappings } from "../funcs/idpGroupMappingsGetIdpGroupMappings.js"; import { idpGroupMappingsUpdateIdpGroupMappings } from "../funcs/idpGroupMappingsUpdateIdpGroupMappings.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; @@ -39,6 +41,38 @@ export class IdpGroupMappings extends ClientSDK { )); } + /** + * Gets an `IdpGroupMapping` object for an Okta app and group. + */ + async getIdpGroupMapping( + request: operations.GetIdpGroupMappingRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(idpGroupMappingsGetIdpGroupMapping( + this, + request, + options, + )); + } + + /** + * Creates or updates an individual `IdpGroupMapping` object (upsert operation). + * + * **Behavior:** + * - If the mapping doesn't exist, it will be created with the provided values + * - If the mapping exists, only the fields provided in the request will be updated + */ + async createIdpGroupMapping( + request: operations.CreateIdpGroupMappingRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(idpGroupMappingsCreateIdpGroupMapping( + this, + request, + options, + )); + } + /** * Deletes an `IdpGroupMapping` object. */ diff --git a/src/sdk/messagechannels.ts b/src/sdk/messagechannels.ts index afa0342c..62ea87d0 100644 --- a/src/sdk/messagechannels.ts +++ b/src/sdk/messagechannels.ts @@ -12,6 +12,9 @@ import { unwrapAsync } from "../types/fp.js"; export class MessageChannels extends ClientSDK { /** + * Get message channels + * + * @remarks * Returns a list of `MessageChannel` objects. */ async getMessageChannels( @@ -38,6 +41,9 @@ export class MessageChannels extends ClientSDK { } /** + * Get message channel by ID + * + * @remarks * Gets a `MessageChannel` object. */ async getMessageChannel( diff --git a/src/sdk/oncallschedules.ts b/src/sdk/oncallschedules.ts index db989863..02c9e16e 100644 --- a/src/sdk/oncallschedules.ts +++ b/src/sdk/oncallschedules.ts @@ -12,6 +12,9 @@ import { unwrapAsync } from "../types/fp.js"; export class OnCallSchedules extends ClientSDK { /** + * Get on call schedules + * + * @remarks * Returns a list of `OnCallSchedule` objects. */ async getOnCallSchedules( @@ -38,6 +41,9 @@ export class OnCallSchedules extends ClientSDK { } /** + * Get on call schedule by ID + * + * @remarks * Gets a `OnCallSchedule` object. */ async getOnCallSchedule( diff --git a/src/sdk/opalqueries.ts b/src/sdk/opalqueries.ts new file mode 100644 index 00000000..90b078ad --- /dev/null +++ b/src/sdk/opalqueries.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { opalQueriesRunOpalQuery } from "../funcs/opalQueriesRunOpalQuery.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class OpalQueries extends ClientSDK { + /** + * Run an ad-hoc OpalQuery + * + * @remarks + * Runs an ad-hoc OpalQuery and returns the results. Supports NODE queries (users, resources, groups) and ACCESS_PATH queries (principal-to-entitlement access edges). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta. + */ + async runOpalQuery( + request: components.RunOpalQueryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(opalQueriesRunOpalQuery( + this, + request, + options, + )); + } +} diff --git a/src/sdk/owners.ts b/src/sdk/owners.ts index 24fe4e20..f5ac3a6f 100644 --- a/src/sdk/owners.ts +++ b/src/sdk/owners.ts @@ -18,6 +18,9 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Owners extends ClientSDK { /** + * Get owners + * + * @remarks * Returns a list of `Owner` objects. */ async getOwners( @@ -60,6 +63,9 @@ export class Owners extends ClientSDK { } /** + * Get owner by ID + * + * @remarks * Returns an `Owner` object. */ async getOwner( diff --git a/src/sdk/paladin.ts b/src/sdk/paladin.ts new file mode 100644 index 00000000..af1bc3ee --- /dev/null +++ b/src/sdk/paladin.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paladinCreatePaladin } from "../funcs/paladinCreatePaladin.js"; +import { paladinCreatePaladinContextSource } from "../funcs/paladinCreatePaladinContextSource.js"; +import { paladinDeletePaladin } from "../funcs/paladinDeletePaladin.js"; +import { paladinDeletePaladinContextSource } from "../funcs/paladinDeletePaladinContextSource.js"; +import { paladinGetPaladin } from "../funcs/paladinGetPaladin.js"; +import { paladinGetPaladinFromName } from "../funcs/paladinGetPaladinFromName.js"; +import { paladinListPaladinContextSources } from "../funcs/paladinListPaladinContextSources.js"; +import { paladinUpdatePaladin } from "../funcs/paladinUpdatePaladin.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Paladin extends ClientSDK { + /** + * Create Paladin + * + * @remarks + * Creates a new `Paladin`. + */ + async createPaladin( + request: components.CreatePaladinInfo, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paladinCreatePaladin( + this, + request, + options, + )); + } + + /** + * Get Paladin by ID + * + * @remarks + * Returns a `Paladin` object. + */ + async getPaladin( + request: operations.GetPaladinRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paladinGetPaladin( + this, + request, + options, + )); + } + + /** + * Update Paladin + * + * @remarks + * Updates a `Paladin` object. + */ + async updatePaladin( + request: operations.UpdatePaladinRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paladinUpdatePaladin( + this, + request, + options, + )); + } + + /** + * Delete Paladin + * + * @remarks + * Deletes a Paladin, removing the underlying service user. + */ + async deletePaladin( + request: operations.DeletePaladinRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paladinDeletePaladin( + this, + request, + options, + )); + } + + /** + * Get Paladins by name + * + * @remarks + * Returns all Paladins whose name exactly matches the given name. Names are not unique, so the result is a list and may be empty. + */ + async getPaladinFromName( + request: operations.GetPaladinFromNameRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paladinGetPaladinFromName( + this, + request, + options, + )); + } + + /** + * List Paladin context sources + * + * @remarks + * Returns the context sources (Slack channels and documents) configured for a Paladin. + */ + async listPaladinContextSources( + request: operations.ListPaladinContextSourcesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paladinListPaladinContextSources( + this, + request, + options, + )); + } + + /** + * Add a Paladin context source + * + * @remarks + * Configures a context source (a Slack channel or a document) for a Paladin to read. Idempotent, so re-adding an existing source returns it. + */ + async createPaladinContextSource( + request: operations.CreatePaladinContextSourceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paladinCreatePaladinContextSource( + this, + request, + options, + )); + } + + /** + * Remove a Paladin context source + * + * @remarks + * Removes a context source from a Paladin. + */ + async deletePaladinContextSource( + request: operations.DeletePaladinContextSourceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paladinDeletePaladinContextSource( + this, + request, + options, + )); + } +} diff --git a/src/sdk/requests.ts b/src/sdk/requests.ts index 26c0b71c..762337bb 100644 --- a/src/sdk/requests.ts +++ b/src/sdk/requests.ts @@ -4,7 +4,10 @@ import { requestsApproveRequest } from "../funcs/requestsApproveRequest.js"; import { requestsCreateRequest } from "../funcs/requestsCreateRequest.js"; +import { requestsCreateRequestComment } from "../funcs/requestsCreateRequestComment.js"; +import { requestsDenyRequest } from "../funcs/requestsDenyRequest.js"; import { requestsGetRequest } from "../funcs/requestsGetRequest.js"; +import { requestsGetRequestComments } from "../funcs/requestsGetRequestComments.js"; import { requestsGetRequests } from "../funcs/requestsGetRequests.js"; import { requestsGetRequestsRelay } from "../funcs/requestsGetRequestsRelay.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; @@ -15,6 +18,9 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Requests extends ClientSDK { /** + * Get requests + * + * @remarks * Returns a list of requests for your organization that is visible by the admin. */ async getRequests( @@ -43,6 +49,9 @@ export class Requests extends ClientSDK { } /** + * Get requests via Relay + * + * @remarks * Returns a paginated list of requests using Relay-style cursor pagination. * * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. @@ -59,6 +68,9 @@ export class Requests extends ClientSDK { } /** + * Get request by ID + * + * @remarks * Returns a request by ID. */ async getRequest( @@ -85,4 +97,46 @@ export class Requests extends ClientSDK { options, )); } + + /** + * Deny an access request + */ + async denyRequest( + request: operations.DenyRequestRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(requestsDenyRequest( + this, + request, + options, + )); + } + + /** + * Returns a list of comments for a specific request. + */ + async getRequestComments( + request: operations.GetRequestCommentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(requestsGetRequestComments( + this, + request, + options, + )); + } + + /** + * Comment on an access request + */ + async createRequestComment( + request: operations.CreateRequestCommentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(requestsCreateRequestComment( + this, + request, + options, + )); + } } diff --git a/src/sdk/resources.ts b/src/sdk/resources.ts index e58f662d..4d16d9cb 100644 --- a/src/sdk/resources.ts +++ b/src/sdk/resources.ts @@ -9,6 +9,7 @@ import { resourcesDeleteResource } from "../funcs/resourcesDeleteResource.js"; import { resourcesDeleteResourceNhi } from "../funcs/resourcesDeleteResourceNhi.js"; import { resourcesDeleteResourceUser } from "../funcs/resourcesDeleteResourceUser.js"; import { resourcesGetResource } from "../funcs/resourcesGetResource.js"; +import { resourcesGetResourceGroups } from "../funcs/resourcesGetResourceGroups.js"; import { resourcesGetResourceMessageChannels } from "../funcs/resourcesGetResourceMessageChannels.js"; import { resourcesGetResourceNhis } from "../funcs/resourcesGetResourceNhis.js"; import { resourcesGetResourceReviewers } from "../funcs/resourcesGetResourceReviewers.js"; @@ -19,6 +20,7 @@ import { resourcesGetResourceTags } from "../funcs/resourcesGetResourceTags.js"; import { resourcesGetResourceUser } from "../funcs/resourcesGetResourceUser.js"; import { resourcesGetResourceUsers } from "../funcs/resourcesGetResourceUsers.js"; import { resourcesGetResourceVisibility } from "../funcs/resourcesGetResourceVisibility.js"; +import { resourcesGetUserResources } from "../funcs/resourcesGetUserResources.js"; import { resourcesResourceUserAccessStatusRetrieve } from "../funcs/resourcesResourceUserAccessStatusRetrieve.js"; import { resourcesSetResourceMessageChannels } from "../funcs/resourcesSetResourceMessageChannels.js"; import { resourcesSetResourceReviewers } from "../funcs/resourcesSetResourceReviewers.js"; @@ -35,6 +37,9 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Resources extends ClientSDK { /** + * Get resources + * + * @remarks * Returns a list of resources for your organization. */ async getResources( @@ -79,6 +84,9 @@ export class Resources extends ClientSDK { } /** + * Get resource by ID + * + * @remarks * Retrieves a resource. */ async getResource( @@ -233,6 +241,9 @@ export class Resources extends ClientSDK { } /** + * Get resource users + * + * @remarks * Gets the list of users for this resource. */ async getResourceUsers( @@ -317,6 +328,9 @@ export class Resources extends ClientSDK { } /** + * Get resource user + * + * @remarks * Returns information about a specific user's access to a resource. */ async getResourceUser( @@ -387,4 +401,32 @@ export class Resources extends ClientSDK { options, )); } + + /** + * Gets the list of resources for this user. + */ + async getUserResources( + request: operations.GetUserResourcesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(resourcesGetUserResources( + this, + request, + options, + )); + } + + /** + * Returns a list of groups that grant access to the resource + */ + async getResourceGroups( + request: operations.GetResourceGroupsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(resourcesGetResourceGroups( + this, + request, + options, + )); + } } diff --git a/src/sdk/scopedrolepermissions.ts b/src/sdk/scopedrolepermissions.ts deleted file mode 100644 index 952251ea..00000000 --- a/src/sdk/scopedrolepermissions.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { resourcesGetResourceScopedRolePermissions } from "../funcs/resourcesGetResourceScopedRolePermissions.js"; -import { resourcesSetResourceScopedRolePermissions } from "../funcs/resourcesSetResourceScopedRolePermissions.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class ScopedRolePermissions extends ClientSDK { - /** - * Returns all the scoped role permissions that apply to the given resource. Only OPAL_SCOPED_ROLE resource type supports this field. - */ - async getResourceScopedRolePermissions( - request: operations.GetResourceScopedRolePermissionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(resourcesGetResourceScopedRolePermissions( - this, - request, - options, - )); - } - - /** - * Sets all the scoped role permissions on an OPAL_SCOPED_ROLE resource. - */ - async setResourceScopedRolePermissions( - request: operations.SetResourceScopedRolePermissionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(resourcesSetResourceScopedRolePermissions( - this, - request, - options, - )); - } -} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index c38332a4..7b1847a1 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -6,20 +6,25 @@ import { ClientSDK } from "../lib/sdks.js"; import { AccessRules } from "./accessrules.js"; import { Apps } from "./apps.js"; import { Bundles } from "./bundles.js"; +import { Campaigns } from "./campaigns.js"; import { ConfigurationTemplates } from "./configurationtemplates.js"; +import { Delegations } from "./delegations.js"; import { Events } from "./events.js"; +import { EventStreams } from "./eventstreams.js"; import { GroupBindings } from "./groupbindings.js"; import { Groups } from "./groups.js"; import { IdpGroupMappings } from "./idpgroupmappings.js"; import { MessageChannels } from "./messagechannels.js"; import { NonHumanIdentities } from "./nonhumanidentities.js"; import { OnCallSchedules } from "./oncallschedules.js"; +import { OpalQueries } from "./opalqueries.js"; import { Owners } from "./owners.js"; +import { Paladin } from "./paladin.js"; import { Requests } from "./requests.js"; import { Resources } from "./resources.js"; -import { ScopedRolePermissions } from "./scopedrolepermissions.js"; import { Sessions } from "./sessions.js"; import { Tags } from "./tags.js"; +import { Tokens } from "./tokens.js"; import { Uars } from "./uars.js"; import { Users } from "./users.js"; @@ -34,6 +39,11 @@ export class OpalMcp extends ClientSDK { return (this._bundles ??= new Bundles(this._options)); } + private _campaigns?: Campaigns; + get campaigns(): Campaigns { + return (this._campaigns ??= new Campaigns(this._options)); + } + private _configurationTemplates?: ConfigurationTemplates; get configurationTemplates(): ConfigurationTemplates { return (this._configurationTemplates ??= new ConfigurationTemplates( @@ -41,6 +51,11 @@ export class OpalMcp extends ClientSDK { )); } + private _eventStreams?: EventStreams; + get eventStreams(): EventStreams { + return (this._eventStreams ??= new EventStreams(this._options)); + } + private _events?: Events; get events(): Events { return (this._events ??= new Events(this._options)); @@ -81,11 +96,9 @@ export class OpalMcp extends ClientSDK { return (this._nonHumanIdentities ??= new NonHumanIdentities(this._options)); } - private _scopedRolePermissions?: ScopedRolePermissions; - get scopedRolePermissions(): ScopedRolePermissions { - return (this._scopedRolePermissions ??= new ScopedRolePermissions( - this._options, - )); + private _paladin?: Paladin; + get paladin(): Paladin { + return (this._paladin ??= new Paladin(this._options)); } private _sessions?: Sessions; @@ -118,8 +131,23 @@ export class OpalMcp extends ClientSDK { return (this._onCallSchedules ??= new OnCallSchedules(this._options)); } + private _opalQueries?: OpalQueries; + get opalQueries(): OpalQueries { + return (this._opalQueries ??= new OpalQueries(this._options)); + } + + private _tokens?: Tokens; + get tokens(): Tokens { + return (this._tokens ??= new Tokens(this._options)); + } + private _uars?: Uars; get uars(): Uars { return (this._uars ??= new Uars(this._options)); } + + private _delegations?: Delegations; + get delegations(): Delegations { + return (this._delegations ??= new Delegations(this._options)); + } } diff --git a/src/sdk/tags.ts b/src/sdk/tags.ts index b69fbea8..4adf15fd 100644 --- a/src/sdk/tags.ts +++ b/src/sdk/tags.ts @@ -21,6 +21,9 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Tags extends ClientSDK { /** + * Get tag by ID + * + * @remarks * UNSTABLE. May be removed at any time. Gets a tag with the given id. */ async getTagByID( @@ -77,6 +80,9 @@ export class Tags extends ClientSDK { } /** + * Get tags + * + * @remarks * Returns a list of tags created by your organization. */ async getTags( diff --git a/src/sdk/tokens.ts b/src/sdk/tokens.ts new file mode 100644 index 00000000..0740eaae --- /dev/null +++ b/src/sdk/tokens.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tokensDeleteToken } from "../funcs/tokensDeleteToken.js"; +import { tokensGetTokens } from "../funcs/tokensGetTokens.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Tokens extends ClientSDK { + /** + * Get tokens + * + * @remarks + * Returns a list of first-party API tokens for your organization. Requires admin access. + */ + async getTokens( + request: operations.GetTokensRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tokensGetTokens( + this, + request, + options, + )); + } + + /** + * Delete token + * + * @remarks + * Deletes a first-party API token. Admins can delete any token. Non-admins can only delete their own tokens when the organization allows all users to create API tokens. + */ + async deleteToken( + request: operations.DeleteTokenRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tokensDeleteToken( + this, + request, + options, + )); + } +} diff --git a/src/sdk/uars.ts b/src/sdk/uars.ts index 80fccf11..237c27e0 100644 --- a/src/sdk/uars.ts +++ b/src/sdk/uars.ts @@ -13,7 +13,9 @@ import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Uars extends ClientSDK { /** - * Returns a list of `UAR` objects. + * Returns a list of `UAR` objects. Deprecated in favor of `GET /campaigns`. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async getUARs( request: operations.GetUARsRequest, @@ -27,7 +29,9 @@ export class Uars extends ClientSDK { } /** - * Starts a User Access Review. + * Starts a User Access Review. Deprecated in favor of `POST /campaigns`. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async createUar( request: components.CreateUARInfo, @@ -41,7 +45,9 @@ export class Uars extends ClientSDK { } /** - * Retrieves a specific UAR. + * Retrieves a specific UAR. Deprecated in favor of `GET /campaigns/{campaign_id}`. + * + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ async getUar( request: operations.GetUarRequest, diff --git a/src/sdk/users.ts b/src/sdk/users.ts index 3c2a5fea..4bd2c8a3 100644 --- a/src/sdk/users.ts +++ b/src/sdk/users.ts @@ -2,8 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { usersGetRemoteUsers } from "../funcs/usersGetRemoteUsers.js"; import { usersGetUsers } from "../funcs/usersGetUsers.js"; import { usersGetUserTags } from "../funcs/usersGetUserTags.js"; +import { usersGetUserWhoami } from "../funcs/usersGetUserWhoami.js"; import { usersUser } from "../funcs/usersUser.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; @@ -52,6 +54,32 @@ export class Users extends ClientSDK { )); } + /** + * Returns a list of remote users for your organization. + */ + async getRemoteUsers( + request: operations.GetRemoteUsersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersGetRemoteUsers( + this, + request, + options, + )); + } + + /** + * Returns the user that the provided API token authenticates as. + */ + async getUserWhoami( + options?: RequestOptions, + ): Promise { + return unwrapAsync(usersGetUserWhoami( + this, + options, + )); + } + /** * Returns all tags applied to the user. */ diff --git a/src/types/async.ts b/src/types/async.ts index 689dba5d..1543b95c 100644 --- a/src/types/async.ts +++ b/src/types/async.ts @@ -21,16 +21,17 @@ export type APICall = export class APIPromise implements Promise { readonly #promise: Promise<[T, APICall]>; - readonly #unwrapped: Promise; + #unwrapped: Promise | null; readonly [Symbol.toStringTag] = "APIPromise"; constructor(p: [T, APICall] | Promise<[T, APICall]>) { this.#promise = p instanceof Promise ? p : Promise.resolve(p); - this.#unwrapped = - p instanceof Promise - ? this.#promise.then(([value]) => value) - : Promise.resolve(p[0]); + this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]); + } + + #getUnwrapped(): Promise { + return (this.#unwrapped ??= this.#promise.then(([value]) => value)); } then( @@ -55,11 +56,11 @@ export class APIPromise implements Promise { | null | undefined, ): Promise { - return this.#unwrapped.catch(onrejected); + return this.#getUnwrapped().catch(onrejected); } finally(onfinally?: (() => void) | null | undefined): Promise { - return this.#unwrapped.finally(onfinally); + return this.#getUnwrapped().finally(onfinally); } $inspect(): Promise<[T, APICall]> { diff --git a/src/types/blobs.ts b/src/types/blobs.ts index 4ce84602..cce2892d 100644 --- a/src/types/blobs.ts +++ b/src/types/blobs.ts @@ -2,13 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; -export const blobLikeSchema: z.ZodType = - z.custom(isBlobLike, { - message: "expected a Blob, File or Blob-like object", - fatal: true, - }); +export const blobLikeSchema: z.ZodType = z.custom< + Blob +>(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, +}); export function isBlobLike(val: unknown): val is Blob { if (val instanceof Blob) { diff --git a/src/types/constdatetime.ts b/src/types/constdatetime.ts index eeff4dde..fe62144e 100644 --- a/src/types/constdatetime.ts +++ b/src/types/constdatetime.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export function constDateTime( val: string, diff --git a/src/types/enums.ts b/src/types/enums.ts index 6fb6d910..aba0ffd2 100644 --- a/src/types/enums.ts +++ b/src/types/enums.ts @@ -2,15 +2,44 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -declare const __brand: unique symbol; -export type Unrecognized = T & { [__brand]: "unrecognized" }; +import * as z from "zod/v3"; +import { Unrecognized, unrecognized } from "./unrecognized.js"; -export function catchUnrecognizedEnum(value: T): Unrecognized { - return value as Unrecognized; +export type ClosedEnum>> = + T[keyof T]; +export type OpenEnum>> = + | T[keyof T] + | Unrecognized; + +export function inboundSchema>( + enumObj: T, +): z.ZodType, z.ZodTypeDef, unknown> { + const options = Object.values(enumObj); + return z.union([ + ...options.map(x => z.literal(x)), + z.string().transform(x => unrecognized(x)), + ] as any); } -type Prettify = { [K in keyof T]: T[K] } & {}; -export type ClosedEnum = T[keyof T]; -export type OpenEnum = - | Prettify - | Unrecognized; +export function inboundSchemaInt>( + enumObj: T, +): z.ZodType, z.ZodTypeDef, unknown> { + // For numeric enums, Object.values returns both numbers and string keys + const options = Object.values(enumObj).filter(v => typeof v === "number"); + return z.union([ + ...options.map(x => z.literal(x)), + z.number().int().transform(x => unrecognized(x)), + ] as any); +} + +export function outboundSchema>( + _: T, +): z.ZodType> { + return z.string() as any; +} + +export function outboundSchemaInt>( + _: T, +): z.ZodType> { + return z.number().int() as any; +} diff --git a/src/types/index.ts b/src/types/index.ts index e124e817..abf0b7ab 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -3,9 +3,9 @@ */ export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export { catchUnrecognizedEnum } from "./enums.js"; -export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum } from "./enums.js"; export type { Result } from "./fp.js"; export type { PageIterator, Paginator } from "./operations.js"; export { createPageIterator } from "./operations.js"; export { RFCDate } from "./rfcdate.js"; +export * from "./unrecognized.js"; diff --git a/src/types/unrecognized.ts b/src/types/unrecognized.ts new file mode 100644 index 00000000..b7a2a13f --- /dev/null +++ b/src/types/unrecognized.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +function unrecognized(value: T): Unrecognized { + globalCount++; + return value as Unrecognized; +} + +let globalCount = 0; +let refCount = 0; +export function startCountingUnrecognized() { + refCount++; + const start = globalCount; + return { + /** + * Ends counting and returns the delta. + * @param delta - If provided, only this amount is added to the parent counter + * (used for nested unions where we only want to record the winning option's count). + * If not provided, records all counts since start(). + */ + end: (delta?: number) => { + const count = globalCount - start; + // Reset globalCount back to start, then add only the specified delta + globalCount = start + (delta ?? count); + if (--refCount === 0) globalCount = 0; + return count; + }, + }; +} + +export { unrecognized }; diff --git a/tsconfig.json b/tsconfig.json index 94d81a34..76110f88 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { - "incremental": true, - "tsBuildInfoFile": ".tsbuildinfo", + "incremental": false, "target": "ES2020", "lib": ["ES2022", "DOM", "DOM.Iterable"], "jsx": "react-jsx", @@ -14,6 +13,7 @@ "declaration": true, "declarationMap": true, "sourceMap": true, + "rootDir": "src", "outDir": ".", @@ -37,5 +37,5 @@ "forceConsistentCasingInFileNames": true }, "include": ["src"], - "exclude": ["node_modules"] + "exclude": ["node_modules", "src/__tests__"] }