amsdal_crm 0.2.0__tar.gz → 0.2.1__tar.gz

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 (73) hide show
  1. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/PKG-INFO +1 -1
  2. amsdal_crm-0.2.1/amsdal_crm/__about__.py +1 -0
  3. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/migrations/0000_initial.py +117 -0
  4. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/entity.py +8 -0
  5. amsdal_crm-0.2.0/amsdal_crm/__about__.py +0 -1
  6. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/.amsdal/.environment +0 -0
  7. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/.amsdal-cli +0 -0
  8. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/.github/workflows/ci.yml +0 -0
  9. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/.github/workflows/release.yml +0 -0
  10. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/.github/workflows/tag_check.yml +0 -0
  11. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/.gitignore +0 -0
  12. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/CLAUDE.md +0 -0
  13. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/README.md +0 -0
  14. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/RELEASE.md +0 -0
  15. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/Third-Party Materials - AMSDAL Dependencies - License Notices.md +0 -0
  16. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/__init__.py +0 -0
  17. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/app.py +0 -0
  18. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/constants.py +0 -0
  19. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/errors.py +0 -0
  20. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/fixtures/__init__.py +0 -0
  21. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/fixtures/permissions.py +0 -0
  22. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/fixtures/pipelines.py +0 -0
  23. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/lifecycle/__init__.py +0 -0
  24. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/lifecycle/consumer.py +0 -0
  25. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/__init__.py +0 -0
  26. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/activity.py +0 -0
  27. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/attachment.py +0 -0
  28. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/custom_field_definition.py +0 -0
  29. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/deal.py +0 -0
  30. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/pipeline.py +0 -0
  31. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/stage.py +0 -0
  32. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/models/workflow_rule.py +0 -0
  33. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/services/__init__.py +0 -0
  34. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/services/activity_service.py +0 -0
  35. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/services/custom_field_service.py +0 -0
  36. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/services/deal_service.py +0 -0
  37. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/services/email_service.py +0 -0
  38. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/services/workflow_service.py +0 -0
  39. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/amsdal_crm/settings.py +0 -0
  40. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/config.yml +0 -0
  41. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/license_check.py +0 -0
  42. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/pyproject.toml +0 -0
  43. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/scripts/release.sh +0 -0
  44. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/scripts/tag_check.sh +0 -0
  45. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/conftest.py +0 -0
  46. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/integration/__init__.py +0 -0
  47. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/integration/conftest.py +0 -0
  48. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/integration/services/__init__.py +0 -0
  49. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/integration/services/test_deal_service.py +0 -0
  50. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/integration/services/test_email_service.py +0 -0
  51. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/integration/services/test_workflow_service.py +0 -0
  52. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/__init__.py +0 -0
  53. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/conftest.py +0 -0
  54. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/lifecycle/__init__.py +0 -0
  55. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/lifecycle/test_consumer.py +0 -0
  56. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/models/__init__.py +0 -0
  57. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/models/test_activity.py +0 -0
  58. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/models/test_deal.py +0 -0
  59. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/models/test_entity.py +0 -0
  60. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/models/test_pipeline.py +0 -0
  61. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/models/test_remaining.py +0 -0
  62. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/models/test_stage.py +0 -0
  63. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/services/__init__.py +0 -0
  64. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/services/test_activity_service.py +0 -0
  65. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/services/test_custom_field_service.py +0 -0
  66. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/services/test_deal_service.py +0 -0
  67. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/services/test_email_service.py +0 -0
  68. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/services/test_workflow_service.py +0 -0
  69. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/test_app.py +0 -0
  70. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/test_constants.py +0 -0
  71. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/test_errors.py +0 -0
  72. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/tests/unit/test_settings.py +0 -0
  73. {amsdal_crm-0.2.0 → amsdal_crm-0.2.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amsdal_crm
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: amsdal-crm plugin for AMSDAL Framework
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: aiohttp==3.12.15
@@ -0,0 +1 @@
1
+ __version__ = '0.2.1'
@@ -92,6 +92,31 @@ class Migration(migrations.Migration):
92
92
  "description": "Entity (Person/Organization/Trust) model.\n\nRepresents a company or organization in the CRM system.\nOwned by individual users with permission controls.",
93
93
  },
