@newpeak/barista-cli 0.2.269 → 0.2.270
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/commands/liberica/auth/forget-password.d.ts +3 -0
- package/dist/commands/liberica/auth/forget-password.d.ts.map +1 -0
- package/dist/commands/liberica/auth/forget-password.js +34 -0
- package/dist/commands/liberica/auth/forget-password.js.map +1 -0
- package/dist/commands/liberica/auth/index.d.ts.map +1 -1
- package/dist/commands/liberica/auth/index.js +6 -0
- package/dist/commands/liberica/auth/index.js.map +1 -1
- package/dist/commands/liberica/auth/password-shared.d.ts +7 -0
- package/dist/commands/liberica/auth/password-shared.d.ts.map +1 -0
- package/dist/commands/liberica/auth/password-shared.js +17 -0
- package/dist/commands/liberica/auth/password-shared.js.map +1 -0
- package/dist/commands/liberica/auth/reset-password-by-link.d.ts +3 -0
- package/dist/commands/liberica/auth/reset-password-by-link.d.ts.map +1 -0
- package/dist/commands/liberica/auth/reset-password-by-link.js +68 -0
- package/dist/commands/liberica/auth/reset-password-by-link.js.map +1 -0
- package/dist/commands/liberica/auth/validate-forget-pass-link.d.ts +3 -0
- package/dist/commands/liberica/auth/validate-forget-pass-link.d.ts.map +1 -0
- package/dist/commands/liberica/auth/validate-forget-pass-link.js +35 -0
- package/dist/commands/liberica/auth/validate-forget-pass-link.js.map +1 -0
- package/dist/core/api/client.d.ts +9 -0
- package/dist/core/api/client.d.ts.map +1 -1
- package/dist/core/api/client.js +42 -0
- package/dist/core/api/client.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/password.d.ts +25 -0
- package/dist/types/password.d.ts.map +1 -0
- package/dist/types/password.js +10 -0
- package/dist/types/password.js.map +1 -0
- package/package.json +1 -1
- package/skills/barista-cli/data/commands.json +17 -1
- package/skills/barista-cli/data/commands.yaml +13 -1
package/dist/core/api/client.js
CHANGED
|
@@ -1467,6 +1467,48 @@ export const apiClient = {
|
|
|
1467
1467
|
return handleApiError(error);
|
|
1468
1468
|
}
|
|
1469
1469
|
},
|
|
1470
|
+
/**
|
|
1471
|
+
* Self-service password management endpoints (requiredLogin = false).
|
|
1472
|
+
* Tenant is resolved by nginx-injected tenant headers from the tenant-specific base URL,
|
|
1473
|
+
* so no JWT/token is required.
|
|
1474
|
+
*/
|
|
1475
|
+
async forgetPassword(environment, tenant, account) {
|
|
1476
|
+
try {
|
|
1477
|
+
const baseURL = configManager.getEnvironmentUrl('liberica', environment, tenant);
|
|
1478
|
+
const timeout = configManager.getConfig().environments[environment].liberica.timeout;
|
|
1479
|
+
const response = await axios.post(`${baseURL}/api/enterprise/user/forgetPass`, { account }, { timeout, headers: { 'Content-Type': 'application/json' } });
|
|
1480
|
+
return response.data;
|
|
1481
|
+
}
|
|
1482
|
+
catch (error) {
|
|
1483
|
+
return handleApiError(error);
|
|
1484
|
+
}
|
|
1485
|
+
},
|
|
1486
|
+
async validateForgetPassLink(environment, tenant, verificationToken) {
|
|
1487
|
+
try {
|
|
1488
|
+
const baseURL = configManager.getEnvironmentUrl('liberica', environment, tenant);
|
|
1489
|
+
const timeout = configManager.getConfig().environments[environment].liberica.timeout;
|
|
1490
|
+
const response = await axios.get(`${baseURL}/api/enterprise/user/validateForgetPassLink`, {
|
|
1491
|
+
params: { verificationToken },
|
|
1492
|
+
timeout,
|
|
1493
|
+
headers: { 'Content-Type': 'application/json' },
|
|
1494
|
+
});
|
|
1495
|
+
return response.data;
|
|
1496
|
+
}
|
|
1497
|
+
catch (error) {
|
|
1498
|
+
return handleApiError(error);
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
async resetPasswordByLink(environment, tenant, request) {
|
|
1502
|
+
try {
|
|
1503
|
+
const baseURL = configManager.getEnvironmentUrl('liberica', environment, tenant);
|
|
1504
|
+
const timeout = configManager.getConfig().environments[environment].liberica.timeout;
|
|
1505
|
+
const response = await axios.post(`${baseURL}/api/enterprise/user/resetPass`, request, { timeout, headers: { 'Content-Type': 'application/json' } });
|
|
1506
|
+
return response.data;
|
|
1507
|
+
}
|
|
1508
|
+
catch (error) {
|
|
1509
|
+
return handleApiError(error);
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1470
1512
|
async listRoles(environment, tenant) {
|
|
1471
1513
|
try {
|
|
1472
1514
|
const token = await tokenManager.getToken({ service: 'liberica', environment, tenant });
|