zova-module-a-pay 5.0.5 → 5.0.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"payPaymentSession.d.ts","sourceRoot":"","sources":["../../src/api/payPaymentSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAIhD,8BAA8B;AAC9B,eAAO,MAAM,gCAAgC,wCAAwC,CAAC;AACtF,MAAM,MAAM,gCAAgC,GAAG,qCAAqC,CAAC;AACrF,MAAM,MAAM,kCAAkC,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,yCAAyC,GACnD,KAAK,CAAC,gCAAgC,CAAC,CAAC,kCAAkC,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AACpG,MAAM,MAAM,wCAAwC,GAClD,KAAK,CAAC,gCAAgC,CAAC,CAAC,kCAAkC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzI,kCAAkC;AAClC,eAAO,MAAM,oCAAoC,4CAA4C,CAAC;AAC9F,MAAM,MAAM,oCAAoC,GAAG,yCAAyC,CAAC;AAC7F,MAAM,MAAM,sCAAsC,GAAG,MAAM,CAAC;AAC5D,MAAM,MAAM,6CAA6C,GACvD,KAAK,CAAC,oCAAoC,CAAC,CAAC,sCAAsC,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5G,MAAM,MAAM,4CAA4C,GACtD,KAAK,CAAC,oCAAoC,CAAC,CAAC,sCAAsC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,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+BAA+B,CAAC,CAAC,iCAAiC,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvI,qBACa,oBAAqB,SAAQ,WAAW;IACnD,KAAK,CACH,IAAI,EAAE,SAAS,EACf,OAAO,EAAE;QACP,MAAM,EAAE,yCAAyC,CAAC;KACnD,GAAG,iBAAiB;;;;;;;;;;6BAiC0+6C,CAAC;;;;;6BAA8N,CAAC;;;;;;;IAxBju7C,SAAS,CACP,IAAI,EAAE,SAAS,EACf,OAAO,EAAE;QACP,MAAM,EAAE,6CAA6C,CAAC;KACvD,GAAG,iBAAiB;;;;;;;;;;6BAoB0+6C,CAAC;;;;;6BAA8N,CAAC;;;;;;;IAXju7C,IAAI,CACF,OAAO,EAAE;QACP,MAAM,EAAE,wCAAwC,CAAC;KAClD,GAAG,iBAAiB;;;;;;;;;;6BAQ0+6C,CAAC;;;;;6BAA8N,CAAC;;;;;;;CADlu7C"}
@@ -4,6 +4,13 @@ import { ServicePaymentCoordinator } from '../../service/paymentCoordinator.js';
4
4
  export interface ControllerPaymentNextActionProps {
5
5
  action?: TypePaymentNextAction;
6
6
  disabled?: boolean;
7
+ continueToPaymentText?: string;
8
+ continueToPaymentHelpText?: string;
9
+ embeddedCheckoutUnavailableText?: string;
10
+ paymentCompletedText?: string;
11
+ paymentPreparingText?: string;
12
+ paymentPreparingRetryText?: (retryAfterSeconds: number) => string;
13
+ refreshPaymentStatusText?: string;
7
14
  onRefresh?: () => void | Promise<void>;
8
15
  }
