@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.cjs
CHANGED
|
@@ -17265,8 +17265,8 @@ var unifiedStrategies = {
|
|
|
17265
17265
|
mutation: {
|
|
17266
17266
|
cache: "none",
|
|
17267
17267
|
// Never cache mutations
|
|
17268
|
-
retry: "
|
|
17269
|
-
//
|
|
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(
|
|
25645
|
-
|
|
25646
|
-
|
|
25647
|
-
|
|
25648
|
-
|
|
25649
|
-
|
|
25650
|
-
unifiedStrategy
|
|
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
|
-
|
|
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.
|
|
25837
|
+
(params, opts) => updateCampaign(params.id, params.data, opts),
|
|
25835
25838
|
{
|
|
25836
25839
|
onSuccess: /* @__PURE__ */ __name((campaign, variables) => {
|
|
25837
|
-
queryClient.setQueryData(["campaign", variables.
|
|
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.
|
|
25845
|
+
queryKey: ["campaign", variables.id, "stats"]
|
|
25843
25846
|
});
|
|
25844
25847
|
}, "onSuccess"),
|
|
25845
25848
|
// Merge default success handler with user-provided options
|