@nvwa-app/sdk-core 6.43.0 → 6.44.0
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.mts +7 -6
- package/dist/index.d.ts +7 -6
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nvwa_app_postgrest_js from '@nvwa-app/postgrest-js';
|
|
2
2
|
import { PostgrestClient } from '@nvwa-app/postgrest-js';
|
|
3
|
-
import { PaymentOrderResult, ProjectPlatformType
|
|
3
|
+
import { PaymentClientContext, PaymentOrderResult, ProjectPlatformType } from '@nvwa-app/sdk-shared';
|
|
4
4
|
export * from '@nvwa-app/sdk-shared';
|
|
5
5
|
import { NvwaFetch, URL, RequestInfo, RequestInit, Response, Headers } from '@nvwa-app/nvwa-http-polyfill';
|
|
6
6
|
export { Headers, NvwaFetch, Request, RequestInfo, RequestInit, Response, URL } from '@nvwa-app/nvwa-http-polyfill';
|
|
@@ -24,7 +24,7 @@ declare function getEnabledProvidersByIntegration(integrationProviders: Integrat
|
|
|
24
24
|
* Payment 纯前端能力:仅「发起支付」。
|
|
25
25
|
* 流程:create order(传 platformType)→ 返回 order 标识;再按 orderId 请求 getPaymentInfo 得到 payParams;
|
|
26
26
|
* 前端用 nvwa.payment.requestPayment(payParams) 调起。
|
|
27
|
-
* 客户端上下文见 `collectPaymentClientContext
|
|
27
|
+
* 客户端上下文见 `payment.collectPaymentClientContext?()`(与 `@nvwa-app/sdk-shared` 的 `collectPaymentClientContext` 同源);网关结果见 `toPaymentOrderResultFromGateway`。
|
|
28
28
|
* 与 Workspace 积分充值无关。
|
|
29
29
|
*/
|
|
30
30
|
|
|
@@ -107,6 +107,11 @@ interface IPaymentLauncher {
|
|
|
107
107
|
getProviders?(params?: {
|
|
108
108
|
force?: boolean;
|
|
109
109
|
}): Promise<PaymentProvider[]>;
|
|
110
|
+
/**
|
|
111
|
+
* 收集支付建单所需的客户端上下文,对应 `CreatePaymentOrderRequest.client`(`@nvwa-app/sdk-shared`)。
|
|
112
|
+
* Web/Uniapp 的 Nvwa 会注入;仅含调起逻辑的 launcher 可不实现。
|
|
113
|
+
*/
|
|
114
|
+
collectPaymentClientContext?(): Promise<PaymentClientContext>;
|
|
110
115
|
}
|
|
111
116
|
/** @deprecated 使用 PaymentOrderResult。保留仅为兼容旧类型名。 */
|
|
112
117
|
type CreatePaymentResponse = PaymentOrderResult;
|
|
@@ -673,10 +678,6 @@ interface INvwa {
|
|
|
673
678
|
readonly platformType: string;
|
|
674
679
|
/** 编译期注入的 integration provider 开关配置。 */
|
|
675
680
|
integrationProviders: IntegrationProvidersConfig;
|
|
676
|
-
/**
|
|
677
|
-
* 收集支付客户端上下文(端类型、小程序 openid 等),供创建支付单请求体 `CreatePaymentOrderRequest.client` 使用。
|
|
678
|
-
*/
|
|
679
|
-
preparePaymentContext(): Promise<PaymentClientContext>;
|
|
680
681
|
}
|
|
681
682
|
|
|
682
683
|
export { type AlipayCodeLoginResult, type AlipayOpenPlatformIdentity, AuthClient, type AuthClientOptions, type AuthResult, type AuthSession, type AuthUser, CURRENT_JWT_KEY, type CreatePaymentResponse, ENTITIES_BASE_PATH, FILE_STORAGE_BASE_PATH, type FunctionInvokeOptions, GENERATE_UPLOAD_URL_PATH, type GithubOpenPlatformIdentity, type GithubOpenPlatformLoginResult, type GoogleOpenPlatformIdentity, type GoogleOpenPlatformLoginResult, type HoverInspectorMessage, type HttpMethod, type HttpUploadFileResponse, type INvwa, type IPaymentLauncher, type IframeSourceLocationMessage, type IntegrationProviderConfig, type IntegrationProvidersConfig, type IntegrationProvidersEntry, LOGIN_TOKEN_KEY, LOGIN_USER_PROFILE_KEY, type LegacyPayParams, type MiniProgramIdentity, type NvwaAppConfig, NvwaEdgeFunctions, NvwaFileStorage, NvwaHttpClient, type NvwaLocalStorage, type OAuthCredentialSource, OverlayManager, type PayParams, type PaymentProvider, type PaymentRequestCallbacks, type RequiredNvwaAppConfig, SET_AUTH_TOKEN_HEADER, type SignUpBody, type SocialLoginProviderKind, type SocialProvider, type SocialProviderDescriptor, type TypedPayParams, type WeChatCodeLoginResult, type WeChatOpenPlatformIdentity, type WechatJsapiPayParams, type WechatWebsiteOpenPlatformIdentity, type WechatWebsiteOpenPlatformLoginResult, createPostgrestClient, getEnabledProvidersByIntegration, getPaymentProvidersFromIntegrationProviders, getSourceLocationFromDOM, normalizeIntegrationProvidersConfig, normalizePayParams, parseNvwaAppConfig, requestPaymentFromOrderResult, requireNvwaAppConfig, resolveIntegrationProvidersFromAppConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nvwa_app_postgrest_js from '@nvwa-app/postgrest-js';
|
|
2
2
|
import { PostgrestClient } from '@nvwa-app/postgrest-js';
|
|
3
|
-
import { PaymentOrderResult, ProjectPlatformType
|
|
3
|
+
import { PaymentClientContext, PaymentOrderResult, ProjectPlatformType } from '@nvwa-app/sdk-shared';
|
|
4
4
|
export * from '@nvwa-app/sdk-shared';
|
|
5
5
|
import { NvwaFetch, URL, RequestInfo, RequestInit, Response, Headers } from '@nvwa-app/nvwa-http-polyfill';
|
|
6
6
|
export { Headers, NvwaFetch, Request, RequestInfo, RequestInit, Response, URL } from '@nvwa-app/nvwa-http-polyfill';
|
|
@@ -24,7 +24,7 @@ declare function getEnabledProvidersByIntegration(integrationProviders: Integrat
|
|
|
24
24
|
* Payment 纯前端能力:仅「发起支付」。
|
|
25
25
|
* 流程:create order(传 platformType)→ 返回 order 标识;再按 orderId 请求 getPaymentInfo 得到 payParams;
|
|
26
26
|
* 前端用 nvwa.payment.requestPayment(payParams) 调起。
|
|
27
|
-
* 客户端上下文见 `collectPaymentClientContext
|
|
27
|
+
* 客户端上下文见 `payment.collectPaymentClientContext?()`(与 `@nvwa-app/sdk-shared` 的 `collectPaymentClientContext` 同源);网关结果见 `toPaymentOrderResultFromGateway`。
|
|
28
28
|
* 与 Workspace 积分充值无关。
|
|
29
29
|
*/
|
|
30
30
|
|
|
@@ -107,6 +107,11 @@ interface IPaymentLauncher {
|
|
|
107
107
|
getProviders?(params?: {
|
|
108
108
|
force?: boolean;
|
|
109
109
|
}): Promise<PaymentProvider[]>;
|
|
110
|
+
/**
|
|
111
|
+
* 收集支付建单所需的客户端上下文,对应 `CreatePaymentOrderRequest.client`(`@nvwa-app/sdk-shared`)。
|
|
112
|
+
* Web/Uniapp 的 Nvwa 会注入;仅含调起逻辑的 launcher 可不实现。
|
|
113
|
+
*/
|
|
114
|
+
collectPaymentClientContext?(): Promise<PaymentClientContext>;
|
|
110
115
|
}
|
|
111
116
|
/** @deprecated 使用 PaymentOrderResult。保留仅为兼容旧类型名。 */
|
|
112
117
|
type CreatePaymentResponse = PaymentOrderResult;
|
|
@@ -673,10 +678,6 @@ interface INvwa {
|
|
|
673
678
|
readonly platformType: string;
|
|
674
679
|
/** 编译期注入的 integration provider 开关配置。 */
|
|
675
680
|
integrationProviders: IntegrationProvidersConfig;
|
|
676
|
-
/**
|
|
677
|
-
* 收集支付客户端上下文(端类型、小程序 openid 等),供创建支付单请求体 `CreatePaymentOrderRequest.client` 使用。
|
|
678
|
-
*/
|
|
679
|
-
preparePaymentContext(): Promise<PaymentClientContext>;
|
|
680
681
|
}
|
|
681
682
|
|
|
682
683
|
export { type AlipayCodeLoginResult, type AlipayOpenPlatformIdentity, AuthClient, type AuthClientOptions, type AuthResult, type AuthSession, type AuthUser, CURRENT_JWT_KEY, type CreatePaymentResponse, ENTITIES_BASE_PATH, FILE_STORAGE_BASE_PATH, type FunctionInvokeOptions, GENERATE_UPLOAD_URL_PATH, type GithubOpenPlatformIdentity, type GithubOpenPlatformLoginResult, type GoogleOpenPlatformIdentity, type GoogleOpenPlatformLoginResult, type HoverInspectorMessage, type HttpMethod, type HttpUploadFileResponse, type INvwa, type IPaymentLauncher, type IframeSourceLocationMessage, type IntegrationProviderConfig, type IntegrationProvidersConfig, type IntegrationProvidersEntry, LOGIN_TOKEN_KEY, LOGIN_USER_PROFILE_KEY, type LegacyPayParams, type MiniProgramIdentity, type NvwaAppConfig, NvwaEdgeFunctions, NvwaFileStorage, NvwaHttpClient, type NvwaLocalStorage, type OAuthCredentialSource, OverlayManager, type PayParams, type PaymentProvider, type PaymentRequestCallbacks, type RequiredNvwaAppConfig, SET_AUTH_TOKEN_HEADER, type SignUpBody, type SocialLoginProviderKind, type SocialProvider, type SocialProviderDescriptor, type TypedPayParams, type WeChatCodeLoginResult, type WeChatOpenPlatformIdentity, type WechatJsapiPayParams, type WechatWebsiteOpenPlatformIdentity, type WechatWebsiteOpenPlatformLoginResult, createPostgrestClient, getEnabledProvidersByIntegration, getPaymentProvidersFromIntegrationProviders, getSourceLocationFromDOM, normalizeIntegrationProvidersConfig, normalizePayParams, parseNvwaAppConfig, requestPaymentFromOrderResult, requireNvwaAppConfig, resolveIntegrationProvidersFromAppConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nvwa-app/sdk-core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.44.0",
|
|
4
4
|
"description": "NVWA跨端通用工具类核心接口",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@nvwa-app/nvwa-http-polyfill": "^0.1.0",
|
|
33
33
|
"@nvwa-app/postgrest-js": "^2.100.1",
|
|
34
|
-
"@nvwa-app/sdk-shared": "^6.
|
|
34
|
+
"@nvwa-app/sdk-shared": "^6.44.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^24.3.0",
|