docs: Add Swift SDK README with comprehensive API documentation and implement authentication provider with JWT support

- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules
- Add AuthProvider class with API key and JWT token support (generateJWTToken, validateJWTToken, getHeaders, clearTokenCache methods)
- Add HTTPClient base class with retry logic, error handling, and timeout management
- Add GraphQLAPI, PaymentAPI, RatingPlanAPI, SubscriberAPI, SystemAPI, and UsageAPI modules
- Add TelecomSDK main client integrating all API
This commit is contained in:
nutcas3
2026-04-25 04:53:22 +03:00
parent 511f7be357
commit f6590462f5
10 changed files with 796 additions and 244 deletions
@@ -0,0 +1,16 @@
import Foundation
/// API for GraphQL queries
public class GraphQLAPI {
private let client: HTTPClient
public init(client: HTTPClient) {
self.client = client
}
/// Execute a GraphQL query
public func execute(query: String, variables: [String: Any]? = nil) async throws -> [String: Any] {
let request = GraphQLRequest(query: query, variables: variables)
return try await client.post(path: "/graphql", body: request)
}
}