Explorar o código

feat: replace echo method with launch and update documentation accordingly

xiongzhu hai 1 semana
pai
achega
f70ca3e4b9
Modificáronse 2 ficheiros con 34 adicións e 9 borrados
  1. 33 8
      README.md
  2. 1 1
      src/web.ts

+ 33 - 8
README.md

@@ -26,25 +26,50 @@ npx cap sync
 
 <docgen-index>
 
-* [`echo(...)`](#echo)
+* [`launch(...)`](#launch)
+* [Interfaces](#interfaces)
+* [Type Aliases](#type-aliases)
 
 </docgen-index>
 
 <docgen-api>
 <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
 
-### echo(...)
+### launch(...)
 
 ```typescript
-echo(options: { value: string; }) => Promise<{ value: string; }>
+launch(options: UpiLaunchOptions) => Promise<void>
 ```
 
-| Param         | Type                            |
-| ------------- | ------------------------------- |
-| **`options`** | <code>{ value: string; }</code> |
-
-**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>
+| Param         | Type                                                          |
+| ------------- | ------------------------------------------------------------- |
+| **`options`** | <code><a href="#upilaunchoptions">UpiLaunchOptions</a></code> |
 
 --------------------
 
+
+### Interfaces
+
+
+#### UpiLaunchOptions
+
+| Prop          | Type                                      | Description                                                                                        |
+| ------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------- |
+| **`app`**     | <code><a href="#upiapp">UpiApp</a></code> | Note: Typescript v5.2+ users should import OrientationLockType from @capacitor/screen-orientation. |
+| **`vpa`**     | <code>string</code>                       |                                                                                                    |
+| **`amount`**  | <code>string</code>                       |                                                                                                    |
+| **`name`**    | <code>string</code>                       |                                                                                                    |
+| **`number`**  | <code>string</code>                       |                                                                                                    |
+| **`bankId`**  | <code>string</code>                       |                                                                                                    |
+| **`ifsc`**    | <code>string</code>                       |                                                                                                    |
+| **`message`** | <code>string</code>                       |                                                                                                    |
+
+
+### Type Aliases
+
+
+#### UpiApp
+
+<code>'PhonePe' | 'Paytm'</code>
+
 </docgen-api>

+ 1 - 1
src/web.ts

@@ -7,7 +7,7 @@ export class UpiLauncherWeb extends WebPlugin implements UpiLauncherPlugin {
     super();
   }
 
-  async launch(options: UpiLaunchOptions): Promise<void> {
+  async launch(_: UpiLaunchOptions): Promise<void> {
     throw this.unavailable('UPI Launcher API not available in browser');
   }
 }