@kiva/kv-shop 1.1.7 → 1.1.9

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.
@@ -49,13 +49,15 @@ async function executeNewSubscriptionCheckout({
49
49
  let data;
50
50
  let error;
51
51
  try {
52
- const result = await apollo.query({
52
+ const result = await apollo.mutate({
53
53
  variables: {
54
- dayOfMonth,
54
+ nonce,
55
55
  deviceData,
56
- nonce
56
+ amount,
57
+ donateAmount,
58
+ dayOfMonth
57
59
  },
58
- query: gql`mutation createAutoDepositSubscription(
60
+ mutation: gql`mutation createAutoDepositSubscription(
59
61
  $nonce: String!,
60
62
  $deviceData: String,
61
63
  $amount: Money!,
@@ -87,7 +89,7 @@ async function executeNewSubscriptionCheckout({
87
89
  }
88
90
  if (error) {
89
91
  const parsed = parseShopError(error);
90
- if (parsed.code === "shop.unknown") {
92
+ if (parsed?.code === "shop.unknown") {
91
93
  throw new ShopError({
92
94
  code: "shop.createAutoDepositError",
93
95
  original: parsed
@@ -123,7 +123,7 @@ export default defineComponent({
123
123
  });
124
124
  } catch (e) {
125
125
  if (e instanceof Error) {
126
- showError(e.message);
126
+ showError(e?.message);
127
127
  } else {
128
128
  showError('An Error has occured. Please refresh the page and try again.');
129
129
  }
package/dist/index.cjs CHANGED
@@ -195,13 +195,15 @@ async function executeNewSubscriptionCheckout({
195
195
  let data;
196
196
  let error;
197
197
  try {
198
- const result = await apollo.query({
198
+ const result = await apollo.mutate({
199
199
  variables: {
200
- dayOfMonth,
200
+ nonce,
201
201
  deviceData,
202
- nonce
202
+ amount,
203
+ donateAmount,
204
+ dayOfMonth
203
205
  },
204
- query: import_core3.gql`mutation createAutoDepositSubscription(
206
+ mutation: import_core3.gql`mutation createAutoDepositSubscription(
205
207
  $nonce: String!,
206
208
  $deviceData: String,
207
209
  $amount: Money!,
@@ -233,7 +235,7 @@ async function executeNewSubscriptionCheckout({
233
235
  }
234
236
  if (error) {
235
237
  const parsed = parseShopError(error);
236
- if (parsed.code === "shop.unknown") {
238
+ if (parsed?.code === "shop.unknown") {
237
239
  throw new ShopError({
238
240
  code: "shop.createAutoDepositError",
239
241
  original: parsed
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  checkSubscriptionStatus,
15
15
  executeNewSubscriptionCheckout
16
- } from "./chunk-LWEH4UKM.js";
16
+ } from "./chunk-6XPXXVBS.js";
17
17
  import {
18
18
  defaultPaymentTypes,
19
19
  getClientToken,
@@ -97,13 +97,15 @@ async function executeNewSubscriptionCheckout({
97
97
  let data;
98
98
  let error;
99
99
  try {
100
- const result = await apollo.query({
100
+ const result = await apollo.mutate({
101
101
  variables: {
102
- dayOfMonth,
102
+ nonce,
103
103
  deviceData,
104
- nonce
104
+ amount,
105
+ donateAmount,
106
+ dayOfMonth
105
107
  },
106
- query: import_core.gql`mutation createAutoDepositSubscription(
108
+ mutation: import_core.gql`mutation createAutoDepositSubscription(
107
109
  $nonce: String!,
108
110
  $deviceData: String,
109
111
  $amount: Money!,
@@ -135,7 +137,7 @@ async function executeNewSubscriptionCheckout({
135
137
  }
136
138
  if (error) {
137
139
  const parsed = parseShopError(error);
138
- if (parsed.code === "shop.unknown") {
140
+ if (parsed?.code === "shop.unknown") {
139
141
  throw new ShopError({
140
142
  code: "shop.createAutoDepositError",
141
143
  original: parsed
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  checkSubscriptionStatus,
3
3
  executeNewSubscriptionCheckout
4
- } from "./chunk-LWEH4UKM.js";
4
+ } from "./chunk-6XPXXVBS.js";
5
5
  import "./chunk-H35VQXDR.js";
6
6
  export {
7
7
  checkSubscriptionStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-shop",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@apollo/client": "^3.7.14",
41
- "@kiva/kv-components": "^3.22.2",
41
+ "@kiva/kv-components": "^3.22.3",
42
42
  "@types/braintree-web-drop-in": "^1.34.2",
43
43
  "braintree-web-drop-in": "^1.37.0",
44
44
  "numeral": "^2.0.6",
@@ -53,5 +53,5 @@
53
53
  "optional": true
54
54
  }
55
55
  },
56
- "gitHead": "c29465a89a0cd252816abf35539038dfa0a6560d"
56
+ "gitHead": "dd2af23865a3e623f8ab7275504be02ee5e6d873"
57
57
  }