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

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;
@@ -61,9 +62,15 @@ const CreateClient = ({ onSuccess, clientSubdomain, teamsApi, username, password
61
62
  },
62
63
  });
63
64
  setRefreshingKey(false);
64
- showNotification(get(response, "data.message", "Key refreshed successfully"), NotificationStatus.SUCCESS);
65
+ showNotification(get(response, "data.data.message", "Key refreshed successfully"), NotificationStatus.SUCCESS);
65
66
  if (onSuccess) {
66
- onSuccess(response === null || response === void 0 ? void 0 : response.data);
67
+ // API returns { data: { message, key: { accessKey, secretKey, validity, ... } } }
68
+ const keyObj = get(response, "data.data.key", get(response, "data.key", {}));
69
+ onSuccess({
70
+ accessKey: (_a = keyObj.accessKey) !== null && _a !== void 0 ? _a : accessKey,
71
+ secretKey: (_b = keyObj.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.198",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",