@alien_org/contract 0.2.0 → 0.2.2
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.d.cts +18 -5
- package/dist/index.d.mts +18 -5
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -197,6 +197,16 @@ declare const PLATFORMS: readonly ["ios", "android"];
|
|
|
197
197
|
* Platform the miniapp is running on.
|
|
198
198
|
*/
|
|
199
199
|
type Platform = (typeof PLATFORMS)[number];
|
|
200
|
+
/**
|
|
201
|
+
* Safe area insets in CSS pixels, injected by the host app.
|
|
202
|
+
* Accounts for system UI (status bar, notch, home indicator, nav bar).
|
|
203
|
+
*/
|
|
204
|
+
interface SafeAreaInsets {
|
|
205
|
+
top: number;
|
|
206
|
+
right: number;
|
|
207
|
+
bottom: number;
|
|
208
|
+
left: number;
|
|
209
|
+
}
|
|
200
210
|
/**
|
|
201
211
|
* Launch parameters injected by the host app.
|
|
202
212
|
*/
|
|
@@ -209,6 +219,8 @@ interface LaunchParams {
|
|
|
209
219
|
hostAppVersion: string | undefined;
|
|
210
220
|
/** Platform the miniapp is running on */
|
|
211
221
|
platform: Platform | undefined;
|
|
222
|
+
/** Safe area insets for the webview in CSS pixels */
|
|
223
|
+
safeAreaInsets: SafeAreaInsets | undefined;
|
|
212
224
|
/**
|
|
213
225
|
* Custom start parameter injected by host app.
|
|
214
226
|
* Used for referral codes, campaign tracking, or custom routing.
|
|
@@ -269,8 +281,9 @@ interface Methods {
|
|
|
269
281
|
* Optional display fields (`title`, `caption`, `iconUrl`, `quantity`)
|
|
270
282
|
* are shown on the payment approval screen.
|
|
271
283
|
*
|
|
272
|
-
* Set `test
|
|
273
|
-
*
|
|
284
|
+
* Set `test` to a scenario string (e.g. `'paid'`, `'error:insufficient_balance'`)
|
|
285
|
+
* for test mode - no real payment is made, but the specified scenario is
|
|
286
|
+
* simulated. Use for development and testing.
|
|
274
287
|
*
|
|
275
288
|
* @since 0.1.1
|
|
276
289
|
* @schema
|
|
@@ -336,7 +349,7 @@ interface Methods {
|
|
|
336
349
|
*
|
|
337
350
|
* | Scenario | Client | Webhook |
|
|
338
351
|
* |----------|--------|---------|
|
|
339
|
-
* | `
|
|
352
|
+
* | `'paid'` | `paid` | `finalized` |
|
|
340
353
|
* | `'paid:failed'` | `paid` | `failed` |
|
|
341
354
|
* | `'cancelled'` | `cancelled` | none |
|
|
342
355
|
* | `'error:*'` | `failed` | none |
|
|
@@ -362,7 +375,7 @@ interface Methods {
|
|
|
362
375
|
* @since 0.1.1
|
|
363
376
|
* @schema
|
|
364
377
|
*/
|
|
365
|
-
test?:
|
|
378
|
+
test?: PaymentTestScenario;
|
|
366
379
|
}>>;
|
|
367
380
|
/**
|
|
368
381
|
* Write text to the system clipboard.
|
|
@@ -475,4 +488,4 @@ declare function isMethodSupported(method: MethodName, version: Version): boolea
|
|
|
475
488
|
*/
|
|
476
489
|
declare function getMethodMinVersion(method: MethodName): Version | undefined;
|
|
477
490
|
//#endregion
|
|
478
|
-
export { type CreateEventPayload, type CreateMethodPayload, type EventName, type EventPayload, type Events, type LaunchParams, type MethodName, type MethodNameWithVersionedPayload, type MethodPayload, type MethodVersionedPayload, type Methods, PLATFORMS, type PaymentErrorCode, type PaymentTestScenario, type PaymentWebhookStatus, type Platform, type Version, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
|
|
491
|
+
export { type CreateEventPayload, type CreateMethodPayload, type EventName, type EventPayload, type Events, type LaunchParams, type MethodName, type MethodNameWithVersionedPayload, type MethodPayload, type MethodVersionedPayload, type Methods, PLATFORMS, type PaymentErrorCode, type PaymentTestScenario, type PaymentWebhookStatus, type Platform, type SafeAreaInsets, type Version, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
|
package/dist/index.d.mts
CHANGED
|
@@ -197,6 +197,16 @@ declare const PLATFORMS: readonly ["ios", "android"];
|
|
|
197
197
|
* Platform the miniapp is running on.
|
|
198
198
|
*/
|
|
199
199
|
type Platform = (typeof PLATFORMS)[number];
|
|
200
|
+
/**
|
|
201
|
+
* Safe area insets in CSS pixels, injected by the host app.
|
|
202
|
+
* Accounts for system UI (status bar, notch, home indicator, nav bar).
|
|
203
|
+
*/
|
|
204
|
+
interface SafeAreaInsets {
|
|
205
|
+
top: number;
|
|
206
|
+
right: number;
|
|
207
|
+
bottom: number;
|
|
208
|
+
left: number;
|
|
209
|
+
}
|
|
200
210
|
/**
|
|
201
211
|
* Launch parameters injected by the host app.
|
|
202
212
|
*/
|
|
@@ -209,6 +219,8 @@ interface LaunchParams {
|
|
|
209
219
|
hostAppVersion: string | undefined;
|
|
210
220
|
/** Platform the miniapp is running on */
|
|
211
221
|
platform: Platform | undefined;
|
|
222
|
+
/** Safe area insets for the webview in CSS pixels */
|
|
223
|
+
safeAreaInsets: SafeAreaInsets | undefined;
|
|
212
224
|
/**
|
|
213
225
|
* Custom start parameter injected by host app.
|
|
214
226
|
* Used for referral codes, campaign tracking, or custom routing.
|
|
@@ -269,8 +281,9 @@ interface Methods {
|
|
|
269
281
|
* Optional display fields (`title`, `caption`, `iconUrl`, `quantity`)
|
|
270
282
|
* are shown on the payment approval screen.
|
|
271
283
|
*
|
|
272
|
-
* Set `test
|
|
273
|
-
*
|
|
284
|
+
* Set `test` to a scenario string (e.g. `'paid'`, `'error:insufficient_balance'`)
|
|
285
|
+
* for test mode - no real payment is made, but the specified scenario is
|
|
286
|
+
* simulated. Use for development and testing.
|
|
274
287
|
*
|
|
275
288
|
* @since 0.1.1
|
|
276
289
|
* @schema
|
|
@@ -336,7 +349,7 @@ interface Methods {
|
|
|
336
349
|
*
|
|
337
350
|
* | Scenario | Client | Webhook |
|
|
338
351
|
* |----------|--------|---------|
|
|
339
|
-
* | `
|
|
352
|
+
* | `'paid'` | `paid` | `finalized` |
|
|
340
353
|
* | `'paid:failed'` | `paid` | `failed` |
|
|
341
354
|
* | `'cancelled'` | `cancelled` | none |
|
|
342
355
|
* | `'error:*'` | `failed` | none |
|
|
@@ -362,7 +375,7 @@ interface Methods {
|
|
|
362
375
|
* @since 0.1.1
|
|
363
376
|
* @schema
|
|
364
377
|
*/
|
|
365
|
-
test?:
|
|
378
|
+
test?: PaymentTestScenario;
|
|
366
379
|
}>>;
|
|
367
380
|
/**
|
|
368
381
|
* Write text to the system clipboard.
|
|
@@ -475,4 +488,4 @@ declare function isMethodSupported(method: MethodName, version: Version): boolea
|
|
|
475
488
|
*/
|
|
476
489
|
declare function getMethodMinVersion(method: MethodName): Version | undefined;
|
|
477
490
|
//#endregion
|
|
478
|
-
export { type CreateEventPayload, type CreateMethodPayload, type EventName, type EventPayload, type Events, type LaunchParams, type MethodName, type MethodNameWithVersionedPayload, type MethodPayload, type MethodVersionedPayload, type Methods, PLATFORMS, type PaymentErrorCode, type PaymentTestScenario, type PaymentWebhookStatus, type Platform, type Version, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
|
|
491
|
+
export { type CreateEventPayload, type CreateMethodPayload, type EventName, type EventPayload, type Events, type LaunchParams, type MethodName, type MethodNameWithVersionedPayload, type MethodPayload, type MethodVersionedPayload, type Methods, PLATFORMS, type PaymentErrorCode, type PaymentTestScenario, type PaymentWebhookStatus, type Platform, type SafeAreaInsets, type Version, getMethodMinVersion, getReleaseVersion, isMethodSupported, releases };
|