@uzqw/shared 0.1.5 → 0.1.7
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.d.ts +9 -2
- package/dist/index.js +7 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -98,7 +98,8 @@ declare class OAuth {
|
|
|
98
98
|
private logtoClientId;
|
|
99
99
|
/** logto 模式端点校验:缺省抛错(prod 独立 Logto 未配置时明确报错,不静默连测试实例) */
|
|
100
100
|
private logtoEndpoint;
|
|
101
|
-
/** 构造授权请求(PKCE S256)。extraParams 用于本地联调注入 user_id(developer 模式,env=local
|
|
101
|
+
/** 构造授权请求(PKCE S256)。extraParams 用于本地联调注入 user_id(developer 模式,env=local 才接受)
|
|
102
|
+
* 或 logto 强制重新认证 prompt=login(force 登录换号)。 */
|
|
102
103
|
createAuthorizationRequest(extraParams?: Record<string, string>): AuthorizationRequest;
|
|
103
104
|
/** 授权码换凭证并落盘;失败抛 Error(含状态码与响应体)。
|
|
104
105
|
* developer 模式:直接换 developerOAuth JWT;
|
|
@@ -667,7 +668,13 @@ declare const FileDetailSchema: z.ZodObject<{
|
|
|
667
668
|
} | undefined;
|
|
668
669
|
}>;
|
|
669
670
|
type RecolxFileDetail = z.infer<typeof FileDetailSchema>;
|
|
670
|
-
declare const LoginInput: z.ZodOptional<z.ZodObject<{
|
|
671
|
+
declare const LoginInput: z.ZodOptional<z.ZodObject<{
|
|
672
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
673
|
+
}, "strip", z.ZodTypeAny, {
|
|
674
|
+
force?: boolean | undefined;
|
|
675
|
+
}, {
|
|
676
|
+
force?: boolean | undefined;
|
|
677
|
+
}>>;
|
|
671
678
|
declare const LogoutInput: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
672
679
|
declare const GetCurrentUserInput: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
673
680
|
declare const SetEnvInput: z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -159,7 +159,8 @@ var OAuth = class {
|
|
|
159
159
|
}
|
|
160
160
|
return ep;
|
|
161
161
|
}
|
|
162
|
-
/** 构造授权请求(PKCE S256)。extraParams 用于本地联调注入 user_id(developer 模式,env=local
|
|
162
|
+
/** 构造授权请求(PKCE S256)。extraParams 用于本地联调注入 user_id(developer 模式,env=local 才接受)
|
|
163
|
+
* 或 logto 强制重新认证 prompt=login(force 登录换号)。 */
|
|
163
164
|
createAuthorizationRequest(extraParams = {}) {
|
|
164
165
|
const codeVerifier = generateCodeVerifier();
|
|
165
166
|
const state = generateState();
|
|
@@ -174,7 +175,8 @@ var OAuth = class {
|
|
|
174
175
|
scope: "openid profile email",
|
|
175
176
|
code_challenge: generateCodeChallenge(codeVerifier),
|
|
176
177
|
code_challenge_method: "S256",
|
|
177
|
-
state
|
|
178
|
+
state,
|
|
179
|
+
...extraParams
|
|
178
180
|
});
|
|
179
181
|
return { url: `${logtoEndpoint}/oidc/auth?${params2.toString()}`, codeVerifier, state };
|
|
180
182
|
}
|
|
@@ -458,7 +460,9 @@ var FileDetailSchema = FileSchema.extend({
|
|
|
458
460
|
presigned_url_expires_at: z.number(),
|
|
459
461
|
transcript: TranscriptSchema.optional()
|
|
460
462
|
});
|
|
461
|
-
var LoginInput = z.object({
|
|
463
|
+
var LoginInput = z.object({
|
|
464
|
+
force: z.boolean().optional().describe("true \u65F6\u5F3A\u5236\u91CD\u65B0\u8BA4\u8BC1\uFF1A\u5373\u4FBF\u6D4F\u89C8\u5668\u5DF2\u6709 Logto \u4F1A\u8BDD\uFF08\u767B\u51FA\u540E\u4ECD\u79D2\u8FC7\uFF09\u4E5F\u5F39\u51FA\u767B\u5F55\u9875\uFF0C\u53EF\u5207\u6362\u8D26\u53F7\uFF1B\u7F3A\u7701 false \u590D\u7528\u6D4F\u89C8\u5668\u4F1A\u8BDD")
|
|
465
|
+
}).optional();
|
|
462
466
|
var LogoutInput = z.object({}).optional();
|
|
463
467
|
var GetCurrentUserInput = z.object({}).optional();
|
|
464
468
|
var SetEnvInput = z.object({
|