@feedmepos/mf-payment 0.0.0-beta.9 → 1.0.0-beta.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.
Files changed (94) hide show
  1. package/README.md +11 -1
  2. package/dist/AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js +39 -0
  3. package/dist/AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js +42 -0
  4. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js +40 -0
  5. package/dist/Modal-DB8M9o1T.js +13 -0
  6. package/dist/PayoutAccount-Ce_7sGf-.js +613 -0
  7. package/dist/{PayoutAccount-DLhMMlw_.js → PayoutAccount-ip4hKBE0.js} +96 -83
  8. package/dist/PayoutAccountSetting-kUQLeAcb.js +780 -0
  9. package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js +33 -0
  10. package/dist/SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js +42 -0
  11. package/dist/Settlement-Crdfq22j.js +149 -0
  12. package/dist/Settlement-JHOJNkhd.js +194 -0
  13. package/dist/{SettlementTransactions-CoEzdtYT.js → SettlementTransactions-BxuLXUR-.js} +99 -105
  14. package/dist/{SettlementTransactions-Dl1H4jvh.js → SettlementTransactions-daWMAmtz.js} +117 -130
  15. package/dist/Terminal-gxGnjFGc.js +372 -0
  16. package/dist/TerminalSetting--ZAJJ_Hf.js +379 -0
  17. package/dist/TerminalTransaction-B2RjE2Y0.js +435 -0
  18. package/dist/TerminalTransaction-CCfrLWpi.js +259 -0
  19. package/dist/Transaction-8LlOLPeZ.js +404 -0
  20. package/dist/Transaction-DRQ_uZ30.js +241 -0
  21. package/dist/api/index.d.ts +14 -0
  22. package/dist/api/pagination.d.ts +20 -0
  23. package/dist/api/payment-gateway/index.d.ts +9 -0
  24. package/dist/api/settlement/index.d.ts +12 -13
  25. package/dist/api/terminal/index.d.ts +13 -1
  26. package/dist/api/terminal-transaction/index.d.ts +12 -1
  27. package/dist/api/transaction/index.d.ts +7 -2
  28. package/dist/app-DQNKrzQz.js +6356 -0
  29. package/dist/app.js +3 -198
  30. package/dist/assets-NrCec-W0.js +45 -0
  31. package/dist/clipboard-4jh1WteU.js +10 -0
  32. package/dist/components/AsyncButton.vue.d.ts +21 -0
  33. package/dist/components/AutoCopyCell.vue.d.ts +6 -0
  34. package/dist/components/CursorTable/index.vue.d.ts +24 -5
  35. package/dist/components/RestaurantSelector.vue.d.ts +2 -0
  36. package/dist/components/RouteCell.vue.d.ts +8 -0
  37. package/dist/components/SelectAll.vue.d.ts +57 -0
  38. package/dist/helpers/assets.d.ts +2 -0
  39. package/dist/{index-Bmka-1lQ.js → index-7KNaibcq.js} +1 -1
  40. package/dist/index-BWUtjGg7.js +47 -0
  41. package/dist/{index-CF56zGyu.js → index-BwcJZFsi.js} +1 -1
  42. package/dist/index-CWaKb7bG.js +56107 -0
  43. package/dist/index-CojhNtuG.js +127 -0
  44. package/dist/index-DbJpbpSs.js +52 -0
  45. package/dist/index.vue_vue_type_script_setup_true_lang-JdAFa8vy.js +167 -0
  46. package/dist/model/transaction.d.ts +2 -1
  47. package/dist/package.json +5 -5
  48. package/dist/payout-account-DVoSXsW7.js +1805 -0
  49. package/dist/router/index.d.ts +1 -0
  50. package/dist/stores/payoutAccount.d.ts +4 -4
  51. package/dist/transaction-CQiT7Y_s.js +87 -0
  52. package/dist/tsconfig.app.tsbuildinfo +1 -1
  53. package/dist/validator-D5jtpt9A.js +2877 -0
  54. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  55. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +81 -0
  56. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  57. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  58. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +56 -0
  59. package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +50 -0
  60. package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +52 -0
  61. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  62. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +83 -0
  63. package/dist/views/admin/terminal/TerminalSetting.vue.d.ts +12 -0
  64. package/dist/views/admin/terminal/cell/Actions.vue.d.ts +80 -9
  65. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +94 -0
  66. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +94 -0
  67. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +85 -0
  68. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +94 -0
  69. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +7 -0
  70. package/dist/views/admin/transaction/TransactionTable.vue.d.ts +6 -2
  71. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +7 -0
  72. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  73. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  74. package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +2 -0
  75. package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +9 -0
  76. package/dist/views/terminal-transaction/cell/Status.vue.d.ts +9 -0
  77. package/package.json +5 -5
  78. package/dist/AdminLayout.vue_vue_type_script_setup_true_lang-oPYFBeEo.js +0 -42
  79. package/dist/PayoutAccount-xxSxqBTL.js +0 -3485
  80. package/dist/PayoutAccountSetting-CIeos0md.js +0 -425
  81. package/dist/Settlement-BVGACeme.js +0 -136
  82. package/dist/Settlement-Ce48KHrc.js +0 -132
  83. package/dist/Terminal-ByKV2Rof.js +0 -204
  84. package/dist/TerminalTransaction-RuSxBAxf.js +0 -240
  85. package/dist/Transaction-CYo-uLQi.js +0 -241
  86. package/dist/Transaction-Cjw9WwX8.js +0 -242
  87. package/dist/api/auth/index.d.ts +0 -7
  88. package/dist/assets-BuLGUMIx.js +0 -472
  89. package/dist/index-Coz5aeIO.js +0 -61
  90. package/dist/index-DCPNrUDq.js +0 -40075
  91. package/dist/index.vue_vue_type_script_setup_true_lang-CAR-bNaR.js +0 -150
  92. package/dist/mascot-side-3VXskf9y.js +0 -4
  93. package/dist/payout-account-iAM7HPtG.js +0 -3317
  94. package/dist/transaction-vRrBf3FN.js +0 -64
