@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/entry-frontend.mjs
CHANGED
|
@@ -17238,8 +17238,8 @@ var unifiedStrategies = {
|
|
|
17238
17238
|
mutation: {
|
|
17239
17239
|
cache: "none",
|
|
17240
17240
|
// Never cache mutations
|
|
17241
|
-
retry: "
|
|
17242
|
-
//
|
|
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(
|
|
22428
|
-
|
|
22429
|
-
|
|
22430
|
-
|
|
22431
|
-
|
|
22432
|
-
|
|
22433
|
-
unifiedStrategy
|
|
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
|
-
|
|
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.
|
|
22620
|
+
(params, opts) => updateCampaign(params.id, params.data, opts),
|
|
22618
22621
|
{
|
|
22619
22622
|
onSuccess: /* @__PURE__ */ __name((campaign, variables) => {
|
|
22620
|
-
queryClient.setQueryData(["campaign", variables.
|
|
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.
|
|
22628
|
+
queryKey: ["campaign", variables.id, "stats"]
|
|
22626
22629
|
});
|
|
22627
22630
|
}, "onSuccess"),
|
|
22628
22631
|
// Merge default success handler with user-provided options
|