@kiva/kv-shop 3.5.0 → 3.6.1

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.
Files changed (2) hide show
  1. package/dist/givingFunds.js +19 -21
  2. package/package.json +3 -3
@@ -1,36 +1,34 @@
1
- import { gql as e } from "@apollo/client/core";
2
- import { getVisitorID as g } from "./util/visitorId.js";
3
- import { parseShopError as s, ShopError as f } from "./shopError.js";
4
- const m = e`
1
+ import { gql as a } from "@apollo/client/core";
2
+ import { getVisitorID as u } from "./util/visitorId.js";
3
+ import { parseShopError as s } from "./shopError.js";
4
+ const e = a`
5
5
  mutation AddGivingFund($fund: GivingFundInput!) {
6
6
  addGivingFund(fund: $fund) {
7
7
  id
8
8
  }
9
9
  }
10
10
  `;
11
- async function F({
12
- apollo: t,
13
- fundTarget: d,
14
- userId: o
11
+ async function v({
12
+ apollo: n,
13
+ fundTarget: t,
14
+ userId: d
15
15
  }) {
16
- var n;
17
- const r = await t.mutate({
18
- mutation: m,
16
+ var i;
17
+ const r = await n.mutate({
18
+ mutation: e,
19
19
  variables: {
20
20
  fund: {
21
- userId: o,
22
- target: d,
23
- visitorId: g()
21
+ userId: d,
22
+ target: t,
23
+ visitorId: u()
24
24
  }
25
25
  }
26
26
  });
27
- if (r.errors) {
28
- const a = r.errors.map((u) => s(u)), i = new f({ code: "shop.failedAddGivingFund" });
29
- throw i.aggregateErrors(a), i;
30
- }
31
- return (n = r.data) == null ? void 0 : n.addGivingFund;
27
+ if (r.errors)
28
+ throw r.errors.map((o) => s(o))[0];
29
+ return (i = r.data) == null ? void 0 : i.addGivingFund;
32
30
  }
33
31
  export {
34
- F as addGivingFund,
35
- m as addGivingFundMutation
32
+ v as addGivingFund,
33
+ e as addGivingFundMutation
36
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-shop",
3
- "version": "3.5.0",
3
+ "version": "3.6.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,7 +26,7 @@
26
26
  "devDependencies": {
27
27
  "@apollo/client": "^3.13.1",
28
28
  "@kiva/kv-analytics": "^1.3.0",
29
- "@kiva/kv-components": "^6.57.7",
29
+ "@kiva/kv-components": "^6.58.0",
30
30
  "@kiva/vite-plugin-vue-lib-css": "^2.0.0",
31
31
  "@types/braintree-web-drop-in": "^1.39.3",
32
32
  "@types/jest": "^29.5.14",
@@ -55,5 +55,5 @@
55
55
  "numeral": "2.x",
56
56
  "vue": "3.x"
57
57
  },
58
- "gitHead": "b6059432f7edffe51c08713b0476f993fd8c356d"
58
+ "gitHead": "3c67ddaea821beb6c6de444767ab3efe9a60ca3b"
59
59
  }