@@ -0,0 +1,10 @@
1
+ function a(o) {
2
+ navigator.clipboard ? navigator.clipboard.writeText(o) : t(o);
3
+ }
4
+ function t(o) {
5
+ const e = document.createElement("textarea");
6
+ e.value = o, e.style.position = "fixed", e.style.top = "-100px", document.body.appendChild(e), e.focus(), e.select(), document.execCommand("copy"), document.body.removeChild(e);
7
+ }
8
+ export {
9
+ a as c
10
+ };
@@ -0,0 +1,21 @@
1
+ import { type FmButtonProps } from '@feedmepos/ui-library';
2
+ import type { PropType } from 'vue';
3
+ type AsyncFunction = () => Promise<void>;
4
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ button: {
6
+ type: PropType<FmButtonProps>;
7
+ };
8
+ handler: {
9
+ type: PropType<AsyncFunction>;
10
+ required: true;
11
+ };
12
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
+ button: {
14
+ type: PropType<FmButtonProps>;
15
+ };
16
+ handler: {
17
+ type: PropType<AsyncFunction>;
18
+ required: true;
19
+ };
20
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ data: string;
3
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
4
+ data: string;
5
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -1,7 +1,26 @@
1
1
  import { type PaginatedResult } from '@feedmepos/payment-entity';
2
2
  import { type ColumnDef } from '@feedmepos/ui-library';
