@connectedxm/admin 1.0.7 → 1.0.8
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -1
- package/dist/index.mjs +9 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -17373,7 +17373,7 @@ interface UpdateSubscriptionProductParams extends MutationParams {
|
|
|
17373
17373
|
* @category Methods
|
|
17374
17374
|
* @group Subscriptions
|
|
17375
17375
|
*/
|
|
17376
|
-
declare const UpdateSubscriptionProduct: ({ subscriptionProductId, subscriptionProduct, adminApiParams, }: UpdateSubscriptionProductParams) => Promise<ConnectedXMResponse<SubscriptionProduct>>;
|
|
17376
|
+
declare const UpdateSubscriptionProduct: ({ subscriptionProductId, subscriptionProduct, queryClient, adminApiParams, }: UpdateSubscriptionProductParams) => Promise<ConnectedXMResponse<SubscriptionProduct>>;
|
|
17377
17377
|
/**
|
|
17378
17378
|
* @category Mutations
|
|
17379
17379
|
* @group Subscriptions
|
package/dist/index.d.ts
CHANGED
|
@@ -17373,7 +17373,7 @@ interface UpdateSubscriptionProductParams extends MutationParams {
|
|
|
17373
17373
|
* @category Methods
|
|
17374
17374
|
* @group Subscriptions
|
|
17375
17375
|
*/
|
|
17376
|
-
declare const UpdateSubscriptionProduct: ({ subscriptionProductId, subscriptionProduct, adminApiParams, }: UpdateSubscriptionProductParams) => Promise<ConnectedXMResponse<SubscriptionProduct>>;
|
|
17376
|
+
declare const UpdateSubscriptionProduct: ({ subscriptionProductId, subscriptionProduct, queryClient, adminApiParams, }: UpdateSubscriptionProductParams) => Promise<ConnectedXMResponse<SubscriptionProduct>>;
|
|
17377
17377
|
/**
|
|
17378
17378
|
* @category Mutations
|
|
17379
17379
|
* @group Subscriptions
|
package/dist/index.js
CHANGED
|
@@ -23820,11 +23820,19 @@ var useUpdateSubscription = (options = {}) => {
|
|
|
23820
23820
|
var UpdateSubscriptionProduct = async ({
|
|
23821
23821
|
subscriptionProductId,
|
|
23822
23822
|
subscriptionProduct,
|
|
23823
|
-
|
|
23823
|
+
queryClient,
|
|
23824
23824
|
adminApiParams
|
|
23825
23825
|
}) => {
|
|
23826
23826
|
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
23827
23827
|
const { data } = await connectedXM.put(`/subscription-products/${subscriptionProductId}`, subscriptionProduct);
|
|
23828
|
+
if (queryClient && data.status === "ok") {
|
|
23829
|
+
queryClient.invalidateQueries({
|
|
23830
|
+
queryKey: SUBSCRIPTION_PRODUCTS_QUERY_KEY()
|
|
23831
|
+
});
|
|
23832
|
+
queryClient.invalidateQueries({
|
|
23833
|
+
queryKey: SUBSCRIPTION_PRODUCT_QUERY_KEY(subscriptionProductId)
|
|
23834
|
+
});
|
|
23835
|
+
}
|
|
23828
23836
|
return data;
|
|
23829
23837
|
};
|
|
23830
23838
|
var useUpdateSubscriptionProduct = (options = {}) => {
|
package/dist/index.mjs
CHANGED
|
@@ -21863,11 +21863,19 @@ var useUpdateSubscription = (options = {}) => {
|
|
|
21863
21863
|
var UpdateSubscriptionProduct = async ({
|
|
21864
21864
|
subscriptionProductId,
|
|
21865
21865
|
subscriptionProduct,
|
|
21866
|
-
|
|
21866
|
+
queryClient,
|
|
21867
21867
|
adminApiParams
|
|
21868
21868
|
}) => {
|
|
21869
21869
|
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
21870
21870
|
const { data } = await connectedXM.put(`/subscription-products/${subscriptionProductId}`, subscriptionProduct);
|
|
21871
|
+
if (queryClient && data.status === "ok") {
|
|
21872
|
+
queryClient.invalidateQueries({
|
|
21873
|
+
queryKey: SUBSCRIPTION_PRODUCTS_QUERY_KEY()
|
|
21874
|
+
});
|
|
21875
|
+
queryClient.invalidateQueries({
|
|
21876
|
+
queryKey: SUBSCRIPTION_PRODUCT_QUERY_KEY(subscriptionProductId)
|
|
21877
|
+
});
|
|
21878
|
+
}
|
|
21871
21879
|
return data;
|
|
21872
21880
|
};
|
|
21873
21881
|
var useUpdateSubscriptionProduct = (options = {}) => {
|