cabloy 5.1.140 → 5.1.142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/.cabloy-version +1 -1
  2. package/.github/workflows/playwright-e2e.yml +2 -2
  3. package/CHANGELOG.md +32 -0
  4. package/cabloy-docs/frontend/form-guide.md +47 -0
  5. package/cabloy-docs/frontend/markdown-guide.md +50 -17
  6. package/cabloy-docs/frontend/route-alias-guide.md +20 -0
  7. package/cabloy-docs/frontend/scripts.md +9 -11
  8. package/cabloy-docs/frontend/zova-form-under-the-hood.md +25 -0
  9. package/cabloy-docs/fullstack/framework-performance.md +3 -3
  10. package/cabloy-docs/fullstack/parallel-worktree-environment.md +1 -1
  11. package/cabloy-docs/fullstack/quickstart.md +5 -4
  12. package/cabloy-docs/reference/repo-scripts.md +29 -42
  13. package/e2e/config/playwright.config.ts +34 -0
  14. package/e2e/scripts/e2e.ts +2 -27
  15. package/e2e/scripts/runE2e.ts +62 -0
  16. package/e2e/scripts/runE2eArgs.test.ts +75 -0
  17. package/e2e/scripts/runE2eArgs.ts +158 -0
  18. package/e2e/specs/{a-commerce/commerce.spec.ts → a-commerce.spec.ts} +364 -33
  19. package/e2e/specs/{cabloy-basic/account.spec.ts → account.spec.ts} +1 -2
  20. package/e2e/specs/{cabloy-basic/basic.spec.ts → cabloy-basic.spec.ts} +6 -8
  21. package/oxlint.config.ts +3 -0
  22. package/package.json +3 -9
  23. package/scripts/upgrade.ts +63 -68
  24. package/vona/packages-utils/lint/package.json +1 -1
  25. package/vona/packages-utils/lint/src/oxc/lint.ts +1 -1
  26. package/vona/packages-utils/lint/src/oxc/lintVue.ts +1 -1
  27. package/vona/pnpm-lock.yaml +100 -657
  28. package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/refundRecoveryView.tsx +7 -2
  29. package/vona/src/suite/a-commerce/modules/commerce-trade/src/service/order.ts +31 -15
  30. package/vona/src/suite/a-home/modules/home-user/package.json +1 -0
  31. package/vona/src/suite/a-home/modules/home-user/src/service/account.ts +15 -2
  32. package/vona/src/suite/a-home/modules/home-user/test/accountActivation.test.ts +34 -4
  33. package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/package.json +2 -1
  34. package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/.metadata/index.ts +26 -0
  35. package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/bean/imageScene.markdown.ts +13 -0
  36. package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
  37. package/vona/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
  38. package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/providerOperation.ts +23 -0
  39. package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/refundOperation.ts +7 -0
  40. package/vona/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
  41. package/vona/src/suite-vendor/a-pay/modules/pay-paypal/package.json +1 -1
  42. package/vona/src/suite-vendor/a-pay/modules/pay-stripe/package.json +1 -1
  43. package/vona/src/suite-vendor/a-pay/package.json +5 -5
  44. package/zova/packages-utils/zova-jsx/package.json +2 -2
  45. package/zova/packages-zova/zova/package.json +3 -3
  46. package/zova/packages-zova/zova-core/package.json +1 -1
  47. package/zova/packages-zova/zova-core/src/bean/resource/locale/type.ts +1 -0
  48. package/zova/pnpm-lock.yaml +63 -18
  49. package/zova/src/front/config/config/config.cabloyBasicWeb.ts +3 -1
  50. package/zova/src/front/config/config/config.cabloyCommerce.ts +4 -2
  51. package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/schemas.ts +0 -11
  52. package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/types.ts +23 -170
  53. package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/schemas.ts +0 -11
  54. package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/types.ts +23 -170
  55. package/zova/src/suite/a-commerce/modules/commerce-member/src/page/address/controller.tsx +64 -63
  56. package/zova/src/suite/a-commerce/modules/commerce-promotion/src/api/openapi/schemas.ts +0 -11
  57. package/zova/src/suite/a-commerce/modules/commerce-promotion/src/api/openapi/types.ts +23 -170
  58. package/zova/src/suite/a-commerce/modules/commerce-siteadmin/src/api/openapi/schemas.ts +0 -11
  59. package/zova/src/suite/a-commerce/modules/commerce-siteadmin/src/api/openapi/types.ts +23 -170
  60. package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/schemas.ts +0 -11
  61. package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/types.ts +29 -171
  62. package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionRefund/controller.tsx +413 -134
  63. package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/en-us.ts +76 -0
  64. package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/zh-cn.ts +67 -0
  65. package/zova/src/suite/a-commerce/modules/commerce-trade/src/model/order.ts +1 -0
  66. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/cart/controller.tsx +1 -1
  67. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/checkout/controller.tsx +7 -7
  68. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/order/controller.tsx +46 -9
  69. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +50 -30
  70. package/zova/src/suite/a-home/modules/home-api/src/api/openapi/schemas.ts +0 -11
  71. package/zova/src/suite/a-home/modules/home-api/src/api/openapi/types.ts +23 -170
  72. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +0 -11
  73. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +23 -170
  74. package/zova/src/suite/cabloy-basic/modules/basic-captcha/src/component/formFieldCaptcha/controller.tsx +6 -2
  75. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/schemas.ts +0 -11
  76. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/types.ts +23 -170
  77. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +0 -11
  78. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +23 -170
  79. package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +9 -15
  80. package/zova/src/suite/cabloy-basic/modules/basic-markdown/package.json +10 -2
  81. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/index.ts +11 -2
  82. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/locales.ts +7 -0
  83. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/controller.tsx +723 -5
  84. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/render.tsx +461 -2
  85. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/config/locale/en-us.ts +59 -0
  86. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/config/locale/zh-cn.ts +59 -0
  87. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/index.ts +1 -0
  88. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/codeBlockLanguages.ts +42 -0
  89. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/richTextContentStyle.ts +20 -0
  90. package/zova/src/suite/cabloy-basic/modules/basic-markdown/test/lib/codeBlockLanguages.test.ts +25 -0
  91. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
  92. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +1 -0
  93. package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
  94. package/zova/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
  95. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/schemas.ts +0 -11
  96. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/types.ts +23 -170
  97. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/component/paymentNextAction/controller.tsx +26 -12
  98. package/zova/src/suite-vendor/a-pay/modules/pay-mock/cli/openapi.config.ts +1 -1
  99. package/zova/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
  100. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/openapi/schemas.ts +0 -11
  101. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/openapi/types.ts +23 -170
  102. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/payMockMockPayment.ts +26 -0
  103. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/apiSchema/payMockMockPayment.ts +8 -1
  104. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/model/payMockPayment.ts +13 -1
  105. package/zova/src/suite-vendor/a-pay/package.json +3 -3
  106. package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +1 -1
  107. package/zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx +2 -0
  108. package/zova/src/suite-vendor/a-zova/modules/a-form/src/types/formField.ts +7 -6
  109. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +1 -1
  110. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/src/service/ssrHandler.ts +1 -1
  111. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
  112. package/zova/src/suite-vendor/a-zova/package.json +4 -4
  113. package/e2e/config/playwright.basic.config.ts +0 -3
  114. package/e2e/config/playwright.commerce.config.ts +0 -3
  115. package/e2e/config/playwright.shared.config.ts +0 -38
  116. package/e2e/scripts/testE2eClean.ts +0 -56
  117. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/package.json +0 -56
  118. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/index.ts +0 -404
  119. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/locales.ts +0 -18
  120. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/this.ts +0 -2
  121. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/bean.paypal.ts +0 -99
  122. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/event.paypalCancelOrder.ts +0 -15
  123. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/event.paypalCaptureOrder.ts +0 -22
  124. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/meta.version.ts +0 -24
  125. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/config.ts +0 -14
  126. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/errors.ts +0 -3
  127. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/locale/en-us.ts +0 -3
  128. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/locale/zh-cn.ts +0 -3
  129. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/controller/paypal.ts +0 -39
  130. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/dto/paypalOrderRecordOptions.tsx +0 -31
  131. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/dto/paypalOrderRecordPayload.tsx +0 -18
  132. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/entity/paypalRecord.tsx +0 -30
  133. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/index.ts +0 -3
  134. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/model/paypalRecord.ts +0 -10
  135. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/service/paypal.ts +0 -83
  136. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/types/index.ts +0 -1
  137. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/types/paypal.ts +0 -18
  138. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/tsconfig.build.json +0 -11
  139. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/tsconfig.json +0 -7
  140. package/vona/src/suite-vendor/a-paypal/package.json +0 -13
  141. package/vona/src/suite-vendor/a-paypal/tsconfig.base.json +0 -4
  142. package/vona/src/suite-vendor/a-paypal/tsconfig.json +0 -10
