@plyaz/api 1.7.2 → 1.7.3

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.mjs CHANGED
@@ -17249,8 +17249,8 @@ var unifiedStrategies = {
17249
17249
  mutation: {
17250
17250
  cache: "none",
17251
17251
  // Never cache mutations
17252
- retry: "standard",
17253
- // Standard retry for actual failures (not successes)
17252
+ retry: "none",
17253
+ // No retry - mutations should not auto-retry to prevent duplicates
17254
17254
  // NO polling - this is critical! Polling would re-execute the mutation
17255
17255
  performance: "realtime"
17256
17256
  // Immediate response, no batching
@@ -25625,15 +25625,18 @@ __name(fetchCampaignParticipants, "fetchCampaignParticipants");
25625
25625
 
25626
25626
  // src/api/services/campaigns/GET/useCampaign.ts
25627
25627
  function useCampaign(queryKey, campaignId, serviceOptions, queryOptions) {
25628
- return createApiQuery(fetchCampaign, {
25629
- // Use 'background' unified strategy for stable entity data (includes longLived cache)
25630
- // Using unifiedStrategy (lowest precedence) allows easy override via:
25631
- // - serviceOptions.apiConfig.cacheStrategy (higher precedence)
25632
- // - serviceOptions.apiConfig.unifiedStrategy (same precedence, user wins)
25633
- apiConfig: {
25634
- unifiedStrategy: "background"
25628
+ return createApiQuery(
25629
+ fetchCampaign,
25630
+ {
25631
+ // Use 'background' unified strategy for stable entity data (includes longLived cache)
25632
+ // Using unifiedStrategy (lowest precedence) allows easy override via:
25633
+ // - serviceOptions.apiConfig.cacheStrategy (higher precedence)
25634
+ // - serviceOptions.apiConfig.unifiedStrategy (same precedence, user wins)
25635
+ apiConfig: {
25636
+ unifiedStrategy: "background"
25637
+ }
25635
25638
  }
25636
- })(queryKey, campaignId, serviceOptions, queryOptions);
25639
+ )(queryKey, campaignId, serviceOptions, queryOptions);
25637
25640
  }
25638
25641
  __name(useCampaign, "useCampaign");
25639
25642
 
@@ -25815,15 +25818,15 @@ __name(updateCampaign, "updateCampaign");
25815
25818
  function useUpdateCampaign(serviceOptions, mutationOptions) {
25816
25819
  const queryClient = useQueryClient();
25817
25820
  return createApiMutation(
25818
- (params, opts) => updateCampaign(params.campaignId, params.data, opts),
25821
+ (params, opts) => updateCampaign(params.id, params.data, opts),
25819
25822
  {
25820
25823
  onSuccess: /* @__PURE__ */ __name((campaign, variables) => {
25821
- queryClient.setQueryData(["campaign", variables.campaignId], campaign);
25824
+ queryClient.setQueryData(["campaign", variables.id], campaign);
25822
25825
  void queryClient.invalidateQueries({
25823
25826
  queryKey: ["campaigns"]
25824
25827
  });
25825
25828
  void queryClient.invalidateQueries({
25826
- queryKey: ["campaign", variables.campaignId, "stats"]
25829
+ queryKey: ["campaign", variables.id, "stats"]
25827
25830
  });
25828
25831
  }, "onSuccess"),
25829
25832
  // Merge default success handler with user-provided options