@youidian/sdk 3.4.2 → 3.4.4

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.cts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { OrderStatus as ClientOrderStatus, LoginDeviceType, LoginEnvironment, LoginEnvironmentInput, MessageUI, PaymentEventData, PaymentEventType, PaymentParams, PaymentUI, PaymentUIOptions, PollOptions, WechatMessageBindingUIOptions, createMessageUI, createPaymentUI, detectLoginEnvironment } from './client.cjs';
2
2
  export { FeedbackActor, FeedbackCategoryOption, FeedbackIdentityKind, FeedbackWidgetController, FeedbackWidgetOptions, createFeedbackWidget, mountFeedbackWidget } from './feedback.cjs';
3
3
  export { L as LoginCallbackOptions, a as LoginDisplayMode, b as LoginEventData, c as LoginEventType, d as LoginFallbackRedirectMode, e as LoginParams, f as LoginResult, g as LoginUI, h as LoginUIOptions, i as createLoginUI, j as handleLoginCallbackIfPresent } from './login-Dqemys65.cjs';
4
- export { ActiveSubscriptionInfo, BindPhoneNumberParams, BindPhoneNumberResponse, CancelOrderResponse, CompleteFreeOrderResponse, CreateBankTransferOrderParams, CreateMiniProgramOrderParams, CreateOrderParams, CreateOrderResponse, CreateWechatMessageBindingParams, CreateWechatMessageBindingResponse, CustomAmountRechargeRule, CustomAmountRechargeValidationResult, MerchantPricing, MerchantPricingBreakdownItem, MerchantPricingSnapshot, MessageTemplateDataValue, OrderDetails, OrderStatus, PaymentCallbackData, PaymentClient, PaymentClientOptions, PaymentNotification, PricingBreakdown, Product, ProductCustomAmount, ProductCustomAmountCurrency, ProductEntitlements, ProductInventory, ProductMetadata, ProductPrice, ProductResetRule, ProductStock, ProductStockLookupMode, ProductStockQueryOptions, ProductStocksQueryParams, ProductSubscriptionPeriod, SendMessageParams, SendMessageResponse, SendPhoneVerificationCodeParams, SendPhoneVerificationCodeResponse, VerifiedLoginToken, WebhookPayload, WechatJsapiPayParams, getCustomAmountRechargeRule, validateCustomAmountRecharge } from './server.cjs';
4
+ export { ActiveSubscriptionInfo, BindPhoneNumberParams, BindPhoneNumberResponse, CancelOrderResponse, CompleteFreeOrderResponse, CreateBankTransferOrderParams, CreateMiniProgramOrderParams, CreateOrderParams, CreateOrderResponse, CreateWechatMessageBindingParams, CreateWechatMessageBindingResponse, CustomAmountRechargeRule, CustomAmountRechargeValidationResult, GetPhoneBindingParams, MerchantPricing, MerchantPricingBreakdownItem, MerchantPricingSnapshot, MessageTemplateDataValue, OrderDetails, OrderStatus, PaymentCallbackData, PaymentClient, PaymentClientOptions, PaymentNotification, PhoneBinding, PricingBreakdown, Product, ProductCustomAmount, ProductCustomAmountCurrency, ProductEntitlements, ProductInventory, ProductMetadata, ProductPrice, ProductResetRule, ProductStock, ProductStockLookupMode, ProductStockQueryOptions, ProductStocksQueryParams, ProductSubscriptionPeriod, SendMessageParams, SendMessageResponse, SendPhoneVerificationCodeParams, SendPhoneVerificationCodeResponse, UpdatePhoneNumberParams, UpdatePhoneNumberResponse, VerifiedLoginToken, WebhookPayload, WechatJsapiPayParams, getCustomAmountRechargeRule, validateCustomAmountRecharge } from './server.cjs';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { OrderStatus as ClientOrderStatus, LoginDeviceType, LoginEnvironment, LoginEnvironmentInput, MessageUI, PaymentEventData, PaymentEventType, PaymentParams, PaymentUI, PaymentUIOptions, PollOptions, WechatMessageBindingUIOptions, createMessageUI, createPaymentUI, detectLoginEnvironment } from './client.js';
2
2
  export { FeedbackActor, FeedbackCategoryOption, FeedbackIdentityKind, FeedbackWidgetController, FeedbackWidgetOptions, createFeedbackWidget, mountFeedbackWidget } from './feedback.js';
3
3
  export { L as LoginCallbackOptions, a as LoginDisplayMode, b as LoginEventData, c as LoginEventType, d as LoginFallbackRedirectMode, e as LoginParams, f as LoginResult, g as LoginUI, h as LoginUIOptions, i as createLoginUI, j as handleLoginCallbackIfPresent } from './login-Dqemys65.js';
