@techstuff-dev/foundation-api-utils 2.2.0 → 2.3.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.
package/dist/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var slice = require('./chunks/slice-CUaXwIIK.js');
3
+ var slice = require('./chunks/slice-Dpwqdz65.js');
4
4
  var slice$1 = require('./chunks/slice-CkWobkWw.js');
5
5
  var useAuth = require('./chunks/useAuth-DKhvUX_r.js');
6
6
  require('aws-amplify');
@@ -71,9 +71,13 @@ exports.setTaxRate = slice.setTaxRate;
71
71
  exports.toCamelCaseObject = slice.toCamelCaseObject;
72
72
  exports.toggleCart = slice.toggleCart;
73
73
  exports.updateCart = slice.updateCart;
74
+ exports.useFetchOrdersQuery = slice.useFetchOrdersQuery;
74
75
  exports.useForgottenPasswordMutation = slice.useForgottenPasswordMutation;
76
+ exports.useGetOrderQuery = slice.useGetOrderQuery;
77
+ exports.useGetOrdersQuery = slice.useGetOrdersQuery;
75
78
  exports.useGetProductsQuery = slice.useGetProductsQuery;
76
79
  exports.useGetUserInfoQuery = slice.useGetUserInfoQuery;
80
+ exports.useLazyFetchOrdersQuery = slice.useLazyFetchOrdersQuery;
77
81
  exports.useLazyGetProductsQuery = slice.useLazyGetProductsQuery;
78
82
  exports.useLazyGetUserInfoQuery = slice.useLazyGetUserInfoQuery;
79
83
  exports.useLazyVerifyUserAttributesQuery = slice.useLazyVerifyUserAttributesQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,8 +2,8 @@
2
2
 
3
3
  var toolkit = require('@reduxjs/toolkit');
4
4
  var storage = require('@react-native-async-storage/async-storage');
5
- var slice = require('../chunks/slice-CUaXwIIK.js');
6
- var shared = require('../chunks/shared-DhKGyfxw.js');
5
+ var slice = require('../chunks/slice-Dpwqdz65.js');
6
+ var shared = require('../chunks/shared-CdwWllrh.js');
7
7
  require('aws-amplify');
8
8
  require('../chunks/slice-CkWobkWw.js');
9
9
  require('react-redux');
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var toolkit = require('@reduxjs/toolkit');
4
- var slice = require('../chunks/slice-CUaXwIIK.js');
5
- var shared = require('../chunks/shared-DhKGyfxw.js');
4
+ var slice = require('../chunks/slice-Dpwqdz65.js');
5
+ var shared = require('../chunks/shared-CdwWllrh.js');
6
6
  require('aws-amplify');
7
7
  require('../chunks/slice-CkWobkWw.js');
8
8
  require('react-redux');
@@ -1,5 +1,5 @@
1
1
  import { combineSlices } from '@reduxjs/toolkit';
2
- import { w as cartSlice, a as authApi, c as contentApi, p as paymentApi, b as productsApi, o as ordersApi } from './slice-B4QZ6txZ.js';
2
+ import { A as cartSlice, a as authApi, c as contentApi, p as paymentApi, b as productsApi, o as ordersApi } from './slice-BD3oWPrI.js';
3
3
  import { a as authSlice } from './slice-ChJ8ZvmP.js';
4
4
 
5
5
  // This file exists just so TypeScript has a module at ./store for IDEs/build.
@@ -9,4 +9,4 @@ import { a as authSlice } from './slice-ChJ8ZvmP.js';
9
9
  const rootReducer = combineSlices(cartSlice, authSlice, authApi, contentApi, paymentApi, productsApi, ordersApi);
10
10
 
11
11
  export { rootReducer as r };
