@drawbridge/components 0.1.11 → 0.1.13
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.
|
@@ -245,6 +245,27 @@ const TemplateSocketOrganization = ({
|
|
|
245
245
|
enabled: Boolean(params == null ? void 0 : params.organization),
|
|
246
246
|
room: "organization",
|
|
247
247
|
listeners: {
|
|
248
|
+
// @story affiliates/delete
|
|
249
|
+
// Sync emits this when an affiliate is created, edited or deleted,
|
|
250
|
+
// and on a delete only after its analytics are gone. The Affiliate
|
|
251
|
+
// filter on Analytics / Revenue / Redemptions reads the picker list,
|
|
252
|
+
// and Analytics counts the deleted affiliate's events until it
|
|
253
|
+
// refetches. The analytics key holds the organization inside its
|
|
254
|
+
// filter state, so it is cleared by prefix; only an open page refetches.
|
|
255
|
+
"organization.affiliates": () => {
|
|
256
|
+
queryClient.invalidateQueries({
|
|
257
|
+
queryKey: ["list-resource", "affiliate"]
|
|
258
|
+
});
|
|
259
|
+
queryClient.invalidateQueries({
|
|
260
|
+
queryKey: ["organization-affiliates", params.organization]
|
|
261
|
+
});
|
|
262
|
+
queryClient.invalidateQueries({
|
|
263
|
+
queryKey: ["organization-affiliate"]
|
|
264
|
+
});
|
|
265
|
+
queryClient.invalidateQueries({
|
|
266
|
+
queryKey: ["organization-analytics"]
|
|
267
|
+
});
|
|
268
|
+
},
|
|
248
269
|
// Async AI generation flips a record's processing.ai.status
|
|
249
270
|
// ( pending → ready | failed ) in a sync worker. The worker
|
|
250
271
|
// emits to the org room so the listing refetches and the
|
|
@@ -279,6 +300,9 @@ const TemplateSocketOrganization = ({
|
|
|
279
300
|
queryClient.invalidateQueries({
|
|
280
301
|
queryKey: ["organization-workflow", params.organization]
|
|
281
302
|
});
|
|
303
|
+
queryClient.invalidateQueries({
|
|
304
|
+
queryKey: ["organization-affiliate-campaigns"]
|
|
305
|
+
});
|
|
282
306
|
},
|
|
283
307
|
// A sending domain or SMS number changed state without the browser
|
|
284
308
|
// asking. Registration is asynchronous — the api writes the row and
|
|
@@ -447,6 +471,33 @@ const TemplateSocketOrganization = ({
|
|
|
447
471
|
queryClient.invalidateQueries({
|
|
448
472
|
queryKey: ["organization-members", params.organization]
|
|
449
473
|
});
|
|
474
|
+
queryClient.invalidateQueries({
|
|
475
|
+
queryKey: ["organization-analytics"]
|
|
476
|
+
});
|
|
477
|
+
queryClient.invalidateQueries({
|
|
478
|
+
queryKey: ["organization-brands", params.organization]
|
|
479
|
+
});
|
|
480
|
+
queryClient.invalidateQueries({
|
|
481
|
+
queryKey: ["organization-brand"]
|
|
482
|
+
});
|
|
483
|
+
queryClient.invalidateQueries({
|
|
484
|
+
queryKey: ["organization-affiliates", params.organization]
|
|
485
|
+
});
|
|
486
|
+
queryClient.invalidateQueries({
|
|
487
|
+
queryKey: ["organization-affiliate"]
|
|
488
|
+
});
|
|
489
|
+
queryClient.invalidateQueries({
|
|
490
|
+
queryKey: ["organization-affiliate-campaigns"]
|
|
491
|
+
});
|
|
492
|
+
queryClient.invalidateQueries({
|
|
493
|
+
queryKey: ["list-resource", "affiliate"]
|
|
494
|
+
});
|
|
495
|
+
queryClient.invalidateQueries({
|
|
496
|
+
queryKey: ["campaign-advertisements", params.organization]
|
|
497
|
+
});
|
|
498
|
+
queryClient.invalidateQueries({
|
|
499
|
+
queryKey: ["organization-campaign-advertisement"]
|
|
500
|
+
});
|
|
450
501
|
},
|
|
451
502
|
// @story workflows/list
|
|
452
503
|
// Sync emits this on every workflow status change, on delete, and when
|
|
@@ -511,6 +562,10 @@ const TemplateSocketOrganization = ({
|
|
|
511
562
|
["organization-members", params == null ? void 0 : params.organization],
|
|
512
563
|
["organization-usage-chart", params == null ? void 0 : params.organization],
|
|
513
564
|
["organization-segments", params == null ? void 0 : params.organization],
|
|
565
|
+
["organization-affiliates", params == null ? void 0 : params.organization],
|
|
566
|
+
["organization-analytics"],
|
|
567
|
+
["organization-affiliate-campaigns"],
|
|
568
|
+
["list-resource", "affiliate"],
|
|
514
569
|
["menu", "organization", params == null ? void 0 : params.organization],
|
|
515
570
|
["menu", "campaign", params == null ? void 0 : params.organization]
|
|
516
571
|
]
|
|
@@ -210,6 +210,27 @@ const TemplateSocketOrganization = ({
|
|
|
210
210
|
enabled: Boolean(params == null ? void 0 : params.organization),
|
|
211
211
|
room: "organization",
|
|
212
212
|
listeners: {
|
|
213
|
+
// @story affiliates/delete
|
|
214
|
+
// Sync emits this when an affiliate is created, edited or deleted,
|
|
215
|
+
// and on a delete only after its analytics are gone. The Affiliate
|
|
216
|
+
// filter on Analytics / Revenue / Redemptions reads the picker list,
|
|
217
|
+
// and Analytics counts the deleted affiliate's events until it
|
|
218
|
+
// refetches. The analytics key holds the organization inside its
|
|
219
|
+
// filter state, so it is cleared by prefix; only an open page refetches.
|
|
220
|
+
"organization.affiliates": () => {
|
|
221
|
+
queryClient.invalidateQueries({
|
|
222
|
+
queryKey: ["list-resource", "affiliate"]
|
|
223
|
+
});
|
|
224
|
+
queryClient.invalidateQueries({
|
|
225
|
+
queryKey: ["organization-affiliates", params.organization]
|
|
226
|
+
});
|
|
227
|
+
queryClient.invalidateQueries({
|
|
228
|
+
queryKey: ["organization-affiliate"]
|
|
229
|
+
});
|
|
230
|
+
queryClient.invalidateQueries({
|
|
231
|
+
queryKey: ["organization-analytics"]
|
|
232
|
+
});
|
|
233
|
+
},
|
|
213
234
|
// Async AI generation flips a record's processing.ai.status
|
|
214
235
|
// ( pending → ready | failed ) in a sync worker. The worker
|
|
215
236
|
// emits to the org room so the listing refetches and the
|
|
@@ -244,6 +265,9 @@ const TemplateSocketOrganization = ({
|
|
|
244
265
|
queryClient.invalidateQueries({
|
|
245
266
|
queryKey: ["organization-workflow", params.organization]
|
|
246
267
|
});
|
|
268
|
+
queryClient.invalidateQueries({
|
|
269
|
+
queryKey: ["organization-affiliate-campaigns"]
|
|
270
|
+
});
|
|
247
271
|
},
|
|
248
272
|
// A sending domain or SMS number changed state without the browser
|
|
249
273
|
// asking. Registration is asynchronous — the api writes the row and
|
|
@@ -412,6 +436,33 @@ const TemplateSocketOrganization = ({
|
|
|
412
436
|
queryClient.invalidateQueries({
|
|
413
437
|
queryKey: ["organization-members", params.organization]
|
|
414
438
|
});
|
|
439
|
+
queryClient.invalidateQueries({
|
|
440
|
+
queryKey: ["organization-analytics"]
|
|
441
|
+
});
|
|
442
|
+
queryClient.invalidateQueries({
|
|
443
|
+
queryKey: ["organization-brands", params.organization]
|
|
444
|
+
});
|
|
445
|
+
queryClient.invalidateQueries({
|
|
446
|
+
queryKey: ["organization-brand"]
|
|
447
|
+
});
|
|
448
|
+
queryClient.invalidateQueries({
|
|
449
|
+
queryKey: ["organization-affiliates", params.organization]
|
|
450
|
+
});
|
|
451
|
+
queryClient.invalidateQueries({
|
|
452
|
+
queryKey: ["organization-affiliate"]
|
|
453
|
+
});
|
|
454
|
+
queryClient.invalidateQueries({
|
|
455
|
+
queryKey: ["organization-affiliate-campaigns"]
|
|
456
|
+
});
|
|
457
|
+
queryClient.invalidateQueries({
|
|
458
|
+
queryKey: ["list-resource", "affiliate"]
|
|
459
|
+
});
|
|
460
|
+
queryClient.invalidateQueries({
|
|
461
|
+
queryKey: ["campaign-advertisements", params.organization]
|
|
462
|
+
});
|
|
463
|
+
queryClient.invalidateQueries({
|
|
464
|
+
queryKey: ["organization-campaign-advertisement"]
|
|
465
|
+
});
|
|
415
466
|
},
|
|
416
467
|
// @story workflows/list
|
|
417
468
|
// Sync emits this on every workflow status change, on delete, and when
|
|
@@ -476,6 +527,10 @@ const TemplateSocketOrganization = ({
|
|
|
476
527
|
["organization-members", params == null ? void 0 : params.organization],
|
|
477
528
|
["organization-usage-chart", params == null ? void 0 : params.organization],
|
|
478
529
|
["organization-segments", params == null ? void 0 : params.organization],
|
|
530
|
+
["organization-affiliates", params == null ? void 0 : params.organization],
|
|
531
|
+
["organization-analytics"],
|
|
532
|
+
["organization-affiliate-campaigns"],
|
|
533
|
+
["list-resource", "affiliate"],
|
|
479
534
|
["menu", "organization", params == null ? void 0 : params.organization],
|
|
480
535
|
["menu", "campaign", params == null ? void 0 : params.organization]
|
|
481
536
|
]
|