@workos/openapi-spec 0.170.0 → 0.172.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24526,6 +24526,7 @@ components:
24526
24526
  - directory_sync_rate_limited
24527
24527
  - directory_sync_unsupported
24528
24528
  - discovery_endpoint_must_use_https
24529
+ - discovery_endpoint_tenant_not_allowed
24529
24530
  - domain_already_exists
24530
24531
  - domain_already_verified
24531
24532
  - duplicate_endpoint
@@ -32019,6 +32020,163 @@ components:
32019
32020
  - data
32020
32021
  - created_at
32021
32022
  - object
32023
+ - type: object
32024
+ properties:
32025
+ id:
32026
+ type: string
32027
+ description: Unique identifier for the event.
32028
+ example: event_01EHZNVPK3SFK441A1RGBFSHRT
32029
+ event:
32030
+ type: string
32031
+ const: application.token_exchange_failed
32032
+ data:
32033
+ type: object
32034
+ properties:
32035
+ grant_type:
32036
+ type: string
32037
+ description: >-
32038
+ The OAuth grant type of the token request that presented
32039
+ the token to exchange.
32040
+ example: urn:ietf:params:oauth:grant-type:jwt-bearer
32041
+ client_id:
32042
+ type: string
32043
+ description: >-
32044
+ The client ID of the application that made the token
32045
+ request.
32046
+ example: client_01HXYZ123456789ABCDEFGHIJ
32047
+ issuer:
32048
+ type:
32049
+ - string
32050
+ - 'null'
32051
+ description: >-
32052
+ The issuer the presented token claims. It is not
32053
+ verified, and is `null` when the token could not be
32054
+ read.
32055
+ example: https://example.okta.com
32056
+ error:
32057
+ type: object
32058
+ properties:
32059
+ code:
32060
+ type: string
32061
+ description: The OAuth error code returned to the application.
32062
+ example: invalid_grant
32063
+ message:
32064
+ type: string
32065
+ description: A human-readable description of the error.
32066
+ example: >-
32067
+ The assertion issuer is not trusted in this
32068
+ environment.
32069
+ required:
32070
+ - code
32071
+ - message
32072
+ description: Why the token exchange failed.
32073
+ required:
32074
+ - grant_type
32075
+ - client_id
32076
+ - issuer
32077
+ - error
32078
+ description: The event payload.
32079
+ created_at:
32080
+ format: date-time
32081
+ type: string
32082
+ description: An ISO 8601 timestamp.
32083
+ example: '2026-01-15T12:00:00.000Z'
32084
+ context:
32085
+ $ref: '#/components/schemas/EventContextDto'
32086
+ object:
32087
+ type: string
32088
+ description: Distinguishes the Event object.
32089
+ const: event
32090
+ required:
32091
+ - id
32092
+ - event
32093
+ - data
32094
+ - created_at
32095
+ - object
32096
+ - type: object
32097
+ properties:
32098
+ id:
32099
+ type: string
32100
+ description: Unique identifier for the event.
32101
+ example: event_01EHZNVPK3SFK441A1RGBFSHRT
32102
+ event:
32103
+ type: string
32104
+ const: application.token_exchange_succeeded
32105
+ data:
32106
+ type: object
32107
+ properties:
32108
+ grant_type:
32109
+ type: string
32110
+ description: >-
32111
+ The OAuth grant type of the token request that presented
32112
+ the token to exchange.
32113
+ example: urn:ietf:params:oauth:grant-type:jwt-bearer
32114
+ client_id:
32115
+ type: string
32116
+ description: >-
32117
+ The client ID of the application that made the token
32118
+ request.
32119
+ example: client_01HXYZ123456789ABCDEFGHIJ
32120
+ user_id:
32121
+ type: string
32122
+ description: The ID of the user the access token was issued for.
32123
+ example: user_01E4ZCR3C56J083X43JQXF3JK5
32124
+ email:
32125
+ type: string
32126
+ description: The email address of the user.
32127
+ example: user@example.com
32128
+ organization_id:
32129
+ type:
32130
+ - string
32131
+ - 'null'
32132
+ description: >-
32133
+ The ID of the organization the access token is scoped
32134
+ to.
32135
+ example: org_01EHWNCE74X7JSDV0X3SZ3KJNY
32136
+ issuer:
32137
+ type: string
32138
+ description: The issuer of the token that was exchanged.
32139
+ example: https://example.okta.com
32140
+ connection_id:
32141
+ type:
32142
+ - string
32143
+ - 'null'
32144
+ description: >-
32145
+ The ID of the SSO connection whose identity provider
32146
+ issued the exchanged token. `null` when the AI client
32147
+ issued it.
32148
+ example: conn_01E4ZCR3C56J083X43JQXF3JK5
32149
+ jti:
32150
+ type: string
32151
+ description: The `jti` claim of the access token that was issued.
32152
+ example: 01HXYZ123456789ABCDEFGHIJ
32153
+ required:
32154
+ - grant_type
32155
+ - client_id
32156
+ - user_id
32157
+ - email
32158
+ - organization_id
32159
+ - issuer
32160
+ - connection_id
32161
+ - jti
32162
+ description: The event payload.
32163
+ created_at:
32164
+ format: date-time
32165
+ type: string
32166
+ description: An ISO 8601 timestamp.
32167
+ example: '2026-01-15T12:00:00.000Z'
32168
+ context:
32169
+ $ref: '#/components/schemas/EventContextDto'
32170
+ object:
32171
+ type: string
32172
+ description: Distinguishes the Event object.
32173
+ const: event
32174
+ required:
32175
+ - id
32176
+ - event
32177
+ - data
32178
+ - created_at
32179
+ - object
32022
32180
  - type: object
