@speakableio/core 0.1.14 → 0.1.15

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/index.d.mts CHANGED
@@ -911,6 +911,7 @@ declare function createFsClient({ db, platform, httpsCallable, }: {
911
911
  }>;
912
912
 
913
913
  interface UserProfile {
914
+ googleClassroomUserId: string;
914
915
  image: {
915
916
  url: string;
916
917
  path: string;
package/dist/index.d.ts CHANGED
@@ -911,6 +911,7 @@ declare function createFsClient({ db, platform, httpsCallable, }: {
911
911
  }>;
912
912
 
913
913
  interface UserProfile {
914
+ googleClassroomUserId: string;
914
915
  image: {
915
916
  url: string;
916
917
  path: string;
package/dist/index.js CHANGED
@@ -1612,6 +1612,12 @@ function useUpdateCardScore({
1612
1612
  const mutation = _reactquery.useMutation.call(void 0, {
1613
1613
  mutationFn: async ({ cardId, cardScore }) => {
1614
1614
  const previousScores = queryClient.getQueryData(queryKey);
1615
+ console.log({
1616
+ previousScores,
1617
+ cardId,
1618
+ cardScore,
1619
+ dataCurrentSet
1620
+ });
1615
1621
  const { progress, score, newScoreUpdated, updatedCardScore } = getScoreUpdated({
1616
1622
  previousScores: _nullishCoalesce(previousScores, () => ( {})),
1617
1623
  cardId,
@@ -1646,7 +1652,8 @@ function useUpdateCardScore({
1646
1652
  });
1647
1653
  },
1648
1654
  // eslint-disable-next-line no-unused-vars
1649
- onError: () => {
1655
+ onError: (error) => {
1656
+ console.log(error.message);
1650
1657
  const previousData = queryClient.getQueryData(queryKey);
1651
1658
  if (previousData) {
1652
1659
  queryClient.setQueryData(queryKey, previousData);
@@ -1875,8 +1882,7 @@ function useActivity({
1875
1882
  activityId: id,
1876
1883
  userId,
1877
1884
  courseId: _optionalChain([activeAssignment, 'optionalAccess', _64 => _64.courseId]),
1878
- googleClassroomUserId: "",
1879
- // TODO
1885
+ googleClassroomUserId: user.profile.googleClassroomUserId,
1880
1886
  enabled: isAssignment ? assignmentQuery.isSuccess : querySet.isSuccess
1881
1887
  });
1882
1888
  const { mutationUpdateScore } = useUpdateScore();
package/dist/index.mjs CHANGED
@@ -1612,6 +1612,12 @@ function useUpdateCardScore({
1612
1612
  const mutation = useMutation2({
1613
1613
  mutationFn: async ({ cardId, cardScore }) => {
1614
1614
  const previousScores = queryClient.getQueryData(queryKey);
1615
+ console.log({
1616
+ previousScores,
1617
+ cardId,
1618
+ cardScore,
1619
+ dataCurrentSet
1620
+ });
1615
1621
  const { progress, score, newScoreUpdated, updatedCardScore } = getScoreUpdated({
1616
1622
  previousScores: previousScores ?? {},
1617
1623
  cardId,
@@ -1646,7 +1652,8 @@ function useUpdateCardScore({
1646
1652
  });
1647
1653
  },
1648
1654
  // eslint-disable-next-line no-unused-vars
1649
- onError: () => {
1655
+ onError: (error) => {
1656
+ console.log(error.message);
1650
1657
  const previousData = queryClient.getQueryData(queryKey);
1651
1658
  if (previousData) {
1652
1659
  queryClient.setQueryData(queryKey, previousData);
@@ -1875,8 +1882,7 @@ function useActivity({
1875
1882
  activityId: id,
1876
1883
  userId,
1877
1884
  courseId: activeAssignment?.courseId,
1878
- googleClassroomUserId: "",
1879
- // TODO
1885
+ googleClassroomUserId: user.profile.googleClassroomUserId,
1880
1886
  enabled: isAssignment ? assignmentQuery.isSuccess : querySet.isSuccess
1881
1887
  });
1882
1888
  const { mutationUpdateScore } = useUpdateScore();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakableio/core",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Speakable-io/speakable-core.git"