@wix/auto_sdk_identity_oauth 1.0.49 → 1.0.50

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.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +23 -3
  2. package/build/cjs/index.js +120 -7
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +26 -3
  5. package/build/cjs/index.typings.js +103 -4
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +11 -4
  8. package/build/cjs/meta.js +93 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +20 -1
  11. package/build/cjs/schemas.js +33 -2
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +23 -3
  14. package/build/es/index.mjs +112 -1
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +26 -3
  17. package/build/es/index.typings.mjs +98 -1
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +11 -4
  20. package/build/es/meta.mjs +88 -1
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +20 -1
  23. package/build/es/schemas.mjs +28 -1
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +23 -3
  26. package/build/internal/cjs/index.js +120 -7
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +26 -3
  29. package/build/internal/cjs/index.typings.js +103 -4
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +11 -4
  32. package/build/internal/cjs/meta.js +93 -4
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +20 -1
  35. package/build/internal/cjs/schemas.js +33 -2
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +23 -3
  38. package/build/internal/es/index.mjs +112 -1
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +26 -3
  41. package/build/internal/es/index.typings.mjs +98 -1
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +11 -4
  44. package/build/internal/es/meta.mjs +88 -1
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +20 -1
  47. package/build/internal/es/schemas.mjs +28 -1
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
package/build/es/meta.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/identity-oauth-v1-refresh-token-oauth.http.ts
2
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
2
3
  import { transformSDKBytesToRESTBytes } from "@wix/sdk-runtime/transformations/bytes";
3
4
  import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/bytes";
4
5
  import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
@@ -155,6 +156,33 @@ function token(payload) {
155
156
  }
156
157
  return __token;
157
158
  }
