@wix/identity 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/src/identity-oauth-v1-refresh-token.http.d.ts +3 -2
- package/build/cjs/src/identity-oauth-v1-refresh-token.http.js +3 -2
- package/build/cjs/src/identity-oauth-v1-refresh-token.http.js.map +1 -1
- package/build/cjs/src/identity-oauth-v1-refresh-token.public.d.ts +1 -1
- package/build/cjs/src/identity-oauth-v1-refresh-token.types.d.ts +48 -63
- package/build/cjs/src/identity-oauth-v1-refresh-token.universal.d.ts +90 -115
- package/build/cjs/src/identity-oauth-v1-refresh-token.universal.js +12 -15
- package/build/cjs/src/identity-oauth-v1-refresh-token.universal.js.map +1 -1
- package/build/es/src/identity-oauth-v1-refresh-token.http.d.ts +3 -2
- package/build/es/src/identity-oauth-v1-refresh-token.http.js +3 -2
- package/build/es/src/identity-oauth-v1-refresh-token.http.js.map +1 -1
- package/build/es/src/identity-oauth-v1-refresh-token.public.d.ts +1 -1
- package/build/es/src/identity-oauth-v1-refresh-token.types.d.ts +48 -63
- package/build/es/src/identity-oauth-v1-refresh-token.universal.d.ts +90 -115
- package/build/es/src/identity-oauth-v1-refresh-token.universal.js +12 -15
- package/build/es/src/identity-oauth-v1-refresh-token.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import { RawHttpResponse, AuthorizeRequest, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse,
|
|
2
|
+
import { RawHttpResponse, AuthorizeRequest, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse, TokenResponse, RevokeRefreshTokenRequest, RevokeRefreshTokenResponse, RawHttpRequest } from './identity-oauth-v1-refresh-token.types';
|
|
3
3
|
export declare function authorize(payload: AuthorizeRequest): RequestOptionsFactory<RawHttpResponse>;
|
|
4
|
-
|
|
4
|
+
/** Token endpoint accepts the TokenRequest message encoded in the raw http request body. */
|
|
5
|
+
export declare function token(payload: RawHttpRequest): RequestOptionsFactory<TokenResponse>;
|
|
5
6
|
/** this endpoint serves the Device Authorization Flow as described in https://www.rfc-editor.org/rfc/pdfrfc/rfc8628.txt.pdf */
|
|
6
7
|
export declare function deviceCode(payload: DeviceCodeRequest): RequestOptionsFactory<DeviceCodeResponse>;
|
|
7
8
|
/** this endpoint serves the Device Authorization Flow as described in https://www.rfc-editor.org/rfc/pdfrfc/rfc8628.txt.pdf */
|
|
@@ -9,10 +9,10 @@ const _deviceCodeRequest = {};
|
|
|
9
9
|
const _deviceCodeResponse = {};
|
|
10
10
|
const _deviceVerifyRequest = {};
|
|
11
11
|
const _deviceVerifyResponse = {};
|
|
12
|
+
const _rawHttpRequest = { body: 'BYTES' };
|
|
12
13
|
const _rawHttpResponse = { body: 'BYTES' };
|
|
13
14
|
const _revokeRefreshTokenRequest = {};
|
|
14
15
|
const _revokeRefreshTokenResponse = {};
|
|
15
|
-
const _tokenRequest = {};
|
|
16
16
|
const _tokenResponse = {};
|
|
17
17
|
function resolveWixIdentityOauth2V1Oauth2NgUrl(opts) {
|
|
18
18
|
const domainToMappings = {
|
|
@@ -70,8 +70,9 @@ function authorize(payload) {
|
|
|
70
70
|
return __authorize;
|
|
71
71
|
}
|
|
72
72
|
exports.authorize = authorize;
|
|
73
|
+
/** Token endpoint accepts the TokenRequest message encoded in the raw http request body. */
|
|
73
74
|
function token(payload) {
|
|
74
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(
|
|
75
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_rawHttpRequest, {});
|
|
75
76
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_tokenResponse, {});
|
|
76
77
|
function __token({ host }) {
|
|
77
78
|
const serializedData = toReq(payload);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-oauth-v1-refresh-token.http.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAgBhD,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,
|
|
1
|
+
{"version":3,"file":"identity-oauth-v1-refresh-token.http.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAgBhD,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,eAAe,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC1C,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3C,MAAM,0BAA0B,GAAG,EAAE,CAAC;AACtC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AACvC,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,SAAS,qCAAqC,CAC5C,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,WAAW;aACtB;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,WAAW;aACtB;SACF;QACD,qBAAqB,EAAE;YACrB;gBACE,OAAO,EAAE,y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AAE,GAAG,IAAA,uBAAU,EAAC,2BAA2B,EAAE,EAAE,CAAC,CAAC;IAE1E,SAAS,oBAAoB,CAAC,EAAE,IAAI,EAAO;QACzC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,oDAAoD;YAC/D,GAAG,EAAE,qCAAqC,CAAC;gBACzC,SAAS,EAAE,kBAAkB;gBAC7B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,oBAAoB,CAAC,OAAO,GAAG,OAAO,CAAC;IAEvC,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AA9BD,gDA8BC"}
|
|
@@ -8,4 +8,4 @@ export declare function token(httpClient: HttpClient): (options?: TokenOptions |
|
|
|
8
8
|
export declare function deviceCode(httpClient: HttpClient): (options?: DeviceCodeOptions | undefined) => Promise<import("./identity-oauth-v1-refresh-token.universal").DeviceCodeResponse>;
|
|
9
9
|
export declare function deviceVerify(httpClient: HttpClient): (options?: DeviceVerifyOptions | undefined) => Promise<void>;
|
|
10
10
|
export declare function revokeRefreshToken(httpClient: HttpClient): (options?: RevokeRefreshTokenOptions | undefined) => Promise<void>;
|
|
11
|
-
export { RefreshToken, AuthorizeRequest, RawHttpResponse, HeadersEntry,
|
|
11
|
+
export { RefreshToken, AuthorizeRequest, RawHttpResponse, HeadersEntry, RawHttpRequest, PathParametersEntry, QueryParametersEntry, TokenResponse, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse, InvalidateUserCodeRequest, InvalidateUserCodeResponse, RevokeRefreshTokenRequest, RevokeRefreshTokenResponse, Empty, AuthorizeOptions, TokenOptions, DeviceCodeOptions, DeviceVerifyOptions, RevokeRefreshTokenOptions, } from './identity-oauth-v1-refresh-token.universal';
|
|
@@ -6,49 +6,56 @@ export interface RefreshToken {
|
|
|
6
6
|
* the authorization process.
|
|
7
7
|
*/
|
|
8
8
|
export interface AuthorizeRequest {
|
|
9
|
-
/**
|
|
9
|
+
/** ID of the Wix OAuth app requesting authorization. */
|
|
10
10
|
clientId?: string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
13
|
+
*
|
|
14
|
+
* Supported values:
|
|
15
|
+
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
14
16
|
*/
|
|
15
17
|
responseType?: string;
|
|
18
|
+
/** 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. */
|
|
19
|
+
redirectUri?: string | null;
|
|
16
20
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
redirectUri?: string;
|
|
21
|
-
/**
|
|
22
|
-
* scope is a space-delimited string that specifies the requested scope of the
|
|
23
|
-
* access request.
|
|
21
|
+
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
22
|
+
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
24
23
|
*/
|
|
25
24
|
scope?: string | null;
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
28
|
-
* in the request,
|
|
26
|
+
* A value used to confirm the state of an application before and after it makes an authorization
|
|
27
|
+
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
28
|
+
* is redirected there.
|
|
29
|
+
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
29
30
|
*/
|
|
30
31
|
state?: string;
|
|
31
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* esired response format.
|
|
34
|
+
*
|
|
35
|
+
* Supported values:
|
|
36
|
+
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
37
|
+
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
38
|
+
* + `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).
|
|
39
|
+
*
|
|
40
|
+
* Default value: `query`
|
|
41
|
+
*/
|
|
32
42
|
responseMode?: string | null;
|
|
33
43
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
44
|
+
* Code challenge to use for PKCE verification.
|
|
45
|
+
* This field is only used if `responseType` is set to `code`.
|
|
36
46
|
*/
|
|
37
47
|
codeChallenge?: string | null;
|
|
38
48
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
49
|
+
* Code challenge method to use for PKCE verification.
|
|
50
|
+
* This field is only used if `responseType` is set to `code`.
|
|
51
|
+
*
|
|
52
|
+
* Supported values:
|
|
53
|
+
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
54
|
+
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
41
55
|
*/
|
|
42
56
|
codeChallengeMethod?: string | null;
|
|
43
|
-
/**
|
|
57
|
+
/** Session token of the site visitor to authorize. */
|
|
44
58
|
sessionToken?: string | null;
|
|
45
|
-
/**
|
|
46
|
-
* Optional fields for errors
|
|
47
|
-
* A short error code that describes the type of error that occurred (e.g. "invalid_request")
|
|
48
|
-
*/
|
|
49
|
-
error?: string | null;
|
|
50
|
-
/** A human-readable description of the error that occurred */
|
|
51
|
-
errorDescription?: string | null;
|
|
52
59
|
}
|
|
53
60
|
export interface RawHttpResponse {
|
|
54
61
|
body?: Uint8Array;
|
|
@@ -59,44 +66,22 @@ export interface HeadersEntry {
|
|
|
59
66
|
key?: string;
|
|
60
67
|
value?: string;
|
|
61
68
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/** Required for `refresh_token` grant type. */
|
|
79
|
-
refreshToken?: string | null;
|
|
80
|
-
/** Required for `client_credentials` grant type. */
|
|
81
|
-
clientSecret?: string | null;
|
|
82
|
-
/**
|
|
83
|
-
* Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, "device_code" from the
|
|
84
|
-
* device authorization response
|
|
85
|
-
*/
|
|
86
|
-
deviceCode?: string | null;
|
|
87
|
-
/** Required for the `authorization_code` grant type. */
|
|
88
|
-
redirectUri?: string | null;
|
|
89
|
-
/** Required for `authorization_code` grant type. */
|
|
90
|
-
code?: string | null;
|
|
91
|
-
/** Optional, used if code challenge and code method were used in `authorization_code` grant type. */
|
|
92
|
-
codeVerifier?: string | null;
|
|
93
|
-
}
|
|
94
|
-
/** @oneof */
|
|
95
|
-
export interface TokenRequestTenantOneOf {
|
|
96
|
-
/** supported tenant - specific site */
|
|
97
|
-
siteId?: string | null;
|
|
98
|
-
/** supported tenant - specific account */
|
|
99
|
-
accountId?: string | null;
|
|
69
|
+
export interface RawHttpRequest {
|
|
70
|
+
body?: Uint8Array;
|
|
71
|
+
pathParams?: PathParametersEntry[];
|
|
72
|
+
queryParams?: QueryParametersEntry[];
|
|
73
|
+
headers?: HeadersEntry[];
|
|
74
|
+
method?: string;
|
|
75
|
+
rawPath?: string;
|
|
76
|
+
rawQuery?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface PathParametersEntry {
|
|
79
|
+
key?: string;
|
|
80
|
+
value?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface QueryParametersEntry {
|
|
83
|
+
key?: string;
|
|
84
|
+
value?: string;
|
|
100
85
|
}
|
|
101
86
|
export interface TokenResponse {
|
|
102
87
|
/** The access token issued by the authorization server. */
|
|
@@ -12,49 +12,56 @@ export interface RefreshToken {
|
|
|
12
12
|
* the authorization process.
|
|
13
13
|
*/
|
|
14
14
|
export interface AuthorizeRequest {
|
|
15
|
-
/**
|
|
15
|
+
/** ID of the Wix OAuth app requesting authorization. */
|
|
16
16
|
clientId?: string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
19
|
+
*
|
|
20
|
+
* Supported values:
|
|
21
|
+
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
20
22
|
*/
|
|
21
23
|
responseType?: string;
|
|
24
|
+
/** 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. */
|
|
25
|
+
redirectUri?: string | null;
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
redirectUri?: string;
|
|
27
|
-
/**
|
|
28
|
-
* scope is a space-delimited string that specifies the requested scope of the
|
|
29
|
-
* access request.
|
|
27
|
+
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
28
|
+
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
30
29
|
*/
|
|
31
30
|
scope?: string | null;
|
|
32
31
|
/**
|
|
33
|
-
*
|
|
34
|
-
* in the request,
|
|
32
|
+
* A value used to confirm the state of an application before and after it makes an authorization
|
|
33
|
+
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
34
|
+
* is redirected there.
|
|
35
|
+
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
35
36
|
*/
|
|
36
37
|
state?: string;
|
|
37
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* esired response format.
|
|
40
|
+
*
|
|
41
|
+
* Supported values:
|
|
42
|
+
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
43
|
+
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
44
|
+
* + `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).
|
|
45
|
+
*
|
|
46
|
+
* Default value: `query`
|
|
47
|
+
*/
|
|
38
48
|
responseMode?: string | null;
|
|
39
49
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
50
|
+
* Code challenge to use for PKCE verification.
|
|
51
|
+
* This field is only used if `responseType` is set to `code`.
|
|
42
52
|
*/
|
|
43
53
|
codeChallenge?: string | null;
|
|
44
54
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
55
|
+
* Code challenge method to use for PKCE verification.
|
|
56
|
+
* This field is only used if `responseType` is set to `code`.
|
|
57
|
+
*
|
|
58
|
+
* Supported values:
|
|
59
|
+
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
60
|
+
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
47
61
|
*/
|
|
48
62
|
codeChallengeMethod?: string | null;
|
|
49
|
-
/**
|
|
63
|
+
/** Session token of the site visitor to authorize. */
|
|
50
64
|
sessionToken?: string | null;
|
|
51
|
-
/**
|
|
52
|
-
* Optional fields for errors
|
|
53
|
-
* A short error code that describes the type of error that occurred (e.g. "invalid_request")
|
|
54
|
-
*/
|
|
55
|
-
error?: string | null;
|
|
56
|
-
/** A human-readable description of the error that occurred */
|
|
57
|
-
errorDescription?: string | null;
|
|
58
65
|
}
|
|
59
66
|
export interface RawHttpResponse {
|
|
60
67
|
body?: Uint8Array;
|
|
@@ -65,44 +72,22 @@ export interface HeadersEntry {
|
|
|
65
72
|
key?: string;
|
|
66
73
|
value?: string;
|
|
67
74
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
* grant_type specifies the grant type being used. supported grant types are:
|
|
81
|
-
* `authorization_code`, `client_credentials`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`, `anonymous`
|
|
82
|
-
*/
|
|
83
|
-
grantType?: string;
|
|
84
|
-
/** Required for `refresh_token` grant type. */
|
|
85
|
-
refreshToken?: string | null;
|
|
86
|
-
/** Required for `client_credentials` grant type. */
|
|
87
|
-
clientSecret?: string | null;
|
|
88
|
-
/**
|
|
89
|
-
* Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, "device_code" from the
|
|
90
|
-
* device authorization response
|
|
91
|
-
*/
|
|
92
|
-
deviceCode?: string | null;
|
|
93
|
-
/** Required for the `authorization_code` grant type. */
|
|
94
|
-
redirectUri?: string | null;
|
|
95
|
-
/** Required for `authorization_code` grant type. */
|
|
96
|
-
code?: string | null;
|
|
97
|
-
/** Optional, used if code challenge and code method were used in `authorization_code` grant type. */
|
|
98
|
-
codeVerifier?: string | null;
|
|
75
|
+
export interface RawHttpRequest {
|
|
76
|
+
body?: Uint8Array;
|
|
77
|
+
pathParams?: PathParametersEntry[];
|
|
78
|
+
queryParams?: QueryParametersEntry[];
|
|
79
|
+
headers?: HeadersEntry[];
|
|
80
|
+
method?: string;
|
|
81
|
+
rawPath?: string;
|
|
82
|
+
rawQuery?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface PathParametersEntry {
|
|
85
|
+
key?: string;
|
|
86
|
+
value?: string;
|
|
99
87
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
siteId?: string | null;
|
|
104
|
-
/** supported tenant - specific account */
|
|
105
|
-
accountId?: string | null;
|
|
88
|
+
export interface QueryParametersEntry {
|
|
89
|
+
key?: string;
|
|
90
|
+
value?: string;
|
|
106
91
|
}
|
|
107
92
|
export interface TokenResponse {
|
|
108
93
|
/** The access token issued by the authorization server. */
|
|
@@ -165,81 +150,71 @@ export interface Empty {
|
|
|
165
150
|
*/
|
|
166
151
|
export declare function authorize(options?: AuthorizeOptions): Promise<RawHttpResponse>;
|
|
167
152
|
export interface AuthorizeOptions {
|
|
168
|
-
/**
|
|
153
|
+
/** ID of the Wix OAuth app requesting authorization. */
|
|
169
154
|
clientId?: string;
|
|
170
155
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
156
|
+
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
157
|
+
*
|
|
158
|
+
* Supported values:
|
|
159
|
+
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
173
160
|
*/
|
|
174
161
|
responseType?: string;
|
|
162
|
+
/** 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. */
|
|
163
|
+
redirectUri?: string | null;
|
|
175
164
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*/
|
|
179
|
-
redirectUri?: string;
|
|
180
|
-
/**
|
|
181
|
-
* scope is a space-delimited string that specifies the requested scope of the
|
|
182
|
-
* access request.
|
|
165
|
+
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
166
|
+
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
183
167
|
*/
|
|
184
168
|
scope?: string | null;
|
|
185
169
|
/**
|
|
186
|
-
*
|
|
187
|
-
* in the request,
|
|
170
|
+
* A value used to confirm the state of an application before and after it makes an authorization
|
|
171
|
+
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
172
|
+
* is redirected there.
|
|
173
|
+
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
188
174
|
*/
|
|
189
175
|
state?: string;
|
|
190
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* esired response format.
|
|
178
|
+
*
|
|
179
|
+
* Supported values:
|
|
180
|
+
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
181
|
+
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
182
|
+
* + `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).
|
|
183
|
+
*
|
|
184
|
+
* Default value: `query`
|
|
185
|
+
*/
|
|
191
186
|
responseMode?: string | null;
|
|
192
187
|
/**
|
|
193
|
-
*
|
|
194
|
-
*
|
|
188
|
+
* Code challenge to use for PKCE verification.
|
|
189
|
+
* This field is only used if `responseType` is set to `code`.
|
|
195
190
|
*/
|
|
196
191
|
codeChallenge?: string | null;
|
|
197
192
|
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
193
|
+
* Code challenge method to use for PKCE verification.
|
|
194
|
+
* This field is only used if `responseType` is set to `code`.
|
|
195
|
+
*
|
|
196
|
+
* Supported values:
|
|
197
|
+
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
198
|
+
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
200
199
|
*/
|
|
201
200
|
codeChallengeMethod?: string | null;
|
|
202
|
-
/**
|
|
201
|
+
/** Session token of the site visitor to authorize. */
|
|
203
202
|
sessionToken?: string | null;
|
|
204
|
-
/**
|
|
205
|
-
* Optional fields for errors
|
|
206
|
-
* A short error code that describes the type of error that occurred (e.g. "invalid_request")
|
|
207
|
-
*/
|
|
208
|
-
error?: string | null;
|
|
209
|
-
/** A human-readable description of the error that occurred */
|
|
210
|
-
errorDescription?: string | null;
|
|
211
203
|
}
|
|
212
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Token endpoint accepts the TokenRequest message encoded in the raw http request body.
|
|
206
|
+
* @public
|
|
213
207
|
* @documentationMaturity preview
|
|
214
208
|
*/
|
|
215
209
|
export declare function token(options?: TokenOptions): Promise<TokenResponse>;
|
|
216
|
-
export interface TokenOptions
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
/** Required for `refresh_token` grant type. */
|
|
225
|
-
refreshToken?: string | null;
|
|
226
|
-
/** Required for `client_credentials` grant type. */
|
|
227
|
-
clientSecret?: string | null;
|
|
228
|
-
/**
|
|
229
|
-
* Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, "device_code" from the
|
|
230
|
-
* device authorization response
|
|
231
|
-
*/
|
|
232
|
-
deviceCode?: string | null;
|
|
233
|
-
/** Required for the `authorization_code` grant type. */
|
|
234
|
-
redirectUri?: string | null;
|
|
235
|
-
/** Required for `authorization_code` grant type. */
|
|
236
|
-
code?: string | null;
|
|
237
|
-
/** Optional, used if code challenge and code method were used in `authorization_code` grant type. */
|
|
238
|
-
codeVerifier?: string | null;
|
|
239
|
-
/** supported tenant - specific site */
|
|
240
|
-
siteId?: string | null;
|
|
241
|
-
/** supported tenant - specific account */
|
|
242
|
-
accountId?: string | null;
|
|
210
|
+
export interface TokenOptions {
|
|
211
|
+
body?: Uint8Array;
|
|
212
|
+
pathParams?: PathParametersEntry[];
|
|
213
|
+
queryParams?: QueryParametersEntry[];
|
|
214
|
+
headers?: HeadersEntry[];
|
|
215
|
+
method?: string;
|
|
216
|
+
rawPath?: string;
|
|
217
|
+
rawQuery?: string;
|
|
243
218
|
}
|
|
244
219
|
/**
|
|
245
220
|
* this endpoint serves the Device Authorization Flow as described in https://www.rfc-editor.org/rfc/pdfrfc/rfc8628.txt.pdf
|
|
@@ -51,10 +51,10 @@ const _deviceCodeRequest = {};
|
|
|
51
51
|
const _deviceCodeResponse = {};
|
|
52
52
|
const _deviceVerifyRequest = {};
|
|
53
53
|
const _deviceVerifyResponse = {};
|
|
54
|
+
const _rawHttpRequest = {};
|
|
54
55
|
const _rawHttpResponse = {};
|
|
55
56
|
const _revokeRefreshTokenRequest = {};
|
|
56
57
|
const _revokeRefreshTokenResponse = {};
|
|
57
|
-
const _tokenRequest = {};
|
|
58
58
|
const _tokenResponse = {};
|
|
59
59
|
/** @public
|
|
60
60
|
* @documentationMaturity preview
|
|
@@ -72,8 +72,6 @@ function authorize(options) {
|
|
|
72
72
|
codeChallenge: '$[0].codeChallenge',
|
|
73
73
|
codeChallengeMethod: '$[0].codeChallengeMethod',
|
|
74
74
|
sessionToken: '$[0].sessionToken',
|
|
75
|
-
error: '$[0].error',
|
|
76
|
-
errorDescription: '$[0].errorDescription',
|
|
77
75
|
};
|
|
78
76
|
const responseTransformation = '$';
|
|
79
77
|
// @ts-ignore
|
|
@@ -115,29 +113,28 @@ function authorize(options) {
|
|
|
115
113
|
});
|
|
116
114
|
}
|
|
117
115
|
exports.authorize = authorize;
|
|
118
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Token endpoint accepts the TokenRequest message encoded in the raw http request body.
|
|
118
|
+
* @public
|
|
119
119
|
* @documentationMaturity preview
|
|
120
120
|
*/
|
|
121
121
|
function token(options) {
|
|
122
122
|
var _a, _b, _c;
|
|
123
123
|
return __awaiter(this, arguments, void 0, function* () {
|
|
124
124
|
const requestTransformation = {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
codeVerifier: '$[0].codeVerifier',
|
|
133
|
-
siteId: '$[0].siteId',
|
|
134
|
-
accountId: '$[0].accountId',
|
|
125
|
+
body: '$[0].body',
|
|
126
|
+
pathParams: '$[0].pathParams',
|
|
127
|
+
queryParams: '$[0].queryParams',
|
|
128
|
+
headers: '$[0].headers',
|
|
129
|
+
method: '$[0].method',
|
|
130
|
+
rawPath: '$[0].rawPath',
|
|
131
|
+
rawQuery: '$[0].rawQuery',
|
|
135
132
|
};
|
|
136
133
|
const responseTransformation = '$';
|
|
137
134
|
// @ts-ignore
|
|
138
135
|
const { httpClient, sideEffects } = arguments[1];
|
|
139
136
|
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
140
|
-
rootSchema:
|
|
137
|
+
rootSchema: _rawHttpRequest,
|
|
141
138
|
depSchemas: {},
|
|
142
139
|
fqdnTransformation: {
|
|
143
140
|
paths: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-oauth-v1-refresh-token.universal.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,iHAAmG;AAEnG,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"identity-oauth-v1-refresh-token.universal.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,iHAAmG;AAEnG,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,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B,UAAU,EAAE,2BAA2B;YACvC,UAAU,EAAE,EAAE;YACd,kBAAkB,EAAE;gBAClB,KAAK,EAAE,EAAE;gBACT,cAAc,EAAE,aAAa;aAC9B;YACD,oBAAoB,EAAE,sBAAsB;SAC7C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QAE/C,MAAM,OAAO,GACX,wCAAwC,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAEvE,KAAK,CAAC,8CAA8C,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE1E,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,+CAAvB,WAAW,CAAgB,CAAC;QAC5B,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AArDD,gDAqDC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import { RawHttpResponse, AuthorizeRequest, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse,
|
|
2
|
+
import { RawHttpResponse, AuthorizeRequest, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse, TokenResponse, RevokeRefreshTokenRequest, RevokeRefreshTokenResponse, RawHttpRequest } from './identity-oauth-v1-refresh-token.types';
|
|
3
3
|
export declare function authorize(payload: AuthorizeRequest): RequestOptionsFactory<RawHttpResponse>;
|
|
4
|
-
|
|
4
|
+
/** Token endpoint accepts the TokenRequest message encoded in the raw http request body. */
|
|
5
|
+
export declare function token(payload: RawHttpRequest): RequestOptionsFactory<TokenResponse>;
|
|
5
6
|
/** this endpoint serves the Device Authorization Flow as described in https://www.rfc-editor.org/rfc/pdfrfc/rfc8628.txt.pdf */
|
|
6
7
|
export declare function deviceCode(payload: DeviceCodeRequest): RequestOptionsFactory<DeviceCodeResponse>;
|
|
7
8
|
/** this endpoint serves the Device Authorization Flow as described in https://www.rfc-editor.org/rfc/pdfrfc/rfc8628.txt.pdf */
|
|
@@ -6,10 +6,10 @@ const _deviceCodeRequest = {};
|
|
|
6
6
|
const _deviceCodeResponse = {};
|
|
7
7
|
const _deviceVerifyRequest = {};
|
|
8
8
|
const _deviceVerifyResponse = {};
|
|
9
|
+
const _rawHttpRequest = { body: 'BYTES' };
|
|
9
10
|
const _rawHttpResponse = { body: 'BYTES' };
|
|
10
11
|
const _revokeRefreshTokenRequest = {};
|
|
11
12
|
const _revokeRefreshTokenResponse = {};
|
|
12
|
-
const _tokenRequest = {};
|
|
13
13
|
const _tokenResponse = {};
|
|
14
14
|
function resolveWixIdentityOauth2V1Oauth2NgUrl(opts) {
|
|
15
15
|
const domainToMappings = {
|
|
@@ -66,8 +66,9 @@ export function authorize(payload) {
|
|
|
66
66
|
__authorize.fromReq = fromReq;
|
|
67
67
|
return __authorize;
|
|
68
68
|
}
|
|
69
|
+
/** Token endpoint accepts the TokenRequest message encoded in the raw http request body. */
|
|
69
70
|
export function token(payload) {
|
|
70
|
-
const { toJSON: toReq, fromJSON: fromReq } = serializer(
|
|
71
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_rawHttpRequest, {});
|
|
71
72
|
const { fromJSON: fromRes } = serializer(_tokenResponse, {});
|
|
72
73
|
function __token({ host }) {
|
|
73
74
|
const serializedData = toReq(payload);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-oauth-v1-refresh-token.http.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgBhD,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,
|
|
1
|
+
{"version":3,"file":"identity-oauth-v1-refresh-token.http.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgBhD,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,eAAe,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC1C,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3C,MAAM,0BAA0B,GAAG,EAAE,CAAC;AACtC,MAAM,2BAA2B,GAAG,EAAE,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;AACtD,MAAM,UAAU,kBAAkB,CAChC,OAAkC;IAElC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACrD,0BAA0B,EAC1B,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAC;IAE1E,SAAS,oBAAoB,CAAC,EAAE,IAAI,EAAO;QACzC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,oDAAoD;YAC/D,GAAG,EAAE,qCAAqC,CAAC;gBACzC,SAAS,EAAE,kBAAkB;gBAC7B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,oBAAoB,CAAC,OAAO,GAAG,OAAO,CAAC;IAEvC,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
|
|
@@ -8,4 +8,4 @@ export declare function token(httpClient: HttpClient): (options?: TokenOptions |
|
|
|
8
8
|
export declare function deviceCode(httpClient: HttpClient): (options?: DeviceCodeOptions | undefined) => Promise<import("./identity-oauth-v1-refresh-token.universal").DeviceCodeResponse>;
|
|
9
9
|
export declare function deviceVerify(httpClient: HttpClient): (options?: DeviceVerifyOptions | undefined) => Promise<void>;
|
|
10
10
|
export declare function revokeRefreshToken(httpClient: HttpClient): (options?: RevokeRefreshTokenOptions | undefined) => Promise<void>;
|
|
11
|
-
export { RefreshToken, AuthorizeRequest, RawHttpResponse, HeadersEntry,
|
|
11
|
+
export { RefreshToken, AuthorizeRequest, RawHttpResponse, HeadersEntry, RawHttpRequest, PathParametersEntry, QueryParametersEntry, TokenResponse, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse, InvalidateUserCodeRequest, InvalidateUserCodeResponse, RevokeRefreshTokenRequest, RevokeRefreshTokenResponse, Empty, AuthorizeOptions, TokenOptions, DeviceCodeOptions, DeviceVerifyOptions, RevokeRefreshTokenOptions, } from './identity-oauth-v1-refresh-token.universal';
|
|
@@ -6,49 +6,56 @@ export interface RefreshToken {
|
|
|
6
6
|
* the authorization process.
|
|
7
7
|
*/
|
|
8
8
|
export interface AuthorizeRequest {
|
|
9
|
-
/**
|
|
9
|
+
/** ID of the Wix OAuth app requesting authorization. */
|
|
10
10
|
clientId?: string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
13
|
+
*
|
|
14
|
+
* Supported values:
|
|
15
|
+
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
14
16
|
*/
|
|
15
17
|
responseType?: string;
|
|
18
|
+
/** 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. */
|
|
19
|
+
redirectUri?: string | null;
|
|
16
20
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
redirectUri?: string;
|
|
21
|
-
/**
|
|
22
|
-
* scope is a space-delimited string that specifies the requested scope of the
|
|
23
|
-
* access request.
|
|
21
|
+
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
22
|
+
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
24
23
|
*/
|
|
25
24
|
scope?: string | null;
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
28
|
-
* in the request,
|
|
26
|
+
* A value used to confirm the state of an application before and after it makes an authorization
|
|
27
|
+
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
28
|
+
* is redirected there.
|
|
29
|
+
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
29
30
|
*/
|
|
30
31
|
state?: string;
|
|
31
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* esired response format.
|
|
34
|
+
*
|
|
35
|
+
* Supported values:
|
|
36
|
+
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
37
|
+
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
38
|
+
* + `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).
|
|
39
|
+
*
|
|
40
|
+
* Default value: `query`
|
|
41
|
+
*/
|
|
32
42
|
responseMode?: string | null;
|
|
33
43
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
44
|
+
* Code challenge to use for PKCE verification.
|
|
45
|
+
* This field is only used if `responseType` is set to `code`.
|
|
36
46
|
*/
|
|
37
47
|
codeChallenge?: string | null;
|
|
38
48
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
49
|
+
* Code challenge method to use for PKCE verification.
|
|
50
|
+
* This field is only used if `responseType` is set to `code`.
|
|
51
|
+
*
|
|
52
|
+
* Supported values:
|
|
53
|
+
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
54
|
+
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
41
55
|
*/
|
|
42
56
|
codeChallengeMethod?: string | null;
|
|
43
|
-
/**
|
|
57
|
+
/** Session token of the site visitor to authorize. */
|
|
44
58
|
sessionToken?: string | null;
|
|
45
|
-
/**
|
|
46
|
-
* Optional fields for errors
|
|
47
|
-
* A short error code that describes the type of error that occurred (e.g. "invalid_request")
|
|
48
|
-
*/
|
|
49
|
-
error?: string | null;
|
|
50
|
-
/** A human-readable description of the error that occurred */
|
|
51
|
-
errorDescription?: string | null;
|
|
52
59
|
}
|
|
53
60
|
export interface RawHttpResponse {
|
|
54
61
|
body?: Uint8Array;
|
|
@@ -59,44 +66,22 @@ export interface HeadersEntry {
|
|
|
59
66
|
key?: string;
|
|
60
67
|
value?: string;
|
|
61
68
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/** Required for `refresh_token` grant type. */
|
|
79
|
-
refreshToken?: string | null;
|
|
80
|
-
/** Required for `client_credentials` grant type. */
|
|
81
|
-
clientSecret?: string | null;
|
|
82
|
-
/**
|
|
83
|
-
* Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, "device_code" from the
|
|
84
|
-
* device authorization response
|
|
85
|
-
*/
|
|
86
|
-
deviceCode?: string | null;
|
|
87
|
-
/** Required for the `authorization_code` grant type. */
|
|
88
|
-
redirectUri?: string | null;
|
|
89
|
-
/** Required for `authorization_code` grant type. */
|
|
90
|
-
code?: string | null;
|
|
91
|
-
/** Optional, used if code challenge and code method were used in `authorization_code` grant type. */
|
|
92
|
-
codeVerifier?: string | null;
|
|
93
|
-
}
|
|
94
|
-
/** @oneof */
|
|
95
|
-
export interface TokenRequestTenantOneOf {
|
|
96
|
-
/** supported tenant - specific site */
|
|
97
|
-
siteId?: string | null;
|
|
98
|
-
/** supported tenant - specific account */
|
|
99
|
-
accountId?: string | null;
|
|
69
|
+
export interface RawHttpRequest {
|
|
70
|
+
body?: Uint8Array;
|
|
71
|
+
pathParams?: PathParametersEntry[];
|
|
72
|
+
queryParams?: QueryParametersEntry[];
|
|
73
|
+
headers?: HeadersEntry[];
|
|
74
|
+
method?: string;
|
|
75
|
+
rawPath?: string;
|
|
76
|
+
rawQuery?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface PathParametersEntry {
|
|
79
|
+
key?: string;
|
|
80
|
+
value?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface QueryParametersEntry {
|
|
83
|
+
key?: string;
|
|
84
|
+
value?: string;
|
|
100
85
|
}
|
|
101
86
|
export interface TokenResponse {
|
|
102
87
|
/** The access token issued by the authorization server. */
|
|
@@ -12,49 +12,56 @@ export interface RefreshToken {
|
|
|
12
12
|
* the authorization process.
|
|
13
13
|
*/
|
|
14
14
|
export interface AuthorizeRequest {
|
|
15
|
-
/**
|
|
15
|
+
/** ID of the Wix OAuth app requesting authorization. */
|
|
16
16
|
clientId?: string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
19
|
+
*
|
|
20
|
+
* Supported values:
|
|
21
|
+
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
20
22
|
*/
|
|
21
23
|
responseType?: string;
|
|
24
|
+
/** 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. */
|
|
25
|
+
redirectUri?: string | null;
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
redirectUri?: string;
|
|
27
|
-
/**
|
|
28
|
-
* scope is a space-delimited string that specifies the requested scope of the
|
|
29
|
-
* access request.
|
|
27
|
+
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
28
|
+
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
30
29
|
*/
|
|
31
30
|
scope?: string | null;
|
|
32
31
|
/**
|
|
33
|
-
*
|
|
34
|
-
* in the request,
|
|
32
|
+
* A value used to confirm the state of an application before and after it makes an authorization
|
|
33
|
+
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
34
|
+
* is redirected there.
|
|
35
|
+
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
35
36
|
*/
|
|
36
37
|
state?: string;
|
|
37
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* esired response format.
|
|
40
|
+
*
|
|
41
|
+
* Supported values:
|
|
42
|
+
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
43
|
+
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
44
|
+
* + `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).
|
|
45
|
+
*
|
|
46
|
+
* Default value: `query`
|
|
47
|
+
*/
|
|
38
48
|
responseMode?: string | null;
|
|
39
49
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
50
|
+
* Code challenge to use for PKCE verification.
|
|
51
|
+
* This field is only used if `responseType` is set to `code`.
|
|
42
52
|
*/
|
|
43
53
|
codeChallenge?: string | null;
|
|
44
54
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
55
|
+
* Code challenge method to use for PKCE verification.
|
|
56
|
+
* This field is only used if `responseType` is set to `code`.
|
|
57
|
+
*
|
|
58
|
+
* Supported values:
|
|
59
|
+
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
60
|
+
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
47
61
|
*/
|
|
48
62
|
codeChallengeMethod?: string | null;
|
|
49
|
-
/**
|
|
63
|
+
/** Session token of the site visitor to authorize. */
|
|
50
64
|
sessionToken?: string | null;
|
|
51
|
-
/**
|
|
52
|
-
* Optional fields for errors
|
|
53
|
-
* A short error code that describes the type of error that occurred (e.g. "invalid_request")
|
|
54
|
-
*/
|
|
55
|
-
error?: string | null;
|
|
56
|
-
/** A human-readable description of the error that occurred */
|
|
57
|
-
errorDescription?: string | null;
|
|
58
65
|
}
|
|
59
66
|
export interface RawHttpResponse {
|
|
60
67
|
body?: Uint8Array;
|
|
@@ -65,44 +72,22 @@ export interface HeadersEntry {
|
|
|
65
72
|
key?: string;
|
|
66
73
|
value?: string;
|
|
67
74
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
* grant_type specifies the grant type being used. supported grant types are:
|
|
81
|
-
* `authorization_code`, `client_credentials`, `refresh_token`, `urn:ietf:params:oauth:grant-type:device_code`, `anonymous`
|
|
82
|
-
*/
|
|
83
|
-
grantType?: string;
|
|
84
|
-
/** Required for `refresh_token` grant type. */
|
|
85
|
-
refreshToken?: string | null;
|
|
86
|
-
/** Required for `client_credentials` grant type. */
|
|
87
|
-
clientSecret?: string | null;
|
|
88
|
-
/**
|
|
89
|
-
* Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, "device_code" from the
|
|
90
|
-
* device authorization response
|
|
91
|
-
*/
|
|
92
|
-
deviceCode?: string | null;
|
|
93
|
-
/** Required for the `authorization_code` grant type. */
|
|
94
|
-
redirectUri?: string | null;
|
|
95
|
-
/** Required for `authorization_code` grant type. */
|
|
96
|
-
code?: string | null;
|
|
97
|
-
/** Optional, used if code challenge and code method were used in `authorization_code` grant type. */
|
|
98
|
-
codeVerifier?: string | null;
|
|
75
|
+
export interface RawHttpRequest {
|
|
76
|
+
body?: Uint8Array;
|
|
77
|
+
pathParams?: PathParametersEntry[];
|
|
78
|
+
queryParams?: QueryParametersEntry[];
|
|
79
|
+
headers?: HeadersEntry[];
|
|
80
|
+
method?: string;
|
|
81
|
+
rawPath?: string;
|
|
82
|
+
rawQuery?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface PathParametersEntry {
|
|
85
|
+
key?: string;
|
|
86
|
+
value?: string;
|
|
99
87
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
siteId?: string | null;
|
|
104
|
-
/** supported tenant - specific account */
|
|
105
|
-
accountId?: string | null;
|
|
88
|
+
export interface QueryParametersEntry {
|
|
89
|
+
key?: string;
|
|
90
|
+
value?: string;
|
|
106
91
|
}
|
|
107
92
|
export interface TokenResponse {
|
|
108
93
|
/** The access token issued by the authorization server. */
|
|
@@ -165,81 +150,71 @@ export interface Empty {
|
|
|
165
150
|
*/
|
|
166
151
|
export declare function authorize(options?: AuthorizeOptions): Promise<RawHttpResponse>;
|
|
167
152
|
export interface AuthorizeOptions {
|
|
168
|
-
/**
|
|
153
|
+
/** ID of the Wix OAuth app requesting authorization. */
|
|
169
154
|
clientId?: string;
|
|
170
155
|
/**
|
|
171
|
-
*
|
|
172
|
-
*
|
|
156
|
+
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
157
|
+
*
|
|
158
|
+
* Supported values:
|
|
159
|
+
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
173
160
|
*/
|
|
174
161
|
responseType?: string;
|
|
162
|
+
/** 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. */
|
|
163
|
+
redirectUri?: string | null;
|
|
175
164
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*/
|
|
179
|
-
redirectUri?: string;
|
|
180
|
-
/**
|
|
181
|
-
* scope is a space-delimited string that specifies the requested scope of the
|
|
182
|
-
* access request.
|
|
165
|
+
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
166
|
+
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
183
167
|
*/
|
|
184
168
|
scope?: string | null;
|
|
185
169
|
/**
|
|
186
|
-
*
|
|
187
|
-
* in the request,
|
|
170
|
+
* A value used to confirm the state of an application before and after it makes an authorization
|
|
171
|
+
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
172
|
+
* is redirected there.
|
|
173
|
+
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
188
174
|
*/
|
|
189
175
|
state?: string;
|
|
190
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* esired response format.
|
|
178
|
+
*
|
|
179
|
+
* Supported values:
|
|
180
|
+
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
181
|
+
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
182
|
+
* + `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).
|
|
183
|
+
*
|
|
184
|
+
* Default value: `query`
|
|
185
|
+
*/
|
|
191
186
|
responseMode?: string | null;
|
|
192
187
|
/**
|
|
193
|
-
*
|
|
194
|
-
*
|
|
188
|
+
* Code challenge to use for PKCE verification.
|
|
189
|
+
* This field is only used if `responseType` is set to `code`.
|
|
195
190
|
*/
|
|
196
191
|
codeChallenge?: string | null;
|
|
197
192
|
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
193
|
+
* Code challenge method to use for PKCE verification.
|
|
194
|
+
* This field is only used if `responseType` is set to `code`.
|
|
195
|
+
*
|
|
196
|
+
* Supported values:
|
|
197
|
+
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
198
|
+
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
200
199
|
*/
|
|
201
200
|
codeChallengeMethod?: string | null;
|
|
202
|
-
/**
|
|
201
|
+
/** Session token of the site visitor to authorize. */
|
|
203
202
|
sessionToken?: string | null;
|
|
204
|
-
/**
|
|
205
|
-
* Optional fields for errors
|
|
206
|
-
* A short error code that describes the type of error that occurred (e.g. "invalid_request")
|
|
207
|
-
*/
|
|
208
|
-
error?: string | null;
|
|
209
|
-
/** A human-readable description of the error that occurred */
|
|
210
|
-
errorDescription?: string | null;
|
|
211
203
|
}
|
|
212
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Token endpoint accepts the TokenRequest message encoded in the raw http request body.
|
|
206
|
+
* @public
|
|
213
207
|
* @documentationMaturity preview
|
|
214
208
|
*/
|
|
215
209
|
export declare function token(options?: TokenOptions): Promise<TokenResponse>;
|
|
216
|
-
export interface TokenOptions
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
/** Required for `refresh_token` grant type. */
|
|
225
|
-
refreshToken?: string | null;
|
|
226
|
-
/** Required for `client_credentials` grant type. */
|
|
227
|
-
clientSecret?: string | null;
|
|
228
|
-
/**
|
|
229
|
-
* Required for `urn:ietf:params:oauth:grant-type:device_code` grant type. The device verification code, "device_code" from the
|
|
230
|
-
* device authorization response
|
|
231
|
-
*/
|
|
232
|
-
deviceCode?: string | null;
|
|
233
|
-
/** Required for the `authorization_code` grant type. */
|
|
234
|
-
redirectUri?: string | null;
|
|
235
|
-
/** Required for `authorization_code` grant type. */
|
|
236
|
-
code?: string | null;
|
|
237
|
-
/** Optional, used if code challenge and code method were used in `authorization_code` grant type. */
|
|
238
|
-
codeVerifier?: string | null;
|
|
239
|
-
/** supported tenant - specific site */
|
|
240
|
-
siteId?: string | null;
|
|
241
|
-
/** supported tenant - specific account */
|
|
242
|
-
accountId?: string | null;
|
|
210
|
+
export interface TokenOptions {
|
|
211
|
+
body?: Uint8Array;
|
|
212
|
+
pathParams?: PathParametersEntry[];
|
|
213
|
+
queryParams?: QueryParametersEntry[];
|
|
214
|
+
headers?: HeadersEntry[];
|
|
215
|
+
method?: string;
|
|
216
|
+
rawPath?: string;
|
|
217
|
+
rawQuery?: string;
|
|
243
218
|
}
|
|
244
219
|
/**
|
|
245
220
|
* this endpoint serves the Device Authorization Flow as described in https://www.rfc-editor.org/rfc/pdfrfc/rfc8628.txt.pdf
|
|
@@ -29,10 +29,10 @@ const _deviceCodeRequest = {};
|
|
|
29
29
|
const _deviceCodeResponse = {};
|
|
30
30
|
const _deviceVerifyRequest = {};
|
|
31
31
|
const _deviceVerifyResponse = {};
|
|
32
|
+
const _rawHttpRequest = {};
|
|
32
33
|
const _rawHttpResponse = {};
|
|
33
34
|
const _revokeRefreshTokenRequest = {};
|
|
34
35
|
const _revokeRefreshTokenResponse = {};
|
|
35
|
-
const _tokenRequest = {};
|
|
36
36
|
const _tokenResponse = {};
|
|
37
37
|
/** @public
|
|
38
38
|
* @documentationMaturity preview
|
|
@@ -50,8 +50,6 @@ export function authorize(options) {
|
|
|
50
50
|
codeChallenge: '$[0].codeChallenge',
|
|
51
51
|
codeChallengeMethod: '$[0].codeChallengeMethod',
|
|
52
52
|
sessionToken: '$[0].sessionToken',
|
|
53
|
-
error: '$[0].error',
|
|
54
|
-
errorDescription: '$[0].errorDescription',
|
|
55
53
|
};
|
|
56
54
|
const responseTransformation = '$';
|
|
57
55
|
// @ts-ignore
|
|
@@ -92,29 +90,28 @@ export function authorize(options) {
|
|
|
92
90
|
}
|
|
93
91
|
});
|
|
94
92
|
}
|
|
95
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Token endpoint accepts the TokenRequest message encoded in the raw http request body.
|
|
95
|
+
* @public
|
|
96
96
|
* @documentationMaturity preview
|
|
97
97
|
*/
|
|
98
98
|
export function token(options) {
|
|
99
99
|
var _a, _b, _c;
|
|
100
100
|
return __awaiter(this, arguments, void 0, function* () {
|
|
101
101
|
const requestTransformation = {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
codeVerifier: '$[0].codeVerifier',
|
|
110
|
-
siteId: '$[0].siteId',
|
|
111
|
-
accountId: '$[0].accountId',
|
|
102
|
+
body: '$[0].body',
|
|
103
|
+
pathParams: '$[0].pathParams',
|
|
104
|
+
queryParams: '$[0].queryParams',
|
|
105
|
+
headers: '$[0].headers',
|
|
106
|
+
method: '$[0].method',
|
|
107
|
+
rawPath: '$[0].rawPath',
|
|
108
|
+
rawQuery: '$[0].rawQuery',
|
|
112
109
|
};
|
|
113
110
|
const responseTransformation = '$';
|
|
114
111
|
// @ts-ignore
|
|
115
112
|
const { httpClient, sideEffects } = arguments[1];
|
|
116
113
|
const { toAmbassadorRequest } = serializer({
|
|
117
|
-
rootSchema:
|
|
114
|
+
rootSchema: _rawHttpRequest,
|
|
118
115
|
depSchemas: {},
|
|
119
116
|
fqdnTransformation: {
|
|
120
117
|
paths: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-oauth-v1-refresh-token.universal.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,wCAAwC,MAAM,wCAAwC,CAAC;AAEnG,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"identity-oauth-v1-refresh-token.universal.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,wCAAwC,MAAM,wCAAwC,CAAC;AAEnG,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IAC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1.0.29",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"groupId": "com.wixpress.public-sdk-autogen"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"falconPackageHash": "
|
|
36
|
+
"falconPackageHash": "9bdeed83bd3fc67156d736cd3c0b66b43c0cc4d4a91c8746e868b886"
|
|
37
37
|
}
|