4
- export { ActiveSubscriptionInfo, BindPhoneNumberParams, BindPhoneNumberResponse, CancelOrderResponse, CompleteFreeOrderResponse, CreateBankTransferOrderParams, CreateMiniProgramOrderParams, CreateOrderParams, CreateOrderResponse, CreateWechatMessageBindingParams, CreateWechatMessageBindingResponse, CustomAmountRechargeRule, CustomAmountRechargeValidationResult, MerchantPricing, MerchantPricingBreakdownItem, MerchantPricingSnapshot, MessageTemplateDataValue, OrderDetails, OrderStatus, PaymentCallbackData, PaymentClient, PaymentClientOptions, PaymentNotification, PricingBreakdown, Product, ProductCustomAmount, ProductCustomAmountCurrency, ProductEntitlements, ProductInventory, ProductMetadata, ProductPrice, ProductResetRule, ProductStock, ProductStockLookupMode, ProductStockQueryOptions, ProductStocksQueryParams, ProductSubscriptionPeriod, SendMessageParams, SendMessageResponse, SendPhoneVerificationCodeParams, SendPhoneVerificationCodeResponse, VerifiedLoginToken, WebhookPayload, WechatJsapiPayParams, getCustomAmountRechargeRule, validateCustomAmountRecharge } from './server.js';
4
+ export { ActiveSubscriptionInfo, BindPhoneNumberParams, BindPhoneNumberResponse, CancelOrderResponse, CompleteFreeOrderResponse, CreateBankTransferOrderParams, CreateMiniProgramOrderParams, CreateOrderParams, CreateOrderResponse, CreateWechatMessageBindingParams, CreateWechatMessageBindingResponse, CustomAmountRechargeRule, CustomAmountRechargeValidationResult, GetPhoneBindingParams, MerchantPricing, MerchantPricingBreakdownItem, MerchantPricingSnapshot, MessageTemplateDataValue, OrderDetails, OrderStatus, PaymentCallbackData, PaymentClient, PaymentClientOptions, PaymentNotification, PhoneBinding, PricingBreakdown, Product, ProductCustomAmount, ProductCustomAmountCurrency, ProductEntitlements, ProductInventory, ProductMetadata, ProductPrice, ProductResetRule, ProductStock, ProductStockLookupMode, ProductStockQueryOptions, ProductStocksQueryParams, ProductSubscriptionPeriod, SendMessageParams, SendMessageResponse, SendPhoneVerificationCodeParams, SendPhoneVerificationCodeResponse, UpdatePhoneNumberParams, UpdatePhoneNumberResponse, VerifiedLoginToken, WebhookPayload, WechatJsapiPayParams, getCustomAmountRechargeRule, validateCustomAmountRecharge } from './server.js';
package/dist/index.js CHANGED
@@ -340,7 +340,7 @@ var HostedFrameModal = class {
340
340
  const container = document.createElement("div");
341
341
  Object.assign(container.style, {
342
342
  width: options.width || "450px",
343
- height: options.height || "min(760px, calc(100vh - 32px))",
343
+ height: options.height || "min(680px, calc(100vh - 32px))",
344
344
  backgroundColor: "transparent",
345
345
  borderRadius: "28px",
346
346
  overflow: "visible",
@@ -2221,7 +2221,7 @@ var PaymentUI = class extends HostedFrameModal {
2221
2221
  );
2222
2222
  const hostedFrame = this.openHostedFrame(finalUrl, {
2223
2223
  allowedOrigin: options?.allowedOrigin,
2224
- height: "min(760px, calc(100vh - 32px))",
2224
+ height: "min(680px, calc(100vh - 32px))",
2225
2225
  onCloseButton: () => {
2226
2226
  this.cancelHostedOrder("modal_close");
2227
2227
  options?.onCancel?.(this.activeOrderId || void 0);
@@ -3466,6 +3466,17 @@ var PaymentClient = class {
3466
3466
  }
3467
3467
  );
3468
3468
  }
3469
+ /**
3470
+ * Query the verified phone binding for a hosted login user.
3471
+ */
3472
+ async getPhoneBinding(params) {
3473
+ const userId = params.userId?.trim();
3474
+ if (!userId) throw new Error("userId is required");
3475
+ return this.request(
3476
+ "GET",
3477
+ `/login/users/${encodeURIComponent(userId)}/phone`
3478
+ );
3479
+ }
3469
3480
  /**
3470
3481
  * Bind a verified phone number to a hosted login user, merging existing accounts when needed.
3471
3482
  */
@@ -3486,6 +3497,26 @@ var PaymentClient = class {
3486
3497
  }
3487
3498
  );
3488
3499
  }
3500
+ /**
3501
+ * Update a hosted login user's phone number after verifying the new number by SMS code.
3502
+ */
3503
+ async updatePhoneNumber(params) {
3504
+ const userId = params.userId?.trim();
3505
+ const phoneNumber = params.phoneNumber?.trim();
3506
+ const code = params.code?.trim();
3507
+ if (!userId) throw new Error("userId is required");
3508
+ if (!phoneNumber) throw new Error("phoneNumber is required");
3509
+ if (!code) throw new Error("code is required");
3510
+ return this.request(
3511
+ "PUT",
3512
+ `/login/users/${encodeURIComponent(userId)}/phone`,
3513
+ {
3514
+ code,
3515
+ phoneCountryCode: params.phoneCountryCode || params.countryCode,
3516
+ phoneNumber
3517
+ }
3518
+ );
3519
+ }
3489
3520
  /**
3490
3521
  * Create a hosted WeChat official account binding URL for a user.
3491
3522
  */