94
94
  ),
95
+ migrations.CreateClass(
96
+ module_type=ModuleType.CONTRIB,
97
+ class_name="EntityAddress",
98
+ new_schema={
99
+ "title": "EntityAddress",
100
+ "properties": {
101
+ "created_at": {"type": "datetime", "title": "Created At", "format": "date-time"},
102
+ "updated_at": {"type": "datetime", "title": "Updated At", "format": "date-time"},
103
+ "line1": {"type": "string", "title": "Address Line 1"},
104
+ "line2": {"type": "string", "title": "Address Line 2"},
105
+ "city": {"type": "string", "title": "City"},
106
+ "region": {"type": "string", "title": "Region/State"},
107
+ "postal_code": {"type": "string", "title": "Postal Code"},
108
+ "country": {"type": "string", "title": "Country"},
109
+ "is_primary": {"type": "boolean", "default": False, "title": "Is Primary"},
110
+ },
111
+ "custom_code": 'async def apre_create(self) -> None:\n """Async hook called before creating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = await CustomFieldService.avalidate_custom_fields(\'EntityAddress\', self.custom_fields)\n await super().apre_create()\n\nasync def apre_update(self) -> None:\n """Async hook called before updating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = await CustomFieldService.avalidate_custom_fields(\'EntityAddress\', self.custom_fields)\n await super().apre_update()\n\ndef pre_create(self) -> None:\n """Hook called before creating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = CustomFieldService.validate_custom_fields(\'EntityAddress\', self.custom_fields)\n super().pre_create()\n\ndef pre_update(self) -> None:\n """Hook called before updating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = CustomFieldService.validate_custom_fields(\'EntityAddress\', self.custom_fields)\n super().pre_update()',
112
+ "storage_metadata": {
113
+ "table_name": "EntityAddress",
114
+ "db_fields": {},
115
+ "primary_key": ["partition_key"],
116
+ "foreign_keys": {},
117
+ },
118
+ },
119
+ ),
95
120
  migrations.CreateClass(
96
121
  module_type=ModuleType.CONTRIB,
97
122
  class_name="Pipeline",
@@ -338,6 +363,98 @@ class Migration(migrations.Migration):
338
363
  "description": "Task activity with priority and status.",
339
364
  },
340
365
  ),
