neurograph-core 1.202510232007__py3-none-any.whl → 1.202510232218__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.
neurograph/v1/__init__.py CHANGED
@@ -61,6 +61,7 @@ __all__ = [
61
61
  "ClientGetManyResponse",
62
62
  "ClientInfo",
63
63
  "ClientKpi",
64
+ "ClientMatchCriteriaRowInDb",
64
65
  "ClientMetadata",
65
66
  "ClientMetadataRequest",
66
67
  "ClientMetadataResponse",
@@ -179,6 +180,7 @@ __all__ = [
179
180
  "PersonasFactorCreateRequest",
180
181
  "PersonasFactorCreateResponse",
181
182
  "PersonasFactorRow",
183
+ "PersonasGetPersonaInstanceResponse",
182
184
  "PersonasInsightCreateRequest",
183
185
  "PersonasInsightCreateResponse",
184
186
  "PersonasInstanceCreateRequest",
@@ -270,6 +272,7 @@ from neurograph.v1.models.client_get_detail_response import ClientGetDetailRespo
270
272
  from neurograph.v1.models.client_get_many_response import ClientGetManyResponse as ClientGetManyResponse
271
273
  from neurograph.v1.models.client_info import ClientInfo as ClientInfo
272
274
  from neurograph.v1.models.client_kpi import ClientKpi as ClientKpi
275
+ from neurograph.v1.models.client_match_criteria_row_in_db import ClientMatchCriteriaRowInDb as ClientMatchCriteriaRowInDb
273
276
  from neurograph.v1.models.client_metadata import ClientMetadata as ClientMetadata
274
277
  from neurograph.v1.models.client_metadata_request import ClientMetadataRequest as ClientMetadataRequest
275
278
  from neurograph.v1.models.client_metadata_response import ClientMetadataResponse as ClientMetadataResponse
@@ -388,6 +391,7 @@ from neurograph.v1.models.organizations_workbench_config import OrganizationsWor
388
391
  from neurograph.v1.models.personas_factor_create_request import PersonasFactorCreateRequest as PersonasFactorCreateRequest
389
392
  from neurograph.v1.models.personas_factor_create_response import PersonasFactorCreateResponse as PersonasFactorCreateResponse
390
393
  from neurograph.v1.models.personas_factor_row import PersonasFactorRow as PersonasFactorRow
394
+ from neurograph.v1.models.personas_get_persona_instance_response import PersonasGetPersonaInstanceResponse as PersonasGetPersonaInstanceResponse
391
395
  from neurograph.v1.models.personas_insight_create_request import PersonasInsightCreateRequest as PersonasInsightCreateRequest
392
396
  from neurograph.v1.models.personas_insight_create_response import PersonasInsightCreateResponse as PersonasInsightCreateResponse
393
397
  from neurograph.v1.models.personas_instance_create_request import PersonasInstanceCreateRequest as PersonasInstanceCreateRequest
@@ -21,6 +21,7 @@ from typing import Optional
21
21
  from typing_extensions import Annotated
22
22
  from neurograph.v1.models.personas_factor_create_request import PersonasFactorCreateRequest
23
23
  from neurograph.v1.models.personas_factor_create_response import PersonasFactorCreateResponse
24
+ from neurograph.v1.models.personas_get_persona_instance_response import PersonasGetPersonaInstanceResponse
24
25
  from neurograph.v1.models.personas_insight_create_request import PersonasInsightCreateRequest
25
26
  from neurograph.v1.models.personas_insight_create_response import PersonasInsightCreateResponse
26
27
  from neurograph.v1.models.personas_instance_create_request import PersonasInstanceCreateRequest
@@ -1145,6 +1146,277 @@ class PersonaApi:
1145
1146
 
1146
1147
 
1147
1148
 
1149
+ @validate_call
1150
+ def api_v1_persona_instance_id_get(
1151
+ self,
1152
+ id: Annotated[StrictStr, Field(description="Persona Instance ID")],
1153
+ _request_timeout: Union[
1154
+ None,
1155
+ Annotated[StrictFloat, Field(gt=0)],
1156
+ Tuple[
1157
+ Annotated[StrictFloat, Field(gt=0)],
1158
+ Annotated[StrictFloat, Field(gt=0)]
1159
+ ]
1160
+ ] = None,
1161
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1162
+ _content_type: Optional[StrictStr] = None,
1163
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1164
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1165
+ ) -> PersonasGetPersonaInstanceResponse:
1166
+ """Get a single Persona Instance and all associated data
1167
+
1168
+ Get a single Persona Instance and all associated data by ID
1169
+
1170
+ :param id: Persona Instance ID (required)
1171
+ :type id: str
1172
+ :param _request_timeout: timeout setting for this request. If one
1173
+ number provided, it will be total request
1174
+ timeout. It can also be a pair (tuple) of
1175
+ (connection, read) timeouts.
1176
+ :type _request_timeout: int, tuple(int, int), optional
1177
+ :param _request_auth: set to override the auth_settings for an a single
1178
+ request; this effectively ignores the
1179
+ authentication in the spec for a single request.
1180
+ :type _request_auth: dict, optional
1181
+ :param _content_type: force content-type for the request.
1182
+ :type _content_type: str, Optional
1183
+ :param _headers: set to override the headers for a single
1184
+ request; this effectively ignores the headers
1185
+ in the spec for a single request.
1186
+ :type _headers: dict, optional
1187
+ :param _host_index: set to override the host_index for a single
1188
+ request; this effectively ignores the host_index
1189
+ in the spec for a single request.
1190
+ :type _host_index: int, optional
1191
+ :return: Returns the result object.
1192
+ """ # noqa: E501
1193
+
1194
+ _param = self._api_v1_persona_instance_id_get_serialize(
1195
+ id=id,
1196
+ _request_auth=_request_auth,
1197
+ _content_type=_content_type,
1198
+ _headers=_headers,
1199
+ _host_index=_host_index
1200
+ )
1201
+
1202
+ _response_types_map: Dict[str, Optional[str]] = {
1203
+ '200': "PersonasGetPersonaInstanceResponse",
1204
+ '400': "PersonasGetPersonaInstanceResponse",
1205
+ '404': "PersonasGetPersonaInstanceResponse",
1206
+ '503': "PersonasGetPersonaInstanceResponse",
1207
+ }
1208
+ response_data = self.api_client.call_api(
1209
+ *_param,
1210
+ _request_timeout=_request_timeout
1211
+ )
1212
+ response_data.read()
1213
+ return self.api_client.response_deserialize(
1214
+ response_data=response_data,
1215
+ response_types_map=_response_types_map,
1216
+ ).data
1217
+
1218
+
1219
+ @validate_call
1220
+ def api_v1_persona_instance_id_get_with_http_info(
1221
+ self,
1222
+ id: Annotated[StrictStr, Field(description="Persona Instance ID")],
1223
+ _request_timeout: Union[
1224
+ None,
1225
+ Annotated[StrictFloat, Field(gt=0)],
1226
+ Tuple[
1227
+ Annotated[StrictFloat, Field(gt=0)],
1228
+ Annotated[StrictFloat, Field(gt=0)]
1229
+ ]
1230
+ ] = None,
1231
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1232
+ _content_type: Optional[StrictStr] = None,
1233
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1234
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1235
+ ) -> ApiResponse[PersonasGetPersonaInstanceResponse]:
1236
+ """Get a single Persona Instance and all associated data
1237
+
1238
+ Get a single Persona Instance and all associated data by ID
1239
+
1240
+ :param id: Persona Instance ID (required)
1241
+ :type id: str
1242
+ :param _request_timeout: timeout setting for this request. If one
1243
+ number provided, it will be total request
1244
+ timeout. It can also be a pair (tuple) of
1245
+ (connection, read) timeouts.
1246
+ :type _request_timeout: int, tuple(int, int), optional
1247
+ :param _request_auth: set to override the auth_settings for an a single
1248
+ request; this effectively ignores the
1249
+ authentication in the spec for a single request.
1250
+ :type _request_auth: dict, optional
1251
+ :param _content_type: force content-type for the request.
1252
+ :type _content_type: str, Optional
1253
+ :param _headers: set to override the headers for a single
1254
+ request; this effectively ignores the headers
1255
+ in the spec for a single request.
1256
+ :type _headers: dict, optional
1257
+ :param _host_index: set to override the host_index for a single
1258
+ request; this effectively ignores the host_index
1259
+ in the spec for a single request.
1260
+ :type _host_index: int, optional
1261
+ :return: Returns the result object.
1262
+ """ # noqa: E501
1263
+
1264
+ _param = self._api_v1_persona_instance_id_get_serialize(
1265
+ id=id,
1266
+ _request_auth=_request_auth,
1267
+ _content_type=_content_type,
1268
+ _headers=_headers,
1269
+ _host_index=_host_index
1270
+ )
1271
+
1272
+ _response_types_map: Dict[str, Optional[str]] = {
1273
+ '200': "PersonasGetPersonaInstanceResponse",
1274
+ '400': "PersonasGetPersonaInstanceResponse",
1275
+ '404': "PersonasGetPersonaInstanceResponse",
1276
+ '503': "PersonasGetPersonaInstanceResponse",
1277
+ }
1278
+ response_data = self.api_client.call_api(
1279
+ *_param,
1280
+ _request_timeout=_request_timeout
1281
+ )
1282
+ response_data.read()
1283
+ return self.api_client.response_deserialize(
1284
+ response_data=response_data,
1285
+ response_types_map=_response_types_map,
1286
+ )
1287
+
1288
+
1289
+ @validate_call
1290
+ def api_v1_persona_instance_id_get_without_preload_content(
1291
+ self,
1292
+ id: Annotated[StrictStr, Field(description="Persona Instance ID")],
1293
+ _request_timeout: Union[
1294
+ None,
1295
+ Annotated[StrictFloat, Field(gt=0)],
1296
+ Tuple[
1297
+ Annotated[StrictFloat, Field(gt=0)],
1298
+ Annotated[StrictFloat, Field(gt=0)]
1299
+ ]
1300
+ ] = None,
1301
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1302
+ _content_type: Optional[StrictStr] = None,
1303
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1304
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1305
+ ) -> RESTResponseType:
1306
+ """Get a single Persona Instance and all associated data
1307
+
1308
+ Get a single Persona Instance and all associated data by ID
1309
+
1310
+ :param id: Persona Instance ID (required)
1311
+ :type id: str
1312
+ :param _request_timeout: timeout setting for this request. If one
1313
+ number provided, it will be total request
1314
+ timeout. It can also be a pair (tuple) of
1315
+ (connection, read) timeouts.
1316
+ :type _request_timeout: int, tuple(int, int), optional
1317
+ :param _request_auth: set to override the auth_settings for an a single
1318
+ request; this effectively ignores the
1319
+ authentication in the spec for a single request.
1320
+ :type _request_auth: dict, optional
1321
+ :param _content_type: force content-type for the request.
1322
+ :type _content_type: str, Optional
1323
+ :param _headers: set to override the headers for a single
1324
+ request; this effectively ignores the headers
1325
+ in the spec for a single request.
1326
+ :type _headers: dict, optional
1327
+ :param _host_index: set to override the host_index for a single
1328
+ request; this effectively ignores the host_index
1329
+ in the spec for a single request.
1330
+ :type _host_index: int, optional
1331
+ :return: Returns the result object.
1332
+ """ # noqa: E501
1333
+
1334
+ _param = self._api_v1_persona_instance_id_get_serialize(
1335
+ id=id,
1336
+ _request_auth=_request_auth,
1337
+ _content_type=_content_type,
1338
+ _headers=_headers,
1339
+ _host_index=_host_index
1340
+ )
1341
+
1342
+ _response_types_map: Dict[str, Optional[str]] = {
1343
+ '200': "PersonasGetPersonaInstanceResponse",
1344
+ '400': "PersonasGetPersonaInstanceResponse",
1345
+ '404': "PersonasGetPersonaInstanceResponse",
1346
+ '503': "PersonasGetPersonaInstanceResponse",
1347
+ }
1348
+ response_data = self.api_client.call_api(
1349
+ *_param,
1350
+ _request_timeout=_request_timeout
1351
+ )
1352
+ return response_data.response
1353
+
1354
+
1355
+ def _api_v1_persona_instance_id_get_serialize(
1356
+ self,
1357
+ id,
1358
+ _request_auth,
1359
+ _content_type,
1360
+ _headers,
1361
+ _host_index,
1362
+ ) -> RequestSerialized:
1363
+
1364
+ _host = None
1365
+
1366
+ _collection_formats: Dict[str, str] = {
1367
+ }
1368
+
1369
+ _path_params: Dict[str, str] = {}
1370
+ _query_params: List[Tuple[str, str]] = []
1371
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1372
+ _form_params: List[Tuple[str, str]] = []
1373
+ _files: Dict[
1374
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1375
+ ] = {}
1376
+ _body_params: Optional[bytes] = None
1377
+
1378
+ # process the path parameters
1379
+ if id is not None:
1380
+ _path_params['id'] = id
1381
+ # process the query parameters
1382
+ # process the header parameters
1383
+ # process the form parameters
1384
+ # process the body parameter
1385
+
1386
+
1387
+ # set the HTTP header `Accept`
1388
+ if 'Accept' not in _header_params:
1389
+ _header_params['Accept'] = self.api_client.select_header_accept(
1390
+ [
1391
+ 'application/json'
1392
+ ]
1393
+ )
1394
+
1395
+
1396
+ # authentication setting
1397
+ _auth_settings: List[str] = [
1398
+ 'TokenAuth',
1399
+ 'ApiKeyAuth'
1400
+ ]
1401
+
1402
+ return self.api_client.param_serialize(
1403
+ method='GET',
1404
+ resource_path='/api/v1/persona/instance/{id}',
1405
+ path_params=_path_params,
1406
+ query_params=_query_params,
1407
+ header_params=_header_params,
1408
+ body=_body_params,
1409
+ post_params=_form_params,
1410
+ files=_files,
1411
+ auth_settings=_auth_settings,
1412
+ collection_formats=_collection_formats,
1413
+ _host=_host,
1414
+ _request_auth=_request_auth
1415
+ )
1416
+
1417
+
1418
+
1419
+
1148
1420
  @validate_call
1149
1421
  def api_v1_persona_instance_post(
1150
1422
  self,
@@ -32,6 +32,7 @@ from neurograph.v1.models.client_get_detail_response import ClientGetDetailRespo
32
32
  from neurograph.v1.models.client_get_many_response import ClientGetManyResponse
33
33
  from neurograph.v1.models.client_info import ClientInfo
34
34
  from neurograph.v1.models.client_kpi import ClientKpi
35
+ from neurograph.v1.models.client_match_criteria_row_in_db import ClientMatchCriteriaRowInDb
35
36
  from neurograph.v1.models.client_metadata import ClientMetadata
36
37
  from neurograph.v1.models.client_metadata_request import ClientMetadataRequest
37
38
  from neurograph.v1.models.client_metadata_response import ClientMetadataResponse
@@ -150,6 +151,7 @@ from neurograph.v1.models.organizations_workbench_config import OrganizationsWor
150
151
  from neurograph.v1.models.personas_factor_create_request import PersonasFactorCreateRequest
151
152
  from neurograph.v1.models.personas_factor_create_response import PersonasFactorCreateResponse
152
153
  from neurograph.v1.models.personas_factor_row import PersonasFactorRow
154
+ from neurograph.v1.models.personas_get_persona_instance_response import PersonasGetPersonaInstanceResponse
153
155
  from neurograph.v1.models.personas_insight_create_request import PersonasInsightCreateRequest
154
156
  from neurograph.v1.models.personas_insight_create_response import PersonasInsightCreateResponse
155
157
  from neurograph.v1.models.personas_instance_create_request import PersonasInstanceCreateRequest
@@ -0,0 +1,97 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Neurograph Core
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ClientMatchCriteriaRowInDb(BaseModel):
26
+ """
27
+ ClientMatchCriteriaRowInDb
28
+ """ # noqa: E501
29
+ concept: Optional[StrictStr] = None
30
+ detail: Optional[StrictStr] = None
31
+ display: Optional[StrictStr] = None
32
+ error: Optional[StrictStr] = None
33
+ id: Optional[StrictInt] = None
34
+ persona_instance_id: Optional[StrictStr] = None
35
+ __properties: ClassVar[List[str]] = ["concept", "detail", "display", "error", "id", "persona_instance_id"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of ClientMatchCriteriaRowInDb from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of ClientMatchCriteriaRowInDb from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "concept": obj.get("concept"),
89
+ "detail": obj.get("detail"),
90
+ "display": obj.get("display"),
91
+ "error": obj.get("error"),
92
+ "id": obj.get("id"),
93
+ "persona_instance_id": obj.get("persona_instance_id")
94
+ })
95
+ return _obj
96
+
97
+
@@ -20,6 +20,7 @@ import json
20
20
  from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional, Union
22
22
  from neurograph.v1.models.client_kpi import ClientKpi
23
+ from neurograph.v1.models.client_match_criteria_row_in_db import ClientMatchCriteriaRowInDb
23
24
  from neurograph.v1.models.client_persona_factor import ClientPersonaFactor
24
25
  from neurograph.v1.models.client_persona_insight import ClientPersonaInsight
25
26
  from neurograph.v1.models.client_persona_personality_trait import ClientPersonaPersonalityTrait
@@ -40,6 +41,7 @@ class ClientPersona(BaseModel):
40
41
  is_active: Optional[StrictBool] = None
41
42
  kpis: Optional[List[ClientKpi]] = None
42
43
  male: Optional[Union[StrictFloat, StrictInt]] = None
44
+ match_criteria: Optional[List[ClientMatchCriteriaRowInDb]] = None
43
45
  metadata: Optional[StrictStr] = None
44
46
  name: Optional[StrictStr] = None
45
47
  persona_seed_id: Optional[StrictStr] = None
@@ -58,7 +60,7 @@ class ClientPersona(BaseModel):
58
60
  ts_created: Optional[StrictInt] = None
59
61
  ts_updated: Optional[StrictInt] = None
60
62
  value: Optional[StrictStr] = None
61
- __properties: ClassVar[List[str]] = ["age", "description", "factors", "female", "id", "income", "insights", "is_active", "kpis", "male", "metadata", "name", "persona_seed_id", "personality_background", "personality_first_name", "personality_img_url", "personality_last_name", "personality_quote", "personality_traits", "personality_video_url", "positioning_statement", "seed_uid", "summary_detail", "summary_headline", "tag", "ts_created", "ts_updated", "value"]
63
+ __properties: ClassVar[List[str]] = ["age", "description", "factors", "female", "id", "income", "insights", "is_active", "kpis", "male", "match_criteria", "metadata", "name", "persona_seed_id", "personality_background", "personality_first_name", "personality_img_url", "personality_last_name", "personality_quote", "personality_traits", "personality_video_url", "positioning_statement", "seed_uid", "summary_detail", "summary_headline", "tag", "ts_created", "ts_updated", "value"]
62
64
 
63
65
  model_config = ConfigDict(
64
66
  populate_by_name=True,
@@ -120,6 +122,13 @@ class ClientPersona(BaseModel):
120
122
  if _item_kpis:
121
123
  _items.append(_item_kpis.to_dict())
122
124
  _dict['kpis'] = _items
125
+ # override the default output from pydantic by calling `to_dict()` of each item in match_criteria (list)
126
+ _items = []
127
+ if self.match_criteria:
128
+ for _item_match_criteria in self.match_criteria:
129
+ if _item_match_criteria:
130
+ _items.append(_item_match_criteria.to_dict())
131
+ _dict['match_criteria'] = _items
123
132
  # override the default output from pydantic by calling `to_dict()` of each item in personality_traits (list)
124
133
  _items = []
125
134
  if self.personality_traits:
@@ -149,6 +158,7 @@ class ClientPersona(BaseModel):
149
158
  "is_active": obj.get("is_active"),
150
159
  "kpis": [ClientKpi.from_dict(_item) for _item in obj["kpis"]] if obj.get("kpis") is not None else None,
151
160
  "male": obj.get("male"),
161
+ "match_criteria": [ClientMatchCriteriaRowInDb.from_dict(_item) for _item in obj["match_criteria"]] if obj.get("match_criteria") is not None else None,
152
162
  "metadata": obj.get("metadata"),
153
163
  "name": obj.get("name"),
154
164
  "persona_seed_id": obj.get("persona_seed_id"),
@@ -0,0 +1,183 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Neurograph Core
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional, Union
22
+ from neurograph.v1.models.personas_kpi import PersonasKpi
23
+ from neurograph.v1.models.personas_match_criteria_row_in_db import PersonasMatchCriteriaRowInDb
24
+ from neurograph.v1.models.personas_persona_factor import PersonasPersonaFactor
25
+ from neurograph.v1.models.personas_persona_insight import PersonasPersonaInsight
26
+ from neurograph.v1.models.personas_persona_personality_trait import PersonasPersonaPersonalityTrait
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+
30
+ class PersonasGetPersonaInstanceResponse(BaseModel):
31
+ """
32
+ PersonasGetPersonaInstanceResponse
33
+ """ # noqa: E501
34
+ age: Optional[Union[StrictFloat, StrictInt]] = None
35
+ description: Optional[StrictStr] = None
36
+ error: Optional[StrictStr] = None
37
+ factors: Optional[List[PersonasPersonaFactor]] = None
38
+ female: Optional[Union[StrictFloat, StrictInt]] = None
39
+ id: Optional[StrictStr] = None
40
+ income: Optional[StrictStr] = None
41
+ insights: Optional[List[PersonasPersonaInsight]] = None
42
+ kpis: Optional[List[PersonasKpi]] = None
43
+ male: Optional[Union[StrictFloat, StrictInt]] = None
44
+ match_criteria: Optional[List[PersonasMatchCriteriaRowInDb]] = None
45
+ metadata: Optional[StrictStr] = None
46
+ name: Optional[StrictStr] = None
47
+ persona_seed_id: Optional[StrictStr] = None
48
+ personality_background: Optional[StrictStr] = None
49
+ personality_first_name: Optional[StrictStr] = None
50
+ personality_img_url: Optional[StrictStr] = None
51
+ personality_last_name: Optional[StrictStr] = None
52
+ personality_quote: Optional[StrictStr] = None
53
+ personality_traits: Optional[List[PersonasPersonaPersonalityTrait]] = None
54
+ personality_video_url: Optional[StrictStr] = None
55
+ positioning_statement: Optional[StrictStr] = None
56
+ seed_uid: Optional[StrictStr] = None
57
+ summary_detail: Optional[StrictStr] = None
58
+ summary_headline: Optional[StrictStr] = None
59
+ tag: Optional[StrictStr] = None
60
+ ts_created: Optional[StrictInt] = None
61
+ ts_updated: Optional[StrictInt] = None
62
+ value: Optional[StrictStr] = None
63
+ __properties: ClassVar[List[str]] = ["age", "description", "error", "factors", "female", "id", "income", "insights", "kpis", "male", "match_criteria", "metadata", "name", "persona_seed_id", "personality_background", "personality_first_name", "personality_img_url", "personality_last_name", "personality_quote", "personality_traits", "personality_video_url", "positioning_statement", "seed_uid", "summary_detail", "summary_headline", "tag", "ts_created", "ts_updated", "value"]
64
+
65
+ model_config = ConfigDict(
66
+ populate_by_name=True,
67
+ validate_assignment=True,
68
+ protected_namespaces=(),
69
+ )
70
+
71
+
72
+ def to_str(self) -> str:
73
+ """Returns the string representation of the model using alias"""
74
+ return pprint.pformat(self.model_dump(by_alias=True))
75
+
76
+ def to_json(self) -> str:
77
+ """Returns the JSON representation of the model using alias"""
78
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
79
+ return json.dumps(self.to_dict())
80
+
81
+ @classmethod
82
+ def from_json(cls, json_str: str) -> Optional[Self]:
83
+ """Create an instance of PersonasGetPersonaInstanceResponse from a JSON string"""
84
+ return cls.from_dict(json.loads(json_str))
85
+
86
+ def to_dict(self) -> Dict[str, Any]:
87
+ """Return the dictionary representation of the model using alias.
88
+
89
+ This has the following differences from calling pydantic's
90
+ `self.model_dump(by_alias=True)`:
91
+
92
+ * `None` is only added to the output dict for nullable fields that
93
+ were set at model initialization. Other fields with value `None`
94
+ are ignored.
95
+ """
96
+ excluded_fields: Set[str] = set([
97
+ ])
98
+
99
+ _dict = self.model_dump(
100
+ by_alias=True,
101
+ exclude=excluded_fields,
102
+ exclude_none=True,
103
+ )
104
+ # override the default output from pydantic by calling `to_dict()` of each item in factors (list)
105
+ _items = []
106
+ if self.factors:
107
+ for _item_factors in self.factors:
108
+ if _item_factors:
109
+ _items.append(_item_factors.to_dict())
110
+ _dict['factors'] = _items
111
+ # override the default output from pydantic by calling `to_dict()` of each item in insights (list)
112
+ _items = []
113
+ if self.insights:
114
+ for _item_insights in self.insights:
115
+ if _item_insights:
116
+ _items.append(_item_insights.to_dict())
117
+ _dict['insights'] = _items
118
+ # override the default output from pydantic by calling `to_dict()` of each item in kpis (list)
119
+ _items = []
120
+ if self.kpis:
121
+ for _item_kpis in self.kpis:
122
+ if _item_kpis:
123
+ _items.append(_item_kpis.to_dict())
124
+ _dict['kpis'] = _items
125
+ # override the default output from pydantic by calling `to_dict()` of each item in match_criteria (list)
126
+ _items = []
127
+ if self.match_criteria:
128
+ for _item_match_criteria in self.match_criteria:
129
+ if _item_match_criteria:
130
+ _items.append(_item_match_criteria.to_dict())
131
+ _dict['match_criteria'] = _items
132
+ # override the default output from pydantic by calling `to_dict()` of each item in personality_traits (list)
133
+ _items = []
134
+ if self.personality_traits:
135
+ for _item_personality_traits in self.personality_traits:
136
+ if _item_personality_traits:
137
+ _items.append(_item_personality_traits.to_dict())
138
+ _dict['personality_traits'] = _items
139
+ return _dict
140
+
141
+ @classmethod
142
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
143
+ """Create an instance of PersonasGetPersonaInstanceResponse from a dict"""
144
+ if obj is None:
145
+ return None
146
+
147
+ if not isinstance(obj, dict):
148
+ return cls.model_validate(obj)
149
+
150
+ _obj = cls.model_validate({
151
+ "age": obj.get("age"),
152
+ "description": obj.get("description"),
153
+ "error": obj.get("error"),
154
+ "factors": [PersonasPersonaFactor.from_dict(_item) for _item in obj["factors"]] if obj.get("factors") is not None else None,
155
+ "female": obj.get("female"),
156
+ "id": obj.get("id"),
157
+ "income": obj.get("income"),
158
+ "insights": [PersonasPersonaInsight.from_dict(_item) for _item in obj["insights"]] if obj.get("insights") is not None else None,
159
+ "kpis": [PersonasKpi.from_dict(_item) for _item in obj["kpis"]] if obj.get("kpis") is not None else None,
160
+ "male": obj.get("male"),
161
+ "match_criteria": [PersonasMatchCriteriaRowInDb.from_dict(_item) for _item in obj["match_criteria"]] if obj.get("match_criteria") is not None else None,
162
+ "metadata": obj.get("metadata"),
163
+ "name": obj.get("name"),
164
+ "persona_seed_id": obj.get("persona_seed_id"),
165
+ "personality_background": obj.get("personality_background"),
166
+ "personality_first_name": obj.get("personality_first_name"),
167
+ "personality_img_url": obj.get("personality_img_url"),
168
+ "personality_last_name": obj.get("personality_last_name"),
169
+ "personality_quote": obj.get("personality_quote"),
170
+ "personality_traits": [PersonasPersonaPersonalityTrait.from_dict(_item) for _item in obj["personality_traits"]] if obj.get("personality_traits") is not None else None,
171
+ "personality_video_url": obj.get("personality_video_url"),
172
+ "positioning_statement": obj.get("positioning_statement"),
173
+ "seed_uid": obj.get("seed_uid"),
174
+ "summary_detail": obj.get("summary_detail"),
175
+ "summary_headline": obj.get("summary_headline"),
176
+ "tag": obj.get("tag"),
177
+ "ts_created": obj.get("ts_created"),
178
+ "ts_updated": obj.get("ts_updated"),
179
+ "value": obj.get("value")
180
+ })
181
+ return _obj
182
+
183
+
@@ -20,6 +20,7 @@ import json
20
20
  from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional, Union
22
22
  from neurograph.v1.models.personas_kpi import PersonasKpi
23
+ from neurograph.v1.models.personas_match_criteria_row_in_db import PersonasMatchCriteriaRowInDb
23
24
  from neurograph.v1.models.personas_persona_factor import PersonasPersonaFactor
24
25
  from neurograph.v1.models.personas_persona_insight import PersonasPersonaInsight
25
26
  from neurograph.v1.models.personas_persona_personality_trait import PersonasPersonaPersonalityTrait
@@ -39,6 +40,7 @@ class PersonasPersona(BaseModel):
39
40
  insights: Optional[List[PersonasPersonaInsight]] = None
40
41
  kpis: Optional[List[PersonasKpi]] = None
41
42
  male: Optional[Union[StrictFloat, StrictInt]] = None
43
+ match_criteria: Optional[List[PersonasMatchCriteriaRowInDb]] = None
42
44
  metadata: Optional[StrictStr] = None
43
45
  name: Optional[StrictStr] = None
44
46
  persona_seed_id: Optional[StrictStr] = None
@@ -57,7 +59,7 @@ class PersonasPersona(BaseModel):
57
59
  ts_created: Optional[StrictInt] = None
58
60
  ts_updated: Optional[StrictInt] = None
59
61
  value: Optional[StrictStr] = None
60
- __properties: ClassVar[List[str]] = ["age", "description", "factors", "female", "id", "income", "insights", "kpis", "male", "metadata", "name", "persona_seed_id", "personality_background", "personality_first_name", "personality_img_url", "personality_last_name", "personality_quote", "personality_traits", "personality_video_url", "positioning_statement", "seed_uid", "summary_detail", "summary_headline", "tag", "ts_created", "ts_updated", "value"]
62
+ __properties: ClassVar[List[str]] = ["age", "description", "factors", "female", "id", "income", "insights", "kpis", "male", "match_criteria", "metadata", "name", "persona_seed_id", "personality_background", "personality_first_name", "personality_img_url", "personality_last_name", "personality_quote", "personality_traits", "personality_video_url", "positioning_statement", "seed_uid", "summary_detail", "summary_headline", "tag", "ts_created", "ts_updated", "value"]
61
63
 
62
64
  model_config = ConfigDict(
63
65
  populate_by_name=True,
@@ -119,6 +121,13 @@ class PersonasPersona(BaseModel):
119
121
  if _item_kpis:
120
122
  _items.append(_item_kpis.to_dict())
121
123
  _dict['kpis'] = _items
124
+ # override the default output from pydantic by calling `to_dict()` of each item in match_criteria (list)
125
+ _items = []
126
+ if self.match_criteria:
127
+ for _item_match_criteria in self.match_criteria:
128
+ if _item_match_criteria:
129
+ _items.append(_item_match_criteria.to_dict())
130
+ _dict['match_criteria'] = _items
122
131
  # override the default output from pydantic by calling `to_dict()` of each item in personality_traits (list)
123
132
  _items = []
124
133
  if self.personality_traits:
@@ -147,6 +156,7 @@ class PersonasPersona(BaseModel):
147
156
  "insights": [PersonasPersonaInsight.from_dict(_item) for _item in obj["insights"]] if obj.get("insights") is not None else None,
148
157
  "kpis": [PersonasKpi.from_dict(_item) for _item in obj["kpis"]] if obj.get("kpis") is not None else None,
149
158
  "male": obj.get("male"),
159
+ "match_criteria": [PersonasMatchCriteriaRowInDb.from_dict(_item) for _item in obj["match_criteria"]] if obj.get("match_criteria") is not None else None,
150
160
  "metadata": obj.get("metadata"),
151
161
  "name": obj.get("name"),
152
162
  "persona_seed_id": obj.get("persona_seed_id"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: neurograph-core
3
- Version: 1.202510232007
3
+ Version: 1.202510232218
4
4
  Summary: Neurograph Core
5
5
  Home-page:
6
6
  Author: Neurograph Development Team
@@ -1,5 +1,5 @@
1
1
  neurograph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- neurograph/v1/__init__.py,sha256=z6Dz_duQ709r8FBGS5lWcotDFPTZHnYudgbc-g1kcMU,28229
2
+ neurograph/v1/__init__.py,sha256=GGdrLbCQuANuO6VOVuVl0imQrNVSN4PuY0wzo5GqN1E,28572
3
3
  neurograph/v1/api_client.py,sha256=DDElXCrEofUsxEKyghe4QzGQABihYiXZ7nQ-NXo0Qbo,27790
4
4
  neurograph/v1/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
5
5
  neurograph/v1/configuration.py,sha256=Z9W6H5lLIHbBY8hJwTw9Zd26kLWVOaoPwnc3daBOIVM,19190
@@ -17,12 +17,12 @@ neurograph/v1/api/knowledge_extract_api.py,sha256=ggHBzFsfXEqaWJgX21jnDNnE4NRwiJ
17
17
  neurograph/v1/api/lookup_api.py,sha256=FF-HYxUi3TweR1P7oQvYGqsYfvZFWst9GCEjcfC9u7k,60659
18
18
  neurograph/v1/api/organization_api.py,sha256=3X0qublErpfx4J1zvPzjzY7S_AxcVi4vkc3APC519d8,77955
19
19
  neurograph/v1/api/organization_metadata_api.py,sha256=PtwuBFSY0FjCAB7fuR710CRkQbtR-xpruX9780hGQxk,34860
20
- neurograph/v1/api/persona_api.py,sha256=5uQJHMz3qo-iFPHZVeEcDe02GkkMvMDI5fCh7Kmqi7g,132658
20
+ neurograph/v1/api/persona_api.py,sha256=wVtRkoPy5lFQRuC_YGMwVRhzDMgvzMbdD_1Mk1Ii7us,143563
21
21
  neurograph/v1/api/reporting_api.py,sha256=EcqzhzFcaZGYtNPmTtXPSHLYL8P7BEiVv2dUQMdnRXU,11505
22
22
  neurograph/v1/api/system_api.py,sha256=IIy_ywuthVoa9e_Mrhf34ZsPemMTFm-3lMxVT6DgaKI,10864
23
23
  neurograph/v1/api/user_api.py,sha256=0Y4xYK1n7WxkfAY8X6umW0y21mFkeKEaEWcLO9ub20o,10366
24
24
  neurograph/v1/api/workbench_api.py,sha256=BMhqbbd_PSZ27br7idOgyZFdxMQ0N7O4fFQq8n_6JVs,34221
25
- neurograph/v1/models/__init__.py,sha256=Z_iL5Hb0q3AILjSLkboh4JUvNlGm7CbMngN2dNsdwiA,15403
25
+ neurograph/v1/models/__init__.py,sha256=YMp92SGm5ry-Ya-McMLjWQjsxxbr0CkRuCYa6gfjfCY,15602
26
26
  neurograph/v1/models/admin_permission_response.py,sha256=RPM3v7iutgJKHnZbVo5ALwqMO8UDc6K0DzHdEoRgubo,2936
27
27
  neurograph/v1/models/admin_set_permission_request.py,sha256=TQUB1ar9h-VmiRNm5cbUMCV5Rr98AXG7aew5BMyHBq0,2753
28
28
  neurograph/v1/models/admin_upsert_user_request.py,sha256=FtnMRtbtg-5rHEFvt62j5K9LhdyIcM1f52BkpLSfQyk,2740
@@ -42,12 +42,13 @@ neurograph/v1/models/client_get_detail_response.py,sha256=3hpf3nLymMF68MjQI1IRTg
42
42
  neurograph/v1/models/client_get_many_response.py,sha256=fgEyp4Yw7QK92u5ldpVESI9OS0mS0enOGuffsJPnNgc,3559
43
43
  neurograph/v1/models/client_info.py,sha256=xwxYunTVHPX3TBDEHEqwZuSDBBwL0SAD_42KqrKMmr8,3069
44
44
  neurograph/v1/models/client_kpi.py,sha256=70J-ig90ZqT9j9-mBe9vqkihYVRvUq4q_hNOaDG0z4A,2798
45
+ neurograph/v1/models/client_match_criteria_row_in_db.py,sha256=Kl7d3-rqw0bFxxs-coHTHYEDdrgDOgehUia5MTLNsKA,3062
45
46
  neurograph/v1/models/client_metadata.py,sha256=dlUXkHQFfTx0PD2KaWJiIbLqqBaCsVbSxcwFIkS_AyQ,2810
46
47
  neurograph/v1/models/client_metadata_request.py,sha256=F6nO2sIRozjIYsZ6pI9gb9vIK6TLbqYPgjkWu2HBiNg,2615
47
48
  neurograph/v1/models/client_metadata_response.py,sha256=kyNOh6RgzfrukOc7i6argnVeAO6122fulUTxZzMB7UI,3987
48
49
  neurograph/v1/models/client_organization_brand.py,sha256=Kr0gpptq1rjITAwrppacHDGNj2cSWTBV7GskzswNAjE,3601
49
50
  neurograph/v1/models/client_organization_detail.py,sha256=V4UdD5vWf1RckuzPWt86X7t2OWuSGU0gVZ7WkWsXdMM,4206
50
- neurograph/v1/models/client_persona.py,sha256=xT0NS9HqkX3Q7grZSC5GJCd5_6bHAxgFsnAIjdIQo34,7751
51
+ neurograph/v1/models/client_persona.py,sha256=fQpO21J6l8TBRjwPFRSjiBG2CivoDToy8Sedxv3JUhg,8472
51
52
  neurograph/v1/models/client_persona_factor.py,sha256=h7x5fkXRXSlyCkIdSE0fHuuDB5uPhfulNNJCFbigUXc,3116
52
53
  neurograph/v1/models/client_persona_insight.py,sha256=yiQHjiYjvdLhzpRJDOWtFgslcvvnLylrqmVuYEGTyA4,2839
53
54
  neurograph/v1/models/client_persona_personality_trait.py,sha256=ac6z3pxe2mpZJbSEjs0uL8JZnViIZ3Idnf0KEqDY5Tg,2888
@@ -160,6 +161,7 @@ neurograph/v1/models/organizations_workbench_config.py,sha256=RbejWgmn-h1taeR9dY
160
161
  neurograph/v1/models/personas_factor_create_request.py,sha256=QgVDKbJna_BDGc5rqHLIUxM607rEfalLxOmOhhzRNlI,3068
161
162
  neurograph/v1/models/personas_factor_create_response.py,sha256=TNMckS_2ouBp643t07KBRQSjTmehshxFytzEfQtk8LY,3127
162
163
  neurograph/v1/models/personas_factor_row.py,sha256=1tXF3fy0YKsGBTJ2o10DdyjhMaBRsnGSm0p38sUlwJI,3194
164
+ neurograph/v1/models/personas_get_persona_instance_response.py,sha256=DwsqjIXfy-4ieygb8RikxgMDMzaTvIXKVYKjBpr6K3w,8567
163
165
  neurograph/v1/models/personas_insight_create_request.py,sha256=uPX2RDGMbexxWpGFixGaUeocim_YAucUN1UEMZGZdCw,2786
164
166
  neurograph/v1/models/personas_insight_create_response.py,sha256=Jantg1PJKhiF_upZ7maKeYN-JFW4Ihlu7lCzOEkb6TE,2956
165
167
  neurograph/v1/models/personas_instance_create_request.py,sha256=I6Pazw0Q_UZVXrNQ6ii6n3bpOXQ4MoT6F4ICKavKiNc,4780
@@ -176,7 +178,7 @@ neurograph/v1/models/personas_match_criteria_request.py,sha256=kWJB_Xt2IJ3BRn6wa
176
178
  neurograph/v1/models/personas_match_criteria_response.py,sha256=KyI_6TXOh7OC3pKc9ceWsgUCCxNyl_yvmQIrDvCo-HM,3178
177
179
  neurograph/v1/models/personas_match_criteria_row_in.py,sha256=bY9UFQtEWS8Vr9Q-KEhSJ2Y-ez2B1XaN7iUpHmirbwc,2891
178
180
  neurograph/v1/models/personas_match_criteria_row_in_db.py,sha256=DtrLejuDCQ72-pb-O7EcaXekqDdnotUlufdwTMc4Y20,3070
179
- neurograph/v1/models/personas_persona.py,sha256=vzXxEUpVM-APVL0JV7VMLIo8XhwJfiZozHny16MsAPE,7676
181
+ neurograph/v1/models/personas_persona.py,sha256=q6tULr_OYitIUKchfM-DTZD_xFPYsOcrse_lP9ivzs4,8405
180
182
  neurograph/v1/models/personas_persona_factor.py,sha256=cPFBQ5IHbQlJd6XszSBrKN7OjF_Rz6zXEry-sA83XXE,3124
181
183
  neurograph/v1/models/personas_persona_insight.py,sha256=sOrP0DBt-PzJlaIPASyaYbFBzrwlZppuG2J0cTUSY_s,2847
182
184
  neurograph/v1/models/personas_persona_personality_trait.py,sha256=Pnp0k0wmMvWHo4w4kV4ewAgbMTQjLFe9OPvovX5bCI8,2896
@@ -201,7 +203,7 @@ neurograph/v1/models/workbench_workbench_version.py,sha256=AsgikzRU6BRj99gRFGGTl
201
203
  neurograph/v1/models/workbench_workbench_version_many_response.py,sha256=xuOxnMscyIo8DhsR-yyir1rruExSgNWMu3yMWzgWbc0,3195
202
204
  neurograph/v1/models/workbench_workbench_version_response.py,sha256=nMupKXBsoi4eXD-fsp_5PHrMislATwoBpVIZU7mG9RM,3283
203
205
  neurograph/v1/models/workbench_workbench_version_upsert_request.py,sha256=bAxjBeFe8EG3bXPUrLjfntlC65lK5p_ddPs_0yX3A9g,2994
204
- neurograph_core-1.202510232007.dist-info/METADATA,sha256=-2p9aNhsNEYxeIWxO2DEc7nr9O3Plgxo3rsGPVA4Wr8,1902
205
- neurograph_core-1.202510232007.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
206
- neurograph_core-1.202510232007.dist-info/top_level.txt,sha256=iajcSUfGanaBq4McklJQ4IXVuwV24WJhY7FRzlQybxI,11
207
- neurograph_core-1.202510232007.dist-info/RECORD,,
206
+ neurograph_core-1.202510232218.dist-info/METADATA,sha256=pV2eXBJx1FMlzIe3gHB-N9v_qvNgkd86HHVp2b2sAUA,1902
207
+ neurograph_core-1.202510232218.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
208
+ neurograph_core-1.202510232218.dist-info/top_level.txt,sha256=iajcSUfGanaBq4McklJQ4IXVuwV24WJhY7FRzlQybxI,11
209
+ neurograph_core-1.202510232218.dist-info/RECORD,,