@wix/auto_sdk_identity_oauth 1.0.6 → 1.0.7

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 (134) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +6 -0
  11. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js +10 -0
  12. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js.map +1 -0
  13. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +21 -0
  14. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js +134 -0
  15. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js.map +1 -0
  16. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +14 -0
  17. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js +66 -0
  18. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +1 -0
  19. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +34 -0
  20. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js +20 -0
  21. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js.map +1 -0
  22. package/build/{identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.mts → cjs/src/identity-oauth-v1-refresh-token-oauth.types.d.ts} +34 -52
  23. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js +17 -0
  24. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js.map +1 -0
  25. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +300 -0
  26. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js +143 -0
  27. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +6 -0
  39. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.js +6 -0
  40. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.js.map +1 -0
  41. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +21 -0
  42. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.js +129 -0
  43. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.js.map +1 -0
  44. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +14 -0
  45. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.js +38 -0
  46. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +1 -0
  47. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +34 -0
  48. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.js +14 -0
  49. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.js.map +1 -0
  50. package/build/{identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.ts → es/src/identity-oauth-v1-refresh-token-oauth.types.d.ts} +34 -52
  51. package/build/es/src/identity-oauth-v1-refresh-token-oauth.types.js +14 -0
  52. package/build/es/src/identity-oauth-v1-refresh-token-oauth.types.js.map +1 -0
  53. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +300 -0
  54. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.js +115 -0
  55. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +6 -0
  66. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js +10 -0
  67. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js.map +1 -0
  68. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +21 -0
  69. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js +134 -0
  70. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js.map +1 -0
  71. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +14 -0
  72. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js +66 -0
  73. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +1 -0
  74. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +34 -0
  75. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js +20 -0
  76. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js.map +1 -0
  77. package/build/internal/{identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.mts → cjs/src/identity-oauth-v1-refresh-token-oauth.types.d.ts} +34 -52
  78. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js +17 -0
  79. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js.map +1 -0
  80. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +300 -0
  81. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js +143 -0
  82. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +6 -0
  93. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.js +6 -0
  94. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.js.map +1 -0
  95. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +21 -0
  96. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.js +129 -0
  97. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.js.map +1 -0
  98. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +14 -0
  99. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.js +38 -0
  100. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +1 -0
  101. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +34 -0
  102. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.js +14 -0
  103. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.js.map +1 -0
  104. package/build/internal/{identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.ts → es/src/identity-oauth-v1-refresh-token-oauth.types.d.ts} +34 -52
  105. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.types.js +14 -0
  106. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.types.js.map +1 -0
  107. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +300 -0
  108. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.js +115 -0
  109. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.d.mts +0 -37
  112. package/build/index.d.ts +0 -37
  113. package/build/index.js +0 -259
  114. package/build/index.js.map +0 -1
  115. package/build/index.mjs +0 -233
  116. package/build/index.mjs.map +0 -1
  117. package/build/internal/index.d.mts +0 -37
  118. package/build/internal/index.d.ts +0 -37
  119. package/build/internal/index.js +0 -259
  120. package/build/internal/index.js.map +0 -1
  121. package/build/internal/index.mjs +0 -233
  122. package/build/internal/index.mjs.map +0 -1
  123. package/build/internal/meta.d.mts +0 -79
  124. package/build/internal/meta.d.ts +0 -79
  125. package/build/internal/meta.js +0 -182
  126. package/build/internal/meta.js.map +0 -1
  127. package/build/internal/meta.mjs +0 -154
  128. package/build/internal/meta.mjs.map +0 -1
  129. package/build/meta.d.mts +0 -79
  130. package/build/meta.d.ts +0 -79
  131. package/build/meta.js +0 -182
  132. package/build/meta.js.map +0 -1
  133. package/build/meta.mjs +0 -154
  134. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,14 @@
