zova-module-a-pay 5.0.7 → 5.0.8
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/dist/component/paymentNextAction/controller.d.ts.map +1 -1
- package/dist/index.js +35 -14
- package/dist/index.js.map +1 -1
- package/dist/model/paymentSession.d.ts +21 -518
- package/dist/model/paymentSession.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/component/paymentNextAction/controller.tsx +6 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/component/paymentNextAction/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAO,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/component/paymentNextAction/controller.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAO,MAAM,MAAM,CAAC;AAI/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yBAAyB,CAAC,EAAE,CAAC,iBAAiB,EAAE,MAAM,KAAK,MAAM,CAAC;IAClE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,qBACa,2BAA4B,SAAQ,kBAAkB;IACjE,MAAM,CAAC,aAAa,KAAM;IAG1B,oBAAoB,EAAE,yBAAyB,CAAC;IAE1C,gBAAgB;IAMtB,SAAS,CAAC,MAAM;CAyDjB"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { BeanBase, BeanControllerBase, BeanInfo, BeanScopeBase, Use, prepareComponentOptions, useController } from "zova";
|
|
1
|
+
import { BeanBase, BeanControllerBase, BeanInfo, BeanScopeBase, Use, createZovaComponentAsync, prepareComponentOptions, useController } from "zova";
|
|
2
2
|
import { BeanModelBase, Model } from "zova-module-a-model";
|
|
3
3
|
import { Api, ApiSchema, BeanApiBase } from "zova-module-a-api";
|
|
4
4
|
import { Controller, Scope, Service } from "zova-module-a-bean";
|
|
5
|
-
import { createVNode, defineComponent } from "vue";
|
|
5
|
+
import { createVNode, defineComponent, isVNode } from "vue";
|
|
6
6
|
//#region src/model/paymentSession.ts
|
|
7
|
-
var _dec$5
|
|
7
|
+
var _dec$5;
|
|
8
|
+
var _dec2$5;
|
|
9
|
+
var _class$5;
|
|
8
10
|
var ModelPaymentSession = (_dec$5 = Model(), _dec2$5 = BeanInfo({ module: "a-pay" }), _dec$5(_class$5 = _dec2$5(_class$5 = class ModelPaymentSession extends BeanModelBase {
|
|
9
11
|
view(id) {
|
|
10
12
|
if (this.$ssr.cookieDisabledOnServer) return;
|
|
@@ -46,7 +48,9 @@ var OpenApiBaseURL = (sys) => {
|
|
|
46
48
|
};
|
|
47
49
|
//#endregion
|
|
48
50
|
//#region src/api/payPaymentSession.ts
|
|
49
|
-
var _dec$4
|
|
51
|
+
var _dec$4;
|
|
52
|
+
var _dec2$4;
|
|
53
|
+
var _class$4;
|
|
50
54
|
/** PayPaymentSession_start */
|
|
51
55
|
var ApiApiPayPaymentSessionstartPath = "/api/pay/payment-session/{id}/start";
|
|
52
56
|
/** PayPaymentSession_reconcile */
|
|
@@ -66,7 +70,9 @@ var ApiPayPaymentSession = (_dec$4 = Api(), _dec2$4 = BeanInfo({ module: "a-pay"
|
|
|
66
70
|
}) || _class$4) || _class$4);
|
|
67
71
|
//#endregion
|
|
68
72
|
//#region src/apiSchema/payPaymentSession.ts
|
|
69
|
-
var _dec$3
|
|
73
|
+
var _dec$3;
|
|
74
|
+
var _dec2$3;
|
|
75
|
+
var _class$3;
|
|
70
76
|
var ApiSchemaPayPaymentSession = (_dec$3 = ApiSchema(), _dec2$3 = BeanInfo({ module: "a-pay" }), _dec$3(_class$3 = _dec2$3(_class$3 = class ApiSchemaPayPaymentSession extends BeanBase {
|
|
71
77
|
start(options) {
|
|
72
78
|
return this.$sdk.createApiSchemas("/api/pay/payment-session/{id}/start", "post", options);
|
|
@@ -80,7 +86,9 @@ var ApiSchemaPayPaymentSession = (_dec$3 = ApiSchema(), _dec2$3 = BeanInfo({ mod
|
|
|
80
86
|
}) || _class$3) || _class$3);
|
|
81
87
|
//#endregion
|
|
82
88
|
//#region src/service/paymentCoordinator.ts
|
|
83
|
-
var _dec$2
|
|
89
|
+
var _dec$2;
|
|
90
|
+
var _dec2$2;
|
|
91
|
+
var _class$2;
|
|
84
92
|
var ServicePaymentCoordinator = (_dec$2 = Service(), _dec2$2 = BeanInfo({ module: "a-pay" }), _dec$2(_class$2 = _dec2$2(_class$2 = class ServicePaymentCoordinator extends BeanBase {
|
|
85
93
|
async execute(action) {
|
|
86
94
|
if (action.kind !== "redirect") return;
|
|
@@ -90,7 +98,14 @@ var ServicePaymentCoordinator = (_dec$2 = Service(), _dec2$2 = BeanInfo({ module
|
|
|
90
98
|
}) || _class$2) || _class$2);
|
|
91
99
|
//#endregion
|
|
92
100
|
//#region src/component/paymentNextAction/controller.tsx
|
|
93
|
-
var _dec$1
|
|
101
|
+
var _dec$1;
|
|
102
|
+
var _dec2$1;
|
|
103
|
+
var _dec3;
|
|
104
|
+
var _dec4;
|
|
105
|
+
var _class$1;
|
|
106
|
+
var _class2;
|
|
107
|
+
var _descriptor;
|
|
108
|
+
var _ControllerPaymentNextAction;
|
|
94
109
|
function _initializerDefineProperty(e, i, r, l) {
|
|
95
110
|
r && Object.defineProperty(e, i, {
|
|
96
111
|
enumerable: r.enumerable,
|
|
@@ -107,6 +122,10 @@ function _applyDecoratedDescriptor(i, e, r, n, l) {
|
|
|
107
122
|
return n(i, e, r) || r;
|
|
108
123
|
}, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a;
|
|
109
124
|
}
|
|
125
|
+
var ZButton = createZovaComponentAsync("basic-button", "button");
|
|
126
|
+
function _isSlot(s) {
|
|
127
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
128
|
+
}
|
|
110
129
|
var ControllerPaymentNextAction = (_dec$1 = Controller(), _dec2$1 = BeanInfo({ module: "a-pay" }), _dec3 = Use(), _dec4 = Reflect.metadata("design:type", typeof ServicePaymentCoordinator === "undefined" ? Object : ServicePaymentCoordinator), _dec$1(_class$1 = _dec2$1(_class$1 = (_class2 = (_ControllerPaymentNextAction = class ControllerPaymentNextAction extends BeanControllerBase {
|
|
111
130
|
constructor(...args) {
|
|
112
131
|
super(...args);
|
|
@@ -120,19 +139,19 @@ var ControllerPaymentNextAction = (_dec$1 = Controller(), _dec2$1 = BeanInfo({ m
|
|
|
120
139
|
render() {
|
|
121
140
|
const { action, disabled, continueToPaymentText, continueToPaymentHelpText, embeddedCheckoutUnavailableText, paymentCompletedText, paymentPreparingText, paymentPreparingRetryText, refreshPaymentStatusText, onRefresh } = this.$props;
|
|
122
141
|
if (!action) return null;
|
|
123
|
-
if (action.kind === "redirect") return createVNode("div", { "class": "mt-6 space-y-3" }, [createVNode("p", { "class": "text-base-content/70" }, [continueToPaymentHelpText]), createVNode(
|
|
142
|
+
if (action.kind === "redirect") return createVNode("div", { "class": "mt-6 space-y-3" }, [createVNode("p", { "class": "text-base-content/70" }, [continueToPaymentHelpText]), createVNode(ZButton, {
|
|
124
143
|
"class": "btn btn-primary",
|
|
125
144
|
"disabled": disabled,
|
|
126
|
-
"
|
|
127
|
-
}, [continueToPaymentText])]);
|
|
145
|
+
"onPerform": () => this.continueRedirect()
|
|
146
|
+
}, _isSlot(continueToPaymentText) ? continueToPaymentText : { default: () => [continueToPaymentText] })]);
|
|
128
147
|
if (action.kind === "pending") return createVNode("div", {
|
|
129
148
|
"class": "mt-6 space-y-3",
|
|
130
149
|
"aria-live": "polite"
|
|
131
|
-
}, [createVNode("p", { "class": "text-base-content/70" }, [action.retryAfterSeconds ? paymentPreparingRetryText?.(action.retryAfterSeconds) : paymentPreparingText]), onRefresh && createVNode(
|
|
150
|
+
}, [createVNode("p", { "class": "text-base-content/70" }, [action.retryAfterSeconds ? paymentPreparingRetryText?.(action.retryAfterSeconds) : paymentPreparingText]), onRefresh && createVNode(ZButton, {
|
|
132
151
|
"class": "btn btn-outline",
|
|
133
152
|
"disabled": disabled,
|
|
134
|
-
"
|
|
135
|
-
}, [refreshPaymentStatusText])]);
|
|
153
|
+
"onPerform": () => onRefresh()
|
|
154
|
+
}, _isSlot(refreshPaymentStatusText) ? refreshPaymentStatusText : { default: () => [refreshPaymentStatusText] })]);
|
|
136
155
|
if (action.kind === "completed") return createVNode("p", {
|
|
137
156
|
"class": "mt-6 text-base-content/70",
|
|
138
157
|
"aria-live": "polite"
|
|
@@ -158,7 +177,9 @@ var ZPaymentNextAction = defineComponent((_props) => {
|
|
|
158
177
|
//#region src/.metadata/index.ts
|
|
159
178
|
/** components: end */
|
|
160
179
|
/** scope: begin */
|
|
161
|
-
var _dec
|
|
180
|
+
var _dec;
|
|
181
|
+
var _dec2;
|
|
182
|
+
var _class;
|
|
162
183
|
var components = { "paymentNextAction": ZPaymentNextAction };
|
|
163
184
|
var ScopeModuleAPay = (_dec = Scope(), _dec2 = BeanInfo({ module: "a-pay" }), _dec(_class = _dec2(_class = class ScopeModuleAPay extends BeanScopeBase {}) || _class) || _class);
|
|
164
185
|
/** scope: end */
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BeanControllerBase","Use","Controller","ServicePaymentCoordinator","ControllerPaymentNextAction","_dec","_dec2","__z_BeanInfo","module","_dec3","_dec4","Reflect","metadata","Object","_class","_class2","_ControllerPaymentNextAction","constructor","args","_initializerDefineProperty","_descriptor","continueRedirect","action","$props","kind","disabled","$$paymentCoordinator","execute","render","continueToPaymentText","continueToPaymentHelpText","embeddedCheckoutUnavailableText","paymentCompletedText","paymentPreparingText","paymentPreparingRetryText","refreshPaymentStatusText","onRefresh","_createVNode","onClick","retryAfterSeconds","$propsDefault","_applyDecoratedDescriptor","prototype","configurable","enumerable","writable","initializer"],"sources":["../src/model/paymentSession.ts","../src/api/openapi/baseURL.ts","../src/api/payPaymentSession.ts","../src/apiSchema/payPaymentSession.ts","../src/service/paymentCoordinator.ts","../src/component/paymentNextAction/controller.tsx","../src/.metadata/component/paymentNextAction.ts","../src/.metadata/index.ts"],"sourcesContent":["var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanModelBase, Model } from 'zova-module-a-model';\nexport let ModelPaymentSession = (_dec = Model(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ModelPaymentSession extends BeanModelBase {\n view(id) {\n if (this.$ssr.cookieDisabledOnServer) return;\n if (!this.$passport.isAuthenticated) return;\n return this.$useStateData({\n queryKey: ['view', id],\n queryFn: async () => {\n return await this.scope.api.payPaymentSession.view({\n params: {\n id\n }\n });\n }\n });\n }\n reconcile(id) {\n return this.$useMutationData({\n mutationKey: ['reconcile', id],\n mutationFn: async () => {\n return await this.scope.api.payPaymentSession.reconcile(undefined, {\n params: {\n id\n }\n });\n },\n onSuccess: async () => {\n await this.$invalidateQueries({\n queryKey: ['view', id]\n });\n }\n });\n }\n start(id) {\n return this.$useMutationData({\n mutationKey: ['start', id],\n mutationFn: async () => {\n return await this.scope.api.payPaymentSession.start(undefined, {\n params: {\n id\n }\n });\n },\n onSuccess: async () => {\n await this.$invalidateQueries({\n queryKey: ['view', id]\n });\n }\n });\n }\n}) || _class) || _class);","export const OpenApiBaseURL = sys => {\n return sys.util.getOpenApiBaseURL('OPENAPI_BASE_URL_A_PAY');\n};","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { Api, BeanApiBase } from 'zova-module-a-api';\nimport { OpenApiBaseURL } from './openapi/index.js';\n\n/** PayPaymentSession_start */\nexport const ApiApiPayPaymentSessionstartPath = '/api/pay/payment-session/{id}/start';\n/** PayPaymentSession_reconcile */\nexport const ApiApiPayPaymentSessionreconcilePath = '/api/pay/payment-session/{id}/reconcile';\n/** PayPaymentSession_view */\nexport const ApiApiPayPaymentSessionviewPath = '/api/pay/payment-session/{id}';\nexport let ApiPayPaymentSession = (_dec = Api(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiPayPaymentSession extends BeanApiBase {\n start(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPayPaymentSessionstartPath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n reconcile(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPayPaymentSessionreconcilePath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n view(options) {\n return this.$fetch.get(this.$pathTranslate(ApiApiPayPaymentSessionviewPath, options.params), this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { ApiSchema } from 'zova-module-a-api';\nimport { ApiApiPayPaymentSessionstartPath, ApiApiPayPaymentSessionreconcilePath, ApiApiPayPaymentSessionviewPath } from '../api/payPaymentSession.js';\nexport let ApiSchemaPayPaymentSession = (_dec = ApiSchema(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiSchemaPayPaymentSession extends BeanBase {\n start(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionstartPath, 'post', options);\n }\n reconcile(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionreconcilePath, 'post', options);\n }\n view(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionviewPath, 'get', options);\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { Service } from 'zova-module-a-bean';\nexport let ServicePaymentCoordinator = (_dec = Service(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ServicePaymentCoordinator extends BeanBase {\n async execute(action) {\n if (action.kind !== 'redirect') return;\n if (!process.env.CLIENT) return;\n window.location.assign(action.url);\n }\n}) || _class) || _class);","import { BeanControllerBase, Use } from 'zova';\nimport { Controller } from 'zova-module-a-bean';\n\nimport type { TypePaymentNextAction } from '../../types/payment.js';\n\nimport { ServicePaymentCoordinator } from '../../service/paymentCoordinator.js';\n\nexport interface ControllerPaymentNextActionProps {\n action?: TypePaymentNextAction;\n disabled?: boolean;\n continueToPaymentText?: string;\n continueToPaymentHelpText?: string;\n embeddedCheckoutUnavailableText?: string;\n paymentCompletedText?: string;\n paymentPreparingText?: string;\n paymentPreparingRetryText?: (retryAfterSeconds: number) => string;\n refreshPaymentStatusText?: string;\n onRefresh?: () => void | Promise<void>;\n}\n\n@Controller()\nexport class ControllerPaymentNextAction extends BeanControllerBase {\n static $propsDefault = {};\n\n @Use()\n $$paymentCoordinator: ServicePaymentCoordinator;\n\n async continueRedirect() {\n const action = this.$props.action;\n if (action?.kind !== 'redirect' || this.$props.disabled) return;\n await this.$$paymentCoordinator.execute(action);\n }\n\n protected render() {\n const {\n action,\n disabled,\n continueToPaymentText,\n continueToPaymentHelpText,\n embeddedCheckoutUnavailableText,\n paymentCompletedText,\n paymentPreparingText,\n paymentPreparingRetryText,\n refreshPaymentStatusText,\n onRefresh,\n } = this.$props as ControllerPaymentNextActionProps;\n if (!action) return null;\n if (action.kind === 'redirect') {\n return (\n <div class=\"mt-6 space-y-3\">\n <p class=\"text-base-content/70\">{continueToPaymentHelpText}</p>\n <button\n class=\"btn btn-primary\"\n disabled={disabled}\n onClick={() => this.continueRedirect()}\n >\n {continueToPaymentText}\n </button>\n </div>\n );\n }\n if (action.kind === 'pending') {\n return (\n <div class=\"mt-6 space-y-3\" aria-live=\"polite\">\n <p class=\"text-base-content/70\">\n {action.retryAfterSeconds\n ? paymentPreparingRetryText?.(action.retryAfterSeconds)\n : paymentPreparingText}\n </p>\n {onRefresh && (\n <button class=\"btn btn-outline\" disabled={disabled} onClick={() => onRefresh()}>\n {refreshPaymentStatusText}\n </button>\n )}\n </div>\n );\n }\n if (action.kind === 'completed') {\n return (\n <p class=\"mt-6 text-base-content/70\" aria-live=\"polite\">\n {paymentCompletedText}\n </p>\n );\n }\n return (\n <div class=\"mt-6\" aria-live=\"polite\">\n <p class=\"text-base-content/70\">{embeddedCheckoutUnavailableText}</p>\n </div>\n );\n }\n}\n","import { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\nimport { ControllerPaymentNextAction } from '../../component/paymentNextAction/controller.jsx';\nexport const ZPaymentNextAction = defineComponent(_props => {\n useController(ControllerPaymentNextAction, undefined, undefined);\n return () => {};\n}, prepareComponentOptions());","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/paymentSession.js';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\nimport { ModelPaymentSession } from '../model/paymentSession.js';\nimport 'zova';\n/** model: end */\n/** api: begin */\nexport * from '../api/payPaymentSession.js';\nimport 'zova';\n/** api: end */\n/** api: begin */\nimport { ApiPayPaymentSession } from '../api/payPaymentSession.js';\n/** api: end */\n/** api: begin */\n\nimport 'zova';\n/** api: end */\n/** openapi: begin */\nexport * from '../api/openapi/index.js';\n/** openapi: end */\n/** apiSchema: begin */\nexport * from '../apiSchema/payPaymentSession.js';\nimport 'zova';\n/** apiSchema: end */\n/** apiSchema: begin */\nimport { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.js';\n/** apiSchema: end */\n/** apiSchema: begin */\n\nimport 'zova';\n/** apiSchema: end */\n/** service: begin */\nexport * from '../service/paymentCoordinator.js';\nimport 'zova-module-a-bean';\n/** service: end */\n/** service: begin */\nimport { ServicePaymentCoordinator } from '../service/paymentCoordinator.js';\nimport 'zova';\n/** service: end */\n/** controller: begin */\nexport * from '../component/paymentNextAction/controller.jsx';\nimport 'zova';\n/** controller: end */\n/** controller: begin */\nimport { ControllerPaymentNextAction } from '../component/paymentNextAction/controller.jsx';\nimport 'zova';\n/** controller: end */\n\n/** components: begin */\nexport * from './component/paymentNextAction.js';\nimport { ZPaymentNextAction } from './component/paymentNextAction.js';\nexport const components = {\n 'paymentNextAction': ZPaymentNextAction\n};\nimport 'zova';\n/** components: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAPay = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAPay extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */"],"mappings":";;;;;;AAAA,IAAI,QAAM,SAAO;AAGjB,IAAW,uBAAuB,SAAO,MAAM,GAAG,UAAQ,SAAa,EACrE,QAAQ,QACV,CAAC,GAAG,OAAK,WAAS,QAAM,WAAS,MAAM,4BAA4B,cAAc;CAC/E,KAAK,IAAI;EACP,IAAI,KAAK,KAAK,wBAAwB;EACtC,IAAI,CAAC,KAAK,UAAU,iBAAiB;EACrC,OAAO,KAAK,cAAc;GACxB,UAAU,CAAC,QAAQ,EAAE;GACrB,SAAS,YAAY;IACnB,OAAO,M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CAAAA,YAAA,KAAA,EAAA,SAAA,uBAAA,GAAA,CAEqCN,+BAA+B,CAAA,CAAA,CAAA;CAGtE;AACF,GAACf,6BApEQwB,gBAAgB,CAAC,GAACxB,+BAAAI,cAAAqB,0BAAA1B,QAAA2B,WAAA,wBAAA,CAAAjC,OAAAC,KAAA,GAAA;CAAAiC,cAAA;CAAAC,YAAA;CAAAC,UAAA;CAAAC,aAAA;AAAA,CAAA,GAAA/B,QAAA,KAAAD,QAAA,KAAAA;;;ACnB3B,IAAa,qBAAqB,iBAAgB,WAAU;CAC1D,cAAc,6BAA6B,KAAA,GAAW,KAAA,CAAS;CAC/D,aAAa,CAAC;AAChB,GAAG,wBAAwB,CAAC;;;;;ACN5B,IAAI,MAAM,OAAO;AAwDjB,IAAa,aAAa,EACxB,qBAAqB,mBACvB;AAMA,IAAW,mBAAmB,OAAO,MAAM,GAAG,QAAQ,SAAa,EACjE,QAAQ,QACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,wBAAwB,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["BeanControllerBase","Use","Controller","ServicePaymentCoordinator","_isSlot","s","Object","prototype","toString","call","_isVNode","ControllerPaymentNextAction","_dec","_dec2","__z_BeanInfo","module","_dec3","_dec4","Reflect","metadata","_class","_class2","_ControllerPaymentNextAction","constructor","args","_initializerDefineProperty","_descriptor","continueRedirect","action","$props","kind","disabled","$$paymentCoordinator","execute","render","continueToPaymentText","continueToPaymentHelpText","embeddedCheckoutUnavailableText","paymentCompletedText","paymentPreparingText","paymentPreparingRetryText","refreshPaymentStatusText","onRefresh","_createVNode","ZButton","onPerform","default","retryAfterSeconds","$propsDefault","_applyDecoratedDescriptor","configurable","enumerable","writable","initializer"],"sources":["../src/model/paymentSession.ts","../src/api/openapi/baseURL.ts","../src/api/payPaymentSession.ts","../src/apiSchema/payPaymentSession.ts","../src/service/paymentCoordinator.ts","../src/component/paymentNextAction/controller.tsx","../src/.metadata/component/paymentNextAction.ts","../src/.metadata/index.ts"],"sourcesContent":["var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanModelBase, Model } from 'zova-module-a-model';\nexport let ModelPaymentSession = (_dec = Model(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ModelPaymentSession extends BeanModelBase {\n view(id) {\n if (this.$ssr.cookieDisabledOnServer) return;\n if (!this.$passport.isAuthenticated) return;\n return this.$useStateData({\n queryKey: ['view', id],\n queryFn: async () => {\n return await this.scope.api.payPaymentSession.view({\n params: {\n id\n }\n });\n }\n });\n }\n reconcile(id) {\n return this.$useMutationData({\n mutationKey: ['reconcile', id],\n mutationFn: async () => {\n return await this.scope.api.payPaymentSession.reconcile(undefined, {\n params: {\n id\n }\n });\n },\n onSuccess: async () => {\n await this.$invalidateQueries({\n queryKey: ['view', id]\n });\n }\n });\n }\n start(id) {\n return this.$useMutationData({\n mutationKey: ['start', id],\n mutationFn: async () => {\n return await this.scope.api.payPaymentSession.start(undefined, {\n params: {\n id\n }\n });\n },\n onSuccess: async () => {\n await this.$invalidateQueries({\n queryKey: ['view', id]\n });\n }\n });\n }\n}) || _class) || _class);","export const OpenApiBaseURL = sys => {\n return sys.util.getOpenApiBaseURL('OPENAPI_BASE_URL_A_PAY');\n};","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { Api, BeanApiBase } from 'zova-module-a-api';\nimport { OpenApiBaseURL } from './openapi/index.js';\n\n/** PayPaymentSession_start */\nexport const ApiApiPayPaymentSessionstartPath = '/api/pay/payment-session/{id}/start';\n/** PayPaymentSession_reconcile */\nexport const ApiApiPayPaymentSessionreconcilePath = '/api/pay/payment-session/{id}/reconcile';\n/** PayPaymentSession_view */\nexport const ApiApiPayPaymentSessionviewPath = '/api/pay/payment-session/{id}';\nexport let ApiPayPaymentSession = (_dec = Api(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiPayPaymentSession extends BeanApiBase {\n start(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPayPaymentSessionstartPath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n reconcile(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPayPaymentSessionreconcilePath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n view(options) {\n return this.$fetch.get(this.$pathTranslate(ApiApiPayPaymentSessionviewPath, options.params), this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { ApiSchema } from 'zova-module-a-api';\nimport { ApiApiPayPaymentSessionstartPath, ApiApiPayPaymentSessionreconcilePath, ApiApiPayPaymentSessionviewPath } from '../api/payPaymentSession.js';\nexport let ApiSchemaPayPaymentSession = (_dec = ApiSchema(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiSchemaPayPaymentSession extends BeanBase {\n start(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionstartPath, 'post', options);\n }\n reconcile(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionreconcilePath, 'post', options);\n }\n view(options) {\n return this.$sdk.createApiSchemas(ApiApiPayPaymentSessionviewPath, 'get', options);\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { Service } from 'zova-module-a-bean';\nexport let ServicePaymentCoordinator = (_dec = Service(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ServicePaymentCoordinator extends BeanBase {\n async execute(action) {\n if (action.kind !== 'redirect') return;\n if (!process.env.CLIENT) return;\n window.location.assign(action.url);\n }\n}) || _class) || _class);","import { BeanControllerBase, Use } from 'zova';\nimport { Controller } from 'zova-module-a-bean';\nimport { ZButton } from 'zova-module-basic-button';\n\nimport type { TypePaymentNextAction } from '../../types/payment.js';\n\nimport { ServicePaymentCoordinator } from '../../service/paymentCoordinator.js';\n\nexport interface ControllerPaymentNextActionProps {\n action?: TypePaymentNextAction;\n disabled?: boolean;\n continueToPaymentText?: string;\n continueToPaymentHelpText?: string;\n embeddedCheckoutUnavailableText?: string;\n paymentCompletedText?: string;\n paymentPreparingText?: string;\n paymentPreparingRetryText?: (retryAfterSeconds: number) => string;\n refreshPaymentStatusText?: string;\n onRefresh?: () => void | Promise<void>;\n}\n\n@Controller()\nexport class ControllerPaymentNextAction extends BeanControllerBase {\n static $propsDefault = {};\n\n @Use()\n $$paymentCoordinator: ServicePaymentCoordinator;\n\n async continueRedirect() {\n const action = this.$props.action;\n if (action?.kind !== 'redirect' || this.$props.disabled) return;\n await this.$$paymentCoordinator.execute(action);\n }\n\n protected render() {\n const {\n action,\n disabled,\n continueToPaymentText,\n continueToPaymentHelpText,\n embeddedCheckoutUnavailableText,\n paymentCompletedText,\n paymentPreparingText,\n paymentPreparingRetryText,\n refreshPaymentStatusText,\n onRefresh,\n } = this.$props as ControllerPaymentNextActionProps;\n if (!action) return null;\n if (action.kind === 'redirect') {\n return (\n <div class=\"mt-6 space-y-3\">\n <p class=\"text-base-content/70\">{continueToPaymentHelpText}</p>\n <ZButton\n class=\"btn btn-primary\"\n disabled={disabled}\n onPerform={() => this.continueRedirect()}\n >\n {continueToPaymentText}\n </ZButton>\n </div>\n );\n }\n if (action.kind === 'pending') {\n return (\n <div class=\"mt-6 space-y-3\" aria-live=\"polite\">\n <p class=\"text-base-content/70\">\n {action.retryAfterSeconds\n ? paymentPreparingRetryText?.(action.retryAfterSeconds)\n : paymentPreparingText}\n </p>\n {onRefresh && (\n <ZButton class=\"btn btn-outline\" disabled={disabled} onPerform={() => onRefresh()}>\n {refreshPaymentStatusText}\n </ZButton>\n )}\n </div>\n );\n }\n if (action.kind === 'completed') {\n return (\n <p class=\"mt-6 text-base-content/70\" aria-live=\"polite\">\n {paymentCompletedText}\n </p>\n );\n }\n return (\n <div class=\"mt-6\" aria-live=\"polite\">\n <p class=\"text-base-content/70\">{embeddedCheckoutUnavailableText}</p>\n </div>\n );\n }\n}\n","import { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\nimport { ControllerPaymentNextAction } from '../../component/paymentNextAction/controller.jsx';\nexport const ZPaymentNextAction = defineComponent(_props => {\n useController(ControllerPaymentNextAction, undefined, undefined);\n return () => {};\n}, prepareComponentOptions());","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/paymentSession.js';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\nimport { ModelPaymentSession } from '../model/paymentSession.js';\nimport 'zova';\n/** model: end */\n/** api: begin */\nexport * from '../api/payPaymentSession.js';\nimport 'zova';\n/** api: end */\n/** api: begin */\nimport { ApiPayPaymentSession } from '../api/payPaymentSession.js';\n/** api: end */\n/** api: begin */\n\nimport 'zova';\n/** api: end */\n/** openapi: begin */\nexport * from '../api/openapi/index.js';\n/** openapi: end */\n/** apiSchema: begin */\nexport * from '../apiSchema/payPaymentSession.js';\nimport 'zova';\n/** apiSchema: end */\n/** apiSchema: begin */\nimport { ApiSchemaPayPaymentSession } from '../apiSchema/payPaymentSession.js';\n/** apiSchema: end */\n/** apiSchema: begin */\n\nimport 'zova';\n/** apiSchema: end */\n/** service: begin */\nexport * from '../service/paymentCoordinator.js';\nimport 'zova-module-a-bean';\n/** service: end */\n/** service: begin */\nimport { ServicePaymentCoordinator } from '../service/paymentCoordinator.js';\nimport 'zova';\n/** service: end */\n/** controller: begin */\nexport * from '../component/paymentNextAction/controller.jsx';\nimport 'zova';\n/** controller: end */\n/** controller: begin */\nimport { ControllerPaymentNextAction } from '../component/paymentNextAction/controller.jsx';\nimport 'zova';\n/** controller: end */\n\n/** components: begin */\nexport * from './component/paymentNextAction.js';\nimport { ZPaymentNextAction } from './component/paymentNextAction.js';\nexport const components = {\n 'paymentNextAction': ZPaymentNextAction\n};\nimport 'zova';\n/** components: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAPay = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAPay extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */"],"mappings":";;;;;;AAAA,IAAI;AAAM,IAAA;AAAO,IAAA;AAGjB,IAAW,uBAAuB,SAAO,MAAM,GAAG,UAAQ,SAAa,EACrE,QAAQ,QACV,CAAC,GAAG,OAAK,WAAS,QAAM,WAAS,MAAM,4BAA4B,cAAc;CAC/E,KAAK,IAAI;EACP,IAAI,KAAK,KAAK,wBAAwB;EACtC,IAAI,CAAC,KAAK,UAAU,iBAAiB;EACrC,OAAO,KAAK,cAAc;GACxB,UAAU,CAAC,QAAQ,EAAE;GACrB,SAAS,YAAY;IACnB,OAAO,MAAM,KAAK,MAAM,IAAI,kBAAkB,KAAK,EACjD,QAAQ,EACN,GACF,EACF,CAAC;GACH;EACF,CAAC;CACH;CACA,UAAU,IAAI;EACZ,OAAO,KAAK,iBAAiB;GAC3B,aAAa,CAAC,aAAa,EAAE;GAC7B,YAAY,YAAY;IACtB,OAAO,MAAM,KAAK,MAAM,IAAI,kBAAkB,UAAU,KAAA,GAAW,EACjE,QAAQ,EACN,GACF,EACF,CAAC;GACH;GACA,WAAW,YAAY;IACrB,MAAM,KAAK,mBAAmB,EAC5B,UAAU,CAAC,QAAQ,EAAE,EACvB,CAAC;GACH;EACF,CAAC;CACH;CACA,MAAM,IAAI;EACR,OAAO,KAAK,iBAAiB;GAC3B,aAAa,CAAC,SAAS,EAAE;GACzB,YAAY,YAAY;IACtB,OAAO,MAAM,KAAK,MAAM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AC,YAAA;CAAAC,UAAA;CAAAC,aAAA;AAAA,CAAA,GAAAhC,QAAA,KAAAD,QAAA,KAAAA;;;ACpB3B,IAAa,qBAAqB,iBAAgB,WAAU;CAC1D,cAAc,6BAA6B,KAAA,GAAW,KAAA,CAAS;CAC/D,aAAa,CAAC;AAChB,GAAG,wBAAwB,CAAC;;;;;ACN5B,IAAI;AAAM,IAAA;AAAO,IAAA;AAwDjB,IAAa,aAAa,EACxB,qBAAqB,mBACvB;AAMA,IAAW,mBAAmB,OAAO,MAAM,GAAG,QAAQ,SAAa,EACjE,QAAQ,QACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,wBAAwB,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK"}
|
|
@@ -4,525 +4,28 @@ import { BeanModelBase } from 'zova-module-a-model';
|
|
|
4
4
|
export interface IModelOptionsPaymentSession extends IDecoratorModelOptions {
|
|
5
5
|
}
|
|
6
6
|
export declare class ModelPaymentSession extends BeanModelBase {
|
|
7
|
-
view(id: TableIdentity): {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[key: string]: string;
|
|
20
|
-
} | undefined;
|
|
21
|
-
} | {
|
|
22
|
-
kind: "pending";
|
|
23
|
-
retryAfterSeconds?: number | undefined;
|
|
24
|
-
} | {
|
|
25
|
-
kind: "completed";
|
|
26
|
-
} | undefined;
|
|
27
|
-
amountMinor: number;
|
|
28
|
-
currency: string;
|
|
29
|
-
};
|
|
30
|
-
error: Error;
|
|
31
|
-
isError: true;
|
|
32
|
-
isPending: false;
|
|
33
|
-
isLoading: false;
|
|
34
|
-
isLoadingError: false;
|
|
35
|
-
isRefetchError: true;
|
|
36
|
-
isSuccess: false;
|
|
37
|
-
isPlaceholderData: false;
|
|
38
|
-
status: "error";
|
|
39
|
-
dataUpdatedAt: number;
|
|
40
|
-
errorUpdatedAt: number;
|
|
41
|
-
failureCount: number;
|
|
42
|
-
failureReason: Error | null;
|
|
43
|
-
errorUpdateCount: number;
|
|
44
|
-
isFetched: boolean;
|
|
45
|
-
isFetchedAfterMount: boolean;
|
|
46
|
-
isFetching: boolean;
|
|
47
|
-
isInitialLoading: boolean;
|
|
48
|
-
isPaused: boolean;
|
|
49
|
-
isRefetching: boolean;
|
|
50
|
-
isStale: boolean;
|
|
51
|
-
isEnabled: boolean;
|
|
52
|
-
refetch: (options?: import("@tanstack/vue-query").RefetchOptions) => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
53
|
-
id: number | string;
|
|
54
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
55
|
-
providerName: string;
|
|
56
|
-
nextAction?: {
|
|
57
|
-
kind: "redirect";
|
|
58
|
-
url: string;
|
|
59
|
-
} | {
|
|
60
|
-
kind: "embedded";
|
|
61
|
-
clientToken: string;
|
|
62
|
-
publishableConfig?: {
|
|
63
|
-
[key: string]: string;
|
|
64
|
-
} | undefined;
|
|
65
|
-
} | {
|
|
66
|
-
kind: "pending";
|
|
67
|
-
retryAfterSeconds?: number | undefined;
|
|
68
|
-
} | {
|
|
69
|
-
kind: "completed";
|
|
70
|
-
} | undefined;
|
|
71
|
-
amountMinor: number;
|
|
72
|
-
currency: string;
|
|
73
|
-
}, Error>>;
|
|
74
|
-
fetchStatus: import("@tanstack/vue-query").FetchStatus;
|
|
75
|
-
promise: Promise<{
|
|
76
|
-
id: number | string;
|
|
77
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
78
|
-
providerName: string;
|
|
79
|
-
nextAction?: {
|
|
80
|
-
kind: "redirect";
|
|
81
|
-
url: string;
|
|
82
|
-
} | {
|
|
83
|
-
kind: "embedded";
|
|
84
|
-
clientToken: string;
|
|
85
|
-
publishableConfig?: {
|
|
86
|
-
[key: string]: string;
|
|
87
|
-
} | undefined;
|
|
88
|
-
} | {
|
|
89
|
-
kind: "pending";
|
|
90
|
-
retryAfterSeconds?: number | undefined;
|
|
91
|
-
} | {
|
|
92
|
-
kind: "completed";
|
|
93
|
-
} | undefined;
|
|
94
|
-
amountMinor: number;
|
|
95
|
-
currency: string;
|
|
96
|
-
}>;
|
|
97
|
-
suspense: () => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
98
|
-
id: number | string;
|
|
99
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
100
|
-
providerName: string;
|
|
101
|
-
nextAction?: {
|
|
102
|
-
kind: "redirect";
|
|
103
|
-
url: string;
|
|
104
|
-
} | {
|
|
105
|
-
kind: "embedded";
|
|
106
|
-
clientToken: string;
|
|
107
|
-
publishableConfig?: {
|
|
108
|
-
[key: string]: string;
|
|
109
|
-
} | undefined;
|
|
110
|
-
} | {
|
|
111
|
-
kind: "pending";
|
|
112
|
-
retryAfterSeconds?: number | undefined;
|
|
113
|
-
} | {
|
|
114
|
-
kind: "completed";
|
|
115
|
-
} | undefined;
|
|
116
|
-
amountMinor: number;
|
|
117
|
-
currency: string;
|
|
118
|
-
}, Error>>;
|
|
119
|
-
} | {
|
|
120
|
-
data: {
|
|
121
|
-
id: number | string;
|
|
122
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
123
|
-
providerName: string;
|
|
124
|
-
nextAction?: {
|
|
125
|
-
kind: "redirect";
|
|
126
|
-
url: string;
|
|
127
|
-
} | {
|
|
128
|
-
kind: "embedded";
|
|
129
|
-
clientToken: string;
|
|
130
|
-
publishableConfig?: {
|
|
131
|
-
[key: string]: string;
|
|
132
|
-
} | undefined;
|
|
133
|
-
} | {
|
|
134
|
-
kind: "pending";
|
|
135
|
-
retryAfterSeconds?: number | undefined;
|
|
136
|
-
} | {
|
|
137
|
-
kind: "completed";
|
|
138
|
-
} | undefined;
|
|
139
|
-
amountMinor: number;
|
|
140
|
-
currency: string;
|
|
141
|
-
};
|
|
142
|
-
error: null;
|
|
143
|
-
isError: false;
|
|
144
|
-
isPending: false;
|
|
145
|
-
isLoading: false;
|
|
146
|
-
isLoadingError: false;
|
|
147
|
-
isRefetchError: false;
|
|
148
|
-
isSuccess: true;
|
|
149
|
-
isPlaceholderData: false;
|
|
150
|
-
status: "success";
|
|
151
|
-
dataUpdatedAt: number;
|
|
152
|
-
errorUpdatedAt: number;
|
|
153
|
-
failureCount: number;
|
|
154
|
-
failureReason: Error | null;
|
|
155
|
-
errorUpdateCount: number;
|
|
156
|
-
isFetched: boolean;
|
|
157
|
-
isFetchedAfterMount: boolean;
|
|
158
|
-
isFetching: boolean;
|
|
159
|
-
isInitialLoading: boolean;
|
|
160
|
-
isPaused: boolean;
|
|
161
|
-
isRefetching: boolean;
|
|
162
|
-
isStale: boolean;
|
|
163
|
-
isEnabled: boolean;
|
|
164
|
-
refetch: (options?: import("@tanstack/vue-query").RefetchOptions) => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
165
|
-
id: number | string;
|
|
166
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
167
|
-
providerName: string;
|
|
168
|
-
nextAction?: {
|
|
169
|
-
kind: "redirect";
|
|
170
|
-
url: string;
|
|
171
|
-
} | {
|
|
172
|
-
kind: "embedded";
|
|
173
|
-
clientToken: string;
|
|
174
|
-
publishableConfig?: {
|
|
175
|
-
[key: string]: string;
|
|
176
|
-
} | undefined;
|
|
177
|
-
} | {
|
|
178
|
-
kind: "pending";
|
|
179
|
-
retryAfterSeconds?: number | undefined;
|
|
180
|
-
} | {
|
|
181
|
-
kind: "completed";
|
|
182
|
-
} | undefined;
|
|
183
|
-
amountMinor: number;
|
|
184
|
-
currency: string;
|
|
185
|
-
}, Error>>;
|
|
186
|
-
fetchStatus: import("@tanstack/vue-query").FetchStatus;
|
|
187
|
-
promise: Promise<{
|
|
188
|
-
id: number | string;
|
|
189
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
190
|
-
providerName: string;
|
|
191
|
-
nextAction?: {
|
|
192
|
-
kind: "redirect";
|
|
193
|
-
url: string;
|
|
194
|
-
} | {
|
|
195
|
-
kind: "embedded";
|
|
196
|
-
clientToken: string;
|
|
197
|
-
publishableConfig?: {
|
|
198
|
-
[key: string]: string;
|
|
199
|
-
} | undefined;
|
|
200
|
-
} | {
|
|
201
|
-
kind: "pending";
|
|
202
|
-
retryAfterSeconds?: number | undefined;
|
|
203
|
-
} | {
|
|
204
|
-
kind: "completed";
|
|
205
|
-
} | undefined;
|
|
206
|
-
amountMinor: number;
|
|
207
|
-
currency: string;
|
|
208
|
-
}>;
|
|
209
|
-
suspense: () => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
210
|
-
id: number | string;
|
|
211
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
212
|
-
providerName: string;
|
|
213
|
-
nextAction?: {
|
|
214
|
-
kind: "redirect";
|
|
215
|
-
url: string;
|
|
216
|
-
} | {
|
|
217
|
-
kind: "embedded";
|
|
218
|
-
clientToken: string;
|
|
219
|
-
publishableConfig?: {
|
|
220
|
-
[key: string]: string;
|
|
221
|
-
} | undefined;
|
|
222
|
-
} | {
|
|
223
|
-
kind: "pending";
|
|
224
|
-
retryAfterSeconds?: number | undefined;
|
|
225
|
-
} | {
|
|
226
|
-
kind: "completed";
|
|
227
|
-
} | undefined;
|
|
228
|
-
amountMinor: number;
|
|
229
|
-
currency: string;
|
|
230
|
-
}, Error>>;
|
|
231
|
-
} | {
|
|
232
|
-
data: undefined;
|
|
233
|
-
error: Error;
|
|
234
|
-
isError: true;
|
|
235
|
-
isPending: false;
|
|
236
|
-
isLoading: false;
|
|
237
|
-
isLoadingError: true;
|
|
238
|
-
isRefetchError: false;
|
|
239
|
-
isSuccess: false;
|
|
240
|
-
isPlaceholderData: false;
|
|
241
|
-
status: "error";
|
|
242
|
-
dataUpdatedAt: number;
|
|
243
|
-
errorUpdatedAt: number;
|
|
244
|
-
failureCount: number;
|
|
245
|
-
failureReason: Error | null;
|
|
246
|
-
errorUpdateCount: number;
|
|
247
|
-
isFetched: boolean;
|
|
248
|
-
isFetchedAfterMount: boolean;
|
|
249
|
-
isFetching: boolean;
|
|
250
|
-
isInitialLoading: boolean;
|
|
251
|
-
isPaused: boolean;
|
|
252
|
-
isRefetching: boolean;
|
|
253
|
-
isStale: boolean;
|
|
254
|
-
isEnabled: boolean;
|
|
255
|
-
refetch: (options?: import("@tanstack/vue-query").RefetchOptions) => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
256
|
-
id: number | string;
|
|
257
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
258
|
-
providerName: string;
|
|
259
|
-
nextAction?: {
|
|
260
|
-
kind: "redirect";
|
|
261
|
-
url: string;
|
|
262
|
-
} | {
|
|
263
|
-
kind: "embedded";
|
|
264
|
-
clientToken: string;
|
|
265
|
-
publishableConfig?: {
|
|
266
|
-
[key: string]: string;
|
|
267
|
-
} | undefined;
|
|
268
|
-
} | {
|
|
269
|
-
kind: "pending";
|
|
270
|
-
retryAfterSeconds?: number | undefined;
|
|
271
|
-
} | {
|
|
272
|
-
kind: "completed";
|
|
273
|
-
} | undefined;
|
|
274
|
-
amountMinor: number;
|
|
275
|
-
currency: string;
|
|
276
|
-
}, Error>>;
|
|
277
|
-
fetchStatus: import("@tanstack/vue-query").FetchStatus;
|
|
278
|
-
promise: Promise<{
|
|
279
|
-
id: number | string;
|
|
280
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
281
|
-
providerName: string;
|
|
282
|
-
nextAction?: {
|
|
283
|
-
kind: "redirect";
|
|
284
|
-
url: string;
|
|
285
|
-
} | {
|
|
286
|
-
kind: "embedded";
|
|
287
|
-
clientToken: string;
|
|
288
|
-
publishableConfig?: {
|
|
289
|
-
[key: string]: string;
|
|
290
|
-
} | undefined;
|
|
291
|
-
} | {
|
|
292
|
-
kind: "pending";
|
|
293
|
-
retryAfterSeconds?: number | undefined;
|
|
294
|
-
} | {
|
|
295
|
-
kind: "completed";
|
|
296
|
-
} | undefined;
|
|
297
|
-
amountMinor: number;
|
|
298
|
-
currency: string;
|
|
299
|
-
}>;
|
|
300
|
-
suspense: () => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
301
|
-
id: number | string;
|
|
302
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
303
|
-
providerName: string;
|
|
304
|
-
nextAction?: {
|
|
305
|
-
kind: "redirect";
|
|
306
|
-
url: string;
|
|
307
|
-
} | {
|
|
308
|
-
kind: "embedded";
|
|
309
|
-
clientToken: string;
|
|
310
|
-
publishableConfig?: {
|
|
311
|
-
[key: string]: string;
|
|
312
|
-
} | undefined;
|
|
313
|
-
} | {
|
|
314
|
-
kind: "pending";
|
|
315
|
-
retryAfterSeconds?: number | undefined;
|
|
316
|
-
} | {
|
|
317
|
-
kind: "completed";
|
|
318
|
-
} | undefined;
|
|
319
|
-
amountMinor: number;
|
|
320
|
-
currency: string;
|
|
321
|
-
}, Error>>;
|
|
322
|
-
} | {
|
|
323
|
-
data: undefined;
|
|
324
|
-
error: null;
|
|
325
|
-
isError: false;
|
|
326
|
-
isPending: true;
|
|
327
|
-
isLoadingError: false;
|
|
328
|
-
isRefetchError: false;
|
|
329
|
-
isSuccess: false;
|
|
330
|
-
isPlaceholderData: false;
|
|
331
|
-
status: "pending";
|
|
332
|
-
dataUpdatedAt: number;
|
|
333
|
-
errorUpdatedAt: number;
|
|
334
|
-
failureCount: number;
|
|
335
|
-
failureReason: Error | null;
|
|
336
|
-
errorUpdateCount: number;
|
|
337
|
-
isFetched: boolean;
|
|
338
|
-
isFetchedAfterMount: boolean;
|
|
339
|
-
isFetching: boolean;
|
|
340
|
-
isLoading: boolean;
|
|
341
|
-
isInitialLoading: boolean;
|
|
342
|
-
isPaused: boolean;
|
|
343
|
-
isRefetching: boolean;
|
|
344
|
-
isStale: boolean;
|
|
345
|
-
isEnabled: boolean;
|
|
346
|
-
refetch: (options?: import("@tanstack/vue-query").RefetchOptions) => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
347
|
-
id: number | string;
|
|
348
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
349
|
-
providerName: string;
|
|
350
|
-
nextAction?: {
|
|
351
|
-
kind: "redirect";
|
|
352
|
-
url: string;
|
|
353
|
-
} | {
|
|
354
|
-
kind: "embedded";
|
|
355
|
-
clientToken: string;
|
|
356
|
-
publishableConfig?: {
|
|
357
|
-
[key: string]: string;
|
|
358
|
-
} | undefined;
|
|
359
|
-
} | {
|
|
360
|
-
kind: "pending";
|
|
361
|
-
retryAfterSeconds?: number | undefined;
|
|
362
|
-
} | {
|
|
363
|
-
kind: "completed";
|
|
364
|
-
} | undefined;
|
|
365
|
-
amountMinor: number;
|
|
366
|
-
currency: string;
|
|
367
|
-
}, Error>>;
|
|
368
|
-
fetchStatus: import("@tanstack/vue-query").FetchStatus;
|
|
369
|
-
promise: Promise<{
|
|
370
|
-
id: number | string;
|
|
371
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
372
|
-
providerName: string;
|
|
373
|
-
nextAction?: {
|
|
374
|
-
kind: "redirect";
|
|
375
|
-
url: string;
|
|
376
|
-
} | {
|
|
377
|
-
kind: "embedded";
|
|
378
|
-
clientToken: string;
|
|
379
|
-
publishableConfig?: {
|
|
380
|
-
[key: string]: string;
|
|
381
|
-
} | undefined;
|
|
382
|
-
} | {
|
|
383
|
-
kind: "pending";
|
|
384
|
-
retryAfterSeconds?: number | undefined;
|
|
385
|
-
} | {
|
|
386
|
-
kind: "completed";
|
|
387
|
-
} | undefined;
|
|
388
|
-
amountMinor: number;
|
|
389
|
-
currency: string;
|
|
390
|
-
}>;
|
|
391
|
-
suspense: () => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
392
|
-
id: number | string;
|
|
393
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
394
|
-
providerName: string;
|
|
395
|
-
nextAction?: {
|
|
396
|
-
kind: "redirect";
|
|
397
|
-
url: string;
|
|
398
|
-
} | {
|
|
399
|
-
kind: "embedded";
|
|
400
|
-
clientToken: string;
|
|
401
|
-
publishableConfig?: {
|
|
402
|
-
[key: string]: string;
|
|
403
|
-
} | undefined;
|
|
404
|
-
} | {
|
|
405
|
-
kind: "pending";
|
|
406
|
-
retryAfterSeconds?: number | undefined;
|
|
407
|
-
} | {
|
|
408
|
-
kind: "completed";
|
|
409
|
-
} | undefined;
|
|
410
|
-
amountMinor: number;
|
|
411
|
-
currency: string;
|
|
412
|
-
}, Error>>;
|
|
413
|
-
} | {
|
|
414
|
-
data: {
|
|
415
|
-
id: number | string;
|
|
416
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
417
|
-
providerName: string;
|
|
418
|
-
nextAction?: {
|
|
419
|
-
kind: "redirect";
|
|
420
|
-
url: string;
|
|
421
|
-
} | {
|
|
422
|
-
kind: "embedded";
|
|
423
|
-
clientToken: string;
|
|
424
|
-
publishableConfig?: {
|
|
425
|
-
[key: string]: string;
|
|
426
|
-
} | undefined;
|
|
427
|
-
} | {
|
|
428
|
-
kind: "pending";
|
|
429
|
-
retryAfterSeconds?: number | undefined;
|
|
430
|
-
} | {
|
|
431
|
-
kind: "completed";
|
|
432
|
-
} | undefined;
|
|
433
|
-
amountMinor: number;
|
|
434
|
-
currency: string;
|
|
435
|
-
};
|
|
436
|
-
isError: false;
|
|
437
|
-
error: null;
|
|
438
|
-
isPending: false;
|
|
439
|
-
isLoading: false;
|
|
440
|
-
isLoadingError: false;
|
|
441
|
-
isRefetchError: false;
|
|
442
|
-
isSuccess: true;
|
|
443
|
-
isPlaceholderData: true;
|
|
444
|
-
status: "success";
|
|
445
|
-
dataUpdatedAt: number;
|
|
446
|
-
errorUpdatedAt: number;
|
|
447
|
-
failureCount: number;
|
|
448
|
-
failureReason: Error | null;
|
|
449
|
-
errorUpdateCount: number;
|
|
450
|
-
isFetched: boolean;
|
|
451
|
-
isFetchedAfterMount: boolean;
|
|
452
|
-
isFetching: boolean;
|
|
453
|
-
isInitialLoading: boolean;
|
|
454
|
-
isPaused: boolean;
|
|
455
|
-
isRefetching: boolean;
|
|
456
|
-
isStale: boolean;
|
|
457
|
-
isEnabled: boolean;
|
|
458
|
-
refetch: (options?: import("@tanstack/vue-query").RefetchOptions) => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
459
|
-
id: number | string;
|
|
460
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
461
|
-
providerName: string;
|
|
462
|
-
nextAction?: {
|
|
463
|
-
kind: "redirect";
|
|
464
|
-
url: string;
|
|
465
|
-
} | {
|
|
466
|
-
kind: "embedded";
|
|
467
|
-
clientToken: string;
|
|
468
|
-
publishableConfig?: {
|
|
469
|
-
[key: string]: string;
|
|
470
|
-
} | undefined;
|
|
471
|
-
} | {
|
|
472
|
-
kind: "pending";
|
|
473
|
-
retryAfterSeconds?: number | undefined;
|
|
474
|
-
} | {
|
|
475
|
-
kind: "completed";
|
|
476
|
-
} | undefined;
|
|
477
|
-
amountMinor: number;
|
|
478
|
-
currency: string;
|
|
479
|
-
}, Error>>;
|
|
480
|
-
fetchStatus: import("@tanstack/vue-query").FetchStatus;
|
|
481
|
-
promise: Promise<{
|
|
482
|
-
id: number | string;
|
|
483
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
484
|
-
providerName: string;
|
|
485
|
-
nextAction?: {
|
|
486
|
-
kind: "redirect";
|
|
487
|
-
url: string;
|
|
488
|
-
} | {
|
|
489
|
-
kind: "embedded";
|
|
490
|
-
clientToken: string;
|
|
491
|
-
publishableConfig?: {
|
|
492
|
-
[key: string]: string;
|
|
493
|
-
} | undefined;
|
|
494
|
-
} | {
|
|
495
|
-
kind: "pending";
|
|
496
|
-
retryAfterSeconds?: number | undefined;
|
|
497
|
-
} | {
|
|
498
|
-
kind: "completed";
|
|
499
|
-
} | undefined;
|
|
500
|
-
amountMinor: number;
|
|
501
|
-
currency: string;
|
|
502
|
-
}>;
|
|
503
|
-
suspense: () => Promise<import("@tanstack/vue-query").QueryObserverResult<{
|
|
504
|
-
id: number | string;
|
|
505
|
-
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
506
|
-
providerName: string;
|
|
507
|
-
nextAction?: {
|
|
508
|
-
kind: "redirect";
|
|
509
|
-
url: string;
|
|
510
|
-
} | {
|
|
511
|
-
kind: "embedded";
|
|
512
|
-
clientToken: string;
|
|
513
|
-
publishableConfig?: {
|
|
514
|
-
[key: string]: string;
|
|
515
|
-
} | undefined;
|
|
516
|
-
} | {
|
|
517
|
-
kind: "pending";
|
|
518
|
-
retryAfterSeconds?: number | undefined;
|
|
519
|
-
} | {
|
|
520
|
-
kind: "completed";
|
|
7
|
+
view(id: TableIdentity): import("zova-module-a-model").ModelUseQueryReturnType<{
|
|
8
|
+
id: number | string;
|
|
9
|
+
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
10
|
+
providerName: string;
|
|
11
|
+
nextAction?: {
|
|
12
|
+
kind: "redirect";
|
|
13
|
+
url: string;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "embedded";
|
|
16
|
+
clientToken: string;
|
|
17
|
+
publishableConfig?: {
|
|
18
|
+
[key: string]: string;
|
|
521
19
|
} | undefined;
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
20
|
+
} | {
|
|
21
|
+
kind: "pending";
|
|
22
|
+
retryAfterSeconds?: number | undefined;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "completed";
|
|
25
|
+
} | undefined;
|
|
26
|
+
amountMinor: number;
|
|
27
|
+
currency: string;
|
|
28
|
+
}, Error> | undefined;
|
|
526
29
|
reconcile(id: TableIdentity): import("vue").UnwrapNestedRefs<import("@tanstack/vue-query").UseMutationReturnType<{
|
|
527
30
|
id: number | string;
|
|
528
31
|
state: "created" | "starting" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentSession.d.ts","sourceRoot":"","sources":["../../src/model/paymentSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;CAAG;AAE9E,qBACa,mBAAoB,SAAQ,aAAa;IACpD,IAAI,CAAC,EAAE,EAAE,aAAa
|
|
1
|
+
{"version":3,"file":"paymentSession.d.ts","sourceRoot":"","sources":["../../src/model/paymentSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;CAAG;AAE9E,qBACa,mBAAoB,SAAQ,aAAa;IACpD,IAAI,CAAC,EAAE,EAAE,aAAa;;;;;;;;;;6BAmC0z+C,CAAC;;;;;6BAA8N,CAAC;;;;;;;IAxBhj/C,SAAS,CAAC,EAAE,EAAE,aAAa;;;;;;;;;;6BAwBqz+C,CAAC;;;;;6BAA8N,CAAC;;;;;;;IAZhj/C,KAAK,CAAC,EAAE,EAAE,aAAa;;;;;;;;;;6BAYyz+C,CAAC;;;;;6BAA8N,CAAC;;;;;;;CADjj/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-pay",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Zova Module"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {},
|
|
33
33
|
"title": "a-pay",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "e7537a01ee6754f79ce5e790e76521a283cadcb0"
|
|
35
35
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BeanControllerBase, Use } from 'zova';
|
|
2
2
|
import { Controller } from 'zova-module-a-bean';
|
|
3
|
+
import { ZButton } from 'zova-module-basic-button';
|
|
3
4
|
|
|
4
5
|
import type { TypePaymentNextAction } from '../../types/payment.js';
|
|
5
6
|
|
|
@@ -49,13 +50,13 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
|
|
|
49
50
|
return (
|
|
50
51
|
<div class="mt-6 space-y-3">
|
|
51
52
|
<p class="text-base-content/70">{continueToPaymentHelpText}</p>
|
|
52
|
-
<
|
|
53
|
+
<ZButton
|
|
53
54
|
class="btn btn-primary"
|
|
54
55
|
disabled={disabled}
|
|
55
|
-
|
|
56
|
+
onPerform={() => this.continueRedirect()}
|
|
56
57
|
>
|
|
57
58
|
{continueToPaymentText}
|
|
58
|
-
</
|
|
59
|
+
</ZButton>
|
|
59
60
|
</div>
|
|
60
61
|
);
|
|
61
62
|
}
|
|
@@ -68,9 +69,9 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
|
|
|
68
69
|
: paymentPreparingText}
|
|
69
70
|
</p>
|
|
70
71
|
{onRefresh && (
|
|
71
|
-
<
|
|
72
|
+
<ZButton class="btn btn-outline" disabled={disabled} onPerform={() => onRefresh()}>
|
|
72
73
|
{refreshPaymentStatusText}
|
|
73
|
-
</
|
|
74
|
+
</ZButton>
|
|
74
75
|
)}
|
|
75
76
|
</div>
|
|
76
77
|
);
|