@goweekdays/layer-common 0.0.8 → 0.0.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @goweekdays/layer-common
2
2
 
3
+ ## 0.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 084973b: add internal payment composable
8
+
3
9
  ## 0.0.8
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,22 @@
1
+ export default function usePayment() {
2
+ function getPayments({
3
+ search = "",
4
+ id = "",
5
+ page = 1,
6
+ status = "completed",
7
+ } = {}) {
8
+ return useNuxtApp().$api<Record<string, any>>("/api/payments", {
9
+ method: "GET",
10
+ query: {
11
+ search,
12
+ id,
13
+ page,
14
+ status,
15
+ },
16
+ });
17
+ }
18
+
19
+ return {
20
+ getPayments,
21
+ };
22
+ }
@@ -1,9 +1,7 @@
1
1
  export default function usePaymentMethod() {
2
2
  function linkEWallet({
3
- mobile_number = "",
4
3
  type = "GCASH",
5
- org = "",
6
- user = "",
4
+ customer_id = "",
7
5
  success_return_url = "",
8
6
  failure_return_url = "",
9
7
  cancel_return_url = "",
@@ -14,10 +12,8 @@ export default function usePaymentMethod() {
14
12
  {
15
13
  method: "POST",
16
14
  body: {
17
- mobile_number,
15
+ customer_id,
18
16
  type,
19
- user,
20
- org,
21
17
  success_return_url,
22
18
  failure_return_url,
23
19
  cancel_return_url,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@goweekdays/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "0.0.8",
5
+ "version": "0.0.9",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"
package/types/user.d.ts CHANGED
@@ -14,5 +14,6 @@ declare type TUser = {
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
16
  status: string;
17
+ xenditCustomerId?: string;
17
18
  deletedAt: string;
18
19
  };