aa-structures 2.12.0__py3-none-any.whl → 2.14.0__py3-none-any.whl

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.
Files changed (37) hide show
  1. {aa_structures-2.12.0.dist-info → aa_structures-2.14.0.dist-info}/METADATA +1 -1
  2. {aa_structures-2.12.0.dist-info → aa_structures-2.14.0.dist-info}/RECORD +37 -34
  3. structures/__init__.py +1 -1
  4. structures/admin.py +1 -1
  5. structures/app_settings.py +4 -0
  6. structures/constants.py +1 -0
  7. structures/core/notification_embeds/main.py +58 -31
  8. structures/core/notification_embeds/orbital_embeds.py +1 -1
  9. structures/core/notification_embeds/skyhook_embeds.py +89 -0
  10. structures/core/notification_embeds/structures_embeds.py +23 -12
  11. structures/core/notification_embeds/tower_embeds.py +1 -1
  12. structures/core/notification_timers.py +53 -6
  13. structures/core/notification_types.py +58 -36
  14. structures/managers.py +22 -8
  15. structures/migrations/0007_add_notificationtypes_skyhook_metenox.py +149 -0
  16. structures/migrations/0008_add_notificationtypes_skyhook_metenox.py +149 -0
  17. structures/models/owners.py +68 -8
  18. structures/models/structures_1.py +5 -0
  19. structures/templates/structures/public.html +2 -2
  20. structures/templates/structures/structures.html +3 -3
  21. structures/tests/core/test_notification_types.py +16 -0
  22. structures/tests/core/{test_notifications_timerboard.py → test_notifications_timers.py} +6 -1
  23. structures/tests/integration/test_tasks.py +102 -1
  24. structures/tests/integration/test_views.py +1 -1
  25. structures/tests/models/test_owners_5.py +135 -1
  26. structures/tests/models/test_structures.py +49 -42
  27. structures/tests/test_managers_1.py +11 -1
  28. structures/tests/testdata/create_eveuniverse.py +6 -1
  29. structures/tests/testdata/entities.json +71 -1
  30. structures/tests/testdata/eveuniverse.json +6306 -5145
  31. structures/tests/testdata/factories.py +21 -0
  32. structures/tests/testdata/generate_notifications.py +142 -157
  33. structures/tests/testdata/helpers.py +6 -0
  34. structures/tests/views/test_structures.py +12 -4
  35. structures/views/structures.py +6 -6
  36. {aa_structures-2.12.0.dist-info → aa_structures-2.14.0.dist-info}/LICENSE +0 -0
  37. {aa_structures-2.12.0.dist-info → aa_structures-2.14.0.dist-info}/WHEEL +0 -0
@@ -23,6 +23,12 @@ class NotificationType(models.TextChoices):
23
23
  )
24
24
  STRUCTURE_LOST_ARMOR = "StructureLostArmor", _("Upwell structure lost armor")
25
25
  STRUCTURE_LOST_SHIELD = "StructureLostShields", _("Upwell structure lost shields")
26
+ STRUCTURE_LOW_REAGENTS_ALERT = "StructureLowReagentsAlert", _(
27
+ "Structure low reagents alert"
28
+ )
29
+ STRUCTURE_NO_REAGENTS_ALERT = "StructureNoReagentsAlert", _(
30
+ "Structure no reagents alert"
31
+ )
26
32
  STRUCTURE_ONLINE = "StructureOnline", _("Upwell structure went online")
27
33
  STRUCTURE_REFUELED_EXTRA = "StructureRefueledExtra", _("Upwell structure refueled")
28
34
  STRUCTURE_REINFORCEMENT_CHANGED = "StructuresReinforcementChanged", _(
@@ -42,15 +48,22 @@ class NotificationType(models.TextChoices):
42
48
  "Upwell structure went low power"
43
49
  )
44
50
 
51
+ # Skyhook structures
52
+ SKYHOOK_DEPLOYED = "SkyhookDeployed", _("Skyhook deployed")
53
+ SKYHOOK_DESTROYED = "SkyhookDestroyed", _("Skyhook destroyed")
54
+ SKYHOOK_LOST_SHIELDS = "SkyhookLostShields", _("Skyhook lost shields")
55
+ SKYHOOK_ONLINE = "SkyhookOnline", _("Skyhook online")
56
+ SKYHOOK_UNDER_ATTACK = "SkyhookUnderAttack", _("Skyhook under attack")
57
+
45
58
  # customs offices
