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

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,7 +29,6 @@ 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;
33
32
  if (!(existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.accessKey) || !(existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.secretKey)) {
34
33
  showNotification("Access key and secret key are required to refresh", NotificationStatus.ERROR);
35
34
  return;
@@ -62,16 +61,7 @@ const CreateClient = ({ onSuccess, clientSubdomain, teamsApi, username, password
62
61
  },
63
62
  });
64
63
  setRefreshingKey(false);
65
- showNotification(get(response, "data.message", "Key refreshed successfully"), NotificationStatus.SUCCESS);
66
- if (onSuccess) {
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
- });
74
- }
64
+ showNotification(get(response, "data.data.message", "Key refreshed successfully"), NotificationStatus.SUCCESS);
75
65
  }
76
66
  catch (error) {
77
67
  showNotification(get(error, "response.data.message", get(error, "message", SOMETHING_WENT_WRONG)), NotificationStatus.ERROR);
@@ -143,6 +143,7 @@ export const DamConfigProvider = ({ children, config }) => {
143
143
  loading,
144
144
  setAccessToken,
145
145
  setDamUser,
146
+ setBrand,
146
147
  appType,
147
148
  setRootFolderId,
148
149
  rootFolderId,
@@ -44,10 +44,10 @@ export const createApiClient = ({ accessToken, appType, subdomain, damAccessKey,
44
44
  const token = (_b = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.access_token;
45
45
  const userData = (_d = (_c = response === null || response === void 0 ? void 0 : response.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.user;
46
46
  const brandData = (_f = (_e = response === null || response === void 0 ? void 0 : response.data) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.brand;
47
- setAccessToken(token);
48
- setDamUser(userData);
49
- setBrand(brandData);
50
- setRootFolderId(get(response, "data.data.rootFolderId"));
47
+ setAccessToken === null || setAccessToken === void 0 ? void 0 : setAccessToken(token);
48
+ setDamUser === null || setDamUser === void 0 ? void 0 : setDamUser(userData);
49
+ setBrand === null || setBrand === void 0 ? void 0 : setBrand(brandData);
50
+ setRootFolderId === null || setRootFolderId === void 0 ? void 0 : setRootFolderId(get(response, "data.data.rootFolderId"));
51
51
  originalRequest.headers["Authorization"] = `Bearer ${token}`;
52
52
  return api(originalRequest);
53
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.197",
3
+ "version": "5.8.200",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",