9
16
  export declare class ControllerPaymentNextAction extends BeanControllerBase {
@@ -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;AAG/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;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E1C,gBAAgB;IAMtB,SAAS,CAAC,MAAM;CAyDjB"}
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { BeanBase, BeanControllerBase, BeanInfo, BeanScopeBase, Use, prepareComp
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 { createTextVNode, createVNode, defineComponent } from "vue";
5
+ import { createVNode, defineComponent } from "vue";
6
6
  //#region src/model/paymentSession.ts
7
7
  var _dec$5, _dec2$5, _class$5;
8
8
  var ModelPaymentSession = (_dec$5 = Model(), _dec2$5 = BeanInfo({ module: "a-pay" }), _dec$5(_class$5 = _dec2$5(_class$5 = class ModelPaymentSession extends BeanModelBase {
@@ -118,33 +118,29 @@ var ControllerPaymentNextAction = (_dec$1 = Controller(), _dec2$1 = BeanInfo({ m
118
118
  await this.$$paymentCoordinator.execute(action);
119
119
  }
120
120
  render() {
121
- const { action, disabled, onRefresh } = this.$props;
121
+ const { action, disabled, continueToPaymentText, continueToPaymentHelpText, embeddedCheckoutUnavailableText, paymentCompletedText, paymentPreparingText, paymentPreparingRetryText, refreshPaymentStatusText, onRefresh } = this.$props;
122
122
  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" }, [createTextVNode("Continue to the payment provider to complete payment.")]), createVNode("button", {
123
+ if (action.kind === "redirect") return createVNode("div", { "class": "mt-6 space-y-3" }, [createVNode("p", { "class": "text-base-content/70" }, [continueToPaymentHelpText]), createVNode("button", {
124
124
  "class": "btn btn-primary",
125
125
  "disabled": disabled,
126
126
  "onClick": () => this.continueRedirect()
127
- }, [createTextVNode("Continue to payment")])]);
127
+ }, [continueToPaymentText])]);
128
128
  if (action.kind === "pending") return createVNode("div", {
129
129
  "class": "mt-6 space-y-3",
130
130
  "aria-live": "polite"
131
- }, [createVNode("p", { "class": "text-base-content/70" }, [
132
- createTextVNode("Payment is being prepared"),
133
- action.retryAfterSeconds ? `; retrying in about ${action.retryAfterSeconds} seconds` : "",
134
- createTextVNode(".")
135
- ]), onRefresh && createVNode("button", {
131
+ }, [createVNode("p", { "class": "text-base-content/70" }, [action.retryAfterSeconds ? paymentPreparingRetryText?.(action.retryAfterSeconds) : paymentPreparingText]), onRefresh && createVNode("button", {
136
132
  "class": "btn btn-outline",
137
133
  "disabled": disabled,
138
134
  "onClick": () => onRefresh()
139
- }, [createTextVNode("Refresh payment status")])]);
135
+ }, [refreshPaymentStatusText])]);
140
136
  if (action.kind === "completed") return createVNode("p", {
141
137
  "class": "mt-6 text-base-content/70",
142
138
  "aria-live": "polite"
143
- }, [createTextVNode("Payment is complete. Confirming the order…")]);
139
+ }, [paymentCompletedText]);
144
140
  return createVNode("div", {
145
141
  "class": "mt-6",
146
142
  "aria-live": "polite"
147
- }, [createVNode("p", { "class": "text-base-content/70" }, [createTextVNode("Embedded checkout will be available when this payment provider is configured.")])]);
143
+ }, [createVNode("p", { "class": "text-base-content/70" }, [embeddedCheckoutUnavailableText])]);
148
144
  }
149
145
  }, _ControllerPaymentNextAction.$propsDefault = {}, _ControllerPaymentNextAction), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "$$paymentCoordinator", [_dec3, _dec4], {
150
146
  configurable: true,
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","onRefresh","_createVNode","_createTextVNode","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 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 { action, disabled, onRefresh } = 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\">Continue to the payment provider to complete payment.</p>\n <button\n class=\"btn btn-primary\"\n disabled={disabled}\n onClick={() => this.continueRedirect()}\n >\n Continue to payment\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 Payment is being prepared\n {action.retryAfterSeconds\n ? `; retrying in about ${action.retryAfterSeconds} seconds`\n : ''}\n .\n </p>\n {onRefresh && (\n <button class=\"btn btn-outline\" disabled={disabled} onClick={() => onRefresh()}>\n Refresh payment status\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 Payment is complete. Confirming the order…\n </p>\n );\n }\n return (\n <div class=\"mt-6\" aria-live=\"polite\">\n <p class=\"text-base-content/70\">\n Embedded checkout will be available when this payment provider is configured.\n </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,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,IAAI,kBAAkB,MAAM,KAAA,GAAW,EAC7D,QAAQ,EACN,GACF,EACF,CAAC;GACH;GACA,WAAW,YAAY;IACrB,MAAM,KAAK,mBAAmB,EAC5B,UAAU,CAAC,QAAQ,EAAE,EACvB,CAAC;GACH;EACF,CAAC;CACH;AACF,CAAC,KAAK,QAAM,KAAK;;;ACtDjB,IAAa,kBAAiB,QAAO;CACnC,OAAO,I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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,MAAM,KAAK,MAAM,IAAI,kBAAkB,KAAK,EACjD,QAAQ,EACN,GACF,EACF,CAAC;GACH;EACF,CAAC;CACH;CACA,UAAU,IAAI;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AAC;;;;;;;;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.5",
3
+ "version": "5.0.7",
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": "eb85d771ef75776a439e56df3af8be6a3a36c1c2"
34
+ "gitHead": "ad6f4a6afb4c6f0ba968b84152fcf888b0450e3e"
35
35
  }
