synapse 2.171.0__py311-none-any.whl → 2.172.0__py311-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.

Potentially problematic release.


This version of synapse might be problematic. Click here for more details.

Files changed (52) hide show
  1. synapse/common.py +20 -0
  2. synapse/cortex.py +86 -4
  3. synapse/lib/agenda.py +13 -7
  4. synapse/lib/ast.py +9 -8
  5. synapse/lib/cache.py +2 -2
  6. synapse/lib/cell.py +5 -0
  7. synapse/lib/coro.py +12 -0
  8. synapse/lib/layer.py +124 -84
  9. synapse/lib/lmdbslab.py +17 -10
  10. synapse/lib/node.py +1 -1
  11. synapse/lib/slabseqn.py +11 -5
  12. synapse/lib/storm.py +7 -71
  13. synapse/lib/stormhttp.py +1 -1
  14. synapse/lib/stormlib/auth.py +19 -0
  15. synapse/lib/stormlib/cell.py +42 -4
  16. synapse/lib/stormlib/compression.py +6 -6
  17. synapse/lib/stormlib/env.py +50 -0
  18. synapse/lib/stormlib/gen.py +1 -1
  19. synapse/lib/stormlib/model.py +1 -1
  20. synapse/lib/stormtypes.py +35 -11
  21. synapse/lib/types.py +6 -6
  22. synapse/lib/version.py +2 -2
  23. synapse/lib/view.py +6 -12
  24. synapse/models/base.py +13 -0
  25. synapse/models/biz.py +14 -0
  26. synapse/models/economic.py +3 -0
  27. synapse/models/inet.py +474 -4
  28. synapse/models/infotech.py +163 -22
  29. synapse/models/orgs.py +17 -0
  30. synapse/models/risk.py +15 -1
  31. synapse/models/transport.py +1 -1
  32. synapse/tests/test_common.py +15 -0
  33. synapse/tests/test_lib_ast.py +2 -1
  34. synapse/tests/test_lib_layer.py +168 -59
  35. synapse/tests/test_lib_lmdbslab.py +13 -0
  36. synapse/tests/test_lib_stormlib_auth.py +22 -0
  37. synapse/tests/test_lib_stormlib_cell.py +47 -0
  38. synapse/tests/test_lib_stormlib_env.py +25 -0
  39. synapse/tests/test_lib_view.py +9 -9
  40. synapse/tests/test_model_base.py +5 -3
  41. synapse/tests/test_model_economic.py +4 -0
  42. synapse/tests/test_model_inet.py +405 -1
  43. synapse/tests/test_model_infotech.py +135 -3
  44. synapse/tests/test_model_orgs.py +6 -0
  45. synapse/tests/test_model_risk.py +8 -0
  46. synapse/tests/test_tools_storm.py +46 -8
  47. synapse/tools/storm.py +14 -6
  48. {synapse-2.171.0.dist-info → synapse-2.172.0.dist-info}/METADATA +1 -1
  49. {synapse-2.171.0.dist-info → synapse-2.172.0.dist-info}/RECORD +52 -50
  50. {synapse-2.171.0.dist-info → synapse-2.172.0.dist-info}/WHEEL +1 -1
  51. {synapse-2.171.0.dist-info → synapse-2.172.0.dist-info}/LICENSE +0 -0
  52. {synapse-2.171.0.dist-info → synapse-2.172.0.dist-info}/top_level.txt +0 -0
synapse/models/base.py CHANGED
@@ -195,8 +195,12 @@ class BaseModule(s_module.CoreModule):
195
195
 
196
196
  ('created', ('time', {}), {
197
197
  'doc': 'The time the note was created.'}),
198
+
198
199
  ('updated', ('time', {}), {
199
200
  'doc': 'The time the note was updated.'}),
201
+
202
+ ('replyto', ('meta:note', {}), {
203
+ 'doc': 'The note is a reply to the specified note.'}),
200
204
  )),
201
205
 
