neurograph-core 1.202509282026__py3-none-any.whl → 1.202510052316__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.
Files changed (30) hide show
  1. neurograph/v1/__init__.py +25 -218
  2. neurograph/v1/api/__init__.py +2 -29
  3. neurograph/v1/api/admin_api.py +549 -1
  4. neurograph/v1/api/client_api.py +263 -0
  5. neurograph/v1/api/knowledge_api.py +296 -0
  6. neurograph/v1/api/knowledge_extract_api.py +1 -1
  7. neurograph/v1/api/lookup_api.py +2 -0
  8. neurograph/v1/api/organization_api.py +528 -1
  9. neurograph/v1/api/reporting_api.py +1475 -0
  10. neurograph/v1/api/user_api.py +18 -1092
  11. neurograph/v1/api_client.py +4 -4
  12. neurograph/v1/models/__init__.py +12 -189
  13. neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +3 -1
  14. neurograph/v1/models/knowledge_enrichment_query.py +3 -1
  15. neurograph/v1/models/knowledge_product.py +103 -0
  16. neurograph/v1/models/knowledge_product_upsert_request.py +95 -0
  17. neurograph/v1/models/knowledge_product_upsert_response.py +99 -0
  18. neurograph/v1/models/{db_lookup_environment.py → lookup_env.py} +6 -12
  19. neurograph/v1/models/lookup_lookup_environments_response.py +3 -3
  20. neurograph/v1/models/reporting_affinities_response.py +89 -0
  21. neurograph/v1/models/reporting_customer_activity_response.py +89 -0
  22. neurograph/v1/models/reporting_daily_metric.py +95 -0
  23. neurograph/v1/models/reporting_daily_metrics_response.py +97 -0
  24. neurograph/v1/models/reporting_persona_activity_response.py +89 -0
  25. neurograph/v1/models/reporting_personas_response.py +89 -0
  26. neurograph/v1/models/reporting_query.py +91 -0
  27. {neurograph_core-1.202509282026.dist-info → neurograph_core-1.202510052316.dist-info}/METADATA +2 -3
  28. {neurograph_core-1.202509282026.dist-info → neurograph_core-1.202510052316.dist-info}/RECORD +30 -19
  29. {neurograph_core-1.202509282026.dist-info → neurograph_core-1.202510052316.dist-info}/WHEEL +0 -0
  30. {neurograph_core-1.202509282026.dist-info → neurograph_core-1.202510052316.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1475 @@
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
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from neurograph.v1.models.reporting_affinities_response import ReportingAffinitiesResponse
23
+ from neurograph.v1.models.reporting_customer_activity_response import ReportingCustomerActivityResponse
24
+ from neurograph.v1.models.reporting_daily_metrics_response import ReportingDailyMetricsResponse
25
+ from neurograph.v1.models.reporting_persona_activity_response import ReportingPersonaActivityResponse
26
+ from neurograph.v1.models.reporting_personas_response import ReportingPersonasResponse
27
+ from neurograph.v1.models.reporting_query import ReportingQuery
28
+
29
+ from neurograph.v1.api_client import ApiClient, RequestSerialized
30
+ from neurograph.v1.api_response import ApiResponse
31
+ from neurograph.v1.rest import RESTResponseType
32
+
33
+
34
+ class ReportingApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def api_v1_reporting_affinities_get(
49
+ self,
50
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
51
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
52
+ persona_name: Annotated[Optional[StrictStr], Field(description="Persona name")] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> ReportingAffinitiesResponse:
66
+ """Get customer affinities
67
+
68
+ Get affinities by persona (or all)
69
+
70
+ :param start_date: Start date (YYYY-MM-DD) (required)
71
+ :type start_date: str
72
+ :param end_date: End date (YYYY-MM-DD) (required)
73
+ :type end_date: str
74
+ :param persona_name: Persona name
75
+ :type persona_name: str
76
+ :param _request_timeout: timeout setting for this request. If one
77
+ number provided, it will be total request
78
+ timeout. It can also be a pair (tuple) of
79
+ (connection, read) timeouts.
80
+ :type _request_timeout: int, tuple(int, int), optional
81
+ :param _request_auth: set to override the auth_settings for an a single
82
+ request; this effectively ignores the
83
+ authentication in the spec for a single request.
84
+ :type _request_auth: dict, optional
85
+ :param _content_type: force content-type for the request.
86
+ :type _content_type: str, Optional
87
+ :param _headers: set to override the headers for a single
88
+ request; this effectively ignores the headers
89
+ in the spec for a single request.
90
+ :type _headers: dict, optional
91
+ :param _host_index: set to override the host_index for a single
92
+ request; this effectively ignores the host_index
93
+ in the spec for a single request.
94
+ :type _host_index: int, optional
95
+ :return: Returns the result object.
96
+ """ # noqa: E501
97
+
98
+ _param = self._api_v1_reporting_affinities_get_serialize(
99
+ start_date=start_date,
100
+ end_date=end_date,
101
+ persona_name=persona_name,
102
+ _request_auth=_request_auth,
103
+ _content_type=_content_type,
104
+ _headers=_headers,
105
+ _host_index=_host_index
106
+ )
107
+
108
+ _response_types_map: Dict[str, Optional[str]] = {
109
+ '200': "ReportingAffinitiesResponse",
110
+ '503': "ReportingAffinitiesResponse",
111
+ }
112
+ response_data = self.api_client.call_api(
113
+ *_param,
114
+ _request_timeout=_request_timeout
115
+ )
116
+ response_data.read()
117
+ return self.api_client.response_deserialize(
118
+ response_data=response_data,
119
+ response_types_map=_response_types_map,
120
+ ).data
121
+
122
+
123
+ @validate_call
124
+ def api_v1_reporting_affinities_get_with_http_info(
125
+ self,
126
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
127
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
128
+ persona_name: Annotated[Optional[StrictStr], Field(description="Persona name")] = None,
129
+ _request_timeout: Union[
130
+ None,
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Tuple[
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Annotated[StrictFloat, Field(gt=0)]
135
+ ]
136
+ ] = None,
137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
138
+ _content_type: Optional[StrictStr] = None,
139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
141
+ ) -> ApiResponse[ReportingAffinitiesResponse]:
142
+ """Get customer affinities
143
+
144
+ Get affinities by persona (or all)
145
+
146
+ :param start_date: Start date (YYYY-MM-DD) (required)
147
+ :type start_date: str
148
+ :param end_date: End date (YYYY-MM-DD) (required)
149
+ :type end_date: str
150
+ :param persona_name: Persona name
151
+ :type persona_name: str
152
+ :param _request_timeout: timeout setting for this request. If one
153
+ number provided, it will be total request
154
+ timeout. It can also be a pair (tuple) of
155
+ (connection, read) timeouts.
156
+ :type _request_timeout: int, tuple(int, int), optional
157
+ :param _request_auth: set to override the auth_settings for an a single
158
+ request; this effectively ignores the
159
+ authentication in the spec for a single request.
160
+ :type _request_auth: dict, optional
161
+ :param _content_type: force content-type for the request.
162
+ :type _content_type: str, Optional
163
+ :param _headers: set to override the headers for a single
164
+ request; this effectively ignores the headers
165
+ in the spec for a single request.
166
+ :type _headers: dict, optional
167
+ :param _host_index: set to override the host_index for a single
168
+ request; this effectively ignores the host_index
169
+ in the spec for a single request.
170
+ :type _host_index: int, optional
171
+ :return: Returns the result object.
172
+ """ # noqa: E501
173
+
174
+ _param = self._api_v1_reporting_affinities_get_serialize(
175
+ start_date=start_date,
176
+ end_date=end_date,
177
+ persona_name=persona_name,
178
+ _request_auth=_request_auth,
179
+ _content_type=_content_type,
180
+ _headers=_headers,
181
+ _host_index=_host_index
182
+ )
183
+
184
+ _response_types_map: Dict[str, Optional[str]] = {
185
+ '200': "ReportingAffinitiesResponse",
186
+ '503': "ReportingAffinitiesResponse",
187
+ }
188
+ response_data = self.api_client.call_api(
189
+ *_param,
190
+ _request_timeout=_request_timeout
191
+ )
192
+ response_data.read()
193
+ return self.api_client.response_deserialize(
194
+ response_data=response_data,
195
+ response_types_map=_response_types_map,
196
+ )
197
+
198
+
199
+ @validate_call
200
+ def api_v1_reporting_affinities_get_without_preload_content(
201
+ self,
202
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
203
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
204
+ persona_name: Annotated[Optional[StrictStr], Field(description="Persona name")] = None,
205
+ _request_timeout: Union[
206
+ None,
207
+ Annotated[StrictFloat, Field(gt=0)],
208
+ Tuple[
209
+ Annotated[StrictFloat, Field(gt=0)],
210
+ Annotated[StrictFloat, Field(gt=0)]
211
+ ]
212
+ ] = None,
213
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
214
+ _content_type: Optional[StrictStr] = None,
215
+ _headers: Optional[Dict[StrictStr, Any]] = None,
216
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
217
+ ) -> RESTResponseType:
218
+ """Get customer affinities
219
+
220
+ Get affinities by persona (or all)
221
+
222
+ :param start_date: Start date (YYYY-MM-DD) (required)
223
+ :type start_date: str
224
+ :param end_date: End date (YYYY-MM-DD) (required)
225
+ :type end_date: str
226
+ :param persona_name: Persona name
227
+ :type persona_name: str
228
+ :param _request_timeout: timeout setting for this request. If one
229
+ number provided, it will be total request
230
+ timeout. It can also be a pair (tuple) of
231
+ (connection, read) timeouts.
232
+ :type _request_timeout: int, tuple(int, int), optional
233
+ :param _request_auth: set to override the auth_settings for an a single
234
+ request; this effectively ignores the
235
+ authentication in the spec for a single request.
236
+ :type _request_auth: dict, optional
237
+ :param _content_type: force content-type for the request.
238
+ :type _content_type: str, Optional
239
+ :param _headers: set to override the headers for a single
240
+ request; this effectively ignores the headers
241
+ in the spec for a single request.
242
+ :type _headers: dict, optional
243
+ :param _host_index: set to override the host_index for a single
244
+ request; this effectively ignores the host_index
245
+ in the spec for a single request.
246
+ :type _host_index: int, optional
247
+ :return: Returns the result object.
248
+ """ # noqa: E501
249
+
250
+ _param = self._api_v1_reporting_affinities_get_serialize(
251
+ start_date=start_date,
252
+ end_date=end_date,
253
+ persona_name=persona_name,
254
+ _request_auth=_request_auth,
255
+ _content_type=_content_type,
256
+ _headers=_headers,
257
+ _host_index=_host_index
258
+ )
259
+
260
+ _response_types_map: Dict[str, Optional[str]] = {
261
+ '200': "ReportingAffinitiesResponse",
262
+ '503': "ReportingAffinitiesResponse",
263
+ }
264
+ response_data = self.api_client.call_api(
265
+ *_param,
266
+ _request_timeout=_request_timeout
267
+ )
268
+ return response_data.response
269
+
270
+
271
+ def _api_v1_reporting_affinities_get_serialize(
272
+ self,
273
+ start_date,
274
+ end_date,
275
+ persona_name,
276
+ _request_auth,
277
+ _content_type,
278
+ _headers,
279
+ _host_index,
280
+ ) -> RequestSerialized:
281
+
282
+ _host = None
283
+
284
+ _collection_formats: Dict[str, str] = {
285
+ }
286
+
287
+ _path_params: Dict[str, str] = {}
288
+ _query_params: List[Tuple[str, str]] = []
289
+ _header_params: Dict[str, Optional[str]] = _headers or {}
290
+ _form_params: List[Tuple[str, str]] = []
291
+ _files: Dict[
292
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
293
+ ] = {}
294
+ _body_params: Optional[bytes] = None
295
+
296
+ # process the path parameters
297
+ # process the query parameters
298
+ if persona_name is not None:
299
+
300
+ _query_params.append(('persona_name', persona_name))
301
+
302
+ if start_date is not None:
303
+
304
+ _query_params.append(('start_date', start_date))
305
+
306
+ if end_date is not None:
307
+
308
+ _query_params.append(('end_date', end_date))
309
+
310
+ # process the header parameters
311
+ # process the form parameters
312
+ # process the body parameter
313
+
314
+
315
+ # set the HTTP header `Accept`
316
+ if 'Accept' not in _header_params:
317
+ _header_params['Accept'] = self.api_client.select_header_accept(
318
+ [
319
+ 'application/json'
320
+ ]
321
+ )
322
+
323
+
324
+ # authentication setting
325
+ _auth_settings: List[str] = [
326
+ 'TokenAuth',
327
+ 'ApiKeyAuth'
328
+ ]
329
+
330
+ return self.api_client.param_serialize(
331
+ method='GET',
332
+ resource_path='/api/v1/reporting/affinities/',
333
+ path_params=_path_params,
334
+ query_params=_query_params,
335
+ header_params=_header_params,
336
+ body=_body_params,
337
+ post_params=_form_params,
338
+ files=_files,
339
+ auth_settings=_auth_settings,
340
+ collection_formats=_collection_formats,
341
+ _host=_host,
342
+ _request_auth=_request_auth
343
+ )
344
+
345
+
346
+
347
+
348
+ @validate_call
349
+ def api_v1_reporting_customer_activity_get(
350
+ self,
351
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
352
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
353
+ interval: Annotated[Optional[StrictStr], Field(description="Interval (day|week|month)")] = None,
354
+ _request_timeout: Union[
355
+ None,
356
+ Annotated[StrictFloat, Field(gt=0)],
357
+ Tuple[
358
+ Annotated[StrictFloat, Field(gt=0)],
359
+ Annotated[StrictFloat, Field(gt=0)]
360
+ ]
361
+ ] = None,
362
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
363
+ _content_type: Optional[StrictStr] = None,
364
+ _headers: Optional[Dict[StrictStr, Any]] = None,
365
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
366
+ ) -> ReportingCustomerActivityResponse:
367
+ """Get customer activity metrics
368
+
369
+ Get visitors, conversions, LTV, revenue lift by persona
370
+
371
+ :param start_date: Start date (YYYY-MM-DD) (required)
372
+ :type start_date: str
373
+ :param end_date: End date (YYYY-MM-DD) (required)
374
+ :type end_date: str
375
+ :param interval: Interval (day|week|month)
376
+ :type interval: str
377
+ :param _request_timeout: timeout setting for this request. If one
378
+ number provided, it will be total request
379
+ timeout. It can also be a pair (tuple) of
380
+ (connection, read) timeouts.
381
+ :type _request_timeout: int, tuple(int, int), optional
382
+ :param _request_auth: set to override the auth_settings for an a single
383
+ request; this effectively ignores the
384
+ authentication in the spec for a single request.
385
+ :type _request_auth: dict, optional
386
+ :param _content_type: force content-type for the request.
387
+ :type _content_type: str, Optional
388
+ :param _headers: set to override the headers for a single
389
+ request; this effectively ignores the headers
390
+ in the spec for a single request.
391
+ :type _headers: dict, optional
392
+ :param _host_index: set to override the host_index for a single
393
+ request; this effectively ignores the host_index
394
+ in the spec for a single request.
395
+ :type _host_index: int, optional
396
+ :return: Returns the result object.
397
+ """ # noqa: E501
398
+
399
+ _param = self._api_v1_reporting_customer_activity_get_serialize(
400
+ start_date=start_date,
401
+ end_date=end_date,
402
+ interval=interval,
403
+ _request_auth=_request_auth,
404
+ _content_type=_content_type,
405
+ _headers=_headers,
406
+ _host_index=_host_index
407
+ )
408
+
409
+ _response_types_map: Dict[str, Optional[str]] = {
410
+ '200': "ReportingCustomerActivityResponse",
411
+ '503': "ReportingCustomerActivityResponse",
412
+ }
413
+ response_data = self.api_client.call_api(
414
+ *_param,
415
+ _request_timeout=_request_timeout
416
+ )
417
+ response_data.read()
418
+ return self.api_client.response_deserialize(
419
+ response_data=response_data,
420
+ response_types_map=_response_types_map,
421
+ ).data
422
+
423
+
424
+ @validate_call
425
+ def api_v1_reporting_customer_activity_get_with_http_info(
426
+ self,
427
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
428
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
429
+ interval: Annotated[Optional[StrictStr], Field(description="Interval (day|week|month)")] = None,
430
+ _request_timeout: Union[
431
+ None,
432
+ Annotated[StrictFloat, Field(gt=0)],
433
+ Tuple[
434
+ Annotated[StrictFloat, Field(gt=0)],
435
+ Annotated[StrictFloat, Field(gt=0)]
436
+ ]
437
+ ] = None,
438
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
439
+ _content_type: Optional[StrictStr] = None,
440
+ _headers: Optional[Dict[StrictStr, Any]] = None,
441
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
442
+ ) -> ApiResponse[ReportingCustomerActivityResponse]:
443
+ """Get customer activity metrics
444
+
445
+ Get visitors, conversions, LTV, revenue lift by persona
446
+
447
+ :param start_date: Start date (YYYY-MM-DD) (required)
448
+ :type start_date: str
449
+ :param end_date: End date (YYYY-MM-DD) (required)
450
+ :type end_date: str
451
+ :param interval: Interval (day|week|month)
452
+ :type interval: str
453
+ :param _request_timeout: timeout setting for this request. If one
454
+ number provided, it will be total request
455
+ timeout. It can also be a pair (tuple) of
456
+ (connection, read) timeouts.
457
+ :type _request_timeout: int, tuple(int, int), optional
458
+ :param _request_auth: set to override the auth_settings for an a single
459
+ request; this effectively ignores the
460
+ authentication in the spec for a single request.
461
+ :type _request_auth: dict, optional
462
+ :param _content_type: force content-type for the request.
463
+ :type _content_type: str, Optional
464
+ :param _headers: set to override the headers for a single
465
+ request; this effectively ignores the headers
466
+ in the spec for a single request.
467
+ :type _headers: dict, optional
468
+ :param _host_index: set to override the host_index for a single
469
+ request; this effectively ignores the host_index
470
+ in the spec for a single request.
471
+ :type _host_index: int, optional
472
+ :return: Returns the result object.
473
+ """ # noqa: E501
474
+
475
+ _param = self._api_v1_reporting_customer_activity_get_serialize(
476
+ start_date=start_date,
477
+ end_date=end_date,
478
+ interval=interval,
479
+ _request_auth=_request_auth,
480
+ _content_type=_content_type,
481
+ _headers=_headers,
482
+ _host_index=_host_index
483
+ )
484
+
485
+ _response_types_map: Dict[str, Optional[str]] = {
486
+ '200': "ReportingCustomerActivityResponse",
487
+ '503': "ReportingCustomerActivityResponse",
488
+ }
489
+ response_data = self.api_client.call_api(
490
+ *_param,
491
+ _request_timeout=_request_timeout
492
+ )
493
+ response_data.read()
494
+ return self.api_client.response_deserialize(
495
+ response_data=response_data,
496
+ response_types_map=_response_types_map,
497
+ )
498
+
499
+
500
+ @validate_call
501
+ def api_v1_reporting_customer_activity_get_without_preload_content(
502
+ self,
503
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
504
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
505
+ interval: Annotated[Optional[StrictStr], Field(description="Interval (day|week|month)")] = None,
506
+ _request_timeout: Union[
507
+ None,
508
+ Annotated[StrictFloat, Field(gt=0)],
509
+ Tuple[
510
+ Annotated[StrictFloat, Field(gt=0)],
511
+ Annotated[StrictFloat, Field(gt=0)]
512
+ ]
513
+ ] = None,
514
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
515
+ _content_type: Optional[StrictStr] = None,
516
+ _headers: Optional[Dict[StrictStr, Any]] = None,
517
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
518
+ ) -> RESTResponseType:
519
+ """Get customer activity metrics
520
+
521
+ Get visitors, conversions, LTV, revenue lift by persona
522
+
523
+ :param start_date: Start date (YYYY-MM-DD) (required)
524
+ :type start_date: str
525
+ :param end_date: End date (YYYY-MM-DD) (required)
526
+ :type end_date: str
527
+ :param interval: Interval (day|week|month)
528
+ :type interval: str
529
+ :param _request_timeout: timeout setting for this request. If one
530
+ number provided, it will be total request
531
+ timeout. It can also be a pair (tuple) of
532
+ (connection, read) timeouts.
533
+ :type _request_timeout: int, tuple(int, int), optional
534
+ :param _request_auth: set to override the auth_settings for an a single
535
+ request; this effectively ignores the
536
+ authentication in the spec for a single request.
537
+ :type _request_auth: dict, optional
538
+ :param _content_type: force content-type for the request.
539
+ :type _content_type: str, Optional
540
+ :param _headers: set to override the headers for a single
541
+ request; this effectively ignores the headers
542
+ in the spec for a single request.
543
+ :type _headers: dict, optional
544
+ :param _host_index: set to override the host_index for a single
545
+ request; this effectively ignores the host_index
546
+ in the spec for a single request.
547
+ :type _host_index: int, optional
548
+ :return: Returns the result object.
549
+ """ # noqa: E501
550
+
551
+ _param = self._api_v1_reporting_customer_activity_get_serialize(
552
+ start_date=start_date,
553
+ end_date=end_date,
554
+ interval=interval,
555
+ _request_auth=_request_auth,
556
+ _content_type=_content_type,
557
+ _headers=_headers,
558
+ _host_index=_host_index
559
+ )
560
+
561
+ _response_types_map: Dict[str, Optional[str]] = {
562
+ '200': "ReportingCustomerActivityResponse",
563
+ '503': "ReportingCustomerActivityResponse",
564
+ }
565
+ response_data = self.api_client.call_api(
566
+ *_param,
567
+ _request_timeout=_request_timeout
568
+ )
569
+ return response_data.response
570
+
571
+
572
+ def _api_v1_reporting_customer_activity_get_serialize(
573
+ self,
574
+ start_date,
575
+ end_date,
576
+ interval,
577
+ _request_auth,
578
+ _content_type,
579
+ _headers,
580
+ _host_index,
581
+ ) -> RequestSerialized:
582
+
583
+ _host = None
584
+
585
+ _collection_formats: Dict[str, str] = {
586
+ }
587
+
588
+ _path_params: Dict[str, str] = {}
589
+ _query_params: List[Tuple[str, str]] = []
590
+ _header_params: Dict[str, Optional[str]] = _headers or {}
591
+ _form_params: List[Tuple[str, str]] = []
592
+ _files: Dict[
593
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
594
+ ] = {}
595
+ _body_params: Optional[bytes] = None
596
+
597
+ # process the path parameters
598
+ # process the query parameters
599
+ if start_date is not None:
600
+
601
+ _query_params.append(('start_date', start_date))
602
+
603
+ if end_date is not None:
604
+
605
+ _query_params.append(('end_date', end_date))
606
+
607
+ if interval is not None:
608
+
609
+ _query_params.append(('interval', interval))
610
+
611
+ # process the header parameters
612
+ # process the form parameters
613
+ # process the body parameter
614
+
615
+
616
+ # set the HTTP header `Accept`
617
+ if 'Accept' not in _header_params:
618
+ _header_params['Accept'] = self.api_client.select_header_accept(
619
+ [
620
+ 'application/json'
621
+ ]
622
+ )
623
+
624
+
625
+ # authentication setting
626
+ _auth_settings: List[str] = [
627
+ 'TokenAuth',
628
+ 'ApiKeyAuth'
629
+ ]
630
+
631
+ return self.api_client.param_serialize(
632
+ method='GET',
633
+ resource_path='/api/v1/reporting/customer-activity/',
634
+ path_params=_path_params,
635
+ query_params=_query_params,
636
+ header_params=_header_params,
637
+ body=_body_params,
638
+ post_params=_form_params,
639
+ files=_files,
640
+ auth_settings=_auth_settings,
641
+ collection_formats=_collection_formats,
642
+ _host=_host,
643
+ _request_auth=_request_auth
644
+ )
645
+
646
+
647
+
648
+
649
+ @validate_call
650
+ def api_v1_reporting_daily_rollup_post(
651
+ self,
652
+ request: Annotated[ReportingQuery, Field(description="Body")],
653
+ _request_timeout: Union[
654
+ None,
655
+ Annotated[StrictFloat, Field(gt=0)],
656
+ Tuple[
657
+ Annotated[StrictFloat, Field(gt=0)],
658
+ Annotated[StrictFloat, Field(gt=0)]
659
+ ]
660
+ ] = None,
661
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
662
+ _content_type: Optional[StrictStr] = None,
663
+ _headers: Optional[Dict[StrictStr, Any]] = None,
664
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
665
+ ) -> ReportingDailyMetricsResponse:
666
+ """Get Daily Metrics for Client by Persona
667
+
668
+
669
+ :param request: Body (required)
670
+ :type request: ReportingQuery
671
+ :param _request_timeout: timeout setting for this request. If one
672
+ number provided, it will be total request
673
+ timeout. It can also be a pair (tuple) of
674
+ (connection, read) timeouts.
675
+ :type _request_timeout: int, tuple(int, int), optional
676
+ :param _request_auth: set to override the auth_settings for an a single
677
+ request; this effectively ignores the
678
+ authentication in the spec for a single request.
679
+ :type _request_auth: dict, optional
680
+ :param _content_type: force content-type for the request.
681
+ :type _content_type: str, Optional
682
+ :param _headers: set to override the headers for a single
683
+ request; this effectively ignores the headers
684
+ in the spec for a single request.
685
+ :type _headers: dict, optional
686
+ :param _host_index: set to override the host_index for a single
687
+ request; this effectively ignores the host_index
688
+ in the spec for a single request.
689
+ :type _host_index: int, optional
690
+ :return: Returns the result object.
691
+ """ # noqa: E501
692
+
693
+ _param = self._api_v1_reporting_daily_rollup_post_serialize(
694
+ request=request,
695
+ _request_auth=_request_auth,
696
+ _content_type=_content_type,
697
+ _headers=_headers,
698
+ _host_index=_host_index
699
+ )
700
+
701
+ _response_types_map: Dict[str, Optional[str]] = {
702
+ '200': "ReportingDailyMetricsResponse",
703
+ '400': "ReportingDailyMetricsResponse",
704
+ }
705
+ response_data = self.api_client.call_api(
706
+ *_param,
707
+ _request_timeout=_request_timeout
708
+ )
709
+ response_data.read()
710
+ return self.api_client.response_deserialize(
711
+ response_data=response_data,
712
+ response_types_map=_response_types_map,
713
+ ).data
714
+
715
+
716
+ @validate_call
717
+ def api_v1_reporting_daily_rollup_post_with_http_info(
718
+ self,
719
+ request: Annotated[ReportingQuery, Field(description="Body")],
720
+ _request_timeout: Union[
721
+ None,
722
+ Annotated[StrictFloat, Field(gt=0)],
723
+ Tuple[
724
+ Annotated[StrictFloat, Field(gt=0)],
725
+ Annotated[StrictFloat, Field(gt=0)]
726
+ ]
727
+ ] = None,
728
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
729
+ _content_type: Optional[StrictStr] = None,
730
+ _headers: Optional[Dict[StrictStr, Any]] = None,
731
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
732
+ ) -> ApiResponse[ReportingDailyMetricsResponse]:
733
+ """Get Daily Metrics for Client by Persona
734
+
735
+
736
+ :param request: Body (required)
737
+ :type request: ReportingQuery
738
+ :param _request_timeout: timeout setting for this request. If one
739
+ number provided, it will be total request
740
+ timeout. It can also be a pair (tuple) of
741
+ (connection, read) timeouts.
742
+ :type _request_timeout: int, tuple(int, int), optional
743
+ :param _request_auth: set to override the auth_settings for an a single
744
+ request; this effectively ignores the
745
+ authentication in the spec for a single request.
746
+ :type _request_auth: dict, optional
747
+ :param _content_type: force content-type for the request.
748
+ :type _content_type: str, Optional
749
+ :param _headers: set to override the headers for a single
750
+ request; this effectively ignores the headers
751
+ in the spec for a single request.
752
+ :type _headers: dict, optional
753
+ :param _host_index: set to override the host_index for a single
754
+ request; this effectively ignores the host_index
755
+ in the spec for a single request.
756
+ :type _host_index: int, optional
757
+ :return: Returns the result object.
758
+ """ # noqa: E501
759
+
760
+ _param = self._api_v1_reporting_daily_rollup_post_serialize(
761
+ request=request,
762
+ _request_auth=_request_auth,
763
+ _content_type=_content_type,
764
+ _headers=_headers,
765
+ _host_index=_host_index
766
+ )
767
+
768
+ _response_types_map: Dict[str, Optional[str]] = {
769
+ '200': "ReportingDailyMetricsResponse",
770
+ '400': "ReportingDailyMetricsResponse",
771
+ }
772
+ response_data = self.api_client.call_api(
773
+ *_param,
774
+ _request_timeout=_request_timeout
775
+ )
776
+ response_data.read()
777
+ return self.api_client.response_deserialize(
778
+ response_data=response_data,
779
+ response_types_map=_response_types_map,
780
+ )
781
+
782
+
783
+ @validate_call
784
+ def api_v1_reporting_daily_rollup_post_without_preload_content(
785
+ self,
786
+ request: Annotated[ReportingQuery, Field(description="Body")],
787
+ _request_timeout: Union[
788
+ None,
789
+ Annotated[StrictFloat, Field(gt=0)],
790
+ Tuple[
791
+ Annotated[StrictFloat, Field(gt=0)],
792
+ Annotated[StrictFloat, Field(gt=0)]
793
+ ]
794
+ ] = None,
795
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
796
+ _content_type: Optional[StrictStr] = None,
797
+ _headers: Optional[Dict[StrictStr, Any]] = None,
798
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
799
+ ) -> RESTResponseType:
800
+ """Get Daily Metrics for Client by Persona
801
+
802
+
803
+ :param request: Body (required)
804
+ :type request: ReportingQuery
805
+ :param _request_timeout: timeout setting for this request. If one
806
+ number provided, it will be total request
807
+ timeout. It can also be a pair (tuple) of
808
+ (connection, read) timeouts.
809
+ :type _request_timeout: int, tuple(int, int), optional
810
+ :param _request_auth: set to override the auth_settings for an a single
811
+ request; this effectively ignores the
812
+ authentication in the spec for a single request.
813
+ :type _request_auth: dict, optional
814
+ :param _content_type: force content-type for the request.
815
+ :type _content_type: str, Optional
816
+ :param _headers: set to override the headers for a single
817
+ request; this effectively ignores the headers
818
+ in the spec for a single request.
819
+ :type _headers: dict, optional
820
+ :param _host_index: set to override the host_index for a single
821
+ request; this effectively ignores the host_index
822
+ in the spec for a single request.
823
+ :type _host_index: int, optional
824
+ :return: Returns the result object.
825
+ """ # noqa: E501
826
+
827
+ _param = self._api_v1_reporting_daily_rollup_post_serialize(
828
+ request=request,
829
+ _request_auth=_request_auth,
830
+ _content_type=_content_type,
831
+ _headers=_headers,
832
+ _host_index=_host_index
833
+ )
834
+
835
+ _response_types_map: Dict[str, Optional[str]] = {
836
+ '200': "ReportingDailyMetricsResponse",
837
+ '400': "ReportingDailyMetricsResponse",
838
+ }
839
+ response_data = self.api_client.call_api(
840
+ *_param,
841
+ _request_timeout=_request_timeout
842
+ )
843
+ return response_data.response
844
+
845
+
846
+ def _api_v1_reporting_daily_rollup_post_serialize(
847
+ self,
848
+ request,
849
+ _request_auth,
850
+ _content_type,
851
+ _headers,
852
+ _host_index,
853
+ ) -> RequestSerialized:
854
+
855
+ _host = None
856
+
857
+ _collection_formats: Dict[str, str] = {
858
+ }
859
+
860
+ _path_params: Dict[str, str] = {}
861
+ _query_params: List[Tuple[str, str]] = []
862
+ _header_params: Dict[str, Optional[str]] = _headers or {}
863
+ _form_params: List[Tuple[str, str]] = []
864
+ _files: Dict[
865
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
866
+ ] = {}
867
+ _body_params: Optional[bytes] = None
868
+
869
+ # process the path parameters
870
+ # process the query parameters
871
+ # process the header parameters
872
+ # process the form parameters
873
+ # process the body parameter
874
+ if request is not None:
875
+ _body_params = request
876
+
877
+
878
+ # set the HTTP header `Accept`
879
+ if 'Accept' not in _header_params:
880
+ _header_params['Accept'] = self.api_client.select_header_accept(
881
+ [
882
+ 'application/json'
883
+ ]
884
+ )
885
+
886
+
887
+ # authentication setting
888
+ _auth_settings: List[str] = [
889
+ 'ApiKeyAuth'
890
+ ]
891
+
892
+ return self.api_client.param_serialize(
893
+ method='POST',
894
+ resource_path='/api/v1/reporting/daily-rollup/',
895
+ path_params=_path_params,
896
+ query_params=_query_params,
897
+ header_params=_header_params,
898
+ body=_body_params,
899
+ post_params=_form_params,
900
+ files=_files,
901
+ auth_settings=_auth_settings,
902
+ collection_formats=_collection_formats,
903
+ _host=_host,
904
+ _request_auth=_request_auth
905
+ )
906
+
907
+
908
+
909
+
910
+ @validate_call
911
+ def api_v1_reporting_persona_activity_get(
912
+ self,
913
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
914
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
915
+ _request_timeout: Union[
916
+ None,
917
+ Annotated[StrictFloat, Field(gt=0)],
918
+ Tuple[
919
+ Annotated[StrictFloat, Field(gt=0)],
920
+ Annotated[StrictFloat, Field(gt=0)]
921
+ ]
922
+ ] = None,
923
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
924
+ _content_type: Optional[StrictStr] = None,
925
+ _headers: Optional[Dict[StrictStr, Any]] = None,
926
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
927
+ ) -> ReportingPersonaActivityResponse:
928
+ """Get persona activity trend
929
+
930
+ Get daily persona activity
931
+
932
+ :param start_date: Start date (YYYY-MM-DD) (required)
933
+ :type start_date: str
934
+ :param end_date: End date (YYYY-MM-DD) (required)
935
+ :type end_date: str
936
+ :param _request_timeout: timeout setting for this request. If one
937
+ number provided, it will be total request
938
+ timeout. It can also be a pair (tuple) of
939
+ (connection, read) timeouts.
940
+ :type _request_timeout: int, tuple(int, int), optional
941
+ :param _request_auth: set to override the auth_settings for an a single
942
+ request; this effectively ignores the
943
+ authentication in the spec for a single request.
944
+ :type _request_auth: dict, optional
945
+ :param _content_type: force content-type for the request.
946
+ :type _content_type: str, Optional
947
+ :param _headers: set to override the headers for a single
948
+ request; this effectively ignores the headers
949
+ in the spec for a single request.
950
+ :type _headers: dict, optional
951
+ :param _host_index: set to override the host_index for a single
952
+ request; this effectively ignores the host_index
953
+ in the spec for a single request.
954
+ :type _host_index: int, optional
955
+ :return: Returns the result object.
956
+ """ # noqa: E501
957
+
958
+ _param = self._api_v1_reporting_persona_activity_get_serialize(
959
+ start_date=start_date,
960
+ end_date=end_date,
961
+ _request_auth=_request_auth,
962
+ _content_type=_content_type,
963
+ _headers=_headers,
964
+ _host_index=_host_index
965
+ )
966
+
967
+ _response_types_map: Dict[str, Optional[str]] = {
968
+ '200': "ReportingPersonaActivityResponse",
969
+ '503': "ReportingPersonaActivityResponse",
970
+ }
971
+ response_data = self.api_client.call_api(
972
+ *_param,
973
+ _request_timeout=_request_timeout
974
+ )
975
+ response_data.read()
976
+ return self.api_client.response_deserialize(
977
+ response_data=response_data,
978
+ response_types_map=_response_types_map,
979
+ ).data
980
+
981
+
982
+ @validate_call
983
+ def api_v1_reporting_persona_activity_get_with_http_info(
984
+ self,
985
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
986
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
987
+ _request_timeout: Union[
988
+ None,
989
+ Annotated[StrictFloat, Field(gt=0)],
990
+ Tuple[
991
+ Annotated[StrictFloat, Field(gt=0)],
992
+ Annotated[StrictFloat, Field(gt=0)]
993
+ ]
994
+ ] = None,
995
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
996
+ _content_type: Optional[StrictStr] = None,
997
+ _headers: Optional[Dict[StrictStr, Any]] = None,
998
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
999
+ ) -> ApiResponse[ReportingPersonaActivityResponse]:
1000
+ """Get persona activity trend
1001
+
1002
+ Get daily persona activity
1003
+
1004
+ :param start_date: Start date (YYYY-MM-DD) (required)
1005
+ :type start_date: str
1006
+ :param end_date: End date (YYYY-MM-DD) (required)
1007
+ :type end_date: str
1008
+ :param _request_timeout: timeout setting for this request. If one
1009
+ number provided, it will be total request
1010
+ timeout. It can also be a pair (tuple) of
1011
+ (connection, read) timeouts.
1012
+ :type _request_timeout: int, tuple(int, int), optional
1013
+ :param _request_auth: set to override the auth_settings for an a single
1014
+ request; this effectively ignores the
1015
+ authentication in the spec for a single request.
1016
+ :type _request_auth: dict, optional
1017
+ :param _content_type: force content-type for the request.
1018
+ :type _content_type: str, Optional
1019
+ :param _headers: set to override the headers for a single
1020
+ request; this effectively ignores the headers
1021
+ in the spec for a single request.
1022
+ :type _headers: dict, optional
1023
+ :param _host_index: set to override the host_index for a single
1024
+ request; this effectively ignores the host_index
1025
+ in the spec for a single request.
1026
+ :type _host_index: int, optional
1027
+ :return: Returns the result object.
1028
+ """ # noqa: E501
1029
+
1030
+ _param = self._api_v1_reporting_persona_activity_get_serialize(
1031
+ start_date=start_date,
1032
+ end_date=end_date,
1033
+ _request_auth=_request_auth,
1034
+ _content_type=_content_type,
1035
+ _headers=_headers,
1036
+ _host_index=_host_index
1037
+ )
1038
+
1039
+ _response_types_map: Dict[str, Optional[str]] = {
1040
+ '200': "ReportingPersonaActivityResponse",
1041
+ '503': "ReportingPersonaActivityResponse",
1042
+ }
1043
+ response_data = self.api_client.call_api(
1044
+ *_param,
1045
+ _request_timeout=_request_timeout
1046
+ )
1047
+ response_data.read()
1048
+ return self.api_client.response_deserialize(
1049
+ response_data=response_data,
1050
+ response_types_map=_response_types_map,
1051
+ )
1052
+
1053
+
1054
+ @validate_call
1055
+ def api_v1_reporting_persona_activity_get_without_preload_content(
1056
+ self,
1057
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
1058
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
1059
+ _request_timeout: Union[
1060
+ None,
1061
+ Annotated[StrictFloat, Field(gt=0)],
1062
+ Tuple[
1063
+ Annotated[StrictFloat, Field(gt=0)],
1064
+ Annotated[StrictFloat, Field(gt=0)]
1065
+ ]
1066
+ ] = None,
1067
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1068
+ _content_type: Optional[StrictStr] = None,
1069
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1070
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1071
+ ) -> RESTResponseType:
1072
+ """Get persona activity trend
1073
+
1074
+ Get daily persona activity
1075
+
1076
+ :param start_date: Start date (YYYY-MM-DD) (required)
1077
+ :type start_date: str
1078
+ :param end_date: End date (YYYY-MM-DD) (required)
1079
+ :type end_date: str
1080
+ :param _request_timeout: timeout setting for this request. If one
1081
+ number provided, it will be total request
1082
+ timeout. It can also be a pair (tuple) of
1083
+ (connection, read) timeouts.
1084
+ :type _request_timeout: int, tuple(int, int), optional
1085
+ :param _request_auth: set to override the auth_settings for an a single
1086
+ request; this effectively ignores the
1087
+ authentication in the spec for a single request.
1088
+ :type _request_auth: dict, optional
1089
+ :param _content_type: force content-type for the request.
1090
+ :type _content_type: str, Optional
1091
+ :param _headers: set to override the headers for a single
1092
+ request; this effectively ignores the headers
1093
+ in the spec for a single request.
1094
+ :type _headers: dict, optional
1095
+ :param _host_index: set to override the host_index for a single
1096
+ request; this effectively ignores the host_index
1097
+ in the spec for a single request.
1098
+ :type _host_index: int, optional
1099
+ :return: Returns the result object.
1100
+ """ # noqa: E501
1101
+
1102
+ _param = self._api_v1_reporting_persona_activity_get_serialize(
1103
+ start_date=start_date,
1104
+ end_date=end_date,
1105
+ _request_auth=_request_auth,
1106
+ _content_type=_content_type,
1107
+ _headers=_headers,
1108
+ _host_index=_host_index
1109
+ )
1110
+
1111
+ _response_types_map: Dict[str, Optional[str]] = {
1112
+ '200': "ReportingPersonaActivityResponse",
1113
+ '503': "ReportingPersonaActivityResponse",
1114
+ }
1115
+ response_data = self.api_client.call_api(
1116
+ *_param,
1117
+ _request_timeout=_request_timeout
1118
+ )
1119
+ return response_data.response
1120
+
1121
+
1122
+ def _api_v1_reporting_persona_activity_get_serialize(
1123
+ self,
1124
+ start_date,
1125
+ end_date,
1126
+ _request_auth,
1127
+ _content_type,
1128
+ _headers,
1129
+ _host_index,
1130
+ ) -> RequestSerialized:
1131
+
1132
+ _host = None
1133
+
1134
+ _collection_formats: Dict[str, str] = {
1135
+ }
1136
+
1137
+ _path_params: Dict[str, str] = {}
1138
+ _query_params: List[Tuple[str, str]] = []
1139
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1140
+ _form_params: List[Tuple[str, str]] = []
1141
+ _files: Dict[
1142
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1143
+ ] = {}
1144
+ _body_params: Optional[bytes] = None
1145
+
1146
+ # process the path parameters
1147
+ # process the query parameters
1148
+ if start_date is not None:
1149
+
1150
+ _query_params.append(('start_date', start_date))
1151
+
1152
+ if end_date is not None:
1153
+
1154
+ _query_params.append(('end_date', end_date))
1155
+
1156
+ # process the header parameters
1157
+ # process the form parameters
1158
+ # process the body parameter
1159
+
1160
+
1161
+ # set the HTTP header `Accept`
1162
+ if 'Accept' not in _header_params:
1163
+ _header_params['Accept'] = self.api_client.select_header_accept(
1164
+ [
1165
+ 'application/json'
1166
+ ]
1167
+ )
1168
+
1169
+
1170
+ # authentication setting
1171
+ _auth_settings: List[str] = [
1172
+ 'TokenAuth',
1173
+ 'ApiKeyAuth'
1174
+ ]
1175
+
1176
+ return self.api_client.param_serialize(
1177
+ method='GET',
1178
+ resource_path='/api/v1/reporting/persona-activity/',
1179
+ path_params=_path_params,
1180
+ query_params=_query_params,
1181
+ header_params=_header_params,
1182
+ body=_body_params,
1183
+ post_params=_form_params,
1184
+ files=_files,
1185
+ auth_settings=_auth_settings,
1186
+ collection_formats=_collection_formats,
1187
+ _host=_host,
1188
+ _request_auth=_request_auth
1189
+ )
1190
+
1191
+
1192
+
1193
+
1194
+ @validate_call
1195
+ def api_v1_reporting_personas_legacy_get(
1196
+ self,
1197
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
1198
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
1199
+ _request_timeout: Union[
1200
+ None,
1201
+ Annotated[StrictFloat, Field(gt=0)],
1202
+ Tuple[
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Annotated[StrictFloat, Field(gt=0)]
1205
+ ]
1206
+ ] = None,
1207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1208
+ _content_type: Optional[StrictStr] = None,
1209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1211
+ ) -> ReportingPersonasResponse:
1212
+ """Get persona rollup
1213
+
1214
+ Get monthly persona stats
1215
+
1216
+ :param start_date: Start date (YYYY-MM-DD) (required)
1217
+ :type start_date: str
1218
+ :param end_date: End date (YYYY-MM-DD) (required)
1219
+ :type end_date: str
1220
+ :param _request_timeout: timeout setting for this request. If one
1221
+ number provided, it will be total request
1222
+ timeout. It can also be a pair (tuple) of
1223
+ (connection, read) timeouts.
1224
+ :type _request_timeout: int, tuple(int, int), optional
1225
+ :param _request_auth: set to override the auth_settings for an a single
1226
+ request; this effectively ignores the
1227
+ authentication in the spec for a single request.
1228
+ :type _request_auth: dict, optional
1229
+ :param _content_type: force content-type for the request.
1230
+ :type _content_type: str, Optional
1231
+ :param _headers: set to override the headers for a single
1232
+ request; this effectively ignores the headers
1233
+ in the spec for a single request.
1234
+ :type _headers: dict, optional
1235
+ :param _host_index: set to override the host_index for a single
1236
+ request; this effectively ignores the host_index
1237
+ in the spec for a single request.
1238
+ :type _host_index: int, optional
1239
+ :return: Returns the result object.
1240
+ """ # noqa: E501
1241
+
1242
+ _param = self._api_v1_reporting_personas_legacy_get_serialize(
1243
+ start_date=start_date,
1244
+ end_date=end_date,
1245
+ _request_auth=_request_auth,
1246
+ _content_type=_content_type,
1247
+ _headers=_headers,
1248
+ _host_index=_host_index
1249
+ )
1250
+
1251
+ _response_types_map: Dict[str, Optional[str]] = {
1252
+ '200': "ReportingPersonasResponse",
1253
+ '503': "ReportingPersonasResponse",
1254
+ }
1255
+ response_data = self.api_client.call_api(
1256
+ *_param,
1257
+ _request_timeout=_request_timeout
1258
+ )
1259
+ response_data.read()
1260
+ return self.api_client.response_deserialize(
1261
+ response_data=response_data,
1262
+ response_types_map=_response_types_map,
1263
+ ).data
1264
+
1265
+
1266
+ @validate_call
1267
+ def api_v1_reporting_personas_legacy_get_with_http_info(
1268
+ self,
1269
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
1270
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
1271
+ _request_timeout: Union[
1272
+ None,
1273
+ Annotated[StrictFloat, Field(gt=0)],
1274
+ Tuple[
1275
+ Annotated[StrictFloat, Field(gt=0)],
1276
+ Annotated[StrictFloat, Field(gt=0)]
1277
+ ]
1278
+ ] = None,
1279
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1280
+ _content_type: Optional[StrictStr] = None,
1281
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1282
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1283
+ ) -> ApiResponse[ReportingPersonasResponse]:
1284
+ """Get persona rollup
1285
+
1286
+ Get monthly persona stats
1287
+
1288
+ :param start_date: Start date (YYYY-MM-DD) (required)
1289
+ :type start_date: str
1290
+ :param end_date: End date (YYYY-MM-DD) (required)
1291
+ :type end_date: str
1292
+ :param _request_timeout: timeout setting for this request. If one
1293
+ number provided, it will be total request
1294
+ timeout. It can also be a pair (tuple) of
1295
+ (connection, read) timeouts.
1296
+ :type _request_timeout: int, tuple(int, int), optional
1297
+ :param _request_auth: set to override the auth_settings for an a single
1298
+ request; this effectively ignores the
1299
+ authentication in the spec for a single request.
1300
+ :type _request_auth: dict, optional
1301
+ :param _content_type: force content-type for the request.
1302
+ :type _content_type: str, Optional
1303
+ :param _headers: set to override the headers for a single
1304
+ request; this effectively ignores the headers
1305
+ in the spec for a single request.
1306
+ :type _headers: dict, optional
1307
+ :param _host_index: set to override the host_index for a single
1308
+ request; this effectively ignores the host_index
1309
+ in the spec for a single request.
1310
+ :type _host_index: int, optional
1311
+ :return: Returns the result object.
1312
+ """ # noqa: E501
1313
+
1314
+ _param = self._api_v1_reporting_personas_legacy_get_serialize(
1315
+ start_date=start_date,
1316
+ end_date=end_date,
1317
+ _request_auth=_request_auth,
1318
+ _content_type=_content_type,
1319
+ _headers=_headers,
1320
+ _host_index=_host_index
1321
+ )
1322
+
1323
+ _response_types_map: Dict[str, Optional[str]] = {
1324
+ '200': "ReportingPersonasResponse",
1325
+ '503': "ReportingPersonasResponse",
1326
+ }
1327
+ response_data = self.api_client.call_api(
1328
+ *_param,
1329
+ _request_timeout=_request_timeout
1330
+ )
1331
+ response_data.read()
1332
+ return self.api_client.response_deserialize(
1333
+ response_data=response_data,
1334
+ response_types_map=_response_types_map,
1335
+ )
1336
+
1337
+
1338
+ @validate_call
1339
+ def api_v1_reporting_personas_legacy_get_without_preload_content(
1340
+ self,
1341
+ start_date: Annotated[StrictStr, Field(description="Start date (YYYY-MM-DD)")],
1342
+ end_date: Annotated[StrictStr, Field(description="End date (YYYY-MM-DD)")],
1343
+ _request_timeout: Union[
1344
+ None,
1345
+ Annotated[StrictFloat, Field(gt=0)],
1346
+ Tuple[
1347
+ Annotated[StrictFloat, Field(gt=0)],
1348
+ Annotated[StrictFloat, Field(gt=0)]
1349
+ ]
1350
+ ] = None,
1351
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1352
+ _content_type: Optional[StrictStr] = None,
1353
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1354
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1355
+ ) -> RESTResponseType:
1356
+ """Get persona rollup
1357
+
1358
+ Get monthly persona stats
1359
+
1360
+ :param start_date: Start date (YYYY-MM-DD) (required)
1361
+ :type start_date: str
1362
+ :param end_date: End date (YYYY-MM-DD) (required)
1363
+ :type end_date: str
1364
+ :param _request_timeout: timeout setting for this request. If one
1365
+ number provided, it will be total request
1366
+ timeout. It can also be a pair (tuple) of
1367
+ (connection, read) timeouts.
1368
+ :type _request_timeout: int, tuple(int, int), optional
1369
+ :param _request_auth: set to override the auth_settings for an a single
1370
+ request; this effectively ignores the
1371
+ authentication in the spec for a single request.
1372
+ :type _request_auth: dict, optional
1373
+ :param _content_type: force content-type for the request.
1374
+ :type _content_type: str, Optional
1375
+ :param _headers: set to override the headers for a single
1376
+ request; this effectively ignores the headers
1377
+ in the spec for a single request.
1378
+ :type _headers: dict, optional
1379
+ :param _host_index: set to override the host_index for a single
1380
+ request; this effectively ignores the host_index
1381
+ in the spec for a single request.
1382
+ :type _host_index: int, optional
1383
+ :return: Returns the result object.
1384
+ """ # noqa: E501
1385
+
1386
+ _param = self._api_v1_reporting_personas_legacy_get_serialize(
1387
+ start_date=start_date,
1388
+ end_date=end_date,
1389
+ _request_auth=_request_auth,
1390
+ _content_type=_content_type,
1391
+ _headers=_headers,
1392
+ _host_index=_host_index
1393
+ )
1394
+
1395
+ _response_types_map: Dict[str, Optional[str]] = {
1396
+ '200': "ReportingPersonasResponse",
1397
+ '503': "ReportingPersonasResponse",
1398
+ }
1399
+ response_data = self.api_client.call_api(
1400
+ *_param,
1401
+ _request_timeout=_request_timeout
1402
+ )
1403
+ return response_data.response
1404
+
1405
+
1406
+ def _api_v1_reporting_personas_legacy_get_serialize(
1407
+ self,
1408
+ start_date,
1409
+ end_date,
1410
+ _request_auth,
1411
+ _content_type,
1412
+ _headers,
1413
+ _host_index,
1414
+ ) -> RequestSerialized:
1415
+
1416
+ _host = None
1417
+
1418
+ _collection_formats: Dict[str, str] = {
1419
+ }
1420
+
1421
+ _path_params: Dict[str, str] = {}
1422
+ _query_params: List[Tuple[str, str]] = []
1423
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1424
+ _form_params: List[Tuple[str, str]] = []
1425
+ _files: Dict[
1426
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1427
+ ] = {}
1428
+ _body_params: Optional[bytes] = None
1429
+
1430
+ # process the path parameters
1431
+ # process the query parameters
1432
+ if start_date is not None:
1433
+
1434
+ _query_params.append(('start_date', start_date))
1435
+
1436
+ if end_date is not None:
1437
+
1438
+ _query_params.append(('end_date', end_date))
1439
+
1440
+ # process the header parameters
1441
+ # process the form parameters
1442
+ # process the body parameter
1443
+
1444
+
1445
+ # set the HTTP header `Accept`
1446
+ if 'Accept' not in _header_params:
1447
+ _header_params['Accept'] = self.api_client.select_header_accept(
1448
+ [
1449
+ 'application/json'
1450
+ ]
1451
+ )
1452
+
1453
+
1454
+ # authentication setting
1455
+ _auth_settings: List[str] = [
1456
+ 'TokenAuth',
1457
+ 'ApiKeyAuth'
1458
+ ]
1459
+
1460
+ return self.api_client.param_serialize(
1461
+ method='GET',
1462
+ resource_path='/api/v1/reporting/personas-legacy/',
1463
+ path_params=_path_params,
1464
+ query_params=_query_params,
1465
+ header_params=_header_params,
1466
+ body=_body_params,
1467
+ post_params=_form_params,
1468
+ files=_files,
1469
+ auth_settings=_auth_settings,
1470
+ collection_formats=_collection_formats,
1471
+ _host=_host,
1472
+ _request_auth=_request_auth
1473
+ )
1474
+
1475
+