46
59
  ORBITAL_ATTACKED = "OrbitalAttacked", _("Customs office attacked")
47
60
  ORBITAL_REINFORCED = "OrbitalReinforced", _("Customs office reinforced")
48
61
 
49
62
  # starbases
50
63
  TOWER_ALERT_MSG = "TowerAlertMsg", _("Starbase attacked")
51
- TOWER_RESOURCE_ALERT_MSG = "TowerResourceAlertMsg", _("Starbase fuel alert")
52
64
  TOWER_REFUELED_EXTRA = "TowerRefueledExtra", _("Starbase refueled (BETA)")
53
65
  TOWER_REINFORCED_EXTRA = "TowerReinforcedExtra", _("Starbase reinforced (BETA)")
66
+ TOWER_RESOURCE_ALERT_MSG = "TowerResourceAlertMsg", _("Starbase fuel alert")
54
67
 
55
68
  # moon mining
56
69
  MOONMINING_AUTOMATIC_FRACTURE = "MoonminingAutomaticFracture", _(
@@ -121,7 +134,7 @@ class NotificationType(models.TextChoices):
121
134
  )
122
135
  WAR_OFFERED_SURRENDER = "OfferedSurrender", _("War offered surrender")
123
136
  WAR_OFFERED_TO_ALLY = "OfferedToAlly", _("War offered to become ally")
124
- WAR_WAR_ADOPTED = "WarAdopted", _("War adopted")
137
+ WAR_WAR_ADOPTED = "WarAdopted", _("War adopted") # FIXME: Should be "WarAdopted "
125
138
  WAR_WAR_DECLARED = "WarDeclared", _("War declared")
126
139
  WAR_WAR_INHERITED = "WarInherited", _("War inherited")