159
+ function jwks(payload) {
160
+ function __jwks({ host }) {
161
+ const metadata = {
162
+ entityFqdn: "wix.identity.oauth.v1.refresh_token",
163
+ method: "GET",
164
+ methodFqn: "wix.identity.oauth2.v1.Oauth2Ng.Jwks",
165
+ packageName: PACKAGE_NAME,
166
+ migrationOptions: {
167
+ optInTransformResponse: true
168
+ },
169
+ url: resolveWixIdentityOauth2V1Oauth2NgUrl({
170
+ protoPath: "/v1/oauth/jwks",
171
+ data: payload,
172
+ host
173
+ }),
174
+ params: toURLSearchParams(payload),
175
+ transformResponse: (payload2) => transformPaths(payload2, [
176
+ {
177
+ transformFn: transformRESTBytesToSDKBytes,
178
+ paths: [{ path: "body" }]
179
+ }
180
+ ])
181
+ };
182
+ return metadata;
183
+ }
184
+ return __jwks;
185
+ }
158
186
  function tokenInfo(payload) {
159
187
  function __tokenInfo({ host }) {
160
188
  const serializedData = transformPaths(payload, [
@@ -179,6 +207,27 @@ function tokenInfo(payload) {
179
207
  }
180
208
  return __tokenInfo;
181
209
  }
210
+ function userInfo(payload) {
211
+ function __userInfo({ host }) {
212
+ const metadata = {
213
+ entityFqdn: "wix.identity.oauth.v1.refresh_token",
214
+ method: "GET",
215
+ methodFqn: "wix.identity.oauth2.v1.Oauth2Ng.UserInfo",
216
+ packageName: PACKAGE_NAME,
217
+ migrationOptions: {
218
+ optInTransformResponse: true
219
+ },
220
+ url: resolveWixIdentityOauth2V1Oauth2NgUrl({
221
+ protoPath: "/v1/oauth/user-info",
222
+ data: payload,
223
+ host
224
+ }),
225
+ params: toURLSearchParams(payload)
226
+ };
227
+ return metadata;
228
+ }
229
+ return __userInfo;
230
+ }
182
231
 
183
232
  // src/identity-oauth-v1-refresh-token-oauth.types.ts
184
233
  var SubjectType = /* @__PURE__ */ ((SubjectType2) => {
@@ -209,6 +258,24 @@ function token2() {
209
258
  __originalResponseType: null
210
259
  };
211
260
  }
261
+ function jwks2() {
262
+ const payload = {};
263
+ const getRequestOptions = jwks(payload);
264
+ const getUrl = (context) => {
265
+ const { url } = getRequestOptions(context);
266
+ return url;
267
+ };
268
+ return {
269
+ getUrl,
270
+ httpMethod: "GET",
271
+ path: "/v1/oauth/jwks",
272
+ pathParams: {},
273
+ __requestType: null,
274
+ __originalRequestType: null,
275
+ __responseType: null,
276
+ __originalResponseType: null
277
+ };
278
+ }
212
279
  function tokenInfo2() {
213
280
  const payload = {};
214
281
  const getRequestOptions = tokenInfo(payload);
@@ -227,9 +294,29 @@ function tokenInfo2() {
227
294
  __originalResponseType: null
228
295
  };
229
296
  }
297
+ function userInfo2() {
298
+ const payload = {};
299
+ const getRequestOptions = userInfo(payload);
300
+ const getUrl = (context) => {
301
+ const { url } = getRequestOptions(context);
302
+ return url;
303
+ };
304
+ return {
305
+ getUrl,
306
+ httpMethod: "GET",
307
+ path: "/v1/oauth/user-info",
308
+ pathParams: {},
309
+ __requestType: null,
310
+ __originalRequestType: null,
311
+ __responseType: null,
312
+ __originalResponseType: null
313
+ };
314
+ }
230
315
  export {
231
316
  SubjectType as SubjectTypeOriginal,
317
+ jwks2 as jwks,
232
318
  token2 as token,
233
- tokenInfo2 as tokenInfo
319
+ tokenInfo2 as tokenInfo,
320
+ userInfo2 as userInfo
234
321
  };
235
322
  //# sourceMappingURL=meta.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../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":["import { 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\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 { transformFn: transformSDKBytesToRESTBytes, paths: [{ path: 'body' }] },\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: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __token;\n}\n\n/** Token Introspection Endpoint. */\nexport function tokenInfo(payload: object): RequestOptionsFactory<any> {\n function __tokenInfo({ host }: any) {\n const serializedData = transformPaths(payload, [\n { transformFn: transformSDKBytesToRESTBytes, paths: [{ path: 'body' }] },\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","export interface RefreshToken {\n token?: string;\n}\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 * 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 * @format SECURE_WEB_URL\n * @deprecated\n */\n signInUrl?: string | null;\n /** Indicates whether the user has consented to the requested scopes */\n userConsented?: boolean | null;\n /** Indicates whether login is optional. If true, will not redirect to the sign_in_url if user is not logged in. */\n optionalLogin?: boolean | null;\n /**\n * The site id the authorization is requested for.\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 * @format GUID\n */\n idp?: 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\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 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\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 /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: 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 * The unique identifier for the user.\n * @format GUID\n */\n id?: 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}\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 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 {\n RefreshToken as RefreshTokenOriginal,\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 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 TokenInfoResponse as TokenInfoResponseOriginal,\n SubjectType as SubjectTypeOriginal,\n SubjectTypeWithLiterals as SubjectTypeWithLiteralsOriginal,\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,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,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,SAA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L,SAASC,SAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,MAAM,OAAO;AAExD,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;AAEO,SAASC,aAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACqC,UAAU,OAAO;AAE5D,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":["payload","SubjectType","token","tokenInfo"]}
1
+ {"version":3,"sources":["../../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":["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\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 { transformFn: transformSDKBytesToRESTBytes, paths: [{ path: 'body' }] },\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: [{ path: 'body' }],\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: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __jwks;\n}\n\n/** Token Introspection Endpoint. */\nexport function tokenInfo(payload: object): RequestOptionsFactory<any> {\n function __tokenInfo({ host }: any) {\n const serializedData = transformPaths(payload, [\n { transformFn: transformSDKBytesToRESTBytes, paths: [{ path: 'body' }] },\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 * 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 * 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 * @format SECURE_WEB_URL\n * @deprecated\n */\n signInUrl?: string | null;\n /** Indicates whether the user has consented to the requested scopes */\n userConsented?: boolean | null;\n /** Indicates whether login is optional. If true, will not redirect to the sign_in_url if user is not logged in. */\n optionalLogin?: boolean | null;\n /**\n * The site id the authorization is requested for.\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 * @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\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\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 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\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 /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: 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}\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 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 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 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 TokenInfoResponse as TokenInfoResponseOriginal,\n SubjectType as SubjectTypeOriginal,\n SubjectTypeWithLiterals as SubjectTypeWithLiteralsOriginal,\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,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,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;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-28,6 +28,15 @@ declare const TokenResponse: z.ZodObject<{
28
28
  value: z.ZodOptional<z.ZodString>;
29
29
  }, z.core.$strip>>>;
30
30
  }, z.core.$strip>;
31
+ declare const JwksRequest: z.ZodObject<{}, z.core.$strip>;
32
+ declare const JwksResponse: z.ZodObject<{
33
+ body: z.ZodOptional<z.ZodString>;
34
+ statusCode: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
35
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
36
+ key: z.ZodOptional<z.ZodString>;
37
+ value: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>>>;
39
+ }, z.core.$strip>;
31
40
  declare const TokenInfoRequest: z.ZodObject<{
32
41
  options: z.ZodOptional<z.ZodObject<{
33
42
  body: z.ZodOptional<z.ZodString>;
@@ -66,5 +75,15 @@ declare const TokenInfoResponse: z.ZodObject<{
66
75
  instanceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
67
76
  vendorProductId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
68
77
  }, z.core.$strip>;
78
+ declare const UserInfoRequest: z.ZodObject<{}, z.core.$strip>;
79
+ declare const UserInfoResponse: z.ZodObject<{
80
+ sub: z.ZodOptional<z.ZodString>;
81
+ givenName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
82
+ familyName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
83
+ email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
84
+ emailVerified: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
85
+ picture: z.ZodNullable<z.ZodOptional<z.ZodString>>;
86
+ language: z.ZodNullable<z.ZodOptional<z.ZodString>>;
87
+ }, z.core.$strip>;
69
88
 
70
- export { TokenInfoRequest, TokenInfoResponse, TokenRequest, TokenResponse };
89
+ export { JwksRequest, JwksResponse, TokenInfoRequest, TokenInfoResponse, TokenRequest, TokenResponse, UserInfoRequest, UserInfoResponse };
@@ -24,6 +24,14 @@ var TokenResponse = z.object({
24
24
  z.object({ key: z.string().optional(), value: z.string().optional() })
25
25
  ).optional()
26
26
  });
27
+ var JwksRequest = z.object({});
28
+ var JwksResponse = z.object({
29
+ body: z.string().optional(),
30
+ statusCode: z.number().int().optional().nullable(),
31
+ headers: z.array(
32
+ z.object({ key: z.string().optional(), value: z.string().optional() })
33
+ ).optional()
34
+ });
27
35
  var TokenInfoRequest = z.object({
28
36
  options: z.object({
29
37
  body: z.string().optional(),
@@ -53,10 +61,29 @@ var TokenInfoResponse = z.object({
53
61
  instanceId: z.string().describe("Instance Id").optional().nullable(),
54
62
  vendorProductId: z.string().describe("Vendor Product Id").max(100).optional().nullable()
55
63
  });
64
+ var UserInfoRequest = z.object({});
65
+ var UserInfoResponse = z.object({
66
+ sub: z.string().describe(
67
+ "Subject identifier \u2014 unique identifier for the user (OIDC standard claim)."
68
+ ).regex(
69
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
70
+ "Must be a valid GUID"
71
+ ).optional(),
72
+ givenName: z.string().describe("The user's given name.").max(20).optional().nullable(),
73
+ familyName: z.string().describe("The user's family name.").max(20).optional().nullable(),
74
+ email: z.string().describe("The user's email address.").email().optional().nullable(),
75
+ emailVerified: z.boolean().describe("Indicates whether the user's email address has been verified.").optional().nullable(),
76
+ picture: z.string().describe("The URL of the user's profile picture.").url().optional().nullable(),
77
+ language: z.string().describe("The user's preferred language, if available.").optional().nullable()
78
+ });
56
79
  export {
80
+ JwksRequest,
81
+ JwksResponse,
57
82
  TokenInfoRequest,
58
83
  TokenInfoResponse,
59
84
  TokenRequest,
60
- TokenResponse
85
+ TokenResponse,
86
+ UserInfoRequest,
87
+ UserInfoResponse
61
88
  };
62
89
  //# sourceMappingURL=schemas.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/identity-oauth-v1-refresh-token-oauth.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const TokenRequest = z.object({\n options: z\n .object({\n body: z.string().optional(),\n pathParams: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n queryParams: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n headers: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n method: z.string().optional(),\n rawPath: z.string().optional(),\n rawQuery: z.string().optional(),\n })\n .optional(),\n});\nexport const TokenResponse = z.object({\n body: z.string().optional(),\n statusCode: z.number().int().optional().nullable(),\n headers: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n});\nexport const TokenInfoRequest = z.object({\n options: z\n .object({\n body: z.string().optional(),\n pathParams: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n queryParams: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n headers: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n method: z.string().optional(),\n rawPath: z.string().optional(),\n rawQuery: z.string().optional(),\n })\n .optional(),\n});\nexport const TokenInfoResponse = z.object({\n active: z.boolean().optional(),\n subjectType: z\n .enum(['UNKNOWN', 'USER', 'VISITOR', 'MEMBER', 'APP'])\n .describe('subject type.')\n .optional(),\n subjectId: z.string().describe('subject id').optional(),\n exp: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe('Expiration time of the token')\n .optional()\n .nullable(),\n iat: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe('Issued time of the token')\n .optional()\n .nullable(),\n clientId: z.string().describe('Client id').optional(),\n accountId: z.string().describe('Account id').optional().nullable(),\n siteId: z.string().describe('Site id').optional().nullable(),\n instanceId: z.string().describe('Instance Id').optional().nullable(),\n vendorProductId: z\n .string()\n .describe('Vendor Product Id')\n .max(100)\n .optional()\n .nullable(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,eAAiB,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MACG,SAAO,EAAE,KAAO,SAAO,EAAE,SAAS,GAAG,OAAS,SAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IACvE,EACC,SAAS;AAAA,IACZ,QAAU,SAAO,EAAE,SAAS;AAAA,IAC5B,SAAW,SAAO,EAAE,SAAS;AAAA,IAC7B,UAAY,SAAO,EAAE,SAAS;AAAA,EAChC,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,oBAAsB,SAAO;AAAA,EACxC,QAAU,UAAQ,EAAE,SAAS;AAAA,EAC7B,aACG,OAAK,CAAC,WAAW,QAAQ,WAAW,UAAU,KAAK,CAAC,EACpD,SAAS,eAAe,EACxB,SAAS;AAAA,EACZ,WAAa,SAAO,EAAE,SAAS,YAAY,EAAE,SAAS;AAAA,EACtD,KACG,SAAO,EACP,MAAM,WAAW,8BAA8B,EAC/C,SAAS,8BAA8B,EACvC,SAAS,EACT,SAAS;AAAA,EACZ,KACG,SAAO,EACP,MAAM,WAAW,8BAA8B,EAC/C,SAAS,0BAA0B,EACnC,SAAS,EACT,SAAS;AAAA,EACZ,UAAY,SAAO,EAAE,SAAS,WAAW,EAAE,SAAS;AAAA,EACpD,WAAa,SAAO,EAAE,SAAS,YAAY,EAAE,SAAS,EAAE,SAAS;AAAA,EACjE,QAAU,SAAO,EAAE,SAAS,SAAS,EAAE,SAAS,EAAE,SAAS;AAAA,EAC3D,YAAc,SAAO,EAAE,SAAS,aAAa,EAAE,SAAS,EAAE,SAAS;AAAA,EACnE,iBACG,SAAO,EACP,SAAS,mBAAmB,EAC5B,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AACd,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/identity-oauth-v1-refresh-token-oauth.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const TokenRequest = z.object({\n options: z\n .object({\n body: z.string().optional(),\n pathParams: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n queryParams: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n headers: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n method: z.string().optional(),\n rawPath: z.string().optional(),\n rawQuery: z.string().optional(),\n })\n .optional(),\n});\nexport const TokenResponse = z.object({\n body: z.string().optional(),\n statusCode: z.number().int().optional().nullable(),\n headers: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n});\nexport const JwksRequest = z.object({});\nexport const JwksResponse = z.object({\n body: z.string().optional(),\n statusCode: z.number().int().optional().nullable(),\n headers: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n});\nexport const TokenInfoRequest = z.object({\n options: z\n .object({\n body: z.string().optional(),\n pathParams: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n queryParams: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n headers: z\n .array(\n z.object({ key: z.string().optional(), value: z.string().optional() })\n )\n .optional(),\n method: z.string().optional(),\n rawPath: z.string().optional(),\n rawQuery: z.string().optional(),\n })\n .optional(),\n});\nexport const TokenInfoResponse = z.object({\n active: z.boolean().optional(),\n subjectType: z\n .enum(['UNKNOWN', 'USER', 'VISITOR', 'MEMBER', 'APP'])\n .describe('subject type.')\n .optional(),\n subjectId: z.string().describe('subject id').optional(),\n exp: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe('Expiration time of the token')\n .optional()\n .nullable(),\n iat: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe('Issued time of the token')\n .optional()\n .nullable(),\n clientId: z.string().describe('Client id').optional(),\n accountId: z.string().describe('Account id').optional().nullable(),\n siteId: z.string().describe('Site id').optional().nullable(),\n instanceId: z.string().describe('Instance Id').optional().nullable(),\n vendorProductId: z\n .string()\n .describe('Vendor Product Id')\n .max(100)\n .optional()\n .nullable(),\n});\nexport const UserInfoRequest = z.object({});\nexport const UserInfoResponse = z.object({\n sub: z\n .string()\n .describe(\n 'Subject identifier — unique identifier for the user (OIDC standard claim).'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n givenName: z\n .string()\n .describe(\"The user's given name.\")\n .max(20)\n .optional()\n .nullable(),\n familyName: z\n .string()\n .describe(\"The user's family name.\")\n .max(20)\n .optional()\n .nullable(),\n email: z\n .string()\n .describe(\"The user's email address.\")\n .email()\n .optional()\n .nullable(),\n emailVerified: z\n .boolean()\n .describe(\"Indicates whether the user's email address has been verified.\")\n .optional()\n .nullable(),\n picture: z\n .string()\n .describe(\"The URL of the user's profile picture.\")\n .url()\n .optional()\n .nullable(),\n language: z\n .string()\n .describe(\"The user's preferred language, if available.\")\n .optional()\n .nullable(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,eAAiB,SAAO;AAAA,EACnC,SACG,SAAO;AAAA,IACN,MAAQ,SAAO,EAAE,SAAS;AAAA,IAC1B,YACG;AAAA,MACG,SAAO,EAAE,KAAO,SAAO,EAAE,SAAS,GAAG,OAAS,SAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IACvE,EACC,SAAS;AAAA,IACZ,aACG;AAAA,MACG,SAAO,EAAE,KAAO,SAAO,EAAE,SAAS,GAAG,OAAS,SAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IACvE,EACC,SAAS;AAAA,IACZ,SACG;AAAA,MACG,SAAO,EAAE,KAAO,SAAO,EAAE,SAAS,GAAG,OAAS,SAAO,EAAE,SAAS,EAAE,CAAC;AAAA,IACvE,EACC,SAAS;AAAA,IACZ,QAAU,SAAO,EAAE,SAAS;AAAA,IAC5B,SAAW,SAAO,EAAE,SAAS;AAAA,IAC7B,UAAY,SAAO,EAAE,SAAS;AAAA,EAChC,CAAC,EACA,SAAS;AACd,CAAC;A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S,EACT,SAAS;AAAA,EACZ,UACG,SAAO,EACP,SAAS,8CAA8C,EACvD,SAAS,EACT,SAAS;AACd,CAAC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { TokenOptions, RawHttpResponse, TokenInfoOptions, TokenInfoResponse } from './index.typings.js';
3
- export { ActionEvent, AuthorizeRequest, DeviceAuthorizationInfoRequest, DeviceAuthorizationInfoResponse, DeviceAuthorizeRequest, DeviceAuthorizeResponse, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse, DeviceVerifyV2Request, DeviceVerifyV2Response, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, HeadersEntry, InvalidateUserCodeRequest, InvalidateUserCodeResponse, JwksRequest, PathParametersEntry, QueryParametersEntry, RawHttpRequest, RefreshToken, RestoreInfo, RevokeRefreshTokenRequest, RevokeRefreshTokenResponse, SubjectType, SubjectTypeWithLiterals, UserBlockedEvent, UserDeletedEvent, UserInfoRequest, UserInfoResponse } from './index.typings.js';
2
+ import { TokenOptions, RawHttpResponse, TokenInfoOptions, TokenInfoResponse, UserInfoResponse } from './index.typings.js';
3
+ export { ActionEvent, AuthorizeRequest, DeviceAuthorizationInfoRequest, DeviceAuthorizationInfoResponse, DeviceAuthorizeRequest, DeviceAuthorizeResponse, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse, DeviceVerifyV2Request, DeviceVerifyV2Response, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, HeadersEntry, InvalidateUserCodeRequest, InvalidateUserCodeResponse, JwksRequest, PathParametersEntry, QueryParametersEntry, RawHttpRequest, RefreshToken, RestoreInfo, RevokeRefreshTokenRequest, RevokeRefreshTokenResponse, SubjectType, SubjectTypeWithLiterals, UserBlockedEvent, UserDeletedEvent, UserInfoRequest } from './index.typings.js';
4
4
 
5
5
  declare function token$1(httpClient: HttpClient): TokenSignature;
6
6
  interface TokenSignature {
@@ -23,6 +23,15 @@ interface TokenSignature {
23
23
  */
24
24
  (options?: TokenOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
25
25
  }
26
+ declare function jwks$1(httpClient: HttpClient): JwksSignature;
27
+ interface JwksSignature {
28
+ /**
29
+ * Returns the JWKS (JSON Web Key Set) with the RSA public key used to verify asymmetrically-signed
30
+ * tokens (e.g. OIDC id_token). Required by external OIDC relying parties.
31
+ * Serves a non-secret public key.
32
+ */
33
+ (): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
34
+ }
26
35
  declare function tokenInfo$1(httpClient: HttpClient): TokenInfoSignature;
27
36
  interface TokenInfoSignature {
28
37
  /**
@@ -30,8 +39,19 @@ interface TokenInfoSignature {
30
39
  */
31
40
  (options?: TokenInfoOptions): Promise<NonNullablePaths<TokenInfoResponse, `active` | `subjectType` | `subjectId` | `clientId`, 2>>;
32
41
  }
42
+ declare function userInfo$1(httpClient: HttpClient): UserInfoSignature;
43
+ interface UserInfoSignature {
44
+ /**
45
+ * OpenID Connect UserInfo endpoint
46
+ * Should be called with user access token obtained in OIDC flow as Authorization header
47
+ * @returns UserInfo endpoint response for OpenID Connect
48
+ */
49
+ (): Promise<NonNullablePaths<UserInfoResponse, `sub`, 2>>;
50
+ }
33
51
 
34
52
  declare const token: MaybeContext<BuildRESTFunction<typeof token$1> & typeof token$1>;
53
+ declare const jwks: MaybeContext<BuildRESTFunction<typeof jwks$1> & typeof jwks$1>;
35
54
  declare const tokenInfo: MaybeContext<BuildRESTFunction<typeof tokenInfo$1> & typeof tokenInfo$1>;
55
+ declare const userInfo: MaybeContext<BuildRESTFunction<typeof userInfo$1> & typeof userInfo$1>;
36
56
 
37
- export { RawHttpResponse, TokenInfoOptions, TokenInfoResponse, TokenOptions, token, tokenInfo };
57
+ export { RawHttpResponse, TokenInfoOptions, TokenInfoResponse, TokenOptions, UserInfoResponse, jwks, token, tokenInfo, userInfo };
@@ -21,8 +21,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  SubjectType: () => SubjectType,
24
+ jwks: () => jwks4,
24
25
  token: () => token4,
25
- tokenInfo: () => tokenInfo4
26
+ tokenInfo: () => tokenInfo4,
27
+ userInfo: () => userInfo4
26
28
  });
27
29
  module.exports = __toCommonJS(index_exports);
28
30
 
@@ -31,10 +33,11 @@ var import_transform_error = require("@wix/sdk-runtime/transform-error");
31
33
  var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
32
34
 
33
35
  // src/identity-oauth-v1-refresh-token-oauth.http.ts
36
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
34
37
  var import_bytes = require("@wix/sdk-runtime/transformations/bytes");
35
38
  var import_bytes2 = require("@wix/sdk-runtime/transformations/bytes");
36
39
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
37
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
40
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
38
41
  function resolveWixIdentityOauth2V1Oauth2NgUrl(opts) {
39
42
  const domainToMappings = {
40
43
  "manage._base_domain_": [
@@ -154,7 +157,7 @@ function resolveWixIdentityOauth2V1Oauth2NgUrl(opts) {
154
157
  }
155
158
  ]
156
159
  };
157
- return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
160
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
158
161
  }
159
162
  var PACKAGE_NAME = "@wix/auto_sdk_identity_oauth";
160
163
  function token(payload) {
@@ -187,6 +190,33 @@ function token(payload) {
187
190
  }
188
191
  return __token;
189
192
  }
193
+ function jwks(payload) {
194
+ function __jwks({ host }) {
195
+ const metadata = {
196
+ entityFqdn: "wix.identity.oauth.v1.refresh_token",
197
+ method: "GET",
198
+ methodFqn: "wix.identity.oauth2.v1.Oauth2Ng.Jwks",
199
+ packageName: PACKAGE_NAME,
200
+ migrationOptions: {
201
+ optInTransformResponse: true
202
+ },
203
+ url: resolveWixIdentityOauth2V1Oauth2NgUrl({
204
+ protoPath: "/v1/oauth/jwks",
205
+ data: payload,
206
+ host
207
+ }),
208
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
209
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
210
+ {
211
+ transformFn: import_bytes2.transformRESTBytesToSDKBytes,
212
+ paths: [{ path: "body" }]
213
+ }
214
+ ])
215
+ };
216
+ return metadata;
217
+ }
218
+ return __jwks;
219
+ }
190
220
  function tokenInfo(payload) {
191
221
  function __tokenInfo({ host }) {
192
222
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -211,6 +241,27 @@ function tokenInfo(payload) {
211
241
  }
212
242
  return __tokenInfo;
213
243
  }
244
+ function userInfo(payload) {
245
+ function __userInfo({ host }) {
246
+ const metadata = {
247
+ entityFqdn: "wix.identity.oauth.v1.refresh_token",
248
+ method: "GET",
249
+ methodFqn: "wix.identity.oauth2.v1.Oauth2Ng.UserInfo",
250
+ packageName: PACKAGE_NAME,
251
+ migrationOptions: {
252
+ optInTransformResponse: true
253
+ },
254
+ url: resolveWixIdentityOauth2V1Oauth2NgUrl({
255
+ protoPath: "/v1/oauth/user-info",
256
+ data: payload,
257
+ host
258
+ }),
259
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
260
+ };
261
+ return metadata;
262
+ }
263
+ return __userInfo;
264
+ }
214
265
 
215
266
  // src/identity-oauth-v1-refresh-token-oauth.universal.ts
216
267
  var SubjectType = /* @__PURE__ */ ((SubjectType2) => {
@@ -260,6 +311,29 @@ async function token2(options) {
260
311
  throw transformedError;
261
312
  }
262
313
  }
314
+ async function jwks2() {
315
+ const { httpClient, sideEffects } = arguments[0];
316
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
317
+ const reqOpts = jwks(payload);
318
+ sideEffects?.onSiteCall?.();
319
+ try {
320
+ const result = await httpClient.request(reqOpts);
321
+ sideEffects?.onSuccess?.(result);
322
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
323
+ } catch (err) {
324
+ const transformedError = (0, import_transform_error.transformError)(
325
+ err,
326
+ {
327
+ spreadPathsToArguments: {},
328
+ explicitPathsToArguments: {},
329
+ singleArgumentUnchanged: false
330
+ },
331
+ []
332
+ );
333
+ sideEffects?.onError?.(err);
334
+ throw transformedError;
335
+ }
336
+ }
263
337
  async function tokenInfo2(options) {
264
338
  const { httpClient, sideEffects } = arguments[1];
265
339
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -299,6 +373,29 @@ async function tokenInfo2(options) {
299
373
  throw transformedError;
300
374
  }
301
375
  }
376
+ async function userInfo2() {
377
+ const { httpClient, sideEffects } = arguments[0];
378
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
379
+ const reqOpts = userInfo(payload);
380
+ sideEffects?.onSiteCall?.();
381
+ try {
382
+ const result = await httpClient.request(reqOpts);
383
+ sideEffects?.onSuccess?.(result);
384
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
385
+ } catch (err) {
386
+ const transformedError = (0, import_transform_error.transformError)(
387
+ err,
388
+ {
389
+ spreadPathsToArguments: {},
390
+ explicitPathsToArguments: {},
391
+ singleArgumentUnchanged: false
392
+ },
393
+ []
394
+ );
395
+ sideEffects?.onError?.(err);
396
+ throw transformedError;
397
+ }
398
+ }
302
399
 
303
400
  // src/identity-oauth-v1-refresh-token-oauth.public.ts
304
401
  function token3(httpClient) {
@@ -308,6 +405,12 @@ function token3(httpClient) {
308
405
  { httpClient }
309
406
  );
310
407
  }
408
+ function jwks3(httpClient) {
409
+ return () => jwks2(
410
+ // @ts-ignore
411
+ { httpClient }
412
+ );
413
+ }
311
414
  function tokenInfo3(httpClient) {
312
415
  return (options) => tokenInfo2(
313
416
  options,
@@ -315,15 +418,25 @@ function tokenInfo3(httpClient) {
315
418
  { httpClient }
316
419
  );
317
420
  }
421
+ function userInfo3(httpClient) {
422
+ return () => userInfo2(
423
+ // @ts-ignore
424
+ { httpClient }
425
+ );
426
+ }
318
427
 
319
428
  // src/identity-oauth-v1-refresh-token-oauth.context.ts
320
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
321
- var token4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(token3);
322
- var tokenInfo4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(tokenInfo3);
429
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
430
+ var token4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(token3);
431
+ var jwks4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(jwks3);
432
+ var tokenInfo4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(tokenInfo3);
433
+ var userInfo4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(userInfo3);
323
434
  // Annotate the CommonJS export names for ESM import in node:
324
435
  0 && (module.exports = {
325
436
  SubjectType,
437
+ jwks,
326
438
  token,
327
- tokenInfo
439
+ tokenInfo,
440
+ userInfo
328
441
  });
329
442
  //# sourceMappingURL=index.js.map