32023
32181
  properties:
32024
32182
  id:
package/dist/types.d.ts CHANGED
@@ -6702,7 +6702,7 @@ export interface components {
6702
6702
  * @description A machine-readable error code; additional values may be added over time.
6703
6703
  * @enum {string}
6704
6704
  */
6705
- ErrorBodyCode: "account_selection_required" | "action_denied" | "already_claimed" | "ambiguous_saml_options" | "api_key_already_expired" | "application_consent_required" | "auth_method_disabled" | "auth_method_mismatch" | "authentication_method_not_allowed" | "authorization_resource_external_id_conflict" | "bad_request" | "both_saml_and_oidc_options_provided" | "cannot_deactivate_pending_organization_membership" | "cannot_delete_last_certificate" | "cannot_reactivate_pending_organization_membership" | "cannot_remove_group_sourced_role" | "certificate_expired" | "chain_depth_exceeded" | "claim_denied" | "claim_expired" | "client_secret_not_accepted" | "client_secret_required" | "code_challenge_not_found" | "concurrent_flag_target_update" | "concurrent_request" | "connected_account_limit_reached" | "connection_could_not_be_verified" | "connection_deletion_in_progress" | "connection_is_not_saml" | "connection_type_conflicts_with_options" | "connection_type_not_supported" | "connection_type_not_updatable" | "connection_type_or_options_required" | "daily_quota_exceeded" | "directory_sync_disabled" | "directory_sync_in_progress" | "directory_sync_rate_limited" | "directory_sync_unsupported" | "discovery_endpoint_must_use_https" | "domain_already_exists" | "domain_already_verified" | "duplicate_endpoint" | "duplicate_group_role_assignment" | "email_already_in_use" | "email_already_invited" | "email_already_invited_to_organization" | "email_already_verified" | "email_change_code_expired" | "email_change_code_incorrect" | "email_change_code_previously_used" | "email_change_not_allowed" | "email_change_not_needed" | "email_change_too_many_attempts" | "email_completion_required" | "email_domain_not_deliverable" | "email_mismatch" | "email_not_available" | "email_password_auth_disabled" | "email_previously_verified" | "email_verification_code_expired" | "email_verification_code_incorrect" | "email_verification_code_previously_used" | "email_verification_required" | "entity_not_found" | "expires_in_days_too_long" | "expires_in_days_too_short" | "external_auth_session_already_completed" | "external_id_already_in_use" | "external_id_already_used" | "group_membership_limit_exceeded" | "group_membership_update_overlap" | "group_role_assignment_update_overlap" | "id_token_signature_algorithm_not_supported" | "idp_metadata_fetch_failed" | "incomplete_saml_options" | "invalid_agent_access_token" | "invalid_certificate" | "invalid_claim" | "invalid_credentials" | "invalid_email" | "invalid_idp_sso_url" | "invalid_invite" | "invalid_locale" | "invalid_metadata" | "invalid_one_time_code" | "invalid_organization" | "invalid_organization_id" | "invalid_password_hash" | "invalid_pending_authentication_token" | "invalid_refresh_token" | "invalid_request" | "invalid_request_parameters" | "invalid_role" | "invalid_state" | "invalid_url" | "invalid_user_access_token" | "invitation_email_not_sent" | "invite_accepted" | "invite_expired" | "invite_has_accepted_user_id" | "invite_not_pending" | "invite_revoked" | "ip_address_required" | "it_contact_already_exists" | "it_contact_invitation_already_active" | "key_pair_not_accepted" | "lock_timeout" | "max_age_exceeded" | "mfa_challenge" | "mfa_enrollment" | "missing_organization_id_or_resource_type_slug" | "missing_user_id_or_organization_id" | "multiple_roles_not_enabled" | "name_already_in_use" | "no_pending_email_change" | "oidc_options_required" | "one_time_code_expired" | "one_time_code_previously_used" | "one_time_code_too_many_attempts" | "organization_blocked_from_sending_invites" | "organization_membership_directory_managed" | "organization_not_found" | "organization_not_invocable" | "organization_role_slug_conflict" | "organization_selection_required" | "passkey_progressive_enrollment" | "password_and_password_hash_provided" | "password_and_password_hash_type_provided" | "password_reset_error" | "password_reset_not_allowed" | "password_salt_position_requires_password_hash" | "password_strength_error" | "permission_not_found" | "permission_slug_conflict" | "phone_number_required" | "production_feature_requires_billing" | "radar_challenge" | "radar_sign_up_challenge" | "radar_sms_sign_in_challenge" | "rate_limit_exceeded" | "resource_has_dependents" | "resource_limit_exceeded" | "resource_type_update_in_progress" | "role_assignment_update_overlap" | "role_has_assignments" | "role_has_group_role_mappings" | "role_not_found" | "role_not_invocable" | "role_slug_conflict" | "saml_options_required" | "session_expired" | "session_revoked" | "session_settings_not_found" | "sms_challenge_quota_reached" | "sms_challenge_rate_limited" | "sp_signing_cert_already_exists" | "stripe_customer_id_already_used" | "sub_resource_scoped_role_not_allowed" | "team_not_found" | "token_authentication_method_not_supported" | "too_many_failed_verification_attempts" | "too_many_sp_encryption_certs" | "unsupported_invocation_type" | "user_already_exists" | "user_already_organization_member" | "user_code_expired" | "user_consent_options_not_supported" | "user_creation_error" | "user_mismatch" | "user_not_member_of_organization" | "user_session_ended" | "verification_id_required" | "wrong_account";
6705
+ ErrorBodyCode: "account_selection_required" | "action_denied" | "already_claimed" | "ambiguous_saml_options" | "api_key_already_expired" | "application_consent_required" | "auth_method_disabled" | "auth_method_mismatch" | "authentication_method_not_allowed" | "authorization_resource_external_id_conflict" | "bad_request" | "both_saml_and_oidc_options_provided" | "cannot_deactivate_pending_organization_membership" | "cannot_delete_last_certificate" | "cannot_reactivate_pending_organization_membership" | "cannot_remove_group_sourced_role" | "certificate_expired" | "chain_depth_exceeded" | "claim_denied" | "claim_expired" | "client_secret_not_accepted" | "client_secret_required" | "code_challenge_not_found" | "concurrent_flag_target_update" | "concurrent_request" | "connected_account_limit_reached" | "connection_could_not_be_verified" | "connection_deletion_in_progress" | "connection_is_not_saml" | "connection_type_conflicts_with_options" | "connection_type_not_supported" | "connection_type_not_updatable" | "connection_type_or_options_required" | "daily_quota_exceeded" | "directory_sync_disabled" | "directory_sync_in_progress" | "directory_sync_rate_limited" | "directory_sync_unsupported" | "discovery_endpoint_must_use_https" | "discovery_endpoint_tenant_not_allowed" | "domain_already_exists" | "domain_already_verified" | "duplicate_endpoint" | "duplicate_group_role_assignment" | "email_already_in_use" | "email_already_invited" | "email_already_invited_to_organization" | "email_already_verified" | "email_change_code_expired" | "email_change_code_incorrect" | "email_change_code_previously_used" | "email_change_not_allowed" | "email_change_not_needed" | "email_change_too_many_attempts" | "email_completion_required" | "email_domain_not_deliverable" | "email_mismatch" | "email_not_available" | "email_password_auth_disabled" | "email_previously_verified" | "email_verification_code_expired" | "email_verification_code_incorrect" | "email_verification_code_previously_used" | "email_verification_required" | "entity_not_found" | "expires_in_days_too_long" | "expires_in_days_too_short" | "external_auth_session_already_completed" | "external_id_already_in_use" | "external_id_already_used" | "group_membership_limit_exceeded" | "group_membership_update_overlap" | "group_role_assignment_update_overlap" | "id_token_signature_algorithm_not_supported" | "idp_metadata_fetch_failed" | "incomplete_saml_options" | "invalid_agent_access_token" | "invalid_certificate" | "invalid_claim" | "invalid_credentials" | "invalid_email" | "invalid_idp_sso_url" | "invalid_invite" | "invalid_locale" | "invalid_metadata" | "invalid_one_time_code" | "invalid_organization" | "invalid_organization_id" | "invalid_password_hash" | "invalid_pending_authentication_token" | "invalid_refresh_token" | "invalid_request" | "invalid_request_parameters" | "invalid_role" | "invalid_state" | "invalid_url" | "invalid_user_access_token" | "invitation_email_not_sent" | "invite_accepted" | "invite_expired" | "invite_has_accepted_user_id" | "invite_not_pending" | "invite_revoked" | "ip_address_required" | "it_contact_already_exists" | "it_contact_invitation_already_active" | "key_pair_not_accepted" | "lock_timeout" | "max_age_exceeded" | "mfa_challenge" | "mfa_enrollment" | "missing_organization_id_or_resource_type_slug" | "missing_user_id_or_organization_id" | "multiple_roles_not_enabled" | "name_already_in_use" | "no_pending_email_change" | "oidc_options_required" | "one_time_code_expired" | "one_time_code_previously_used" | "one_time_code_too_many_attempts" | "organization_blocked_from_sending_invites" | "organization_membership_directory_managed" | "organization_not_found" | "organization_not_invocable" | "organization_role_slug_conflict" | "organization_selection_required" | "passkey_progressive_enrollment" | "password_and_password_hash_provided" | "password_and_password_hash_type_provided" | "password_reset_error" | "password_reset_not_allowed" | "password_salt_position_requires_password_hash" | "password_strength_error" | "permission_not_found" | "permission_slug_conflict" | "phone_number_required" | "production_feature_requires_billing" | "radar_challenge" | "radar_sign_up_challenge" | "radar_sms_sign_in_challenge" | "rate_limit_exceeded" | "resource_has_dependents" | "resource_limit_exceeded" | "resource_type_update_in_progress" | "role_assignment_update_overlap" | "role_has_assignments" | "role_has_group_role_mappings" | "role_not_found" | "role_not_invocable" | "role_slug_conflict" | "saml_options_required" | "session_expired" | "session_revoked" | "session_settings_not_found" | "sms_challenge_quota_reached" | "sms_challenge_rate_limited" | "sp_signing_cert_already_exists" | "stripe_customer_id_already_used" | "sub_resource_scoped_role_not_allowed" | "team_not_found" | "token_authentication_method_not_supported" | "too_many_failed_verification_attempts" | "too_many_sp_encryption_certs" | "unsupported_invocation_type" | "user_already_exists" | "user_already_organization_member" | "user_code_expired" | "user_consent_options_not_supported" | "user_creation_error" | "user_mismatch" | "user_not_member_of_organization" | "user_session_ended" | "verification_id_required" | "wrong_account";
6706
6706
  ErrorBodyWithCode: {
6707
6707
  /**
6708
6708
  * @description The error code identifying the type of error.
@@ -12914,6 +12914,120 @@ export interface components {
12914
12914
  * @constant
12915
12915
  */
12916
12916
  object: "event";
12917
+ } | {
12918
+ /**
12919
+ * @description Unique identifier for the event.
12920
+ * @example event_01EHZNVPK3SFK441A1RGBFSHRT
12921
+ */
12922
+ id: string;
12923
+ /** @constant */
12924
+ event: "application.token_exchange_failed";
12925
+ /** @description The event payload. */
12926
+ data: {
12927
+ /**
12928
+ * @description The OAuth grant type of the token request that presented the token to exchange.
12929
+ * @example urn:ietf:params:oauth:grant-type:jwt-bearer
12930
+ */
12931
+ grant_type: string;
12932
+ /**
12933
+ * @description The client ID of the application that made the token request.
12934
+ * @example client_01HXYZ123456789ABCDEFGHIJ
12935
+ */
12936
+ client_id: string;
12937
+ /**
12938
+ * @description The issuer the presented token claims. It is not verified, and is `null` when the token could not be read.
12939
+ * @example https://example.okta.com
12940
+ */
12941
+ issuer: string | null;
12942
+ /** @description Why the token exchange failed. */
12943
+ error: {
12944
+ /**
12945
+ * @description The OAuth error code returned to the application.
12946
+ * @example invalid_grant
12947
+ */
12948
+ code: string;
12949
+ /**
12950
+ * @description A human-readable description of the error.
12951
+ * @example The assertion issuer is not trusted in this environment.
12952
+ */
12953
+ message: string;
12954
+ };
12955
+ };
12956
+ /**
12957
+ * Format: date-time
12958
+ * @description An ISO 8601 timestamp.
12959
+ * @example 2026-01-15T12:00:00.000Z
12960
+ */
12961
+ created_at: string;
12962
+ context?: components["schemas"]["EventContextDto"];
12963
+ /**
12964
+ * @description Distinguishes the Event object.
12965
+ * @constant
12966
+ */
12967
+ object: "event";
12968
+ } | {
12969
+ /**
12970
+ * @description Unique identifier for the event.
12971
+ * @example event_01EHZNVPK3SFK441A1RGBFSHRT
12972
+ */
12973
+ id: string;
12974
+ /** @constant */
12975
+ event: "application.token_exchange_succeeded";
12976
+ /** @description The event payload. */
12977
+ data: {
12978
+ /**
12979
+ * @description The OAuth grant type of the token request that presented the token to exchange.
12980
+ * @example urn:ietf:params:oauth:grant-type:jwt-bearer
12981
+ */
12982
+ grant_type: string;
12983
+ /**
12984
+ * @description The client ID of the application that made the token request.
12985
+ * @example client_01HXYZ123456789ABCDEFGHIJ
12986
+ */
12987
+ client_id: string;
12988
+ /**
12989
+ * @description The ID of the user the access token was issued for.
12990
+ * @example user_01E4ZCR3C56J083X43JQXF3JK5
12991
+ */
12992
+ user_id: string;
12993
+ /**
12994
+ * @description The email address of the user.
12995
+ * @example user@example.com
12996
+ */
12997
+ email: string;
12998
+ /**
12999
+ * @description The ID of the organization the access token is scoped to.
13000
+ * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
13001
+ */
13002
+ organization_id: string | null;
13003
+ /**
13004
+ * @description The issuer of the token that was exchanged.
13005
+ * @example https://example.okta.com
13006
+ */
13007
+ issuer: string;
13008
+ /**
13009
+ * @description The ID of the SSO connection whose identity provider issued the exchanged token. `null` when the AI client issued it.
13010
+ * @example conn_01E4ZCR3C56J083X43JQXF3JK5
13011
+ */
13012
+ connection_id: string | null;
13013
+ /**
13014
+ * @description The `jti` claim of the access token that was issued.
13015
+ * @example 01HXYZ123456789ABCDEFGHIJ
13016
+ */
13017
+ jti: string;
13018
+ };
13019
+ /**
13020
+ * Format: date-time
13021
+ * @description An ISO 8601 timestamp.
13022
+ * @example 2026-01-15T12:00:00.000Z
13023
+ */
13024
+ created_at: string;
13025
+ context?: components["schemas"]["EventContextDto"];
13026
+ /**
13027
+ * @description Distinguishes the Event object.
13028
+ * @constant
13029
+ */
13030
+ object: "event";
12917
13031
  } | {
12918
13032
  /**
12919
13033
  * @description Unique identifier for the event.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workos/openapi-spec",
3
- "version": "0.170.0",
3
+ "version": "0.172.0",
4
4
  "type": "module",
5
5
  "description": "WorkOS OpenAPI specification, TypeScript types, and SDK resolution policy",
6
6
  "license": "MIT",
@@ -58,11 +58,11 @@
58
58
  "devDependencies": {
59
59
  "@types/node": "^26.6.6",
60
60
  "@workos/oagen": "^0.35.0",
61
- "@workos/oagen-emitters": "^0.25.9",
61
+ "@workos/oagen-emitters": "^0.25.10",
62
62
  "diff2html": "^3.4.56",
63
63
  "husky": "^9.1.7",
64
64
  "js-yaml": "^5.5.0",
65
- "openapi-to-postmanv2": "^6.4.3",
65
+ "openapi-to-postmanv2": "^6.4.4",
66
66
  "tsdown": "^0.23.7",
67
67
  "tsx": "^4.23.15",
68
68
  "typescript": "^7.0.2"