@astropay/payments-lib 0.0.9 → 0.0.10
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.
|
@@ -4930,7 +4930,7 @@ C(W, "GET", async ({
|
|
|
4930
4930
|
app_id: st.getToken(),
|
|
4931
4931
|
environment: rt.getEnvironment(),
|
|
4932
4932
|
platform: Li(),
|
|
4933
|
-
version: "0.0.
|
|
4933
|
+
version: "0.0.10"
|
|
4934
4934
|
};
|
|
4935
4935
|
return vi(e);
|
|
4936
4936
|
});
|
|
@@ -9591,7 +9591,7 @@ class Qc extends z {
|
|
|
9591
9591
|
}
|
|
9592
9592
|
}
|
|
9593
9593
|
rs();
|
|
9594
|
-
typeof window < "u" && (window.AstroPayPaymentsLib = st);
|
|
9594
|
+
typeof window < "u" && !window.AstroPayPaymentsLib && (window.AstroPayPaymentsLib = st);
|
|
9595
9595
|
export {
|
|
9596
9596
|
Qc as AstroPayPaymentComponent,
|
|
9597
9597
|
st as default
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Component } from '../../templates/Component';
|
|
2
|
+
import { APPaymentComponent } from '../../../types';
|
|
3
|
+
export declare class AstroPayPaymentComponent extends Component<HTMLDivElement> {
|
|
4
|
+
private loadingWrapper;
|
|
5
|
+
private readonly componentProps;
|
|
6
|
+
constructor(params: APPaymentComponent);
|
|
7
|
+
private createPayment;
|
|
8
|
+
private renderPaymentMethods;
|
|
9
|
+
private showSuccessContent;
|
|
10
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Component } from '../../components/templates/Component';
|
|
2
|
+
import { APLibConfig } from '../../types';
|
|
3
|
+
export declare class AstroPayPaymentsLib {
|
|
4
|
+
private static isInitialized;
|
|
5
|
+
private static token;
|
|
6
|
+
private static components;
|
|
7
|
+
private constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Initializes the AstroPay Payments Library.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* AstroPayPaymentsLib.init('your-api-token',
|
|
14
|
+
* {
|
|
15
|
+
* environment: 'production', // or 'sandbox'
|
|
16
|
+
* theme: 'light' // or 'dark'
|
|
17
|
+
* language: 'en' // or 'es'/'pt'
|
|
18
|
+
* currencyMode: 'iso' // or 'symbol'
|
|
19
|
+
* styles: {
|
|
20
|
+
* primaryColor: '#000000',
|
|
21
|
+
* }
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param {string} token - The API token required for authentication.
|
|
26
|
+
* @param {APLibConfig} [config] - Optional configuration settings.
|
|
27
|
+
*/
|
|
28
|
+
static init(token: string, config?: APLibConfig): void;
|
|
29
|
+
static registerComponent(component: Component): void;
|
|
30
|
+
static unregisterComponent(component: Component): void;
|
|
31
|
+
static getToken(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Destroys the AstroPay Payments Library instance, cleaning up any resources
|
|
34
|
+
* and resetting the initialization state.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* AstroPayPaymentsLib.destroy();
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
static destroy(): void;
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.10",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"name": "@astropay/payments-lib",
|
|
5
5
|
"description": "Official AstroPay payments library for web and mobile.",
|
|
@@ -29,11 +29,10 @@
|
|
|
29
29
|
],
|
|
30
30
|
"main": "./dist/astropay-payments-lib.es.js",
|
|
31
31
|
"module": "./dist/astropay-payments-lib.es.js",
|
|
32
|
-
"types": "./dist/types/index.d.ts",
|
|
33
32
|
"exports": {
|
|
34
33
|
".": {
|
|
35
34
|
"import": "./dist/astropay-payments-lib.es.js",
|
|
36
|
-
"types": "./dist/
|
|
35
|
+
"types": "./dist/main.d.ts"
|
|
37
36
|
},
|
|
38
37
|
"./types": {
|
|
39
38
|
"types": "./dist/types/index.d.ts"
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
"typesVersions": {
|
|
43
42
|
"*": {
|
|
44
43
|
"types/*": [
|
|
45
|
-
"./dist/types
|
|
44
|
+
"./dist/types/index.d.ts"
|
|
46
45
|
]
|
|
47
46
|
}
|
|
48
47
|
},
|