@wix/auto_sdk_identity_oauth 1.0.6 → 1.0.8

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/cjs/src/identity-oauth-v1-refresh-token-oauth.types.d.ts +249 -0
  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/{identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.mts → cjs/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts} +65 -48
  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/es/src/identity-oauth-v1-refresh-token-oauth.types.d.ts +249 -0
  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/{identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.ts → es/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts} +65 -48
  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/cjs/src/identity-oauth-v1-refresh-token-oauth.types.d.ts +249 -0
  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/{identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.mts → cjs/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts} +65 -48
  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/es/src/identity-oauth-v1-refresh-token-oauth.types.d.ts +249 -0
  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/{identity-oauth-v1-refresh-token-oauth.universal-BzqSyI-5.d.ts → es/src/identity-oauth-v1-refresh-token-oauth.universal.d.ts} +65 -48
  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 +13 -14
  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
@@ -1,11 +1,12 @@
1
- interface RefreshToken {
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface RefreshToken {
2
3
  token?: string;
3
4
  }
4
5
  /**
5
6
  * AuthorizeRequest is sent by the client to the authorization server to initiate
6
7
  * the authorization process.
7
8
  */
8
- interface AuthorizeRequest {
9
+ export interface AuthorizeRequest {
9
10
  /**
10
11
  * ID of the Wix OAuth app requesting authorization.
11
12
  * @format GUID
@@ -70,16 +71,16 @@ interface AuthorizeRequest {
70
71
  */
71
72
  signInUrl?: string | null;
72
73
  }
73
- interface RawHttpResponse {
74
+ export interface RawHttpResponse {
74
75
  body?: Uint8Array;
75
76
  statusCode?: number | null;
76
77
  headers?: HeadersEntry[];
77
78
  }
78
- interface HeadersEntry {
79
+ export interface HeadersEntry {
79
80
  key?: string;
80
81
  value?: string;
81
82
  }
82
- interface RawHttpRequest {
83
+ export interface RawHttpRequest {
83
84
  body?: Uint8Array;
84
85
  pathParams?: PathParametersEntry[];
85
86
  queryParams?: QueryParametersEntry[];
@@ -88,15 +89,15 @@ interface RawHttpRequest {
88
89
  rawPath?: string;
89
90
  rawQuery?: string;
90
91
  }
91
- interface PathParametersEntry {
92
+ export interface PathParametersEntry {
92
93
  key?: string;
93
94
  value?: string;
94
95
  }
95
- interface QueryParametersEntry {
96
+ export interface QueryParametersEntry {
96
97
  key?: string;
97
98
  value?: string;
98
99
  }
99
- interface DeviceCodeRequest {
100
+ export interface DeviceCodeRequest {
100
101
  /** The ID of the application that asks for authorization. */
101
102
  clientId?: string;
102
103
  /**
@@ -105,7 +106,7 @@ interface DeviceCodeRequest {
105
106
  */
106
107
  scope?: string | null;
107
108
  }
108
- interface DeviceCodeResponse {
109
+ export interface DeviceCodeResponse {
109
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. */
110
111
  deviceCode?: string;
111
112
  /** contains the code that should be input at the verification_uri to authorize the device. */
@@ -117,13 +118,13 @@ interface DeviceCodeResponse {
117
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 */
118
119
  interval?: number | null;
119
120
  }
120
- interface DeviceVerifyRequest {
121
+ export interface DeviceVerifyRequest {
121
122
  /** User code representing a currently authorizing device. */
122
123
  userCode?: string;
123
124
  }
124
- interface DeviceVerifyResponse {
125
+ export interface DeviceVerifyResponse {
125
126
  }
126
- interface DeviceVerifyV2Request {
127
+ export interface DeviceVerifyV2Request {
127
128
  /**
128
129
  * User code representing a currently authorizing device.
129
130
  * @minLength 8
@@ -131,21 +132,21 @@ interface DeviceVerifyV2Request {
131
132
  */
132
133
  userCode?: string;
133
134
  }
134
- interface DeviceVerifyV2Response {
135
+ export interface DeviceVerifyV2Response {
135
136
  }
136
- interface InvalidateUserCodeRequest {
137
+ export interface InvalidateUserCodeRequest {
137
138
  /** user code to invalidate. Only the authorizing identity is able to invalidate it. */
138
139
  userCode?: string;
139
140
  }
140
- interface InvalidateUserCodeResponse {
141
+ export interface InvalidateUserCodeResponse {
141
142
  }
142
- interface RevokeRefreshTokenRequest {
143
+ export interface RevokeRefreshTokenRequest {
143
144
  /** The refresh token itself. Anyone with the token itself is able to revoke it. */
144
145
  token?: string;
145
146
  }
146
- interface RevokeRefreshTokenResponse {
147
+ export interface RevokeRefreshTokenResponse {
147
148
  }
148
- interface TokenInfoResponse {
149
+ export interface TokenInfoResponse {
149
150
  active?: boolean;
150
151
  /** subject type. */
151
152
  subjectType?: SubjectType;
@@ -169,7 +170,7 @@ interface TokenInfoResponse {
169
170
  */
170
171
  vendorProductId?: string | null;
171
172
  }
172
- declare enum SubjectType {
173
+ export declare enum SubjectType {
173
174
  /** unknown subject type */
174
175
  UNKNOWN = "UNKNOWN",
175
176
  /** user subject type */
@@ -181,32 +182,28 @@ declare enum SubjectType {
181
182
  /** app subject type */
182
183
  APP = "APP"
183
184
  }
184
- interface Empty {
185
+ export interface Empty {
185
186
  }
186
- interface DomainEvent extends DomainEventBodyOneOf {
187
+ export interface DomainEvent extends DomainEventBodyOneOf {
187
188
  createdEvent?: EntityCreatedEvent;
188
189
  updatedEvent?: EntityUpdatedEvent;
189
190
  deletedEvent?: EntityDeletedEvent;
190
191
  actionEvent?: ActionEvent;
191
- /**
192
- * Unique event ID.
193
- * Allows clients to ignore duplicate webhooks.
194
- */
192
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
195
193
  _id?: string;
196
194
  /**
197
- * Assumes actions are also always typed to an entity_type
198
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
195
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
196
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
199
197
  */
200
198
  entityFqdn?: string;
201
199
  /**
202
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
203
- * This is although the created/updated/deleted notion is duplication of the oneof types
204
- * Example: created/updated/deleted/started/completed/email_opened
200
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
201
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
205
202
  */
206
203
  slug?: string;
207
204
  /** ID of the entity associated with the event. */
208
205
  entityId?: string;
209
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
206
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
210
207
  eventTime?: Date | null;
211
208
  /**
212
209
  * Whether the event was triggered as a result of a privacy regulation application
@@ -216,29 +213,25 @@ interface DomainEvent extends DomainEventBodyOneOf {
216
213
  /** If present, indicates the action that triggered the event. */
217
214
  originatedFrom?: string | null;
218
215
  /**
219
- * A sequence number defining the order of updates to the underlying entity.
220
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
221
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
222
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
223
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
224
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
216
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
217
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
225
218
  */
226
219
  entityEventSequence?: string | null;
227
220
  }
228
221
  /** @oneof */
229
- interface DomainEventBodyOneOf {
222
+ export interface DomainEventBodyOneOf {
230
223
  createdEvent?: EntityCreatedEvent;
231
224
  updatedEvent?: EntityUpdatedEvent;
232
225
  deletedEvent?: EntityDeletedEvent;
233
226
  actionEvent?: ActionEvent;
234
227
  }
235
- interface EntityCreatedEvent {
228
+ export interface EntityCreatedEvent {
236
229
  entity?: string;
237
230
  }
238
- interface RestoreInfo {
231
+ export interface RestoreInfo {
239
232
  deletedDate?: Date | null;
240
233
  }
241
- interface EntityUpdatedEvent {
234
+ export interface EntityUpdatedEvent {
242
235
  /**
243
236
  * 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
237
  * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
@@ -246,14 +239,34 @@ interface EntityUpdatedEvent {
246
239
  */
247
240
  currentEntity?: string;
248
241
  }
249
- interface EntityDeletedEvent {
250
- /** Entity that was deleted */
242
+ export interface EntityDeletedEvent {
243
+ /** Entity that was deleted. */
251
244
  deletedEntity?: string | null;
252
245
  }
253
- interface ActionEvent {
246
+ export interface ActionEvent {
254
247
  body?: string;
255
248
  }
256
- interface TokenOptions {
249
+ /**
250
+ * Creates an access token.
251
+ *
252
+ *
253
+ * The endpoint accepts raw HTTP requests. You must pass the request's body
254
+ * parameters formatted as bytes in the raw HTTP request's `body` field,
255
+ * following this template:
256
+ * `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
257
+ *
258
+ * When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
259
+ * token in the `body` field of the raw HTTP response.
260
+ *
261
+ * In case the call fails, Wix returns the relevant `4XX` error code in the raw
262
+ * HTTP response's `statusCode` field and details
263
+ * about the error in `body`. Error details follow the
264
+ * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
265
+ * @public
266
+ * @fqn wix.identity.oauth2.v1.Oauth2Ng.Token
267
+ */
268
+ export declare function token(options?: TokenOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
269
+ export interface TokenOptions {
257
270
  body?: Uint8Array;
258
271
  pathParams?: PathParametersEntry[];
259
272
  queryParams?: QueryParametersEntry[];
@@ -262,7 +275,13 @@ interface TokenOptions {
262
275
  rawPath?: string;
263
276
  rawQuery?: string;
264
277
  }
265
- interface TokenInfoOptions {
278
+ /**
279
+ * Token Introspection Endpoint.
280
+ * @public
281
+ * @fqn wix.identity.oauth2.v1.Oauth2Ng.TokenInfo
282
+ */
283
+ export declare function tokenInfo(options?: TokenInfoOptions): Promise<NonNullablePaths<TokenInfoResponse, `active` | `subjectType` | `subjectId` | `clientId`>>;
284
+ export interface TokenInfoOptions {
266
285
  body?: Uint8Array;
267
286
  pathParams?: PathParametersEntry[];
268
287
  queryParams?: QueryParametersEntry[];
@@ -271,5 +290,3 @@ interface TokenInfoOptions {
271
290
  rawPath?: string;
272
291
  rawQuery?: string;
273
292
  }
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,115 @@
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
@@ -0,0 +1 @@
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,KAAX,WAAW,QAWtB;AAyED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,OAAsB;IAOtB,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,qCAAqC,CAAC;QACpD,IAAI,EAAE,OAAO,EAAE,IAAI;QACnB,UAAU,EAAE,OAAO,EAAE,UAAU;QAC/B,WAAW,EAAE,OAAO,EAAE,WAAW;QACjC,OAAO,EAAE,OAAO,EAAE,OAAO;QACzB,MAAM,EAAE,OAAO,EAAE,MAAM;QACvB,OAAO,EAAE,OAAO,EAAE,OAAO;QACzB,QAAQ,EAAE,OAAO,EAAE,QAAQ;KAC5B,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,wCAAwC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAExE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;I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O,CAAC,CAAC;IAE5E,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,uCAAuC,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,iBAAiB,CACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE;gBACxB,IAAI,EAAE,WAAW;gBACjB,UAAU,EAAE,iBAAiB;gBAC7B,WAAW,EAAE,kBAAkB;gBAC/B,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,aAAa;gBACrB,OAAO,EAAE,cAAc;gBACvB,QAAQ,EAAE,eAAe;aAC1B;YACD,uBAAuB,EAAE,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"}
@@ -0,0 +1 @@
1
+ export * from './src/identity-oauth-v1-refresh-token-oauth.context.js';
@@ -0,0 +1,18 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yFAAuE"}
@@ -0,0 +1 @@
1
+ export * from './src/identity-oauth-v1-refresh-token-oauth.universal.js';
@@ -0,0 +1,18 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2FAAyE"}
@@ -0,0 +1 @@
1
+ export * from './src/identity-oauth-v1-refresh-token-oauth.meta.js';
@@ -0,0 +1,18 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sFAAoE"}
@@ -0,0 +1,6 @@
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';
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,21 @@
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>;
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tokenInfo = exports.token = void 0;
4
+ const bytes_1 = require("@wix/sdk-runtime/transformations/bytes");
5
+ const bytes_2 = require("@wix/sdk-runtime/transformations/bytes");
6
+ const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
7
+ const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
8
+ function resolveWixIdentityOauth2V1Oauth2NgUrl(opts) {
9
+ const domainToMappings = {
10
+ 'manage._base_domain_': [
11
+ {
12
+ srcPath: '/oauth2',
13
+ destPath: '/v1/oauth',
14
+ },
15
+ ],
16
+ 'www.wixapis.com': [
17
+ {
18
+ srcPath: '/oauth2',
19
+ destPath: '/v1/oauth',
20
+ },
21
+ {
22
+ srcPath: '/oauth2/token_info',
23
+ destPath: '/v1/token_info',
24
+ },
25
+ ],
26
+ 'users._base_domain_': [
27
+ {
28
+ srcPath: '/v1/oauth/device/verify',
29
+ destPath: '/v1/oauth/device/verify',
30
+ },
31
+ {
32
+ srcPath: '/v1/oauth/manage/user-code',
33
+ destPath: '/v1/oauth/manage/user-code',
34
+ },
35
+ {
36
+ srcPath: '/v2/oauth/device/verify',
37
+ destPath: '/v2/oauth/device/verify',
38
+ },
39
+ {
40
+ srcPath: '/v1/oauth/authorize',
41
+ destPath: '/v1/oauth/authorize',
42
+ },
43
+ ],
44
+ _: [
45
+ {
46
+ srcPath: '/_api/oauth2',
47
+ destPath: '/v1/oauth',
48
+ },
49
+ ],
50
+ 'platform.rise.ai': [
51
+ {
52
+ srcPath: '/oauth2',
53
+ destPath: '/v1/oauth',
54
+ },
55
+ ],
56
+ 'api._api_base_domain_': [
57
+ {
58
+ srcPath: '/oauth2-ng',
59
+ destPath: '',
60
+ },
61
+ ],
62
+ };
63
+ return (0, rest_modules_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
64
+ }
65
+ const PACKAGE_NAME = '@wix/auto_sdk_identity_oauth';
66
+ /**
67
+ * Creates an access token.
68
+ *
69
+ *
70
+ * The endpoint accepts raw HTTP requests. You must pass the request's body
71
+ * parameters formatted as bytes in the raw HTTP request's `body` field,
72
+ * following this template:
73
+ * `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
74
+ *
75
+ * When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
76
+ * token in the `body` field of the raw HTTP response.
77
+ *
78
+ * In case the call fails, Wix returns the relevant `4XX` error code in the raw
79
+ * HTTP response's `statusCode` field and details
80
+ * about the error in `body`. Error details follow the
81
+ * [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
82
+ */
83
+ function token(payload) {
84
+ function __token({ host }) {
85
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
86
+ { transformFn: bytes_1.transformSDKBytesToRESTBytes, paths: [{ path: 'body' }] },
87
+ ]);
88
+ const metadata = {
89
+ entityFqdn: 'wix.identity.oauth.v1.refresh_token',
90
+ method: 'POST',
91
+ methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.Token',
92
+ packageName: PACKAGE_NAME,
93
+ url: resolveWixIdentityOauth2V1Oauth2NgUrl({
94
+ protoPath: '/v1/oauth/token',
95
+ data: serializedData,
96
+ host,
97
+ }),
98
+ data: serializedData,
99
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
100
+ {
101
+ transformFn: bytes_2.transformRESTBytesToSDKBytes,
102
+ paths: [{ path: 'body' }],
103
+ },
104
+ ]),
105
+ };
106
+ return metadata;
107
+ }
108
+ return __token;
109
+ }
110
+ exports.token = token;
111
+ /** Token Introspection Endpoint. */
112
+ function tokenInfo(payload) {
113
+ function __tokenInfo({ host }) {
114
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
115
+ { transformFn: bytes_1.transformSDKBytesToRESTBytes, paths: [{ path: 'body' }] },
116
+ ]);
117
+ const metadata = {
118
+ entityFqdn: 'wix.identity.oauth.v1.refresh_token',
119
+ method: 'POST',
120
+ methodFqn: 'wix.identity.oauth2.v1.Oauth2Ng.TokenInfo',
121
+ packageName: PACKAGE_NAME,
122
+ url: resolveWixIdentityOauth2V1Oauth2NgUrl({
123
+ protoPath: '/v1/oauth/token-info',
124
+ data: serializedData,
125
+ host,
126
+ }),
127
+ data: serializedData,
128
+ };
129
+ return metadata;
130
+ }
131
+ return __tokenInfo;
132
+ }
133
+ exports.tokenInfo = tokenInfo;
134
+ //# sourceMappingURL=identity-oauth-v1-refresh-token-oauth.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-oauth-v1-refresh-token-oauth.http.js","sourceRoot":"","sources":["../../../../src/identity-oauth-v1-refresh-token-oauth.http.ts"],"names":[],"mappings":";;;AAAA,kEAAsF;AACtF,kEAAsF;AACtF,sFAAkF;AAClF,gEAA2D;AAI3D,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;YACD;gBACE,OAAO,EAAE,oBAAoB;gBAC7B,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,qBAAqB,EAAE;YACrB;gBACE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