@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.
@@ -17238,8 +17238,8 @@ var unifiedStrategies = {
17238
17238
  mutation: {
17239
17239
  cache: "none",
17240
17240
  // Never cache mutations
17241
- retry: "standard",
17242
- // Standard retry for actual failures (not successes)
17241
+ retry: "none",
17242
+ // No retry - mutations should not auto-retry to prevent duplicates
17243
17243
  // NO polling - this is critical! Polling would re-execute the mutation
17244
17244
  performance: "realtime"
17245
17245
  // Immediate response, no batching
@@ -22424,15 +22424,18 @@ __name(createApiMutation, "createApiMutation");
22424
22424
 
22425
22425
  // src/api/services/campaigns/GET/useCampaign.ts
22426
22426
  function useCampaign(queryKey, campaignId, serviceOptions, queryOptions) {
22427
- return createApiQuery(fetchCampaign, {
22428
- // Use 'background' unified strategy for stable entity data (includes longLived cache)
22429
- // Using unifiedStrategy (lowest precedence) allows easy override via:
22430
- // - serviceOptions.apiConfig.cacheStrategy (higher precedence)
22431
- // - serviceOptions.apiConfig.unifiedStrategy (same precedence, user wins)
22432
- apiConfig: {
22433
- unifiedStrategy: "background"
22427
+ return createApiQuery(
22428
+ fetchCampaign,
22429
+ {
22430
+ // Use 'background' unified strategy for stable entity data (includes longLived cache)
22431
+ // Using unifiedStrategy (lowest precedence) allows easy override via:
22432
+ // - serviceOptions.apiConfig.cacheStrategy (higher precedence)
22433
+ // - serviceOptions.apiConfig.unifiedStrategy (same precedence, user wins)
22434
+ apiConfig: {
22435
+ unifiedStrategy: "background"
22436
+ }
22434
22437
  }
22435
- })(queryKey, campaignId, serviceOptions, queryOptions);
22438
+ )(queryKey, campaignId, serviceOptions, queryOptions);
22436
22439
  }
22437
22440
  __name(useCampaign, "useCampaign");
22438
22441
 
@@ -22614,15 +22617,15 @@ __name(updateCampaign, "updateCampaign");
22614
22617
  function useUpdateCampaign(serviceOptions, mutationOptions) {
22615
22618
  const queryClient = useQueryClient();
22616
22619
  return createApiMutation(
22617
- (params, opts) => updateCampaign(params.campaignId, params.data, opts),
22620
+ (params, opts) => updateCampaign(params.id, params.data, opts),
22618
22621
  {
22619
22622
  onSuccess: /* @__PURE__ */ __name((campaign, variables) => {
22620
- queryClient.setQueryData(["campaign", variables.campaignId], campaign);
22623
+ queryClient.setQueryData(["campaign", variables.id], campaign);
22621
22624
  void queryClient.invalidateQueries({
22622
22625
  queryKey: ["campaigns"]
22623
22626
  });
22624
22627
  void queryClient.invalidateQueries({
22625
- queryKey: ["campaign", variables.campaignId, "stats"]
22628
+ queryKey: ["campaign", variables.id, "stats"]
22626
22629
  });
22627
22630
  }, "onSuccess"),
22628
22631
  // Merge default success handler with user-provided options