@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/api/services/campaigns/GET/fetchCampaigns.d.ts +2 -2
- package/dist/api/services/campaigns/GET/fetchCampaigns.d.ts.map +1 -1
- package/dist/api/services/campaigns/GET/useCampaign.d.ts +2 -2
- package/dist/api/services/campaigns/GET/useCampaign.d.ts.map +1 -1
- package/dist/api/services/campaigns/GET/useCampaigns.d.ts +2 -2
- package/dist/api/services/campaigns/GET/useCampaigns.d.ts.map +1 -1
- package/dist/api/services/campaigns/POST/createCampaign.d.ts +2 -2
- package/dist/api/services/campaigns/POST/createCampaign.d.ts.map +1 -1
- package/dist/api/services/campaigns/POST/useCreateCampaign.d.ts +2 -2
- package/dist/api/services/campaigns/POST/useCreateCampaign.d.ts.map +1 -1
- package/dist/api/services/campaigns/PUT/updateCampaign.d.ts +2 -2
- package/dist/api/services/campaigns/PUT/updateCampaign.d.ts.map +1 -1
- package/dist/api/services/campaigns/PUT/useUpdateCampaign.d.ts +2 -2
- package/dist/api/services/campaigns/PUT/useUpdateCampaign.d.ts.map +1 -1
- package/dist/entry-frontend.cjs +16 -13
- package/dist/entry-frontend.cjs.map +1 -1
- package/dist/entry-frontend.mjs +16 -13
- package/dist/entry-frontend.mjs.map +1 -1
- package/dist/index.cjs +16 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +16 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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: "
|
|
17253
|
-
//
|
|
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(
|
|
25629
|
-
|
|
25630
|
-
|
|
25631
|
-
|
|
25632
|
-
|
|
25633
|
-
|
|
25634
|
-
unifiedStrategy
|
|
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
|
-
|
|
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.
|
|
25821
|
+
(params, opts) => updateCampaign(params.id, params.data, opts),
|
|
25819
25822
|
{
|
|
25820
25823
|
onSuccess: /* @__PURE__ */ __name((campaign, variables) => {
|
|
25821
|
-
queryClient.setQueryData(["campaign", variables.
|
|
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.
|
|
25829
|
+
queryKey: ["campaign", variables.id, "stats"]
|
|
25827
25830
|
});
|
|
25828
25831
|
}, "onSuccess"),
|
|
25829
25832
|
// Merge default success handler with user-provided options
|