@youidian/sdk 3.4.3 → 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.cjs +31 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +31 -0
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +38 -1
- package/dist/server.d.ts +38 -1
- package/dist/server.js +31 -0
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3512,6 +3512,17 @@ var PaymentClient = class {
|
|
|
3512
3512
|
}
|
|
3513
3513
|
);
|
|
3514
3514
|
}
|
|
3515
|
+
/**
|
|
3516
|
+
* Query the verified phone binding for a hosted login user.
|
|
3517
|
+
*/
|
|
3518
|
+
async getPhoneBinding(params) {
|
|
3519
|
+
const userId = params.userId?.trim();
|
|
3520
|
+
if (!userId) throw new Error("userId is required");
|
|
3521
|
+
return this.request(
|
|
3522
|
+
"GET",
|
|
3523
|
+
`/login/users/${encodeURIComponent(userId)}/phone`
|
|
3524
|
+
);
|
|
3525
|
+
}
|
|
3515
3526
|
/**
|
|
3516
3527
|
* Bind a verified phone number to a hosted login user, merging existing accounts when needed.
|
|
3517
3528
|
*/
|
|
@@ -3532,6 +3543,26 @@ var PaymentClient = class {
|
|
|
3532
3543
|
}
|
|
3533
3544
|
);
|
|
3534
3545
|
}
|
|
3546
|
+
/**
|
|
3547
|
+
* Update a hosted login user's phone number after verifying the new number by SMS code.
|
|
3548
|
+
*/
|
|
3549
|
+
async updatePhoneNumber(params) {
|
|
3550
|
+
const userId = params.userId?.trim();
|
|
3551
|
+
const phoneNumber = params.phoneNumber?.trim();
|
|
3552
|
+
const code = params.code?.trim();
|
|
3553
|
+
if (!userId) throw new Error("userId is required");
|
|
3554
|
+
if (!phoneNumber) throw new Error("phoneNumber is required");
|
|
3555
|
+
if (!code) throw new Error("code is required");
|
|
3556
|
+
return this.request(
|
|
3557
|
+
"PUT",
|
|
3558
|
+
`/login/users/${encodeURIComponent(userId)}/phone`,
|
|
3559
|
+
{
|
|
3560
|
+
code,
|
|
3561
|
+
phoneCountryCode: params.phoneCountryCode || params.countryCode,
|
|
3562
|
+
phoneNumber
|
|
3563
|
+
}
|
|
3564
|
+
);
|
|
3565
|
+
}
|
|
3535
3566
|
/**
|
|
3536
3567
|
* Create a hosted WeChat official account binding URL for a user.
|
|
3537
3568
|
*/
|