127
140
  WAR_WAR_RETRACTED_BY_CONCORD = "WarRetractedByConcord", _(
@@ -143,8 +156,8 @@ class NotificationType(models.TextChoices):
143
156
  CHAR_LEFT_CORP_MSG = "CharLeftCorpMsg", _("Character leaves corporation")
144
157
 
145
158
  # billing
146
- BILLING_CORP_ALL_BILL_MSG = "CorpAllBillMsg", _("Corp alliance billing message")
147
159
  BILLING_BILL_OUT_OF_MONEY_MSG = "BillOutOfMoneyMsg", _("Bill out of money")
160
+ BILLING_CORP_ALL_BILL_MSG = "CorpAllBillMsg", _("Corp alliance billing message")
148
161
  BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE = (
149
162
  "InfrastructureHubBillAboutToExpire",
150
163
  _("I-HUB bill about to expire"),
@@ -173,35 +186,42 @@ class NotificationType(models.TextChoices):
173
186
  def webhook_defaults(cls) -> List["NotificationType"]:
174
187
  """List of default notifications for new webhooks."""
175
188
  return [
189
+ cls.ORBITAL_ATTACKED,
190
+ cls.ORBITAL_REINFORCED,
191
+ cls.SKYHOOK_DESTROYED,
192
+ cls.SKYHOOK_LOST_SHIELDS,
193
+ cls.SKYHOOK_ONLINE,
194
+ cls.SKYHOOK_UNDER_ATTACK,
195
+ cls.SOV_STRUCTURE_DESTROYED,
196
+ cls.SOV_STRUCTURE_REINFORCED,
176
197
  cls.STRUCTURE_ANCHORING,
177
198
  cls.STRUCTURE_DESTROYED,
178
199
  cls.STRUCTURE_FUEL_ALERT,
179
200
  cls.STRUCTURE_LOST_ARMOR,
180
201
  cls.STRUCTURE_LOST_SHIELD,
202
+ cls.STRUCTURE_LOW_REAGENTS_ALERT,
203
+ cls.STRUCTURE_NO_REAGENTS_ALERT,
181
204
  cls.STRUCTURE_ONLINE,
182
205
  cls.STRUCTURE_SERVICES_OFFLINE,
183
206
  cls.STRUCTURE_UNDER_ATTACK,
184
207
  cls.STRUCTURE_WENT_HIGH_POWER,
185
208
  cls.STRUCTURE_WENT_LOW_POWER,
186
- cls.ORBITAL_ATTACKED,
187
- cls.ORBITAL_REINFORCED,
188
209
  cls.TOWER_ALERT_MSG,
189
210
  cls.TOWER_RESOURCE_ALERT_MSG,
190
- cls.SOV_STRUCTURE_REINFORCED,
191
- cls.SOV_STRUCTURE_DESTROYED,
192
211
  ]
193
212
 
194
213
  @classmethod
195
214
  def relevant_for_timerboard(cls) -> Set["NotificationType"]:
196
215
  """Notification types that can create timers."""
197
216
  return {
198
- cls.STRUCTURE_LOST_SHIELD,
199
- cls.STRUCTURE_LOST_ARMOR,
200
- cls.ORBITAL_REINFORCED,
201
- cls.MOONMINING_EXTRACTION_STARTED,
202
217
  cls.MOONMINING_EXTRACTION_CANCELLED,
218
+ cls.MOONMINING_EXTRACTION_STARTED,
219
+ cls.ORBITAL_REINFORCED,
203
220
  cls.SOV_STRUCTURE_REINFORCED,
221
+ cls.STRUCTURE_LOST_ARMOR,
222
+ cls.STRUCTURE_LOST_SHIELD,
204
223
  cls.TOWER_REINFORCED_EXTRA,
224
+ cls.SKYHOOK_LOST_SHIELDS,
205
225
  }
206
226
 
207
227
  @classmethod
@@ -210,15 +230,15 @@ class NotificationType(models.TextChoices):
210
230
  return {
211
231
  # billing
212
232
  cls.BILLING_BILL_OUT_OF_MONEY_MSG,
213
- cls.BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE,
214
233
  cls.BILLING_I_HUB_BILL_ABOUT_TO_EXPIRE,
234
+ cls.BILLING_I_HUB_DESTROYED_BY_BILL_FAILURE,
215
235
  # sov
216
- cls.SOV_ENTOSIS_CAPTURE_STARTED,
217
- cls.SOV_COMMAND_NODE_EVENT_STARTED,
218
236
  cls.SOV_ALL_CLAIM_ACQUIRED_MSG,
219
- cls.SOV_STRUCTURE_REINFORCED,
220
- cls.SOV_STRUCTURE_DESTROYED,
221
237
  cls.SOV_ALL_CLAIM_LOST_MSG,
238
+ cls.SOV_COMMAND_NODE_EVENT_STARTED,
239
+ cls.SOV_ENTOSIS_CAPTURE_STARTED,
240
+ cls.SOV_STRUCTURE_DESTROYED,
241
+ cls.SOV_STRUCTURE_REINFORCED,
222
242
  # cls.SOV_ALL_ANCHORING_MSG, # This notif is not broadcasted to all corporations
223
243
  # wars
224
244
  cls.WAR_ALLY_JOINED_WAR_AGGRESSOR_MSG,
@@ -238,43 +258,45 @@ class NotificationType(models.TextChoices):
238
258
  def relevant_for_moonmining(cls) -> Set["NotificationType"]:
239
259
  """Notification types about moon mining."""
240
260
  return {
241
- cls.MOONMINING_EXTRACTION_STARTED,
261
+ cls.MOONMINING_AUTOMATIC_FRACTURE,
242
262
  cls.MOONMINING_EXTRACTION_CANCELLED,
243
- cls.MOONMINING_LASER_FIRED,
244
263
  cls.MOONMINING_EXTRACTION_FINISHED,
245
- cls.MOONMINING_AUTOMATIC_FRACTURE,
264
+ cls.MOONMINING_EXTRACTION_STARTED,
265
+ cls.MOONMINING_LASER_FIRED,
246
266
  }
247
267
 
248
268
  @classmethod
249
269
  def structure_related(cls) -> Set["NotificationType"]:
250
270
  """Notification types that are related to a structure."""
251
271
  return {
252
- cls.STRUCTURE_ONLINE,
272
+ cls.MOONMINING_AUTOMATIC_FRACTURE,
273
+ cls.MOONMINING_EXTRACTION_CANCELLED,
274
+ cls.MOONMINING_EXTRACTION_FINISHED,
275
+ cls.MOONMINING_EXTRACTION_STARTED,
276
+ cls.MOONMINING_LASER_FIRED,
277
+ cls.ORBITAL_ATTACKED,
278
+ cls.ORBITAL_REINFORCED,
279
+ cls.OWNERSHIP_TRANSFERRED,
280
+ cls.STRUCTURE_ANCHORING,
281
+ cls.STRUCTURE_DESTROYED,
253
282
  cls.STRUCTURE_FUEL_ALERT,
254
283
  cls.STRUCTURE_JUMP_FUEL_ALERT,
284
+ cls.STRUCTURE_LOST_ARMOR,
285
+ cls.STRUCTURE_LOST_SHIELD,
286
+ cls.STRUCTURE_LOW_REAGENTS_ALERT,
287
+ cls.STRUCTURE_NO_REAGENTS_ALERT,
288
+ cls.STRUCTURE_ONLINE,
255
289
  cls.STRUCTURE_REFUELED_EXTRA,
290
+ cls.STRUCTURE_REINFORCEMENT_CHANGED,
256
291
  cls.STRUCTURE_SERVICES_OFFLINE,
257
- cls.STRUCTURE_WENT_LOW_POWER,
258
- cls.STRUCTURE_WENT_HIGH_POWER,
259
292
  cls.STRUCTURE_UNANCHORING,
260
293
  cls.STRUCTURE_UNDER_ATTACK,
261
- cls.STRUCTURE_LOST_SHIELD,
262
- cls.STRUCTURE_LOST_ARMOR,
263
- cls.STRUCTURE_DESTROYED,
264
- cls.OWNERSHIP_TRANSFERRED,
265
- cls.STRUCTURE_ANCHORING,
266
- cls.MOONMINING_EXTRACTION_STARTED,
267
- cls.MOONMINING_EXTRACTION_FINISHED,
268
- cls.MOONMINING_AUTOMATIC_FRACTURE,
269
- cls.MOONMINING_EXTRACTION_CANCELLED,
270
- cls.MOONMINING_LASER_FIRED,
271
- cls.STRUCTURE_REINFORCEMENT_CHANGED,
272
- cls.ORBITAL_ATTACKED,
273
- cls.ORBITAL_REINFORCED,
294
+ cls.STRUCTURE_WENT_HIGH_POWER,
295
+ cls.STRUCTURE_WENT_LOW_POWER,
274
296
  cls.TOWER_ALERT_MSG,
275
- cls.TOWER_RESOURCE_ALERT_MSG,
276
297
  cls.TOWER_REFUELED_EXTRA,
277
298
  cls.TOWER_REINFORCED_EXTRA,
299
+ cls.TOWER_RESOURCE_ALERT_MSG,
278
300
  }
279
301
 
280
302
  @classmethod
structures/managers.py CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  # pylint: disable=missing-class-docstring
4
4
 
5
+ from __future__ import annotations
6
+
5
7
  import datetime as dt
6
8
  import itertools
7
- from typing import Any, Iterable, Optional, Set, Tuple
9
+ from typing import TYPE_CHECKING, Any, Iterable, Optional, Set, Tuple
8
10
 
9
11
  from django.contrib.auth.models import User
10
12
  from django.db import models, transaction
@@ -24,6 +26,9 @@ from .core.notification_types import NotificationType
24
26
  from .providers import esi
25
27
  from .webhooks.managers import WebhookBaseManager
26
28
 
29
+ if TYPE_CHECKING:
30
+ from .models import Owner
31
+
27
32
  logger = LoggerAddTag(get_extension_logger(__name__), __title__)
28
33
 
29
34
 
@@ -231,13 +236,17 @@ class StructureQuerySet(models.QuerySet):
231
236
  """Filter for starbases."""
232
237
  return self.filter(eve_type__eve_group__eve_category=EveCategoryId.STARBASE)
233
238
 
239
+ def filter_skyhooks(self) -> models.QuerySet:
240
+ """Filter for skyhooks."""
241
+ return self.filter(eve_type=EveTypeId.ORBITAL_SKYHOOK)
242
+
234
243
  def ids(self) -> Set[int]:
235
244
  """Return ids as set."""
236
245
  return set(self.values_list("id", flat=True))
237
246
 
238
247
  def select_related_defaults(self) -> models.QuerySet:
239
248
  """returns a QuerySet with the default select_related"""
240
- return self.select_related(
249
+ return self.select_related( # pylint: disable=E1102
241
250
  "owner",
242
251
  "owner__corporation",
243
252
  "owner__corporation__alliance",
@@ -380,10 +389,14 @@ class StructureManagerBase(models.Manager):
380
389
  obj, created = self.update_or_create_from_dict(structure=structure, owner=owner)
381
390
  return obj, created
382
391
 
383
- def update_or_create_from_dict(self, structure: dict, owner) -> Tuple[Any, bool]:
392
+ def update_or_create_from_dict(
393
+ self, structure: dict, owner: Owner
394
+ ) -> Tuple[Any, bool]:
384
395
  """update or create structure from given dict"""
385
396
 
386
- eve_type, _ = EveType.objects.get_or_create_esi(id=structure["type_id"])
397
+ eve_type: EveType = EveType.objects.get_or_create_esi(id=structure["type_id"])[
398
+ 0
399
+ ]
387
400
  eve_solar_system, _ = EveSolarSystem.objects.get_or_create_esi(
388
401
  id=structure["system_id"]
389
402
  )
@@ -423,10 +436,11 @@ class StructureManagerBase(models.Manager):
423
436
  if old_obj:
424
437
  obj.handle_fuel_notifications(old_obj)
425
438
 
426
- # Make sure we have dogmas loaded for this type for fittings
427
- EveType.objects.get_or_create_esi(
428
- id=structure["type_id"], enabled_sections=[EveType.Section.DOGMAS]
429
- )
439
+ # Make sure we have dogmas loaded with all upwell structures for fittings
440
+ if eve_type.eve_group.eve_category_id == EveCategoryId.STRUCTURE:
441
+ EveType.objects.get_or_create_esi(
442
+ id=structure["type_id"], enabled_sections=[EveType.Section.DOGMAS]
443
+ )
430
444
 
431
445
  self._save_related_structure_services(structure, obj)
432
446
 
@@ -0,0 +1,149 @@
1
+ # Generated by Django 4.0.10 on 2024-08-19 14:25
2
+
3
+ import multiselectfield.db.fields
4
+
5
+ from django.db import migrations
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+
10
+ dependencies = [
11
+ ("structures", "0006_add_ownercharacter_disabled"),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.AlterField(
16
+ model_name="webhook",
17
+ name="notification_types",
18
+ field=multiselectfield.db.fields.MultiSelectField(
19
+ choices=[
20
+ ("OwnershipTransferred", "Upwell structure ownership transferred"),
21
+ ("StructureAnchoring", "Upwell structure anchoring"),
22
+ ("StructureDestroyed", "Upwell structure destroyed"),
23
+ ("StructureFuelAlert", "Upwell structure fuel alert"),
24
+ ("StructureJumpFuelAlert", "Upwell structure jump fuel alert"),
25
+ ("StructureLostArmor", "Upwell structure lost armor"),
26
+ ("StructureLostShields", "Upwell structure lost shields"),
27
+ ("StructureLowReagentsAlert", "Structure low reagents alert"),
28
+ ("StructureNoReagentsAlert", "Structure no reagents alert"),
29
+ ("StructureOnline", "Upwell structure went online"),
30
+ ("StructureRefueledExtra", "Upwell structure refueled"),
31
+ (
32
+ "StructuresReinforcementChanged",
33
+ "Upwell structure reinforcement time changed",
34
+ ),
35
+ (
36
+ "StructureServicesOffline",
37
+ "Upwell structure services went offline",
38
+ ),
39
+ ("StructureUnanchoring", "Upwell structure unanchoring"),
40
+ ("StructureUnderAttack", "Upwell structure is under attack"),
41
+ ("StructureWentHighPower", "Upwell structure went high power"),
42
+ ("StructureWentLowPower", "Upwell structure went low power"),
43
+ ("SkyhookDeployed", "Skyhook deployed"),
44
+ ("SkyhookDestroyed", "Skyhook destroyed"),
45
+ ("SkyhookLostShields", "Skyhook lost shields"),
46
+ ("SkyhookOnline", "Skyhook online"),
47
+ ("SkyhookUnderAttack", "Skyhook under attack"),
48
+ ("OrbitalAttacked", "Customs office attacked"),
49
+ ("OrbitalReinforced", "Customs office reinforced"),
50
+ ("TowerAlertMsg", "Starbase attacked"),
51
+ ("TowerRefueledExtra", "Starbase refueled (BETA)"),
52
+ ("TowerReinforcedExtra", "Starbase reinforced (BETA)"),
53
+ ("TowerResourceAlertMsg", "Starbase fuel alert"),
54
+ (
55
+ "MoonminingAutomaticFracture",
56
+ "Moon mining automatic fracture triggered",
57
+ ),
58
+ (
59
+ "MoonminingExtractionCancelled",
60
+ "Moon mining extraction cancelled",
61
+ ),
62
+ ("MoonminingExtractionFinished", "Moon mining extraction finished"),
63
+ ("MoonminingExtractionStarted", "Moon mining extraction started"),
64
+ ("MoonminingLaserFired", "Moonmining laser fired"),
65
+ ("SovAllClaimAquiredMsg", "Sovereignty claim acknowledgment"),
66
+ ("SovAllClaimLostMsg", "Sovereignty lost"),
67
+ ("AllAnchoringMsg", "Structure anchoring in alliance space"),
68
+ ("EntosisCaptureStarted", "Sovereignty entosis capture started"),
69
+ ("SovStructureDestroyed", "Sovereignty structure destroyed"),
70
+ ("SovStructureReinforced", "Sovereignty structure reinforced"),
71
+ (
72
+ "SovCommandNodeEventStarted",
73
+ "Sovereignty command node event started",
74
+ ),
75
+ ("AcceptedAlly", "War accepted ally"),
76
+ (
77
+ "AllWarCorpJoinedAllianceMsg",
78
+ "Alliance war corporation joined alliance message",
79
+ ),
80
+ ("AllWarSurrenderMsg", "Alliance war surrender message"),
81
+ ("AllyJoinedWarAggressorMsg", "War ally joined aggressor"),
82
+ ("AllyJoinedWarAllyMsg", "War ally joined ally"),
83
+ ("AllyJoinedWarDefenderMsg", "War ally joined defender"),
84
+ ("CorpWarSurrenderMsg", "War party surrendered"),
85
+ ("CorpBecameWarEligible", "War corporation became eligible"),
86
+ ("CorpNoLongerWarEligible", "War corporation no longer eligible"),
87
+ ("DeclareWar", "War declared"),
88
+ ("WarHQRemovedFromSpace", "War HQ removed from space"),
89
+ ("WarInvalid", "War invalid"),
90
+ (
91
+ "MercOfferedNegotiationMsg",
92
+ "War mercenary offered negotiation message",
93
+ ),
94
+ ("MercOfferRetractedMsg", "War mercenary offer retracted message"),
95
+ ("OfferedSurrender", "War offered surrender"),
96
+ ("OfferedToAlly", "War offered to become ally"),
97
+ ("WarAdopted ", "War adopted"),
98
+ ("WarDeclared", "War declared"),
99
+ ("WarInherited", "War inherited"),
100
+ ("WarRetractedByConcord", "War retracted by Concord"),
101
+ ("WarSurrenderOfferMsg", "War surrender offered"),
102
+ ("CharAppAcceptMsg", "Character joins corporation"),
103
+ ("CorpAppInvitedMsg", "Character invited to join corporation"),
104
+ ("CorpAppNewMsg", "Character submitted application"),
105
+ ("CharAppRejectMsg", "Corp application rejected message"),
106
+ (
107
+ "CorpAppRejectCustomMsg",
108
+ "Corp application rejected custom message",
109
+ ),
110
+ ("CharAppWithdrawMsg", "Character withdrew application"),
111
+ ("CharLeftCorpMsg", "Character leaves corporation"),
112
+ ("BillOutOfMoneyMsg", "Bill out of money"),
113
+ ("CorpAllBillMsg", "Corp alliance billing message"),
114
+ (
115
+ "InfrastructureHubBillAboutToExpire",
116
+ "I-HUB bill about to expire",
117
+ ),
118
+ ("IHubDestroyedByBillFailure", "I_HUB destroyed by bill failure"),
119
+ ],
120
+ default=[
121
+ "OrbitalAttacked",
122
+ "OrbitalReinforced",
123
+ "SkyhookDestroyed",
124
+ "SkyhookLostShields",
125
+ "SkyhookOnline",
126
+ "SkyhookUnderAttack",
127
+ "SovStructureDestroyed",
128
+ "SovStructureReinforced",
129
+ "StructureAnchoring",
130
+ "StructureDestroyed",
131
+ "StructureFuelAlert",
132
+ "StructureLostArmor",
133
+ "StructureLostShields",
134
+ "StructureLowReagentsAlert",
135
+ "StructureNoReagentsAlert",
136
+ "StructureOnline",
137
+ "StructureServicesOffline",
138
+ "StructureUnderAttack",
139
+ "StructureWentHighPower",
140
+ "StructureWentLowPower",
141
+ "TowerAlertMsg",
142
+ "TowerResourceAlertMsg",
143
+ ],
144
+ help_text="Select which type of notifications should be forwarded to this webhook",
145
+ max_length=1475,
146
+ verbose_name="notification types",
147
+ ),
148
+ ),
149
+ ]
@@ -0,0 +1,149 @@
1
+ # Generated by Django 4.0.10 on 2024-08-19 18:59
2
+
3
+ import multiselectfield.db.fields
4
+
5
+ from django.db import migrations
6
+
7
+
8
+ class Migration(migrations.Migration):
9
+
10
+ dependencies = [
11
+ ("structures", "0007_add_notificationtypes_skyhook_metenox"),
12
+ ]
13
+
14
+ operations = [
15
+ migrations.AlterField(
16
+ model_name="webhook",
17
+ name="notification_types",
18
+ field=multiselectfield.db.fields.MultiSelectField(
19
+ choices=[
20
+ ("OwnershipTransferred", "Upwell structure ownership transferred"),
21
+ ("StructureAnchoring", "Upwell structure anchoring"),
22
+ ("StructureDestroyed", "Upwell structure destroyed"),
23
+ ("StructureFuelAlert", "Upwell structure fuel alert"),
24
+ ("StructureJumpFuelAlert", "Upwell structure jump fuel alert"),
25
+ ("StructureLostArmor", "Upwell structure lost armor"),
26
+ ("StructureLostShields", "Upwell structure lost shields"),
27
+ ("StructureLowReagentsAlert", "Structure low reagents alert"),
28
+ ("StructureNoReagentsAlert", "Structure no reagents alert"),
29
+ ("StructureOnline", "Upwell structure went online"),
30
+ ("StructureRefueledExtra", "Upwell structure refueled"),
31
+ (
32
+ "StructuresReinforcementChanged",
33
+ "Upwell structure reinforcement time changed",
34
+ ),
35
+ (
36
+ "StructureServicesOffline",
37
+ "Upwell structure services went offline",
38
+ ),
39
+ ("StructureUnanchoring", "Upwell structure unanchoring"),
40
+ ("StructureUnderAttack", "Upwell structure is under attack"),
41
+ ("StructureWentHighPower", "Upwell structure went high power"),
42
+ ("StructureWentLowPower", "Upwell structure went low power"),
43
+ ("SkyhookDeployed", "Skyhook deployed"),
44
+ ("SkyhookDestroyed", "Skyhook destroyed"),
45
+ ("SkyhookLostShields", "Skyhook lost shields"),
46
+ ("SkyhookOnline", "Skyhook online"),
47
+ ("SkyhookUnderAttack", "Skyhook under attack"),
48
+ ("OrbitalAttacked", "Customs office attacked"),
49
+ ("OrbitalReinforced", "Customs office reinforced"),
50
+ ("TowerAlertMsg", "Starbase attacked"),
51
+ ("TowerRefueledExtra", "Starbase refueled (BETA)"),
52
+ ("TowerReinforcedExtra", "Starbase reinforced (BETA)"),
53
+ ("TowerResourceAlertMsg", "Starbase fuel alert"),
54
+ (
55
+ "MoonminingAutomaticFracture",
56
+ "Moon mining automatic fracture triggered",
57
+ ),
58
+ (
59
+ "MoonminingExtractionCancelled",
60
+ "Moon mining extraction cancelled",
61
+ ),
62
+ ("MoonminingExtractionFinished", "Moon mining extraction finished"),
63
+ ("MoonminingExtractionStarted", "Moon mining extraction started"),
64
+ ("MoonminingLaserFired", "Moonmining laser fired"),
65
+ ("SovAllClaimAquiredMsg", "Sovereignty claim acknowledgment"),
66
+ ("SovAllClaimLostMsg", "Sovereignty lost"),
67
+ ("AllAnchoringMsg", "Structure anchoring in alliance space"),
68
+ ("EntosisCaptureStarted", "Sovereignty entosis capture started"),
69
+ ("SovStructureDestroyed", "Sovereignty structure destroyed"),
70
+ ("SovStructureReinforced", "Sovereignty structure reinforced"),
71
+ (
72
+ "SovCommandNodeEventStarted",
73
+ "Sovereignty command node event started",
74
+ ),
75
+ ("AcceptedAlly", "War accepted ally"),
76
+ (
77
+ "AllWarCorpJoinedAllianceMsg",
78
+ "Alliance war corporation joined alliance message",
79
+ ),
80
+ ("AllWarSurrenderMsg", "Alliance war surrender message"),
81
+ ("AllyJoinedWarAggressorMsg", "War ally joined aggressor"),
82
+ ("AllyJoinedWarAllyMsg", "War ally joined ally"),
83
+ ("AllyJoinedWarDefenderMsg", "War ally joined defender"),
84
+ ("CorpWarSurrenderMsg", "War party surrendered"),
85
+ ("CorpBecameWarEligible", "War corporation became eligible"),
86
+ ("CorpNoLongerWarEligible", "War corporation no longer eligible"),
87
+ ("DeclareWar", "War declared"),
88
+ ("WarHQRemovedFromSpace", "War HQ removed from space"),
89
+ ("WarInvalid", "War invalid"),
90
+ (
91
+ "MercOfferedNegotiationMsg",
92
+ "War mercenary offered negotiation message",
93
+ ),
94
+ ("MercOfferRetractedMsg", "War mercenary offer retracted message"),
95
+ ("OfferedSurrender", "War offered surrender"),
96
+ ("OfferedToAlly", "War offered to become ally"),
97
+ ("WarAdopted", "War adopted"),
98
+ ("WarDeclared", "War declared"),
99
+ ("WarInherited", "War inherited"),
100
+ ("WarRetractedByConcord", "War retracted by Concord"),
101
+ ("WarSurrenderOfferMsg", "War surrender offered"),
102
+ ("CharAppAcceptMsg", "Character joins corporation"),
103
+ ("CorpAppInvitedMsg", "Character invited to join corporation"),
104
+ ("CorpAppNewMsg", "Character submitted application"),
105
+ ("CharAppRejectMsg", "Corp application rejected message"),
106
+ (
107
+ "CorpAppRejectCustomMsg",
108
+ "Corp application rejected custom message",
109
+ ),
110
+ ("CharAppWithdrawMsg", "Character withdrew application"),
111
+ ("CharLeftCorpMsg", "Character leaves corporation"),
112
+ ("BillOutOfMoneyMsg", "Bill out of money"),
113
+ ("CorpAllBillMsg", "Corp alliance billing message"),
114
+ (
115
+ "InfrastructureHubBillAboutToExpire",
116
+ "I-HUB bill about to expire",
117
+ ),
118
+ ("IHubDestroyedByBillFailure", "I_HUB destroyed by bill failure"),
119
+ ],
120
+ default=[
121
+ "OrbitalAttacked",
122
+ "OrbitalReinforced",
123
+ "SkyhookDestroyed",
124
+ "SkyhookLostShields",
125
+ "SkyhookOnline",
126
+ "SkyhookUnderAttack",
127
+ "SovStructureDestroyed",
128
+ "SovStructureReinforced",
129
+ "StructureAnchoring",
130
+ "StructureDestroyed",
131
+ "StructureFuelAlert",
132
+ "StructureLostArmor",
133
+ "StructureLostShields",
134
+ "StructureLowReagentsAlert",
135
+ "StructureNoReagentsAlert",
136
+ "StructureOnline",
137
+ "StructureServicesOffline",
138
+ "StructureUnderAttack",
139
+ "StructureWentHighPower",
140
+ "StructureWentLowPower",
141
+ "TowerAlertMsg",
142
+ "TowerResourceAlertMsg",
143
+ ],
144
+ help_text="Select which type of notifications should be forwarded to this webhook",
145
+ max_length=1474,
146
+ verbose_name="notification types",
147
+ ),
148
+ ),
149
+ ]