202
206
  ('meta:timeline', {}, (
@@ -213,17 +217,26 @@ class BaseModule(s_module.CoreModule):
213
217
  ('meta:timeline:taxonomy', {}, ()),
214
218
 
215
219
  ('meta:event', {}, (
220
+
216
221
  ('timeline', ('meta:timeline', {}), {
217
222
  'doc': 'The timeline containing the event.'}),
223
+
218
224
  ('title', ('str', {}), {
219
225
  'doc': 'A title for the event.'}),
226
+
220
227
  ('summary', ('str', {}), {
221
228
  'disp': {'hint': 'text'},
222
229
  'doc': 'A prose summary of the event.'}),
230
+
223
231
  ('time', ('time', {}), {
224
232
  'doc': 'The time that the event occurred.'}),
233
+
234
+ ('index', ('int', {}), {
235
+ 'doc': 'The index of this event in a timeline without exact times.'}),
236
+
225
237
  ('duration', ('duration', {}), {
226
238
  'doc': 'The duration of the event.'}),
239
+
227
240
  ('type', ('meta:event:taxonomy', {}), {
228
241
  'doc': 'Type of event.'}),
229
242
  )),
synapse/models/biz.py CHANGED
@@ -175,22 +175,36 @@ class BizModule(s_module.CoreModule):
175
175
  }),
176
176
  )),
177
177
  ('biz:listing', {}, (
178
+
178
179
  ('seller', ('ps:contact', {}), {
179
180
  'doc': 'The contact information for the seller.'}),
181
+
180
182
  ('product', ('biz:product', {}), {
181
183
  'doc': 'The product being offered.'}),
184
+
182
185
  ('service', ('biz:service', {}), {
183
186
  'doc': 'The service being offered.'}),
187
+
184
188
  ('current', ('bool', {}), {
185
189
  'doc': 'Set to true if the offer is still current.'}),
190
+
186
191
  ('time', ('time', {}), {
187
192
  'doc': 'The first known offering of this product/service by the organization for the asking price.'}),
193
+
188
194
  ('expires', ('time', {}), {
189
195
  'doc': 'Set if the offer has a known expiration date.'}),
196
+
190
197
  ('price', ('econ:price', {}), {
191
198
  'doc': 'The asking price of the product or service.'}),
199
+
192
200
  ('currency', ('econ:currency', {}), {
193
201
  'doc': 'The currency of the asking price.'}),
202
+
203
+ ('count:total', ('int', {'min': 0}), {
204
+ 'doc': 'The number of instances for sale.'}),
205
+
206
+ ('count:remaining', ('int', {'min': 0}), {
207
+ 'doc': 'The current remaining number of instances for sale.'}),
194
208
  )),
