@bindu-dashing/dam-solution-v2 5.8.196 → 5.8.197

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.
@@ -29,6 +29,7 @@ const CreateClient = ({ onSuccess, clientSubdomain, teamsApi, username, password
29
29
  setShowForm(!showForm);
30
30
  };
31
31
  const onRefreshKey = () => __awaiter(void 0, void 0, void 0, function* () {
32
+ var _a, _b;
32
33
  if (!(existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.accessKey) || !(existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.secretKey)) {
33
34
  showNotification("Access key and secret key are required to refresh", NotificationStatus.ERROR);
34
35
  return;
@@ -63,7 +64,13 @@ const CreateClient = ({ onSuccess, clientSubdomain, teamsApi, username, password
63
64
  setRefreshingKey(false);
64
65
  showNotification(get(response, "data.message", "Key refreshed successfully"), NotificationStatus.SUCCESS);
65
66
  if (onSuccess) {
66
- onSuccess(response === null || response === void 0 ? void 0 : response.data);
67
+ // Normalize response: API may return { data: { accessKey, secretKey } } or { accessKey, secretKey }
68
+ const keysData = get(response, "data.data", get(response, "data", {}));
69
+ onSuccess({
70
+ accessKey: (_a = keysData.accessKey) !== null && _a !== void 0 ? _a : accessKey,
71
+ secretKey: (_b = keysData.secretKey) !== null && _b !== void 0 ? _b : secretKey,
72
+ subdomain: subdomain,
73
+ });
67
74
  }
68
75
  }
69
76
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.196",
3
+ "version": "5.8.197",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",