@@ -0,0 +1,25 @@
1
+ import assert from 'node:assert/strict';
2
+ import test from 'node:test';
3
+
4
+ import {
5
+ codeBlockLanguages,
6
+ getCodeBlockLanguage,
7
+ isCodeBlockLanguage,
8
+ } from '../../src/lib/codeBlockLanguages.js';
9
+
10
+ test('Code block languages contain stable unique identifiers', () => {
11
+ assert.equal(new Set(codeBlockLanguages).size, codeBlockLanguages.length);
12
+ assert.equal(codeBlockLanguages.includes('typescript'), true);
13
+ assert.equal(codeBlockLanguages.includes('python'), true);
14
+ });
15
+
16
+ test('Code block languages normalize supported aliases without treating unknown values as plain text', () => {
17
+ assert.equal(getCodeBlockLanguage('ts'), 'typescript');
18
+ assert.equal(getCodeBlockLanguage('js'), 'javascript');
19
+ assert.equal(getCodeBlockLanguage('sh'), 'shell');
20
+ assert.equal(getCodeBlockLanguage('plaintext'), undefined);
21
+ assert.equal(getCodeBlockLanguage(undefined), undefined);
22
+ assert.equal(isCodeBlockLanguage('typescript'), true);
23
+ assert.equal(isCodeBlockLanguage('ts'), true);
24
+ assert.equal(isCodeBlockLanguage('plaintext'), false);
25
+ });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-rest-resource",
3
- "version": "5.1.45",
3
+ "version": "5.1.46",
4
4
  "gitHead": "4dece229b6d3f4735930e833afcb4b95ec51bf86",
