@amityco/ts-sdk 7.26.1-b902f6b.0 → 7.26.1-bf4fbc4b.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"validateAccessToken.d.ts","sourceRoot":"","sources":["../../../src/client/api/validateAccessToken.ts"],"names":[],"mappings":"AAKA,UAAU,MAAM;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,sBAA6B,MAAM,2BA4ClE,CAAC"}
1
+ {"version":3,"file":"validateAccessToken.d.ts","sourceRoot":"","sources":["../../../src/client/api/validateAccessToken.ts"],"names":[],"mappings":"AAKA,UAAU,MAAM;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,sBAA6B,MAAM,2BAgDlE,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -7740,7 +7740,7 @@ const validateAccessToken = async ({ token, userId }) => {
7740
7740
  Authorization: `Bearer ${token.accessToken}`,
7741
7741
  },
7742
7742
  });
7743
- const { users, files, userType } = data;
7743
+ const { users, files, roles, userType } = data;
7744
7744
  const [user] = users;
7745
7745
  if (userId && (user === null || user === void 0 ? void 0 : user.userId) && userId !== user.userId) {
7746
7746
  client.log('client/api/validateAccessToken', {
@@ -7763,6 +7763,9 @@ const validateAccessToken = async ({ token, userId }) => {
7763
7763
  };
7764
7764
  client.token = token;
7765
7765
  ingestInCache(prepareUserPayload({ users, files }));
7766
+ if (roles === null || roles === void 0 ? void 0 : roles.length) {
7767
+ ingestInCache({ roles });
7768
+ }
7766
7769
  setCurrentUserType(userType);
7767
7770
  return user;
7768
7771
  };
package/dist/index.esm.js CHANGED
@@ -7740,7 +7740,7 @@ const validateAccessToken = async ({ token, userId }) => {
7740
7740
  Authorization: `Bearer ${token.accessToken}`,
7741
7741
  },
7742
7742
  });
7743
- const { users, files, userType } = data;
7743
+ const { users, files, roles, userType } = data;
7744
7744
  const [user] = users;
7745
7745
  if (userId && (user === null || user === void 0 ? void 0 : user.userId) && userId !== user.userId) {
7746
7746
  client.log('client/api/validateAccessToken', {
@@ -7763,6 +7763,9 @@ const validateAccessToken = async ({ token, userId }) => {
7763
7763
  };
7764
7764
  client.token = token;
7765
7765
  ingestInCache(prepareUserPayload({ users, files }));
7766
+ if (roles === null || roles === void 0 ? void 0 : roles.length) {
7767
+ ingestInCache({ roles });
7768
+ }
7766
7769
  setCurrentUserType(userType);
7767
7770
  return user;
7768
7771
  };