@wix/auto_sdk_identity_oauth 1.0.3 → 1.0.4

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/src/identity-oauth-v1-refresh-token-oauth.types.d.ts → identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.mts} +52 -34
  2. package/build/{internal/cjs/src/identity-oauth-v1-refresh-token-oauth.types.d.ts → identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.ts} +52 -34
  3. package/build/index.d.mts +37 -0
  4. package/build/index.d.ts +37 -0
  5. package/build/index.js +259 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +233 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/internal/{es/src/identity-oauth-v1-refresh-token-oauth.types.d.ts → identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.mts} +52 -34
  10. package/build/{es/src/identity-oauth-v1-refresh-token-oauth.types.d.ts → internal/identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.ts} +52 -34
  11. package/build/internal/index.d.mts +37 -0
  12. package/build/internal/index.d.ts +37 -0
  13. package/build/internal/index.js +259 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +233 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +79 -0
  18. package/build/internal/meta.d.ts +79 -0
  19. package/build/internal/meta.js +182 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +154 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +79 -0
  24. package/build/meta.d.ts +79 -0
  25. package/build/meta.js +182 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +154 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +0 -6
  40. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js +0 -10
  41. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js.map +0 -1
  42. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +0 -21
  43. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js +0 -134
  44. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js.map +0 -1
  45. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +0 -14
  46. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js +0 -66
  47. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +0 -1
  48. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +0 -34
  49. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js +0 -20
  50. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js.map +0 -1
  51. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js +0 -17
  52. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js.map +0 -1
  53. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +0 -300
  54. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js +0 -143
  55. package/build/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +0 -6
  67. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.js +0 -6
  68. package/build/es/src/identity-oauth-v1-refresh-token-oauth.context.js.map +0 -1
  69. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +0 -21
  70. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.js +0 -129
  71. package/build/es/src/identity-oauth-v1-refresh-token-oauth.http.js.map +0 -1
  72. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +0 -14
  73. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.js +0 -38
  74. package/build/es/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +0 -1
  75. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +0 -34
  76. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.js +0 -14
  77. package/build/es/src/identity-oauth-v1-refresh-token-oauth.public.js.map +0 -1
  78. package/build/es/src/identity-oauth-v1-refresh-token-oauth.types.js +0 -14
  79. package/build/es/src/identity-oauth-v1-refresh-token-oauth.types.js.map +0 -1
  80. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +0 -300
  81. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.js +0 -115
  82. package/build/es/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +0 -6
  93. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js +0 -10
  94. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.context.js.map +0 -1
  95. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +0 -21
  96. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js +0 -134
  97. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.http.js.map +0 -1
  98. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +0 -14
  99. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js +0 -66
  100. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +0 -1
  101. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +0 -34
  102. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js +0 -20
  103. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.public.js.map +0 -1
  104. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js +0 -17
  105. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.types.js.map +0 -1
  106. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +0 -300
  107. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js +0 -143
  108. package/build/internal/cjs/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.d.ts +0 -6
  119. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.js +0 -6
  120. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.context.js.map +0 -1
  121. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.d.ts +0 -21
  122. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.js +0 -129
  123. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.http.js.map +0 -1
  124. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.d.ts +0 -14
  125. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.js +0 -38
  126. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.meta.js.map +0 -1
  127. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.d.ts +0 -34
  128. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.js +0 -14
  129. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.public.js.map +0 -1
  130. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.types.js +0 -14
  131. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.types.js.map +0 -1
  132. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts +0 -300
  133. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.js +0 -115
  134. package/build/internal/es/src/identity-oauth-v1-refresh-token-oauth.universal.js.map +0 -1
