feat: 适配general-business实体变动

This commit is contained in:
wkj 2025-10-31 12:21:39 +08:00
parent 851c6019a5
commit 029c7a6188
11 changed files with 33 additions and 11 deletions

View File

@ -40,6 +40,10 @@ export const desc = {
scopes: {
type: "object"
},
requirePKCE: {
notNull: true,
type: "boolean"
},
ableState: {
type: "enum",
enumeration: ["enabled", "disabled"]

View File

@ -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<StringListJson>;
requirePKCE: Q_BooleanValue;
ableState: Q_EnumValue<AbleState>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
@ -49,6 +51,7 @@ export type OpProjection = {
logo?: number;
isConfidential?: number;
scopes?: number | JsonProjection<StringListJson>;
requirePKCE?: number;
ableState?: number;
} & Partial<ExprOp<OpAttr | string>>;
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<OpAttr | string>>;

View File

@ -9,7 +9,8 @@
"redirectUris": "重定向 URI",
"logo": "应用 Logo",
"isConfidential": "是否保密",
"scopes": "应用权限范围"
"scopes": "应用权限范围",
"requirePKCE": "强制 PKCE"
},
"action": {
"enable": "启用",

View File

@ -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",

View File

@ -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;

View File

@ -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<EntityDict, 'withdraw', BRC>[];
export default triggers;

View File

@ -43,6 +43,10 @@ exports.desc = {
scopes: {
type: "object"
},
requirePKCE: {
notNull: true,
type: "boolean"
},
ableState: {
type: "enum",
enumeration: ["enabled", "disabled"]

View File

@ -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<StringListJson>;
requirePKCE: Q_BooleanValue;
ableState: Q_EnumValue<AbleState>;
} & ExprOp<OpAttr | string>;
export type OpProjection = {
@ -49,6 +51,7 @@ export type OpProjection = {
logo?: number;
isConfidential?: number;
scopes?: number | JsonProjection<StringListJson>;
requirePKCE?: number;
ableState?: number;
} & Partial<ExprOp<OpAttr | string>>;
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<OpAttr | string>>;

View File

@ -9,7 +9,8 @@
"redirectUris": "重定向 URI",
"logo": "应用 Logo",
"isConfidential": "是否保密",
"scopes": "应用权限范围"
"scopes": "应用权限范围",
"requirePKCE": "强制 PKCE"
},
"action": {
"enable": "启用",

View File

@ -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",

View File

@ -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;