leadguru-jobs 0.558.0__py3-none-any.whl → 0.560.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: leadguru_jobs
3
- Version: 0.558.0
3
+ Version: 0.560.0
4
4
  Summary: LGT jobs builds
5
5
  Author-email: developer@leadguru.co
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -42,12 +42,12 @@ lgt_jobs/lgt_data/analytics.py,sha256=TFUffL8Dn-vIJ3ZaCVN-cj1Qnjb8F9GJyuk6Fo7mR1
42
42
  lgt_jobs/lgt_data/engine.py,sha256=Rsbz-CApAo_TVDssdjBkv8v_fVOZm_Uh1S6W4fnaEWo,7728
43
43
  lgt_jobs/lgt_data/enums.py,sha256=GZn6wm-kOd3veEOo1qlOR8QYje4vKaGV0na9jGt9388,2160
44
44
  lgt_jobs/lgt_data/helpers.py,sha256=NDa-V5EYaJfkGoWsmQSwSe6N_jxNxs8tHRQzW1iST6k,480
45
- lgt_jobs/lgt_data/model.py,sha256=y6heXdZblZTRia7IwI1zbXMVAkNHuw5zlf5tIAZ6FP4,28283
46
- lgt_jobs/lgt_data/mongo_repository.py,sha256=qqbt-oJ-RHmICLARgWvHuyPwVeKFkUqJZ2MA1bfIlXs,44762
45
+ lgt_jobs/lgt_data/model.py,sha256=BtVpJC_TRXUOklpzwRiDywyuKCCV2GGXtjsRYcPibDc,28454
46
+ lgt_jobs/lgt_data/mongo_repository.py,sha256=wdhslZTfTU-3Ad4Gm8NVl9HZFM5aK_vgG47EqNQBARk,45179
47
47
  lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  lgt_jobs/services/web_client.py,sha256=GLWsJkIC8rv6xLFaLwcMm4EwBlVDu0njORwkZqBJaE4,2086
49
49
  lgt_jobs/templates/new_message.html,sha256=BD_E90akmQ1Wf07wtZAjeK_7DUKRmja5HFHVo_AKI24,6994
50
- leadguru_jobs-0.558.0.dist-info/METADATA,sha256=ngZtkKaYe4U1YAx5J7qRfK2J793Emtc-cnHfVnGs-q8,1319
51
- leadguru_jobs-0.558.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
52
- leadguru_jobs-0.558.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
53
- leadguru_jobs-0.558.0.dist-info/RECORD,,
50
+ leadguru_jobs-0.560.0.dist-info/METADATA,sha256=XVDHeHX-orfiXiagPSBZcEy-RWZn4KWAvEBv2Bmvc7M,1319
51
+ leadguru_jobs-0.560.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
52
+ leadguru_jobs-0.560.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
53
+ leadguru_jobs-0.560.0.dist-info/RECORD,,
@@ -871,7 +871,8 @@ class ExtendedSlackMemberInformation(SlackMemberInformation):
871
871
  if not hasattr(contact, "display_name"):
872
872
  contact.display_name = contact.name
873
873
 
874
- lead.linkedin_urls = [f"https://www.linkedin.com/search/results/all/?keywords={contact.real_name}&origin=GLOBAL_SEARCH_HEADER&sid=u%40F"]
874
+ lead.linkedin_urls = [
875
+ f"https://www.linkedin.com/search/results/all/?keywords={contact.real_name}&origin=GLOBAL_SEARCH_HEADER&sid=u%40F"]
875
876
  lead.message = MessageModel()
876
877
  lead.message.message = contact.real_name
877
878
  if contact.title:
@@ -980,3 +981,12 @@ class LeadGuruFile(DictionaryModel):
980
981
  blob_path: str
981
982
  content_type: str
982
983
  file_name: str = None
984
+
985
+
986
+ class ScheduledMessage(BaseModel):
987
+ post_at: datetime
988
+ bot_id: ObjectId
989
+ user_id: ObjectId
990
+ sender_id: str
991
+ text: str | None
992
+ files: list
@@ -9,7 +9,8 @@ from lgt_jobs.lgt_data.enums import SourceType
9
9
  from lgt_jobs.lgt_data.model import (LeadModel, BaseModel, UserModel, UserResetPasswordModel, BoardModel, BoardedStatus,
10
10
  DedicatedBotModel, SlackMemberInformation, UserTemplateModel,
11
11
  ExtendedUserLeadModel, UserLeadModel, ExtendedLeadModel, UserContact, ChatMessage,
12
- GroupedMessagesModel, UserVerificationModel, UsersPage, Subscription)
12
+ GroupedMessagesModel, UserVerificationModel, UsersPage, Subscription,
13
+ ScheduledMessage)
13
14
  from datetime import datetime, UTC, timedelta
14
15
  from collections import OrderedDict
15
16
 
@@ -1207,3 +1208,15 @@ class SubscriptionsRepository(BaseMongoRepository):
1207
1208
  pipeline['expired'] = expired
1208
1209
 
1209
1210
  return Subscription.from_dic(self.collection().find_one(pipeline))
1211
+
1212
+
1213
+ class ScheduledMessagesRepository(BaseMongoRepository):
1214
+ pass
1215
+
1216
+ collection_name = 'scheduled_messages'
1217
+
1218
+ def find_all(self, only_actual: bool = True):
1219
+ pipeline = {}
1220
+ if only_actual:
1221
+ pipeline['post_at'] = {'$lte': datetime.now(UTC)}
1222
+ return [ScheduledMessage.from_dic(doc) for doc in self.collection().find(pipeline)]