@@ -1,300 +0,0 @@
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
- }
@@ -1,115 +0,0 @@
1
- import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
- import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
- import * as ambassadorWixIdentityOauthV1RefreshToken from './identity-oauth-v1-refresh-token-oauth.http.js';
4
- export var SubjectType;
5
- (function (SubjectType) {
6
- /** unknown subject type */
7
- SubjectType["UNKNOWN"] = "UNKNOWN";
8
- /** user subject type */
9
- SubjectType["USER"] = "USER";
10
- /** visitor subject type */
11
- SubjectType["VISITOR"] = "VISITOR";
12
- /** member subject type */
13
- SubjectType["MEMBER"] = "MEMBER";
14
- /** app subject type */
15
- SubjectType["APP"] = "APP";
16
- })(SubjectType || (SubjectType = {}));
17
- /**
18
- * Creates an access token.
19
- *
20
- *
21
- * The endpoint accepts raw HTTP requests. You must pass the request's body
22
- * parameters formatted as bytes in the raw HTTP request's `body` field,
23
- * following this template:
24
- * `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
25
- *
26
- * When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
27
- * token in the `body` field of the raw HTTP response.
28
- *
29
- * In case the call fails, Wix returns the relevant `4XX` error code in the raw
30
- * HTTP response's `statusCode` field and details
31
- * about the error in `body`. Error details follow the
32
- * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
33
- * @public
34
- * @fqn wix.identity.oauth2.v1.Oauth2Ng.Token
35
- */
36
- export async function token(options) {
37
- // @ts-ignore
38
- const { httpClient, sideEffects } = arguments[1];
39
- const payload = renameKeysFromSDKRequestToRESTRequest({
40
- body: options?.body,
41
- pathParams: options?.pathParams,
42
- queryParams: options?.queryParams,
43
- headers: options?.headers,
44
- method: options?.method,
45
- rawPath: options?.rawPath,
46
- rawQuery: options?.rawQuery,
47
- });
48
- const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.token(payload);
49
- sideEffects?.onSiteCall?.();
50
- try {
51
- const result = await httpClient.request(reqOpts);
52
- sideEffects?.onSuccess?.(result);
53
- return renameKeysFromRESTResponseToSDKResponse(result.data);
54
- }
55
- catch (err) {
56
- const transformedError = sdkTransformError(err, {
57
- spreadPathsToArguments: {},
58
- explicitPathsToArguments: {
59
- body: '$[0].body',
60
- pathParams: '$[0].pathParams',
61
- queryParams: '$[0].queryParams',
62
- headers: '$[0].headers',
63
- method: '$[0].method',
64
- rawPath: '$[0].rawPath',
65
- rawQuery: '$[0].rawQuery',
66
- },
67
- singleArgumentUnchanged: false,
68
- }, ['options']);
69
- sideEffects?.onError?.(err);
70
- throw transformedError;
71
- }
72
- }
73
- /**
74
- * Token Introspection Endpoint.
75
- * @public
76
- * @fqn wix.identity.oauth2.v1.Oauth2Ng.TokenInfo
77
- */
78
- export async function tokenInfo(options) {
79
- // @ts-ignore
80
- const { httpClient, sideEffects } = arguments[1];
81
- const payload = renameKeysFromSDKRequestToRESTRequest({
82
- body: options?.body,
83
- pathParams: options?.pathParams,
84
- queryParams: options?.queryParams,
85
- headers: options?.headers,
86
- method: options?.method,
87
- rawPath: options?.rawPath,
88
- rawQuery: options?.rawQuery,
89
- });
90
- const reqOpts = ambassadorWixIdentityOauthV1RefreshToken.tokenInfo(payload);
91
- sideEffects?.onSiteCall?.();
92
- try {
93
- const result = await httpClient.request(reqOpts);
94
- sideEffects?.onSuccess?.(result);
95
- return renameKeysFromRESTResponseToSDKResponse(result.data);
96
- }
97
- catch (err) {
98
- const transformedError = sdkTransformError(err, {
99
- spreadPathsToArguments: {},
100
- explicitPathsToArguments: {
101
- body: '$[0].body',
102
- pathParams: '$[0].pathParams',
103
- queryParams: '$[0].queryParams',
104
- headers: '$[0].headers',
105
- method: '$[0].method',
106
- rawPath: '$[0].rawPath',
107
- rawQuery: '$[0].rawQuery',
108
- },
109
- singleArgumentUnchanged: false,
110
- }, ['options']);
111
- sideEffects?.onError?.(err);
112
- throw transformedError;
113
- }
114
- }
115
- //# sourceMappingURL=identity-oauth-v1-refresh-token-oauth.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identity-oauth-v1-refresh-token-oauth.universal.js","sourceRoot":"","sources":["../../../src/identity-oauth-v1-refresh-token-oauth.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,wCAAwC,MAAM,iDAAiD,CAAC;AA2L5G,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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AE,KAAK;SAC/B,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC"}
@@ -1 +0,0 @@
1
- export * from './src/identity-oauth-v1-refresh-token-oauth.context.js';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/identity-oauth-v1-refresh-token-oauth.context.js"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yFAAuE"}
@@ -1 +0,0 @@
1
- export * from './src/identity-oauth-v1-refresh-token-oauth.universal.js';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/identity-oauth-v1-refresh-token-oauth.universal.js"), exports);
18
- //# sourceMappingURL=index.typings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2FAAyE"}
@@ -1 +0,0 @@
1
- export * from './src/identity-oauth-v1-refresh-token-oauth.meta.js';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/identity-oauth-v1-refresh-token-oauth.meta.js"), exports);
18
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sFAAoE"}
@@ -1,6 +0,0 @@
1
- import { token as publicToken, tokenInfo as publicTokenInfo } from './identity-oauth-v1-refresh-token-oauth.public.js';
2
- import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
3
- export declare const token: MaybeContext<BuildRESTFunction<typeof publicToken> & typeof publicToken>;
4
- export declare const tokenInfo: MaybeContext<BuildRESTFunction<typeof publicTokenInfo> & typeof publicTokenInfo>;
5
- export { SubjectType } from './identity-oauth-v1-refresh-token-oauth.universal.js';
6
- export { RefreshToken, AuthorizeRequest, RawHttpResponse, HeadersEntry, RawHttpRequest, PathParametersEntry, QueryParametersEntry, DeviceCodeRequest, DeviceCodeResponse, DeviceVerifyRequest, DeviceVerifyResponse, DeviceVerifyV2Request, DeviceVerifyV2Response, InvalidateUserCodeRequest, InvalidateUserCodeResponse, RevokeRefreshTokenRequest, RevokeRefreshTokenResponse, TokenInfoResponse, Empty, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, RestoreInfo, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, TokenOptions, TokenInfoOptions, } from './identity-oauth-v1-refresh-token-oauth.universal.js';
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubjectType = exports.tokenInfo = exports.token = void 0;
4
- const identity_oauth_v1_refresh_token_oauth_public_js_1 = require("./identity-oauth-v1-refresh-token-oauth.public.js");
5
- const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
6
- exports.token = (0, rest_modules_1.createRESTModule)(identity_oauth_v1_refresh_token_oauth_public_js_1.token);
7
- exports.tokenInfo = (0, rest_modules_1.createRESTModule)(identity_oauth_v1_refresh_token_oauth_public_js_1.tokenInfo);
8
- var identity_oauth_v1_refresh_token_oauth_universal_js_1 = require("./identity-oauth-v1-refresh-token-oauth.universal.js");
9
- Object.defineProperty(exports, "SubjectType", { enumerable: true, get: function () { return identity_oauth_v1_refresh_token_oauth_universal_js_1.SubjectType; } });
10
- //# sourceMappingURL=identity-oauth-v1-refresh-token-oauth.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identity-oauth-v1-refresh-token-oauth.context.js","sourceRoot":"","sources":["../../../../src/identity-oauth-v1-refresh-token-oauth.context.ts"],"names":[],"mappings":";;;AAAA,uHAG2D;AAC3D,gEAAiE;AAGpD,QAAA,KAAK,GAEA,IAAA,+BAAgB,EAAC,uDAAW,CAAC,CAAC;AACnC,QAAA,SAAS,GAEJ,IAAA,+BAAgB,EAAC,2DAAe,CAAC,CAAC;AAEpD,2HAAmF;AAA1E,iJAAA,WAAW,OAAA"}
@@ -1,21 +0,0 @@
1
- import { RequestOptionsFactory } from '@wix/sdk-types';
2
- /**
3
- * Creates an access token.
4
- *
5
- *
6
- * The endpoint accepts raw HTTP requests. You must pass the request's body
7
- * parameters formatted as bytes in the raw HTTP request's `body` field,
8
- * following this template:
9
- * `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
10
- *
11
- * When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
12
- * token in the `body` field of the raw HTTP response.
13
- *
14
- * In case the call fails, Wix returns the relevant `4XX` error code in the raw
15
- * HTTP response's `statusCode` field and details
16
- * about the error in `body`. Error details follow the
17
- * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
18
- */
19
- export declare function token(payload: object): RequestOptionsFactory<any>;
20
- /** Token Introspection Endpoint. */
21
- export declare function tokenInfo(payload: object): RequestOptionsFactory<any>;