12
- //# sourceMappingURL=shared-UVgGR-tG.js.map
12
+ //# sourceMappingURL=shared-PYY2b9oT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-UVgGR-tG.js","sources":["../../../lib/store/shared.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;AAUA;AAEA;MACa,WAAW,GAAG,aAAa,CACtC,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS;;;;"}
1
+ {"version":3,"file":"shared-PYY2b9oT.js","sources":["../../../lib/store/shared.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;AAUA;AAEA;MACa,WAAW,GAAG,aAAa,CACtC,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS;;;;"}
@@ -6435,7 +6435,7 @@ const ordersApi = createApi({
6435
6435
  // keepUnusedDataFor: 300,
6436
6436
  endpoints: (builder) => ({
6437
6437
  /**
6438
- * USER API.
6438
+ * Legacy order search endpoint.
6439
6439
  */
6440
6440
  fetchOrders: builder.query({
6441
6441
  query: (ids) => ({
@@ -6446,10 +6446,27 @@ const ordersApi = createApi({
6446
6446
  },
6447
6447
  }),
6448
6448
  }),
6449
+ /**
6450
+ * Get all partnership orders for a customer from Stripe.
6451
+ */
6452
+ getOrders: builder.query({
6453
+ query: ({ customerId }) => ({
6454
+ url: `${process.env.NEXT_PUBLIC_PAYMENTS_URL}/v1/payment/orders`,
6455
+ params: { customerId },
6456
+ }),
6457
+ providesTags: ['Orders'],
6458
+ }),
6459
+ /**
6460
+ * Get a single partnership order by ID from Stripe.
6461
+ */
6462
+ getOrder: builder.query({
6463
+ query: (orderId) => `${process.env.NEXT_PUBLIC_PAYMENTS_URL}/v1/payment/orders/${orderId}`,
6464
+ providesTags: (_result, _error, orderId) => [{ type: 'Orders', id: orderId }],
6465
+ }),
6449
6466
  }),
6450
6467
  });
6451
6468
  // Export hooks for usage in functional components.
6452
- const { useFetchOrdersQuery, useLazyFetchOrdersQuery } = ordersApi;
6469
+ const { useFetchOrdersQuery, useLazyFetchOrdersQuery, useGetOrdersQuery, useGetOrderQuery, } = ordersApi;
6453
6470
 
6454
6471
  const initialState = {
6455
6472
  addedItems: [],
@@ -6603,5 +6620,5 @@ const selectCartItemsIds = createSelector$1([selectMediaInCart], (items) => {
6603
6620
  });
6604
6621
  cartSlice.reducer;
6605
6622
 
6606
- export { formatSchedule as $, removePromoCode as A, addToCart as B, updateCart as C, removeFromCart as D, emptyCart as E, toggleCart as F, selectMediaInCart as G, selectCartTotal as H, selectCartNetTotal as I, selectCartTaxRate as J, selectCartTaxAmount as K, selectCartCount as L, selectCartStatus as M, selectPromoCode as N, selectCartItems as O, selectCartItemsIds as P, formatUserPayload as Q, formatPromos as R, formatWorkout as S, formatShortform as T, formatFaqs as U, formatPages as V, formatSettings as W, formatPress as X, formatGuests as Y, formatVideos as Z, formatSections as _, authApi as a, formatChallenges as a0, formatChallengeDays as a1, formatSecondsToISO8601Duration as a2, formatAuthSession as a3, formatFedaratedSession as a4, formatSocialAuthSession as a5, formatConfig as a6, formatSectionPanels as a7, formatSectionItems as a8, formatTaxonomies as a9, formatSeries as aa, formatSeasons as ab, formatLongform as ac, formatMediaItem as ad, isWeb as ae, isReactNative as af, getPlatform as ag, runOnPlatform as ah, onlyUnique as ai, applyCoupon as aj, applyTax as ak, toCamelCaseObject as al, createUnwrappingBaseQuery as am, productsApi as b, contentApi as c, useResetPasswordAuthMutation as d, useRegisterMutation as e, useVerifyUserQuery as f, useLazyVerifyUserQuery as g, useGetUserInfoQuery as h, useLazyGetUserInfoQuery as i, useUpdateUserInfoMutation as j, useForgottenPasswordMutation as k, useVerifyUserAttributesQuery as l, useLazyVerifyUserAttributesQuery as m, useVerifyUserResendQuery as n, ordersApi as o, paymentApi as p, useLazyVerifyUserResendQuery as q, useUpdateUserMutation as r, useGetProductsQuery as s, useLazyGetProductsQuery as t, useResetPasswordMutation as u, usePurchaseProductMutation as v, cartSlice as w, setTaxRate as x, resetTaxRate as y, setPromoCode as z };
6607
- //# sourceMappingURL=slice-B4QZ6txZ.js.map
6623
+ export { formatPress as $, cartSlice as A, setTaxRate as B, resetTaxRate as C, setPromoCode as D, removePromoCode as E, addToCart as F, updateCart as G, removeFromCart as H, emptyCart as I, toggleCart as J, selectMediaInCart as K, selectCartTotal as L, selectCartNetTotal as M, selectCartTaxRate as N, selectCartTaxAmount as O, selectCartCount as P, selectCartStatus as Q, selectPromoCode as R, selectCartItems as S, selectCartItemsIds as T, formatUserPayload as U, formatPromos as V, formatWorkout as W, formatShortform as X, formatFaqs as Y, formatPages as Z, formatSettings as _, authApi as a, formatGuests as a0, formatVideos as a1, formatSections as a2, formatSchedule as a3, formatChallenges as a4, formatChallengeDays as a5, formatSecondsToISO8601Duration as a6, formatAuthSession as a7, formatFedaratedSession as a8, formatSocialAuthSession as a9, formatConfig as aa, formatSectionPanels as ab, formatSectionItems as ac, formatTaxonomies as ad, formatSeries as ae, formatSeasons as af, formatLongform as ag, formatMediaItem as ah, isWeb as ai, isReactNative as aj, getPlatform as ak, runOnPlatform as al, onlyUnique as am, applyCoupon as an, applyTax as ao, toCamelCaseObject as ap, createUnwrappingBaseQuery as aq, productsApi as b, contentApi as c, useResetPasswordAuthMutation as d, useRegisterMutation as e, useVerifyUserQuery as f, useLazyVerifyUserQuery as g, useGetUserInfoQuery as h, useLazyGetUserInfoQuery as i, useUpdateUserInfoMutation as j, useForgottenPasswordMutation as k, useVerifyUserAttributesQuery as l, useLazyVerifyUserAttributesQuery as m, useVerifyUserResendQuery as n, ordersApi as o, paymentApi as p, useLazyVerifyUserResendQuery as q, useUpdateUserMutation as r, useGetProductsQuery as s, useLazyGetProductsQuery as t, useResetPasswordMutation as u, usePurchaseProductMutation as v, useFetchOrdersQuery as w, useLazyFetchOrdersQuery as x, useGetOrdersQuery as y, useGetOrderQuery as z };
6624
+ //# sourceMappingURL=slice-BD3oWPrI.js.map