amsdal_crm 0.2.0__py3-none-any.whl → 0.2.1__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.
amsdal_crm/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.2.0'
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,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
@@ -1,5 +1,5 @@
1
1
  amsdal_crm/Third-Party Materials - AMSDAL Dependencies - License Notices.md,sha256=ML7PqsHrTMNNZn8E_rA-LzDCAafMSxMcrmSg8YOi-wo,113896
2
- amsdal_crm/__about__.py,sha256=FVHPBGkfhbQDi_z3v0PiKJrXXqXOx0vGW_1VaqNJi7U,22
2
+ amsdal_crm/__about__.py,sha256=PmcQ2PI2oP8irnLtJLJby2YfW6sBvLAmL-VpABzTqwc,22
3
3
  amsdal_crm/__init__.py,sha256=b4wxJYesA5Ctk1IrAvlw64i_0EU3SiK1Tw6sUYakd18,303
4
4
  amsdal_crm/app.py,sha256=JLvueh_2KURQLDWMQlq4Z6gAFsqBDTRf6pK095ehp14,1373
5
5
  amsdal_crm/constants.py,sha256=5Ga7q9zEKcQZnAoKv_SE_7w8WxvhPFkM9gY9NruOEaA,347
@@ -10,13 +10,13 @@ amsdal_crm/fixtures/permissions.py,sha256=TQEY_zX60GSudSZqmonaYqWCaod6oBsQw1NQPu
10
10
  amsdal_crm/fixtures/pipelines.py,sha256=ZCLmgrA700Sl7Oy7l4IQ8FbIbC1378OkcJTrZe5701o,2064
11
11
  amsdal_crm/lifecycle/__init__.py,sha256=B8nw19lEIr7U15Lnu6jh7yzZwF9LWWh4-p3X63sAicQ,31
12
12
  amsdal_crm/lifecycle/consumer.py,sha256=owS9kXKPs3Lzy7RiN_jI6hHEO6c90Tf-DT6aNqQ3uj4,8893
13
- amsdal_crm/migrations/0000_initial.py,sha256=4V7_TeFUwvTRyLMm9QFHyuab-kiMuOlQZCA3hkO_YLg,51543
13
+ amsdal_crm/migrations/0000_initial.py,sha256=nWiMoc1S_--qXIW0WXwbFjKS3S6klfHgS4MYseVsuGE,63474
14
14
  amsdal_crm/models/__init__.py,sha256=3c-gqBkw2PXg4rp_wH2EN6viRu7Ff926Etn_BkQa5RU,18
15
15
  amsdal_crm/models/activity.py,sha256=Hwy_Z_zhk96yopTcm4vU4-SZbPg152r7N9er96Jkdho,4732
16
16
  amsdal_crm/models/attachment.py,sha256=B-6IuPrF6-VDnsFz_Q4UCh09YcFMs4o4zyT4VpvLe3U,1513
17
17
  amsdal_crm/models/custom_field_definition.py,sha256=0IIWcetZ0vXT8lPRGahyt7phoNKuCq2MQO6C8wEGk4Q,1749
18
18
  amsdal_crm/models/deal.py,sha256=xmJOCE_fvY6asnOp2_eeWLW3clSiS-MoV9Bm-1gtEF0,6583
19
- amsdal_crm/models/entity.py,sha256=YH7qhoAndTYzo-x7faZkqgYpoHmXzUk0seORRngK3ww,12568
19
+ amsdal_crm/models/entity.py,sha256=VTE7inPvViGZbJi6vTKB9O-O19TCyK7ub0zF_wpSdyg,12824
20
20
  amsdal_crm/models/pipeline.py,sha256=DXJh5MbCCRctEHhDfxef5RxFWSKN0D4v6UK75q5ssL8,925
21
21
  amsdal_crm/models/stage.py,sha256=57rhfA4Oib8DKjDifWQe3EFxh-Auww3_PgOPfj4-L0E,1666
22
22
  amsdal_crm/models/workflow_rule.py,sha256=g-vAdJHKyA1PsiB3vPhd474Uvq94USHz35W1c5XyrAQ,1535
@@ -26,6 +26,6 @@ amsdal_crm/services/custom_field_service.py,sha256=r2dr2gijTbi9r56XV64bSArx0jTGw
26
26
  amsdal_crm/services/deal_service.py,sha256=PTxCQy6YqMyrtL4sRhyCU09V6OemrmZ405sQk-eBUlA,4803
27
27
  amsdal_crm/services/email_service.py,sha256=L9o-WaOET0tjo9g-zzC8GGCtfDZVheziHM_ob10jO2M,3518
28
28
  amsdal_crm/services/workflow_service.py,sha256=7m_vbk9FL_FCy9KS9LM4ueztO9ZsLwbvubdo9NA345g,7020
29
- amsdal_crm-0.2.0.dist-info/METADATA,sha256=tfgcmbT3KQyuqgaSldO2AYeRb8nhFDuISTFtHE0k7kA,1596
30
- amsdal_crm-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
31
- amsdal_crm-0.2.0.dist-info/RECORD,,
29
+ amsdal_crm-0.2.1.dist-info/METADATA,sha256=VULaunY-6kM7g_jGLMyUWJK3iy36pjkpk-BLYo6vcN4,1596
30
+ amsdal_crm-0.2.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
31
+ amsdal_crm-0.2.1.dist-info/RECORD,,