@kiva/kv-shop 1.6.0 → 1.6.2

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.
@@ -26,7 +26,7 @@ async function getReceiptItems(apollo, checkoutId) {
26
26
  let offset = 0;
27
27
  const observer = apollo.watchQuery({
28
28
  query: gql`
29
- query receiptItems($checkoutId: String, $visitorId: String, $limit: Int, $offset: Int) {
29
+ query receiptItems($checkoutId: Int, $visitorId: String, $limit: Int, $offset: Int) {
30
30
  shop {
31
31
  id
32
32
  receipt(checkoutId: $checkoutId, visitorId: $visitorId) {
@@ -114,10 +114,11 @@ async function getReceiptTotals(apollo, checkoutId) {
114
114
  return result.data?.shop?.receipt?.totals;
115
115
  }
116
116
  async function getCheckoutTrackingData(apollo, checkoutId, paymentType) {
117
+ const checkoutIdInt = parseInt(checkoutId, 10);
117
118
  const [isFTD, items, totals] = await Promise.all([
118
119
  getFTDStatus(apollo),
119
- getReceiptItems(apollo, checkoutId),
120
- getReceiptTotals(apollo, checkoutId)
120
+ getReceiptItems(apollo, checkoutIdInt),
121
+ getReceiptTotals(apollo, checkoutIdInt)
121
122
  ]);
122
123
  const loans = items.filter((item) => item.__typename === "LoanReservation");
123
124
  const donations = items.filter((item) => item.__typename === "Donation");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getCheckoutTrackingData
3
- } from "./chunk-5V5F6M6B.js";
3
+ } from "./chunk-2NBRXSIM.js";
4
4
  import {
5
5
  validatePreCheckout
6
6
  } from "./chunk-JBQ2KNMP.js";
package/dist/index.cjs CHANGED
@@ -522,7 +522,7 @@ async function getReceiptItems(apollo, checkoutId) {
522
522
  let offset = 0;
523
523
  const observer = apollo.watchQuery({
524
524
  query: import_core7.gql`
525
- query receiptItems($checkoutId: String, $visitorId: String, $limit: Int, $offset: Int) {
525
+ query receiptItems($checkoutId: Int, $visitorId: String, $limit: Int, $offset: Int) {
526
526
  shop {
527
527
  id
528
528
  receipt(checkoutId: $checkoutId, visitorId: $visitorId) {
@@ -610,10 +610,11 @@ async function getReceiptTotals(apollo, checkoutId) {
610
610
  return result.data?.shop?.receipt?.totals;
611
611
  }
612
612
  async function getCheckoutTrackingData(apollo, checkoutId, paymentType) {
613
+ const checkoutIdInt = parseInt(checkoutId, 10);
613
614
  const [isFTD, items, totals] = await Promise.all([
614
615
  getFTDStatus(apollo),
615
- getReceiptItems(apollo, checkoutId),
616
- getReceiptTotals(apollo, checkoutId)
616
+ getReceiptItems(apollo, checkoutIdInt),
617
+ getReceiptTotals(apollo, checkoutIdInt)
617
618
  ]);
618
619
  const loans = items.filter((item) => item.__typename === "LoanReservation");
619
620
  const donations = items.filter((item) => item.__typename === "Donation");
package/dist/index.js CHANGED
@@ -24,13 +24,13 @@ import {
24
24
  } from "./chunk-FCAOCO7O.js";
25
25
  import {
26
26
  executeOneTimeCheckout
27
- } from "./chunk-6BO6KDZ5.js";
27
+ } from "./chunk-PGYSLUDR.js";
28
28
  import {
29
29
  getCheckoutTrackingData,
30
30
  getFTDStatus,
31
31
  getReceiptItems,
32
32
  getReceiptTotals
33
- } from "./chunk-5V5F6M6B.js";
33
+ } from "./chunk-2NBRXSIM.js";
34
34
  import {
35
35
  validatePreCheckout,
36
36
  validatePreCheckoutMutation
@@ -335,7 +335,7 @@ async function getReceiptItems(apollo, checkoutId) {
335
335
  let offset = 0;
336
336
  const observer = apollo.watchQuery({
337
337
  query: import_core4.gql`
338
- query receiptItems($checkoutId: String, $visitorId: String, $limit: Int, $offset: Int) {
338
+ query receiptItems($checkoutId: Int, $visitorId: String, $limit: Int, $offset: Int) {
339
339
  shop {
340
340
  id
341
341
  receipt(checkoutId: $checkoutId, visitorId: $visitorId) {
@@ -423,10 +423,11 @@ async function getReceiptTotals(apollo, checkoutId) {
423
423
  return result.data?.shop?.receipt?.totals;
424
424
  }
425
425
  async function getCheckoutTrackingData(apollo, checkoutId, paymentType) {
426
+ const checkoutIdInt = parseInt(checkoutId, 10);
426
427
  const [isFTD, items, totals] = await Promise.all([
427
428
  getFTDStatus(apollo),
428
- getReceiptItems(apollo, checkoutId),
429
- getReceiptTotals(apollo, checkoutId)
429
+ getReceiptItems(apollo, checkoutIdInt),
430
+ getReceiptTotals(apollo, checkoutIdInt)
430
431
  ]);
431
432
  const loans = items.filter((item) => item.__typename === "LoanReservation");
432
433
  const donations = items.filter((item) => item.__typename === "Donation");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeOneTimeCheckout
3
- } from "./chunk-6BO6KDZ5.js";
4
- import "./chunk-5V5F6M6B.js";
3
+ } from "./chunk-PGYSLUDR.js";
4
+ import "./chunk-2NBRXSIM.js";
5
5
  import "./chunk-JBQ2KNMP.js";
6
6
  import "./chunk-CBJJUUVR.js";
7
7
  import "./chunk-2NC7LGGO.js";
package/dist/receipt.cjs CHANGED
@@ -62,7 +62,7 @@ async function getReceiptItems(apollo, checkoutId) {
62
62
  let offset = 0;
63
63
  const observer = apollo.watchQuery({
64
64
  query: import_core.gql`
65
- query receiptItems($checkoutId: String, $visitorId: String, $limit: Int, $offset: Int) {
65
+ query receiptItems($checkoutId: Int, $visitorId: String, $limit: Int, $offset: Int) {
66
66
  shop {
67
67
  id
68
68
  receipt(checkoutId: $checkoutId, visitorId: $visitorId) {
@@ -150,10 +150,11 @@ async function getReceiptTotals(apollo, checkoutId) {
150
150
  return result.data?.shop?.receipt?.totals;
151
151
  }
152
152
  async function getCheckoutTrackingData(apollo, checkoutId, paymentType) {
153
+ const checkoutIdInt = parseInt(checkoutId, 10);
153
154
  const [isFTD, items, totals] = await Promise.all([
154
155
  getFTDStatus(apollo),
155
- getReceiptItems(apollo, checkoutId),
156
- getReceiptTotals(apollo, checkoutId)
156
+ getReceiptItems(apollo, checkoutIdInt),
157
+ getReceiptTotals(apollo, checkoutIdInt)
157
158
  ]);
158
159
  const loans = items.filter((item) => item.__typename === "LoanReservation");
159
160
  const donations = items.filter((item) => item.__typename === "Donation");
package/dist/receipt.d.ts CHANGED
@@ -9,8 +9,8 @@ interface ReceiptItem {
9
9
  isTip?: boolean;
10
10
  isUserEdited?: boolean;
11
11
  }
12
- declare function getReceiptItems(apollo: ApolloClient<any>, checkoutId: string): Promise<ReceiptItem[]>;
13
- declare function getReceiptTotals(apollo: ApolloClient<any>, checkoutId: string): Promise<any>;
12
+ declare function getReceiptItems(apollo: ApolloClient<any>, checkoutId: number): Promise<ReceiptItem[]>;
13
+ declare function getReceiptTotals(apollo: ApolloClient<any>, checkoutId: number): Promise<any>;
14
14
  declare function getCheckoutTrackingData(apollo: ApolloClient<any>, checkoutId: string, paymentType: string): Promise<TransactionData>;
15
15
 
16
16
  export { getCheckoutTrackingData, getFTDStatus, getReceiptItems, getReceiptTotals };
package/dist/receipt.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  getFTDStatus,
4
4
  getReceiptItems,
5
5
  getReceiptTotals
6
- } from "./chunk-5V5F6M6B.js";
6
+ } from "./chunk-2NBRXSIM.js";
7
7
  import "./chunk-TPJPGUO7.js";
8
8
  import "./chunk-LZ4UMRCV.js";
9
9
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-shop",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
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-analytics": "^1.2.2",
41
+ "@kiva/kv-analytics": "^1.3.0",
42
42
  "@kiva/kv-components": "^3.48.1",
43
43
  "@types/braintree-web-drop-in": "^1.34.2",
44
44
  "braintree-web-drop-in": "^1.37.0",
@@ -54,5 +54,5 @@
54
54
  "optional": true
55
55
  }
56
56
  },
57
- "gitHead": "1cc98bc5e5ce05ad8fb3b0a2c7e42101ab9ffbb5"
57
+ "gitHead": "4c0fb7a983e731ba0d3277e26ba4fb08df9017f6"
58
58
  }