smartpush 2.0.1__py3-none-any.whl → 2.0.2__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.
@@ -71,7 +71,7 @@ class ActivityTemplate(ActivityTemplateRequestBase):
71
71
  return currentJsonSchema
72
72
  @staticmethod
73
73
  def get_column_children_universal_property(currentJsonSchema,universalId,property):
74
- _currentJsonSchema = json.loads(currentJsonSchema)
74
+ _currentJsonSchema = currentJsonSchema if isinstance(currentJsonSchema,dict) else json.loads(currentJsonSchema)
75
75
  for child in _currentJsonSchema.get("children", []):
76
76
  if child.get("type") == "Section":
77
77
  # 2. 在Section的children中找到Column节点
@@ -90,5 +90,5 @@ class ActivityTemplate(ActivityTemplateRequestBase):
90
90
 
91
91
 
92
92
  if __name__ == '__main__':
93
- currentJsonSchema = "{\"id\":\"a4a9fba2a\",\"type\":\"Stage\",\"props\":{\"backgroundColor\":\"#EAEDF1\",\"width\":\"600px\",\"fullWidth\":\"normal-width\"},\"children\":[{\"id\":\"84ba788da\",\"type\":\"Header\",\"props\":{\"backgroundColor\":\"#ffffff\",\"borderLeft\":\"1px none #ffffff\",\"borderRight\":\"1px none #ffffff\",\"borderTop\":\"1px none #ffffff\",\"borderBottom\":\"1px none #ffffff\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"cols\":[12]},\"children\":[{\"id\":\"98d909a48\",\"type\":\"Column\",\"props\":{},\"children\":[{\"id\":\"adbbaaaea\",\"universalId\":\"4c8a94eb-fb4f-4cba-934c-8bbcf4f02f63\",\"universalName\":\"Auto-Logo-2025-11-26 15:11:22\",\"type\":\"Logo\",\"props\":{\"width\":120,\"height\":120,\"imgRatio\":1,\"src\":\"https://cdn.smartpushedm.com/frontend/smart-push/staging/1741054956275/1758595834300_74d62ae6.png?width=120&height=120\",\"href\":\"https://smartpush4.myshoplinestg.com\",\"align\":\"center\",\"containerBackgroundColor\":\"#123456\",\"paddingLeft\":\"20px\",\"paddingRight\":\"20px\",\"paddingTop\":\"20px\",\"paddingBottom\":\"20px\",\"paddingCondition\":true,\"segmentTypeConfig\":1},\"children\":[]}]}]},{\"id\":\"84ba7bbda\",\"type\":\"Section\",\"props\":{\"backgroundColor\":\"#ffffff\",\"borderLeft\":\"1px none #ffffff\",\"borderRight\":\"1px none #ffffff\",\"borderTop\":\"1px none #ffffff\",\"borderBottom\":\"1px none #ffffff\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"cols\":[12]},\"children\":[{\"id\":\"8cab9aa48\",\"type\":\"Column\",\"props\":{},\"children\":[{\"id\":\"f946192ef\",\"universalId\":\"4c8a94eb-fb4f-4cba-934c-8bbcf4f02f63\",\"universalName\":\"Auto-Logo-2025-11-26 15:11:22\",\"type\":\"Logo\",\"props\":{\"width\":120,\"height\":120,\"imgRatio\":1,\"src\":\"https://cdn.smartpushedm.com/frontend/smart-push/staging/1741054956275/1758595834300_74d62ae6.png?width=120&height=120\",\"href\":\"https://smartpush4.myshoplinestg.com\",\"align\":\"center\",\"containerBackgroundColor\":\"transparent\",\"paddingLeft\":\"20px\",\"paddingRight\":\"20px\",\"paddingTop\":\"20px\",\"paddingBottom\":\"20px\",\"paddingCondition\":true,\"segmentTypeConfig\":1},\"children\":[]}]}]},{\"id\":\"b8bbabad9\",\"type\":\"Footer\",\"props\":{\"backgroundColor\":\"#ffffff\",\"borderLeft\":\"1px none #ffffff\",\"borderRight\":\"1px none #ffffff\",\"borderTop\":\"1px none #ffffff\",\"borderBottom\":\"1px none #ffffff\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"cols\":[12]},\"children\":[{\"id\":\"b3bcabad7\",\"type\":\"Column\",\"props\":{},\"children\":[{\"id\":\"b39b6a94a\",\"type\":\"Subscribe\",\"props\":{\"content\":\"<p style=\\\\\\\"text-align:center;\\\\\\\"><span style=\\\\\\\"font-size:12px\\\\\\\"><span style=\\\\\\\"font-family:Arial, Helvetica, sans-serif\\\\\\\">在此處輸入聯繫地址,可以讓你的顧客更加信任這封郵件</span></span></p><div class=\\\\\\\"sp-font-12\\\\\\\" style=\\\\\\\"color: rgb(122, 132, 153); font-size: 12px; text-align: center; font-style: oblique;\\\\\\\">Questions? Please <a href=[[customerEmail]] style=\\\\\\\"color:#479EEF;text-decoration:underline\\\\\\\" rel=\\\\\\\"noreferrer\\\\\\\">contact us</a>, we are glad to help.</div><div class=\\\\\\\"sp-font-12\\\\\\\" style=\\\\\\\"color: rgb(122, 132, 153); font-size: 12px; text-align: center; font-style: oblique;\\\\\\\">If you don't want to receive our message, just <a href=[[unsubscribe.url]] target=\\\\\\\"_blank\\\\\\\" style=\\\\\\\"color:#479EEF;text-decoration:underline\\\\\\\" rel=\\\\\\\"noreferrer\\\\\\\">click here</a> to cancel the subscription.</div>\"},\"children\":[]}]}]}],\"extend\":{\"version\":\"1.0.0\",\"updateTime\":\"2025-11-26T07:25:17.609Z\"}}"
93
+ currentJsonSchema = json.loads("{\"id\":\"6ou4lnz43\",\"type\":\"Stage\",\"props\":{\"backgroundColor\":\"#EAEDF1\",\"width\":\"600px\",\"fullWidth\":\"normal-width\"},\"children\":[{\"id\":\"wrgsuiu5a\",\"type\":\"Header\",\"props\":{\"backgroundColor\":\"#ffffff\",\"borderLeft\":\"1px none #ffffff\",\"borderRight\":\"1px none #ffffff\",\"borderTop\":\"1px none #ffffff\",\"borderBottom\":\"1px none #ffffff\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"cols\":[12]},\"children\":[{\"id\":\"jk2qppaqu\",\"type\":\"Column\",\"props\":{},\"children\":[]}]},{\"id\":\"2yowv8vnc\",\"type\":\"Section\",\"props\":{\"backgroundColor\":\"#ffffff\",\"borderLeft\":\"1px none #ffffff\",\"borderRight\":\"1px none #ffffff\",\"borderTop\":\"1px none #ffffff\",\"borderBottom\":\"1px none #ffffff\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"cols\":[12]},\"children\":[{\"id\":\"emkpt5gqk\",\"type\":\"Column\",\"props\":{},\"children\":[{\"id\":\"jpbphqkmt\",\"universalId\":\"08424a7a-cbf5-46ca-808c-cc4eec061d9a\",\"universalName\":\"Auto-Logo-2025-11-26 17:06:31\",\"type\":\"Logo\",\"props\":{\"width\":120,\"height\":120,\"imgRatio\":1,\"src\":\"https://cdn.smartpushedm.com/frontend/smart-push/staging/1741054956275/1758595834300_74d62ae6.png?width=120&height=120\",\"href\":\"https://smartpush4.myshoplinestg.com\",\"align\":\"center\",\"containerBackgroundColor\":\"#123456\",\"paddingLeft\":\"20px\",\"paddingRight\":\"20px\",\"paddingTop\":\"20px\",\"paddingBottom\":\"20px\",\"paddingCondition\":true,\"segmentTypeConfig\":1},\"children\":[]}]}]},{\"id\":\"x3fqcszdh\",\"type\":\"Footer\",\"props\":{\"backgroundColor\":\"#ffffff\",\"borderLeft\":\"1px none #ffffff\",\"borderRight\":\"1px none #ffffff\",\"borderTop\":\"1px none #ffffff\",\"borderBottom\":\"1px none #ffffff\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"cols\":[12]},\"children\":[{\"id\":\"tyqqxszro\",\"type\":\"Column\",\"props\":{},\"children\":[{\"id\":\"xarkbgqzj\",\"type\":\"Subscribe\",\"props\":{\"content\":\"<p style=\\\"text-align:center;\\\"><span style=\\\"font-size:12px\\\"><span style=\\\"font-family:Arial, Helvetica, sans-serif\\\">在此處輸入聯繫地址,可以讓你的顧客更加信任這封郵件</span></span></p>\"},\"children\":[]}]}]}],\"extend\":{\"version\":\"1.0.0\",\"updateTime\":null}}")
94
94
  print(ActivityTemplate.get_column_children_universal_property(currentJsonSchema,'4c8a94eb-fb4f-4cba-934c-8bbcf4f02f63','containerBackgroundColor'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: smartpush
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: 用于smartpush自动化测试工具包
5
5
  Author: lulu、felix、long
6
6
 
@@ -10,7 +10,7 @@ smartpush/base/url_enum.py,sha256=vVg4Y1w8ayT_jD3DDzQCEzD6cWpnRr-7MxPeEqU5OTU,22
10
10
  smartpush/crowd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  smartpush/crowd/crowd.py,sha256=KNwvX-BnBnMVVuHM79a-VeBMp_guB-Kqw3tFaAPiAp8,9768
12
12
  smartpush/email/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- smartpush/email/activity.py,sha256=XME4UpOcP3oKBk4LJTkDvR7b6E7RgvPXpRC3tTMAVf0,8821
13
+ smartpush/email/activity.py,sha256=YesNdAvF4ElJzBsp0hX-Um1RSl86k2Q4kwYoguQDeGw,7510
14
14
  smartpush/email/schema.py,sha256=Uef41D0Z_xw07khOyLiJhjfZ9GVE0urN0tG8orQjIfY,31220
15
15
  smartpush/email/universal_content.py,sha256=0VaY_-2--AofdJBuRrOClDXZqn-tCU_FOxSPY-GIRIk,11954
16
16
  smartpush/export/__init__.py,sha256=D9GbWcmwnetEndFDty5XbVienFK1WjqV2yYcQp3CM84,99
@@ -34,7 +34,7 @@ smartpush/utils/StringUtils.py,sha256=n8mo9k0JQN63MReImgv-66JxmmymOGknR8pH2fkQrA
34
34
  smartpush/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  smartpush/utils/date_utils.py,sha256=Xgx2DbmWYri71xXBiaKYTZDeh2a8MFhYns_xB0U2JOA,13159
36
36
  smartpush/utils/form_utils.py,sha256=ld-g_Dm_ZlnagQt7imYfUc87bcBRVlTctywuLtzmjXQ,849
37
- smartpush-2.0.1.dist-info/METADATA,sha256=vvby9hLqP-pNQo9MTusB1EULNABvvi3BLYFXhnB2G2c,131
38
- smartpush-2.0.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
39
- smartpush-2.0.1.dist-info/top_level.txt,sha256=5_CXqu08EfbPaKLjuSAOAqCmGU6shiatwDU_ViBGCmg,10
40
- smartpush-2.0.1.dist-info/RECORD,,
37
+ smartpush-2.0.2.dist-info/METADATA,sha256=etXws8QToaqrI5RQYFtpusz0uTIpTiOIV1nDUBP8-0E,131
38
+ smartpush-2.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
39
+ smartpush-2.0.2.dist-info/top_level.txt,sha256=5_CXqu08EfbPaKLjuSAOAqCmGU6shiatwDU_ViBGCmg,10
40
+ smartpush-2.0.2.dist-info/RECORD,,