@@ -535,17 +535,6 @@ export type ApiSchemaPayMockDtoMockRefundComplete =
535
535
  components['schemas']['pay-mock.dto.mockRefundComplete'];
536
536
  export type ApiSchemaPayMockDtoMockRefundCompletePartial =
537
537
  Partial<ApiSchemaPayMockDtoMockRefundComplete>;
538
- export type ApiSchemaAPaypalEntityPaypalRecord =
539
- components['schemas']['a-paypal.entity.paypalRecord'];
540
- export type ApiSchemaAPaypalEntityPaypalRecordPartial = Partial<ApiSchemaAPaypalEntityPaypalRecord>;
541
- export type ApiSchemaAPaypalDtoPaypalOrderRecordPayload =
542
- components['schemas']['a-paypal.dto.paypalOrderRecordPayload'];
543
- export type ApiSchemaAPaypalDtoPaypalOrderRecordPayloadPartial =
544
- Partial<ApiSchemaAPaypalDtoPaypalOrderRecordPayload>;
545
- export type ApiSchemaAPaypalDtoPaypalOrderRecordOptions =
546
- components['schemas']['a-paypal.dto.paypalOrderRecordOptions'];
547
- export type ApiSchemaAPaypalDtoPaypalOrderRecordOptionsPartial =
548
- Partial<ApiSchemaAPaypalDtoPaypalOrderRecordOptions>;
549
538
  export type ApiSchemaTestCaptchaDtoSignin = components['schemas']['test-captcha.dto.signin'];
550
539
  export type ApiSchemaTestCaptchaDtoSigninPartial = Partial<ApiSchemaTestCaptchaDtoSignin>;
551
540
  export type ApiSchemaTestRestDtoProductCreate =
@@ -1504,54 +1504,6 @@ export interface paths {
1504
1504
  patch?: never;
1505
1505
  trace?: never;
1506
1506
  };
