Skip to content

Commit 2a8a80d

Browse files
feat/update-class-profile/SDKPY-149 (#57)
* feat: add comprehensive Profile class implementation with all methods Added complete implementation of Profile resource management including profile CRUD operations, team management, token operations, usage statistics, and audit logs. Includes new TypedDict definitions and comprehensive test coverage for all methods. * docs: add comprehensive Sphinx RST documentation for Profile class Added complete RST documentation for all Profile methods and TypedDict definitions. Includes 10 new TypedDict blocks in Profile_Types.rst and all 17 methods documented in index.rst with proper formatting and cross-references. * docs: update Help Center link to the new TagoIO Support URL * fix: update resource references from 'resources.profiles' to 'resources.profile' in doc string examples * feat/update-class-run/SDKPY-150 (#58) * feat: add comprehensive documentation and tests for Run class Add detailed docstrings for all Run class methods with usage examples and authorization policy references. Include new EmailTestData type for email testing functionality. Implement comprehensive test suite covering all Run methods with mocked API responses. * docs: update Sphinx documentation for Run class methods Update RST documentation with detailed method descriptions, usage examples, and authorization policy references. Add EmailTestData type documentation and restructure all Run method docs with consistent formatting and Help Center links. * feat: make query parameter optional in Run.listUsers method The query parameter is now optional with an empty dict as default value, making it easier to retrieve all users without specifying query filters. * feat: update listUsers method to use None as default for query parameter
1 parent c288d8a commit 2a8a80d

11 files changed

Lines changed: 2559 additions & 235 deletions

File tree

docs/source/Resources/Profile/Profile_Types.rst

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,230 @@ TypedDict representing the summary of a profile.
226226
227227
| **addons**: :ref:`ProfileAddOns`
228228
| The add-ons of the profile.
229+
230+
231+
.. _UsageStatistic:
232+
233+
UsageStatistic
234+
-----------------
235+
TypedDict representing a single usage statistic with timestamp.
236+
237+
Not all of the services will be present for every statistic, only if for the usage period the service was used.
238+
239+
**Properties:**
240+
241+
| **time**: datetime
242+
| Timestamp for the usage statistic.
243+
244+
| **input**: Union[int, float]
245+
| Input data usage.
246+
247+
| **output**: Union[int, float]
248+
| Output data usage.
249+
250+
| **analysis**: Union[int, float]
251+
| Analysis execution time used.
252+
253+
| **sms**: Union[int, float]
254+
| SMS messages sent.
255+
256+
| **email**: Union[int, float]
257+
| Email messages sent.
258+
259+
| **data_records**: Union[int, float]
260+
| Data records stored.
261+
262+
| **run_users**: Union[int, float]
263+
| Run users used.
264+
265+
| **push_notification**: Union[int, float]
266+
| Push notifications sent.
267+
268+
| **file_storage**: Union[int, float]
269+
| File storage used.
270+
271+
| **tcore**: Union[int, float]
272+
| TCore resources used.
273+
274+
275+
.. _AuditLogEvent:
276+
277+
AuditLogEvent
278+
-----------------
279+
TypedDict representing a single audit log event.
280+
281+
**Properties:**
282+
283+
| **resourceName**: str
284+
| Name of the resource that triggered the event.
285+
286+
| **message**: str
287+
| Descriptive message about the event.
288+
289+
| **resourceID**: :ref:`GenericID`
290+
| ID of the resource that triggered the event.
291+
292+
| **who**: :ref:`GenericID`
293+
| ID of the account that performed the action.
294+
295+
| **date**: datetime
296+
| Timestamp when the event occurred.
297+
298+
299+
.. _AuditLogStatistics:
300+
301+
AuditLogStatistics
302+
------------------
303+
TypedDict representing statistics for an audit log query.
304+
305+
**Properties:**
306+
307+
| **recordsMatched**: int
308+
| Number of records that matched the query.
309+
310+
| **recordsScanned**: int
311+
| Number of records scanned during the query.
312+
313+
| **bytesScanned**: int
314+
| Number of bytes scanned during the query.
315+
316+
317+
.. _AuditLog:
318+
319+
AuditLog
320+
-----------------
321+
TypedDict representing an audit log query result.
322+
323+
**Properties:**
324+
325+
| **events**: list[:ref:`AuditLogEvent`]
326+
| List of audit log events.
327+
328+
| **statistics**: :ref:`AuditLogStatistics`
329+
| Statistics about the query execution.
330+
331+
| **status**: Literal["Running", "Complete", "Failed", "Timeout", "Unknown"]
332+
| Current status of the audit log query.
333+
334+
| **queryId**: str
335+
| Unique identifier for the audit log query.
336+
337+
338+
.. _AuditLogFilter:
339+
340+
AuditLogFilter
341+
-----------------
342+
TypedDict representing filters for audit log queries.
343+
344+
**Properties:**
345+
346+
| **resourceID**: :ref:`GenericID`
347+
| Filter by specific resource ID.
348+
349+
| **resourceName**: Literal["action", "am", "analysis", "connector", "dashboard", "device", "dictionary", "network", "profile", "run", "runuser"]
350+
| Filter by resource type.
351+
352+
| **find**: str
353+
| Search string for filtering events.
354+
355+
| **start_date**: Union[str, datetime]
356+
| Start date for the query range.
357+
358+
| **end_date**: Union[str, datetime]
359+
| End date for the query range.
360+
361+
| **limit**: int
362+
| Maximum number of results to return.
363+
364+
365+
.. _AddonInfo:
366+
367+
AddonInfo
368+
-----------------
369+
TypedDict representing profile addon information.
370+
371+
**Properties:**
372+
373+
| **id**: :ref:`GenericID`
374+
| The addon ID.
375+
376+
| **name**: str
377+
| The addon name.
378+
379+
| **logo_url**: Optional[str]
380+
| URL of the addon's logo.
381+
382+
383+
.. _StatisticsDate:
384+
385+
StatisticsDate
386+
-----------------
387+
TypedDict representing parameters for fetching usage statistics.
388+
389+
**Properties:**
390+
391+
| **timezone**: str
392+
| Timezone to be used in the statistics entries (default: "UTC").
393+
394+
| **date**: Union[str, datetime]
395+
| Timestamp for fetching hourly statistics in a day.
396+
397+
| **start_date**: Union[str, datetime]
398+
| Starting date for fetching statistics in an interval.
399+
400+
| **end_date**: Union[str, datetime]
401+
| End date for fetching statistics in an interval.
402+
403+
| **periodicity**: Literal["hour", "day", "month"]
404+
| Periodicity of the statistics to fetch (default: "hour").
405+
406+
407+
.. _ProfileTeam:
408+
409+
ProfileTeam
410+
-----------------
411+
TypedDict representing a team member with access to a profile.
412+
413+
**Properties:**
414+
415+
| **active**: bool
416+
| Whether the team member's access is active.
417+
418+
| **created_at**: datetime
419+
| When the team member was added.
420+
421+
| **email**: str
422+
| Email address of the team member.
423+
424+
| **id**: str
425+
| Account ID of the team member.
426+
427+
| **name**: str
428+
| Name of the team member.
429+
430+
431+
.. _ProfileCreateInfo:
432+
433+
ProfileCreateInfo
434+
-----------------
435+
TypedDict representing the information needed to create a new profile.
436+
437+
**Properties:**
438+
439+
| **name**: str
440+
| Name of the profile to be created.
441+
442+
443+
.. _ProfileCredentials:
444+
445+
ProfileCredentials
446+
------------------
447+
TypedDict representing credentials required for sensitive profile operations.
448+
449+
**Properties:**
450+
451+
| **password**: str
452+
| Account password.
453+
454+
| **pin_code**: str
455+
| Two-factor authentication PIN code (required when 2FA is enabled).

0 commit comments

Comments
 (0)