cabloy 5.1.134 → 5.1.136
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/.cabloy-version +1 -1
- package/.claude/skills/cabloy-backend-scaffold/SKILL.md +9 -0
- package/.claude/skills/cabloy-zova-source-reading/SKILL.md +24 -1
- package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +12 -0
- package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +28 -0
- package/.github/workflows/playwright-e2e.yml +2 -2
- package/.github/workflows/vona-test-pg.yml +1 -1
- package/.github/workflows/vona-test-sqlite3.yml +1 -1
- package/CHANGELOG.md +38 -0
- package/CLAUDE.md +1 -0
- package/cabloy-docs/.vitepress/config.mjs +7 -0
- package/cabloy-docs/backend/markdown-guide.md +189 -0
- package/cabloy-docs/frontend/component-guide.md +6 -0
- package/cabloy-docs/frontend/css-in-js-guide.md +6 -0
- package/cabloy-docs/frontend/markdown-guide.md +258 -0
- package/cabloy-docs/frontend/page-guide.md +48 -0
- package/cabloy-docs/frontend/page-params-guide.md +4 -2
- package/cabloy-docs/frontend/page-route-guide.md +2 -2
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +2 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +53 -9
- package/cabloy-docs/fullstack/a-pay-payment-suite.md +333 -0
- package/cabloy-docs/fullstack/payment-sandbox-configuration.md +285 -0
- package/e2e/specs/a-commerce/commerce.spec.ts +503 -47
- package/e2e/specs/cabloy-basic/basic.spec.ts +30 -0
- package/package.json +1 -1
- package/vona/env/.env +2 -0
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/cli/templates/init/error/boilerplate/config/errors.ts +6 -1
- package/vona/packages-cli/cli-set-api/cli/templates/tools/crudBasic/boilerplate/src/entity/{{resourceName}}.tsx_ +2 -0
- package/vona/packages-cli/cli-set-api/cli/templates/tools/crudStart/boilerplate/src/entity/{{resourceName}}.tsx_ +2 -0
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-utils/localeutil/package.json +1 -1
- package/vona/packages-utils/localeutil/src/util.ts +1 -1
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/patches/{zova-core@5.1.82.patch → zova-core@5.1.84.patch} +2 -2
- package/vona/pnpm-lock.yaml +826 -270
- package/vona/pnpm-workspace.yaml +1 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/package.json +1 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/.metadata/index.ts +99 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/bean/meta.index.ts +1 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/bean/meta.version.ts +19 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/config/locale/en-us.ts +3 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/config/locale/zh-cn.ts +3 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/controller/product.ts +3 -3
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productContentUpdate.tsx +14 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productContentView.tsx +19 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productCreate.tsx +48 -3
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productPublicDetail.tsx +15 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productUpdate.tsx +48 -3
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/productView.tsx +52 -3
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/entity/productContent.tsx +36 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/model/product.ts +6 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/model/productContent.ts +22 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/service/product.ts +82 -6
- package/vona/src/suite/a-commerce/modules/commerce-catalog/test/productContent.test.ts +271 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/test/productPresentation.test.ts +81 -2
- package/vona/src/suite/a-commerce/modules/commerce-payment/package.json +4 -1
- package/vona/src/suite/a-commerce/modules/commerce-payment/src/bean/payScene.commerceOrder.ts +32 -15
- package/vona/src/suite/a-commerce/modules/commerce-payment/test/paymentAttempt.test.ts +8 -2
- package/vona/src/suite/a-commerce/modules/commerce-siteweb/src/.metadata/index.ts +8 -2
- package/vona/src/suite/a-commerce/modules/commerce-siteweb/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-commerce/modules/commerce-siteweb/src/bean/ssrMenu.home.ts +3 -1
- package/vona/src/suite/a-commerce/modules/commerce-siteweb/src/config/locale/en-us.ts +3 -0
- package/vona/src/suite/a-commerce/modules/commerce-siteweb/src/config/locale/zh-cn.ts +3 -0
- package/vona/src/suite/a-commerce/modules/commerce-siteweb/src/index.ts +1 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/controller/checkout.ts +13 -2
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/lib/providerReference.ts +18 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/service/order.ts +43 -8
- package/vona/src/suite/a-commerce/modules/commerce-trade/test/paymentOutcome.test.ts +74 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/test/providerReference.test.ts +33 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/test/refundLifecycle.test.ts +73 -0
- package/vona/src/suite/a-commerce/modules/commerce-trade/test/reservationExpiry.test.ts +2 -0
- package/vona/src/suite/a-home/modules/home-user/src/.metadata/index.ts +30 -0
- package/vona/src/suite/a-home/modules/home-user/src/bean/meta.version.ts +7 -2
- package/vona/src/suite/a-home/modules/home-user/src/config/locale/en-us.ts +4 -1
- package/vona/src/suite/a-home/modules/home-user/src/config/locale/zh-cn.ts +4 -1
- package/vona/src/suite/a-home/modules/home-user/src/config/roles.ts +4 -4
- package/vona/src/suite/a-home/modules/home-user/src/entity/role.ts +2 -2
- package/vona/src/suite/a-home/modules/home-user/src/entity/user.ts +8 -1
- package/vona/src/suite/a-home/modules/home-user/src/service/userAdapter.ts +6 -2
- package/vona/src/suite/a-home/modules/home-user/test/passportTest.test.ts +1 -0
- package/vona/src/suite/a-home/modules/home-user/test/role.test.ts +4 -4
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/package.json +64 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/.metadata/index.ts +54 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/bean/bean.markdown.ts +137 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/bean/bean.ssr.ts +17 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/lib/beanSsrSiteBase.ts +11 -3
- package/vona/src/suite-vendor/a-cabloy/package.json +2 -1
- package/vona/src/suite-vendor/a-cabloy/tsconfig.json +3 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/bean/meta.version.ts +1 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/entity/providerOperation.tsx +8 -1
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/lib/index.ts +1 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/lib/providerOperationFailure.ts +8 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/providerOperation.ts +187 -29
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/types/payment.ts +4 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/src/bean/payProvider.paypal.ts +0 -6
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/package.json +2 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/src/bean/payProvider.stripe.ts +458 -22
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/src/lib/stripeGateway.ts +85 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/src/types/index.ts +2 -0
- package/vona/src/suite-vendor/a-pay/package.json +5 -5
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +1 -0
- package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/bean.passport.ts +14 -0
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/guard.passport.ts +4 -0
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/types/role.ts +3 -2
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/types/user.ts +4 -0
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/packages-utils/logger/package.json +2 -2
- package/zova/packages-utils/zova-jsx/package.json +2 -2
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +3 -3
- package/zova/packages-zova/zova-core/src/core/sys/resource.ts +1 -1
- package/zova/packages-zova/zova-core/src/core/sys/util.ts +8 -0
- package/zova/pnpm-lock.yaml +570 -11
- package/zova/src/front/config/config/config.cabloyCommerce.ts +0 -6
- package/zova/src/suite/a-commerce/modules/commerce-catalog/package.json +3 -1
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/schemas.ts +236 -36
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/types.ts +4962 -2402
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/config/locale/en-us.ts +1 -0
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/config/locale/zh-cn.ts +1 -0
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/page/product/controller.tsx +8 -3
- package/zova/src/suite/a-commerce/modules/commerce-member/src/.metadata/index.ts +6 -7
- package/zova/src/suite/a-commerce/modules/commerce-member/src/page/address/controller.tsx +1 -3
- package/zova/src/suite/a-commerce/modules/commerce-member/src/routes.ts +2 -3
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/.metadata/index.ts +13 -20
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/cart/controller.tsx +3 -9
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/checkout/controller.tsx +9 -11
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/order/controller.tsx +0 -1
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/orders/controller.tsx +6 -4
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +78 -17
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/routes.ts +10 -13
- package/zova/src/suite/a-home/modules/home-api/mock/passport.fake.ts +3 -3
- package/zova/src/suite/a-home/modules/home-api/src/.metadata/index.ts +31 -1
- package/zova/src/suite/a-home/modules/home-api/src/api/homeBaseSiteCatalog.ts +24 -0
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/schemas.ts +329 -17
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/types.ts +5866 -1829
- package/zova/src/suite/a-home/modules/home-api/src/apiSchema/homeBaseSiteCatalog.ts +13 -0
- package/zova/src/suite/a-home/modules/home-base/src/component/page/controller.tsx +1 -0
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.header.tsx +0 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/types/detail.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/package.json +61 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/component/formFieldMarkdown.ts +36 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/component/markdownHtml.ts +36 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/index.ts +147 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/this.ts +2 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/controller.tsx +111 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/render.tsx +40 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/style.ts +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/markdownHtml/controller.tsx +17 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/markdownHtml/render.tsx +9 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/markdownHtml/style.ts +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/richTextContentStyle.ts +142 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/tsconfig.build.json +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/tsconfig.json +5 -0
- package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPage/controller.tsx +25 -3
- package/zova/src/suite/cabloy-basic/modules/basic-page/src/types/page.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-pageentry/src/types/pageEntry.ts +1 -0
- package/zova/src/suite/cabloy-basic/package.json +1 -0
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +7 -0
- package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-logger/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-router/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/bean/sys.router.ts +3 -2
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/test/lib/ssrProfile.test.ts +88 -0
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +5 -5
- package/.claude/scheduled_tasks.lock +0 -1
|
@@ -5,6 +5,7 @@ import { z } from 'zod';
|
|
|
5
5
|
import { BeanControllerPageBase, Use } from 'zova';
|
|
6
6
|
import { Controller } from 'zova-module-a-bean';
|
|
7
7
|
import { $QueryEnsureLoaded } from 'zova-module-a-model';
|
|
8
|
+
import { ZMarkdownHtml } from 'zova-module-basic-markdown';
|
|
8
9
|
import { ZPage } from 'zova-module-home-base';
|
|
9
10
|
|
|
10
11
|
import { ModelCatalogue } from '../../model/catalogue.js';
|
|
@@ -45,9 +46,7 @@ export class ControllerPageProduct extends BeanControllerPageBase {
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
private _getCartPagePath(): string {
|
|
48
|
-
return this.$router.
|
|
49
|
-
params: { locale: true },
|
|
50
|
-
})!;
|
|
49
|
+
return this.$router.getPagePath('/commerce/trade/cart');
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
private _renderCartBadge() {
|
|
@@ -69,6 +68,12 @@ export class ControllerPageProduct extends BeanControllerPageBase {
|
|
|
69
68
|
{query.data.description && (
|
|
70
69
|
<p class="text-base-content/70">{query.data.description}</p>
|
|
71
70
|
)}
|
|
71
|
+
{query.data.descriptionHtml && (
|
|
72
|
+
<ZMarkdownHtml
|
|
73
|
+
class="product-description mt-6 max-w-none text-base-content"
|
|
74
|
+
html={query.data.descriptionHtml}
|
|
75
|
+
/>
|
|
76
|
+
)}
|
|
72
77
|
<div class="mt-4 flex justify-end">
|
|
73
78
|
<RouterLink class="btn btn-outline btn-sm gap-2" to={this._getCartPagePath()}>
|
|
74
79
|
{this.scope.locale.Cart()}
|
|
@@ -160,20 +160,19 @@ import { TypePagePathSchema } from 'zova-module-a-router';
|
|
|
160
160
|
import 'zova';
|
|
161
161
|
declare module 'zova-module-a-router' {
|
|
162
162
|
export interface IPagePathRecord {
|
|
163
|
-
'/commerce/member/address
|
|
163
|
+
'/commerce/member/address': TypePagePathSchema<NSControllerPageAddress.ParamsInput,NSControllerPageAddress.QueryInput>;
|
|
164
164
|
}
|
|
165
165
|
export interface IPageNameRecord {
|
|
166
|
-
|
|
166
|
+
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
export const pagePathSchemas = {
|
|
170
|
-
|
|
171
|
-
};
|
|
172
|
-
export const pageNameSchemas = {
|
|
173
|
-
'commerce-member:address': {
|
|
174
|
-
params: NSControllerPageAddress.paramsSchema,
|
|
170
|
+
'/commerce/member/address': {
|
|
175
171
|
query: NSControllerPageAddress.querySchema,
|
|
176
172
|
},
|
|
173
|
+
};
|
|
174
|
+
export const pageNameSchemas = {
|
|
175
|
+
|
|
177
176
|
};
|
|
178
177
|
declare module 'zova-module-commerce-member' {
|
|
179
178
|
export interface ControllerPageAddress {
|
|
@@ -13,9 +13,7 @@ import type {
|
|
|
13
13
|
|
|
14
14
|
import { ModelAddressMine } from '../../model/addressMine.js';
|
|
15
15
|
|
|
16
|
-
export const ControllerPageAddressSchemaParams = z.object({
|
|
17
|
-
locale: z.string().optional(),
|
|
18
|
-
});
|
|
16
|
+
export const ControllerPageAddressSchemaParams = z.object({});
|
|
19
17
|
export const ControllerPageAddressSchemaQuery = z.object({});
|
|
20
18
|
|
|
21
19
|
type AddressDraft = ApiApiCommerceMemberAddresscreateMineRequestBody;
|
|
@@ -4,9 +4,8 @@ import { ZPageAddress } from './.metadata/page/address.js';
|
|
|
4
4
|
|
|
5
5
|
export const routes: IModuleRoute[] = [
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
path: 'address/:locale?',
|
|
7
|
+
path: 'address',
|
|
9
8
|
component: ZPageAddress,
|
|
10
|
-
meta: {
|
|
9
|
+
meta: { requiresAuth: true, ssrProfile: 'session' },
|
|
11
10
|
},
|
|
12
11
|
];
|
|
@@ -292,40 +292,33 @@ import { TypePagePathSchema } from 'zova-module-a-router';
|
|
|
292
292
|
import 'zova';
|
|
293
293
|
declare module 'zova-module-a-router' {
|
|
294
294
|
export interface IPagePathRecord {
|
|
295
|
-
'/commerce/trade/cart
|
|
296
|
-
'/commerce/trade/checkout
|
|
297
|
-
'/commerce/trade/order/:id
|
|
298
|
-
'/commerce/trade/orders
|
|
299
|
-
'/commerce/trade/payment/:paymentSessionId/:orderId
|
|
295
|
+
'/commerce/trade/cart': TypePagePathSchema<NSControllerPageCart.ParamsInput,NSControllerPageCart.QueryInput>;
|
|
296
|
+
'/commerce/trade/checkout': TypePagePathSchema<NSControllerPageCheckout.ParamsInput,NSControllerPageCheckout.QueryInput>;
|
|
297
|
+
'/commerce/trade/order/:id': TypePagePathSchema<NSControllerPageOrder.ParamsInput,NSControllerPageOrder.QueryInput>;
|
|
298
|
+
'/commerce/trade/orders': TypePagePathSchema<NSControllerPageOrders.ParamsInput,NSControllerPageOrders.QueryInput>;
|
|
299
|
+
'/commerce/trade/payment/:paymentSessionId/:orderId': TypePagePathSchema<NSControllerPagePayment.ParamsInput,NSControllerPagePayment.QueryInput>;
|
|
300
300
|
}
|
|
301
301
|
export interface IPageNameRecord {
|
|
302
|
-
'commerce-trade:
|
|
303
|
-
'commerce-trade:checkout': TypePagePathSchema<NSControllerPageCheckout.ParamsInput,NSControllerPageCheckout.QueryInput>;
|
|
304
|
-
'commerce-trade:order': TypePagePathSchema<NSControllerPageOrder.ParamsInput,NSControllerPageOrder.QueryInput>;
|
|
305
|
-
'commerce-trade:orders': TypePagePathSchema<NSControllerPageOrders.ParamsInput,NSControllerPageOrders.QueryInput>;
|
|
302
|
+
'commerce-trade:order': TypePagePathSchema<NSControllerPageOrder.ParamsInput,NSControllerPageOrder.QueryInput>;
|
|
306
303
|
'commerce-trade:payment': TypePagePathSchema<NSControllerPagePayment.ParamsInput,NSControllerPagePayment.QueryInput>;
|
|
307
304
|
}
|
|
308
305
|
}
|
|
309
306
|
export const pagePathSchemas = {
|
|
310
|
-
|
|
311
|
-
};
|
|
312
|
-
export const pageNameSchemas = {
|
|
313
|
-
'commerce-trade:cart': {
|
|
314
|
-
params: NSControllerPageCart.paramsSchema,
|
|
307
|
+
'/commerce/trade/cart': {
|
|
315
308
|
query: NSControllerPageCart.querySchema,
|
|
316
309
|
},
|
|
317
|
-
'commerce
|
|
318
|
-
params: NSControllerPageCheckout.paramsSchema,
|
|
310
|
+
'/commerce/trade/checkout': {
|
|
319
311
|
query: NSControllerPageCheckout.querySchema,
|
|
320
312
|
},
|
|
313
|
+
'/commerce/trade/orders': {
|
|
314
|
+
query: NSControllerPageOrders.querySchema,
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
export const pageNameSchemas = {
|
|
321
318
|
'commerce-trade:order': {
|
|
322
319
|
params: NSControllerPageOrder.paramsSchema,
|
|
323
320
|
query: NSControllerPageOrder.querySchema,
|
|
324
321
|
},
|
|
325
|
-
'commerce-trade:orders': {
|
|
326
|
-
params: NSControllerPageOrders.paramsSchema,
|
|
327
|
-
query: NSControllerPageOrders.querySchema,
|
|
328
|
-
},
|
|
329
322
|
'commerce-trade:payment': {
|
|
330
323
|
params: NSControllerPagePayment.paramsSchema,
|
|
331
324
|
query: NSControllerPagePayment.querySchema,
|
|
@@ -7,9 +7,7 @@ import { ZPage } from 'zova-module-home-base';
|
|
|
7
7
|
|
|
8
8
|
import { ModelCart } from '../../model/cart.js';
|
|
9
9
|
|
|
10
|
-
export const ControllerPageCartSchemaParams = z.object({
|
|
11
|
-
locale: z.string().optional(),
|
|
12
|
-
});
|
|
10
|
+
export const ControllerPageCartSchemaParams = z.object({});
|
|
13
11
|
export const ControllerPageCartSchemaQuery = z.object({});
|
|
14
12
|
|
|
15
13
|
@Controller()
|
|
@@ -40,15 +38,11 @@ export class ControllerPageCart extends BeanControllerPageBase {
|
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
private _getAddressPagePath(): string {
|
|
43
|
-
return this.$router.
|
|
44
|
-
params: { locale: true },
|
|
45
|
-
})!;
|
|
41
|
+
return this.$router.getPagePath('/commerce/member/address');
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
private _getCheckoutPagePath(): string {
|
|
49
|
-
return this.$router.
|
|
50
|
-
params: { locale: true },
|
|
51
|
-
})!;
|
|
45
|
+
return this.$router.getPagePath('/commerce/trade/checkout');
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
protected render() {
|
|
@@ -8,9 +8,7 @@ import { ZPage } from 'zova-module-home-base';
|
|
|
8
8
|
|
|
9
9
|
import { ModelCart } from '../../model/cart.js';
|
|
10
10
|
|
|
11
|
-
export const ControllerPageCheckoutSchemaParams = z.object({
|
|
12
|
-
locale: z.string().optional(),
|
|
13
|
-
});
|
|
11
|
+
export const ControllerPageCheckoutSchemaParams = z.object({});
|
|
14
12
|
export const ControllerPageCheckoutSchemaQuery = z.object({});
|
|
15
13
|
|
|
16
14
|
@Controller()
|
|
@@ -59,14 +57,14 @@ export class ControllerPageCheckout extends BeanControllerPageBase {
|
|
|
59
57
|
correlationId: `${Date.now()}-${Math.random().toString(36).slice(2, 12)}`,
|
|
60
58
|
providerCandidateKey: this.providerCandidateKey,
|
|
61
59
|
});
|
|
62
|
-
this.$router.push(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
|
|
60
|
+
this.$router.push(
|
|
61
|
+
this.$router.getPagePath('/commerce/trade/payment/:paymentSessionId/:orderId', {
|
|
62
|
+
params: {
|
|
63
|
+
paymentSessionId: String(result.paymentSessionId),
|
|
64
|
+
orderId: String(result.orderId),
|
|
65
|
+
},
|
|
66
|
+
}),
|
|
67
|
+
);
|
|
70
68
|
} finally {
|
|
71
69
|
this.submitting = false;
|
|
72
70
|
}
|
|
@@ -6,9 +6,7 @@ import { ZPage } from 'zova-module-home-base';
|
|
|
6
6
|
|
|
7
7
|
import { ModelOrderMine } from '../../model/orderMine.js';
|
|
8
8
|
|
|
9
|
-
export const ControllerPageOrdersSchemaParams = z.object({
|
|
10
|
-
locale: z.string().optional(),
|
|
11
|
-
});
|
|
9
|
+
export const ControllerPageOrdersSchemaParams = z.object({});
|
|
12
10
|
export const ControllerPageOrdersSchemaQuery = z.object({});
|
|
13
11
|
|
|
14
12
|
@Controller()
|
|
@@ -28,7 +26,11 @@ export class ControllerPageOrders extends BeanControllerPageBase {
|
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
viewOrder(id: string) {
|
|
31
|
-
this.$router.push(
|
|
29
|
+
this.$router.push(
|
|
30
|
+
this.$router.getPagePath('/commerce/trade/order/:id', {
|
|
31
|
+
params: { id },
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
protected render() {
|
|
@@ -13,7 +13,6 @@ import { ModelOrderMine } from '../../model/orderMine.js';
|
|
|
13
13
|
export const ControllerPagePaymentSchemaParams = z.object({
|
|
14
14
|
paymentSessionId: z.string(),
|
|
15
15
|
orderId: z.string(),
|
|
16
|
-
locale: z.string().optional(),
|
|
17
16
|
});
|
|
18
17
|
export const ControllerPagePaymentSchemaQuery = z.object({
|
|
19
18
|
providerResult: z.enum(['return', 'cancel']).optional(),
|
|
@@ -23,6 +22,10 @@ type TypeMockPaymentOutcome = 'succeeded' | 'failed' | 'cancelled';
|
|
|
23
22
|
|
|
24
23
|
const SettlementPollDelaysMilliseconds = [0, 1_000, 2_000, 4_000, 5_000, 5_000, 5_000, 5_000];
|
|
25
24
|
|
|
25
|
+
function isNotFoundError(error: unknown) {
|
|
26
|
+
return (error as { status?: unknown } | undefined)?.status === 404;
|
|
27
|
+
}
|
|
28
|
+
|
|
26
29
|
@Controller()
|
|
27
30
|
export class ControllerPagePayment extends BeanControllerPageBase {
|
|
28
31
|
@Use({ beanFullName: 'a-pay.model.paymentSession' })
|
|
@@ -34,8 +37,6 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
34
37
|
@Use()
|
|
35
38
|
$$modelOrderMine: ModelOrderMine;
|
|
36
39
|
|
|
37
|
-
paymentSessionId?: string;
|
|
38
|
-
orderId?: string;
|
|
39
40
|
submitting = false;
|
|
40
41
|
waitingForOrder = false;
|
|
41
42
|
pendingConfirmation = false;
|
|
@@ -43,11 +44,15 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
43
44
|
pendingOrderState?: string;
|
|
44
45
|
pendingNextAction?: TypePaymentNextAction;
|
|
45
46
|
cancelReturnReconciled = false;
|
|
47
|
+
paymentSessionUnavailable = false;
|
|
46
48
|
message?: string;
|
|
49
|
+
private _settlementPollVersion = 0;
|
|
50
|
+
|
|
51
|
+
protected __dispose__() {
|
|
52
|
+
this._settlementPollVersion += 1;
|
|
53
|
+
}
|
|
47
54
|
|
|
48
55
|
protected async __init__() {
|
|
49
|
-
this.paymentSessionId = this.$computed(() => this.$params.paymentSessionId);
|
|
50
|
-
this.orderId = this.$computed(() => this.$params.orderId);
|
|
51
56
|
if (process.env.SERVER) {
|
|
52
57
|
await $QueryEnsureLoaded(() => this.queryPaymentSession);
|
|
53
58
|
}
|
|
@@ -65,12 +70,20 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
|
|
73
|
+
get paymentSessionId() {
|
|
74
|
+
return this.$params.paymentSessionId;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
get orderId() {
|
|
78
|
+
return this.$params.orderId;
|
|
79
|
+
}
|
|
80
|
+
|
|
68
81
|
get queryPaymentSession() {
|
|
69
|
-
return this.$$modelPaymentSession.view(this.paymentSessionId
|
|
82
|
+
return this.$$modelPaymentSession.view(this.paymentSessionId);
|
|
70
83
|
}
|
|
71
84
|
|
|
72
85
|
get queryOrder() {
|
|
73
|
-
return this.$$modelOrderMine.viewMine(this.orderId
|
|
86
|
+
return this.$$modelOrderMine.viewMine(this.orderId);
|
|
74
87
|
}
|
|
75
88
|
|
|
76
89
|
async reconcile({ waitForSettlement = true }: { waitForSettlement?: boolean } = {}) {
|
|
@@ -81,6 +94,7 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
81
94
|
this.pendingSessionState = undefined;
|
|
82
95
|
this.pendingOrderState = undefined;
|
|
83
96
|
this.pendingNextAction = undefined;
|
|
97
|
+
this.paymentSessionUnavailable = false;
|
|
84
98
|
this.message = undefined;
|
|
85
99
|
try {
|
|
86
100
|
await this.$$modelPaymentSession.reconcile(this.paymentSessionId).mutateAsync();
|
|
@@ -112,10 +126,11 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
112
126
|
}
|
|
113
127
|
|
|
114
128
|
async openOrder() {
|
|
115
|
-
await this.$router.push(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
129
|
+
await this.$router.push(
|
|
130
|
+
this.$router.getPagePath('/commerce/trade/order/:id', {
|
|
131
|
+
params: { id: this.orderId! },
|
|
132
|
+
}),
|
|
133
|
+
);
|
|
119
134
|
}
|
|
120
135
|
|
|
121
136
|
async refreshOrderStatus() {
|
|
@@ -138,13 +153,26 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
138
153
|
}
|
|
139
154
|
|
|
140
155
|
private async _waitForSettlement(outcome?: TypeMockPaymentOutcome) {
|
|
156
|
+
const pollVersion = ++this._settlementPollVersion;
|
|
141
157
|
this.waitingForOrder = true;
|
|
142
158
|
const terminalSessionState = outcome;
|
|
143
159
|
const terminalOrderState = outcome === 'succeeded' ? 'paid' : outcome ? 'cancelled' : undefined;
|
|
144
160
|
try {
|
|
145
161
|
for (const [attempt, delay] of SettlementPollDelaysMilliseconds.entries()) {
|
|
146
162
|
if (delay > 0) await new Promise(resolve => setTimeout(resolve, delay));
|
|
147
|
-
|
|
163
|
+
if (!this._isCurrentSettlementPoll(pollVersion)) return;
|
|
164
|
+
let session;
|
|
165
|
+
try {
|
|
166
|
+
session = await this.queryPaymentSession?.refetch();
|
|
167
|
+
} catch (error) {
|
|
168
|
+
if (isNotFoundError(error)) {
|
|
169
|
+
this.paymentSessionUnavailable = true;
|
|
170
|
+
this.message = 'Payment session is unavailable. You can open your order.';
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
throw error;
|
|
174
|
+
}
|
|
175
|
+
if (!this._isCurrentSettlementPoll(pollVersion)) return;
|
|
148
176
|
const sessionState = session?.data?.state;
|
|
149
177
|
this.pendingSessionState = sessionState;
|
|
150
178
|
this.pendingNextAction = session?.data?.nextAction;
|
|
@@ -156,6 +184,7 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
156
184
|
const order = await this.scope.api.commerceTradeOrder.viewMine({
|
|
157
185
|
params: { id: this.orderId! },
|
|
158
186
|
});
|
|
187
|
+
if (!this._isCurrentSettlementPoll(pollVersion)) return;
|
|
159
188
|
this.pendingSessionState = sessionState;
|
|
160
189
|
this.pendingOrderState = order?.state;
|
|
161
190
|
const settled =
|
|
@@ -164,23 +193,30 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
164
193
|
: ['paid', 'cancelled', 'expired'].includes(order?.state ?? '');
|
|
165
194
|
if (settled) {
|
|
166
195
|
await this.queryOrder?.refetch();
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
196
|
+
if (!this._isCurrentSettlementPoll(pollVersion)) return;
|
|
197
|
+
await this.$router.push(
|
|
198
|
+
this.$router.getPagePath('/commerce/trade/order/:id', {
|
|
199
|
+
params: { id: this.orderId! },
|
|
200
|
+
}),
|
|
201
|
+
);
|
|
171
202
|
return;
|
|
172
203
|
}
|
|
173
204
|
if (attempt === SettlementPollDelaysMilliseconds.length - 1) break;
|
|
174
205
|
}
|
|
206
|
+
if (!this._isCurrentSettlementPoll(pollVersion)) return;
|
|
175
207
|
this.pendingConfirmation = true;
|
|
176
208
|
this.pendingSessionState = this.queryPaymentSession?.data?.state ?? this.pendingSessionState;
|
|
177
209
|
this.pendingOrderState = this.queryOrder?.data?.state ?? this.pendingOrderState;
|
|
178
210
|
this.message = this._pendingMessage();
|
|
179
211
|
} finally {
|
|
180
|
-
this.waitingForOrder = false;
|
|
212
|
+
if (this._isCurrentSettlementPoll(pollVersion)) this.waitingForOrder = false;
|
|
181
213
|
}
|
|
182
214
|
}
|
|
183
215
|
|
|
216
|
+
private _isCurrentSettlementPoll(pollVersion: number) {
|
|
217
|
+
return this._settlementPollVersion === pollVersion;
|
|
218
|
+
}
|
|
219
|
+
|
|
184
220
|
private _pendingMessage() {
|
|
185
221
|
if (this.pendingSessionState === 'requires_action') {
|
|
186
222
|
return this.$query.providerResult === 'cancel'
|
|
@@ -200,6 +236,7 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
200
236
|
const session = this.queryPaymentSession?.data;
|
|
201
237
|
const isMockSession = session?.providerName === 'pay-mock:mock';
|
|
202
238
|
const isCreated = session?.state === 'created';
|
|
239
|
+
const isStarting = session?.state === 'starting';
|
|
203
240
|
const isActionable = session?.state === 'requires_action';
|
|
204
241
|
const isActionableCancelReturn =
|
|
205
242
|
this.$query.providerResult === 'cancel' && this.cancelReturnReconciled && isActionable;
|
|
@@ -228,6 +265,30 @@ export class ControllerPagePayment extends BeanControllerPageBase {
|
|
|
228
265
|
Start payment
|
|
229
266
|
</button>
|
|
230
267
|
)}
|
|
268
|
+
{(isStarting || this.paymentSessionUnavailable) && (
|
|
269
|
+
<section class="mt-6 rounded border border-base-300 p-4" aria-live="polite">
|
|
270
|
+
<p class="text-base-content/70">
|
|
271
|
+
{this.paymentSessionUnavailable
|
|
272
|
+
? 'Payment session is unavailable. You can open your order.'
|
|
273
|
+
: 'Payment preparation is being verified safely in the background.'}
|
|
274
|
+
</p>
|
|
275
|
+
<div class="mt-3 flex flex-wrap gap-3">
|
|
276
|
+
{!this.paymentSessionUnavailable && (
|
|
277
|
+
<button
|
|
278
|
+
class="btn btn-primary"
|
|
279
|
+
type="button"
|
|
280
|
+
disabled={this.submitting || this.waitingForOrder}
|
|
281
|
+
onClick={() => this.reconcile()}
|
|
282
|
+
>
|
|
283
|
+
Check payment status
|
|
284
|
+
</button>
|
|
285
|
+
)}
|
|
286
|
+
<button class="btn btn-outline" type="button" onClick={() => this.openOrder()}>
|
|
287
|
+
Open order
|
|
288
|
+
</button>
|
|
289
|
+
</div>
|
|
290
|
+
</section>
|
|
291
|
+
)}
|
|
231
292
|
{isActionableCancelReturn && (
|
|
232
293
|
<section class="mt-6 rounded border border-base-300 p-4" aria-live="polite">
|
|
233
294
|
<p class="text-base-content/70">
|
|
@@ -8,33 +8,30 @@ import { ZPagePayment } from './.metadata/page/payment.js';
|
|
|
8
8
|
|
|
9
9
|
export const routes: IModuleRoute[] = [
|
|
10
10
|
{
|
|
11
|
-
|
|
12
|
-
path: 'cart/:locale?',
|
|
11
|
+
path: 'cart',
|
|
13
12
|
component: ZPageCart,
|
|
14
|
-
meta: {
|
|
13
|
+
meta: { requiresAuth: true, ssrProfile: 'session' },
|
|
15
14
|
},
|
|
16
15
|
{
|
|
17
|
-
|
|
18
|
-
path: 'checkout/:locale?',
|
|
16
|
+
path: 'checkout',
|
|
19
17
|
component: ZPageCheckout,
|
|
20
|
-
meta: {
|
|
18
|
+
meta: { requiresAuth: true, ssrProfile: 'session' },
|
|
21
19
|
},
|
|
22
20
|
{
|
|
21
|
+
path: 'payment/:paymentSessionId/:orderId',
|
|
23
22
|
name: 'payment',
|
|
24
|
-
path: 'payment/:paymentSessionId/:orderId/:locale?',
|
|
25
23
|
component: ZPagePayment,
|
|
26
|
-
meta: {
|
|
24
|
+
meta: { requiresAuth: true, ssrProfile: 'session' },
|
|
27
25
|
},
|
|
28
26
|
{
|
|
29
|
-
|
|
30
|
-
path: 'orders/:locale?',
|
|
27
|
+
path: 'orders',
|
|
31
28
|
component: ZPageOrders,
|
|
32
|
-
meta: {
|
|
29
|
+
meta: { requiresAuth: true, ssrProfile: 'session' },
|
|
33
30
|
},
|
|
34
31
|
{
|
|
32
|
+
path: 'order/:id',
|
|
35
33
|
name: 'order',
|
|
36
|
-
path: 'order/:id/:locale?',
|
|
37
34
|
component: ZPageOrder,
|
|
38
|
-
meta: {
|
|
35
|
+
meta: { requiresAuth: true, ssrProfile: 'session' },
|
|
39
36
|
},
|
|
40
37
|
];
|
|
@@ -239,7 +239,7 @@ const __sdkSchemaPassportLogin = {
|
|
|
239
239
|
type: 'string',
|
|
240
240
|
title: '角色标题',
|
|
241
241
|
},
|
|
242
|
-
|
|
242
|
+
titleLocales: {
|
|
243
243
|
type: 'object',
|
|
244
244
|
additionalProperties: {
|
|
245
245
|
type: 'string',
|
|
@@ -415,14 +415,14 @@ export default defineFakeRoute([
|
|
|
415
415
|
id: 1,
|
|
416
416
|
name: 'registeredUser',
|
|
417
417
|
title: 'Registered User',
|
|
418
|
-
|
|
418
|
+
titleLocales: { 'zh-cn': '注册用户' },
|
|
419
419
|
siteIds: ['web'],
|
|
420
420
|
},
|
|
421
421
|
{
|
|
422
422
|
id: 2,
|
|
423
423
|
name: 'systemAdmin',
|
|
424
424
|
title: 'System Administrator',
|
|
425
|
-
|
|
425
|
+
titleLocales: { 'zh-cn': '系统管理员' },
|
|
426
426
|
siteIds: ['web', 'admin'],
|
|
427
427
|
},
|
|
428
428
|
],
|
|
@@ -4,6 +4,7 @@ export * from '../api/captcha.js';
|
|
|
4
4
|
export * from '../api/home.js';
|
|
5
5
|
export * from '../api/homeBaseMenu.js';
|
|
6
6
|
export * from '../api/homeBasePermission.js';
|
|
7
|
+
export * from '../api/homeBaseSiteCatalog.js';
|
|
7
8
|
export * from '../api/homeUserPassport.js';
|
|
8
9
|
export * from '../api/testSsrToolOne.js';
|
|
9
10
|
|
|
@@ -58,6 +59,17 @@ declare module 'zova-module-home-api' {
|
|
|
58
59
|
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
export interface ApiHomeBaseSiteCatalog {
|
|
63
|
+
/** @internal */
|
|
64
|
+
get scope(): ScopeModuleHomeApi;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ApiHomeBaseSiteCatalog {
|
|
68
|
+
get $beanFullName(): 'home-api.api.homeBaseSiteCatalog';
|
|
69
|
+
get $onionName(): 'home-api:homeBaseSiteCatalog';
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
61
73
|
export interface ApiHomeUserPassport {
|
|
62
74
|
/** @internal */
|
|
63
75
|
get scope(): ScopeModuleHomeApi;
|
|
@@ -86,6 +98,7 @@ import { ApiCaptcha } from '../api/captcha.js';
|
|
|
86
98
|
import { ApiHome } from '../api/home.js';
|
|
87
99
|
import { ApiHomeBaseMenu } from '../api/homeBaseMenu.js';
|
|
88
100
|
import { ApiHomeBasePermission } from '../api/homeBasePermission.js';
|
|
101
|
+
import { ApiHomeBaseSiteCatalog } from '../api/homeBaseSiteCatalog.js';
|
|
89
102
|
import { ApiHomeUserPassport } from '../api/homeUserPassport.js';
|
|
90
103
|
import { ApiTestSsrToolOne } from '../api/testSsrToolOne.js';
|
|
91
104
|
export interface IModuleApi {
|
|
@@ -93,6 +106,7 @@ export interface IModuleApi {
|
|
|
93
106
|
'home': ApiHome;
|
|
94
107
|
'homeBaseMenu': ApiHomeBaseMenu;
|
|
95
108
|
'homeBasePermission': ApiHomeBasePermission;
|
|
109
|
+
'homeBaseSiteCatalog': ApiHomeBaseSiteCatalog;
|
|
96
110
|
'homeUserPassport': ApiHomeUserPassport;
|
|
97
111
|
'testSsrToolOne': ApiTestSsrToolOne;
|
|
98
112
|
}
|
|
@@ -106,6 +120,7 @@ declare module 'zova' {
|
|
|
106
120
|
'home-api.api.home': ApiHome;
|
|
107
121
|
'home-api.api.homeBaseMenu': ApiHomeBaseMenu;
|
|
108
122
|
'home-api.api.homeBasePermission': ApiHomeBasePermission;
|
|
123
|
+
'home-api.api.homeBaseSiteCatalog': ApiHomeBaseSiteCatalog;
|
|
109
124
|
'home-api.api.homeUserPassport': ApiHomeUserPassport;
|
|
110
125
|
'home-api.api.testSsrToolOne': ApiTestSsrToolOne;
|
|
111
126
|
}
|
|
@@ -119,6 +134,7 @@ export * from '../apiSchema/captcha.js';
|
|
|
119
134
|
export * from '../apiSchema/home.js';
|
|
120
135
|
export * from '../apiSchema/homeBaseMenu.js';
|
|
121
136
|
export * from '../apiSchema/homeBasePermission.js';
|
|
137
|
+
export * from '../apiSchema/homeBaseSiteCatalog.js';
|
|
122
138
|
export * from '../apiSchema/homeUserPassport.js';
|
|
123
139
|
export * from '../apiSchema/testSsrToolOne.js';
|
|
124
140
|
|
|
@@ -173,6 +189,17 @@ declare module 'zova-module-home-api' {
|
|
|
173
189
|
|
|
174
190
|
}
|
|
175
191
|
|
|
192
|
+
export interface ApiSchemaHomeBaseSiteCatalog {
|
|
193
|
+
/** @internal */
|
|
194
|
+
get scope(): ScopeModuleHomeApi;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface ApiSchemaHomeBaseSiteCatalog {
|
|
198
|
+
get $beanFullName(): 'home-api.apiSchema.homeBaseSiteCatalog';
|
|
199
|
+
get $onionName(): 'home-api:homeBaseSiteCatalog';
|
|
200
|
+
|
|
201
|
+
}
|
|
202
|
+
|
|
176
203
|
export interface ApiSchemaHomeUserPassport {
|
|
177
204
|
/** @internal */
|
|
178
205
|
get scope(): ScopeModuleHomeApi;
|
|
@@ -201,6 +228,7 @@ import { ApiSchemaCaptcha } from '../apiSchema/captcha.js';
|
|
|
201
228
|
import { ApiSchemaHome } from '../apiSchema/home.js';
|
|
202
229
|
import { ApiSchemaHomeBaseMenu } from '../apiSchema/homeBaseMenu.js';
|
|
203
230
|
import { ApiSchemaHomeBasePermission } from '../apiSchema/homeBasePermission.js';
|
|
231
|
+
import { ApiSchemaHomeBaseSiteCatalog } from '../apiSchema/homeBaseSiteCatalog.js';
|
|
204
232
|
import { ApiSchemaHomeUserPassport } from '../apiSchema/homeUserPassport.js';
|
|
205
233
|
import { ApiSchemaTestSsrToolOne } from '../apiSchema/testSsrToolOne.js';
|
|
206
234
|
export interface IModuleApiSchema {
|
|
@@ -208,6 +236,7 @@ export interface IModuleApiSchema {
|
|
|
208
236
|
'home': ApiSchemaHome;
|
|
209
237
|
'homeBaseMenu': ApiSchemaHomeBaseMenu;
|
|
210
238
|
'homeBasePermission': ApiSchemaHomeBasePermission;
|
|
239
|
+
'homeBaseSiteCatalog': ApiSchemaHomeBaseSiteCatalog;
|
|
211
240
|
'homeUserPassport': ApiSchemaHomeUserPassport;
|
|
212
241
|
'testSsrToolOne': ApiSchemaTestSsrToolOne;
|
|
213
242
|
}
|
|
@@ -221,6 +250,7 @@ declare module 'zova' {
|
|
|
221
250
|
'home-api.apiSchema.home': ApiSchemaHome;
|
|
222
251
|
'home-api.apiSchema.homeBaseMenu': ApiSchemaHomeBaseMenu;
|
|
223
252
|
'home-api.apiSchema.homeBasePermission': ApiSchemaHomeBasePermission;
|
|
253
|
+
'home-api.apiSchema.homeBaseSiteCatalog': ApiSchemaHomeBaseSiteCatalog;
|
|
224
254
|
'home-api.apiSchema.homeUserPassport': ApiSchemaHomeUserPassport;
|
|
225
255
|
'home-api.apiSchema.testSsrToolOne': ApiSchemaTestSsrToolOne;
|
|
226
256
|
}
|
|
@@ -286,5 +316,5 @@ declare module 'zova' {
|
|
|
286
316
|
|
|
287
317
|
|
|
288
318
|
}
|
|
289
|
-
|
|
319
|
+
|
|
290
320
|
/** scope: end */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IApiActionOptions } from 'zova-module-a-api';
|
|
2
|
+
|
|
3
|
+
import { Api, BeanApiBase } from 'zova-module-a-api';
|
|
4
|
+
|
|
5
|
+
import type { paths } from './openapi/index.js';
|
|
6
|
+
|
|
7
|
+
import { OpenApiBaseURL } from './openapi/index.js';
|
|
8
|
+
|
|
9
|
+
/** HomeBaseSiteCatalog_select */
|
|
10
|
+
export const ApiApiHomeBaseSiteCatalogselectPath = '/api/home/base/siteCatalog';
|
|
11
|
+
export type ApiApiHomeBaseSiteCatalogselectPath = '/api/home/base/siteCatalog';
|
|
12
|
+
export type ApiApiHomeBaseSiteCatalogselectMethod = 'get';
|
|
13
|
+
export type ApiApiHomeBaseSiteCatalogselectResponseBody =
|
|
14
|
+
paths[ApiApiHomeBaseSiteCatalogselectPath][ApiApiHomeBaseSiteCatalogselectMethod]['responses']['200']['content']['application/json']['data'];
|
|
15
|
+
|
|
16
|
+
@Api()
|
|
17
|
+
export class ApiHomeBaseSiteCatalog extends BeanApiBase {
|
|
18
|
+
select(options?: IApiActionOptions) {
|
|
19
|
+
return this.$fetch.get<any, ApiApiHomeBaseSiteCatalogselectResponseBody>(
|
|
20
|
+
ApiApiHomeBaseSiteCatalogselectPath,
|
|
21
|
+
this.$configPrepare(OpenApiBaseURL(this.sys), options, true),
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|