legend-transactional 2.5.3 → 2.6.0
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 +1 -240
- package/dist/index.d.ts +1 -240
- package/dist/index.js +1 -88
- package/dist/index.mjs +2 -82
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -24,10 +24,6 @@ declare const availableMicroservices: {
|
|
|
24
24
|
* Represents the "blockchain" microservice.
|
|
25
25
|
*/
|
|
26
26
|
readonly Blockchain: "blockchain";
|
|
27
|
-
/**
|
|
28
|
-
* Represents the "coins" microservice.
|
|
29
|
-
*/
|
|
30
|
-
readonly Coins: "coins";
|
|
31
27
|
/**
|
|
32
28
|
* Represents the "legend-missions" microservice.
|
|
33
29
|
*/
|
|
@@ -36,22 +32,6 @@ declare const availableMicroservices: {
|
|
|
36
32
|
* Represents the "rankings" microservice.
|
|
37
33
|
*/
|
|
38
34
|
readonly Rankings: "rankings";
|
|
39
|
-
/**
|
|
40
|
-
* Represents the "rapid-messaging" microservice.
|
|
41
|
-
*/
|
|
42
|
-
readonly RapidMessaging: "rapid-messaging";
|
|
43
|
-
/**
|
|
44
|
-
* Represents the "room-creator" microservice.
|
|
45
|
-
*/
|
|
46
|
-
readonly RoomCreator: "room-creator";
|
|
47
|
-
/**
|
|
48
|
-
* Represents the "room-inventory" microservice.
|
|
49
|
-
*/
|
|
50
|
-
readonly RoomInventory: "room-inventory";
|
|
51
|
-
/**
|
|
52
|
-
* Represents the "room-snapshot" microservice.
|
|
53
|
-
*/
|
|
54
|
-
readonly RoomSnapshot: "room-snapshot";
|
|
55
35
|
/**
|
|
56
36
|
* Represents the "transactional" microservice.
|
|
57
37
|
*/
|
|
@@ -68,10 +48,6 @@ declare const availableMicroservices: {
|
|
|
68
48
|
* Represents the "social" microservice.
|
|
69
49
|
*/
|
|
70
50
|
readonly Social: "social";
|
|
71
|
-
/**
|
|
72
|
-
* Represents the "social-media-rooms" microservice.
|
|
73
|
-
*/
|
|
74
|
-
readonly SocialMediaRooms: "social-media-rooms";
|
|
75
51
|
/**
|
|
76
52
|
* Represents the "legend-storage" microservice.
|
|
77
53
|
*/
|
|
@@ -88,34 +64,6 @@ declare const availableMicroservices: {
|
|
|
88
64
|
*/
|
|
89
65
|
type AvailableMicroservices = (typeof availableMicroservices)[keyof typeof availableMicroservices];
|
|
90
66
|
|
|
91
|
-
/**
|
|
92
|
-
* Types of rooms
|
|
93
|
-
*/
|
|
94
|
-
declare const RoomTypes: {
|
|
95
|
-
readonly ISLAND: "island";
|
|
96
|
-
readonly HOUSE: "house";
|
|
97
|
-
readonly HALL_OF_FAME: "hallOfFame";
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Type of RoomTypes
|
|
101
|
-
*/
|
|
102
|
-
type RoomType = (typeof RoomTypes)[keyof typeof RoomTypes];
|
|
103
|
-
/**
|
|
104
|
-
* Room in Room Creator
|
|
105
|
-
*/
|
|
106
|
-
interface Room {
|
|
107
|
-
Id: string;
|
|
108
|
-
CreateAt: string;
|
|
109
|
-
UpdateAt: string;
|
|
110
|
-
type: RoomType;
|
|
111
|
-
name: string;
|
|
112
|
-
ownerId: string;
|
|
113
|
-
ownerEmail: string;
|
|
114
|
-
maxPlayers: number;
|
|
115
|
-
maxLayers: number;
|
|
116
|
-
templateId: string;
|
|
117
|
-
haveEditor: boolean;
|
|
118
|
-
}
|
|
119
67
|
/**
|
|
120
68
|
* Types of Payment Email Types
|
|
121
69
|
*/
|
|
@@ -262,36 +210,6 @@ interface EventPayload {
|
|
|
262
210
|
blockReason?: string;
|
|
263
211
|
blockExpirationHours?: number;
|
|
264
212
|
};
|
|
265
|
-
/**
|
|
266
|
-
* Event to update a user's subscription.
|
|
267
|
-
*/
|
|
268
|
-
'coins.update_subscription': {
|
|
269
|
-
userId: string;
|
|
270
|
-
paidPriceId: string;
|
|
271
|
-
};
|
|
272
|
-
/**
|
|
273
|
-
* Websocket event to notify the client about a coins related event.
|
|
274
|
-
*/
|
|
275
|
-
'coins.notify_client': {
|
|
276
|
-
room: `coins-${string}`;
|
|
277
|
-
message: Record<string, unknown>;
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* Event to send email to users.
|
|
281
|
-
*/
|
|
282
|
-
'coins.send_email': {
|
|
283
|
-
userId: string;
|
|
284
|
-
email: string;
|
|
285
|
-
emailType: PaymentEmailType;
|
|
286
|
-
coins: number;
|
|
287
|
-
};
|
|
288
|
-
/**
|
|
289
|
-
* Event to give the user coins for completing a mission
|
|
290
|
-
*/
|
|
291
|
-
'legend_missions.completed_mission_reward': {
|
|
292
|
-
userId: string;
|
|
293
|
-
coins: number;
|
|
294
|
-
};
|
|
295
213
|
/**
|
|
296
214
|
* Event to notify the mission's author that it has been created
|
|
297
215
|
*/
|
|
@@ -421,39 +339,6 @@ interface EventPayload {
|
|
|
421
339
|
productVirtualId: string;
|
|
422
340
|
allowedSubscriptionIds: string[];
|
|
423
341
|
};
|
|
424
|
-
/**
|
|
425
|
-
* Event to notify the creation of a room.
|
|
426
|
-
*/
|
|
427
|
-
'room_creator.created_room': {
|
|
428
|
-
room: Room;
|
|
429
|
-
};
|
|
430
|
-
/**
|
|
431
|
-
* Event emitted when a room is updated.
|
|
432
|
-
*/
|
|
433
|
-
'room_creator.updated_room': {
|
|
434
|
-
room: Room;
|
|
435
|
-
};
|
|
436
|
-
/**
|
|
437
|
-
* Event emitted when the image of a virtual product's building is updated
|
|
438
|
-
*/
|
|
439
|
-
'room_inventory.update_vp_building_image': {
|
|
440
|
-
images: string[];
|
|
441
|
-
roomType: string;
|
|
442
|
-
userId: string;
|
|
443
|
-
};
|
|
444
|
-
/**
|
|
445
|
-
* Event emitted when a user changes buildings within the island
|
|
446
|
-
*/
|
|
447
|
-
'room_snapshot.building_change_in_island': {
|
|
448
|
-
userId: string;
|
|
449
|
-
building: string;
|
|
450
|
-
};
|
|
451
|
-
/**
|
|
452
|
-
* Event to notify the first saved snapshot of a room.
|
|
453
|
-
*/
|
|
454
|
-
'room_snapshot.first_snapshot': {
|
|
455
|
-
slug: string;
|
|
456
|
-
};
|
|
457
342
|
/**
|
|
458
343
|
* Event to block chat between two users.
|
|
459
344
|
*/
|
|
@@ -480,13 +365,6 @@ interface EventPayload {
|
|
|
480
365
|
'social.updated_user': {
|
|
481
366
|
socialUser: SocialUser;
|
|
482
367
|
};
|
|
483
|
-
/**
|
|
484
|
-
* Event to delete assets in batch
|
|
485
|
-
*/
|
|
486
|
-
'social_media_rooms.delete_in_batch': {
|
|
487
|
-
bucketName: string;
|
|
488
|
-
filePaths: string[];
|
|
489
|
-
};
|
|
490
368
|
/**
|
|
491
369
|
* Emitted when an event is published by a microservice (audit tracking)
|
|
492
370
|
*/
|
|
@@ -618,10 +496,6 @@ declare const microserviceEvent: {
|
|
|
618
496
|
readonly 'AUTH.LOGOUT_USER': "auth.logout_user";
|
|
619
497
|
readonly 'AUTH.NEW_USER': "auth.new_user";
|
|
620
498
|
readonly 'AUTH.BLOCKED_USER': "auth.blocked_user";
|
|
621
|
-
readonly 'COINS.NOTIFY_CLIENT': "coins.notify_client";
|
|
622
|
-
readonly 'COINS.SEND_EMAIL': "coins.send_email";
|
|
623
|
-
readonly 'COINS.UPDATE_SUBSCRIPTION': "coins.update_subscription";
|
|
624
|
-
readonly 'LEGEND_MISSIONS.COMPLETED_MISSION_REWARD': "legend_missions.completed_mission_reward";
|
|
625
499
|
readonly 'LEGEND_MISSIONS.NEW_MISSION_CREATED': "legend_missions.new_mission_created";
|
|
626
500
|
readonly 'LEGEND_MISSIONS.ONGOING_MISSION': "legend_missions.ongoing_mission";
|
|
627
501
|
readonly 'LEGEND_MISSIONS.MISSION_FINISHED': "legend_missions.mission_finished";
|
|
@@ -635,16 +509,10 @@ declare const microserviceEvent: {
|
|
|
635
509
|
readonly 'LEGEND_SHOWCASE.PRODUCT_VIRTUAL_DELETED': "legend_showcase.product_virtual_deleted";
|
|
636
510
|
readonly 'LEGEND_SHOWCASE.UPDATE_ALLOWED_MISSION_SUBSCRIPTION_IDS': "legend_showcase.update_allowed_mission_subscription_ids";
|
|
637
511
|
readonly 'LEGEND_SHOWCASE.UPDATE_ALLOWED_RANKING_SUBSCRIPTION_IDS': "legend_showcase.update_allowed_ranking_subscription_ids";
|
|
638
|
-
readonly 'ROOM_CREATOR.CREATED_ROOM': "room_creator.created_room";
|
|
639
|
-
readonly 'ROOM_CREATOR.UPDATED_ROOM': "room_creator.updated_room";
|
|
640
|
-
readonly 'ROOM_INVENTORY.UPDATE_VP_BUILDING_IMAGE': "room_inventory.update_vp_building_image";
|
|
641
|
-
readonly 'ROOM_SNAPSHOT.BUILDING_CHANGE_IN_ISLAND': "room_snapshot.building_change_in_island";
|
|
642
|
-
readonly 'ROOM_SNAPSHOT.FIRST_SNAPSHOT': "room_snapshot.first_snapshot";
|
|
643
512
|
readonly 'SOCIAL.BLOCK_CHAT': "social.block_chat";
|
|
644
513
|
readonly 'SOCIAL.NEW_USER': "social.new_user";
|
|
645
514
|
readonly 'SOCIAL.UNBLOCK_CHAT': "social.unblock_chat";
|
|
646
515
|
readonly 'SOCIAL.UPDATED_USER': "social.updated_user";
|
|
647
|
-
readonly 'SOCIAL_MEDIA_ROOMS.DELETE_IN_BATCH': "social_media_rooms.delete_in_batch";
|
|
648
516
|
};
|
|
649
517
|
/**
|
|
650
518
|
* Available microservices events in the system.
|
|
@@ -999,38 +867,6 @@ declare const socialCommands: {
|
|
|
999
867
|
*/
|
|
1000
868
|
type SocialCommands = (typeof socialCommands)[keyof typeof socialCommands];
|
|
1001
869
|
|
|
1002
|
-
/**
|
|
1003
|
-
* Different commands related to the "coins" microservice.
|
|
1004
|
-
*/
|
|
1005
|
-
declare const coinsCommands: {
|
|
1006
|
-
/**
|
|
1007
|
-
* Saga step to deduct coins when a user purchase a resource
|
|
1008
|
-
*/
|
|
1009
|
-
readonly DeductCoins: "resource_purchased:deduct_coins";
|
|
1010
|
-
/**
|
|
1011
|
-
* Saga step to reward coins to users based on their rankings
|
|
1012
|
-
*/
|
|
1013
|
-
readonly RankingsRewardCoins: "rankings_users_reward:reward_coins";
|
|
1014
|
-
};
|
|
1015
|
-
/**
|
|
1016
|
-
* Available commands for the "coins" microservice.
|
|
1017
|
-
*/
|
|
1018
|
-
type CoinsCommands = (typeof coinsCommands)[keyof typeof coinsCommands];
|
|
1019
|
-
|
|
1020
|
-
/**
|
|
1021
|
-
* Different commands related to the "room-creator" microservice.
|
|
1022
|
-
*/
|
|
1023
|
-
declare const roomCreatorCommands: {
|
|
1024
|
-
/**
|
|
1025
|
-
* Command to update the island room template.
|
|
1026
|
-
*/
|
|
1027
|
-
readonly update_island_room_template: "update_island_room_template";
|
|
1028
|
-
};
|
|
1029
|
-
/**
|
|
1030
|
-
* Available commands for the "room-creator" microservice.
|
|
1031
|
-
*/
|
|
1032
|
-
type RoomCreatorCommands = (typeof roomCreatorCommands)[keyof typeof roomCreatorCommands];
|
|
1033
|
-
|
|
1034
870
|
/**
|
|
1035
871
|
* Different commands related to the "legend-showcase" microservice.
|
|
1036
872
|
*/
|
|
@@ -1059,38 +895,6 @@ declare const storageCommands: {
|
|
|
1059
895
|
*/
|
|
1060
896
|
type StorageCommands = (typeof storageCommands)[keyof typeof storageCommands];
|
|
1061
897
|
|
|
1062
|
-
/**
|
|
1063
|
-
* Different commands related to the "room-snapshot" microservice.
|
|
1064
|
-
*/
|
|
1065
|
-
declare const roomSnapshotCommands: {};
|
|
1066
|
-
/**
|
|
1067
|
-
* Available commands for the "room-snapshot" microservice.
|
|
1068
|
-
*/
|
|
1069
|
-
type RoomSnapshotCommands = (typeof roomSnapshotCommands)[keyof typeof roomSnapshotCommands];
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
* Different commands related to the "room-inventory" microservice.
|
|
1073
|
-
*/
|
|
1074
|
-
declare const roomInventoryCommands: {
|
|
1075
|
-
/**
|
|
1076
|
-
* Command to save a purchased resource on user inventory
|
|
1077
|
-
*/
|
|
1078
|
-
readonly SavePurchasedResource: "resource_purchased:save_purchased_resource";
|
|
1079
|
-
};
|
|
1080
|
-
/**
|
|
1081
|
-
* Available commands for the "room-inventory" microservice.
|
|
1082
|
-
*/
|
|
1083
|
-
type RoomInventoryCommands = (typeof roomInventoryCommands)[keyof typeof roomInventoryCommands];
|
|
1084
|
-
|
|
1085
|
-
/**
|
|
1086
|
-
* Different commands related to the "rapid-messaging" microservice.
|
|
1087
|
-
*/
|
|
1088
|
-
declare const rapidMessagingCommands: {};
|
|
1089
|
-
/**
|
|
1090
|
-
* Available commands for the "rapid-messaging" microservice.
|
|
1091
|
-
*/
|
|
1092
|
-
type RapidMessagingCommands = (typeof rapidMessagingCommands)[keyof typeof rapidMessagingCommands];
|
|
1093
|
-
|
|
1094
898
|
/**
|
|
1095
899
|
* Different commands related to the "legend-missions" microservice.
|
|
1096
900
|
*/
|
|
@@ -1100,15 +904,6 @@ declare const missionsCommands: {};
|
|
|
1100
904
|
*/
|
|
1101
905
|
type MissionsCommands = (typeof missionsCommands)[keyof typeof missionsCommands];
|
|
1102
906
|
|
|
1103
|
-
/**
|
|
1104
|
-
* Different commands related to the "social-media-rooms" microservice.
|
|
1105
|
-
*/
|
|
1106
|
-
declare const socialMediaRoomsCommands: {};
|
|
1107
|
-
/**
|
|
1108
|
-
* Available commands for the "social-media-rooms" microservice.
|
|
1109
|
-
*/
|
|
1110
|
-
type SocialMediaRoomsCommands = (typeof socialMediaRoomsCommands)[keyof typeof socialMediaRoomsCommands];
|
|
1111
|
-
|
|
1112
907
|
/**
|
|
1113
908
|
* Different commands related to the "send-email" microservice.
|
|
1114
909
|
*/
|
|
@@ -1162,10 +957,6 @@ interface CommandMap {
|
|
|
1162
957
|
* Represents the mapping of "blockchain" microservice commands.
|
|
1163
958
|
*/
|
|
1164
959
|
[availableMicroservices.Blockchain]: BlockchainCommands;
|
|
1165
|
-
/**
|
|
1166
|
-
* Represents the mapping of "coins" microservice commands.
|
|
1167
|
-
*/
|
|
1168
|
-
[availableMicroservices.Coins]: CoinsCommands;
|
|
1169
960
|
/**
|
|
1170
961
|
* Represents the mapping of "legend-missions" microservice commands.
|
|
1171
962
|
*/
|
|
@@ -1174,22 +965,6 @@ interface CommandMap {
|
|
|
1174
965
|
* Represents the mapping of "rankings" microservice commands.
|
|
1175
966
|
*/
|
|
1176
967
|
[availableMicroservices.Rankings]: RankingsCommands;
|
|
1177
|
-
/**
|
|
1178
|
-
* Represents the mapping of "rapid-messaging" microservice commands.
|
|
1179
|
-
*/
|
|
1180
|
-
[availableMicroservices.RapidMessaging]: RapidMessagingCommands;
|
|
1181
|
-
/**
|
|
1182
|
-
* Represents the mapping of "room-creator" microservice commands.
|
|
1183
|
-
*/
|
|
1184
|
-
[availableMicroservices.RoomCreator]: RoomCreatorCommands;
|
|
1185
|
-
/**
|
|
1186
|
-
* Represents the mapping of "room-inventory" microservice commands.
|
|
1187
|
-
*/
|
|
1188
|
-
[availableMicroservices.RoomInventory]: RoomInventoryCommands;
|
|
1189
|
-
/**
|
|
1190
|
-
* Represents the mapping of "room-snapshot" microservice commands.
|
|
1191
|
-
*/
|
|
1192
|
-
[availableMicroservices.RoomSnapshot]: RoomSnapshotCommands;
|
|
1193
968
|
/**
|
|
1194
969
|
* Represents the mapping of "legend-send-email" microservice commands.
|
|
1195
970
|
*/
|
|
@@ -1202,10 +977,6 @@ interface CommandMap {
|
|
|
1202
977
|
* Represents the mapping of "social" microservice commands.
|
|
1203
978
|
*/
|
|
1204
979
|
[availableMicroservices.Social]: SocialCommands;
|
|
1205
|
-
/**
|
|
1206
|
-
* Represents the mapping of "social-media-rooms" microservice commands.
|
|
1207
|
-
*/
|
|
1208
|
-
[availableMicroservices.SocialMediaRooms]: SocialMediaRoomsCommands;
|
|
1209
980
|
/**
|
|
1210
981
|
* Represents the mapping of "legend-storage" microservice commands.
|
|
1211
982
|
*/
|
|
@@ -1450,10 +1221,6 @@ declare const sagaTitle: {
|
|
|
1450
1221
|
* Saga used in the flow to purchase resources and deduct coins from the user.
|
|
1451
1222
|
*/
|
|
1452
1223
|
readonly PurchaseResourceFlow: "purchase_resource_flow";
|
|
1453
|
-
/**
|
|
1454
|
-
* Saga used in to reward users based on their rankings.
|
|
1455
|
-
*/
|
|
1456
|
-
readonly RankingsUsersReward: "rankings_users_reward";
|
|
1457
1224
|
/**
|
|
1458
1225
|
* Saga used to initiate a crypto transfer for a mission winner.
|
|
1459
1226
|
*/
|
|
@@ -1474,12 +1241,6 @@ interface SagaCommencePayload {
|
|
|
1474
1241
|
price: number;
|
|
1475
1242
|
quantity: number;
|
|
1476
1243
|
};
|
|
1477
|
-
['rankings_users_reward']: {
|
|
1478
|
-
rewards: {
|
|
1479
|
-
userId: string;
|
|
1480
|
-
coins: number;
|
|
1481
|
-
}[];
|
|
1482
|
-
};
|
|
1483
1244
|
['transfer_crypto_reward_to_mission_winner']: {
|
|
1484
1245
|
walletAddress: string;
|
|
1485
1246
|
userId: string;
|
|
@@ -1893,4 +1654,4 @@ declare const getEventObject: (event: MicroserviceEvent) => {
|
|
|
1893
1654
|
*/
|
|
1894
1655
|
declare function extractMicroserviceFromQueue(queueName: string): string;
|
|
1895
1656
|
|
|
1896
|
-
export { type AuditEdaCommands, type AuthCommands, type AvailableMicroservices, type BlockchainCommands, type
|
|
1657
|
+
export { type AuditEdaCommands, type AuthCommands, type AvailableMicroservices, type BlockchainCommands, type CommandMap, type CommenceSaga, type CommenceSagaEvents, type CommenceSagaHandler, type CompletedRanking, type EventPayload, EventsConsumeChannel, type EventsHandler, type Exchange, type Gender, MAX_NACK_RETRIES, MAX_OCCURRENCE, type MicroserviceCommand, MicroserviceConsumeChannel, type MicroserviceConsumeEvents, type MicroserviceConsumeSagaEvents, type MicroserviceEvent, type MicroserviceHandler, NACKING_DELAY_MS, type Nack, type PaymentEmailType, PaymentEmailTypes, type QueueConsumerProps, type RankingWinners, type RankingsCommands, Saga, SagaCommenceConsumeChannel, type SagaCommencePayload, SagaConsumeChannel, type SagaConsumeSagaEvents, type SagaHandler, type SagaStep, type SagaStepDefaults, type SagaTitle, type SendEmailCommands, type ShowcaseCommands, type SocialCommands, type SocialUser, type Status, type StorageCommands, type TestImageCommands, type TestMintCommands, Transactional, type TransactionalCommands, type TransactionalConfig, type UserLocation, auditEdaCommands, authCommands, availableMicroservices, blockchainCommands, closeConsumeChannel, closeRabbitMQConn, closeSendChannel, commenceSaga, commenceSagaConsumeCallback, consume, createAuditLoggingResources, createConsumers, createHeaderConsumers, eventCallback, exchange, extractMicroserviceFromQueue, fibonacci, gender, getConsumeChannel, getEventKey, getEventObject, getQueueConsumer, getQueueName, getRabbitMQConn, getSendChannel, getStoredConfig, isConnectionHealthy, microserviceEvent, nodeDataDefaults, publishEvent, queue, rankingsCommands, sagaConsumeCallback, sagaStepCallback, sagaTitle, saveQueueForHealthCheck, sendEmailCommands, sendToQueue, showcaseCommands, socialCommands, status, stopRabbitMQ, storageCommands, testImageCommands, testMintCommands, transactionalCommands };
|
package/dist/index.d.ts
CHANGED
|
@@ -24,10 +24,6 @@ declare const availableMicroservices: {
|
|
|
24
24
|
* Represents the "blockchain" microservice.
|
|
25
25
|
*/
|
|
26
26
|
readonly Blockchain: "blockchain";
|
|
27
|
-
/**
|
|
28
|
-
* Represents the "coins" microservice.
|
|
29
|
-
*/
|
|
30
|
-
readonly Coins: "coins";
|
|
31
27
|
/**
|
|
32
28
|
* Represents the "legend-missions" microservice.
|
|
33
29
|
*/
|
|
@@ -36,22 +32,6 @@ declare const availableMicroservices: {
|
|
|
36
32
|
* Represents the "rankings" microservice.
|
|
37
33
|
*/
|
|
38
34
|
readonly Rankings: "rankings";
|
|
39
|
-
/**
|
|
40
|
-
* Represents the "rapid-messaging" microservice.
|
|
41
|
-
*/
|
|
42
|
-
readonly RapidMessaging: "rapid-messaging";
|
|
43
|
-
/**
|
|
44
|
-
* Represents the "room-creator" microservice.
|
|
45
|
-
*/
|
|
46
|
-
readonly RoomCreator: "room-creator";
|
|
47
|
-
/**
|
|
48
|
-
* Represents the "room-inventory" microservice.
|
|
49
|
-
*/
|
|
50
|
-
readonly RoomInventory: "room-inventory";
|
|
51
|
-
/**
|
|
52
|
-
* Represents the "room-snapshot" microservice.
|
|
53
|
-
*/
|
|
54
|
-
readonly RoomSnapshot: "room-snapshot";
|
|
55
35
|
/**
|
|
56
36
|
* Represents the "transactional" microservice.
|
|
57
37
|
*/
|
|
@@ -68,10 +48,6 @@ declare const availableMicroservices: {
|
|
|
68
48
|
* Represents the "social" microservice.
|
|
69
49
|
*/
|
|
70
50
|
readonly Social: "social";
|
|
71
|
-
/**
|
|
72
|
-
* Represents the "social-media-rooms" microservice.
|
|
73
|
-
*/
|
|
74
|
-
readonly SocialMediaRooms: "social-media-rooms";
|
|
75
51
|
/**
|
|
76
52
|
* Represents the "legend-storage" microservice.
|
|
77
53
|
*/
|
|
@@ -88,34 +64,6 @@ declare const availableMicroservices: {
|
|
|
88
64
|
*/
|
|
89
65
|
type AvailableMicroservices = (typeof availableMicroservices)[keyof typeof availableMicroservices];
|
|
90
66
|
|
|
91
|
-
/**
|
|
92
|
-
* Types of rooms
|
|
93
|
-
*/
|
|
94
|
-
declare const RoomTypes: {
|
|
95
|
-
readonly ISLAND: "island";
|
|
96
|
-
readonly HOUSE: "house";
|
|
97
|
-
readonly HALL_OF_FAME: "hallOfFame";
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Type of RoomTypes
|
|
101
|
-
*/
|
|
102
|
-
type RoomType = (typeof RoomTypes)[keyof typeof RoomTypes];
|
|
103
|
-
/**
|
|
104
|
-
* Room in Room Creator
|
|
105
|
-
*/
|
|
106
|
-
interface Room {
|
|
107
|
-
Id: string;
|
|
108
|
-
CreateAt: string;
|
|
109
|
-
UpdateAt: string;
|
|
110
|
-
type: RoomType;
|
|
111
|
-
name: string;
|
|
112
|
-
ownerId: string;
|
|
113
|
-
ownerEmail: string;
|
|
114
|
-
maxPlayers: number;
|
|
115
|
-
maxLayers: number;
|
|
116
|
-
templateId: string;
|
|
117
|
-
haveEditor: boolean;
|
|
118
|
-
}
|
|
119
67
|
/**
|
|
120
68
|
* Types of Payment Email Types
|
|
121
69
|
*/
|
|
@@ -262,36 +210,6 @@ interface EventPayload {
|
|
|
262
210
|
blockReason?: string;
|
|
263
211
|
blockExpirationHours?: number;
|
|
264
212
|
};
|
|
265
|
-
/**
|
|
266
|
-
* Event to update a user's subscription.
|
|
267
|
-
*/
|
|
268
|
-
'coins.update_subscription': {
|
|
269
|
-
userId: string;
|
|
270
|
-
paidPriceId: string;
|
|
271
|
-
};
|
|
272
|
-
/**
|
|
273
|
-
* Websocket event to notify the client about a coins related event.
|
|
274
|
-
*/
|
|
275
|
-
'coins.notify_client': {
|
|
276
|
-
room: `coins-${string}`;
|
|
277
|
-
message: Record<string, unknown>;
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* Event to send email to users.
|
|
281
|
-
*/
|
|
282
|
-
'coins.send_email': {
|
|
283
|
-
userId: string;
|
|
284
|
-
email: string;
|
|
285
|
-
emailType: PaymentEmailType;
|
|
286
|
-
coins: number;
|
|
287
|
-
};
|
|
288
|
-
/**
|
|
289
|
-
* Event to give the user coins for completing a mission
|
|
290
|
-
*/
|
|
291
|
-
'legend_missions.completed_mission_reward': {
|
|
292
|
-
userId: string;
|
|
293
|
-
coins: number;
|
|
294
|
-
};
|
|
295
213
|
/**
|
|
296
214
|
* Event to notify the mission's author that it has been created
|
|
297
215
|
*/
|
|
@@ -421,39 +339,6 @@ interface EventPayload {
|
|
|
421
339
|
productVirtualId: string;
|
|
422
340
|
allowedSubscriptionIds: string[];
|
|
423
341
|
};
|
|
424
|
-
/**
|
|
425
|
-
* Event to notify the creation of a room.
|
|
426
|
-
*/
|
|
427
|
-
'room_creator.created_room': {
|
|
428
|
-
room: Room;
|
|
429
|
-
};
|
|
430
|
-
/**
|
|
431
|
-
* Event emitted when a room is updated.
|
|
432
|
-
*/
|
|
433
|
-
'room_creator.updated_room': {
|
|
434
|
-
room: Room;
|
|
435
|
-
};
|
|
436
|
-
/**
|
|
437
|
-
* Event emitted when the image of a virtual product's building is updated
|
|
438
|
-
*/
|
|
439
|
-
'room_inventory.update_vp_building_image': {
|
|
440
|
-
images: string[];
|
|
441
|
-
roomType: string;
|
|
442
|
-
userId: string;
|
|
443
|
-
};
|
|
444
|
-
/**
|
|
445
|
-
* Event emitted when a user changes buildings within the island
|
|
446
|
-
*/
|
|
447
|
-
'room_snapshot.building_change_in_island': {
|
|
448
|
-
userId: string;
|
|
449
|
-
building: string;
|
|
450
|
-
};
|
|
451
|
-
/**
|
|
452
|
-
* Event to notify the first saved snapshot of a room.
|
|
453
|
-
*/
|
|
454
|
-
'room_snapshot.first_snapshot': {
|
|
455
|
-
slug: string;
|
|
456
|
-
};
|
|
457
342
|
/**
|
|
458
343
|
* Event to block chat between two users.
|
|
459
344
|
*/
|
|
@@ -480,13 +365,6 @@ interface EventPayload {
|
|
|
480
365
|
'social.updated_user': {
|
|
481
366
|
socialUser: SocialUser;
|
|
482
367
|
};
|
|
483
|
-
/**
|
|
484
|
-
* Event to delete assets in batch
|
|
485
|
-
*/
|
|
486
|
-
'social_media_rooms.delete_in_batch': {
|
|
487
|
-
bucketName: string;
|
|
488
|
-
filePaths: string[];
|
|
489
|
-
};
|
|
490
368
|
/**
|
|
491
369
|
* Emitted when an event is published by a microservice (audit tracking)
|
|
492
370
|
*/
|
|
@@ -618,10 +496,6 @@ declare const microserviceEvent: {
|
|
|
618
496
|
readonly 'AUTH.LOGOUT_USER': "auth.logout_user";
|
|
619
497
|
readonly 'AUTH.NEW_USER': "auth.new_user";
|
|
620
498
|
readonly 'AUTH.BLOCKED_USER': "auth.blocked_user";
|
|
621
|
-
readonly 'COINS.NOTIFY_CLIENT': "coins.notify_client";
|
|
622
|
-
readonly 'COINS.SEND_EMAIL': "coins.send_email";
|
|
623
|
-
readonly 'COINS.UPDATE_SUBSCRIPTION': "coins.update_subscription";
|
|
624
|
-
readonly 'LEGEND_MISSIONS.COMPLETED_MISSION_REWARD': "legend_missions.completed_mission_reward";
|
|
625
499
|
readonly 'LEGEND_MISSIONS.NEW_MISSION_CREATED': "legend_missions.new_mission_created";
|
|
626
500
|
readonly 'LEGEND_MISSIONS.ONGOING_MISSION': "legend_missions.ongoing_mission";
|
|
627
501
|
readonly 'LEGEND_MISSIONS.MISSION_FINISHED': "legend_missions.mission_finished";
|
|
@@ -635,16 +509,10 @@ declare const microserviceEvent: {
|
|
|
635
509
|
readonly 'LEGEND_SHOWCASE.PRODUCT_VIRTUAL_DELETED': "legend_showcase.product_virtual_deleted";
|
|
636
510
|
readonly 'LEGEND_SHOWCASE.UPDATE_ALLOWED_MISSION_SUBSCRIPTION_IDS': "legend_showcase.update_allowed_mission_subscription_ids";
|
|
637
511
|
readonly 'LEGEND_SHOWCASE.UPDATE_ALLOWED_RANKING_SUBSCRIPTION_IDS': "legend_showcase.update_allowed_ranking_subscription_ids";
|
|
638
|
-
readonly 'ROOM_CREATOR.CREATED_ROOM': "room_creator.created_room";
|
|
639
|
-
readonly 'ROOM_CREATOR.UPDATED_ROOM': "room_creator.updated_room";
|
|
640
|
-
readonly 'ROOM_INVENTORY.UPDATE_VP_BUILDING_IMAGE': "room_inventory.update_vp_building_image";
|
|
641
|
-
readonly 'ROOM_SNAPSHOT.BUILDING_CHANGE_IN_ISLAND': "room_snapshot.building_change_in_island";
|
|
642
|
-
readonly 'ROOM_SNAPSHOT.FIRST_SNAPSHOT': "room_snapshot.first_snapshot";
|
|
643
512
|
readonly 'SOCIAL.BLOCK_CHAT': "social.block_chat";
|
|
644
513
|
readonly 'SOCIAL.NEW_USER': "social.new_user";
|
|
645
514
|
readonly 'SOCIAL.UNBLOCK_CHAT': "social.unblock_chat";
|
|
646
515
|
readonly 'SOCIAL.UPDATED_USER': "social.updated_user";
|
|
647
|
-
readonly 'SOCIAL_MEDIA_ROOMS.DELETE_IN_BATCH': "social_media_rooms.delete_in_batch";
|
|
648
516
|
};
|
|
649
517
|
/**
|
|
650
518
|
* Available microservices events in the system.
|
|
@@ -999,38 +867,6 @@ declare const socialCommands: {
|
|
|
999
867
|
*/
|
|
1000
868
|
type SocialCommands = (typeof socialCommands)[keyof typeof socialCommands];
|
|
1001
869
|
|
|
1002
|
-
/**
|
|
1003
|
-
* Different commands related to the "coins" microservice.
|
|
1004
|
-
*/
|
|
1005
|
-
declare const coinsCommands: {
|
|
1006
|
-
/**
|
|
1007
|
-
* Saga step to deduct coins when a user purchase a resource
|
|
1008
|
-
*/
|
|
1009
|
-
readonly DeductCoins: "resource_purchased:deduct_coins";
|
|
1010
|
-
/**
|
|
1011
|
-
* Saga step to reward coins to users based on their rankings
|
|
1012
|
-
*/
|
|
1013
|
-
readonly RankingsRewardCoins: "rankings_users_reward:reward_coins";
|
|
1014
|
-
};
|
|
1015
|
-
/**
|
|
1016
|
-
* Available commands for the "coins" microservice.
|
|
1017
|
-
*/
|
|
1018
|
-
type CoinsCommands = (typeof coinsCommands)[keyof typeof coinsCommands];
|
|
1019
|
-
|
|
1020
|
-
/**
|
|
1021
|
-
* Different commands related to the "room-creator" microservice.
|
|
1022
|
-
*/
|
|
1023
|
-
declare const roomCreatorCommands: {
|
|
1024
|
-
/**
|
|
1025
|
-
* Command to update the island room template.
|
|
1026
|
-
*/
|
|
1027
|
-
readonly update_island_room_template: "update_island_room_template";
|
|
1028
|
-
};
|
|
1029
|
-
/**
|
|
1030
|
-
* Available commands for the "room-creator" microservice.
|
|
1031
|
-
*/
|
|
1032
|
-
type RoomCreatorCommands = (typeof roomCreatorCommands)[keyof typeof roomCreatorCommands];
|
|
1033
|
-
|
|
1034
870
|
/**
|
|
1035
871
|
* Different commands related to the "legend-showcase" microservice.
|
|
1036
872
|
*/
|
|
@@ -1059,38 +895,6 @@ declare const storageCommands: {
|
|
|
1059
895
|
*/
|
|
1060
896
|
type StorageCommands = (typeof storageCommands)[keyof typeof storageCommands];
|
|
1061
897
|
|
|
1062
|
-
/**
|
|
1063
|
-
* Different commands related to the "room-snapshot" microservice.
|
|
1064
|
-
*/
|
|
1065
|
-
declare const roomSnapshotCommands: {};
|
|
1066
|
-
/**
|
|
1067
|
-
* Available commands for the "room-snapshot" microservice.
|
|
1068
|
-
*/
|
|
1069
|
-
type RoomSnapshotCommands = (typeof roomSnapshotCommands)[keyof typeof roomSnapshotCommands];
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
* Different commands related to the "room-inventory" microservice.
|
|
1073
|
-
*/
|
|
1074
|
-
declare const roomInventoryCommands: {
|
|
1075
|
-
/**
|
|
1076
|
-
* Command to save a purchased resource on user inventory
|
|
1077
|
-
*/
|
|
1078
|
-
readonly SavePurchasedResource: "resource_purchased:save_purchased_resource";
|
|
1079
|
-
};
|
|
1080
|
-
/**
|
|
1081
|
-
* Available commands for the "room-inventory" microservice.
|
|
1082
|
-
*/
|
|
1083
|
-
type RoomInventoryCommands = (typeof roomInventoryCommands)[keyof typeof roomInventoryCommands];
|
|
1084
|
-
|
|
1085
|
-
/**
|
|
1086
|
-
* Different commands related to the "rapid-messaging" microservice.
|
|
1087
|
-
*/
|
|
1088
|
-
declare const rapidMessagingCommands: {};
|
|
1089
|
-
/**
|
|
1090
|
-
* Available commands for the "rapid-messaging" microservice.
|
|
1091
|
-
*/
|
|
1092
|
-
type RapidMessagingCommands = (typeof rapidMessagingCommands)[keyof typeof rapidMessagingCommands];
|
|
1093
|
-
|
|
1094
898
|
/**
|
|
1095
899
|
* Different commands related to the "legend-missions" microservice.
|
|
1096
900
|
*/
|
|
@@ -1100,15 +904,6 @@ declare const missionsCommands: {};
|
|
|
1100
904
|
*/
|
|
1101
905
|
type MissionsCommands = (typeof missionsCommands)[keyof typeof missionsCommands];
|
|
1102
906
|
|
|
1103
|
-
/**
|
|
1104
|
-
* Different commands related to the "social-media-rooms" microservice.
|
|
1105
|
-
*/
|
|
1106
|
-
declare const socialMediaRoomsCommands: {};
|
|
1107
|
-
/**
|
|
1108
|
-
* Available commands for the "social-media-rooms" microservice.
|
|
1109
|
-
*/
|
|
1110
|
-
type SocialMediaRoomsCommands = (typeof socialMediaRoomsCommands)[keyof typeof socialMediaRoomsCommands];
|
|
1111
|
-
|
|
1112
907
|
/**
|
|
1113
908
|
* Different commands related to the "send-email" microservice.
|
|
1114
909
|
*/
|
|
@@ -1162,10 +957,6 @@ interface CommandMap {
|
|
|
1162
957
|
* Represents the mapping of "blockchain" microservice commands.
|
|
1163
958
|
*/
|
|
1164
959
|
[availableMicroservices.Blockchain]: BlockchainCommands;
|
|
1165
|
-
/**
|
|
1166
|
-
* Represents the mapping of "coins" microservice commands.
|
|
1167
|
-
*/
|
|
1168
|
-
[availableMicroservices.Coins]: CoinsCommands;
|
|
1169
960
|
/**
|
|
1170
961
|
* Represents the mapping of "legend-missions" microservice commands.
|
|
1171
962
|
*/
|
|
@@ -1174,22 +965,6 @@ interface CommandMap {
|
|
|
1174
965
|
* Represents the mapping of "rankings" microservice commands.
|
|
1175
966
|
*/
|
|
1176
967
|
[availableMicroservices.Rankings]: RankingsCommands;
|
|
1177
|
-
/**
|
|
1178
|
-
* Represents the mapping of "rapid-messaging" microservice commands.
|
|
1179
|
-
*/
|
|
1180
|
-
[availableMicroservices.RapidMessaging]: RapidMessagingCommands;
|
|
1181
|
-
/**
|
|
1182
|
-
* Represents the mapping of "room-creator" microservice commands.
|
|
1183
|
-
*/
|
|
1184
|
-
[availableMicroservices.RoomCreator]: RoomCreatorCommands;
|
|
1185
|
-
/**
|
|
1186
|
-
* Represents the mapping of "room-inventory" microservice commands.
|
|
1187
|
-
*/
|
|
1188
|
-
[availableMicroservices.RoomInventory]: RoomInventoryCommands;
|
|
1189
|
-
/**
|
|
1190
|
-
* Represents the mapping of "room-snapshot" microservice commands.
|
|
1191
|
-
*/
|
|
1192
|
-
[availableMicroservices.RoomSnapshot]: RoomSnapshotCommands;
|
|
1193
968
|
/**
|
|
1194
969
|
* Represents the mapping of "legend-send-email" microservice commands.
|
|
1195
970
|
*/
|
|
@@ -1202,10 +977,6 @@ interface CommandMap {
|
|
|
1202
977
|
* Represents the mapping of "social" microservice commands.
|
|
1203
978
|
*/
|
|
1204
979
|
[availableMicroservices.Social]: SocialCommands;
|
|
1205
|
-
/**
|
|
1206
|
-
* Represents the mapping of "social-media-rooms" microservice commands.
|
|
1207
|
-
*/
|
|
1208
|
-
[availableMicroservices.SocialMediaRooms]: SocialMediaRoomsCommands;
|
|
1209
980
|
/**
|
|
1210
981
|
* Represents the mapping of "legend-storage" microservice commands.
|
|
1211
982
|
*/
|
|
@@ -1450,10 +1221,6 @@ declare const sagaTitle: {
|
|
|
1450
1221
|
* Saga used in the flow to purchase resources and deduct coins from the user.
|
|
1451
1222
|
*/
|
|
1452
1223
|
readonly PurchaseResourceFlow: "purchase_resource_flow";
|
|
1453
|
-
/**
|
|
1454
|
-
* Saga used in to reward users based on their rankings.
|
|
1455
|
-
*/
|
|
1456
|
-
readonly RankingsUsersReward: "rankings_users_reward";
|
|
1457
1224
|
/**
|
|
1458
1225
|
* Saga used to initiate a crypto transfer for a mission winner.
|
|
1459
1226
|
*/
|
|
@@ -1474,12 +1241,6 @@ interface SagaCommencePayload {
|
|
|
1474
1241
|
price: number;
|
|
1475
1242
|
quantity: number;
|
|
1476
1243
|
};
|
|
1477
|
-
['rankings_users_reward']: {
|
|
1478
|
-
rewards: {
|
|
1479
|
-
userId: string;
|
|
1480
|
-
coins: number;
|
|
1481
|
-
}[];
|
|
1482
|
-
};
|
|
1483
1244
|
['transfer_crypto_reward_to_mission_winner']: {
|
|
1484
1245
|
walletAddress: string;
|
|
1485
1246
|
userId: string;
|
|
@@ -1893,4 +1654,4 @@ declare const getEventObject: (event: MicroserviceEvent) => {
|
|
|
1893
1654
|
*/
|
|
1894
1655
|
declare function extractMicroserviceFromQueue(queueName: string): string;
|
|
1895
1656
|
|
|
1896
|
-
export { type AuditEdaCommands, type AuthCommands, type AvailableMicroservices, type BlockchainCommands, type
|
|
1657
|
+
export { type AuditEdaCommands, type AuthCommands, type AvailableMicroservices, type BlockchainCommands, type CommandMap, type CommenceSaga, type CommenceSagaEvents, type CommenceSagaHandler, type CompletedRanking, type EventPayload, EventsConsumeChannel, type EventsHandler, type Exchange, type Gender, MAX_NACK_RETRIES, MAX_OCCURRENCE, type MicroserviceCommand, MicroserviceConsumeChannel, type MicroserviceConsumeEvents, type MicroserviceConsumeSagaEvents, type MicroserviceEvent, type MicroserviceHandler, NACKING_DELAY_MS, type Nack, type PaymentEmailType, PaymentEmailTypes, type QueueConsumerProps, type RankingWinners, type RankingsCommands, Saga, SagaCommenceConsumeChannel, type SagaCommencePayload, SagaConsumeChannel, type SagaConsumeSagaEvents, type SagaHandler, type SagaStep, type SagaStepDefaults, type SagaTitle, type SendEmailCommands, type ShowcaseCommands, type SocialCommands, type SocialUser, type Status, type StorageCommands, type TestImageCommands, type TestMintCommands, Transactional, type TransactionalCommands, type TransactionalConfig, type UserLocation, auditEdaCommands, authCommands, availableMicroservices, blockchainCommands, closeConsumeChannel, closeRabbitMQConn, closeSendChannel, commenceSaga, commenceSagaConsumeCallback, consume, createAuditLoggingResources, createConsumers, createHeaderConsumers, eventCallback, exchange, extractMicroserviceFromQueue, fibonacci, gender, getConsumeChannel, getEventKey, getEventObject, getQueueConsumer, getQueueName, getRabbitMQConn, getSendChannel, getStoredConfig, isConnectionHealthy, microserviceEvent, nodeDataDefaults, publishEvent, queue, rankingsCommands, sagaConsumeCallback, sagaStepCallback, sagaTitle, saveQueueForHealthCheck, sendEmailCommands, sendToQueue, showcaseCommands, socialCommands, status, stopRabbitMQ, storageCommands, testImageCommands, testMintCommands, transactionalCommands };
|
package/dist/index.js
CHANGED
|
@@ -29,10 +29,6 @@ var availableMicroservices = {
|
|
|
29
29
|
* Represents the "blockchain" microservice.
|
|
30
30
|
*/
|
|
31
31
|
Blockchain: "blockchain",
|
|
32
|
-
/**
|
|
33
|
-
* Represents the "coins" microservice.
|
|
34
|
-
*/
|
|
35
|
-
Coins: "coins",
|
|
36
32
|
/**
|
|
37
33
|
* Represents the "legend-missions" microservice.
|
|
38
34
|
*/
|
|
@@ -41,22 +37,6 @@ var availableMicroservices = {
|
|
|
41
37
|
* Represents the "rankings" microservice.
|
|
42
38
|
*/
|
|
43
39
|
Rankings: "rankings",
|
|
44
|
-
/**
|
|
45
|
-
* Represents the "rapid-messaging" microservice.
|
|
46
|
-
*/
|
|
47
|
-
RapidMessaging: "rapid-messaging",
|
|
48
|
-
/**
|
|
49
|
-
* Represents the "room-creator" microservice.
|
|
50
|
-
*/
|
|
51
|
-
RoomCreator: "room-creator",
|
|
52
|
-
/**
|
|
53
|
-
* Represents the "room-inventory" microservice.
|
|
54
|
-
*/
|
|
55
|
-
RoomInventory: "room-inventory",
|
|
56
|
-
/**
|
|
57
|
-
* Represents the "room-snapshot" microservice.
|
|
58
|
-
*/
|
|
59
|
-
RoomSnapshot: "room-snapshot",
|
|
60
40
|
/**
|
|
61
41
|
* Represents the "transactional" microservice.
|
|
62
42
|
*/
|
|
@@ -73,10 +53,6 @@ var availableMicroservices = {
|
|
|
73
53
|
* Represents the "social" microservice.
|
|
74
54
|
*/
|
|
75
55
|
Social: "social",
|
|
76
|
-
/**
|
|
77
|
-
* Represents the "social-media-rooms" microservice.
|
|
78
|
-
*/
|
|
79
|
-
SocialMediaRooms: "social-media-rooms",
|
|
80
56
|
/**
|
|
81
57
|
* Represents the "legend-storage" microservice.
|
|
82
58
|
*/
|
|
@@ -90,11 +66,6 @@ var availableMicroservices = {
|
|
|
90
66
|
};
|
|
91
67
|
|
|
92
68
|
// src/@types/event/events.ts
|
|
93
|
-
var RoomTypes = {
|
|
94
|
-
ISLAND: "island",
|
|
95
|
-
HOUSE: "house",
|
|
96
|
-
HALL_OF_FAME: "hallOfFame"
|
|
97
|
-
};
|
|
98
69
|
var PaymentEmailTypes = {
|
|
99
70
|
PURCHASE: "purchase",
|
|
100
71
|
SUBSCRIPTION: "subscription",
|
|
@@ -119,10 +90,6 @@ var microserviceEvent = {
|
|
|
119
90
|
"AUTH.LOGOUT_USER": "auth.logout_user",
|
|
120
91
|
"AUTH.NEW_USER": "auth.new_user",
|
|
121
92
|
"AUTH.BLOCKED_USER": "auth.blocked_user",
|
|
122
|
-
"COINS.NOTIFY_CLIENT": "coins.notify_client",
|
|
123
|
-
"COINS.SEND_EMAIL": "coins.send_email",
|
|
124
|
-
"COINS.UPDATE_SUBSCRIPTION": "coins.update_subscription",
|
|
125
|
-
"LEGEND_MISSIONS.COMPLETED_MISSION_REWARD": "legend_missions.completed_mission_reward",
|
|
126
93
|
"LEGEND_MISSIONS.NEW_MISSION_CREATED": "legend_missions.new_mission_created",
|
|
127
94
|
"LEGEND_MISSIONS.ONGOING_MISSION": "legend_missions.ongoing_mission",
|
|
128
95
|
"LEGEND_MISSIONS.MISSION_FINISHED": "legend_missions.mission_finished",
|
|
@@ -136,16 +103,10 @@ var microserviceEvent = {
|
|
|
136
103
|
"LEGEND_SHOWCASE.PRODUCT_VIRTUAL_DELETED": "legend_showcase.product_virtual_deleted",
|
|
137
104
|
"LEGEND_SHOWCASE.UPDATE_ALLOWED_MISSION_SUBSCRIPTION_IDS": "legend_showcase.update_allowed_mission_subscription_ids",
|
|
138
105
|
"LEGEND_SHOWCASE.UPDATE_ALLOWED_RANKING_SUBSCRIPTION_IDS": "legend_showcase.update_allowed_ranking_subscription_ids",
|
|
139
|
-
"ROOM_CREATOR.CREATED_ROOM": "room_creator.created_room",
|
|
140
|
-
"ROOM_CREATOR.UPDATED_ROOM": "room_creator.updated_room",
|
|
141
|
-
"ROOM_INVENTORY.UPDATE_VP_BUILDING_IMAGE": "room_inventory.update_vp_building_image",
|
|
142
|
-
"ROOM_SNAPSHOT.BUILDING_CHANGE_IN_ISLAND": "room_snapshot.building_change_in_island",
|
|
143
|
-
"ROOM_SNAPSHOT.FIRST_SNAPSHOT": "room_snapshot.first_snapshot",
|
|
144
106
|
"SOCIAL.BLOCK_CHAT": "social.block_chat",
|
|
145
107
|
"SOCIAL.NEW_USER": "social.new_user",
|
|
146
108
|
"SOCIAL.UNBLOCK_CHAT": "social.unblock_chat",
|
|
147
|
-
"SOCIAL.UPDATED_USER": "social.updated_user"
|
|
148
|
-
"SOCIAL_MEDIA_ROOMS.DELETE_IN_BATCH": "social_media_rooms.delete_in_batch"
|
|
109
|
+
"SOCIAL.UPDATED_USER": "social.updated_user"
|
|
149
110
|
};
|
|
150
111
|
|
|
151
112
|
// src/@types/rabbit-mq.ts
|
|
@@ -241,43 +202,9 @@ var testMintCommands = {
|
|
|
241
202
|
MintImage: "mint_image"
|
|
242
203
|
};
|
|
243
204
|
|
|
244
|
-
// src/@types/saga/commands/coins.ts
|
|
245
|
-
var coinsCommands = {
|
|
246
|
-
/**
|
|
247
|
-
* Saga step to deduct coins when a user purchase a resource
|
|
248
|
-
*/
|
|
249
|
-
DeductCoins: "resource_purchased:deduct_coins",
|
|
250
|
-
/**
|
|
251
|
-
* Saga step to reward coins to users based on their rankings
|
|
252
|
-
*/
|
|
253
|
-
RankingsRewardCoins: "rankings_users_reward:reward_coins"
|
|
254
|
-
};
|
|
255
|
-
|
|
256
205
|
// src/@types/saga/commands/rankings.ts
|
|
257
206
|
var rankingsCommands = {};
|
|
258
207
|
|
|
259
|
-
// src/@types/saga/commands/rapid-messaging.ts
|
|
260
|
-
var rapidMessagingCommands = {};
|
|
261
|
-
|
|
262
|
-
// src/@types/saga/commands/room-inventory.ts
|
|
263
|
-
var roomInventoryCommands = {
|
|
264
|
-
/**
|
|
265
|
-
* Command to save a purchased resource on user inventory
|
|
266
|
-
*/
|
|
267
|
-
SavePurchasedResource: "resource_purchased:save_purchased_resource"
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
// src/@types/saga/commands/room-snapshot.ts
|
|
271
|
-
var roomSnapshotCommands = {};
|
|
272
|
-
|
|
273
|
-
// src/@types/saga/commands/roomCreator.ts
|
|
274
|
-
var roomCreatorCommands = {
|
|
275
|
-
/**
|
|
276
|
-
* Command to update the island room template.
|
|
277
|
-
*/
|
|
278
|
-
update_island_room_template: "update_island_room_template"
|
|
279
|
-
};
|
|
280
|
-
|
|
281
208
|
// src/@types/saga/commands/send-email.ts
|
|
282
209
|
var sendEmailCommands = {};
|
|
283
210
|
|
|
@@ -301,9 +228,6 @@ var socialCommands = {
|
|
|
301
228
|
UpdateUserImage: "update_user:image"
|
|
302
229
|
};
|
|
303
230
|
|
|
304
|
-
// src/@types/saga/commands/social-media-rooms.ts
|
|
305
|
-
var socialMediaRoomsCommands = {};
|
|
306
|
-
|
|
307
231
|
// src/@types/saga/commands/storage.ts
|
|
308
232
|
var storageCommands = {
|
|
309
233
|
/**
|
|
@@ -321,10 +245,6 @@ var sagaTitle = {
|
|
|
321
245
|
* Saga used in the flow to purchase resources and deduct coins from the user.
|
|
322
246
|
*/
|
|
323
247
|
PurchaseResourceFlow: "purchase_resource_flow",
|
|
324
|
-
/**
|
|
325
|
-
* Saga used in to reward users based on their rankings.
|
|
326
|
-
*/
|
|
327
|
-
RankingsUsersReward: "rankings_users_reward",
|
|
328
248
|
/**
|
|
329
249
|
* Saga used to initiate a crypto transfer for a mission winner.
|
|
330
250
|
*/
|
|
@@ -1208,7 +1128,6 @@ exports.MAX_OCCURRENCE = MAX_OCCURRENCE;
|
|
|
1208
1128
|
exports.MicroserviceConsumeChannel = MicroserviceConsumeChannel;
|
|
1209
1129
|
exports.NACKING_DELAY_MS = NACKING_DELAY_MS;
|
|
1210
1130
|
exports.PaymentEmailTypes = PaymentEmailTypes;
|
|
1211
|
-
exports.RoomTypes = RoomTypes;
|
|
1212
1131
|
exports.Saga = Saga;
|
|
1213
1132
|
exports.SagaCommenceConsumeChannel = SagaCommenceConsumeChannel;
|
|
1214
1133
|
exports.SagaConsumeChannel = SagaConsumeChannel;
|
|
@@ -1220,7 +1139,6 @@ exports.blockchainCommands = blockchainCommands;
|
|
|
1220
1139
|
exports.closeConsumeChannel = closeConsumeChannel;
|
|
1221
1140
|
exports.closeRabbitMQConn = closeRabbitMQConn;
|
|
1222
1141
|
exports.closeSendChannel = closeSendChannel;
|
|
1223
|
-
exports.coinsCommands = coinsCommands;
|
|
1224
1142
|
exports.commenceSaga = commenceSaga;
|
|
1225
1143
|
exports.commenceSagaConsumeCallback = commenceSagaConsumeCallback;
|
|
1226
1144
|
exports.consume = consume;
|
|
@@ -1246,10 +1164,6 @@ exports.nodeDataDefaults = nodeDataDefaults;
|
|
|
1246
1164
|
exports.publishEvent = publishEvent;
|
|
1247
1165
|
exports.queue = queue;
|
|
1248
1166
|
exports.rankingsCommands = rankingsCommands;
|
|
1249
|
-
exports.rapidMessagingCommands = rapidMessagingCommands;
|
|
1250
|
-
exports.roomCreatorCommands = roomCreatorCommands;
|
|
1251
|
-
exports.roomInventoryCommands = roomInventoryCommands;
|
|
1252
|
-
exports.roomSnapshotCommands = roomSnapshotCommands;
|
|
1253
1167
|
exports.sagaConsumeCallback = sagaConsumeCallback;
|
|
1254
1168
|
exports.sagaStepCallback = sagaStepCallback;
|
|
1255
1169
|
exports.sagaTitle = sagaTitle;
|
|
@@ -1258,7 +1172,6 @@ exports.sendEmailCommands = sendEmailCommands;
|
|
|
1258
1172
|
exports.sendToQueue = sendToQueue;
|
|
1259
1173
|
exports.showcaseCommands = showcaseCommands;
|
|
1260
1174
|
exports.socialCommands = socialCommands;
|
|
1261
|
-
exports.socialMediaRoomsCommands = socialMediaRoomsCommands;
|
|
1262
1175
|
exports.status = status;
|
|
1263
1176
|
exports.stopRabbitMQ = stopRabbitMQ;
|
|
1264
1177
|
exports.storageCommands = storageCommands;
|
package/dist/index.mjs
CHANGED
|
@@ -22,10 +22,6 @@ var availableMicroservices = {
|
|
|
22
22
|
* Represents the "blockchain" microservice.
|
|
23
23
|
*/
|
|
24
24
|
Blockchain: "blockchain",
|
|
25
|
-
/**
|
|
26
|
-
* Represents the "coins" microservice.
|
|
27
|
-
*/
|
|
28
|
-
Coins: "coins",
|
|
29
25
|
/**
|
|
30
26
|
* Represents the "legend-missions" microservice.
|
|
31
27
|
*/
|
|
@@ -34,22 +30,6 @@ var availableMicroservices = {
|
|
|
34
30
|
* Represents the "rankings" microservice.
|
|
35
31
|
*/
|
|
36
32
|
Rankings: "rankings",
|
|
37
|
-
/**
|
|
38
|
-
* Represents the "rapid-messaging" microservice.
|
|
39
|
-
*/
|
|
40
|
-
RapidMessaging: "rapid-messaging",
|
|
41
|
-
/**
|
|
42
|
-
* Represents the "room-creator" microservice.
|
|
43
|
-
*/
|
|
44
|
-
RoomCreator: "room-creator",
|
|
45
|
-
/**
|
|
46
|
-
* Represents the "room-inventory" microservice.
|
|
47
|
-
*/
|
|
48
|
-
RoomInventory: "room-inventory",
|
|
49
|
-
/**
|
|
50
|
-
* Represents the "room-snapshot" microservice.
|
|
51
|
-
*/
|
|
52
|
-
RoomSnapshot: "room-snapshot",
|
|
53
33
|
/**
|
|
54
34
|
* Represents the "transactional" microservice.
|
|
55
35
|
*/
|
|
@@ -66,10 +46,6 @@ var availableMicroservices = {
|
|
|
66
46
|
* Represents the "social" microservice.
|
|
67
47
|
*/
|
|
68
48
|
Social: "social",
|
|
69
|
-
/**
|
|
70
|
-
* Represents the "social-media-rooms" microservice.
|
|
71
|
-
*/
|
|
72
|
-
SocialMediaRooms: "social-media-rooms",
|
|
73
49
|
/**
|
|
74
50
|
* Represents the "legend-storage" microservice.
|
|
75
51
|
*/
|
|
@@ -83,11 +59,6 @@ var availableMicroservices = {
|
|
|
83
59
|
};
|
|
84
60
|
|
|
85
61
|
// src/@types/event/events.ts
|
|
86
|
-
var RoomTypes = {
|
|
87
|
-
ISLAND: "island",
|
|
88
|
-
HOUSE: "house",
|
|
89
|
-
HALL_OF_FAME: "hallOfFame"
|
|
90
|
-
};
|
|
91
62
|
var PaymentEmailTypes = {
|
|
92
63
|
PURCHASE: "purchase",
|
|
93
64
|
SUBSCRIPTION: "subscription",
|
|
@@ -112,10 +83,6 @@ var microserviceEvent = {
|
|
|
112
83
|
"AUTH.LOGOUT_USER": "auth.logout_user",
|
|
113
84
|
"AUTH.NEW_USER": "auth.new_user",
|
|
114
85
|
"AUTH.BLOCKED_USER": "auth.blocked_user",
|
|
115
|
-
"COINS.NOTIFY_CLIENT": "coins.notify_client",
|
|
116
|
-
"COINS.SEND_EMAIL": "coins.send_email",
|
|
117
|
-
"COINS.UPDATE_SUBSCRIPTION": "coins.update_subscription",
|
|
118
|
-
"LEGEND_MISSIONS.COMPLETED_MISSION_REWARD": "legend_missions.completed_mission_reward",
|
|
119
86
|
"LEGEND_MISSIONS.NEW_MISSION_CREATED": "legend_missions.new_mission_created",
|
|
120
87
|
"LEGEND_MISSIONS.ONGOING_MISSION": "legend_missions.ongoing_mission",
|
|
121
88
|
"LEGEND_MISSIONS.MISSION_FINISHED": "legend_missions.mission_finished",
|
|
@@ -129,16 +96,10 @@ var microserviceEvent = {
|
|
|
129
96
|
"LEGEND_SHOWCASE.PRODUCT_VIRTUAL_DELETED": "legend_showcase.product_virtual_deleted",
|
|
130
97
|
"LEGEND_SHOWCASE.UPDATE_ALLOWED_MISSION_SUBSCRIPTION_IDS": "legend_showcase.update_allowed_mission_subscription_ids",
|
|
131
98
|
"LEGEND_SHOWCASE.UPDATE_ALLOWED_RANKING_SUBSCRIPTION_IDS": "legend_showcase.update_allowed_ranking_subscription_ids",
|
|
132
|
-
"ROOM_CREATOR.CREATED_ROOM": "room_creator.created_room",
|
|
133
|
-
"ROOM_CREATOR.UPDATED_ROOM": "room_creator.updated_room",
|
|
134
|
-
"ROOM_INVENTORY.UPDATE_VP_BUILDING_IMAGE": "room_inventory.update_vp_building_image",
|
|
135
|
-
"ROOM_SNAPSHOT.BUILDING_CHANGE_IN_ISLAND": "room_snapshot.building_change_in_island",
|
|
136
|
-
"ROOM_SNAPSHOT.FIRST_SNAPSHOT": "room_snapshot.first_snapshot",
|
|
137
99
|
"SOCIAL.BLOCK_CHAT": "social.block_chat",
|
|
138
100
|
"SOCIAL.NEW_USER": "social.new_user",
|
|
139
101
|
"SOCIAL.UNBLOCK_CHAT": "social.unblock_chat",
|
|
140
|
-
"SOCIAL.UPDATED_USER": "social.updated_user"
|
|
141
|
-
"SOCIAL_MEDIA_ROOMS.DELETE_IN_BATCH": "social_media_rooms.delete_in_batch"
|
|
102
|
+
"SOCIAL.UPDATED_USER": "social.updated_user"
|
|
142
103
|
};
|
|
143
104
|
|
|
144
105
|
// src/@types/rabbit-mq.ts
|
|
@@ -234,43 +195,9 @@ var testMintCommands = {
|
|
|
234
195
|
MintImage: "mint_image"
|
|
235
196
|
};
|
|
236
197
|
|
|
237
|
-
// src/@types/saga/commands/coins.ts
|
|
238
|
-
var coinsCommands = {
|
|
239
|
-
/**
|
|
240
|
-
* Saga step to deduct coins when a user purchase a resource
|
|
241
|
-
*/
|
|
242
|
-
DeductCoins: "resource_purchased:deduct_coins",
|
|
243
|
-
/**
|
|
244
|
-
* Saga step to reward coins to users based on their rankings
|
|
245
|
-
*/
|
|
246
|
-
RankingsRewardCoins: "rankings_users_reward:reward_coins"
|
|
247
|
-
};
|
|
248
|
-
|
|
249
198
|
// src/@types/saga/commands/rankings.ts
|
|
250
199
|
var rankingsCommands = {};
|
|
251
200
|
|
|
252
|
-
// src/@types/saga/commands/rapid-messaging.ts
|
|
253
|
-
var rapidMessagingCommands = {};
|
|
254
|
-
|
|
255
|
-
// src/@types/saga/commands/room-inventory.ts
|
|
256
|
-
var roomInventoryCommands = {
|
|
257
|
-
/**
|
|
258
|
-
* Command to save a purchased resource on user inventory
|
|
259
|
-
*/
|
|
260
|
-
SavePurchasedResource: "resource_purchased:save_purchased_resource"
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
// src/@types/saga/commands/room-snapshot.ts
|
|
264
|
-
var roomSnapshotCommands = {};
|
|
265
|
-
|
|
266
|
-
// src/@types/saga/commands/roomCreator.ts
|
|
267
|
-
var roomCreatorCommands = {
|
|
268
|
-
/**
|
|
269
|
-
* Command to update the island room template.
|
|
270
|
-
*/
|
|
271
|
-
update_island_room_template: "update_island_room_template"
|
|
272
|
-
};
|
|
273
|
-
|
|
274
201
|
// src/@types/saga/commands/send-email.ts
|
|
275
202
|
var sendEmailCommands = {};
|
|
276
203
|
|
|
@@ -294,9 +221,6 @@ var socialCommands = {
|
|
|
294
221
|
UpdateUserImage: "update_user:image"
|
|
295
222
|
};
|
|
296
223
|
|
|
297
|
-
// src/@types/saga/commands/social-media-rooms.ts
|
|
298
|
-
var socialMediaRoomsCommands = {};
|
|
299
|
-
|
|
300
224
|
// src/@types/saga/commands/storage.ts
|
|
301
225
|
var storageCommands = {
|
|
302
226
|
/**
|
|
@@ -314,10 +238,6 @@ var sagaTitle = {
|
|
|
314
238
|
* Saga used in the flow to purchase resources and deduct coins from the user.
|
|
315
239
|
*/
|
|
316
240
|
PurchaseResourceFlow: "purchase_resource_flow",
|
|
317
|
-
/**
|
|
318
|
-
* Saga used in to reward users based on their rankings.
|
|
319
|
-
*/
|
|
320
|
-
RankingsUsersReward: "rankings_users_reward",
|
|
321
241
|
/**
|
|
322
242
|
* Saga used to initiate a crypto transfer for a mission winner.
|
|
323
243
|
*/
|
|
@@ -1195,4 +1115,4 @@ var publishEvent = async (msg, event) => {
|
|
|
1195
1115
|
});
|
|
1196
1116
|
};
|
|
1197
1117
|
|
|
1198
|
-
export { EventsConsumeChannel, MAX_NACK_RETRIES, MAX_OCCURRENCE, MicroserviceConsumeChannel, NACKING_DELAY_MS, PaymentEmailTypes,
|
|
1118
|
+
export { EventsConsumeChannel, MAX_NACK_RETRIES, MAX_OCCURRENCE, MicroserviceConsumeChannel, NACKING_DELAY_MS, PaymentEmailTypes, Saga, SagaCommenceConsumeChannel, SagaConsumeChannel, Transactional, auditEdaCommands, authCommands, availableMicroservices, blockchainCommands, closeConsumeChannel, closeRabbitMQConn, closeSendChannel, commenceSaga, commenceSagaConsumeCallback, consume, createAuditLoggingResources, createConsumers, createHeaderConsumers, eventCallback, exchange, extractMicroserviceFromQueue, fibonacci, gender, getConsumeChannel, getEventKey, getEventObject, getQueueConsumer, getQueueName, getRabbitMQConn, getSendChannel, getStoredConfig, isConnectionHealthy, microserviceEvent, nodeDataDefaults, publishEvent, queue, rankingsCommands, sagaConsumeCallback, sagaStepCallback, sagaTitle, saveQueueForHealthCheck, sendEmailCommands, sendToQueue, showcaseCommands, socialCommands, status, stopRabbitMQ, storageCommands, testImageCommands, testMintCommands, transactionalCommands };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "legend-transactional",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
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",
|