1507
- '/api/paypal/getRecord/{recordId}': {
1508
- parameters: {
1509
- query?: never;
1510
- header?: never;
1511
- path?: never;
1512
- cookie?: never;
1513
- };
1514
- get: operations['Paypal_getRecord'];
1515
- put?: never;
1516
- post?: never;
1517
- delete?: never;
1518
- options?: never;
1519
- head?: never;
1520
- patch?: never;
1521
- trace?: never;
1522
- };
1523
- '/api/paypal/captureOrder/{recordId}': {
1524
- parameters: {
1525
- query?: never;
1526
- header?: never;
1527
- path?: never;
1528
- cookie?: never;
1529
- };
1530
- get?: never;
1531
- put?: never;
1532
- post: operations['Paypal_captureOrder'];
1533
- delete?: never;
1534
- options?: never;
1535
- head?: never;
1536
- patch?: never;
1537
- trace?: never;
1538
- };
1539
- '/api/paypal/cancelOrder/{recordId}': {
1540
- parameters: {
1541
- query?: never;
1542
- header?: never;
1543
- path?: never;
1544
- cookie?: never;
1545
- };
1546
- get?: never;
1547
- put?: never;
1548
- post: operations['Paypal_cancelOrder'];
1549
- delete?: never;
1550
- options?: never;
1551
- head?: never;
1552
- patch?: never;
1553
- trace?: never;
1554
- };
1555
1507
  '/api/test/auth/passport/isAuthenticated': {
1556
1508
  parameters: {
1557
1509
  query?: never;
@@ -3954,7 +3906,29 @@ export interface components {
3954
3906
  'a-permission.dto.permissions': {
3955
3907
  roleIds?: (number | string)[] | undefined;
3956
3908
  roleNames?: string[] | undefined;
3957
- actions?: unknown;
3909
+ actions?:
3910
+ | {
3911
+ [key: string]:
3912
+ | boolean
3913
+ | {
3914
+ key: string;
3915
+ allowed: boolean;
3916
+ matcher:
3917
+ | {
3918
+ /** @enum {string} */
3919
+ mode: 'all';
3920
+ }
3921
+ | {
3922
+ /** @enum {string} */
3923
+ mode: 'any';
3924
+ rules: {
3925
+ field: string;
3926
+ values: string[];
3927
+ }[];
3928
+ };
3929
+ };
3930
+ }
3931
+ | undefined;
3958
3932
  };
3959
3933
  'home-base.dto.siteCatalogSelectRes': {
3960
3934
  list: components['schemas']['home-base.dto.siteCatalogSelectResItem'][];
@@ -4771,49 +4745,6 @@ export interface components {
4771
4745
  /** @enum {string} */
4772
4746
  outcome: 'succeeded' | 'failed' | 'cancelled';
4773
4747
  };
4774
- 'a-paypal.entity.paypalRecord': {
4775
- /**
4776
- * Format: date-time
4777
- * @description Created At
4778
- */
4779
- createdAt: Date;
4780
- /**
4781
- * Format: date-time
4782
- * @description Updated At
4783
- */
4784
- updatedAt: Date;
4785
- /**
4786
- * @description Deleted
4787
- * @default false
4788
- */
4789
- deleted?: boolean;
4790
- /**
4791
- * @description Instance ID
4792
- * @default 0
4793
- */
4794
- iid?: number;
4795
- /** @description ID */
4796
- id: number | string;
4797
- userId: number | string;
4798
- /** @default 0 */
4799
- status?: number;
4800
- prepayId: string;
4801
- payload: components['schemas']['a-paypal.dto.paypalOrderRecordPayload'];
4802
- options: components['schemas']['a-paypal.dto.paypalOrderRecordOptions'];
4803
- };
4804
- 'a-paypal.dto.paypalOrderRecordPayload': {
4805
- remark: string;
4806
- total: string;
4807
- currencyCode: string;
4808
- };
4809
- 'a-paypal.dto.paypalOrderRecordOptions': {
4810
- brandName: string;
4811
- returnUrl: string;
4812
- cancelUrl: string;
4813
- returnTo: string;
4814
- scene: string;
4815
- orderId: number | string;
4816
- };
4817
4748
  'test-captcha.dto.signin': {
4818
4749
  username: string;
4819
4750
  password: string;
@@ -8544,84 +8475,6 @@ export interface operations {
8544
8475
  };
8545
8476
  authToken: true;
8546
8477
  };
8547
- Paypal_getRecord: {
8548
- parameters: {
8549
- query?: never;
8550
- header?: never;
8551
- path: {
8552
- recordId: number | string;
8553
- };
8554
- cookie?: never;
8555
- };
8556
- requestBody?: never;
8557
- responses: {
8558
- 200: {
8559
- headers: {
8560
- [name: string]: unknown;
8561
- };
8562
- content: {
8563
- 'application/json': {
8564
- code: string;
8565
- message: string;
8566
- data: components['schemas']['a-paypal.entity.paypalRecord'];
8567
- };
8568
- };
8569
- };
8570
- };
8571
- authToken: true;
8572
- };
8573
- Paypal_captureOrder: {
8574
- parameters: {
8575
- query?: never;
8576
- header?: never;
8577
- path: {
8578
- recordId: number | string;
8579
- };
8580
- cookie?: never;
8581
- };
8582
- requestBody?: never;
8583
- responses: {
8584
- 200: {
8585
- headers: {
8586
- [name: string]: unknown;
8587
- };
8588
- content: {
8589
- 'application/json': {
8590
- code: string;
8591
- message: string;
8592
- data?: unknown;
8593
- };
8594
- };
8595
- };
8596
- };
8597
- authToken: true;
8598
- };
8599
- Paypal_cancelOrder: {
8600
- parameters: {
8601
- query?: never;
8602
- header?: never;
8603
- path: {
8604
- recordId: number | string;
8605
- };
8606
- cookie?: never;
8607
- };
8608
- requestBody?: never;
8609
- responses: {
8610
- 200: {
8611
- headers: {
8612
- [name: string]: unknown;
8613
- };
8614
- content: {
8615
- 'application/json': {
8616
- code: string;
8617
- message: string;
8618
- data?: unknown;
8619
- };
8620
- };
8621
- };
8622
- };
8623
- authToken: true;
8624
- };
8625
8478
  TestAuthPassport_isAuthenticated: {
8626
8479
  parameters: {
8627
8480
  query?: never;
@@ -8,6 +8,13 @@ import { ServicePaymentCoordinator } from '../../service/paymentCoordinator.js';
8
8
  export interface ControllerPaymentNextActionProps {
9
9
  action?: TypePaymentNextAction;
10
10
  disabled?: boolean;
11
+ continueToPaymentText?: string;
12
+ continueToPaymentHelpText?: string;
13
+ embeddedCheckoutUnavailableText?: string;
14
+ paymentCompletedText?: string;
15
+ paymentPreparingText?: string;
16
+ paymentPreparingRetryText?: (retryAfterSeconds: number) => string;
17
+ refreshPaymentStatusText?: string;
11
18
  onRefresh?: () => void | Promise<void>;
12
19
  }
13
20
 
@@ -25,18 +32,29 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
25
32
  }
26
33
 
27
34
  protected render() {
28
- const { action, disabled, onRefresh } = this.$props as ControllerPaymentNextActionProps;
35
+ const {
36
+ action,
37
+ disabled,
38
+ continueToPaymentText,
39
+ continueToPaymentHelpText,
40
+ embeddedCheckoutUnavailableText,
41
+ paymentCompletedText,
42
+ paymentPreparingText,
43
+ paymentPreparingRetryText,
44
+ refreshPaymentStatusText,
45
+ onRefresh,
46
+ } = this.$props as ControllerPaymentNextActionProps;
29
47
  if (!action) return null;
30
48
  if (action.kind === 'redirect') {
31
49
  return (
32
50
  <div class="mt-6 space-y-3">
33
- <p class="text-base-content/70">Continue to the payment provider to complete payment.</p>
51
+ <p class="text-base-content/70">{continueToPaymentHelpText}</p>
34
52
  <button
35
53
  class="btn btn-primary"
36
54
  disabled={disabled}
37
55
  onClick={() => this.continueRedirect()}
38
56
  >
39
- Continue to payment
57
+ {continueToPaymentText}
40
58
  </button>
41
59
  </div>
42
60
  );
@@ -45,15 +63,13 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
45
63
  return (
46
64
  <div class="mt-6 space-y-3" aria-live="polite">
47
65
  <p class="text-base-content/70">
48
- Payment is being prepared
49
66
  {action.retryAfterSeconds
50
- ? `; retrying in about ${action.retryAfterSeconds} seconds`
51
- : ''}
52
- .
67
+ ? paymentPreparingRetryText?.(action.retryAfterSeconds)
68
+ : paymentPreparingText}
53
69
  </p>
54
70
  {onRefresh && (
55
71
  <button class="btn btn-outline" disabled={disabled} onClick={() => onRefresh()}>
56
- Refresh payment status
72
+ {refreshPaymentStatusText}
57
73
  </button>
58
74
  )}
59
75
  </div>
@@ -62,15 +78,13 @@ export class ControllerPaymentNextAction extends BeanControllerBase {
62
78
  if (action.kind === 'completed') {
63
79
  return (
64
80
  <p class="mt-6 text-base-content/70" aria-live="polite">
65
- Payment is complete. Confirming the order…
81
+ {paymentCompletedText}
66
82
  </p>
67
83
  );
68
84
  }
69
85
  return (
70
86
  <div class="mt-6" aria-live="polite">
71
- <p class="text-base-content/70">
72
- Embedded checkout will be available when this payment provider is configured.
73
- </p>
87
+ <p class="text-base-content/70">{embeddedCheckoutUnavailableText}</p>
74
88
  </div>
75
89
  );
76
90
  }