@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.cjs CHANGED
@@ -17265,8 +17265,8 @@ var unifiedStrategies = {
17265
17265
  mutation: {
17266
17266
  cache: "none",
17267
17267
  // Never cache mutations
17268
- retry: "standard",
17269
- // Standard retry for actual failures (not successes)
17268
+ retry: "none",
17269
+ // No retry - mutations should not auto-retry to prevent duplicates
17270
17270
  // NO polling - this is critical! Polling would re-execute the mutation
17271
17271
  performance: "realtime"
17272
17272
  // Immediate response, no batching
@@ -25641,15 +25641,18 @@ __name(fetchCampaignParticipants, "fetchCampaignParticipants");
25641
25641
 
25642
25642
  // src/api/services/campaigns/GET/useCampaign.ts
25643
25643
  function useCampaign(queryKey, campaignId, serviceOptions, queryOptions) {
25644
- return createApiQuery(fetchCampaign, {
25645
- // Use 'background' unified strategy for stable entity data (includes longLived cache)
25646
- // Using unifiedStrategy (lowest precedence) allows easy override via:
25647
- // - serviceOptions.apiConfig.cacheStrategy (higher precedence)
25648
- // - serviceOptions.apiConfig.unifiedStrategy (same precedence, user wins)
25649
- apiConfig: {
25650
- unifiedStrategy: "background"
25644
+ return createApiQuery(
25645
+ fetchCampaign,
25646
+ {
25647
+ // Use 'background' unified strategy for stable entity data (includes longLived cache)
25648
+ // Using unifiedStrategy (lowest precedence) allows easy override via:
25649
+ // - serviceOptions.apiConfig.cacheStrategy (higher precedence)
25650
+ // - serviceOptions.apiConfig.unifiedStrategy (same precedence, user wins)
25651
+ apiConfig: {
25652
+ unifiedStrategy: "background"
25653
+ }
25651
25654
  }
25652
- })(queryKey, campaignId, serviceOptions, queryOptions);
25655
+ )(queryKey, campaignId, serviceOptions, queryOptions);
25653
25656
  }
25654
25657
  __name(useCampaign, "useCampaign");
25655
25658
 
@@ -25831,15 +25834,15 @@ __name(updateCampaign, "updateCampaign");
25831
25834
  function useUpdateCampaign(serviceOptions, mutationOptions) {
25832
25835
  const queryClient = reactQuery.useQueryClient();
25833
25836
  return createApiMutation(
25834
- (params, opts) => updateCampaign(params.campaignId, params.data, opts),
25837
+ (params, opts) => updateCampaign(params.id, params.data, opts),
25835
25838
  {
25836
25839
  onSuccess: /* @__PURE__ */ __name((campaign, variables) => {
25837
- queryClient.setQueryData(["campaign", variables.campaignId], campaign);
25840
+ queryClient.setQueryData(["campaign", variables.id], campaign);
25838
25841
  void queryClient.invalidateQueries({
25839
25842
  queryKey: ["campaigns"]
25840
25843
  });
25841
25844
  void queryClient.invalidateQueries({
25842
- queryKey: ["campaign", variables.campaignId, "stats"]
25845
+ queryKey: ["campaign", variables.id, "stats"]
25843
25846
  });
25844
25847
  }, "onSuccess"),
25845
25848
  // Merge default success handler with user-provided options