195
209
  ('biz:service', {}, (
196
210
  ('provider', ('ps:contact', {}), {
@@ -169,6 +169,9 @@ class EconModule(s_module.CoreModule):
169
169
 
170
170
  ('currency', ('econ:currency', {}), {
171
171
  'doc': 'The econ:price of the purchase'}),
172
+
173
+ ('listing', ('biz:listing', {}), {
174
+ 'doc': 'The purchase was made based on the given listing.'}),
172
175
  )),
173
176
 
174
177
  ('econ:receipt:item', {}, (
synapse/models/inet.py CHANGED
@@ -69,6 +69,22 @@ ipv6_multicast_scopes = {
69
69
 
70
70
  scopes_enum = 'reserved,interface-local,link-local,realm-local,admin-local,site-local,organization-local,global,unassigned'
71
71
 
72
+ svcobjstatus = (
73
+ (10, 'draft'),
74
+ (30, 'available'),
75
+ (40, 'offline'),
76
+ (50, 'removed'),
77
+ )
78
+
79
+ svcaccesstypes = (
80
+ (10, 'create'),
81
+ (30, 'read'),
82
+ (40, 'update'),
83
+ (50, 'delete'),
84
+ (60, 'list'),
85
+ (70, 'execute'),
86
+ )
87
+
72
88
  def getAddrScope(ipv6):
73
89
 
74
90
  if ipv6.is_loopback:
@@ -767,7 +783,7 @@ class IPv6Range(s_types.Range):
767
783
  def _normPyTuple(self, valu):
768
784
  if len(valu) != 2:
769
785
  raise s_exc.BadTypeValu(numitems=len(valu), name=self.name,
770
- mesg=f'Must be a 2-tuple of type {self.subtype.name}: {repr(valu)[:256]}')
786
+ mesg=f'Must be a 2-tuple of type {self.subtype.name}: {s_common.trimText(repr(valu))}')
771
787
 
772
788
  minv = self.subtype.norm(valu[0])[0]
773
789
  maxv = self.subtype.norm(valu[1])[0]
@@ -1415,7 +1431,7 @@ class InetModule(s_module.CoreModule):
1415
1431
  'doc': 'A channel within a web service or instance such as slack or discord.'
1416
1432
  }),
1417
1433
 
1418
- ('inet:web:hashtag', ('str', {'lower': True, 'regex': r'^#[\w]+$'}), {
1434
+ ('inet:web:hashtag', ('str', {'lower': True, 'regex': r'^#\w[\w·]*(?<!·)$'}), {
1419
1435
  'doc': 'A hashtag used in a web post.',
1420
1436
  }),
1421
1437
 
@@ -1493,6 +1509,88 @@ class InetModule(s_module.CoreModule):
1493
1509
  ('inet:ssl:jarmsample', ('comp', {'fields': (('server', 'inet:server'), ('jarmhash', 'inet:ssl:jarmhash'))}), {
1494
1510
  'doc': 'A JARM hash sample taken from a server.'}),
1495
1511
 
1512
+ ('inet:service:platform', ('guid', {}), {
1513
+ 'doc': 'A network platform which provides services.'}),
1514
+
1515
+ ('inet:service:instance', ('guid', {}), {
1516
+ 'doc': 'An instance of the platform such as Slack or Discord instances.'}),
1517
+
1518
+ ('inet:service:object:status', ('int', {'enums': svcobjstatus}), {
1519
+ 'doc': 'An object status enumeration.'}),
1520
+
1521
+ ('inet:service:account', ('guid', {}), {
1522
+ 'doc': 'An account within a service platform. Accounts may be instance specific.'}),
1523
+
1524
+ ('inet:service:permission:type:taxonomy', ('taxonomy', {}), {
1525
+ 'interfaces': ('meta:taxonomy',),
1526
+ 'doc': 'A permission type taxonomy.'}),
1527
+
1528
+ ('inet:service:permission', ('guid', {}), {
1529
+ 'interfaces': ('inet:service:object',),
1530
+ 'doc': 'A permission which may be granted to a service account or role.'}),
1531
+
1532
+ ('inet:service:rule', ('guid', {}), {
1533
+ 'interfaces': ('inet:service:object',),
1534
+ 'doc': 'A rule which grants or denies a permission to a service account or role.'}),
1535
+
1536
+ ('inet:service:login', ('guid', {}), {
1537
+ 'interfaces': ('inet:service:action',),
1538
+ 'doc': 'A login event for a service account.'}),
1539
+
1540
+ ('inet:service:login:method:taxonomy', ('taxonomy', {}), {
1541
+ 'interfaces': ('meta:taxonomy',),
1542
+ 'doc': 'A taxonomy of inet service login methods.'}),
1543
+
1544
+ ('inet:service:session', ('guid', {}), {
1545
+ 'interfaces': ('inet:service:object',),
1546
+ 'doc': 'An authenticated session.'}),
1547
+
1548
+ ('inet:service:group', ('guid', {}), {
1549
+ 'interfaces': ('inet:service:object',),
1550
+ 'doc': 'A group or role which contains member accounts.'}),
1551
+
1552
+ ('inet:service:group:member', ('guid', {}), {
1553
+ 'interfaces': ('inet:service:object',),
1554
+ 'doc': 'Represents a service account being a member of a group.'}),
1555
+
1556
+ ('inet:service:channel', ('guid', {}), {
1557
+ 'interfaces': ('inet:service:object',),
1558
+ 'doc': 'A channel used to distribute messages.'}),
1559
+
1560
+ ('inet:service:channel:member', ('guid', {}), {
1561
+ 'interfaces': ('inet:service:object',),
1562
+ 'doc': 'Represents a service account being a member of a channel.'}),
1563
+
1564
+ ('inet:service:message', ('guid', {}), {
1565
+ 'interfaces': ('inet:service:action',),
1566
+ 'doc': 'A message or post created by an account.'}),
1567
+
1568
+ ('inet:service:message:link', ('guid', {}), {
1569
+ 'doc': 'A URL link included within a message.'}),
1570
+
1571
+ ('inet:service:message:attachment', ('guid', {}), {
1572
+ 'doc': 'A file attachment included within a message.'}),
1573
+
1574
+ ('inet:service:access', ('guid', {}), {
1575
+ 'interfaces': ('inet:service:action',),
1576
+ 'doc': 'Represents a user access request to a service resource.'}),
1577
+
1578
+ ('inet:service:resource:type:taxonomy', ('taxonomy', {}), {
1579
+ 'interfaces': ('meta:taxonomy',),
1580
+ 'doc': 'A taxonomy of inet service resource types.'}),
1581
+
1582
+ ('inet:service:resource', ('guid', {}), {
1583
+ 'interfaces': ('inet:service:object',),
1584
+ 'doc': 'A generic resource provided by the service architecture.'}),
1585
+
1586
+ ('inet:service:bucket', ('guid', {}), {
1587
+ 'interfaces': ('inet:service:object',),
1588
+ 'doc': 'A file/blob storage object within a service architecture.'}),
1589
+
1590
+ ('inet:service:bucket:item', ('guid', {}), {
1591
+ 'interfaces': ('inet:service:object',),
1592
+ 'doc': 'An individual file stored within a bucket.'}),
1593
+
1496
1594
  ('inet:tls:handshake', ('guid', {}), {
1497
1595
  'doc': 'An instance of a TLS handshake between a server and client.'}),
1498
1596
 
@@ -1543,6 +1641,90 @@ class InetModule(s_module.CoreModule):
1543
1641
  'doc': 'The host that the request was sent to.'}),
1544
1642
  ),
1545
1643
  }),