5
5
  "description": "",
6
6
  "keywords": [
@@ -26,6 +26,7 @@ interface IModelResourceQueryItemOptions<TData> {
26
26
  queryFn: () => Promise<TData>;
27
27
  meta?: {
28
28
  disableSuspenseOnInit?: boolean;
29
+ disableErrorEffect?: boolean;
29
30
  };
30
31
  }
31
32
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-suite-a-cabloy",
3
- "version": "5.1.46",
3
+ "version": "5.1.47",
4
4
  "gitHead": "4dece229b6d3f4735930e833afcb4b95ec51bf86",
5
5
  "description": "",
6
6
  "author": "",
@@ -8,7 +8,7 @@
8
8
  "type": "module",
9
9
  "dependencies": {
10
10
  "zova-module-a-rbac": "^5.0.1",
11
- "zova-module-rest-resource": "^5.1.45"
11
+ "zova-module-rest-resource": "^5.1.46"
12
12
  },
13
13
  "title": "a-cabloy"
14
14
  }
@@ -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"
@@ -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
  }
@@ -3,7 +3,7 @@ import type { ZovaOpenapiConfigModule } from 'zova-openapi';
3
3
  export default function (): ZovaOpenapiConfigModule {
4
4
  return {
5
5
  operations: {
6
- match: ['PayMockMockPayment_complete'],
6
+ match: ['PayMockMockPayment_complete', 'PayMockMockPayment_completeRefund'],
7
7
  },
8
8
  };
9
9
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-pay-mock",
3
- "version": "5.0.3",
3
+ "version": "5.0.5",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "Zova Module"
@@ -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;
@@ -17,6 +17,19 @@ export type ApiApiPayMockMockPaymentcompleteRequestBody =
17
17
  export type ApiApiPayMockMockPaymentcompleteResponseBody =
18
18
  paths[ApiApiPayMockMockPaymentcompletePath][ApiApiPayMockMockPaymentcompleteMethod]['responses']['200']['content']['application/json']['data'];
19
19
 
20
+ /** PayMockMockPayment_completeRefund */
21
+ export const ApiApiPayMockMockPaymentcompleteRefundPath =
22
+ '/api/pay/mock/payment-session/refund-operation/{id}/complete';
23
+ export type ApiApiPayMockMockPaymentcompleteRefundPath =
24
+ '/api/pay/mock/payment-session/refund-operation/{id}/complete';
25
+ export type ApiApiPayMockMockPaymentcompleteRefundMethod = 'post';
26
+ export type ApiApiPayMockMockPaymentcompleteRefundRequestParams =
27
+ paths[ApiApiPayMockMockPaymentcompleteRefundPath][ApiApiPayMockMockPaymentcompleteRefundMethod]['parameters']['path'];
28
+ export type ApiApiPayMockMockPaymentcompleteRefundRequestBody =
29
+ components['schemas']['pay-mock.dto.mockRefundComplete'];
30
+ export type ApiApiPayMockMockPaymentcompleteRefundResponseBody =
31
+ paths[ApiApiPayMockMockPaymentcompleteRefundPath][ApiApiPayMockMockPaymentcompleteRefundMethod]['responses']['200']['content']['application/json']['data'];
32
+
20
33
  @Api()
21
34
  export class ApiPayMockMockPayment extends BeanApiBase {
22
35
  complete(
@@ -31,4 +44,17 @@ export class ApiPayMockMockPayment extends BeanApiBase {
31
44
  this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
32
45
  );
33
46
  }
47
+
48
+ completeRefund(
49
+ body: ApiApiPayMockMockPaymentcompleteRefundRequestBody,
50
+ options: {
51
+ params: ApiApiPayMockMockPaymentcompleteRefundRequestParams;
52
+ } & IApiActionOptions,
53
+ ) {
54
+ return this.$fetch.post<any, ApiApiPayMockMockPaymentcompleteRefundResponseBody>(
55
+ this.$pathTranslate(ApiApiPayMockMockPaymentcompleteRefundPath, options.params),
56
+ body,
57
+ this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
58
+ );
59
+ }
34
60
  }