Skip to content

feat/add-service-authorization-class/SDKPY-129#47

Merged
felipefdl merged 4 commits intofeat/add-secrets-class/SDKPY-128from
feat/add-service-authorization-class/SDKPY-129
Jul 26, 2025
Merged

feat/add-service-authorization-class/SDKPY-129#47
felipefdl merged 4 commits intofeat/add-secrets-class/SDKPY-128from
feat/add-service-authorization-class/SDKPY-129

Conversation

@mateuscardosodeveloper
Copy link
Contributor

@mateuscardosodeveloper mateuscardosodeveloper commented May 12, 2025

What does PR do?

This pull request introduces a new ServiceAuthorization class to support authorization functionality. It includes the implementation of the ServiceAuthorization module, related types, comprehensive unit tests, and updated documentation.

  • Added related types to support ServiceAuthorization functionality
  • Created tests for ServiceAuthorization class methods in test_service_authorization.py to ensure reliability
  • Functional tests for all the new methods in ServiceAuthorization class
  • Updated documentation to include ServiceAuthorization Type details
  • Revised Resources index to reference new ServiceAuthorization components

JIRA cards.

SDKPY-129

Type of alteration

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Tests

  • Added: 4
  • Removed: 0

@mateuscardosodeveloper mateuscardosodeveloper changed the title result = resources.serviceAuthorization.tokenList({ "page": 1, "fields": ["name", "token", "verification_code"], "amount": 20 }) print(result) feat/add-service-authorization-class/SDKPY-129 May 12, 2025
@mateuscardosodeveloper mateuscardosodeveloper added documentation Improvements or additions to documentation enhancement New feature or request labels May 12, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a new feature for service authorization, adding endpoints for listing, creating, deleting, and editing service authorization tokens as well as updating the associated documentation and tests.

  • Added corresponding methods and type definitions for service authorization in the SDK.
  • Included tests to validate tokenList, tokenCreate, tokenDelete, and tokenEdit functionality.
  • Updated documentation to reflect the new service authorization features.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/Resources/test_service_authorization.py New tests for service authorization endpoints.
src/tagoio_sdk/modules/Resources/Service_Authorization_Types.py Added types for service authorization responses and queries.
src/tagoio_sdk/modules/Resources/Service_Authorization.py Implemented service authorization endpoints (tokenList, tokenCreate, etc.).
src/tagoio_sdk/modules/Resources/Resources.py Updated to include ServiceAuthorization initialization.
src/tagoio_sdk/modules/Resources/AccountDeprecated.py Added ServiceAuthorization to deprecated account class.
docs/source/Resources/index.rst Updated resource index documentation.
docs/source/Resources/ServiceAuthorization/index.rst Added documentation page for service authorization endpoints.
docs/source/Resources/ServiceAuthorization/Service_Authorization_Types.rst Added documentation for service authorization types.

os.environ["T_ANALYSIS_TOKEN"] = "your_token_value"


def mockTokenList() -> list[TokenDataList]:
Copy link

Copilot AI May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type annotation of mockTokenList indicates a list[TokenDataList] but the function returns a dictionary. Consider updating the return type annotation to match the actual returned value.

Suggested change
def mockTokenList() -> list[TokenDataList]:
def mockTokenList() -> dict:

Copilot uses AI. Check for mistakes.
@felipefdl felipefdl merged commit 70a13ae into feat/add-secrets-class/SDKPY-128 Jul 26, 2025
1 check passed
@felipefdl felipefdl deleted the feat/add-service-authorization-class/SDKPY-129 branch July 26, 2025 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants