feat: Update podspec to 1.27, small models changes
This commit is contained in:
parent
d5479f745c
commit
1db3bdb944
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "LeadKit"
|
||||
s.version = "1.25.0"
|
||||
s.version = "1.27"
|
||||
s.summary = "iOS framework with a bunch of tools for rapid development"
|
||||
s.homepage = "https://github.com/TouchInstinct/LeadKit"
|
||||
s.license = "Apache License, Version 2.0"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIAppleMapUtils'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Set of helpers for map objects clustering and interacting using Apple MapKit.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIAuth'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Login, registration, confirmation and other related actions'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ open class CartRequestExecutor<S: Decodable, AE: Decodable, NE>: Cancellable {
|
|||
public var successCompletion: SuccessCompletion
|
||||
|
||||
private var executingRequest: Cancellable?
|
||||
private var numberOfAttempts: Int
|
||||
private var attemptsLeft: Int
|
||||
|
||||
public init(executionClosure: @escaping ExecutionClosure,
|
||||
successCompletion: @escaping SuccessCompletion,
|
||||
numberOfAttempts: Int = 3) {
|
||||
attemptsLeft: Int = 3) {
|
||||
self.executionClosure = executionClosure
|
||||
self.successCompletion = successCompletion
|
||||
self.numberOfAttempts = numberOfAttempts
|
||||
self.attemptsLeft = attemptsLeft
|
||||
}
|
||||
|
||||
open func execute() {
|
||||
|
|
@ -60,8 +60,8 @@ open class CartRequestExecutor<S: Decodable, AE: Decodable, NE>: Cancellable {
|
|||
}
|
||||
|
||||
open func handle(failure: ErrorCollection<EndpointErrorResult<AE, NE>>) {
|
||||
if shouldRetry(failure: failure) && numberOfAttempts > 0 {
|
||||
numberOfAttempts -= 1
|
||||
if shouldRetry(failure: failure) && attemptsLeft > 0 {
|
||||
attemptsLeft -= 1
|
||||
execute()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import Foundation
|
||||
|
||||
public protocol BaseErrorResponseBody: Decodable, Hashable {
|
||||
public protocol BaseErrorResponseBody {
|
||||
///Код ошибки
|
||||
var errorCode: Int { get }
|
||||
///Текст сообщения об ошибке
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public protocol Cart {
|
|||
///Продукты в корзине пользователя
|
||||
var products: [CartProduct] { get }
|
||||
///Применённые промокоды
|
||||
var promocodes: [String] { get }
|
||||
var promocodes: [Promocode] { get }
|
||||
///Количество доступных бонусов для использования
|
||||
var availableBonuses: Int? { get }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public protocol CartProduct {
|
|||
///Идентификатор продукта
|
||||
var id: String { get }
|
||||
///Цена в определённой валюте
|
||||
var price: Price { get }
|
||||
var price: Int { get }
|
||||
///Сколько единиц есть доступно
|
||||
var availableCount: Int? { get }
|
||||
///Варианты товара (фасовка, цвет, размер, и т.п.)
|
||||
|
|
|
|||
|
|
@ -30,20 +30,18 @@ public protocol CartService {
|
|||
var localCart: CartType? { get }
|
||||
var removedProducts: [CartProductType] { get }
|
||||
var notAvailableProducts: [CartProductType] { get }
|
||||
///Примененные промокоды
|
||||
var promocodes: [Promocode] { get }
|
||||
///Примененные бонусы
|
||||
var appliedBonuses: Int? { get }
|
||||
|
||||
//MARK: - Work with products
|
||||
func updateCountInCart(for product: CartProductType, count: Int)
|
||||
func updateCountInCart(for productId: Int, count: Int)
|
||||
func updateCountInCart(for productId: String, count: Int)
|
||||
|
||||
///Возможность вернуть товар в корзину
|
||||
func recoverProductBy(id: Int)
|
||||
func recoverProductBy(id: String)
|
||||
|
||||
//MARK: - Work with promocodes
|
||||
///Применить какой-нибудь промокод
|
||||
///Применить промокод
|
||||
func applyPromocode(_ promocode: String,
|
||||
successCompletion: ParameterClosure<CartType>?,
|
||||
failureCompletion: ParameterClosure<BaseErrorResponseBody>?)
|
||||
|
|
@ -75,6 +73,6 @@ public protocol CartService {
|
|||
//MARK: - Subscribe on changes
|
||||
///Подписаться на изменение корзины
|
||||
func subscribeOnCartChanging(completion: ParameterClosure<CartType>) -> Cancellable
|
||||
//Подписаться на изменение продукта по ID
|
||||
func subscribeOnProductChanging(productId: Int, completion: ParameterClosure<CartProductType>) -> Cancellable
|
||||
///Подписаться на изменение продукта по ID
|
||||
func subscribeOnProductChanging(productId: String, completion: ParameterClosure<CartProductType>) -> Cancellable
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
//
|
||||
// Copyright (c) 2022 Touch Instinct
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the Software), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol Price {
|
||||
///Стоимость
|
||||
var value: Int { get }
|
||||
///Трехсимвольный код валюты в ISO 4217
|
||||
var currencyCode: String { get }
|
||||
}
|
||||
|
|
@ -22,5 +22,6 @@
|
|||
import Foundation
|
||||
|
||||
public protocol Promocode {
|
||||
var discount: Price? { get }
|
||||
var code: String { get }
|
||||
var discount: Int? { get }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIEcommerce'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Cart, products, promocodes, bonuses, receipt and other related actions'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIFoundationUtils'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Set of helpers for Foundation framework classes.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIGoogleMapUtils'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Set of helpers for map objects clustering and interacting using Google Maps SDK.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIKeychainUtils'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Set of helpers for Keychain classes.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIMapUtils'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Set of helpers for map objects clustering and interacting.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIMoyaNetworking'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Moya + Swagger network service.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TINetworking'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Swagger-frendly networking layer helpers.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TINetworkingCache'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Caching results of EndpointRequests.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIPagination'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Generic pagination component.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TISwiftUICore'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Core UI elements: protocols, views and helpers..'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TISwiftUtils'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Bunch of useful helpers for Swift development.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TITableKitUtils'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Set of helpers for TableKit classes.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TITransitions'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Set of custom transitions to present controller. '
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIUIElements'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Bunch of useful protocols and views.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIUIKitCore'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Core UI elements: protocols, views and helpers.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'TIYandexMapUtils'
|
||||
s.version = '1.25.0'
|
||||
s.version = '1.27'
|
||||
s.summary = 'Set of helpers for map objects clustering and interacting using Yandex Maps SDK.'
|
||||
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
|
|
|||
Loading…
Reference in New Issue