1644
+
1645
+ ('inet:service:base', {
1646
+ 'doc': 'Properties common to most forms within a service platform.',
1647
+ 'props': (
1648
+
1649
+ ('id', ('str', {'strip': True}), {
1650
+ 'doc': 'A platform specific ID.'}),
1651
+
1652
+ ('platform', ('inet:service:platform', {}), {
1653
+ 'doc': 'The platform which defines the node.'}),
1654
+
1655
+ ('instance', ('inet:service:instance', {}), {
1656
+ 'doc': 'The platform instance which defines the node.'}),
1657
+ ),
1658
+ }),
1659
+
1660
+ ('inet:service:object', {
1661
+
1662
+ 'doc': 'Properties common to objects within a service platform.',
1663
+ 'interfaces': ('inet:service:base',),
1664
+ 'props': (
1665
+
1666
+ ('status', ('inet:service:object:status', {}), {
1667
+ 'doc': 'The status of this object.'}),
1668
+
1669
+ ('period', ('ival', {}), {
1670
+ 'doc': 'The period when the object existed.'}),
1671
+
1672
+ ('creator', ('inet:service:account', {}), {
1673
+ 'doc': 'The service account which created the object.'}),
1674
+
1675
+ ('remover', ('inet:service:account', {}), {
1676
+ 'doc': 'The service account which removed or decommissioned the object.'}),
1677
+
1678
+ ),
1679
+ }),
1680
+
1681
+ ('inet:service:action', {
1682
+
1683
+ 'doc': 'Properties common to events within a service platform.',
1684
+ 'interfaces': ('inet:service:base',),
1685
+ 'props': (
1686
+
1687
+ ('time', ('time', {}), {
1688
+ 'doc': 'The time that the account initiated the action.'}),
1689
+
1690
+ ('account', ('inet:service:account', {}), {
1691
+ 'doc': 'The account which initiated the action.'}),
1692
+
1693
+ ('success', ('bool', {}), {
1694
+ 'doc': 'Set to true if the action was successful.'}),
1695
+
1696
+ ('rule', ('inet:service:rule', {}), {
1697
+ 'doc': 'The rule which allowed or denied the action.'}),
1698
+
1699
+ ('error:code', ('str', {'strip': True}), {
1700
+ 'doc': 'The platform specific error code if the action was unsuccessful.'}),
1701
+
1702
+ ('error:reason', ('str', {'strip': True}), {
1703
+ 'doc': 'The platform specific friendly error reason if the action was unsuccessful.'}),
1704
+
1705
+ ('platform', ('inet:service:platform', {}), {
1706
+ 'doc': 'The platform where the action was initiated.'}),
1707
+
1708
+ ('instance', ('inet:service:instance', {}), {
1709
+ 'doc': 'The platform instance where the action was initiated.'}),
1710
+
1711
+ ('session', ('inet:service:session', {}), {
1712
+ 'doc': 'The session which initiated the action.'}),
1713
+
1714
+ ('client', ('inet:client', {}), {
1715
+ 'doc': 'The network address of the client which initiated the action.'}),
1716
+
1717
+ ('client:host', ('it:host', {}), {
1718
+ 'doc': 'The client host which initiated the action.'}),
1719
+
1720
+ ('server', ('inet:server', {}), {
1721
+ 'doc': 'The network address of the server which handled the action.'}),
1722
+
1723
+ ('server:host', ('it:host', {}), {
1724
+ 'doc': 'The server host which handled the action.'}),
1725
+
1726
+ ),
1727
+ }),
1546
1728
  ),
