zova-module-a-pay 5.0.3 → 5.0.4

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/index.js CHANGED
@@ -7,13 +7,13 @@ import { createTextVNode, createVNode, defineComponent } from "vue";
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 {
9
9
  view(id) {
10
- if (!process.env.CLIENT || !this.$passport.isAuthenticated) return;
10
+ if (this.$ssr.cookieDisabledOnServer) return;
11
+ if (!this.$passport.isAuthenticated) return;
11
12
  return this.$useStateData({
12
13
  queryKey: ["view", id],
13
14
  queryFn: async () => {
14
15
  return await this.scope.api.paymentSession.view({ params: { id } });
15
- },
16
- meta: { disableSuspenseOnInit: true }
16
+ }
17
17
  });
18
18
  }
19
19
  reconcile(id) {
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/paymentSession.ts","../src/apiSchema/paymentSession.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 (!process.env.CLIENT || !this.$passport.isAuthenticated) return;\n return this.$useStateData({\n queryKey: ['view', id],\n queryFn: async () => {\n return await this.scope.api.paymentSession.view({\n params: {\n id\n }\n });\n },\n meta: {\n disableSuspenseOnInit: true\n }\n });\n }\n reconcile(id) {\n return this.$useMutationData({\n mutationKey: ['reconcile', id],\n mutationFn: async () => {\n return await this.scope.api.paymentSession.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.paymentSession.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/** PaymentSession_start */\nexport const ApiApiPaymentSessionstartPath = '/api/pay/payment-session/{id}/start';\n/** PaymentSession_reconcile */\nexport const ApiApiPaymentSessionreconcilePath = '/api/pay/payment-session/{id}/reconcile';\n/** PaymentSession_view */\nexport const ApiApiPaymentSessionviewPath = '/api/pay/payment-session/{id}';\nexport let ApiPaymentSession = (_dec = Api(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiPaymentSession extends BeanApiBase {\n start(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPaymentSessionstartPath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n reconcile(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPaymentSessionreconcilePath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n view(options) {\n return this.$fetch.get(this.$pathTranslate(ApiApiPaymentSessionviewPath, 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 { ApiApiPaymentSessionstartPath, ApiApiPaymentSessionreconcilePath, ApiApiPaymentSessionviewPath } from '../api/paymentSession.js';\nexport let ApiSchemaPaymentSession = (_dec = ApiSchema(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiSchemaPaymentSession extends BeanBase {\n start(options) {\n return this.$sdk.createApiSchemas(ApiApiPaymentSessionstartPath, 'post', options);\n }\n reconcile(options) {\n return this.$sdk.createApiSchemas(ApiApiPaymentSessionreconcilePath, 'post', options);\n }\n view(options) {\n return this.$sdk.createApiSchemas(ApiApiPaymentSessionviewPath, '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/paymentSession.js';\nimport 'zova';\n/** api: end */\n/** api: begin */\nimport { ApiPaymentSession } from '../api/paymentSession.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/paymentSession.js';\nimport 'zova';\n/** apiSchema: end */\n/** apiSchema: begin */\nimport { ApiSchemaPaymentSession } from '../apiSchema/paymentSession.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,4BAA4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AC,GAAA,CAAAE,gBAAA,wBAAA,CAAA,CAAA,CAG/E,CAAA;EAIP,IAAIT,OAAOE,SAAS,aAClB,OAAAM,YAAA,KAAA;GAAA,SAAA;GAAA,aAAA;EAAA,GAAA,CAAAC,gBAAA,4CAAA,CAAA,CAAA;EAMF,OAAAD,YAAA,OAAA;GAAA,SAAA;GAAA,aAAA;EAAA,GAAA,CAAAA,YAAA,KAAA,EAAA,SAAA,uBAAA,GAAA,CAAAC,gBAAA,+EAAA,CAAA,CAAA,CAAA,CAAA;CAOF;AACF,GAACf,6BA7DQkB,gBAAgB,CAAC,GAAClB,+BAAAI,cAAAe,0BAAApB,QAAAqB,WAAA,wBAAA,CAAA3B,OAAAC,KAAA,GAAA;CAAA2B,cAAA;CAAAC,YAAA;CAAAC,UAAA;CAAAC,aAAA;AAAA,CAAA,GAAAzB,QAAA,KAAAD,QAAA,KAAAA;;;ACZ3B,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","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/paymentSession.ts","../src/apiSchema/paymentSession.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.paymentSession.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.paymentSession.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.paymentSession.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/** PaymentSession_start */\nexport const ApiApiPaymentSessionstartPath = '/api/pay/payment-session/{id}/start';\n/** PaymentSession_reconcile */\nexport const ApiApiPaymentSessionreconcilePath = '/api/pay/payment-session/{id}/reconcile';\n/** PaymentSession_view */\nexport const ApiApiPaymentSessionviewPath = '/api/pay/payment-session/{id}';\nexport let ApiPaymentSession = (_dec = Api(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiPaymentSession extends BeanApiBase {\n start(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPaymentSessionstartPath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n reconcile(body, options) {\n return this.$fetch.post(this.$pathTranslate(ApiApiPaymentSessionreconcilePath, options.params), body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n view(options) {\n return this.$fetch.get(this.$pathTranslate(ApiApiPaymentSessionviewPath, 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 { ApiApiPaymentSessionstartPath, ApiApiPaymentSessionreconcilePath, ApiApiPaymentSessionviewPath } from '../api/paymentSession.js';\nexport let ApiSchemaPaymentSession = (_dec = ApiSchema(), _dec2 = __z_BeanInfo({\n module: \"a-pay\"\n}), _dec(_class = _dec2(_class = class ApiSchemaPaymentSession extends BeanBase {\n start(options) {\n return this.$sdk.createApiSchemas(ApiApiPaymentSessionstartPath, 'post', options);\n }\n reconcile(options) {\n return this.$sdk.createApiSchemas(ApiApiPaymentSessionreconcilePath, 'post', options);\n }\n view(options) {\n return this.$sdk.createApiSchemas(ApiApiPaymentSessionviewPath, '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/paymentSession.js';\nimport 'zova';\n/** api: end */\n/** api: begin */\nimport { ApiPaymentSession } from '../api/paymentSession.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/paymentSession.js';\nimport 'zova';\n/** apiSchema: end */\n/** apiSchema: begin */\nimport { ApiSchemaPaymentSession } from '../apiSchema/paymentSession.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,eAAe,KAAK,EAC9C,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,eAAe,UAAU,KAAA,GAAW,EAC9D,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,eAAe,MAAM,KAAA,GAAW,EAC1D,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,IAAI,KAAK,kBAAkB,wBAA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;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;;;;;;;;;;iCAAhO,CAAC;;;;;iCAA8N,CAAC;;;;;;;;IAxBtl6C,SAAS,CAAC,EAAE,EAAE,aAAa;;;;;;;;;;6BAwB215C,CAAC;;;;;6BAA8N,CAAC;;;;;;;IAZtl6C,KAAK,CAAC,EAAE,EAAE,aAAa;;;;;;;;;;6BAY+15C,CAAC;;;;;6BAA8N,CAAC;;;;;;;CADvl6C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-pay",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
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": "c408492ce774644ac8a2530702db916986f52151"
34
+ "gitHead": "f56eaba77347037643b625c8e6c5af408ff2d495"
35
35
  }
@@ -8,13 +8,13 @@ export interface IModelOptionsPaymentSession extends IDecoratorModelOptions {}
8
8
  @Model<IModelOptionsPaymentSession>()
9
9
  export class ModelPaymentSession extends BeanModelBase {
10
10
  view(id: TableIdentity) {
11
- if (!process.env.CLIENT || !this.$passport.isAuthenticated) return;
11
+ if (this.$ssr.cookieDisabledOnServer) return;
12
+ if (!this.$passport.isAuthenticated) return;
12
13
  return this.$useStateData({
13
14
  queryKey: ['view', id],
14
15
  queryFn: async () => {
15
16
  return await this.scope.api.paymentSession.view({ params: { id } });
16
17
  },
17
- meta: { disableSuspenseOnInit: true },
18
18
  });
19
19
  }
20
20