From 029c7a6188610232976e8070d81dc79a5d6cfde3 Mon Sep 17 00:00:00 2001 From: wkj <278599135@.com> Date: Fri, 31 Oct 2025 12:21:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=82=E9=85=8Dgeneral-business?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/oak-app-domain/OauthApplication/Storage.js | 4 ++++ es/oak-app-domain/OauthApplication/_baseSchema.d.ts | 4 ++++ es/oak-app-domain/OauthApplication/locales/zh_CN.json | 3 ++- es/oak-app-domain/OauthProvider/Storage.js | 6 ++++-- es/oak-app-domain/OauthProvider/_baseSchema.d.ts | 4 ++-- es/triggers/withdraw.d.ts | 2 +- lib/oak-app-domain/OauthApplication/Storage.js | 4 ++++ lib/oak-app-domain/OauthApplication/_baseSchema.d.ts | 4 ++++ lib/oak-app-domain/OauthApplication/locales/zh_CN.json | 3 ++- lib/oak-app-domain/OauthProvider/Storage.js | 6 ++++-- lib/oak-app-domain/OauthProvider/_baseSchema.d.ts | 4 ++-- 11 files changed, 33 insertions(+), 11 deletions(-) diff --git a/es/oak-app-domain/OauthApplication/Storage.js b/es/oak-app-domain/OauthApplication/Storage.js index 2d5a516f..3c3784fd 100644 --- a/es/oak-app-domain/OauthApplication/Storage.js +++ b/es/oak-app-domain/OauthApplication/Storage.js @@ -40,6 +40,10 @@ export const desc = { scopes: { type: "object" }, + requirePKCE: { + notNull: true, + type: "boolean" + }, ableState: { type: "enum", enumeration: ["enabled", "disabled"] diff --git a/es/oak-app-domain/OauthApplication/_baseSchema.d.ts b/es/oak-app-domain/OauthApplication/_baseSchema.d.ts index 793ad57f..abddd701 100644 --- a/es/oak-app-domain/OauthApplication/_baseSchema.d.ts +++ b/es/oak-app-domain/OauthApplication/_baseSchema.d.ts @@ -14,6 +14,7 @@ export type OpSchema = EntityShape & { logo?: String<512> | null; isConfidential: Boolean; scopes?: StringListJson | null; + requirePKCE: Boolean; ableState?: AbleState | null; } & { [A in ExpressionKey]?: any; @@ -32,6 +33,7 @@ export type OpFilter = { logo: Q_StringValue; isConfidential: Q_BooleanValue; scopes: JsonFilter; + requirePKCE: Q_BooleanValue; ableState: Q_EnumValue; } & ExprOp; export type OpProjection = { @@ -49,6 +51,7 @@ export type OpProjection = { logo?: number; isConfidential?: number; scopes?: number | JsonProjection; + requirePKCE?: number; ableState?: number; } & Partial>; export type OpSortAttr = Partial<{ @@ -64,6 +67,7 @@ export type OpSortAttr = Partial<{ logo: number; isConfidential: number; scopes: number; + requirePKCE: number; ableState: number; [k: string]: any; } | ExprOp>; diff --git a/es/oak-app-domain/OauthApplication/locales/zh_CN.json b/es/oak-app-domain/OauthApplication/locales/zh_CN.json index 941c8e5b..817f5b59 100644 --- a/es/oak-app-domain/OauthApplication/locales/zh_CN.json +++ b/es/oak-app-domain/OauthApplication/locales/zh_CN.json @@ -9,7 +9,8 @@ "redirectUris": "重定向 URI", "logo": "应用 Logo", "isConfidential": "是否保密", - "scopes": "应用权限范围" + "scopes": "应用权限范围", + "requirePKCE": "强制 PKCE" }, "action": { "enable": "启用", diff --git a/es/oak-app-domain/OauthProvider/Storage.js b/es/oak-app-domain/OauthProvider/Storage.js index 9eb1a87b..5062bcb5 100644 --- a/es/oak-app-domain/OauthProvider/Storage.js +++ b/es/oak-app-domain/OauthProvider/Storage.js @@ -15,8 +15,10 @@ export const desc = { }, type: { notNull: true, - type: "enum", - enumeration: ["oak", "gitea", "github", "google", "facebook", "twitter", "linkedin", "custom", "gitlab", "microsoft", "apple", "tencent", "weixin", "weibo", "dingtalk"] + type: "varchar", + params: { + length: 64 + } }, logo: { type: "varchar", diff --git a/es/oak-app-domain/OauthProvider/_baseSchema.d.ts b/es/oak-app-domain/OauthProvider/_baseSchema.d.ts index 73585fd1..586626db 100644 --- a/es/oak-app-domain/OauthProvider/_baseSchema.d.ts +++ b/es/oak-app-domain/OauthProvider/_baseSchema.d.ts @@ -8,7 +8,7 @@ import { StringListJson } from "oak-general-business/lib/types/datatype"; export type OpSchema = EntityShape & { systemId: ForeignKey<"system">; name: String<64>; - type: "oak" | "gitea" | "github" | "google" | "facebook" | "twitter" | "linkedin" | "custom" | "gitlab" | "microsoft" | "apple" | "tencent" | "weixin" | "weibo" | "dingtalk"; + type: String<64>; logo?: String<512> | null; authorizationEndpoint: String<512>; tokenEndpoint: String<512>; @@ -32,7 +32,7 @@ export type OpFilter = { $$updateAt$$: Q_DateValue; systemId: Q_StringValue; name: Q_StringValue; - type: Q_EnumValue<"oak" | "gitea" | "github" | "google" | "facebook" | "twitter" | "linkedin" | "custom" | "gitlab" | "microsoft" | "apple" | "tencent" | "weixin" | "weibo" | "dingtalk">; + type: Q_StringValue; logo: Q_StringValue; authorizationEndpoint: Q_StringValue; tokenEndpoint: Q_StringValue; diff --git a/es/triggers/withdraw.d.ts b/es/triggers/withdraw.d.ts index 979a44c8..e69f8d6e 100644 --- a/es/triggers/withdraw.d.ts +++ b/es/triggers/withdraw.d.ts @@ -6,6 +6,6 @@ import { BRC } from '../types/RuntimeCxt'; * @param context * @param refunds */ -export declare function updateWithdrawState(context: BRC, id: string): Promise<1 | 0>; +export declare function updateWithdrawState(context: BRC, id: string): Promise<0 | 1>; declare const triggers: Trigger[]; export default triggers; diff --git a/lib/oak-app-domain/OauthApplication/Storage.js b/lib/oak-app-domain/OauthApplication/Storage.js index 6db97793..030e3ea7 100644 --- a/lib/oak-app-domain/OauthApplication/Storage.js +++ b/lib/oak-app-domain/OauthApplication/Storage.js @@ -43,6 +43,10 @@ exports.desc = { scopes: { type: "object" }, + requirePKCE: { + notNull: true, + type: "boolean" + }, ableState: { type: "enum", enumeration: ["enabled", "disabled"] diff --git a/lib/oak-app-domain/OauthApplication/_baseSchema.d.ts b/lib/oak-app-domain/OauthApplication/_baseSchema.d.ts index 793ad57f..abddd701 100644 --- a/lib/oak-app-domain/OauthApplication/_baseSchema.d.ts +++ b/lib/oak-app-domain/OauthApplication/_baseSchema.d.ts @@ -14,6 +14,7 @@ export type OpSchema = EntityShape & { logo?: String<512> | null; isConfidential: Boolean; scopes?: StringListJson | null; + requirePKCE: Boolean; ableState?: AbleState | null; } & { [A in ExpressionKey]?: any; @@ -32,6 +33,7 @@ export type OpFilter = { logo: Q_StringValue; isConfidential: Q_BooleanValue; scopes: JsonFilter; + requirePKCE: Q_BooleanValue; ableState: Q_EnumValue; } & ExprOp; export type OpProjection = { @@ -49,6 +51,7 @@ export type OpProjection = { logo?: number; isConfidential?: number; scopes?: number | JsonProjection; + requirePKCE?: number; ableState?: number; } & Partial>; export type OpSortAttr = Partial<{ @@ -64,6 +67,7 @@ export type OpSortAttr = Partial<{ logo: number; isConfidential: number; scopes: number; + requirePKCE: number; ableState: number; [k: string]: any; } | ExprOp>; diff --git a/lib/oak-app-domain/OauthApplication/locales/zh_CN.json b/lib/oak-app-domain/OauthApplication/locales/zh_CN.json index 941c8e5b..817f5b59 100644 --- a/lib/oak-app-domain/OauthApplication/locales/zh_CN.json +++ b/lib/oak-app-domain/OauthApplication/locales/zh_CN.json @@ -9,7 +9,8 @@ "redirectUris": "重定向 URI", "logo": "应用 Logo", "isConfidential": "是否保密", - "scopes": "应用权限范围" + "scopes": "应用权限范围", + "requirePKCE": "强制 PKCE" }, "action": { "enable": "启用", diff --git a/lib/oak-app-domain/OauthProvider/Storage.js b/lib/oak-app-domain/OauthProvider/Storage.js index b96f7a8a..c228ebe8 100644 --- a/lib/oak-app-domain/OauthProvider/Storage.js +++ b/lib/oak-app-domain/OauthProvider/Storage.js @@ -18,8 +18,10 @@ exports.desc = { }, type: { notNull: true, - type: "enum", - enumeration: ["oak", "gitea", "github", "google", "facebook", "twitter", "linkedin", "custom", "gitlab", "microsoft", "apple", "tencent", "weixin", "weibo", "dingtalk"] + type: "varchar", + params: { + length: 64 + } }, logo: { type: "varchar", diff --git a/lib/oak-app-domain/OauthProvider/_baseSchema.d.ts b/lib/oak-app-domain/OauthProvider/_baseSchema.d.ts index 73585fd1..586626db 100644 --- a/lib/oak-app-domain/OauthProvider/_baseSchema.d.ts +++ b/lib/oak-app-domain/OauthProvider/_baseSchema.d.ts @@ -8,7 +8,7 @@ import { StringListJson } from "oak-general-business/lib/types/datatype"; export type OpSchema = EntityShape & { systemId: ForeignKey<"system">; name: String<64>; - type: "oak" | "gitea" | "github" | "google" | "facebook" | "twitter" | "linkedin" | "custom" | "gitlab" | "microsoft" | "apple" | "tencent" | "weixin" | "weibo" | "dingtalk"; + type: String<64>; logo?: String<512> | null; authorizationEndpoint: String<512>; tokenEndpoint: String<512>; @@ -32,7 +32,7 @@ export type OpFilter = { $$updateAt$$: Q_DateValue; systemId: Q_StringValue; name: Q_StringValue; - type: Q_EnumValue<"oak" | "gitea" | "github" | "google" | "facebook" | "twitter" | "linkedin" | "custom" | "gitlab" | "microsoft" | "apple" | "tencent" | "weixin" | "weibo" | "dingtalk">; + type: Q_StringValue; logo: Q_StringValue; authorizationEndpoint: Q_StringValue; tokenEndpoint: Q_StringValue;