1547
1729
 
1548
1730
  'forms': (
@@ -1931,6 +2113,9 @@ class InetModule(s_module.CoreModule):
1931
2113
  ('host', ('it:host', {}), {
1932
2114
  'doc': 'The host that used the network egress.'}),
1933
2115
 
2116
+ ('account', ('inet:service:account', {}), {
2117
+ 'doc': 'The service account which used the client address to egress.'}),
2118
+
1934
2119
  ('client', ('inet:client', {}), {
1935
2120
  'doc': 'The client address the host used as a network egress.'}),
1936
2121
 
@@ -2046,8 +2231,12 @@ class InetModule(s_module.CoreModule):
2046
2231
 
2047
2232
  ('inet:iface', {}, (
2048
2233
  ('host', ('it:host', {}), {
2049
- 'doc': 'The guid of the host the interface is associated with.'
2050
- }),
2234
+ 'doc': 'The guid of the host the interface is associated with.'}),
2235
+
2236
+ ('name', ('str', {'strip': True}), {
2237
+ 'ex': 'eth0',
2238
+ 'doc': 'The interface name.'}),
2239
+
2051
2240
  ('network', ('it:network', {}), {
2052
2241
  'doc': 'The guid of the it:network the interface connected to.'
2053
2242
  }),
@@ -3310,6 +3499,287 @@ class InetModule(s_module.CoreModule):
3310
3499
  'ro': True,
3311
3500
  'doc': 'The x509 certificate sent by the client.'})
3312
3501
  )),
