@drop-africa/drop-js 0.1.1 → 0.1.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/LICENSE +21 -0
- package/README.md +44 -18
- package/dist/drop.js +286 -270
- package/dist/drop.js.map +1 -1
- package/dist/drop.umd.cjs +4 -4
- package/dist/drop.umd.cjs.map +1 -1
- package/dist/index.d.ts +20 -2
- package/package.json +6 -9
package/dist/index.d.ts
CHANGED
|
@@ -23,14 +23,32 @@ export declare interface DropError {
|
|
|
23
23
|
retryable: boolean;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export declare type DropErrorCode =
|
|
26
|
+
export declare type DropErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
27
27
|
|
|
28
28
|
export declare interface DropInstance {
|
|
29
29
|
destroy(): void;
|
|
30
30
|
getStatus(): DropPaymentStatus;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export declare type DropPaymentStatus =
|
|
33
|
+
export declare type DropPaymentStatus = (typeof PaymentStatuses)[keyof typeof PaymentStatuses];
|
|
34
|
+
|
|
35
|
+
export declare const ErrorCodes: {
|
|
36
|
+
readonly NETWORK_ERROR: "NETWORK_ERROR";
|
|
37
|
+
readonly AUTH_ERROR: "AUTH_ERROR";
|
|
38
|
+
readonly RATE_LIMITED: "RATE_LIMITED";
|
|
39
|
+
readonly NOT_FOUND: "NOT_FOUND";
|
|
40
|
+
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
41
|
+
readonly UNKNOWN: "UNKNOWN";
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export declare const PaymentStatuses: {
|
|
45
|
+
readonly INITIATED: "initiated";
|
|
46
|
+
readonly PENDING: "pending";
|
|
47
|
+
readonly SUCCEEDED: "succeeded";
|
|
48
|
+
readonly FAILED: "failed";
|
|
49
|
+
readonly CANCELLED: "cancelled";
|
|
50
|
+
readonly EXPIRED: "expired";
|
|
51
|
+
};
|
|
34
52
|
|
|
35
53
|
export declare interface QROptions {
|
|
36
54
|
moduleColor?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drop-africa/drop-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Drop.js SDK - Embed payment QR codes and poll for payment status",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/drop.umd.cjs",
|
|
@@ -29,27 +29,24 @@
|
|
|
29
29
|
"typescript": "^5.7.0",
|
|
30
30
|
"vite": "^6.0.0",
|
|
31
31
|
"vite-plugin-dts": "^4.3.0",
|
|
32
|
-
"vitest": "^
|
|
32
|
+
"vitest": "^4.0.18"
|
|
33
33
|
},
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"keywords": [
|
|
36
36
|
"drop",
|
|
37
37
|
"payment",
|
|
38
|
-
"qr-code",
|
|
39
38
|
"mobile-money",
|
|
40
|
-
"africa"
|
|
41
|
-
"sdk",
|
|
42
|
-
"typescript"
|
|
39
|
+
"africa"
|
|
43
40
|
],
|
|
44
41
|
"author": "Drop Africa",
|
|
45
42
|
"repository": {
|
|
46
43
|
"type": "git",
|
|
47
|
-
"url": "https://github.com/
|
|
44
|
+
"url": "https://github.com/drop-africa/Drop.js-SDK"
|
|
48
45
|
},
|
|
49
46
|
"bugs": {
|
|
50
|
-
"url": "https://github.com/
|
|
47
|
+
"url": "https://github.com/drop-africa/Drop.js-SDK/issues"
|
|
51
48
|
},
|
|
52
|
-
"homepage": "https://
|
|
49
|
+
"homepage": "https://drop.africa",
|
|
53
50
|
"dependencies": {
|
|
54
51
|
"qr-code-styling": "^1.9.2"
|
|
55
52
|
}
|