legend-transactional 2.2.1 → 2.2.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/index.d.mts CHANGED
@@ -238,6 +238,15 @@ interface EventPayload {
238
238
  username: string;
239
239
  userlastname: string;
240
240
  };
241
+ /**
242
+ * Event to notify when a user is blocked (permanent emits only).
243
+ */
244
+ 'auth.blocked_user': {
245
+ userId: string;
246
+ blockType: 'permanent' | 'temporary';
247
+ blockReason?: string;
248
+ blockExpirationHours?: number;
249
+ };
241
250
  /**
242
251
  * Event to update a user's subscription.
243
252
  */
@@ -336,6 +345,17 @@ interface EventPayload {
336
345
  'legend_rankings.rankings_finished': {
337
346
  completedRankings: CompletedRanking[];
338
347
  };
348
+ /**
349
+ * Event to deliver intermediate reward (e.g., first game)
350
+ */
351
+ 'legend_rankings.intermediate_reward': {
352
+ userId: string;
353
+ rankingId: number;
354
+ intermediateRewardType: string;
355
+ rewardConfig: Record<string, unknown>;
356
+ templateName: string;
357
+ templateData: Record<string, unknown>;
358
+ };
339
359
  /**
340
360
  * Event to notify when a ranking is created
341
361
  */
@@ -450,6 +470,7 @@ declare const microserviceEvent: {
450
470
  readonly 'AUTH.DELETED_USER': "auth.deleted_user";
451
471
  readonly 'AUTH.LOGOUT_USER': "auth.logout_user";
452
472
  readonly 'AUTH.NEW_USER': "auth.new_user";
473
+ readonly 'AUTH.BLOCKED_USER': "auth.blocked_user";
453
474
  readonly 'COINS.NOTIFY_CLIENT': "coins.notify_client";
454
475
  readonly 'COINS.SEND_EMAIL': "coins.send_email";
455
476
  readonly 'COINS.UPDATE_SUBSCRIPTION': "coins.update_subscription";
@@ -462,6 +483,7 @@ declare const microserviceEvent: {
462
483
  readonly 'LEGEND_MISSIONS.SEND_EMAIL_NFT_MISSION_COMPLETED': "legend_missions.send_email_nft_mission_completed";
463
484
  readonly 'LEGEND_RANKINGS.RANKINGS_FINISHED': "legend_rankings.rankings_finished";
464
485
  readonly 'LEGEND_RANKINGS.NEW_RANKING_CREATED': "legend_rankings.new_ranking_created";
486
+ readonly 'LEGEND_RANKINGS.INTERMEDIATE_REWARD': "legend_rankings.intermediate_reward";
465
487
  readonly 'LEGEND_SHOWCASE.PRODUCT_VIRTUAL_DELETED': "legend_showcase.product_virtual_deleted";
466
488
  readonly 'LEGEND_SHOWCASE.UPDATE_ALLOWED_MISSION_SUBSCRIPTION_IDS': "legend_showcase.update_allowed_mission_subscription_ids";
467
489
  readonly 'LEGEND_SHOWCASE.UPDATE_ALLOWED_RANKING_SUBSCRIPTION_IDS': "legend_showcase.update_allowed_ranking_subscription_ids";
package/dist/index.d.ts CHANGED
@@ -238,6 +238,15 @@ interface EventPayload {
238
238
  username: string;
239
239
  userlastname: string;
240
240
  };
241
+ /**
242
+ * Event to notify when a user is blocked (permanent emits only).
243
+ */
244
+ 'auth.blocked_user': {
245
+ userId: string;
246
+ blockType: 'permanent' | 'temporary';
247
+ blockReason?: string;
248
+ blockExpirationHours?: number;
249
+ };
241
250
  /**
242
251
  * Event to update a user's subscription.
243
252
  */
@@ -336,6 +345,17 @@ interface EventPayload {
336
345
  'legend_rankings.rankings_finished': {
337
346
  completedRankings: CompletedRanking[];
338
347
  };
348
+ /**
349
+ * Event to deliver intermediate reward (e.g., first game)
350
+ */
351
+ 'legend_rankings.intermediate_reward': {
352
+ userId: string;
353
+ rankingId: number;
354
+ intermediateRewardType: string;
355
+ rewardConfig: Record<string, unknown>;
356
+ templateName: string;
357
+ templateData: Record<string, unknown>;
358
+ };
339
359
  /**
340
360
  * Event to notify when a ranking is created
341
361
  */
@@ -450,6 +470,7 @@ declare const microserviceEvent: {
450
470
  readonly 'AUTH.DELETED_USER': "auth.deleted_user";
451
471
  readonly 'AUTH.LOGOUT_USER': "auth.logout_user";
452
472
  readonly 'AUTH.NEW_USER': "auth.new_user";
473
+ readonly 'AUTH.BLOCKED_USER': "auth.blocked_user";
453
474
  readonly 'COINS.NOTIFY_CLIENT': "coins.notify_client";
454
475
  readonly 'COINS.SEND_EMAIL': "coins.send_email";
455
476
  readonly 'COINS.UPDATE_SUBSCRIPTION': "coins.update_subscription";
@@ -462,6 +483,7 @@ declare const microserviceEvent: {
462
483
  readonly 'LEGEND_MISSIONS.SEND_EMAIL_NFT_MISSION_COMPLETED': "legend_missions.send_email_nft_mission_completed";
463
484
  readonly 'LEGEND_RANKINGS.RANKINGS_FINISHED': "legend_rankings.rankings_finished";
464
485
  readonly 'LEGEND_RANKINGS.NEW_RANKING_CREATED': "legend_rankings.new_ranking_created";
486
+ readonly 'LEGEND_RANKINGS.INTERMEDIATE_REWARD': "legend_rankings.intermediate_reward";
465
487
  readonly 'LEGEND_SHOWCASE.PRODUCT_VIRTUAL_DELETED': "legend_showcase.product_virtual_deleted";
466
488
  readonly 'LEGEND_SHOWCASE.UPDATE_ALLOWED_MISSION_SUBSCRIPTION_IDS': "legend_showcase.update_allowed_mission_subscription_ids";
467
489
  readonly 'LEGEND_SHOWCASE.UPDATE_ALLOWED_RANKING_SUBSCRIPTION_IDS': "legend_showcase.update_allowed_ranking_subscription_ids";
package/dist/index.js CHANGED
@@ -101,6 +101,7 @@ var microserviceEvent = {
101
101
  "AUTH.DELETED_USER": "auth.deleted_user",
102
102
  "AUTH.LOGOUT_USER": "auth.logout_user",
103
103
  "AUTH.NEW_USER": "auth.new_user",
104
+ "AUTH.BLOCKED_USER": "auth.blocked_user",
104
105
  "COINS.NOTIFY_CLIENT": "coins.notify_client",
105
106
  "COINS.SEND_EMAIL": "coins.send_email",
106
107
  "COINS.UPDATE_SUBSCRIPTION": "coins.update_subscription",
@@ -113,6 +114,7 @@ var microserviceEvent = {
113
114
  "LEGEND_MISSIONS.SEND_EMAIL_NFT_MISSION_COMPLETED": "legend_missions.send_email_nft_mission_completed",
114
115
  "LEGEND_RANKINGS.RANKINGS_FINISHED": "legend_rankings.rankings_finished",
115
116
  "LEGEND_RANKINGS.NEW_RANKING_CREATED": "legend_rankings.new_ranking_created",
117
+ "LEGEND_RANKINGS.INTERMEDIATE_REWARD": "legend_rankings.intermediate_reward",
116
118
  "LEGEND_SHOWCASE.PRODUCT_VIRTUAL_DELETED": "legend_showcase.product_virtual_deleted",
117
119
  "LEGEND_SHOWCASE.UPDATE_ALLOWED_MISSION_SUBSCRIPTION_IDS": "legend_showcase.update_allowed_mission_subscription_ids",
118
120
  "LEGEND_SHOWCASE.UPDATE_ALLOWED_RANKING_SUBSCRIPTION_IDS": "legend_showcase.update_allowed_ranking_subscription_ids",
package/dist/index.mjs CHANGED
@@ -94,6 +94,7 @@ var microserviceEvent = {
94
94
  "AUTH.DELETED_USER": "auth.deleted_user",
95
95
  "AUTH.LOGOUT_USER": "auth.logout_user",
96
96
  "AUTH.NEW_USER": "auth.new_user",
97
+ "AUTH.BLOCKED_USER": "auth.blocked_user",
97
98
  "COINS.NOTIFY_CLIENT": "coins.notify_client",
98
99
  "COINS.SEND_EMAIL": "coins.send_email",
99
100
  "COINS.UPDATE_SUBSCRIPTION": "coins.update_subscription",
@@ -106,6 +107,7 @@ var microserviceEvent = {
106
107
  "LEGEND_MISSIONS.SEND_EMAIL_NFT_MISSION_COMPLETED": "legend_missions.send_email_nft_mission_completed",
107
108
  "LEGEND_RANKINGS.RANKINGS_FINISHED": "legend_rankings.rankings_finished",
108
109
  "LEGEND_RANKINGS.NEW_RANKING_CREATED": "legend_rankings.new_ranking_created",
110
+ "LEGEND_RANKINGS.INTERMEDIATE_REWARD": "legend_rankings.intermediate_reward",
109
111
  "LEGEND_SHOWCASE.PRODUCT_VIRTUAL_DELETED": "legend_showcase.product_virtual_deleted",
110
112
  "LEGEND_SHOWCASE.UPDATE_ALLOWED_MISSION_SUBSCRIPTION_IDS": "legend_showcase.update_allowed_mission_subscription_ids",
111
113
  "LEGEND_SHOWCASE.UPDATE_ALLOWED_RANKING_SUBSCRIPTION_IDS": "legend_showcase.update_allowed_ranking_subscription_ids",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "legend-transactional",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "A simple transactional, event-driven communication framework for microservices using RabbitMQ",
5
5
  "author": "Jorge Clavijo <jym272@gmail.com> (https://github.com/jym272)",
6
6
  "license": "MIT",