3502
+ ('inet:service:platform', {}, (
3503
+
3504
+ ('url', ('inet:url', {}), {
3505
+ 'ex': 'https://twitter.com',
3506
+ 'doc': 'The primary URL of the platform.'}),
3507
+
3508
+ ('name', ('str', {'onespace': True, 'lower': True}), {
3509
+ 'ex': 'twitter',
3510
+ 'doc': 'A friendly name for the platform.'}),
3511
+
3512
+ ('desc', ('str', {}), {
3513
+ 'disp': {'hint': 'text'},
3514
+ 'doc': 'A description of the service platform.'}),
3515
+
3516
+ ('provider', ('ou:org', {}), {
3517
+ 'doc': 'The organization which operates the platform.'}),
3518
+
3519
+ ('provider:name', ('ou:name', {}), {
3520
+ 'doc': 'The name of the organization which operates the platform.'}),
3521
+ )),
3522
+
3523
+ ('inet:service:instance', {}, (
3524
+
3525
+ ('id', ('str', {'strip': True}), {
3526
+ 'ex': 'B8ZS2',
3527
+ 'doc': 'A platform specific ID to identify the service instance.'}),
3528
+
3529
+ ('platform', ('inet:service:platform', {}), {
3530
+ 'doc': 'The platform which defines the service instance.'}),
3531
+
3532
+ ('url', ('inet:url', {}), {
3533
+ 'ex': 'https://v.vtx.lk/slack',
3534
+ 'doc': 'The primary URL which identifies the service instance.'}),
3535
+
3536
+ ('name', ('str', {'lower': True, 'onespace': True}), {
3537
+ 'ex': 'synapse users slack',
3538
+ 'doc': 'The name of the service instance.'}),
3539
+
3540
+ ('desc', ('str', {}), {
3541
+ 'disp': {'hint': 'text'},
3542
+ 'doc': 'A description of the service instance.'}),
3543
+
3544
+ ('period', ('ival', {}), {
3545
+ 'doc': 'The time period where the instance existed.'}),
3546
+
3547
+ ('status', ('inet:service:object:status', {}), {
3548
+ 'doc': 'The status of this instance.'}),
3549
+
3550
+ ('creator', ('inet:service:account', {}), {
3551
+ 'doc': 'The service account which created the instance.'}),
3552
+
3553
+ ('owner', ('inet:service:account', {}), {
3554
+ 'doc': 'The service account which owns the instance.'}),
3555
+ )),
3556
+
3557
+ ('inet:service:account', {}, (
3558
+
3559
+ ('id', ('str', {'strip': True}), {
3560
+ 'doc': 'A platform specific ID used to identify the account.'}),
3561
+
3562
+ ('user', ('inet:user', {}), {
3563
+ 'doc': 'The current user name of the account.'}),
3564
+
3565
+ ('email', ('inet:email', {}), {
3566
+ 'doc': 'The current email address associated with the account.'}),
3567
+
3568
+ ('profile', ('ps:contact', {}), {
3569
+ 'doc': 'Current profile details associated with the account.'}),
3570
+ )),
3571
+
3572
+ ('inet:service:group', {}, ( # inet:service:object
3573
+
3574
+ ('id', ('str', {'strip': True}), {
3575
+ 'doc': 'A platform specific ID used to identify the group.'}),
3576
+
3577
+ ('name', ('inet:group', {}), {
3578
+ 'doc': 'The name of the group on this platform.'}),
3579
+
3580
+ ('profile', ('ps:contact', {}), {
3581
+ 'doc': 'Current detailed contact information for this group.'}),
3582
+ )),
3583
+
3584
+ ('inet:service:group:member', {}, (
3585
+
3586
+ ('account', ('inet:service:account', {}), {
3587
+ 'doc': 'The account that is a member of the group.'}),
3588
+
3589
+ ('group', ('inet:service:group', {}), {
3590
+ 'doc': 'The group that the account is a member of.'}),
3591
+
3592
+ ('period', ('ival', {}), {
3593
+ 'doc': 'The time period when the account was a member of the group.'}),
3594
+ )),
3595
+
3596
+ ('inet:service:permission:type:taxonomy', {}, ()),
3597
+
3598
+ ('inet:service:permission', {}, (
3599
+
3600
+ ('name', ('str', {'onespace': True, 'lower': True}), {
3601
+ 'doc': 'The name of the permission.'}),
3602
+
3603
+ ('type', ('inet:service:permission:type:taxonomy', {}), {
3604
+ 'doc': 'The type of permission.'}),
3605
+
3606
+ )),
3607
+
3608
+ ('inet:service:rule', {}, (
3609
+
3610
+ ('permission', ('inet:service:permission', {}), {
3611
+ 'doc': 'The permission which is granted.'}),
3612
+
3613
+ ('denied', ('bool', {}), {
3614
+ 'doc': 'Set to (true) to denote that the rule is an explicit deny.'}),
3615
+
3616
+ ('object', ('ndef', {'interface': 'inet:service:object'}), {
3617
+ 'doc': 'The object that the permission controls access to.'}),
3618
+
3619
+ ('grantee', ('ndef', {'forms': ('inet:service:account', 'inet:service:group')}), {
3620
+ 'doc': 'The user or role which is granted the permission.'}),
3621
+ )),
3622
+
3623
+ ('inet:service:session', {}, (
3624
+
3625
+ ('id', ('str', {'strip': True}), {
3626
+ 'doc': 'The service specific session id.'}),
3627
+
3628
+ ('creator', ('inet:service:account', {}), {
3629
+ 'doc': 'The account which authenticated to create the session.'}),
3630
+
3631
+ ('period', ('ival', {}), {
3632
+ 'doc': 'The period where the session was valid.'}),
3633
+ )),
3634
+
3635
+ ('inet:service:login', {}, (
3636
+
3637
+ ('method', ('inet:service:login:method:taxonomy', {}), {
3638
+ 'doc': 'The type of authentication used for the login. For example "password" or "multifactor.sms".'}),
3639
+
3640
+ # TODO ndef based auth proto details
3641
+ )),
3642
+
3643
+ ('inet:service:message', {}, (
3644
+
3645
+ ('account', ('inet:service:account', {}), {
3646
+ 'doc': 'The account which sent the message.'}),
3647
+
3648
+ ('to', ('inet:service:account', {}), {
3649
+ 'doc': 'The destination account. Used for direct messages.'}),
3650
+
3651
+ ('url', ('inet:url', {}), {
3652
+ 'doc': 'The URL where the message may be viewed.'}),
3653
+
3654
+ ('group', ('inet:service:group', {}), {
3655
+ 'doc': 'The group that the message was sent to.'}),
3656
+
3657
+ ('channel', ('inet:service:channel', {}), {
3658
+ 'doc': 'The channel that the message was sent to.'}),
3659
+
3660
+ ('public', ('bool', {}), {
3661
+ 'doc': 'Set to true if the message is publicly visible.'}),
3662
+
3663
+ ('text', ('str', {}), {
3664
+ 'disp': {'hint': 'text'},
3665
+ 'doc': 'The text body of the message.'}),
3666
+
3667
+ ('status', ('inet:service:object:status', {}), {
3668
+ 'doc': 'The message status.'}),
3669
+
3670
+ ('replyto', ('inet:service:message', {}), {
3671
+ 'doc': 'The message that this message was sent in reply to. Used for message threading.'}),
3672
+
3673
+ ('links', ('array', {'type': 'inet:service:message:link', 'uniq': True, 'sorted': True}), {
3674
+ 'doc': 'An array of links contained within the message.'}),
3675
+
3676
+ ('attachments', ('array', {'type': 'inet:service:message:attachment', 'uniq': True, 'sorted': True}), {
3677
+ 'doc': 'An array of files attached to the message.'}),
3678
+
3679
+ ('place', ('geo:place', {}), {
3680
+ 'doc': 'The place that the message was sent from.'}),
3681
+
3682
+ ('place:name', ('geo:name', {}), {
3683
+ 'doc': 'The name of the place that the message was sent from.'}),
3684
+
3685
+ ('client:address', ('inet:client', {}), {
3686
+ 'doc': 'The client address that the message was sent from.'}),
3687
+
3688
+ ('client:software', ('it:prod:softver', {}), {
3689
+ 'doc': 'The client software version used to send the message.'}),
3690
+
3691
+ ('client:software:name', ('it:prod:softname', {}), {
3692
+ 'doc': 'The name of the client software used to send the message.'}),
3693
+
3694
+ ('file', ('file:bytes', {}), {
3695
+ 'doc': 'The raw file that the message was extracted from.'}),
3696
+ )),
3697
+
3698
+ ('inet:service:message:link', {}, (
3699
+
3700
+ ('title', ('str', {'strip': True}), {
3701
+ 'doc': 'The title text for the link.'}),
3702
+
3703
+ ('url', ('inet:url', {}), {
3704
+ 'doc': 'The URL which was attached to the message.'}),
3705
+ )),
3706
+
3707
+ ('inet:service:message:attachment', {}, (
3708
+
3709
+ ('name', ('file:path', {}), {
3710
+ 'doc': 'The name of the attached file.'}),
3711
+
3712
+ ('text', ('str', {}), {
3713
+ 'doc': 'Any text associated with the file such as alt-text for images.'}),
3714
+
3715
+ ('file', ('file:bytes', {}), {
3716
+ 'doc': 'The file which was attached to the message.'}),
3717
+ )),
3718
+
3719
+ ('inet:service:channel', {}, (
3720
+
3721
+ ('name', ('str', {'onespace': True, 'lower': True}), {
3722
+ 'doc': 'The name of the channel.'}),
3723
+
3724
+ ('period', ('ival', {}), {
3725
+ 'doc': 'The time period where the channel was available.'}),
3726
+ )),
3727
+
3728
+ ('inet:service:channel:member', {}, (
3729
+
3730
+ ('channel', ('inet:service:channel', {}), {
3731
+ 'doc': 'The channel that the account was a member of.'}),
3732
+
3733
+ ('account', ('inet:service:account', {}), {
3734
+ 'doc': 'The account that was a member of the channel.'}),
3735
+
3736
+ ('period', ('ival', {}), {
3737
+ 'doc': 'The time period where the account was a member of the channel.'}),
3738
+ )),
3739
+
3740
+ ('inet:service:resource:type:taxonomy', {}, {}),
3741
+ ('inet:service:resource', {}, (
3742
+
3743
+ ('name', ('str', {'onespace': True, 'lower': True}), {
3744
+ 'doc': 'The name of the service resource.'}),
3745
+
3746
+ ('desc', ('str', {}), {
3747
+ 'disp': {'hint': 'text'},
3748
+ 'doc': 'A description of the service resource.'}),
3749
+
3750
+ ('url', ('inet:url', {}), {
3751
+ 'doc': 'The primary URL where the resource is available from the service.'}),
3752
+
3753
+ ('type', ('inet:service:resource:type:taxonomy', {}), {
3754
+ 'doc': 'The resource type. For example "rpc.endpoint".'}),
3755
+ )),
3756
+
3757
+ ('inet:service:bucket', {}, (
3758
+
3759
+ ('name', ('str', {'onespace': True, 'lower': True}), {
3760
+ 'doc': 'The name of the service resource.'}),
3761
+ )),
3762
+
3763
+ ('inet:service:bucket:item', {}, (
3764
+
3765
+ ('bucket', ('inet:service:bucket', {}), {
3766
+ 'doc': 'The bucket which contains the item.'}),
3767
+
3768
+ ('file', ('file:bytes', {}), {
3769
+ 'doc': 'The bytes stored within the bucket item.'}),
3770
+
3771
+ ('file:name', ('file:path', {}), {
3772
+ 'doc': 'The name of the file stored in the bucket item.'}),
3773
+ )),
3774
+
3775
+ ('inet:service:access', {}, (
3776
+
3777
+ ('resource', ('inet:service:resource', {}), {
3778
+ 'doc': 'The resource which the account attempted to access.'}),
3779
+
3780
+ ('type', ('int', {'enums': svcaccesstypes}), {
3781
+ 'doc': 'The type of access requested.'}),
3782
+ )),
3313
3783
  ),
3314
3784
  }),
3315
3785
  )