3
- export type CursorTableController = {
4
- refreshQuery: () => {};
3
+ export type CursorTableController<T> = {
4
+ /**
5
+ * Reset pagination and all loaded data, and perform load for first page data
6
+ */
7
+ reset: () => {};
8
+ /**
9
+ * All data from the server, will be keep on looping cursor until there's no cursor.
10
+ */
11
+ allData: () => Promise<T[]>;
12
+ /**
13
+ * All loaded data, before transform
14
+ */
15
+ data: () => T[];
16
+ /**
17
+ * Current page of the data, before transform
18
+ */
19
+ pageData: () => T[];
20
+ /**
21
+ * Replace page data by page index
22
+ */
23
+ replaceData: (index: number, value: T) => void;
5
24
  };
6
25
  declare const _default: <T extends unknown, R extends unknown>(__VLS_props: {
7
26
  readonly "onRow-click"?: ((data: T) => any) | undefined;
@@ -12,14 +31,14 @@ declare const _default: <T extends unknown, R extends unknown>(__VLS_props: {
12
31
  attrs: any;
13
32
  slots: {};
14
33
  emit: (event: 'row-click', data: T) => any;
15
- } | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<CursorTableController>) => void) | undefined, __VLS_setup?: Promise<{
34
+ } | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<CursorTableController<T>>) => void) | undefined, __VLS_setup?: Promise<{
16
35
  props: {
17
36
  readonly "onRow-click"?: ((data: T) => any) | undefined;
18
37
  readonly columnDefs: ColumnDef<R>[];
19
38
  readonly rowsDefs: (a: T) => R;
20
39
  readonly paginate: (limit: number, cursor: string) => Promise<PaginatedResult<T>>;
21
40
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
22
- expose(exposed: import("vue").ShallowUnwrapRef<CursorTableController>): void;
41
+ expose(exposed: import("vue").ShallowUnwrapRef<CursorTableController<T>>): void;
23
42
  attrs: any;
24
43
  slots: {};
25
44
  emit: (event: 'row-click', data: T) => any;
@@ -33,7 +52,7 @@ declare const _default: <T extends unknown, R extends unknown>(__VLS_props: {
33
52
  readonly rowsDefs: (a: T) => R;
34
53
  readonly paginate: (limit: number, cursor: string) => Promise<PaginatedResult<T>>;
35
54
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
36
- expose(exposed: import("vue").ShallowUnwrapRef<CursorTableController>): void;
55
+ expose(exposed: import("vue").ShallowUnwrapRef<CursorTableController<T>>): void;
37
56
  attrs: any;
38
57
  slots: {};
39
58
  emit: (event: 'row-click', data: T) => any;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ data: string;
3
+ route: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
4
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
5
+ data: string;
6
+ route: string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric;
7
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
@@ -0,0 +1,57 @@
1
+ import { type ISelectItem } from '@feedmepos/ui-library';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ label: {
4
+ type: StringConstructor;
5
+ };
6
+ items: {
7
+ type: {
8
+ (arrayLength: number): ISelectItem[];
9
+ (...items: ISelectItem[]): ISelectItem[];
10
+ new (arrayLength: number): ISelectItem[];
11
+ new (...items: ISelectItem[]): ISelectItem[];
12
+ isArray(arg: any): arg is any[];
13
+ readonly prototype: any[];
14
+ from<T>(arrayLike: ArrayLike<T>): T[];
15
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
16
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
17
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
18
+ of<T_4>(...items: T_4[]): T_4[];
19
+ readonly [Symbol.species]: ArrayConstructor;
20
+ };
21
+ required: true;
22
+ };
23
+ modelValue: {
24
+ type: import("vue").PropType<any[]>;
25
+ required: true;
26
+ };
27
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ "update:modelValue": (modelValue: any[]) => any;
29
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
30
+ label: {
31
+ type: StringConstructor;
32
+ };
33
+ items: {
34
+ type: {
35
+ (arrayLength: number): ISelectItem[];
36
+ (...items: ISelectItem[]): ISelectItem[];
37
+ new (arrayLength: number): ISelectItem[];
38
+ new (...items: ISelectItem[]): ISelectItem[];
39
+ isArray(arg: any): arg is any[];
40
+ readonly prototype: any[];
41
+ from<T>(arrayLike: ArrayLike<T>): T[];
42
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
43
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
44
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
45
+ of<T_4>(...items: T_4[]): T_4[];
46
+ readonly [Symbol.species]: ArrayConstructor;
47
+ };
48
+ required: true;
49
+ };
50
+ modelValue: {
51
+ type: import("vue").PropType<any[]>;
52
+ required: true;
53
+ };
54
+ }>> & Readonly<{
55
+ "onUpdate:modelValue"?: ((modelValue: any[]) => any) | undefined;
56
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
57
+ export default _default;
@@ -1,3 +1,5 @@
1
+ import ECR from "@/assets/images/gateway/ecr.png";
1
2
  import { F_PAYMENT_GATEWAY_KEY, F_PAYMENT_ISSUER } from "@feedmepos/payment-entity/common/enum";
2
3
  export declare function getGatewayIcon(gateway: F_PAYMENT_GATEWAY_KEY | string): string;
3
4
  export declare function getMethodIcon(issuer: F_PAYMENT_ISSUER): string;
5
+ export { ECR };
@@ -1,6 +1,6 @@
1
1
  import { ref as b, watch as w } from "vue";
2
2
  import { useRoute as A, useRouter as m } from "vue-router";
3
- import { f as y } from "./index-DCPNrUDq.js";
3
+ import { f as y } from "./index-CWaKb7bG.js";
4
4
  var d = {};
5
5
  (function(s) {
6
6
  (function(c) {
@@ -0,0 +1,47 @@
1
+ import { a as s, b as e, g as t, c as r } from "./index-CWaKb7bG.js";
2
+ const m = {
3
+ async create(a) {
4
+ return s(
5
+ await e().post("/payments/terminals", a)
6
+ );
7
+ },
8
+ async read(a) {
9
+ return s(
10
+ await e().get("/payments/terminals", {
11
+ params: { ...a }
12
+ })
13
+ );
14
+ },
15
+ async readById(a) {
16
+ return t(await e().get(`/payments/terminals/${a}`));
17
+ },
18
+ async updateById(a, n) {
19
+ return t(
20
+ await e().put(`/payments/terminals/${a}`, n)
21
+ );
22
+ },
23
+ async getBindCode(a) {
24
+ const { code: n } = t(
25
+ await e().get(`/payments/terminals/${a}/code`)
26
+ );
27
+ return n;
28
+ },
29
+ async unbind(a) {
30
+ return t(
31
+ await e().delete(`/payments/terminals/${a}/unbind`)
32
+ );
33
+ },
34
+ /**
35
+ * Relying on the payout account so need pass in the restaurant id from the payout account
36
+ */
37
+ async getTerminals(a) {
38
+ return t(
39
+ await e().get(
40
+ `restaurants/${a}/terminals?deviceType=${r.FdoTerminalDeviceType.Enum.TERMINAL}`
41
+ )
42
+ );
43
+ }
44
+ };
45
+ export {
46
+ m as t
47
+ };
@@ -1,4 +1,4 @@
1
- import { g as c, b as u, a as t, h as n } from "./index-DCPNrUDq.js";
1
+ import { a as c, b as u, g as t, h as n } from "./index-CWaKb7bG.js";
2
2
  const o = {
3
3
  async read(a) {
4
4
  return c(