choco-one-click-payment 1.1.47 → 1.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +475 -462
- package/dist/index.js +13 -13
- package/index.d.ts +13 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -142,6 +142,19 @@ export interface ChocoOneClickConfig {
|
|
|
142
142
|
*/
|
|
143
143
|
onFreedomLink?: () => void;
|
|
144
144
|
|
|
145
|
+
/**
|
|
146
|
+
* Callback вызываемый когда оба механизма авторизации исчерпаны:
|
|
147
|
+
* refresh_token недействителен и trackId устарел.
|
|
148
|
+
* Хост-приложение должно вернуть Promise со свежим trackId.
|
|
149
|
+
* Если не передан — виджет выбросит ошибку авторизации.
|
|
150
|
+
* @example
|
|
151
|
+
* onRequestNewTrackId: async () => {
|
|
152
|
+
* const { trackId } = await AuthService.generateTrackId();
|
|
153
|
+
* return trackId;
|
|
154
|
+
* }
|
|
155
|
+
*/
|
|
156
|
+
onRequestNewTrackId?: () => Promise<string>;
|
|
157
|
+
|
|
145
158
|
/**
|
|
146
159
|
* Async callback вызываемый перед отправкой платежа (внутри session.onpaymentauthorized для Apple Pay).
|
|
147
160
|
* Позволяет создать заказ в момент подтверждения оплаты и вернуть обновлённые поля конфига (например, preorderId).
|