1
+ import * as ambassadorWixIdentityOauthV1RefreshTokenTypes from './identity-oauth-v1-refresh-token-oauth.types.js';
2
+ import * as ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes from './identity-oauth-v1-refresh-token-oauth.universal.js';
3
+ export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
4
+ getUrl: (context: any) => string;
5
+ httpMethod: K;
6
+ path: string;
7
+ pathParams: M;
8
+ __requestType: T;
9
+ __originalRequestType: S;
10
+ __responseType: Q;
11
+ __originalResponseType: R;
12
+ };
13
+ export declare function token(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpRequest, ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpRequest, ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpResponse, ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpResponse>;
14
+ export declare function tokenInfo(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.RawHttpRequest, ambassadorWixIdentityOauthV1RefreshTokenTypes.RawHttpRequest, ambassadorWixIdentityOauthV1RefreshTokenUniversalTypes.TokenInfoResponse, ambassadorWixIdentityOauthV1RefreshTokenTypes.TokenInfoResponse>;
@@ -0,0 +1,38 @@
1
+ import * as ambassadorWixIdentityOauthV1RefreshToken from './identity-oauth-v1-refresh-token-oauth.http.js';
2
+ export function token() {
3
+ const payload = {};
4
+ const getRequestOptions = ambassadorWixIdentityOauthV1RefreshToken.token(payload);
5
+ const getUrl = (context) => {
6
+ const { url } = getRequestOptions(context);
7
+ return url;
8
+ };
9
+ return {
10
+ getUrl,
11
+ httpMethod: 'POST',
12
+ path: '/v1/oauth/token',
13
+ pathParams: {},
14
+ __requestType: null,
15
+ __originalRequestType: null,
16
+ __responseType: null,
17
+ __originalResponseType: null,
18
+ };
19
+ }
20
+ export function tokenInfo() {
21
+ const payload = {};
22
+ const getRequestOptions = ambassadorWixIdentityOauthV1RefreshToken.tokenInfo(payload);
23
+ const getUrl = (context) => {
24
+ const { url } = getRequestOptions(context);
25
+ return url;
26
+ };
27
+ return {
28
+ getUrl,
29
+ httpMethod: 'POST',
30
+ path: '/v1/oauth/token-info',
31
+ pathParams: {},
32
+ __requestType: null,
33
+ __originalRequestType: null,
34
+ __responseType: null,
35
+ __originalResponseType: null,
36
+ };
37
+ }
38
+ //# sourceMappingURL=identity-oauth-v1-refresh-token-oauth.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-oauth-v1-refresh-token-oauth.meta.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token-oauth.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,wCAAwC,MAAM,iDAAiD,CAAC;AAsB5G,MAAM,UAAU,KAAK;IAQnB,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE1D,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS;IAQvB,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAE9D,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { RawHttpResponse, TokenInfoOptions, TokenInfoResponse, TokenOptions } from './identity-oauth-v1-refresh-token-oauth.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function token(httpClient: HttpClient): TokenSignature;
7
+ interface TokenSignature {
8
+ /**
9
+ * Creates an access token.
10
+ *
11
+ *
12
+ * The endpoint accepts raw HTTP requests. You must pass the request's body
13
+ * parameters formatted as bytes in the raw HTTP request's `body` field,
14
+ * following this template:
15
+ * `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
16
+ *
17
+ * When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
18
+ * token in the `body` field of the raw HTTP response.
19
+ *
20
+ * In case the call fails, Wix returns the relevant `4XX` error code in the raw
21
+ * HTTP response's `statusCode` field and details
22
+ * about the error in `body`. Error details follow the
23
+ * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
24
+ */
25
+ (options?: TokenOptions | undefined): Promise<RawHttpResponse>;
26
+ }
27
+ export declare function tokenInfo(httpClient: HttpClient): TokenInfoSignature;
28
+ interface TokenInfoSignature {
29
+ /**
30
+ * Token Introspection Endpoint.
31
+ */
32
+ (options?: TokenInfoOptions | undefined): Promise<TokenInfoResponse>;
33
+ }
34
+ export { ActionEvent, AuthorizeRequest, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse, DeviceVerifyV2Request, DeviceVerifyV2Response, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, HeadersEntry, InvalidateUserCodeRequest, InvalidateUserCodeResponse, PathParametersEntry, QueryParametersEntry, RawHttpRequest, RawHttpResponse, RefreshToken, RestoreInfo, RevokeRefreshTokenRequest, RevokeRefreshTokenResponse, SubjectType, TokenInfoOptions, TokenInfoResponse, TokenOptions, } from './identity-oauth-v1-refresh-token-oauth.universal.js';
@@ -0,0 +1,14 @@
1
+ import { token as universalToken, tokenInfo as universalTokenInfo, } from './identity-oauth-v1-refresh-token-oauth.universal.js';
2
+ export const __metadata = { PACKAGE_NAME: '@wix/identity' };
3
+ export function token(httpClient) {
4
+ return (options) => universalToken(options,
5
+ // @ts-ignore
6
+ { httpClient });
7
+ }
8
+ export function tokenInfo(httpClient) {
9
+ return (options) => universalTokenInfo(options,
10
+ // @ts-ignore
11
+ { httpClient });
12
+ }
13
+ export { SubjectType, } from './identity-oauth-v1-refresh-token-oauth.universal.js';
14
+ //# sourceMappingURL=identity-oauth-v1-refresh-token-oauth.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-oauth-v1-refresh-token-oauth.public.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token-oauth.public.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,IAAI,cAAc,EACvB,SAAS,IAAI,kBAAkB,GAChC,MAAM,sDAAsD,CAAC;AAE9D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,MAAM,UAAU,KAAK,CAAC,UAAsB;IAC1C,OAAO,CAAC,OAAsB,EAAE,EAAE,CAChC,cAAc,CACZ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAuBD,MAAM,UAAU,SAAS,CAAC,UAAsB;IAC9C,OAAO,CAAC,OAA0B,EAAE,EAAE,CACpC,kBAAkB,CAChB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AASD,OAAO,EA0BL,WAAW,GAIZ,MAAM,sDAAsD,CAAC"}
@@ -1,11 +1,11 @@
1
- interface RefreshToken {
1
+ export interface RefreshToken {
2
2
  token?: string;
3
3
  }
4
4
  /**
5
5
  * AuthorizeRequest is sent by the client to the authorization server to initiate
6
6
  * the authorization process.
7
7
  */
8
- interface AuthorizeRequest {
8
+ export interface AuthorizeRequest {
9
9
  /**
10
10
  * ID of the Wix OAuth app requesting authorization.
11
11
  * @format GUID
@@ -70,16 +70,16 @@ interface AuthorizeRequest {
70
70
  */
71
71
  signInUrl?: string | null;
72
72
  }
73
- interface RawHttpResponse {
73
+ export interface RawHttpResponse {
74
74
  body?: Uint8Array;
75
75
  statusCode?: number | null;
76
76
  headers?: HeadersEntry[];
77
77
  }
78
- interface HeadersEntry {
78
+ export interface HeadersEntry {
79
79
  key?: string;
80
80
  value?: string;
81
81
  }
82
- interface RawHttpRequest {
82
+ export interface RawHttpRequest {
83
83
  body?: Uint8Array;
84
84
  pathParams?: PathParametersEntry[];
85
85
  queryParams?: QueryParametersEntry[];
@@ -88,15 +88,15 @@ interface RawHttpRequest {
88
88
  rawPath?: string;
89
89
  rawQuery?: string;
90
90
  }
91
- interface PathParametersEntry {
91
+ export interface PathParametersEntry {
92
92
  key?: string;
93
93
  value?: string;
94
94
  }
95
- interface QueryParametersEntry {
95
+ export interface QueryParametersEntry {
96
96
  key?: string;
97
97
  value?: string;
98
98
  }
99
- interface DeviceCodeRequest {
99
+ export interface DeviceCodeRequest {
100
100
  /** The ID of the application that asks for authorization. */
101
101
  clientId?: string;
102
102
  /**
@@ -105,7 +105,7 @@ interface DeviceCodeRequest {
105
105
  */
106
106
  scope?: string | null;
107
107
  }
108
- interface DeviceCodeResponse {
108
+ export interface DeviceCodeResponse {
109
109
  /** 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. */
110
110
  deviceCode?: string;
111
111
  /** contains the code that should be input at the verification_uri to authorize the device. */
@@ -117,13 +117,13 @@ interface DeviceCodeResponse {
117
117
  /** 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 */
118
118
  interval?: number | null;
119
119
  }
120
- interface DeviceVerifyRequest {
120
+ export interface DeviceVerifyRequest {
121
121
  /** User code representing a currently authorizing device. */
122
122
  userCode?: string;
123
123
  }
124
- interface DeviceVerifyResponse {
124
+ export interface DeviceVerifyResponse {
125
125
  }
126
- interface DeviceVerifyV2Request {
126
+ export interface DeviceVerifyV2Request {
127
127
  /**
128
128
  * User code representing a currently authorizing device.
129
129
  * @minLength 8
@@ -131,21 +131,21 @@ interface DeviceVerifyV2Request {
131
131
  */
132
132
  userCode?: string;
133
133
  }
134
- interface DeviceVerifyV2Response {
134
+ export interface DeviceVerifyV2Response {
135
135
  }
136
- interface InvalidateUserCodeRequest {
136
+ export interface InvalidateUserCodeRequest {
137
137
  /** user code to invalidate. Only the authorizing identity is able to invalidate it. */
138
138
  userCode?: string;
139
139
  }
140
- interface InvalidateUserCodeResponse {
140
+ export interface InvalidateUserCodeResponse {
141
141
  }
142
- interface RevokeRefreshTokenRequest {
142
+ export interface RevokeRefreshTokenRequest {
143
143
  /** The refresh token itself. Anyone with the token itself is able to revoke it. */
144
144
  token?: string;
145
145
  }
146
- interface RevokeRefreshTokenResponse {
146
+ export interface RevokeRefreshTokenResponse {
147
147
  }
148
- interface TokenInfoResponse {
148
+ export interface TokenInfoResponse {
149
149
  active?: boolean;
150
150
  /** subject type. */
151
151
  subjectType?: SubjectType;
@@ -169,7 +169,7 @@ interface TokenInfoResponse {
169
169
  */
170
170
  vendorProductId?: string | null;
171
171
  }
172
- declare enum SubjectType {
172
+ export declare enum SubjectType {
173
173
  /** unknown subject type */
174
174
  UNKNOWN = "UNKNOWN",
175
175
  /** user subject type */
@@ -181,9 +181,9 @@ declare enum SubjectType {
181
181
  /** app subject type */
182
182
  APP = "APP"
183
183
  }
184
- interface Empty {
184
+ export interface Empty {
185
185
  }
186
- interface DomainEvent extends DomainEventBodyOneOf {
186
+ export interface DomainEvent extends DomainEventBodyOneOf {
187
187
  createdEvent?: EntityCreatedEvent;
188
188
  updatedEvent?: EntityUpdatedEvent;
189
189
  deletedEvent?: EntityDeletedEvent;
@@ -192,7 +192,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
192
192
  * Unique event ID.
193
193
  * Allows clients to ignore duplicate webhooks.
194
194
  */
195
- _id?: string;
195
+ id?: string;
196
196
  /**
197
197
  * Assumes actions are also always typed to an entity_type
198
198
  * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
@@ -226,50 +226,32 @@ interface DomainEvent extends DomainEventBodyOneOf {
226
226
  entityEventSequence?: string | null;
227
227
  }
228
228
  /** @oneof */
229
- interface DomainEventBodyOneOf {
229
+ export interface DomainEventBodyOneOf {
230
230
  createdEvent?: EntityCreatedEvent;
231
231
  updatedEvent?: EntityUpdatedEvent;
232
232
  deletedEvent?: EntityDeletedEvent;
233
233
  actionEvent?: ActionEvent;
234
234
  }
235
- interface EntityCreatedEvent {
236
- entity?: string;
235
+ export interface EntityCreatedEvent {
236
+ entityAsJson?: string;
237
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
238
+ restoreInfo?: RestoreInfo;
237
239
  }
238
- interface RestoreInfo {
240
+ export interface RestoreInfo {
239
241
  deletedDate?: Date | null;
240
242
  }
241
- interface EntityUpdatedEvent {
243
+ export interface EntityUpdatedEvent {
242
244
  /**
243
245
  * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
244
246
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
245
247
  * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
246
248
  */
247
- currentEntity?: string;
249
+ currentEntityAsJson?: string;
248
250
  }
249
- interface EntityDeletedEvent {
251
+ export interface EntityDeletedEvent {
250
252
  /** Entity that was deleted */
251
- deletedEntity?: string | null;
253
+ deletedEntityAsJson?: string | null;
252
254
  }
253
- interface ActionEvent {
254
- body?: string;
255
+ export interface ActionEvent {
256
+ bodyAsJson?: string;
255
257
  }
256
- interface TokenOptions {
257
- body?: Uint8Array;
258
- pathParams?: PathParametersEntry[];
259
- queryParams?: QueryParametersEntry[];
260
- headers?: HeadersEntry[];
261
- method?: string;
262
- rawPath?: string;
263
- rawQuery?: string;
264
- }
265
- interface TokenInfoOptions {
266
- body?: Uint8Array;
267
- pathParams?: PathParametersEntry[];
268
- queryParams?: QueryParametersEntry[];
269
- headers?: HeadersEntry[];
270
- method?: string;
271
- rawPath?: string;
272
- rawQuery?: string;
273
- }
274
-
275
- export { type AuthorizeRequest as A, type DeviceCodeRequest as D, type Empty as E, type HeadersEntry as H, type InvalidateUserCodeRequest as I, type PathParametersEntry as P, type QueryParametersEntry as Q, type RawHttpResponse as R, SubjectType as S, type TokenOptions as T, type TokenInfoOptions as a, type TokenInfoResponse as b, type RefreshToken as c, type RawHttpRequest as d, type DeviceCodeResponse as e, type DeviceVerifyRequest as f, type DeviceVerifyResponse as g, type DeviceVerifyV2Request as h, type DeviceVerifyV2Response as i, type InvalidateUserCodeResponse as j, type RevokeRefreshTokenRequest as k, type RevokeRefreshTokenResponse as l, type DomainEvent as m, type DomainEventBodyOneOf as n, type EntityCreatedEvent as o, type RestoreInfo as p, type EntityUpdatedEvent as q, type EntityDeletedEvent as r, type ActionEvent as s };
@@ -0,0 +1,14 @@
1
+ export var SubjectType;
2
+ (function (SubjectType) {
3
+ /** unknown subject type */
4
+ SubjectType["UNKNOWN"] = "UNKNOWN";
5
+ /** user subject type */
6
+ SubjectType["USER"] = "USER";
7
+ /** visitor subject type */
8
+ SubjectType["VISITOR"] = "VISITOR";
9
+ /** member subject type */
10
+ SubjectType["MEMBER"] = "MEMBER";
11
+ /** app subject type */
12
+ SubjectType["APP"] = "APP";
13
+ })(SubjectType || (SubjectType = {}));
14
+ //# sourceMappingURL=identity-oauth-v1-refresh-token-oauth.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-oauth-v1-refresh-token-oauth.types.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token-oauth.types.ts"],"names":[],"mappings":"AAyLA,MAAM,CAAN,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,2BAA2B;IAC3B,kCAAmB,CAAA;IACnB,wBAAwB;IACxB,4BAAa,CAAA;IACb,2BAA2B;IAC3B,kCAAmB,CAAA;IACnB,0BAA0B;IAC1B,gCAAiB,CAAA;IACjB,uBAAuB;IACvB,0BAAW,CAAA;AACb,CAAC,EAXW,WAAW,KAAX,WAAW,QAWtB"}
@@ -0,0 +1,300 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface RefreshToken {
3
+ token?: string;
4
+ }
5
+ /**
6
+ * AuthorizeRequest is sent by the client to the authorization server to initiate
7
+ * the authorization process.
8
+ */
9
+ export interface AuthorizeRequest {
10
+ /**
11
+ * ID of the Wix OAuth app requesting authorization.
12
+ * @format GUID
13
+ */
14
+ clientId?: string;
15
+ /**
16
+ * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
17
+ *
18
+ * Supported values:
19
+ * + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
20
+ * @minLength 1
21
+ */
22
+ responseType?: string;
23
+ /**
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
+ * @minLength 1
26
+ */
27
+ redirectUri?: string | null;
28
+ /**
29
+ * Desired scope of access. If this field is left empty, only an access token is granted.
30
+ * To received a refresh token, pass `offline_access` as the value of this field.
31
+ */
32
+ scope?: string | null;
33
+ /**
34
+ * A value used to confirm the state of an application before and after it makes an authorization
35
+ * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
36
+ * is redirected there.
37
+ * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
38
+ * @minLength 1
39
+ */
40
+ state?: string;
41
+ /**
42
+ * esired response format.
43
+ *
44
+ * Supported values:
45
+ * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
46
+ * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
47
+ * + `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).
48
+ *
49
+ * Default value: `query`
50
+ */
51
+ responseMode?: string | null;
52
+ /**
53
+ * Code challenge to use for PKCE verification.
54
+ * This field is only used if `responseType` is set to `code`.
55
+ */
56
+ codeChallenge?: string | null;
57
+ /**
58
+ * Code challenge method to use for PKCE verification.
59
+ * This field is only used if `responseType` is set to `code`.
60
+ *
61
+ * Supported values:
62
+ * + `S256`: The code challenge is transformed using SHA-256 encyption.
63
+ * + `S512`: The code challenge is transformed using SHA-512 encyption.
64
+ */
65
+ codeChallengeMethod?: string | null;
66
+ /** Session token of the site visitor to authorize. */
67
+ sessionToken?: string | null;
68
+ /**
69
+ * URL to redirect user to sign in
70
+ * @format SECURE_WEB_URL
71
+ */
72
+ signInUrl?: string | null;
73
+ }
74
+ export interface RawHttpResponse {
75
+ body?: Uint8Array;
76
+ statusCode?: number | null;
77
+ headers?: HeadersEntry[];
78
+ }
79
+ export interface HeadersEntry {
80
+ key?: string;
81
+ value?: string;
82
+ }
83
+ export interface RawHttpRequest {
84
+ body?: Uint8Array;
85
+ pathParams?: PathParametersEntry[];
86
+ queryParams?: QueryParametersEntry[];
87
+ headers?: HeadersEntry[];
88
+ method?: string;
89
+ rawPath?: string;
90
+ rawQuery?: string;
91
+ }
92
+ export interface PathParametersEntry {
93
+ key?: string;
94
+ value?: string;
95
+ }
96
+ export interface QueryParametersEntry {
97
+ key?: string;
98
+ value?: string;
99
+ }
100
+ export interface DeviceCodeRequest {
101
+ /** The ID of the application that asks for authorization. */
102
+ clientId?: string;
103
+ /**
104
+ * scope is a space-delimited string that specifies the requested scope of the
105
+ * access request.
106
+ */
107
+ scope?: string | null;
108
+ }
109
+ export interface DeviceCodeResponse {
110
+ /** 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. */
111
+ deviceCode?: string;
112
+ /** contains the code that should be input at the verification_uri to authorize the device. */
113
+ userCode?: string;
114
+ /** contains the URL the user should visit to authorize the device. */
115
+ verificationUri?: string;
116
+ /** indicates the lifetime (in seconds) of the device_code and user_code. */
117
+ expiresIn?: number;
118
+ /** 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 */
119
+ interval?: number | null;
120
+ }
121
+ export interface DeviceVerifyRequest {
122
+ /** User code representing a currently authorizing device. */
123
+ userCode?: string;
124
+ }
125
+ export interface DeviceVerifyResponse {
126
+ }
127
+ export interface DeviceVerifyV2Request {
128
+ /**
129
+ * User code representing a currently authorizing device.
130
+ * @minLength 8
131
+ * @maxLength 8
132
+ */
133
+ userCode?: string;
134
+ }
135
+ export interface DeviceVerifyV2Response {
136
+ }
137
+ export interface InvalidateUserCodeRequest {
138
+ /** user code to invalidate. Only the authorizing identity is able to invalidate it. */
139
+ userCode?: string;
140
+ }
141
+ export interface InvalidateUserCodeResponse {
142
+ }
143
+ export interface RevokeRefreshTokenRequest {
144
+ /** The refresh token itself. Anyone with the token itself is able to revoke it. */
145
+ token?: string;
146
+ }
147
+ export interface RevokeRefreshTokenResponse {
148
+ }
149
+ export interface TokenInfoResponse {
150
+ active?: boolean;
151
+ /** subject type. */
152
+ subjectType?: SubjectType;
153
+ /** subject id */
154
+ subjectId?: string;
155
+ /** Expiration time of the token */
156
+ exp?: string | null;
157
+ /** Issued time of the token */
158
+ iat?: string | null;
159
+ /** Client id */
160
+ clientId?: string;
161
+ /** Account id */
162
+ accountId?: string | null;
163
+ /** Site id */
164
+ siteId?: string | null;
165
+ /** Instance Id */
166
+ instanceId?: string | null;
167
+ /**
168
+ * Vendor Product Id
169
+ * @maxLength 100
170
+ */
171
+ vendorProductId?: string | null;
172
+ }
173
+ export declare enum SubjectType {
174
+ /** unknown subject type */
175
+ UNKNOWN = "UNKNOWN",
176
+ /** user subject type */
177
+ USER = "USER",
178
+ /** visitor subject type */
179
+ VISITOR = "VISITOR",
180
+ /** member subject type */
181
+ MEMBER = "MEMBER",
182
+ /** app subject type */
183
+ APP = "APP"
184
+ }
185
+ export interface Empty {
186
+ }
187
+ export interface DomainEvent extends DomainEventBodyOneOf {
188
+ createdEvent?: EntityCreatedEvent;
189
+ updatedEvent?: EntityUpdatedEvent;
190
+ deletedEvent?: EntityDeletedEvent;
191
+ actionEvent?: ActionEvent;
192
+ /**
193
+ * Unique event ID.
194
+ * Allows clients to ignore duplicate webhooks.
195
+ */
196
+ _id?: string;
197
+ /**
198
+ * Assumes actions are also always typed to an entity_type
199
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
200
+ */
201
+ entityFqdn?: string;
202
+ /**
203
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
204
+ * This is although the created/updated/deleted notion is duplication of the oneof types
205
+ * Example: created/updated/deleted/started/completed/email_opened
206
+ */
207
+ slug?: string;
208
+ /** ID of the entity associated with the event. */
209
+ entityId?: string;
210
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
211
+ eventTime?: Date | null;
212
+ /**
213
+ * Whether the event was triggered as a result of a privacy regulation application
214
+ * (for example, GDPR).
215
+ */
216
+ triggeredByAnonymizeRequest?: boolean | null;
217
+ /** If present, indicates the action that triggered the event. */
218
+ originatedFrom?: string | null;
219
+ /**
220
+ * A sequence number defining the order of updates to the underlying entity.
221
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
222
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
223
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
224
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
225
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
226
+ */
227
+ entityEventSequence?: string | null;
228
+ }
229
+ /** @oneof */
230
+ export interface DomainEventBodyOneOf {
231
+ createdEvent?: EntityCreatedEvent;
232
+ updatedEvent?: EntityUpdatedEvent;
233
+ deletedEvent?: EntityDeletedEvent;
234
+ actionEvent?: ActionEvent;
235
+ }
236
+ export interface EntityCreatedEvent {
237
+ entity?: string;
238
+ }
239
+ export interface RestoreInfo {
240
+ deletedDate?: Date | null;
241
+ }
242
+ export interface EntityUpdatedEvent {
243
+ /**
244
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
245
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
246
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
247
+ */
248
+ currentEntity?: string;
249
+ }
250
+ export interface EntityDeletedEvent {
251
+ /** Entity that was deleted */
252
+ deletedEntity?: string | null;
253
+ }
254
+ export interface ActionEvent {
255
+ body?: string;
256
+ }
257
+ /**
258
+ * Creates an access token.
259
+ *
260
+ *
261
+ * The endpoint accepts raw HTTP requests. You must pass the request's body
262
+ * parameters formatted as bytes in the raw HTTP request's `body` field,
263
+ * following this template:
264
+ * `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
265
+ *
266
+ * When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
267
+ * token in the `body` field of the raw HTTP response.
268
+ *
269
+ * In case the call fails, Wix returns the relevant `4XX` error code in the raw
270
+ * HTTP response's `statusCode` field and details
271
+ * about the error in `body`. Error details follow the
272
+ * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
273
+ * @public
274
+ * @fqn wix.identity.oauth2.v1.Oauth2Ng.Token
275
+ */
276
+ export declare function token(options?: TokenOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
277
+ export interface TokenOptions {
278
+ body?: Uint8Array;
279
+ pathParams?: PathParametersEntry[];
280
+ queryParams?: QueryParametersEntry[];
281
+ headers?: HeadersEntry[];
282
+ method?: string;
283
+ rawPath?: string;
284
+ rawQuery?: string;
285
+ }
286
+ /**
287
+ * Token Introspection Endpoint.
288
+ * @public
289
+ * @fqn wix.identity.oauth2.v1.Oauth2Ng.TokenInfo
290
+ */
291
+ export declare function tokenInfo(options?: TokenInfoOptions): Promise<NonNullablePaths<TokenInfoResponse, `active` | `subjectType` | `subjectId` | `clientId`>>;
292
+ export interface TokenInfoOptions {
293
+ body?: Uint8Array;
294
+ pathParams?: PathParametersEntry[];
295
+ queryParams?: QueryParametersEntry[];
296
+ headers?: HeadersEntry[];
297
+ method?: string;
298
+ rawPath?: string;
299
+ rawQuery?: string;
300
+ }