@wix/auto_sdk_identity_oauth 1.0.64 → 1.0.66

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/identity-oauth-v1-refresh-token-oauth.universal.ts","../../src/identity-oauth-v1-refresh-token-oauth.http.ts"],"sourcesContent":["export * from './src/identity-oauth-v1-refresh-token-oauth.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIdentityOauthV1RefreshToken from './identity-oauth-v1-refresh-token-oauth.http.js';\n\nexport interface RefreshToken {\n token?: string;\n}\n\n/**\n * TokenRequest is sent by the client to the authorization server to request an\n * access token.\n */\nexport interface TokenRequest extends TokenRequestTenantOneOf {\n /** supported tenant - specific site */\n siteId?: string | null;\n /** supported tenant - specific account */\n accountId?: string | null;\n /** The application id that want to obtain an access token. */\n clientId?: string | null;\n /**\n * grant_type specifies the grant type being used. supported grant types are:\n * `authorization_code`, `client_credentials`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`, `anonymous`,\n * `urn:ietf:params:oauth:grant-type:token-exchange`\n */\n grantType?: string;\n /** Required for `refresh_token` grant type. */\n refreshToken?: string | null;\n /** Required for `client_credentials` grant type. */\n clientSecret?: string | null;\n /**\n * Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, \"device_code\" from the\n * device authorization response\n */\n deviceCode?: string | null;\n /** Required for the `authorization_code` grant type. */\n redirectUri?: string | null;\n /** Required for `authorization_code` grant type. */\n code?: string | null;\n /** Optional, used if code challenge and code method were used in `authorization_code` grant type. */\n codeVerifier?: string | null;\n /** Required for `authorized_client` grant type - create tokens for a specific user. */\n userId?: string | null;\n /**\n * Required for `authorized_client` grant type - create tokens for a specific member.\n * Optional when `client_id` and `session_token` are sent: the member then comes from the session, and `member_id`, if\n * sent, must match it.\n */\n memberId?: string | null;\n /**\n * Required for `client_credentials` grant type with clientId that represents an external app.\n * An access token will be created based on the app installed version of an instance.\n */\n instanceId?: string | null;\n /** Required for `authorized_client` grant type for externalApp and must be bounded with client id, create access token to an app with a specific version. */\n appVersion?: string | null;\n /** Required for `strip_bound_session` grant type - create token without bound session. */\n accessToken?: string | null;\n /**\n * Optional for `authorized_client` grant type - create tokens for a specific user.\n * @format GUID\n */\n userAccountId?: string | null;\n /**\n * Optional for `authorized_client` grant type - bind the issued tokens to a specific session (session-bound wixAT/wixRT).\n * Internal-only: used by the server-to-server switchAccount flow via Oauth2NgInternal.\n * @internal\n * @format GUID\n */\n sessionId?: string | null;\n /**\n * Optional for `authorized_client` grant type (member tokens) - a member session token that is opened server-side to\n * extract the bound session id, producing session-bound wixAT/wixRT. Public: used by the member flow from public traffic.\n * When sent with `client_id` (a headless OAuth app's client ID), the tokens are issued to that client for the member\n * of the session, on the client's site rather than the caller's context.\n */\n sessionToken?: string | null;\n /**\n * Optional for `authorized_client` grant type - attach an impersonating user id to the minted token.\n * Internal-only: used by server-to-server flows where a service mints a token carrying impersonation context.\n * @internal\n * @format GUID\n */\n impersonatingUserId?: string | null;\n /**\n * Required for the `urn:ietf:params:oauth:grant-type:token-exchange` grant - the account-level access token being\n * exchanged for one scoped to the target named by the `tenant` oneof.\n */\n subjectToken?: string | null;\n /**\n * Required for the `urn:ietf:params:oauth:grant-type:token-exchange` grant - identifies the type of `subject_token`.\n * Only `urn:ietf:params:oauth:token-type:access_token` is supported.\n * @maxLength 100\n */\n subjectTokenType?: string | null;\n /**\n * RFC 7523 client authentication (private_key_jwt) - the type of `client_assertion`.\n * Only `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` is supported.\n * @maxLength 100\n */\n clientAssertionType?: string | null;\n /**\n * RFC 7523 client authentication (private_key_jwt) - a JWT signed by the client. Must not be combined with\n * `client_secret` or HTTP Basic authentication.\n * @maxLength 8192\n */\n clientAssertion?: string | null;\n}\n\n/** @oneof */\nexport interface TokenRequestTenantOneOf {\n /** supported tenant - specific site */\n siteId?: string | null;\n /** supported tenant - specific account */\n accountId?: string | null;\n}\n\nexport interface InternalTokenResponse\n extends InternalTokenResponseResultOneOf {\n success?: TokenResponse;\n failure?: TokenErrorResponse;\n}\n\n/** @oneof */\nexport interface InternalTokenResponseResultOneOf {\n success?: TokenResponse;\n failure?: TokenErrorResponse;\n}\n\nexport interface TokenResponse {\n /** The access token issued by the authorization server. */\n accessToken?: string;\n /** The type of the token issued as described in Section 7.1. of the oauth2 rfc. */\n tokenType?: string;\n /**\n * The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will\n * expire in one hour from the time the response was generated.\n */\n expiresIn?: number;\n /** The refresh token, which can be used to obtain new access tokens. */\n refreshToken?: string | null;\n /** OPTIONAL, if identical to the scope requested by the client; otherwise, will be sent. */\n scope?: string | null;\n idToken?: string | null;\n /**\n * Set only for the `urn:ietf:params:oauth:grant-type:token-exchange` grant, where it is always\n * `urn:ietf:params:oauth:token-type:access_token`. Empty for every other grant.\n * @maxLength 100\n */\n issuedTokenType?: string | null;\n}\n\nexport interface TokenErrorResponse {\n error?: string;\n errorDescription?: string | null;\n}\n\nexport interface TokenInfoRequest {\n /** The access token to introspect. */\n token?: string;\n}\n\nexport interface TokenInfoResponse {\n active?: boolean;\n /** subject type. */\n subjectType?: SubjectTypeWithLiterals;\n /** subject id */\n subjectId?: string;\n /** Expiration time of the token */\n exp?: string | null;\n /** Issued time of the token */\n iat?: string | null;\n /** Client id */\n clientId?: string;\n /** Account id */\n accountId?: string | null;\n /** Site id */\n siteId?: string | null;\n /** Instance Id */\n instanceId?: string | null;\n /**\n * Vendor Product Id\n * @maxLength 100\n */\n vendorProductId?: string | null;\n}\n\nexport enum SubjectType {\n /** unknown subject type */\n UNKNOWN = 'UNKNOWN',\n /** user subject type */\n USER = 'USER',\n /** visitor subject type */\n VISITOR = 'VISITOR',\n /** member subject type */\n MEMBER = 'MEMBER',\n /** app subject type */\n APP = 'APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'USER'\n | 'VISITOR'\n | 'MEMBER'\n | 'APP';\n\n/**\n * AuthorizeRequest is sent by the client to the authorization server to initiate\n * the authorization process.\n */\nexport interface AuthorizeRequest {\n /**\n * ID of the Wix OAuth app requesting authorization.\n * @format GUID\n */\n clientId?: string;\n /**\n * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).\n *\n * Supported values:\n * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.\n * @minLength 1\n */\n responseType?: string;\n /**\n * URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not.\n * @minLength 1\n */\n redirectUri?: string | null;\n /**\n * Desired scope of access. If this field is left empty, only an access token is granted.\n * To received a refresh token, pass `offline_access` as the value of this field.\n */\n scope?: string | null;\n /**\n * A value used to confirm the state of an application before and after it makes an authorization\n * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser\n * is redirected there.\n * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).\n * @minLength 1\n */\n state?: string;\n /**\n * esired response format.\n *\n * Supported values:\n * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.\n * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.\n * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).\n *\n * Default value: `query`\n */\n responseMode?: string | null;\n /**\n * Code challenge to use for PKCE verification.\n * This field is only used if `responseType` is set to `code`.\n */\n codeChallenge?: string | null;\n /**\n * Code challenge method to use for PKCE verification.\n * This field is only used if `responseType` is set to `code`.\n *\n * Supported values:\n * + `S256`: The code challenge is transformed using SHA-256 encyption.\n * + `S512`: The code challenge is transformed using SHA-512 encyption.\n */\n codeChallengeMethod?: string | null;\n /**\n * Token returned by a successful [login](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/login-v-2) or [register](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/register-v-2) call that identifies the authenticated member.\n *\n * In the default SDK flow, session context is passed through a hidden iframe automatically. When using a [full-page redirect](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/members/custom-login-page/custom-login/custom-login-using-the-js-sdk#use-a-full-page-redirect-desktop-and-mobile-browsers) instead, you must pass this field explicitly because there is no iframe to carry the session context.\n */\n sessionToken?: string | null;\n /**\n * Optional fields for errors\n * A short error code that describes the type of error that occurred (e.g. \"invalid_request\")\n * @internal\n */\n error?: string | null;\n /**\n * A human-readable description of the error that occurred\n * @internal\n */\n errorDescription?: string | null;\n /**\n * DEPRECATED: no longer read. The sign-in URL is resolved from the client's OAuthClientConfiguration\n * component (sign_in_url), falling back to the default Wix sign-in page.\n * @internal\n * @format SECURE_WEB_URL\n * @deprecated\n */\n signInUrl?: string | null;\n /**\n * Indicates whether the user has consented to the requested scopes\n * @internal\n */\n userConsented?: boolean | null;\n /**\n * Indicates whether login is optional. If true, will not redirect to the sign_in_url if user is not logged in.\n * @internal\n */\n optionalLogin?: boolean | null;\n /**\n * The site id the authorization is requested for.\n * @internal\n * @format GUID\n */\n metaSiteId?: string | null;\n /**\n * ID of the IAM IdP connection to authenticate with when no member session exists.\n * When set, the sign-in redirect initiates an OIDC login against this IdP connection\n * (IAM's `/sso/login` endpoint) instead of the default Wix login page.\n * @internal\n * @format GUID\n */\n idp?: string | null;\n /**\n * OIDC nonce, bound to the authorization request and echoed back in the id_token.\n * @maxLength 512\n */\n nonce?: string | null;\n /**\n * RFC 9470 / OIDC acr_values: space-separated required ACRs (OR, in preference order) for step-up.\n * @internal\n */\n acrValues?: string | null;\n /**\n * RFC 9470 / OIDC max_age: max seconds since last auth (0 forces re-auth).\n * @internal\n */\n maxAge?: string | null;\n /** OIDC prompt. Only \"none\" is honored: request silent authorization with no user interaction. */\n prompt?: string | null;\n /**\n * Standard OAuth error code the step-up surface returns on the browser redirect back to authorize\n * (e.g. access_denied, unmet_authentication_requirements). Browser-supplied like acr_values/prompt, so\n * untrusted: allowlisted and forwarded to the client as the OAuth error.\n * @internal\n */\n stepUpError?: string | null;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\n/** Request for the Jwks endpoint. Takes no parameters. */\nexport interface JwksRequest {}\n\n/** Request for the AuthorizationServerMetadata endpoint. Takes no parameters. */\nexport interface AuthorizationServerMetadataRequest {}\n\n/** Request for the ProtectedResourceMetadata endpoint. Takes no parameters. */\nexport interface ProtectedResourceMetadataRequest {}\n\nexport interface DeviceCodeRequest {\n /** The ID of the application that asks for authorization. */\n clientId?: string;\n /**\n * scope is a space-delimited string that specifies the requested scope of the\n * access request.\n */\n scope?: string | null;\n}\n\nexport interface DeviceCodeResponse {\n /** is the unique code for the device. When the user goes to the verification_uri in their browser-based device, this code will be bound to their session. */\n deviceCode?: string;\n /** contains the code that should be input at the verification_uri to authorize the device. */\n userCode?: string;\n /** contains the URL the user should visit to authorize the device. */\n verificationUri?: string;\n /** indicates the lifetime (in seconds) of the device_code and user_code. */\n expiresIn?: number;\n /** indicates the interval (in seconds) at which the app should poll the token URL to request a token. clients MUST use 5 as the default */\n interval?: number | null;\n}\n\nexport interface DeviceAuthorizeRequest {\n /** The ID of the application that asks for authorization. */\n clientId?: string;\n /** scope is a space-delimited string that specifies the requested scope of the access request. */\n scope?: string | null;\n /**\n * OIDC nonce, bound to the device authorization and echoed back in the id_token at /token.\n * @maxLength 512\n */\n nonce?: string | null;\n}\n\nexport interface DeviceAuthorizeResponse {\n /** the unique code for the device, used to poll the token endpoint. */\n deviceCode?: string;\n /** the code the user enters at the verification_uri to authorize the device. */\n userCode?: string;\n /** the URL the user should visit to authorize the device. */\n verificationUri?: string;\n /** the verification_uri with the user_code embedded as a query param, ready to encode into a QR code. */\n verificationUriComplete?: string;\n /** lifetime (in seconds) of the device_code and user_code. */\n expiresIn?: number;\n /** interval (in seconds) at which the client should poll the token endpoint. clients MUST use 5 as the default. */\n interval?: number | null;\n}\n\nexport interface DeviceVerifyRequest {\n /** User code representing a currently authorizing device. */\n userCode?: string;\n}\n\nexport interface DeviceVerifyResponse {}\n\nexport interface DeviceVerifyV2Request {\n /**\n * User code representing a currently authorizing device.\n * @minLength 8\n * @maxLength 8\n */\n userCode?: string;\n}\n\nexport interface DeviceVerifyV2Response {}\n\nexport interface DeviceAuthorizationInfoRequest {\n /**\n * User code representing a currently authorizing device.\n * @minLength 8\n * @maxLength 8\n */\n userCode?: string;\n}\n\nexport interface DeviceAuthorizationInfoResponse {\n /** The ID of the application the device is authorizing into. */\n clientId?: string;\n /** Canonical browser name of the initiating browser (e.g. \"chrome\"). */\n browser?: string | null;\n /** Canonical OS of the initiating browser (e.g. \"windows\"). */\n os?: string | null;\n /** Canonical device class of the initiating browser (e.g. \"desktop\"). */\n deviceClass?: string | null;\n /** IP address of the initiating browser. */\n browserIp?: string | null;\n /** Coarse geo-location (country, optional region) derived from the browser IP, e.g. \"IL\" or \"US-NY\". */\n geo?: string | null;\n}\n\nexport interface InvalidateUserCodeRequest {\n /** user code to invalidate. Only the authorizing identity is able to invalidate it. */\n userCode?: string;\n}\n\nexport interface InvalidateUserCodeResponse {}\n\nexport interface RevokeRefreshTokenRequest {\n /** The refresh token itself. Anyone with the token itself is able to revoke it. */\n token?: string;\n /** The client id that issued the refresh token. */\n clientId?: string | null;\n}\n\nexport interface RevokeRefreshTokenResponse {}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface UserDeletedEvent {\n /**\n * User ID from the deletion event.\n * @format GUID\n */\n userId?: string;\n}\n\nexport interface UserBlockedEvent {\n /**\n * User ID from the deletion event.\n * @format GUID\n */\n userId?: string;\n}\n\nexport interface UserInfoRequest {}\n\n/** UserInfo endpoint response for OpenID Connect */\nexport interface UserInfoResponse {\n /**\n * Subject identifier — unique identifier for the user (OIDC standard claim).\n * @format GUID\n */\n sub?: string;\n /**\n * The user's given name.\n * @maxLength 20\n */\n givenName?: string | null;\n /**\n * The user's family name.\n * @maxLength 20\n */\n familyName?: string | null;\n /**\n * The user's email address.\n * @format EMAIL\n */\n email?: string | null;\n /** Indicates whether the user's email address has been verified. */\n emailVerified?: boolean | null;\n /**\n * The URL of the user's profile picture.\n * @format WEB_URL\n */\n picture?: string | null;\n /**\n * The user's preferred language, if available.\n * @format LANGUAGE\n */\n language?: string | null;\n /** The user's full name. */\n name?: string | null;\n}\n\n/**\n * Creates an access token.\n *\n *\n * The endpoint accepts raw HTTP requests. You must pass the request's body\n * parameters formatted as bytes in the raw HTTP request's `body` field,\n * following this template:\n * `{\"grantType\": \"client_credentials\", \"client_id\": \"<APP_ID>\", \"client_secret\": \"<APP_SECRET_KEY>\", \"instance_id\": \"<INSTANCE_ID>\"}`.\n *\n * When the call succeeds, Wix returns `{\"statusCode\": 200}` and the created access\n * token in the `body` field of the raw HTTP response.\n *\n * In case the call fails, Wix returns the relevant `4XX` error code in the raw\n * HTTP response's `statusCode` field and details\n * about the error in `body`. Error details follow the\n * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).\n * @public\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.Token\n */\nexport async function token(\n options?: TokenOptions\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n body: options?.body,\n pathParams: options?.pathParams,\n queryParams: options?.queryParams,\n headers: options?.headers,\n method: options?.method,\n rawPath: options?.rawPath,\n rawQuery: options?.rawQuery,\n });\n\n const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.token(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n body: '$[0].body',\n pathParams: '$[0].pathParams',\n queryParams: '$[0].queryParams',\n headers: '$[0].headers',\n method: '$[0].method',\n rawPath: '$[0].rawPath',\n rawQuery: '$[0].rawQuery',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface TokenOptions {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\n/**\n * Returns the JWKS (JSON Web Key Set) with the RSA public key used to verify asymmetrically-signed\n * tokens (e.g. OIDC id_token). Required by external OIDC relying parties.\n * Serves a non-secret public key.\n * @public\n * @documentationMaturity preview\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.Jwks\n */\nexport async function jwks(): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.jwks(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Returns the site's OAuth authorization server metadata (RFC 8414) for personal agents.\n * Served on live sites at /.well-known/oauth-authorization-server/_api/oauth2.\n * @internal\n * @documentationMaturity preview\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.AuthorizationServerMetadata\n */\nexport async function authorizationServerMetadata(): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixIdentityOauthV1RefreshToken.authorizationServerMetadata(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Returns the site's OAuth protected resource metadata (RFC 9728) for personal agents.\n * Served on live sites at /.well-known/oauth-protected-resource.\n * @internal\n * @documentationMaturity preview\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.ProtectedResourceMetadata\n */\nexport async function protectedResourceMetadata(): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixIdentityOauthV1RefreshToken.protectedResourceMetadata(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Token Introspection Endpoint.\n * @public\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.TokenInfo\n */\nexport async function tokenInfo(\n options?: TokenInfoOptions\n): Promise<\n NonNullablePaths<\n TokenInfoResponse,\n `active` | `subjectType` | `subjectId` | `clientId`,\n 0\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n body: options?.body,\n pathParams: options?.pathParams,\n queryParams: options?.queryParams,\n headers: options?.headers,\n method: options?.method,\n rawPath: options?.rawPath,\n rawQuery: options?.rawQuery,\n });\n\n const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.tokenInfo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n body: '$[0].body',\n pathParams: '$[0].pathParams',\n queryParams: '$[0].queryParams',\n headers: '$[0].headers',\n method: '$[0].method',\n rawPath: '$[0].rawPath',\n rawQuery: '$[0].rawQuery',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface TokenInfoOptions {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\n/**\n * OpenID Connect UserInfo endpoint\n * Should be called with user access token obtained in OIDC flow as Authorization header\n * @public\n * @documentationMaturity preview\n * @returns UserInfo endpoint response for OpenID Connect\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.UserInfo\n */\nexport async function userInfo(): Promise<\n NonNullablePaths<UserInfoResponse, `sub`, 0>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.userInfo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKBytesToRESTBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'body' }];\n\nfunction resolveWixIdentityOauth2V1Oauth2NgUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/token_info',\n destPath: '/v1/token_info',\n },\n ],\n 'users._base_domain_': [\n {\n srcPath: '/v1/oauth/device/verify',\n destPath: '/v1/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/manage/user-code',\n destPath: '/v1/oauth/manage/user-code',\n },\n {\n srcPath: '/v2/oauth/device/verify',\n destPath: '/v2/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/authorize',\n destPath: '/v1/oauth/authorize',\n },\n {\n srcPath: '/oauth/device/authorize',\n destPath: '/v1/oauth/device/authorize',\n },\n {\n srcPath: '/oauth/device/authorization',\n destPath: '/v1/oauth/device/authorization',\n },\n {\n srcPath: '/oauth/token',\n destPath: '/v1/oauth/token',\n },\n {\n srcPath: '/oauth/jwks',\n destPath: '/v1/oauth/jwks',\n },\n {\n srcPath: '/oauth/user-info',\n destPath: '/v1/oauth/user-info',\n },\n ],\n _: [\n {\n srcPath: '/_api/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/oauth2-ng',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_oauth';\n\n/**\n * Creates an access token.\n *\n *\n * The endpoint accepts raw HTTP requests. You must pass the request's body\n * parameters formatted as bytes in the raw HTTP request's `body` field,\n * following this template:\n * `{\"grantType\": \"client_credentials\", \"client_id\": \"<APP_ID>\", \"client_secret\": \"<APP_SECRET_KEY>\", \"instance_id\": \"<INSTANCE_ID>\"}`.\n *\n * When the call succeeds, Wix returns `{\"statusCode\": 200}` and the created access\n * token in the `body` field of the raw HTTP response.\n *\n * In case the call fails, Wix returns the relevant `4XX` error code in the raw\n * HTTP response's `statusCode` field and details\n * about the error in `body`. Error details follow the\n * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).\n */\nexport function token(payload: object): RequestOptionsFactory<any> {\n function __token({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Token',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __token;\n}\n\n/**\n * Returns the JWKS (JSON Web Key Set) with the RSA public key used to verify asymmetrically-signed\n * tokens (e.g. OIDC id_token). Required by external OIDC relying parties.\n * Serves a non-secret public key.\n */\nexport function jwks(payload: object): RequestOptionsFactory<any> {\n function __jwks({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Jwks',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/jwks',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __jwks;\n}\n\n/**\n * Returns the site's OAuth authorization server metadata (RFC 8414) for personal agents.\n * Served on live sites at /.well-known/oauth-authorization-server/_api/oauth2.\n */\nexport function authorizationServerMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __authorizationServerMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.AuthorizationServerMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/authorization-server-metadata',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __authorizationServerMetadata;\n}\n\n/**\n * Returns the site's OAuth protected resource metadata (RFC 9728) for personal agents.\n * Served on live sites at /.well-known/oauth-protected-resource.\n */\nexport function protectedResourceMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __protectedResourceMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.ProtectedResourceMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/protected-resource-metadata',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __protectedResourceMetadata;\n}\n\n/** Token Introspection Endpoint. */\nexport function tokenInfo(payload: object): RequestOptionsFactory<any> {\n function __tokenInfo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.TokenInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token-info',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __tokenInfo;\n}\n\n/**\n * OpenID Connect UserInfo endpoint\n * Should be called with user access token obtained in OIDC flow as Authorization header\n */\nexport function userInfo(payload: object): RequestOptionsFactory<any> {\n function __userInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.UserInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/user-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __userInfo;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,qCAAAA;AAAA,EAAA,YAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,gBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC;AAE3C,SAAS,sCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ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,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAoBA,eAAsBK,YAEpB;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,CAAC,CAAC;AAExD,QAAM,UAAmD,SAAS,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAL;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["authorizationServerMetadata","jwks","protectedResourceMetadata","token","tokenInfo","userInfo","import_bytes","import_rest_modules","payload","SubjectType","token","sdkTransformError","jwks","authorizationServerMetadata","protectedResourceMetadata","tokenInfo","userInfo"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/identity-oauth-v1-refresh-token-oauth.universal.ts","../../src/identity-oauth-v1-refresh-token-oauth.http.ts"],"sourcesContent":["export * from './src/identity-oauth-v1-refresh-token-oauth.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIdentityOauthV1RefreshToken from './identity-oauth-v1-refresh-token-oauth.http.js';\n\nexport interface RefreshToken {\n token?: string;\n}\n\n/**\n * TokenRequest is sent by the client to the authorization server to request an\n * access token.\n */\nexport interface TokenRequest extends TokenRequestTenantOneOf {\n /** supported tenant - specific site */\n siteId?: string | null;\n /** supported tenant - specific account */\n accountId?: string | null;\n /** The application id that want to obtain an access token. */\n clientId?: string | null;\n /**\n * grant_type specifies the grant type being used. supported grant types are:\n * `authorization_code`, `client_credentials`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`, `anonymous`,\n * `urn:ietf:params:oauth:grant-type:token-exchange`\n */\n grantType?: string;\n /** Required for `refresh_token` grant type. */\n refreshToken?: string | null;\n /** Required for `client_credentials` grant type. */\n clientSecret?: string | null;\n /**\n * Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, \"device_code\" from the\n * device authorization response\n */\n deviceCode?: string | null;\n /** Required for the `authorization_code` grant type. */\n redirectUri?: string | null;\n /** Required for `authorization_code` grant type. */\n code?: string | null;\n /** Optional, used if code challenge and code method were used in `authorization_code` grant type. */\n codeVerifier?: string | null;\n /** Required for `authorized_client` grant type - create tokens for a specific user. */\n userId?: string | null;\n /**\n * Required for `authorized_client` grant type - create tokens for a specific member.\n * Optional when `client_id` and `session_token` are sent: the member then comes from the session, and `member_id`, if\n * sent, must match it.\n */\n memberId?: string | null;\n /**\n * Required for `client_credentials` grant type with clientId that represents an external app.\n * An access token will be created based on the app installed version of an instance.\n */\n instanceId?: string | null;\n /** Required for `authorized_client` grant type for externalApp and must be bounded with client id, create access token to an app with a specific version. */\n appVersion?: string | null;\n /** Required for `strip_bound_session` grant type - create token without bound session. */\n accessToken?: string | null;\n /**\n * Optional for `authorized_client` grant type - create tokens for a specific user.\n * @format GUID\n */\n userAccountId?: string | null;\n /**\n * Optional for `authorized_client` grant type - bind the issued tokens to a specific session (session-bound wixAT/wixRT).\n * Internal-only: used by the server-to-server switchAccount flow via Oauth2NgInternal.\n * @internal\n * @format GUID\n */\n sessionId?: string | null;\n /**\n * Optional for `authorized_client` grant type (member tokens) - a member session token that is opened server-side to\n * extract the bound session id, producing session-bound wixAT/wixRT. Public: used by the member flow from public traffic.\n * When sent with `client_id` (a headless OAuth app's client ID), the tokens are issued to that client for the member\n * of the session, on the client's site rather than the caller's context.\n */\n sessionToken?: string | null;\n /**\n * Optional for `authorized_client` grant type - attach an impersonating user id to the minted token.\n * Internal-only: used by server-to-server flows where a service mints a token carrying impersonation context.\n * @internal\n * @format GUID\n */\n impersonatingUserId?: string | null;\n /**\n * Required for the `urn:ietf:params:oauth:grant-type:token-exchange` grant - the account-level access token being\n * exchanged for one scoped to the target named by the `tenant` oneof.\n */\n subjectToken?: string | null;\n /**\n * Required for the `urn:ietf:params:oauth:grant-type:token-exchange` grant - identifies the type of `subject_token`.\n * Only `urn:ietf:params:oauth:token-type:access_token` is supported.\n * @maxLength 100\n */\n subjectTokenType?: string | null;\n /**\n * RFC 7523 client authentication (private_key_jwt) - the type of `client_assertion`.\n * Only `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` is supported.\n * @maxLength 100\n */\n clientAssertionType?: string | null;\n /**\n * RFC 7523 client authentication (private_key_jwt) - a JWT signed by the client. Must not be combined with\n * `client_secret` or HTTP Basic authentication.\n * @maxLength 8192\n */\n clientAssertion?: string | null;\n}\n\n/** @oneof */\nexport interface TokenRequestTenantOneOf {\n /** supported tenant - specific site */\n siteId?: string | null;\n /** supported tenant - specific account */\n accountId?: string | null;\n}\n\nexport interface InternalTokenResponse\n extends InternalTokenResponseResultOneOf {\n success?: TokenResponse;\n failure?: TokenErrorResponse;\n}\n\n/** @oneof */\nexport interface InternalTokenResponseResultOneOf {\n success?: TokenResponse;\n failure?: TokenErrorResponse;\n}\n\nexport interface TokenResponse {\n /** The access token issued by the authorization server. */\n accessToken?: string;\n /** The type of the token issued as described in Section 7.1. of the oauth2 rfc. */\n tokenType?: string;\n /**\n * The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will\n * expire in one hour from the time the response was generated.\n */\n expiresIn?: number;\n /** The refresh token, which can be used to obtain new access tokens. */\n refreshToken?: string | null;\n /** OPTIONAL, if identical to the scope requested by the client; otherwise, will be sent. */\n scope?: string | null;\n idToken?: string | null;\n /**\n * Set only for the `urn:ietf:params:oauth:grant-type:token-exchange` grant, where it is always\n * `urn:ietf:params:oauth:token-type:access_token`. Empty for every other grant.\n * @maxLength 100\n */\n issuedTokenType?: string | null;\n}\n\nexport interface TokenErrorResponse {\n error?: string;\n errorDescription?: string | null;\n}\n\nexport interface TokenInfoRequest {\n /** The access token to introspect. */\n token?: string;\n}\n\nexport interface TokenInfoResponse {\n active?: boolean;\n /** subject type. */\n subjectType?: SubjectTypeWithLiterals;\n /** subject id */\n subjectId?: string;\n /** Expiration time of the token */\n exp?: string | null;\n /** Issued time of the token */\n iat?: string | null;\n /** Client id */\n clientId?: string;\n /** Account id */\n accountId?: string | null;\n /** Site id */\n siteId?: string | null;\n /** Instance Id */\n instanceId?: string | null;\n /**\n * Vendor Product Id\n * @maxLength 100\n */\n vendorProductId?: string | null;\n}\n\nexport enum SubjectType {\n /** unknown subject type */\n UNKNOWN = 'UNKNOWN',\n /** user subject type */\n USER = 'USER',\n /** visitor subject type */\n VISITOR = 'VISITOR',\n /** member subject type */\n MEMBER = 'MEMBER',\n /** app subject type */\n APP = 'APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'USER'\n | 'VISITOR'\n | 'MEMBER'\n | 'APP';\n\n/**\n * AuthorizeRequest is sent by the client to the authorization server to initiate\n * the authorization process.\n */\nexport interface AuthorizeRequest {\n /**\n * ID of the Wix OAuth app requesting authorization, or the https URL of a personal agent's client metadata document.\n * Any other value is refused with `invalid_client`.\n */\n clientId?: string;\n /**\n * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).\n *\n * Supported values:\n * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.\n * @minLength 1\n */\n responseType?: string;\n /**\n * URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not.\n * @minLength 1\n */\n redirectUri?: string | null;\n /**\n * Desired scope of access. If this field is left empty, only an access token is granted.\n * To received a refresh token, pass `offline_access` as the value of this field.\n */\n scope?: string | null;\n /**\n * A value used to confirm the state of an application before and after it makes an authorization\n * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser\n * is redirected there.\n * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).\n * @minLength 1\n */\n state?: string;\n /**\n * esired response format.\n *\n * Supported values:\n * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.\n * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.\n * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).\n *\n * Default value: `query`\n */\n responseMode?: string | null;\n /**\n * Code challenge to use for PKCE verification.\n * This field is only used if `responseType` is set to `code`.\n */\n codeChallenge?: string | null;\n /**\n * Code challenge method to use for PKCE verification.\n * This field is only used if `responseType` is set to `code`.\n *\n * Supported values:\n * + `S256`: The code challenge is transformed using SHA-256 encyption.\n * + `S512`: The code challenge is transformed using SHA-512 encyption.\n */\n codeChallengeMethod?: string | null;\n /**\n * Token returned by a successful [login](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/login-v-2) or [register](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/register-v-2) call that identifies the authenticated member.\n *\n * In the default SDK flow, session context is passed through a hidden iframe automatically. When using a [full-page redirect](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/members/custom-login-page/custom-login/custom-login-using-the-js-sdk#use-a-full-page-redirect-desktop-and-mobile-browsers) instead, you must pass this field explicitly because there is no iframe to carry the session context.\n */\n sessionToken?: string | null;\n /**\n * Optional fields for errors\n * A short error code that describes the type of error that occurred (e.g. \"invalid_request\")\n * @internal\n */\n error?: string | null;\n /**\n * A human-readable description of the error that occurred\n * @internal\n */\n errorDescription?: string | null;\n /**\n * DEPRECATED: no longer read. The sign-in URL is resolved from the client's OAuthClientConfiguration\n * component (sign_in_url), falling back to the default Wix sign-in page.\n * @internal\n * @format SECURE_WEB_URL\n * @deprecated\n */\n signInUrl?: string | null;\n /**\n * Indicates whether the user has consented to the requested scopes\n * @internal\n */\n userConsented?: boolean | null;\n /**\n * Indicates whether login is optional. If true, will not redirect to the sign_in_url if user is not logged in.\n * @internal\n */\n optionalLogin?: boolean | null;\n /**\n * The site id the authorization is requested for.\n * @internal\n * @format GUID\n */\n metaSiteId?: string | null;\n /**\n * ID of the IAM IdP connection to authenticate with when no member session exists.\n * When set, the sign-in redirect initiates an OIDC login against this IdP connection\n * (IAM's `/sso/login` endpoint) instead of the default Wix login page.\n * @internal\n * @format GUID\n */\n idp?: string | null;\n /**\n * OIDC nonce, bound to the authorization request and echoed back in the id_token.\n * @maxLength 512\n */\n nonce?: string | null;\n /**\n * RFC 9470 / OIDC acr_values: space-separated required ACRs (OR, in preference order) for step-up.\n * @internal\n */\n acrValues?: string | null;\n /**\n * RFC 9470 / OIDC max_age: max seconds since last auth (0 forces re-auth).\n * @internal\n */\n maxAge?: string | null;\n /** OIDC prompt. Only \"none\" is honored: request silent authorization with no user interaction. */\n prompt?: string | null;\n /**\n * Standard OAuth error code the step-up surface returns on the browser redirect back to authorize\n * (e.g. access_denied, unmet_authentication_requirements). Browser-supplied like acr_values/prompt, so\n * untrusted: allowlisted and forwarded to the client as the OAuth error.\n * @internal\n */\n stepUpError?: string | null;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\n/** Request for the Jwks endpoint. Takes no parameters. */\nexport interface JwksRequest {}\n\n/** Request for the AuthorizationServerMetadata endpoint. Takes no parameters. */\nexport interface AuthorizationServerMetadataRequest {}\n\n/** Request for the ProtectedResourceMetadata endpoint. Takes no parameters. */\nexport interface ProtectedResourceMetadataRequest {}\n\nexport interface DeviceCodeRequest {\n /** The ID of the application that asks for authorization. */\n clientId?: string;\n /**\n * scope is a space-delimited string that specifies the requested scope of the\n * access request.\n */\n scope?: string | null;\n}\n\nexport interface DeviceCodeResponse {\n /** is the unique code for the device. When the user goes to the verification_uri in their browser-based device, this code will be bound to their session. */\n deviceCode?: string;\n /** contains the code that should be input at the verification_uri to authorize the device. */\n userCode?: string;\n /** contains the URL the user should visit to authorize the device. */\n verificationUri?: string;\n /** indicates the lifetime (in seconds) of the device_code and user_code. */\n expiresIn?: number;\n /** indicates the interval (in seconds) at which the app should poll the token URL to request a token. clients MUST use 5 as the default */\n interval?: number | null;\n}\n\nexport interface DeviceAuthorizeRequest {\n /** The ID of the application that asks for authorization. */\n clientId?: string;\n /** scope is a space-delimited string that specifies the requested scope of the access request. */\n scope?: string | null;\n /**\n * OIDC nonce, bound to the device authorization and echoed back in the id_token at /token.\n * @maxLength 512\n */\n nonce?: string | null;\n}\n\nexport interface DeviceAuthorizeResponse {\n /** the unique code for the device, used to poll the token endpoint. */\n deviceCode?: string;\n /** the code the user enters at the verification_uri to authorize the device. */\n userCode?: string;\n /** the URL the user should visit to authorize the device. */\n verificationUri?: string;\n /** the verification_uri with the user_code embedded as a query param, ready to encode into a QR code. */\n verificationUriComplete?: string;\n /** lifetime (in seconds) of the device_code and user_code. */\n expiresIn?: number;\n /** interval (in seconds) at which the client should poll the token endpoint. clients MUST use 5 as the default. */\n interval?: number | null;\n}\n\nexport interface DeviceVerifyRequest {\n /** User code representing a currently authorizing device. */\n userCode?: string;\n}\n\nexport interface DeviceVerifyResponse {}\n\nexport interface DeviceVerifyV2Request {\n /**\n * User code representing a currently authorizing device.\n * @minLength 8\n * @maxLength 8\n */\n userCode?: string;\n}\n\nexport interface DeviceVerifyV2Response {}\n\nexport interface DeviceAuthorizationInfoRequest {\n /**\n * User code representing a currently authorizing device.\n * @minLength 8\n * @maxLength 8\n */\n userCode?: string;\n}\n\nexport interface DeviceAuthorizationInfoResponse {\n /** The ID of the application the device is authorizing into. */\n clientId?: string;\n /** Canonical browser name of the initiating browser (e.g. \"chrome\"). */\n browser?: string | null;\n /** Canonical OS of the initiating browser (e.g. \"windows\"). */\n os?: string | null;\n /** Canonical device class of the initiating browser (e.g. \"desktop\"). */\n deviceClass?: string | null;\n /** IP address of the initiating browser. */\n browserIp?: string | null;\n /** Coarse geo-location (country, optional region) derived from the browser IP, e.g. \"IL\" or \"US-NY\". */\n geo?: string | null;\n}\n\nexport interface InvalidateUserCodeRequest {\n /** user code to invalidate. Only the authorizing identity is able to invalidate it. */\n userCode?: string;\n}\n\nexport interface InvalidateUserCodeResponse {}\n\nexport interface RevokeRefreshTokenRequest {\n /** The refresh token itself. Anyone with the token itself is able to revoke it. */\n token?: string;\n /** The client id that issued the refresh token. */\n clientId?: string | null;\n}\n\nexport interface RevokeRefreshTokenResponse {}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface UserDeletedEvent {\n /**\n * User ID from the deletion event.\n * @format GUID\n */\n userId?: string;\n}\n\nexport interface UserBlockedEvent {\n /**\n * User ID from the deletion event.\n * @format GUID\n */\n userId?: string;\n}\n\nexport interface UserInfoRequest {}\n\n/** UserInfo endpoint response for OpenID Connect */\nexport interface UserInfoResponse {\n /**\n * Subject identifier — unique identifier for the user (OIDC standard claim).\n * @format GUID\n */\n sub?: string;\n /**\n * The user's given name.\n * @maxLength 20\n */\n givenName?: string | null;\n /**\n * The user's family name.\n * @maxLength 20\n */\n familyName?: string | null;\n /**\n * The user's email address.\n * @format EMAIL\n */\n email?: string | null;\n /** Indicates whether the user's email address has been verified. */\n emailVerified?: boolean | null;\n /**\n * The URL of the user's profile picture.\n * @format WEB_URL\n */\n picture?: string | null;\n /**\n * The user's preferred language, if available.\n * @format LANGUAGE\n */\n language?: string | null;\n /** The user's full name. */\n name?: string | null;\n}\n\n/**\n * Creates an access token.\n *\n *\n * The endpoint accepts raw HTTP requests. You must pass the request's body\n * parameters formatted as bytes in the raw HTTP request's `body` field,\n * following this template:\n * `{\"grantType\": \"client_credentials\", \"client_id\": \"<APP_ID>\", \"client_secret\": \"<APP_SECRET_KEY>\", \"instance_id\": \"<INSTANCE_ID>\"}`.\n *\n * When the call succeeds, Wix returns `{\"statusCode\": 200}` and the created access\n * token in the `body` field of the raw HTTP response.\n *\n * In case the call fails, Wix returns the relevant `4XX` error code in the raw\n * HTTP response's `statusCode` field and details\n * about the error in `body`. Error details follow the\n * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).\n * @public\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.Token\n */\nexport async function token(\n options?: TokenOptions\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n body: options?.body,\n pathParams: options?.pathParams,\n queryParams: options?.queryParams,\n headers: options?.headers,\n method: options?.method,\n rawPath: options?.rawPath,\n rawQuery: options?.rawQuery,\n });\n\n const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.token(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n body: '$[0].body',\n pathParams: '$[0].pathParams',\n queryParams: '$[0].queryParams',\n headers: '$[0].headers',\n method: '$[0].method',\n rawPath: '$[0].rawPath',\n rawQuery: '$[0].rawQuery',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface TokenOptions {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\n/**\n * Returns the JWKS (JSON Web Key Set) with the RSA public key used to verify asymmetrically-signed\n * tokens (e.g. OIDC id_token). Required by external OIDC relying parties.\n * Serves a non-secret public key.\n * @public\n * @documentationMaturity preview\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.Jwks\n */\nexport async function jwks(): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.jwks(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Returns the site's OAuth authorization server metadata (RFC 8414) for personal agents.\n * Served on live sites at /.well-known/oauth-authorization-server/_api/oauth2.\n * @internal\n * @documentationMaturity preview\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.AuthorizationServerMetadata\n */\nexport async function authorizationServerMetadata(): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixIdentityOauthV1RefreshToken.authorizationServerMetadata(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Returns the site's OAuth protected resource metadata (RFC 9728) for personal agents.\n * Served on live sites at /.well-known/oauth-protected-resource.\n * @internal\n * @documentationMaturity preview\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.ProtectedResourceMetadata\n */\nexport async function protectedResourceMetadata(): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixIdentityOauthV1RefreshToken.protectedResourceMetadata(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Token Introspection Endpoint.\n * @public\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.TokenInfo\n */\nexport async function tokenInfo(\n options?: TokenInfoOptions\n): Promise<\n NonNullablePaths<\n TokenInfoResponse,\n `active` | `subjectType` | `subjectId` | `clientId`,\n 0\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n body: options?.body,\n pathParams: options?.pathParams,\n queryParams: options?.queryParams,\n headers: options?.headers,\n method: options?.method,\n rawPath: options?.rawPath,\n rawQuery: options?.rawQuery,\n });\n\n const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.tokenInfo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n body: '$[0].body',\n pathParams: '$[0].pathParams',\n queryParams: '$[0].queryParams',\n headers: '$[0].headers',\n method: '$[0].method',\n rawPath: '$[0].rawPath',\n rawQuery: '$[0].rawQuery',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface TokenInfoOptions {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\n/**\n * OpenID Connect UserInfo endpoint\n * Should be called with user access token obtained in OIDC flow as Authorization header\n * @public\n * @documentationMaturity preview\n * @returns UserInfo endpoint response for OpenID Connect\n * @fqn wix.identity.oauth2.v1.Oauth2Ng.UserInfo\n */\nexport async function userInfo(): Promise<\n NonNullablePaths<UserInfoResponse, `sub`, 0>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.userInfo(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKBytesToRESTBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'body' }];\n\nfunction resolveWixIdentityOauth2V1Oauth2NgUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/token_info',\n destPath: '/v1/token_info',\n },\n ],\n 'users._base_domain_': [\n {\n srcPath: '/v1/oauth/device/verify',\n destPath: '/v1/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/manage/user-code',\n destPath: '/v1/oauth/manage/user-code',\n },\n {\n srcPath: '/v2/oauth/device/verify',\n destPath: '/v2/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/authorize',\n destPath: '/v1/oauth/authorize',\n },\n {\n srcPath: '/oauth/device/authorize',\n destPath: '/v1/oauth/device/authorize',\n },\n {\n srcPath: '/oauth/device/authorization',\n destPath: '/v1/oauth/device/authorization',\n },\n {\n srcPath: '/oauth/token',\n destPath: '/v1/oauth/token',\n },\n {\n srcPath: '/oauth/jwks',\n destPath: '/v1/oauth/jwks',\n },\n {\n srcPath: '/oauth/user-info',\n destPath: '/v1/oauth/user-info',\n },\n ],\n _: [\n {\n srcPath: '/_api/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/.well-known/oauth-protected-resource',\n destPath: '/v1/oauth/protected-resource-metadata',\n },\n {\n srcPath: '/.well-known/oauth-authorization-server/_api/oauth2',\n destPath: '/v1/oauth/authorization-server-metadata',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/oauth2-ng',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_oauth';\n\n/**\n * Creates an access token.\n *\n *\n * The endpoint accepts raw HTTP requests. You must pass the request's body\n * parameters formatted as bytes in the raw HTTP request's `body` field,\n * following this template:\n * `{\"grantType\": \"client_credentials\", \"client_id\": \"<APP_ID>\", \"client_secret\": \"<APP_SECRET_KEY>\", \"instance_id\": \"<INSTANCE_ID>\"}`.\n *\n * When the call succeeds, Wix returns `{\"statusCode\": 200}` and the created access\n * token in the `body` field of the raw HTTP response.\n *\n * In case the call fails, Wix returns the relevant `4XX` error code in the raw\n * HTTP response's `statusCode` field and details\n * about the error in `body`. Error details follow the\n * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).\n */\nexport function token(payload: object): RequestOptionsFactory<any> {\n function __token({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Token',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __token;\n}\n\n/**\n * Returns the JWKS (JSON Web Key Set) with the RSA public key used to verify asymmetrically-signed\n * tokens (e.g. OIDC id_token). Required by external OIDC relying parties.\n * Serves a non-secret public key.\n */\nexport function jwks(payload: object): RequestOptionsFactory<any> {\n function __jwks({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Jwks',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/jwks',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __jwks;\n}\n\n/**\n * Returns the site's OAuth authorization server metadata (RFC 8414) for personal agents.\n * Served on live sites at /.well-known/oauth-authorization-server/_api/oauth2.\n */\nexport function authorizationServerMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __authorizationServerMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.AuthorizationServerMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/authorization-server-metadata',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __authorizationServerMetadata;\n}\n\n/**\n * Returns the site's OAuth protected resource metadata (RFC 9728) for personal agents.\n * Served on live sites at /.well-known/oauth-protected-resource.\n */\nexport function protectedResourceMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __protectedResourceMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.ProtectedResourceMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/protected-resource-metadata',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __protectedResourceMetadata;\n}\n\n/** Token Introspection Endpoint. */\nexport function tokenInfo(payload: object): RequestOptionsFactory<any> {\n function __tokenInfo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.TokenInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token-info',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __tokenInfo;\n}\n\n/**\n * OpenID Connect UserInfo endpoint\n * Should be called with user access token obtained in OIDC flow as Authorization header\n */\nexport function userInfo(payload: object): RequestOptionsFactory<any> {\n function __userInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.UserInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/user-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __userInfo;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,qCAAAA;AAAA,EAAA,YAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,gBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7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,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAL;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["authorizationServerMetadata","jwks","protectedResourceMetadata","token","tokenInfo","userInfo","import_bytes","import_rest_modules","payload","SubjectType","token","sdkTransformError","jwks","authorizationServerMetadata","protectedResourceMetadata","tokenInfo","userInfo"]}
@@ -179,8 +179,8 @@ type SubjectTypeWithLiterals = SubjectType | 'UNKNOWN' | 'USER' | 'VISITOR' | 'M
179
179
  */
180
180
  interface AuthorizeRequest {
181
181
  /**
182
- * ID of the Wix OAuth app requesting authorization.
183
- * @format GUID
182
+ * ID of the Wix OAuth app requesting authorization, or the https URL of a personal agent's client metadata document.
183
+ * Any other value is refused with `invalid_client`.
184
184
  */
185
185
  clientId?: string;
186
186
  /**
package/build/cjs/meta.js CHANGED
@@ -97,6 +97,14 @@ function resolveWixIdentityOauth2V1Oauth2NgUrl(opts) {
97
97
  {
98
98
  srcPath: "/_api/oauth2",
99
99
  destPath: "/v1/oauth"
100
+ },
101
+ {
102
+ srcPath: "/.well-known/oauth-protected-resource",
103
+ destPath: "/v1/oauth/protected-resource-metadata"
104
+ },
105
+ {
106
+ srcPath: "/.well-known/oauth-authorization-server/_api/oauth2",
107
+ destPath: "/v1/oauth/authorization-server-metadata"
100
108
  }
101
109
  ],
102
110
  "platform.rise.ai": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/identity-oauth-v1-refresh-token-oauth.http.ts","../../src/identity-oauth-v1-refresh-token-oauth.types.ts","../../src/identity-oauth-v1-refresh-token-oauth.meta.ts"],"sourcesContent":["export * from './src/identity-oauth-v1-refresh-token-oauth.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKBytesToRESTBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'body' }];\n\nfunction resolveWixIdentityOauth2V1Oauth2NgUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/token_info',\n destPath: '/v1/token_info',\n },\n ],\n 'users._base_domain_': [\n {\n srcPath: '/v1/oauth/device/verify',\n destPath: '/v1/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/manage/user-code',\n destPath: '/v1/oauth/manage/user-code',\n },\n {\n srcPath: '/v2/oauth/device/verify',\n destPath: '/v2/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/authorize',\n destPath: '/v1/oauth/authorize',\n },\n {\n srcPath: '/oauth/device/authorize',\n destPath: '/v1/oauth/device/authorize',\n },\n {\n srcPath: '/oauth/device/authorization',\n destPath: '/v1/oauth/device/authorization',\n },\n {\n srcPath: '/oauth/token',\n destPath: '/v1/oauth/token',\n },\n {\n srcPath: '/oauth/jwks',\n destPath: '/v1/oauth/jwks',\n },\n {\n srcPath: '/oauth/user-info',\n destPath: '/v1/oauth/user-info',\n },\n ],\n _: [\n {\n srcPath: '/_api/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/oauth2-ng',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_oauth';\n\n/**\n * Creates an access token.\n *\n *\n * The endpoint accepts raw HTTP requests. You must pass the request's body\n * parameters formatted as bytes in the raw HTTP request's `body` field,\n * following this template:\n * `{\"grantType\": \"client_credentials\", \"client_id\": \"<APP_ID>\", \"client_secret\": \"<APP_SECRET_KEY>\", \"instance_id\": \"<INSTANCE_ID>\"}`.\n *\n * When the call succeeds, Wix returns `{\"statusCode\": 200}` and the created access\n * token in the `body` field of the raw HTTP response.\n *\n * In case the call fails, Wix returns the relevant `4XX` error code in the raw\n * HTTP response's `statusCode` field and details\n * about the error in `body`. Error details follow the\n * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).\n */\nexport function token(payload: object): RequestOptionsFactory<any> {\n function __token({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Token',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __token;\n}\n\n/**\n * Returns the JWKS (JSON Web Key Set) with the RSA public key used to verify asymmetrically-signed\n * tokens (e.g. OIDC id_token). Required by external OIDC relying parties.\n * Serves a non-secret public key.\n */\nexport function jwks(payload: object): RequestOptionsFactory<any> {\n function __jwks({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Jwks',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/jwks',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __jwks;\n}\n\n/**\n * Returns the site's OAuth authorization server metadata (RFC 8414) for personal agents.\n * Served on live sites at /.well-known/oauth-authorization-server/_api/oauth2.\n */\nexport function authorizationServerMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __authorizationServerMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.AuthorizationServerMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/authorization-server-metadata',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __authorizationServerMetadata;\n}\n\n/**\n * Returns the site's OAuth protected resource metadata (RFC 9728) for personal agents.\n * Served on live sites at /.well-known/oauth-protected-resource.\n */\nexport function protectedResourceMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __protectedResourceMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.ProtectedResourceMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/protected-resource-metadata',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __protectedResourceMetadata;\n}\n\n/** Token Introspection Endpoint. */\nexport function tokenInfo(payload: object): RequestOptionsFactory<any> {\n function __tokenInfo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.TokenInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token-info',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __tokenInfo;\n}\n\n/**\n * OpenID Connect UserInfo endpoint\n * Should be called with user access token obtained in OIDC flow as Authorization header\n */\nexport function userInfo(payload: object): RequestOptionsFactory<any> {\n function __userInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.UserInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/user-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __userInfo;\n}\n","export interface RefreshToken {\n token?: string;\n}\n\n/**\n * TokenRequest is sent by the client to the authorization server to request an\n * access token.\n */\nexport interface TokenRequest extends TokenRequestTenantOneOf {\n /** supported tenant - specific site */\n siteId?: string | null;\n /** supported tenant - specific account */\n accountId?: string | null;\n /** The application id that want to obtain an access token. */\n clientId?: string | null;\n /**\n * grant_type specifies the grant type being used. supported grant types are:\n * `authorization_code`, `client_credentials`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`, `anonymous`,\n * `urn:ietf:params:oauth:grant-type:token-exchange`\n */\n grantType?: string;\n /** Required for `refresh_token` grant type. */\n refreshToken?: string | null;\n /** Required for `client_credentials` grant type. */\n clientSecret?: string | null;\n /**\n * Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, \"device_code\" from the\n * device authorization response\n */\n deviceCode?: string | null;\n /** Required for the `authorization_code` grant type. */\n redirectUri?: string | null;\n /** Required for `authorization_code` grant type. */\n code?: string | null;\n /** Optional, used if code challenge and code method were used in `authorization_code` grant type. */\n codeVerifier?: string | null;\n /** Required for `authorized_client` grant type - create tokens for a specific user. */\n userId?: string | null;\n /**\n * Required for `authorized_client` grant type - create tokens for a specific member.\n * Optional when `client_id` and `session_token` are sent: the member then comes from the session, and `member_id`, if\n * sent, must match it.\n */\n memberId?: string | null;\n /**\n * Required for `client_credentials` grant type with clientId that represents an external app.\n * An access token will be created based on the app installed version of an instance.\n */\n instanceId?: string | null;\n /** Required for `authorized_client` grant type for externalApp and must be bounded with client id, create access token to an app with a specific version. */\n appVersion?: string | null;\n /** Required for `strip_bound_session` grant type - create token without bound session. */\n accessToken?: string | null;\n /**\n * Optional for `authorized_client` grant type - create tokens for a specific user.\n * @format GUID\n */\n userAccountId?: string | null;\n /**\n * Optional for `authorized_client` grant type - bind the issued tokens to a specific session (session-bound wixAT/wixRT).\n * Internal-only: used by the server-to-server switchAccount flow via Oauth2NgInternal.\n * @internal\n * @format GUID\n */\n sessionId?: string | null;\n /**\n * Optional for `authorized_client` grant type (member tokens) - a member session token that is opened server-side to\n * extract the bound session id, producing session-bound wixAT/wixRT. Public: used by the member flow from public traffic.\n * When sent with `client_id` (a headless OAuth app's client ID), the tokens are issued to that client for the member\n * of the session, on the client's site rather than the caller's context.\n */\n sessionToken?: string | null;\n /**\n * Optional for `authorized_client` grant type - attach an impersonating user id to the minted token.\n * Internal-only: used by server-to-server flows where a service mints a token carrying impersonation context.\n * @internal\n * @format GUID\n */\n impersonatingUserId?: string | null;\n /**\n * Required for the `urn:ietf:params:oauth:grant-type:token-exchange` grant - the account-level access token being\n * exchanged for one scoped to the target named by the `tenant` oneof.\n */\n subjectToken?: string | null;\n /**\n * Required for the `urn:ietf:params:oauth:grant-type:token-exchange` grant - identifies the type of `subject_token`.\n * Only `urn:ietf:params:oauth:token-type:access_token` is supported.\n * @maxLength 100\n */\n subjectTokenType?: string | null;\n /**\n * RFC 7523 client authentication (private_key_jwt) - the type of `client_assertion`.\n * Only `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` is supported.\n * @maxLength 100\n */\n clientAssertionType?: string | null;\n /**\n * RFC 7523 client authentication (private_key_jwt) - a JWT signed by the client. Must not be combined with\n * `client_secret` or HTTP Basic authentication.\n * @maxLength 8192\n */\n clientAssertion?: string | null;\n}\n\n/** @oneof */\nexport interface TokenRequestTenantOneOf {\n /** supported tenant - specific site */\n siteId?: string | null;\n /** supported tenant - specific account */\n accountId?: string | null;\n}\n\nexport interface InternalTokenResponse\n extends InternalTokenResponseResultOneOf {\n success?: TokenResponse;\n failure?: TokenErrorResponse;\n}\n\n/** @oneof */\nexport interface InternalTokenResponseResultOneOf {\n success?: TokenResponse;\n failure?: TokenErrorResponse;\n}\n\nexport interface TokenResponse {\n /** The access token issued by the authorization server. */\n accessToken?: string;\n /** The type of the token issued as described in Section 7.1. of the oauth2 rfc. */\n tokenType?: string;\n /**\n * The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will\n * expire in one hour from the time the response was generated.\n */\n expiresIn?: number;\n /** The refresh token, which can be used to obtain new access tokens. */\n refreshToken?: string | null;\n /** OPTIONAL, if identical to the scope requested by the client; otherwise, will be sent. */\n scope?: string | null;\n idToken?: string | null;\n /**\n * Set only for the `urn:ietf:params:oauth:grant-type:token-exchange` grant, where it is always\n * `urn:ietf:params:oauth:token-type:access_token`. Empty for every other grant.\n * @maxLength 100\n */\n issuedTokenType?: string | null;\n}\n\nexport interface TokenErrorResponse {\n error?: string;\n errorDescription?: string | null;\n}\n\nexport interface TokenInfoRequest {\n /** The access token to introspect. */\n token?: string;\n}\n\nexport interface TokenInfoResponse {\n active?: boolean;\n /** subject type. */\n subjectType?: SubjectTypeWithLiterals;\n /** subject id */\n subjectId?: string;\n /** Expiration time of the token */\n exp?: string | null;\n /** Issued time of the token */\n iat?: string | null;\n /** Client id */\n clientId?: string;\n /** Account id */\n accountId?: string | null;\n /** Site id */\n siteId?: string | null;\n /** Instance Id */\n instanceId?: string | null;\n /**\n * Vendor Product Id\n * @maxLength 100\n */\n vendorProductId?: string | null;\n}\n\nexport enum SubjectType {\n /** unknown subject type */\n UNKNOWN = 'UNKNOWN',\n /** user subject type */\n USER = 'USER',\n /** visitor subject type */\n VISITOR = 'VISITOR',\n /** member subject type */\n MEMBER = 'MEMBER',\n /** app subject type */\n APP = 'APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'USER'\n | 'VISITOR'\n | 'MEMBER'\n | 'APP';\n\n/**\n * AuthorizeRequest is sent by the client to the authorization server to initiate\n * the authorization process.\n */\nexport interface AuthorizeRequest {\n /**\n * ID of the Wix OAuth app requesting authorization.\n * @format GUID\n */\n clientId?: string;\n /**\n * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).\n *\n * Supported values:\n * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.\n * @minLength 1\n */\n responseType?: string;\n /**\n * URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not.\n * @minLength 1\n */\n redirectUri?: string | null;\n /**\n * Desired scope of access. If this field is left empty, only an access token is granted.\n * To received a refresh token, pass `offline_access` as the value of this field.\n */\n scope?: string | null;\n /**\n * A value used to confirm the state of an application before and after it makes an authorization\n * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser\n * is redirected there.\n * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).\n * @minLength 1\n */\n state?: string;\n /**\n * esired response format.\n *\n * Supported values:\n * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.\n * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.\n * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).\n *\n * Default value: `query`\n */\n responseMode?: string | null;\n /**\n * Code challenge to use for PKCE verification.\n * This field is only used if `responseType` is set to `code`.\n */\n codeChallenge?: string | null;\n /**\n * Code challenge method to use for PKCE verification.\n * This field is only used if `responseType` is set to `code`.\n *\n * Supported values:\n * + `S256`: The code challenge is transformed using SHA-256 encyption.\n * + `S512`: The code challenge is transformed using SHA-512 encyption.\n */\n codeChallengeMethod?: string | null;\n /**\n * Token returned by a successful [login](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/login-v-2) or [register](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/register-v-2) call that identifies the authenticated member.\n *\n * In the default SDK flow, session context is passed through a hidden iframe automatically. When using a [full-page redirect](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/members/custom-login-page/custom-login/custom-login-using-the-js-sdk#use-a-full-page-redirect-desktop-and-mobile-browsers) instead, you must pass this field explicitly because there is no iframe to carry the session context.\n */\n sessionToken?: string | null;\n /**\n * Optional fields for errors\n * A short error code that describes the type of error that occurred (e.g. \"invalid_request\")\n * @internal\n */\n error?: string | null;\n /**\n * A human-readable description of the error that occurred\n * @internal\n */\n errorDescription?: string | null;\n /**\n * DEPRECATED: no longer read. The sign-in URL is resolved from the client's OAuthClientConfiguration\n * component (sign_in_url), falling back to the default Wix sign-in page.\n * @internal\n * @format SECURE_WEB_URL\n * @deprecated\n */\n signInUrl?: string | null;\n /**\n * Indicates whether the user has consented to the requested scopes\n * @internal\n */\n userConsented?: boolean | null;\n /**\n * Indicates whether login is optional. If true, will not redirect to the sign_in_url if user is not logged in.\n * @internal\n */\n optionalLogin?: boolean | null;\n /**\n * The site id the authorization is requested for.\n * @internal\n * @format GUID\n */\n metaSiteId?: string | null;\n /**\n * ID of the IAM IdP connection to authenticate with when no member session exists.\n * When set, the sign-in redirect initiates an OIDC login against this IdP connection\n * (IAM's `/sso/login` endpoint) instead of the default Wix login page.\n * @internal\n * @format GUID\n */\n idp?: string | null;\n /**\n * OIDC nonce, bound to the authorization request and echoed back in the id_token.\n * @maxLength 512\n */\n nonce?: string | null;\n /**\n * RFC 9470 / OIDC acr_values: space-separated required ACRs (OR, in preference order) for step-up.\n * @internal\n */\n acrValues?: string | null;\n /**\n * RFC 9470 / OIDC max_age: max seconds since last auth (0 forces re-auth).\n * @internal\n */\n maxAge?: string | null;\n /** OIDC prompt. Only \"none\" is honored: request silent authorization with no user interaction. */\n prompt?: string | null;\n /**\n * Standard OAuth error code the step-up surface returns on the browser redirect back to authorize\n * (e.g. access_denied, unmet_authentication_requirements). Browser-supplied like acr_values/prompt, so\n * untrusted: allowlisted and forwarded to the client as the OAuth error.\n * @internal\n */\n stepUpError?: string | null;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\n/** Request for the Jwks endpoint. Takes no parameters. */\nexport interface JwksRequest {}\n\n/** Request for the AuthorizationServerMetadata endpoint. Takes no parameters. */\nexport interface AuthorizationServerMetadataRequest {}\n\n/** Request for the ProtectedResourceMetadata endpoint. Takes no parameters. */\nexport interface ProtectedResourceMetadataRequest {}\n\nexport interface DeviceCodeRequest {\n /** The ID of the application that asks for authorization. */\n clientId?: string;\n /**\n * scope is a space-delimited string that specifies the requested scope of the\n * access request.\n */\n scope?: string | null;\n}\n\nexport interface DeviceCodeResponse {\n /** is the unique code for the device. When the user goes to the verification_uri in their browser-based device, this code will be bound to their session. */\n deviceCode?: string;\n /** contains the code that should be input at the verification_uri to authorize the device. */\n userCode?: string;\n /** contains the URL the user should visit to authorize the device. */\n verificationUri?: string;\n /** indicates the lifetime (in seconds) of the device_code and user_code. */\n expiresIn?: number;\n /** indicates the interval (in seconds) at which the app should poll the token URL to request a token. clients MUST use 5 as the default */\n interval?: number | null;\n}\n\nexport interface DeviceAuthorizeRequest {\n /** The ID of the application that asks for authorization. */\n clientId?: string;\n /** scope is a space-delimited string that specifies the requested scope of the access request. */\n scope?: string | null;\n /**\n * OIDC nonce, bound to the device authorization and echoed back in the id_token at /token.\n * @maxLength 512\n */\n nonce?: string | null;\n}\n\nexport interface DeviceAuthorizeResponse {\n /** the unique code for the device, used to poll the token endpoint. */\n deviceCode?: string;\n /** the code the user enters at the verification_uri to authorize the device. */\n userCode?: string;\n /** the URL the user should visit to authorize the device. */\n verificationUri?: string;\n /** the verification_uri with the user_code embedded as a query param, ready to encode into a QR code. */\n verificationUriComplete?: string;\n /** lifetime (in seconds) of the device_code and user_code. */\n expiresIn?: number;\n /** interval (in seconds) at which the client should poll the token endpoint. clients MUST use 5 as the default. */\n interval?: number | null;\n}\n\nexport interface DeviceVerifyRequest {\n /** User code representing a currently authorizing device. */\n userCode?: string;\n}\n\nexport interface DeviceVerifyResponse {}\n\nexport interface DeviceVerifyV2Request {\n /**\n * User code representing a currently authorizing device.\n * @minLength 8\n * @maxLength 8\n */\n userCode?: string;\n}\n\nexport interface DeviceVerifyV2Response {}\n\nexport interface DeviceAuthorizationInfoRequest {\n /**\n * User code representing a currently authorizing device.\n * @minLength 8\n * @maxLength 8\n */\n userCode?: string;\n}\n\nexport interface DeviceAuthorizationInfoResponse {\n /** The ID of the application the device is authorizing into. */\n clientId?: string;\n /** Canonical browser name of the initiating browser (e.g. \"chrome\"). */\n browser?: string | null;\n /** Canonical OS of the initiating browser (e.g. \"windows\"). */\n os?: string | null;\n /** Canonical device class of the initiating browser (e.g. \"desktop\"). */\n deviceClass?: string | null;\n /** IP address of the initiating browser. */\n browserIp?: string | null;\n /** Coarse geo-location (country, optional region) derived from the browser IP, e.g. \"IL\" or \"US-NY\". */\n geo?: string | null;\n}\n\nexport interface InvalidateUserCodeRequest {\n /** user code to invalidate. Only the authorizing identity is able to invalidate it. */\n userCode?: string;\n}\n\nexport interface InvalidateUserCodeResponse {}\n\nexport interface RevokeRefreshTokenRequest {\n /** The refresh token itself. Anyone with the token itself is able to revoke it. */\n token?: string;\n /** The client id that issued the refresh token. */\n clientId?: string | null;\n}\n\nexport interface RevokeRefreshTokenResponse {}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n /**\n * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface UserDeletedEvent {\n /**\n * User ID from the deletion event.\n * @format GUID\n */\n userId?: string;\n}\n\nexport interface UserBlockedEvent {\n /**\n * User ID from the deletion event.\n * @format GUID\n */\n userId?: string;\n}\n\nexport interface UserInfoRequest {}\n\n/** UserInfo endpoint response for OpenID Connect */\nexport interface UserInfoResponse {\n /**\n * Subject identifier — unique identifier for the user (OIDC standard claim).\n * @format GUID\n */\n sub?: string;\n /**\n * The user's given name.\n * @maxLength 20\n */\n givenName?: string | null;\n /**\n * The user's family name.\n * @maxLength 20\n */\n familyName?: string | null;\n /**\n * The user's email address.\n * @format EMAIL\n */\n email?: string | null;\n /** Indicates whether the user's email address has been verified. */\n emailVerified?: boolean | null;\n /**\n * The URL of the user's profile picture.\n * @format WEB_URL\n */\n picture?: string | null;\n /**\n * The user's preferred language, if available.\n * @format LANGUAGE\n */\n language?: string | null;\n /** The user's full name. */\n name?: string | null;\n}\n","import * as ambassadorWixIdentityOauthV1RefreshToken from './identity-oauth-v1-refresh-token-oauth.http.js';\nimport * as ambassadorWixIdentityOauthV1RefreshTokenTypes from './identity-oauth-v1-refresh-token-oauth.types.js';\nimport * as ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes from './identity-oauth-v1-refresh-token-oauth.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function token(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.token(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/oauth/token',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function jwks(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.JwksRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.JwksRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.jwks(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/oauth/jwks',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function authorizationServerMetadata(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.AuthorizationServerMetadataRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.AuthorizationServerMetadataRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.authorizationServerMetadata(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/oauth/authorization-server-metadata',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function protectedResourceMetadata(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.ProtectedResourceMetadataRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.ProtectedResourceMetadataRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.protectedResourceMetadata(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/oauth/protected-resource-metadata',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function tokenInfo(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.TokenInfoResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.TokenInfoResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.tokenInfo(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/oauth/token-info',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function userInfo(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.UserInfoRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.UserInfoRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.UserInfoResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.UserInfoResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.userInfo(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/oauth/user-info',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n RefreshToken as RefreshTokenOriginal,\n TokenRequest as TokenRequestOriginal,\n TokenRequestTenantOneOf as TokenRequestTenantOneOfOriginal,\n InternalTokenResponse as InternalTokenResponseOriginal,\n InternalTokenResponseResultOneOf as InternalTokenResponseResultOneOfOriginal,\n TokenResponse as TokenResponseOriginal,\n TokenErrorResponse as TokenErrorResponseOriginal,\n TokenInfoRequest as TokenInfoRequestOriginal,\n TokenInfoResponse as TokenInfoResponseOriginal,\n SubjectType as SubjectTypeOriginal,\n SubjectTypeWithLiterals as SubjectTypeWithLiteralsOriginal,\n AuthorizeRequest as AuthorizeRequestOriginal,\n RawHttpResponse as RawHttpResponseOriginal,\n HeadersEntry as HeadersEntryOriginal,\n RawHttpRequest as RawHttpRequestOriginal,\n PathParametersEntry as PathParametersEntryOriginal,\n QueryParametersEntry as QueryParametersEntryOriginal,\n JwksRequest as JwksRequestOriginal,\n AuthorizationServerMetadataRequest as AuthorizationServerMetadataRequestOriginal,\n ProtectedResourceMetadataRequest as ProtectedResourceMetadataRequestOriginal,\n DeviceCodeRequest as DeviceCodeRequestOriginal,\n DeviceCodeResponse as DeviceCodeResponseOriginal,\n DeviceAuthorizeRequest as DeviceAuthorizeRequestOriginal,\n DeviceAuthorizeResponse as DeviceAuthorizeResponseOriginal,\n DeviceVerifyRequest as DeviceVerifyRequestOriginal,\n DeviceVerifyResponse as DeviceVerifyResponseOriginal,\n DeviceVerifyV2Request as DeviceVerifyV2RequestOriginal,\n DeviceVerifyV2Response as DeviceVerifyV2ResponseOriginal,\n DeviceAuthorizationInfoRequest as DeviceAuthorizationInfoRequestOriginal,\n DeviceAuthorizationInfoResponse as DeviceAuthorizationInfoResponseOriginal,\n InvalidateUserCodeRequest as InvalidateUserCodeRequestOriginal,\n InvalidateUserCodeResponse as InvalidateUserCodeResponseOriginal,\n RevokeRefreshTokenRequest as RevokeRefreshTokenRequestOriginal,\n RevokeRefreshTokenResponse as RevokeRefreshTokenResponseOriginal,\n Empty as EmptyOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n UserDeletedEvent as UserDeletedEventOriginal,\n UserBlockedEvent as UserBlockedEventOriginal,\n UserInfoRequest as UserInfoRequestOriginal,\n UserInfoResponse as UserInfoResponseOriginal,\n} from './identity-oauth-v1-refresh-token-oauth.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,qCAAAA;AAAA,EAAA,YAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,gBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC;AAE3C,SAAS,sCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,S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,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,YAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,SAAS,OAAO;AAE3D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["authorizationServerMetadata","jwks","protectedResourceMetadata","token","tokenInfo","userInfo","import_bytes","import_rest_modules","payload","SubjectType","token","jwks","authorizationServerMetadata","protectedResourceMetadata","tokenInfo","userInfo"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/identity-oauth-v1-refresh-token-oauth.http.ts","../../src/identity-oauth-v1-refresh-token-oauth.types.ts","../../src/identity-oauth-v1-refresh-token-oauth.meta.ts"],"sourcesContent":["export * from './src/identity-oauth-v1-refresh-token-oauth.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKBytesToRESTBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'body' }];\n\nfunction resolveWixIdentityOauth2V1Oauth2NgUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/token_info',\n destPath: '/v1/token_info',\n },\n ],\n 'users._base_domain_': [\n {\n srcPath: '/v1/oauth/device/verify',\n destPath: '/v1/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/manage/user-code',\n destPath: '/v1/oauth/manage/user-code',\n },\n {\n srcPath: '/v2/oauth/device/verify',\n destPath: '/v2/oauth/device/verify',\n },\n {\n srcPath: '/v1/oauth/authorize',\n destPath: '/v1/oauth/authorize',\n },\n {\n srcPath: '/oauth/device/authorize',\n destPath: '/v1/oauth/device/authorize',\n },\n {\n srcPath: '/oauth/device/authorization',\n destPath: '/v1/oauth/device/authorization',\n },\n {\n srcPath: '/oauth/token',\n destPath: '/v1/oauth/token',\n },\n {\n srcPath: '/oauth/jwks',\n destPath: '/v1/oauth/jwks',\n },\n {\n srcPath: '/oauth/user-info',\n destPath: '/v1/oauth/user-info',\n },\n ],\n _: [\n {\n srcPath: '/_api/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/.well-known/oauth-protected-resource',\n destPath: '/v1/oauth/protected-resource-metadata',\n },\n {\n srcPath: '/.well-known/oauth-authorization-server/_api/oauth2',\n destPath: '/v1/oauth/authorization-server-metadata',\n },\n ],\n 'platform.rise.ai': [\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/oauth2-ng',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2',\n destPath: '/v1/oauth',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/oauth2/callback',\n destPath: '/oauth2/callback',\n },\n {\n srcPath: '/oauth2/user-authorized',\n destPath: '/oauth2/user-authorized',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_oauth';\n\n/**\n * Creates an access token.\n *\n *\n * The endpoint accepts raw HTTP requests. You must pass the request's body\n * parameters formatted as bytes in the raw HTTP request's `body` field,\n * following this template:\n * `{\"grantType\": \"client_credentials\", \"client_id\": \"<APP_ID>\", \"client_secret\": \"<APP_SECRET_KEY>\", \"instance_id\": \"<INSTANCE_ID>\"}`.\n *\n * When the call succeeds, Wix returns `{\"statusCode\": 200}` and the created access\n * token in the `body` field of the raw HTTP response.\n *\n * In case the call fails, Wix returns the relevant `4XX` error code in the raw\n * HTTP response's `statusCode` field and details\n * about the error in `body`. Error details follow the\n * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).\n */\nexport function token(payload: object): RequestOptionsFactory<any> {\n function __token({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Token',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __token;\n}\n\n/**\n * Returns the JWKS (JSON Web Key Set) with the RSA public key used to verify asymmetrically-signed\n * tokens (e.g. OIDC id_token). Required by external OIDC relying parties.\n * Serves a non-secret public key.\n */\nexport function jwks(payload: object): RequestOptionsFactory<any> {\n function __jwks({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Jwks',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/jwks',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __jwks;\n}\n\n/**\n * Returns the site's OAuth authorization server metadata (RFC 8414) for personal agents.\n * Served on live sites at /.well-known/oauth-authorization-server/_api/oauth2.\n */\nexport function authorizationServerMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __authorizationServerMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.AuthorizationServerMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/authorization-server-metadata',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __authorizationServerMetadata;\n}\n\n/**\n * Returns the site's OAuth protected resource metadata (RFC 9728) for personal agents.\n * Served on live sites at /.well-known/oauth-protected-resource.\n */\nexport function protectedResourceMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __protectedResourceMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.ProtectedResourceMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/protected-resource-metadata',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __protectedResourceMetadata;\n}\n\n/** Token Introspection Endpoint. */\nexport function tokenInfo(payload: object): RequestOptionsFactory<any> {\n function __tokenInfo({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKBytesToRESTBytes,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'POST' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.TokenInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/token-info',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __tokenInfo;\n}\n\n/**\n * OpenID Connect UserInfo endpoint\n * Should be called with user access token obtained in OIDC flow as Authorization header\n */\nexport function userInfo(payload: object): RequestOptionsFactory<any> {\n function __userInfo({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.identity.oauth.v1.refresh_token',\n method: 'GET' as any,\n methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.UserInfo',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIdentityOauth2V1Oauth2NgUrl({\n protoPath: '/v1/oauth/user-info',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __userInfo;\n}\n","export interface RefreshToken {\n token?: string;\n}\n\n/**\n * TokenRequest is sent by the client to the authorization server to request an\n * access token.\n */\nexport interface TokenRequest extends TokenRequestTenantOneOf {\n /** supported tenant - specific site */\n siteId?: string | null;\n /** supported tenant - specific account */\n accountId?: string | null;\n /** The application id that want to obtain an access token. */\n clientId?: string | null;\n /**\n * grant_type specifies the grant type being used. supported grant types are:\n * `authorization_code`, `client_credentials`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`, `anonymous`,\n * `urn:ietf:params:oauth:grant-type:token-exchange`\n */\n grantType?: string;\n /** Required for `refresh_token` grant type. */\n refreshToken?: string | null;\n /** Required for `client_credentials` grant type. */\n clientSecret?: string | null;\n /**\n * Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, \"device_code\" from the\n * device authorization response\n */\n deviceCode?: string | null;\n /** Required for the `authorization_code` grant type. */\n redirectUri?: string | null;\n /** Required for `authorization_code` grant type. */\n code?: string | null;\n /** Optional, used if code challenge and code method were used in `authorization_code` grant type. */\n codeVerifier?: string | null;\n /** Required for `authorized_client` grant type - create tokens for a specific user. */\n userId?: string | null;\n /**\n * Required for `authorized_client` grant type - create tokens for a specific member.\n * Optional when `client_id` and `session_token` are sent: the member then comes from the session, and `member_id`, if\n * sent, must match it.\n */\n memberId?: string | null;\n /**\n * Required for `client_credentials` grant type with clientId that represents an external app.\n * An access token will be created based on the app installed version of an instance.\n */\n instanceId?: string | null;\n /** Required for `authorized_client` grant type for externalApp and must be bounded with client id, create access token to an app with a specific version. */\n appVersion?: string | null;\n /** Required for `strip_bound_session` grant type - create token without bound session. */\n accessToken?: string | null;\n /**\n * Optional for `authorized_client` grant type - create tokens for a specific user.\n * @format GUID\n */\n userAccountId?: string | null;\n /**\n * Optional for `authorized_client` grant type - bind the issued tokens to a specific session (session-bound wixAT/wixRT).\n * Internal-only: used by the server-to-server switchAccount flow via Oauth2NgInternal.\n * @internal\n * @format GUID\n */\n sessionId?: string | null;\n /**\n * Optional for `authorized_client` grant type (member tokens) - a member session token that is opened server-side to\n * extract the bound session id, producing session-bound wixAT/wixRT. Public: used by the member flow from public traffic.\n * When sent with `client_id` (a headless OAuth app's client ID), the tokens are issued to that client for the member\n * of the session, on the client's site rather than the caller's context.\n */\n sessionToken?: string | null;\n /**\n * Optional for `authorized_client` grant type - attach an impersonating user id to the minted token.\n * Internal-only: used by server-to-server flows where a service mints a token carrying impersonation context.\n * @internal\n * @format GUID\n */\n impersonatingUserId?: string | null;\n /**\n * Required for the `urn:ietf:params:oauth:grant-type:token-exchange` grant - the account-level access token being\n * exchanged for one scoped to the target named by the `tenant` oneof.\n */\n subjectToken?: string | null;\n /**\n * Required for the `urn:ietf:params:oauth:grant-type:token-exchange` grant - identifies the type of `subject_token`.\n * Only `urn:ietf:params:oauth:token-type:access_token` is supported.\n * @maxLength 100\n */\n subjectTokenType?: string | null;\n /**\n * RFC 7523 client authentication (private_key_jwt) - the type of `client_assertion`.\n * Only `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` is supported.\n * @maxLength 100\n */\n clientAssertionType?: string | null;\n /**\n * RFC 7523 client authentication (private_key_jwt) - a JWT signed by the client. Must not be combined with\n * `client_secret` or HTTP Basic authentication.\n * @maxLength 8192\n */\n clientAssertion?: string | null;\n}\n\n/** @oneof */\nexport interface TokenRequestTenantOneOf {\n /** supported tenant - specific site */\n siteId?: string | null;\n /** supported tenant - specific account */\n accountId?: string | null;\n}\n\nexport interface InternalTokenResponse\n extends InternalTokenResponseResultOneOf {\n success?: TokenResponse;\n failure?: TokenErrorResponse;\n}\n\n/** @oneof */\nexport interface InternalTokenResponseResultOneOf {\n success?: TokenResponse;\n failure?: TokenErrorResponse;\n}\n\nexport interface TokenResponse {\n /** The access token issued by the authorization server. */\n accessToken?: string;\n /** The type of the token issued as described in Section 7.1. of the oauth2 rfc. */\n tokenType?: string;\n /**\n * The lifetime in seconds of the access token. For example, the value \"3600\" denotes that the access token will\n * expire in one hour from the time the response was generated.\n */\n expiresIn?: number;\n /** The refresh token, which can be used to obtain new access tokens. */\n refreshToken?: string | null;\n /** OPTIONAL, if identical to the scope requested by the client; otherwise, will be sent. */\n scope?: string | null;\n idToken?: string | null;\n /**\n * Set only for the `urn:ietf:params:oauth:grant-type:token-exchange` grant, where it is always\n * `urn:ietf:params:oauth:token-type:access_token`. Empty for every other grant.\n * @maxLength 100\n */\n issuedTokenType?: string | null;\n}\n\nexport interface TokenErrorResponse {\n error?: string;\n errorDescription?: string | null;\n}\n\nexport interface TokenInfoRequest {\n /** The access token to introspect. */\n token?: string;\n}\n\nexport interface TokenInfoResponse {\n active?: boolean;\n /** subject type. */\n subjectType?: SubjectTypeWithLiterals;\n /** subject id */\n subjectId?: string;\n /** Expiration time of the token */\n exp?: string | null;\n /** Issued time of the token */\n iat?: string | null;\n /** Client id */\n clientId?: string;\n /** Account id */\n accountId?: string | null;\n /** Site id */\n siteId?: string | null;\n /** Instance Id */\n instanceId?: string | null;\n /**\n * Vendor Product Id\n * @maxLength 100\n */\n vendorProductId?: string | null;\n}\n\nexport enum SubjectType {\n /** unknown subject type */\n UNKNOWN = 'UNKNOWN',\n /** user subject type */\n USER = 'USER',\n /** visitor subject type */\n VISITOR = 'VISITOR',\n /** member subject type */\n MEMBER = 'MEMBER',\n /** app subject type */\n APP = 'APP',\n}\n\n/** @enumType */\nexport type SubjectTypeWithLiterals =\n | SubjectType\n | 'UNKNOWN'\n | 'USER'\n | 'VISITOR'\n | 'MEMBER'\n | 'APP';\n\n/**\n * AuthorizeRequest is sent by the client to the authorization server to initiate\n * the authorization process.\n */\nexport interface AuthorizeRequest {\n /**\n * ID of the Wix OAuth app requesting authorization, or the https URL of a personal agent's client metadata document.\n * Any other value is refused with `invalid_client`.\n */\n clientId?: string;\n /**\n * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).\n *\n * Supported values:\n * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.\n * @minLength 1\n */\n responseType?: string;\n /**\n * URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not.\n * @minLength 1\n */\n redirectUri?: string | null;\n /**\n * Desired scope of access. If this field is left empty, only an access token is granted.\n * To received a refresh token, pass `offline_access` as the value of this field.\n */\n scope?: string | null;\n /**\n * A value used to confirm the state of an application before and after it makes an authorization\n * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser\n * is redirected there.\n * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).\n * @minLength 1\n */\n state?: string;\n /**\n * esired response format.\n *\n * Supported values:\n * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.\n * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.\n * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).\n *\n * Default value: `query`\n */\n responseMode?: string | null;\n /**\n * Code challenge to use for PKCE verification.\n * This field is only used if `responseType` is set to `code`.\n */\n codeChallenge?: string | null;\n /**\n * Code challenge method to use for PKCE verification.\n * This field is only used if `responseType` is set to `code`.\n *\n * Supported values:\n * + `S256`: The code challenge is transformed using SHA-256 encyption.\n * + `S512`: The code challenge is transformed using SHA-512 encyption.\n */\n codeChallengeMethod?: string | null;\n /**\n * Token returned by a successful [login](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/login-v-2) or [register](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/register-v-2) call that identifies the authenticated member.\n *\n * In the default SDK flow, session context is passed through a hidden iframe automatically. When using a [full-page redirect](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/members/custom-login-page/custom-login/custom-login-using-the-js-sdk#use-a-full-page-redirect-desktop-and-mobile-browsers) instead, you must pass this field explicitly because there is no iframe to carry the session context.\n */\n sessionToken?: string | null;\n /**\n * Optional fields for errors\n * A short error code that describes the type of error that occurred (e.g. \"invalid_request\")\n * @internal\n */\n error?: string | null;\n /**\n * A human-readable description of the error that occurred\n * @internal\n */\n errorDescription?: string | null;\n /**\n * DEPRECATED: no longer read. The sign-in URL is resolved from the client's OAuthClientConfiguration\n * component (sign_in_url), falling back to the default Wix sign-in page.\n * @internal\n * @format SECURE_WEB_URL\n * @deprecated\n */\n signInUrl?: string | null;\n /**\n * Indicates whether the user has consented to the requested scopes\n * @internal\n */\n userConsented?: boolean | null;\n /**\n * Indicates whether login is optional. If true, will not redirect to the sign_in_url if user is not logged in.\n * @internal\n */\n optionalLogin?: boolean | null;\n /**\n * The site id the authorization is requested for.\n * @internal\n * @format GUID\n */\n metaSiteId?: string | null;\n /**\n * ID of the IAM IdP connection to authenticate with when no member session exists.\n * When set, the sign-in redirect initiates an OIDC login against this IdP connection\n * (IAM's `/sso/login` endpoint) instead of the default Wix login page.\n * @internal\n * @format GUID\n */\n idp?: string | null;\n /**\n * OIDC nonce, bound to the authorization request and echoed back in the id_token.\n * @maxLength 512\n */\n nonce?: string | null;\n /**\n * RFC 9470 / OIDC acr_values: space-separated required ACRs (OR, in preference order) for step-up.\n * @internal\n */\n acrValues?: string | null;\n /**\n * RFC 9470 / OIDC max_age: max seconds since last auth (0 forces re-auth).\n * @internal\n */\n maxAge?: string | null;\n /** OIDC prompt. Only \"none\" is honored: request silent authorization with no user interaction. */\n prompt?: string | null;\n /**\n * Standard OAuth error code the step-up surface returns on the browser redirect back to authorize\n * (e.g. access_denied, unmet_authentication_requirements). Browser-supplied like acr_values/prompt, so\n * untrusted: allowlisted and forwarded to the client as the OAuth error.\n * @internal\n */\n stepUpError?: string | null;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\n/** Request for the Jwks endpoint. Takes no parameters. */\nexport interface JwksRequest {}\n\n/** Request for the AuthorizationServerMetadata endpoint. Takes no parameters. */\nexport interface AuthorizationServerMetadataRequest {}\n\n/** Request for the ProtectedResourceMetadata endpoint. Takes no parameters. */\nexport interface ProtectedResourceMetadataRequest {}\n\nexport interface DeviceCodeRequest {\n /** The ID of the application that asks for authorization. */\n clientId?: string;\n /**\n * scope is a space-delimited string that specifies the requested scope of the\n * access request.\n */\n scope?: string | null;\n}\n\nexport interface DeviceCodeResponse {\n /** is the unique code for the device. When the user goes to the verification_uri in their browser-based device, this code will be bound to their session. */\n deviceCode?: string;\n /** contains the code that should be input at the verification_uri to authorize the device. */\n userCode?: string;\n /** contains the URL the user should visit to authorize the device. */\n verificationUri?: string;\n /** indicates the lifetime (in seconds) of the device_code and user_code. */\n expiresIn?: number;\n /** indicates the interval (in seconds) at which the app should poll the token URL to request a token. clients MUST use 5 as the default */\n interval?: number | null;\n}\n\nexport interface DeviceAuthorizeRequest {\n /** The ID of the application that asks for authorization. */\n clientId?: string;\n /** scope is a space-delimited string that specifies the requested scope of the access request. */\n scope?: string | null;\n /**\n * OIDC nonce, bound to the device authorization and echoed back in the id_token at /token.\n * @maxLength 512\n */\n nonce?: string | null;\n}\n\nexport interface DeviceAuthorizeResponse {\n /** the unique code for the device, used to poll the token endpoint. */\n deviceCode?: string;\n /** the code the user enters at the verification_uri to authorize the device. */\n userCode?: string;\n /** the URL the user should visit to authorize the device. */\n verificationUri?: string;\n /** the verification_uri with the user_code embedded as a query param, ready to encode into a QR code. */\n verificationUriComplete?: string;\n /** lifetime (in seconds) of the device_code and user_code. */\n expiresIn?: number;\n /** interval (in seconds) at which the client should poll the token endpoint. clients MUST use 5 as the default. */\n interval?: number | null;\n}\n\nexport interface DeviceVerifyRequest {\n /** User code representing a currently authorizing device. */\n userCode?: string;\n}\n\nexport interface DeviceVerifyResponse {}\n\nexport interface DeviceVerifyV2Request {\n /**\n * User code representing a currently authorizing device.\n * @minLength 8\n * @maxLength 8\n */\n userCode?: string;\n}\n\nexport interface DeviceVerifyV2Response {}\n\nexport interface DeviceAuthorizationInfoRequest {\n /**\n * User code representing a currently authorizing device.\n * @minLength 8\n * @maxLength 8\n */\n userCode?: string;\n}\n\nexport interface DeviceAuthorizationInfoResponse {\n /** The ID of the application the device is authorizing into. */\n clientId?: string;\n /** Canonical browser name of the initiating browser (e.g. \"chrome\"). */\n browser?: string | null;\n /** Canonical OS of the initiating browser (e.g. \"windows\"). */\n os?: string | null;\n /** Canonical device class of the initiating browser (e.g. \"desktop\"). */\n deviceClass?: string | null;\n /** IP address of the initiating browser. */\n browserIp?: string | null;\n /** Coarse geo-location (country, optional region) derived from the browser IP, e.g. \"IL\" or \"US-NY\". */\n geo?: string | null;\n}\n\nexport interface InvalidateUserCodeRequest {\n /** user code to invalidate. Only the authorizing identity is able to invalidate it. */\n userCode?: string;\n}\n\nexport interface InvalidateUserCodeResponse {}\n\nexport interface RevokeRefreshTokenRequest {\n /** The refresh token itself. Anyone with the token itself is able to revoke it. */\n token?: string;\n /** The client id that issued the refresh token. */\n clientId?: string | null;\n}\n\nexport interface RevokeRefreshTokenResponse {}\n\nexport interface Empty {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /**\n * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity\n * @internal\n */\n triggeredByUndelete?: boolean | null;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n /**\n * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard\n * wont populate it / have any reference to it in the API.\n * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,\n * the developer should send only the new (current) entity.\n * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big\n * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.\n * @internal\n * @deprecated\n */\n previousEntityAsJson?: string | null;\n /**\n * Map of fully qualified field paths to their previous values for fields that changed.\n * For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)\n * @internal\n */\n modifiedFields?: Record<string, any>;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface EntityDeletedEvent {\n /**\n * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled\n * @internal\n */\n movedToTrash?: boolean | null;\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n /**\n * Optional domain-specific metadata defined by the API owner, encoded as JSON.\n * @internal\n */\n additionalMetadataAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface UserDeletedEvent {\n /**\n * User ID from the deletion event.\n * @format GUID\n */\n userId?: string;\n}\n\nexport interface UserBlockedEvent {\n /**\n * User ID from the deletion event.\n * @format GUID\n */\n userId?: string;\n}\n\nexport interface UserInfoRequest {}\n\n/** UserInfo endpoint response for OpenID Connect */\nexport interface UserInfoResponse {\n /**\n * Subject identifier — unique identifier for the user (OIDC standard claim).\n * @format GUID\n */\n sub?: string;\n /**\n * The user's given name.\n * @maxLength 20\n */\n givenName?: string | null;\n /**\n * The user's family name.\n * @maxLength 20\n */\n familyName?: string | null;\n /**\n * The user's email address.\n * @format EMAIL\n */\n email?: string | null;\n /** Indicates whether the user's email address has been verified. */\n emailVerified?: boolean | null;\n /**\n * The URL of the user's profile picture.\n * @format WEB_URL\n */\n picture?: string | null;\n /**\n * The user's preferred language, if available.\n * @format LANGUAGE\n */\n language?: string | null;\n /** The user's full name. */\n name?: string | null;\n}\n","import * as ambassadorWixIdentityOauthV1RefreshToken from './identity-oauth-v1-refresh-token-oauth.http.js';\nimport * as ambassadorWixIdentityOauthV1RefreshTokenTypes from './identity-oauth-v1-refresh-token-oauth.types.js';\nimport * as ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes from './identity-oauth-v1-refresh-token-oauth.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function token(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.token(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/oauth/token',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function jwks(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.JwksRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.JwksRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.jwks(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/oauth/jwks',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function authorizationServerMetadata(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.AuthorizationServerMetadataRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.AuthorizationServerMetadataRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.authorizationServerMetadata(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/oauth/authorization-server-metadata',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function protectedResourceMetadata(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.ProtectedResourceMetadataRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.ProtectedResourceMetadataRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.protectedResourceMetadata(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/oauth/protected-resource-metadata',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function tokenInfo(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.TokenInfoResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.TokenInfoResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.tokenInfo(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/oauth/token-info',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function userInfo(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.UserInfoRequest,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.UserInfoRequest,\n ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.UserInfoResponse,\n ambassadorWixIdentityOauthV1RefreshTokenTypes.UserInfoResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixIdentityOauthV1RefreshToken.userInfo(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/oauth/user-info',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n RefreshToken as RefreshTokenOriginal,\n TokenRequest as TokenRequestOriginal,\n TokenRequestTenantOneOf as TokenRequestTenantOneOfOriginal,\n InternalTokenResponse as InternalTokenResponseOriginal,\n InternalTokenResponseResultOneOf as InternalTokenResponseResultOneOfOriginal,\n TokenResponse as TokenResponseOriginal,\n TokenErrorResponse as TokenErrorResponseOriginal,\n TokenInfoRequest as TokenInfoRequestOriginal,\n TokenInfoResponse as TokenInfoResponseOriginal,\n SubjectType as SubjectTypeOriginal,\n SubjectTypeWithLiterals as SubjectTypeWithLiteralsOriginal,\n AuthorizeRequest as AuthorizeRequestOriginal,\n RawHttpResponse as RawHttpResponseOriginal,\n HeadersEntry as HeadersEntryOriginal,\n RawHttpRequest as RawHttpRequestOriginal,\n PathParametersEntry as PathParametersEntryOriginal,\n QueryParametersEntry as QueryParametersEntryOriginal,\n JwksRequest as JwksRequestOriginal,\n AuthorizationServerMetadataRequest as AuthorizationServerMetadataRequestOriginal,\n ProtectedResourceMetadataRequest as ProtectedResourceMetadataRequestOriginal,\n DeviceCodeRequest as DeviceCodeRequestOriginal,\n DeviceCodeResponse as DeviceCodeResponseOriginal,\n DeviceAuthorizeRequest as DeviceAuthorizeRequestOriginal,\n DeviceAuthorizeResponse as DeviceAuthorizeResponseOriginal,\n DeviceVerifyRequest as DeviceVerifyRequestOriginal,\n DeviceVerifyResponse as DeviceVerifyResponseOriginal,\n DeviceVerifyV2Request as DeviceVerifyV2RequestOriginal,\n DeviceVerifyV2Response as DeviceVerifyV2ResponseOriginal,\n DeviceAuthorizationInfoRequest as DeviceAuthorizationInfoRequestOriginal,\n DeviceAuthorizationInfoResponse as DeviceAuthorizationInfoResponseOriginal,\n InvalidateUserCodeRequest as InvalidateUserCodeRequestOriginal,\n InvalidateUserCodeResponse as InvalidateUserCodeResponseOriginal,\n RevokeRefreshTokenRequest as RevokeRefreshTokenRequestOriginal,\n RevokeRefreshTokenResponse as RevokeRefreshTokenResponseOriginal,\n Empty as EmptyOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n UserDeletedEvent as UserDeletedEventOriginal,\n UserBlockedEvent as UserBlockedEventOriginal,\n UserInfoRequest as UserInfoRequestOriginal,\n UserInfoResponse as UserInfoResponseOriginal,\n} from './identity-oauth-v1-refresh-token-oauth.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,qCAAAA;AAAA,EAAA,YAAAC;AAAA,EAAA,iCAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,gBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,IAAM,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC;AAE3C,SAAS,sCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,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;AAE3D,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["authorizationServerMetadata","jwks","protectedResourceMetadata","token","tokenInfo","userInfo","import_bytes","import_rest_modules","payload","SubjectType","token","jwks","authorizationServerMetadata","protectedResourceMetadata","tokenInfo","userInfo"]}
@@ -72,6 +72,14 @@ function resolveWixIdentityOauth2V1Oauth2NgUrl(opts) {
72
72
  {
73
73
  srcPath: "/_api/oauth2",
74
74
  destPath: "/v1/oauth"
75
+ },
76
+ {
77
+ srcPath: "/.well-known/oauth-protected-resource",
78
+ destPath: "/v1/oauth/protected-resource-metadata"
79
+ },
80
+ {
81
+ srcPath: "/.well-known/oauth-authorization-server/_api/oauth2",
82
+ destPath: "/v1/oauth/authorization-server-metadata"
75
83
  }
76
84
  ],
77
85
  "platform.rise.ai": [