366
+ migrations.CreateClass(
367
+ module_type=ModuleType.CONTRIB,
368
+ class_name="EntityContactPoint",
369
+ new_schema={
370
+ "title": "EntityContactPoint",
371
+ "required": ["value", "entity"],
372
+ "properties": {
373
+ "created_at": {"type": "datetime", "title": "Created At", "format": "date-time"},
374
+ "updated_at": {"type": "datetime", "title": "Updated At", "format": "date-time"},
375
+ "value": {"type": "string", "title": "Contact Point Value"},
376
+ "is_primary": {"type": "boolean", "default": False, "title": "Is Primary"},
377
+ "can_contact": {"type": "boolean", "default": True, "title": "Can Contact"},
378
+ "entity": {
379
+ "type": "Entity",
380
+ "title": "Entity",
381
+ "description": "Entity (Person/Organization/Trust) model.\n\nRepresents a company or organization in the CRM system.\nOwned by individual users with permission controls.",
382
+ },
383
+ },
384
+ "custom_code": 'async def apre_create(self) -> None:\n """Async hook called before creating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = await CustomFieldService.avalidate_custom_fields(\'EntityContactPoint\', self.custom_fields)\n await super().apre_create()\n\nasync def apre_update(self) -> None:\n """Async hook called before updating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = await CustomFieldService.avalidate_custom_fields(\'EntityContactPoint\', self.custom_fields)\n await super().apre_update()\n\ndef pre_create(self) -> None:\n """Hook called before creating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = CustomFieldService.validate_custom_fields(\'EntityContactPoint\', self.custom_fields)\n super().pre_create()\n\ndef pre_update(self) -> None:\n """Hook called before updating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = CustomFieldService.validate_custom_fields(\'EntityContactPoint\', self.custom_fields)\n super().pre_update()',
385
+ "storage_metadata": {
386
+ "table_name": "EntityContactPoint",
387
+ "db_fields": {"entity": ["entity_partition_key"]},
388
+ "primary_key": ["partition_key"],
389
+ "foreign_keys": {"entity": [{"entity_partition_key": "string"}, "Entity", ["partition_key"]]},
390
+ },
391
+ },
392
+ ),
393
+ migrations.CreateClass(
394
+ module_type=ModuleType.CONTRIB,
395
+ class_name="EntityIdentifier",
396
+ new_schema={
397
+ "title": "EntityIdentifier",
398
+ "required": ["value", "entity"],
399
+ "properties": {
400
+ "created_at": {"type": "datetime", "title": "Created At", "format": "date-time"},
401
+ "updated_at": {"type": "datetime", "title": "Updated At", "format": "date-time"},
402
+ "value": {"type": "string", "title": "Identifier Value"},
403
+ "country": {"type": "string", "title": "Country"},
404
+ "is_primary": {"type": "boolean", "default": False, "title": "Is Primary"},
405
+ "entity": {
406
+ "type": "Entity",
407
+ "title": "Entity",
408
+ "description": "Entity (Person/Organization/Trust) model.\n\nRepresents a company or organization in the CRM system.\nOwned by individual users with permission controls.",
409
+ },
410
+ },
411
+ "custom_code": 'async def apre_create(self) -> None:\n """Async hook called before creating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = await CustomFieldService.avalidate_custom_fields(\'EntityIdentifier\', self.custom_fields)\n await super().apre_create()\n\nasync def apre_update(self) -> None:\n """Async hook called before updating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = await CustomFieldService.avalidate_custom_fields(\'EntityIdentifier\', self.custom_fields)\n await super().apre_update()\n\ndef pre_create(self) -> None:\n """Hook called before creating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = CustomFieldService.validate_custom_fields(\'EntityIdentifier\', self.custom_fields)\n super().pre_create()\n\ndef pre_update(self) -> None:\n """Hook called before updating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = CustomFieldService.validate_custom_fields(\'EntityIdentifier\', self.custom_fields)\n super().pre_update()',
412
+ "storage_metadata": {
413
+ "table_name": "EntityIdentifier",
414
+ "db_fields": {"entity": ["entity_partition_key"]},
415
+ "primary_key": ["partition_key"],
416
+ "foreign_keys": {"entity": [{"entity_partition_key": "string"}, "Entity", ["partition_key"]]},
417
+ },
418
+ },
419
+ ),
420
+ migrations.CreateClass(
421
+ module_type=ModuleType.CONTRIB,
422
+ class_name="EntityRelationship",
423
+ new_schema={
424
+ "title": "EntityRelationship",
425
+ "required": ["from_entity", "to_entity"],
426
+ "properties": {
427
+ "created_at": {"type": "datetime", "title": "Created At", "format": "date-time"},
428
+ "updated_at": {"type": "datetime", "title": "Updated At", "format": "date-time"},
429
+ "start_date": {"type": "string", "title": "Start Date"},
430
+ "end_date": {"type": "string", "title": "End Date"},
431
+ "relationship_group_name": {"type": "string", "title": "Relationship Group Name"},
432
+ "from_entity": {
433
+ "type": "Entity",
434
+ "title": "From Entity",
435
+ "description": "Entity (Person/Organization/Trust) model.\n\nRepresents a company or organization in the CRM system.\nOwned by individual users with permission controls.",
436
+ },
437
+ "to_entity": {
438
+ "type": "Entity",
439
+ "title": "To Entity",
440
+ "description": "Entity (Person/Organization/Trust) model.\n\nRepresents a company or organization in the CRM system.\nOwned by individual users with permission controls.",
441
+ },
442
+ },
443
+ "custom_code": 'async def apre_create(self) -> None:\n """Async hook called before creating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = await CustomFieldService.avalidate_custom_fields(\'EntityRelationship\', self.custom_fields)\n await super().apre_create()\n\nasync def apre_update(self) -> None:\n """Async hook called before updating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = await CustomFieldService.avalidate_custom_fields(\'EntityRelationship\', self.custom_fields)\n await super().apre_update()\n\ndef pre_create(self) -> None:\n """Hook called before creating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = CustomFieldService.validate_custom_fields(\'EntityRelationship\', self.custom_fields)\n super().pre_create()\n\ndef pre_update(self) -> None:\n """Hook called before updating account."""\n if self.custom_fields:\n from amsdal_crm.services.custom_field_service import CustomFieldService\n self.custom_fields = CustomFieldService.validate_custom_fields(\'EntityRelationship\', self.custom_fields)\n super().pre_update()',
444
+ "storage_metadata": {
445
+ "table_name": "EntityRelationship",
446
+ "db_fields": {
447
+ "from_entity": ["from_entity_partition_key"],
448
+ "to_entity": ["to_entity_partition_key"],
449
+ },
450
+ "primary_key": ["partition_key"],
451
+ "foreign_keys": {
452
+ "from_entity": [{"from_entity_partition_key": "string"}, "Entity", ["partition_key"]],
453
+ "to_entity": [{"to_entity_partition_key": "string"}, "Entity", ["partition_key"]],
454
+ },
455
+ },
456
+ },
457
+ ),
341
458
  migrations.CreateClass(
342
459
  module_type=ModuleType.CONTRIB,
343
460
  class_name="Stage",
@@ -117,6 +117,8 @@ class Entity(TimestampMixin, Model):
117
117
 
118
118
 
119
119
  class EntityRelationship(TimestampMixin, Model):
120
+ __module_type__: ClassVar[ModuleType] = ModuleType.CONTRIB
121
+
120
122
  from_entity: Entity = Field(title='From Entity')
121
123
  to_entity: Entity = Field(title='To Entity')
122
124
  start_date: str | None = Field(default=None, title='Start Date')
@@ -167,6 +169,8 @@ class EntityRelationship(TimestampMixin, Model):
167
169
 
168
170
 
169
171
  class EntityIdentifier(TimestampMixin, Model):
172
+ __module_type__: ClassVar[ModuleType] = ModuleType.CONTRIB
173
+
170
174
  entity: Entity = Field(title='Entity')
171
175
  value: str = Field(title='Identifier Value')
172
176
  country: str | None = Field(default=None, title='Country')
@@ -218,6 +222,8 @@ class EntityIdentifier(TimestampMixin, Model):
218
222
 
219
223
 
220
224
  class EntityContactPoint(TimestampMixin, Model):
225
+ __module_type__: ClassVar[ModuleType] = ModuleType.CONTRIB
226
+
221
227
  entity: Entity = Field(title='Entity')
222
228
  value: str = Field(title='Contact Point Value')
223
229
 
@@ -269,6 +275,8 @@ class EntityContactPoint(TimestampMixin, Model):
269
275
 
270
276
 
271
277
  class EntityAddress(TimestampMixin, Model):
278
+ __module_type__: ClassVar[ModuleType] = ModuleType.CONTRIB
279
+
272
280
  line1: str | None = Field(title='Address Line 1')
273
281
  line2: str | None = Field(default=None, title='Address Line 2')
274
282
  city: str | None = Field(title='City')
@@ -1 +0,0 @@
1
- __version__ = '0.2.0'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes