Compare commits

..

30 Commits

Author SHA1 Message Date
Peter Zignego 98dbad9ac7 5.1.1 (#170) 2019-10-14 21:59:53 -04:00
Peter Zignego 436014cfec Update for Swift 5.1 and Xcode 11 (#168)
* Rebuild dependencies with 5.1

* Import FoundationNetworking if found
2019-10-09 21:55:56 -04:00
Peter Zignego d50d74b78a Merge pull request #166 from RomanPodymov/master
Codable vol.2 - CustomProfileField, DoNotDisturbStatus, TeamIcon and Topic
2019-08-14 21:36:10 -04:00
Roman Podymov 80ce1c4731 missing tests 2019-07-31 23:46:05 +02:00
Roman Podymov 5ddf6d9f1a json for tests 2019-07-31 23:21:49 +02:00
Peter Zignego 267cf26b2e Merge pull request #165 from vasilenkoigor/UsersLookupByEmail-Endpoint
Added missed users.lookupByEmail endpoint
2019-07-25 21:20:42 -04:00
Roman Podymov 580a857f11 CustomProfileField, DoNotDisturbStatus, TeamIcon, Topic conform to Codable 2019-07-25 22:33:14 +02:00
i.v.vasilenko c3817bea15 Added missed parameter for users.lookupByEmail endpoint 2019-07-21 21:53:30 +03:00
i.v.vasilenko 492f51ce9b Added missed endpoint users.lookupByEmail 2019-07-21 21:33:38 +03:00
Roman Podymov 45b4e3f191 Merge pull request #1 from pvzig/master
Update master
2019-07-21 16:34:21 +02:00
Peter Zignego dd72c619d3 Merge pull request #164 from RobotsAndPencils/add_block_support
Adding Blocks support
2019-07-17 09:50:25 -04:00
Peter Zignego 43af10de88 Merge branch 'master' into add_block_support 2019-07-17 09:43:55 -04:00
Brad Brown 7ba97e4893 Adding Blocks support 2019-07-16 09:26:14 -05:00
Peter Zignego 0c24cb2262 Merge pull request #163 from RomanPodymov/master
Action, AttachmentField, Edited and Reply conform to Codable
2019-07-12 10:30:23 -04:00
Roman Podymov 7b76b76b94 Update XCTestManifests.swift 2019-06-26 00:33:52 +02:00
Roman Podymov 565c44677b Update XCTestManifests.swift 2019-06-26 00:33:38 +02:00
Roman Podymov 30dc3679c1 Fixed tests 2019-06-26 00:26:19 +02:00
Roman Podymov 9a18cae265 removed \n 2019-06-23 22:39:44 +02:00
Roman Podymov c04654a87b tests for Action 2019-06-23 22:38:45 +02:00
Roman Podymov bd7f67b3b0 attachmentfield tests 2019-06-22 17:03:01 +02:00
Roman Podymov 833add707f removed \n 2019-06-22 16:49:28 +02:00
Roman Podymov 9118a7688a tests for Reply (added missing files) 2019-06-22 16:46:36 +02:00
Roman Podymov cba1eb36a2 Tests for Reply 2019-06-22 16:45:11 +02:00
Roman Podymov d15139d00d Update Reply.swift 2019-06-22 14:53:35 +02:00
Roman Podymov c1cf9b47d8 Update AttachmentField.swift 2019-06-22 14:49:43 +02:00
Roman Podymov 986367be38 Update Action.swift 2019-06-22 14:48:08 +02:00
Peter Zignego 7d207136b3 Merge pull request #162 from pvzig/ci-update
Update to Azure Pipelines to macOS 10.14 and Xcode 10.2
2019-04-11 20:40:16 -04:00
Peter Zignego 0fa3b72a56 Workspace path 2019-04-11 20:36:18 -04:00
Peter Zignego 67d2bb3f62 xcodeVersion 2019-04-11 20:08:26 -04:00
Peter Zignego f2c333f57d Update to macOS 10.14 and Xcode 10.2 2019-04-11 20:01:40 -04:00
108 changed files with 2875 additions and 124 deletions
+1 -1
View File
@@ -1 +1 @@
5.0
5.1
@@ -1,6 +1,10 @@
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -112,6 +116,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -153,6 +166,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -164,6 +180,461 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
@import ObjectiveC;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
@class NSStream;
SWIFT_CLASS("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#elif defined(__i386__) && __i386__
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
@import ObjectiveC;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
@class NSStream;
SWIFT_CLASS("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#else
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -209,7 +680,7 @@ SWIFT_CLASS("_TtC10Starscream9WebSocket")
#pragma clang diagnostic pop
#elif defined(__ARM_ARCH_7A__) && __ARM_ARCH_7A__
// Generated by Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -321,6 +792,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -362,6 +842,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -373,6 +856,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -418,3 +904,5 @@ SWIFT_CLASS("_TtC10Starscream9WebSocket")
#pragma clang diagnostic pop
#endif
#endif
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,10 @@
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.0 effective-4.2 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
#elif defined(__x86_64__) && __x86_64__
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -112,6 +116,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -153,6 +166,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -164,6 +180,435 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#elif defined(__i386__) && __i386__
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#else
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -196,7 +641,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#pragma clang diagnostic pop
#elif defined(__ARM_ARCH_7A__) && __ARM_ARCH_7A__
// Generated by Apple Swift version 5.0 effective-4.2 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -308,6 +753,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -349,6 +803,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -360,6 +817,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -392,3 +852,5 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#pragma clang diagnostic pop
#endif
#endif
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
// Generated by Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -110,6 +110,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -151,6 +160,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -162,6 +174,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18E226</string>
<string>18G103</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -29,17 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10E125</string>
<string>11A419c</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18E219</string>
<string>19A547</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1020</string>
<string>1100</string>
<key>DTXcodeBuild</key>
<string>10E125</string>
<string>11A419c</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
@@ -1,4 +1,4 @@
// Generated by Apple Swift version 5.0 effective-4.2 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -110,6 +110,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -151,6 +160,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -162,6 +174,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18E226</string>
<string>18G103</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@@ -29,17 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10E125</string>
<string>11A419c</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18E219</string>
<string>19A547</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1020</string>
<string>1100</string>
<key>DTXcodeBuild</key>
<string>10E125</string>
<string>11A419c</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Damian Kołakowski. All rights reserved.</string>
<key>UIDeviceFamily</key>
@@ -1,4 +1,8 @@
// Generated by Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -110,6 +114,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -151,6 +164,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -162,6 +178,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -205,3 +224,229 @@ SWIFT_CLASS("_TtC10Starscream9WebSocket")
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#else
// Generated by Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
@import ObjectiveC;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Starscream",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
@class NSStream;
SWIFT_CLASS("_TtC10Starscream16FoundationStream")
@interface FoundationStream : NSObject <NSStreamDelegate>
/// Delegate for the stream methods. Processes incoming bytes
- (void)stream:(NSStream * _Nonnull)aStream handleEvent:(NSStreamEvent)eventCode;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC10Starscream9WebSocket")
@interface WebSocket : NSObject <NSStreamDelegate>
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,8 @@
// Generated by Apple Swift version 5.0 effective-4.2 (swiftlang-1001.0.69.5 clang-1001.0.46.3)
#ifndef TARGET_OS_SIMULATOR
#include <TargetConditionals.h>
#endif
#if TARGET_OS_SIMULATOR
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
@@ -110,6 +114,15 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
@@ -151,6 +164,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
@@ -162,6 +178,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
@@ -192,3 +211,216 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#else
// Generated by Apple Swift version 5.1 effective-4.2 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Swifter",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
Binary file not shown.
Binary file not shown.
+126 -36
View File
@@ -22,6 +22,18 @@
// THE SOFTWARE.
public struct Action {
fileprivate enum CodingKeys: String {
case name
case text
case type
case value
case url
case style
case confirm
case options
case dataSource = "data_source"
}
public let name: String?
public let text: String?
public let type: String?
@@ -31,17 +43,17 @@ public struct Action {
public let confirm: Confirm?
public let options: [Option]?
public let dataSource: DataSource?
public init(action: [String: Any]?) {
name = action?["name"] as? String
text = action?["text"] as? String
type = action?["type"] as? String
value = action?["value"] as? String
url = action?["url"] as? String
style = ActionStyle(rawValue: action?["style"] as? String ?? "")
confirm = Confirm(confirm:action?["confirm"] as? [String: Any])
options = (action?["options"] as? [[String: Any]])?.map { Option(option: $0) }
dataSource = DataSource(rawValue: action?["data_source"] as? String ?? "")
name = action?[CodingKeys.name] as? String
text = action?[CodingKeys.text] as? String
type = action?[CodingKeys.type] as? String
value = action?[CodingKeys.value] as? String
url = action?[CodingKeys.url] as? String
style = ActionStyle(rawValue: action?[CodingKeys.style] as? String ?? "")
confirm = Confirm(confirm:action?[CodingKeys.confirm] as? [String: Any])
options = (action?[CodingKeys.options] as? [[String: Any]])?.map { Option(option: $0) }
dataSource = DataSource(rawValue: action?[CodingKeys.dataSource] as? String ?? "")
}
public init(name: String, text: String, type: String = "button", style: ActionStyle = .defaultStyle, value: String? = nil,
@@ -59,29 +71,36 @@ public struct Action {
public var dictionary: [String: Any] {
var dict = [String: Any]()
dict["name"] = name
dict["text"] = text
dict["type"] = type
dict["value"] = value
dict["url"] = url
dict["style"] = style?.rawValue
dict["confirm"] = confirm?.dictionary
dict["options"] = options?.map { $0.dictionary }
dict["data_source"] = dataSource?.rawValue
dict[CodingKeys.name] = name
dict[CodingKeys.text] = text
dict[CodingKeys.type] = type
dict[CodingKeys.value] = value
dict[CodingKeys.url] = url
dict[CodingKeys.style] = style?.rawValue
dict[CodingKeys.confirm] = confirm?.dictionary
dict[CodingKeys.options] = options?.map { $0.dictionary }
dict[CodingKeys.dataSource] = dataSource?.rawValue
return dict
}
public struct Confirm {
fileprivate enum CodingKeys: String {
case title
case text
case okText = "ok_text"
case dismissText = "dismiss_text"
}
public let title: String?
public let text: String?
public let okText: String?
public let dismissText: String?
public init(confirm: [String: Any]?) {
title = confirm?["title"] as? String
text = confirm?["text"] as? String
okText = confirm?["ok_text"] as? String
dismissText = confirm?["dismiss_text"] as? String
title = confirm?[CodingKeys.title] as? String
text = confirm?[CodingKeys.text] as? String
okText = confirm?[CodingKeys.okText] as? String
dismissText = confirm?[CodingKeys.dismissText] as? String
}
public init(text: String, title: String? = nil, okText: String? = nil, dismissText: String? = nil) {
@@ -93,21 +112,26 @@ public struct Action {
public var dictionary: [String: Any] {
var dict = [String: Any]()
dict["title"] = title
dict["text"] = text
dict["ok_text"] = okText
dict["dismiss_text"] = dismissText
dict[CodingKeys.title] = title
dict[CodingKeys.text] = text
dict[CodingKeys.okText] = okText
dict[CodingKeys.dismissText] = dismissText
return dict
}
}
public struct Option {
fileprivate enum CodingKeys: String {
case text
case value
}
public let text: String?
public let value: String?
public init(option: [String: Any]?) {
text = option?["text"] as? String
value = option?["value"] as? String
text = option?[CodingKeys.text] as? String
value = option?[CodingKeys.value] as? String
}
public init(text: String, value: String) {
@@ -117,26 +141,92 @@ public struct Action {
public var dictionary: [String: Any] {
var dict = [String: Any]()
dict["text"] = text
dict["value"] = value
dict[CodingKeys.text] = text
dict[CodingKeys.value] = value
return dict
}
}
public enum DataSource: String {
public enum DataSource: String, Codable {
case users
case channels
case conversations
}
}
public enum ActionStyle: String {
extension Action: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
name = try values.decodeIfPresent(String.self, forKey: .name)
text = try values.decodeIfPresent(String.self, forKey: .text)
type = try values.decodeIfPresent(String.self, forKey: .type)
value = try values.decodeIfPresent(String.self, forKey: .value)
url = try values.decodeIfPresent(String.self, forKey: .url)
style = try values.decodeIfPresent(ActionStyle.self, forKey: .style)
confirm = try values.decodeIfPresent(Confirm.self, forKey: .confirm)
options = try values.decodeIfPresent([Option].self, forKey: .options)
dataSource = try values.decodeIfPresent(DataSource.self, forKey: .dataSource)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(name, forKey: .name)
try container.encode(text, forKey: .text)
try container.encode(type, forKey: .type)
try container.encode(value, forKey: .value)
try container.encode(url, forKey: .url)
try container.encode(style, forKey: .style)
try container.encode(confirm, forKey: .confirm)
try container.encode(options, forKey: .options)
try container.encode(dataSource, forKey: .dataSource)
}
}
extension Action.CodingKeys: CodingKey { }
extension Action.Confirm: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
title = try values.decodeIfPresent(String.self, forKey: .title)
text = try values.decodeIfPresent(String.self, forKey: .text)
okText = try values.decodeIfPresent(String.self, forKey: .okText)
dismissText = try values.decodeIfPresent(String.self, forKey: .dismissText)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(title, forKey: .title)
try container.encode(text, forKey: .text)
try container.encode(okText, forKey: .okText)
try container.encode(dismissText, forKey: .dismissText)
}
}
extension Action.Confirm.CodingKeys: CodingKey { }
extension Action.Option: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
text = try values.decodeIfPresent(String.self, forKey: .text)
value = try values.decodeIfPresent(String.self, forKey: .value)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(text, forKey: .text)
try container.encode(value, forKey: .value)
}
}
extension Action.Option.CodingKeys: CodingKey { }
public enum ActionStyle: String, Codable {
case defaultStyle = "default"
case primary = "primary"
case danger = "danger"
}
public enum MessageResponseType: String {
public enum MessageResponseType: String, Codable {
case inChannel = "in_channel"
case ephemeral = "ephemeral"
}
+31 -7
View File
@@ -22,14 +22,20 @@
// THE SOFTWARE.
public struct AttachmentField {
fileprivate enum CodingKeys: String {
case title
case value
case short
}
public let title: String?
public let value: String?
public let short: Bool?
public init(field: [String: Any]?) {
title = field?["title"] as? String
value = field?["value"] as? String
short = field?["short"] as? Bool
title = field?[CodingKeys.title] as? String
value = field?[CodingKeys.value] as? String
short = field?[CodingKeys.short] as? Bool
}
public init(title: String?, value: String?, short: Bool? = nil) {
@@ -40,9 +46,27 @@ public struct AttachmentField {
public var dictionary: [String: Any] {
var field = [String: Any]()
field["title"] = title
field["value"] = value
field["short"] = short
field[CodingKeys.title] = title
field[CodingKeys.value] = value
field[CodingKeys.short] = short
return field
}
}
extension AttachmentField: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
title = try values.decodeIfPresent(String.self, forKey: .title)
value = try values.decodeIfPresent(String.self, forKey: .value)
short = try values.decodeIfPresent(Bool.self, forKey: .short)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(title, forKey: .title)
try container.encode(value, forKey: .value)
try container.encode(short, forKey: .short)
}
}
extension AttachmentField.CodingKeys: CodingKey { }
+96
View File
@@ -0,0 +1,96 @@
/// Defined by https://api.slack.com/reference/messaging/composition-objects#text
public struct TextComposition {
/// The type of block. Can be one of plainText or markdown.
public let type: BlockType
public let text: String
public let emoji: Bool?
public let verbatim: Bool?
public init(type: BlockType,
text: String,
emoji: Bool? = nil,
verbatim: Bool? = nil) {
self.type = type
self.text = text
self.emoji = emoji
self.verbatim = verbatim
}
public var dictionary: [String: Any] {
var composition = [String: Any]()
composition["type"] = type.rawValue
composition["text"] = text
composition["emoji"] = emoji
composition["verbatim"] = verbatim
return composition
}
}
/// Defined by https://api.slack.com/reference/messaging/composition-objects#option
public struct OptionComposition {
public let text: TextComposition
public let value: String
public let url: String?
public init(text: TextComposition,
value: String,
url: String? = nil) {
self.text = text
self.value = value
self.url = url
}
public var dictionary: [String: Any] {
var composition = [String: Any]()
composition["text"] = text.dictionary
composition["value"] = value
composition["url"] = url
return composition
}
}
/// Defined by https://api.slack.com/reference/messaging/composition-objects#option-group
public struct OptionGroupComposition {
public let label: TextComposition
public let options: [OptionComposition]
public init(label: TextComposition,
options: [OptionComposition]) {
self.label = label
self.options = options
}
public var dictionary: [String: Any] {
var composition = [String: Any]()
composition["label"] = label.dictionary
composition["options"] = options.map { $0.dictionary }
return composition
}
}
/// Defined by https://api.slack.com/reference/messaging/composition-objects#confirm
public struct ConfirmComposition {
public let title: TextComposition
public let text: TextComposition
public let confirm: TextComposition
public let deny: TextComposition
public init(title: TextComposition,
text: TextComposition,
confirm: TextComposition,
deny: TextComposition) {
self.title = title
self.text = text
self.confirm = confirm
self.deny = deny
}
public var dictionary: [String: Any] {
var composition = [String: Any]()
composition["title"] = title.dictionary
composition["text"] = text.dictionary
composition["confirm"] = confirm.dictionary
composition["deny"] = deny.dictionary
return composition
}
}
+354
View File
@@ -0,0 +1,354 @@
public protocol BlockElement {
var dictionary: [String: Any] { get }
}
public protocol SectionElement: BlockElement {}
public protocol ActionsElement: BlockElement {}
public protocol ContextElement: BlockElement {}
/// Defined by https://api.slack.com/reference/messaging/block-elements#image
public struct ImageElement: BlockElement, SectionElement, ContextElement {
/// Type will always be image.
public let type: BlockType
public let imageURL: String
public let altText: String
public init(type: BlockType = .image,
imageURL: String,
altText: String) {
self.type = type
self.imageURL = imageURL
self.altText = altText
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["image_url"] = imageURL
element["alt_text"] = altText
return element
}
}
/// Custom type to better support Context PlainText
public struct PlainTextElement: BlockElement, ContextElement {
/// Type will always be image.
public let type: BlockType
public let text: String
public init(type: BlockType = .plainText,
text: String) {
self.type = type
self.text = text
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["text"] = text
return element
}
}
/// Custom type to better support Context Markdown Text
public struct MarkdownTextElement: BlockElement, ContextElement {
/// Type will always be image.
public let type: BlockType
public let text: String
public init(type: BlockType = .markdown,
text: String) {
self.type = type
self.text = text
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["text"] = text
return element
}
}
public enum ButtonElementStyle: String, CaseIterable {
case `default`
case primary
case danger
}
/// Defined by https://api.slack.com/reference/messaging/block-elements#button
public struct ButtonElement: BlockElement, SectionElement, ActionsElement {
/// Type will always be button.
public let type: BlockType
public let text: TextComposition
public let actionId: String
public let url: String?
public let value: String?
public let style: ButtonElementStyle?
public init(type: BlockType = .button,
text: TextComposition,
actionId: String,
url: String? = nil,
value: String? = nil,
style: ButtonElementStyle? = nil) {
self.type = type
self.text = text
self.actionId = actionId
self.url = url
self.value = value
self.style = style
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["text"] = text.dictionary
element["action_id"] = actionId
element["url"] = url
element["value"] = value
element["style"] = style
return element
}
}
/// Defined by https://api.slack.com/reference/messaging/block-elements#static-select
public struct StaticSelectElement: BlockElement, SectionElement, ActionsElement {
/// Type will always be static_select.
public let type: BlockType
public let placeholder: TextComposition
public let actionId: String
public let options: [OptionComposition]?
public let optionGroups: [OptionGroupComposition]?
public let initialOption: OptionComposition?
public let initialOptionGroup: OptionGroupComposition?
public let confirm: ConfirmComposition?
public init(type: BlockType = .staticSelect,
placeholder: TextComposition,
actionId: String,
options: [OptionComposition]? = nil,
optionGroups: [OptionGroupComposition]? = nil,
initialOption: OptionComposition? = nil,
initialOptionGroup: OptionGroupComposition? = nil,
confirm: ConfirmComposition? = nil) {
self.type = type
self.placeholder = placeholder
self.actionId = actionId
self.options = options
self.optionGroups = optionGroups
self.initialOption = initialOption
self.initialOptionGroup = initialOptionGroup
self.confirm = confirm
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["placeholder"] = placeholder.dictionary
element["action_id"] = actionId
element["options"] = options?.map { $0.dictionary }
element["option_groups"] = optionGroups?.map { $0.dictionary }
element["initial_option"] = initialOption?.dictionary ?? initialOptionGroup?.dictionary
element["confirm"] = confirm?.dictionary
return element
}
}
/// Defined by https://api.slack.com/reference/messaging/block-elements#external-select
public struct ExternalSelectElement: BlockElement, SectionElement, ActionsElement {
/// Type will always be externalSelect.
public let type: BlockType
public let placeholder: TextComposition
public let actionId: String
public let initialOption: OptionComposition?
public let initialOptionGroup: OptionGroupComposition?
public let minQueryLenght: Int?
public let confirm: ConfirmComposition?
public init(type: BlockType = .externalSelect,
placeholder: TextComposition,
actionId: String,
initialOption: OptionComposition? = nil,
initialOptionGroup: OptionGroupComposition? = nil,
minQueryLenght: Int?,
confirm: ConfirmComposition? = nil) {
self.type = type
self.placeholder = placeholder
self.actionId = actionId
self.initialOption = initialOption
self.initialOptionGroup = initialOptionGroup
self.minQueryLenght = minQueryLenght
self.confirm = confirm
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["placeholder"] = placeholder.dictionary
element["action_id"] = actionId
element["initial_option"] = initialOption?.dictionary ?? initialOptionGroup?.dictionary
element["min_query_length"] = minQueryLenght
element["confirm"] = confirm?.dictionary
return element
}
}
/// Defined by https://api.slack.com/reference/messaging/block-elements#user-select
public struct UsersSelectElement: BlockElement, SectionElement, ActionsElement {
/// Type will always be usersSelect.
public let type: BlockType
public let placeholder: TextComposition
public let actionId: String
public let initialUserId: String?
public let confirm: ConfirmComposition?
public init(type: BlockType = .usersSelect,
placeholder: TextComposition,
actionId: String,
initialUserId: String?,
confirm: ConfirmComposition? = nil) {
self.type = type
self.placeholder = placeholder
self.actionId = actionId
self.initialUserId = initialUserId
self.confirm = confirm
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["placeholder"] = placeholder.dictionary
element["action_id"] = actionId
element["initial_user"] = initialUserId
element["confirm"] = confirm?.dictionary
return element
}
}
/// Defined by https://api.slack.com/reference/messaging/block-elements#converstation-select
public struct ConverstationSelectElement: BlockElement, SectionElement, ActionsElement {
/// Type will always be converstationSelect.
public let type: BlockType
public let placeholder: TextComposition
public let actionId: String
public let initialConverstationId: String?
public let confirm: ConfirmComposition?
public init(type: BlockType = .converstationSelect,
placeholder: TextComposition,
actionId: String,
initialConverstationId: String?,
confirm: ConfirmComposition? = nil) {
self.type = type
self.placeholder = placeholder
self.actionId = actionId
self.initialConverstationId = initialConverstationId
self.confirm = confirm
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["placeholder"] = placeholder.dictionary
element["action_id"] = actionId
element["initial_conversation"] = initialConverstationId
element["confirm"] = confirm?.dictionary
return element
}
}
/// Defined by https://api.slack.com/reference/messaging/block-elements#channel-select
public struct ChannelSelectElement: BlockElement, SectionElement, ActionsElement {
/// Type will always be channelSelect.
public let type: BlockType
public let placeholder: TextComposition
public let actionId: String
public let initialChannelId: String?
public let confirm: ConfirmComposition?
public init(type: BlockType = .channelSelect,
placeholder: TextComposition,
actionId: String,
initialChannelId: String?,
confirm: ConfirmComposition? = nil) {
self.type = type
self.placeholder = placeholder
self.actionId = actionId
self.initialChannelId = initialChannelId
self.confirm = confirm
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["placeholder"] = placeholder.dictionary
element["action_id"] = actionId
element["initial_channel"] = initialChannelId
element["confirm"] = confirm?.dictionary
return element
}
}
/// Defined by https://api.slack.com/reference/messaging/block-elements#overflow
public struct OverflowElement: BlockElement, SectionElement, ActionsElement {
/// Type will always be overflow.
public let type: BlockType
public let actionId: String
public let options: [OptionComposition]
public let confirm: ConfirmComposition?
public init(type: BlockType = .overflow,
placeholder: TextComposition,
actionId: String,
options: [OptionComposition],
confirm: ConfirmComposition? = nil) {
self.type = type
self.actionId = actionId
self.options = options
self.confirm = confirm
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["action_id"] = actionId
element["options"] = options
element["confirm"] = confirm?.dictionary
return element
}
}
/// Defined by https://api.slack.com/reference/messaging/block-elements#overflow
public struct DatePickerElement: BlockElement, SectionElement, ActionsElement {
/// Type will always be datePicker.
public let type: BlockType
public let actionId: String
public let placeholder: TextComposition?
public let initialDate: String?
public let confirm: ConfirmComposition?
public init(type: BlockType = .datePicker,
actionId: String,
placeholder: TextComposition?,
initialDate: String? = nil,
confirm: ConfirmComposition? = nil) {
self.type = type
self.actionId = actionId
self.placeholder = placeholder
self.initialDate = initialDate
self.confirm = confirm
}
public var dictionary: [String: Any] {
var element = [String: Any]()
element["type"] = type.rawValue
element["action_id"] = actionId
element["placeholder"] = placeholder?.dictionary
element["initial_date"] = initialDate
element["confirm"] = confirm?.dictionary
return element
}
}
+156
View File
@@ -0,0 +1,156 @@
public protocol Block {
var dictionary: [String: Any] { get }
}
public enum BlockType: String, CaseIterable {
case actions
case button
case context
case datePicker = "datepicker"
case divider
case image
case markdown = "mrkdwn"
case overflow
case plainText = "plain_text"
case section
// Selects
case channelSelect = "channels_select"
case converstationSelect = "conversations_select"
case externalSelect = "external_select"
case staticSelect = "static_select"
case usersSelect = "users_select"
}
/// Defined by https://api.slack.com/reference/messaging/blocks#section
public struct SectionBlock: Block {
/// Type will always be section.
public let type: BlockType
public let text: TextComposition
public let blockId: String?
public let fields: [TextComposition]?
public let accessory: SectionElement?
public init(type: BlockType = .section,
text: TextComposition,
blockId: String? = nil,
fields: [TextComposition]? = nil,
accessory: SectionElement? = nil) {
self.type = type
self.text = text
self.blockId = blockId
self.fields = fields
self.accessory = accessory
}
public var dictionary: [String: Any] {
var block = [String: Any]()
block["type"] = type.rawValue
block["text"] = text.dictionary
block["block_id"] = blockId
block["fields"] = fields?.map { $0.dictionary }
block["accessory"] = accessory?.dictionary
return block
}
}
/// Defined by https://api.slack.com/reference/messaging/blocks#divider
public struct DividerBlock: Block {
/// Type will always be divider.
public let type: BlockType
public let blockId: String?
public init(type: BlockType = .divider,
blockId: String? = nil) {
self.type = type
self.blockId = blockId
}
public var dictionary: [String: Any] {
var block = [String: Any]()
block["type"] = type
block["block_id"] = blockId
return block
}
}
/// Defined by https://api.slack.com/reference/messaging/blocks#image
public struct ImageBlock: Block {
/// Type will always be image.
public let type: BlockType
public let imageURL: String
public let altText: String
public let title: String?
public let blockId: String?
public init(type: BlockType = .image,
imageURL: String,
altText: String,
title: String? = nil,
blockId: String? = nil) {
self.type = type
self.imageURL = imageURL
self.altText = altText
self.title = title
self.blockId = blockId
}
public var dictionary: [String: Any] {
var block = [String: Any]()
block["type"] = type.rawValue
block["image_url"] = imageURL
block["alt_text"] = altText
block["title"] = title
block["block_id"] = blockId
return block
}
}
/// Defined by https://api.slack.com/reference/messaging/blocks#actions
public struct ActionsBlock: Block {
/// Type will always be actions.
public let type: BlockType
public let elements: [ActionsElement]
public let blockId: String?
public init(type: BlockType = .actions,
elements: [ActionsElement],
blockId: String? = nil) {
self.type = type
self.elements = elements
self.blockId = blockId
}
public var dictionary: [String: Any] {
var block = [String: Any]()
block["type"] = type.rawValue
block["elements"] = elements.map { $0.dictionary }
block["block_id"] = blockId
return block
}
}
/// Defined by https://api.slack.com/reference/messaging/blocks#context
public struct ContextBlock: Block {
/// Type will always be actions.
public let type: BlockType
public let elements: [ContextElement]
public let blockId: String?
public init(type: BlockType = .context,
elements: [ContextElement],
blockId: String? = nil) {
self.type = type
self.elements = elements
self.blockId = blockId
}
public var dictionary: [String: Any] {
var block = [String: Any]()
block["type"] = type.rawValue
block["elements"] = elements.map { $0.dictionary }
block["block_id"] = blockId
return block
}
}
+55 -10
View File
@@ -22,6 +22,19 @@
// THE SOFTWARE.
public struct CustomProfileField {
fileprivate enum CodingKeys: String {
case id
case alt
case value
case hidden = "is_hidden"
case hint
case label
case options
case ordering
case possibleValues = "possible_values"
case type
}
public var id: String?
public var alt: String?
public var value: String?
@@ -34,16 +47,16 @@ public struct CustomProfileField {
public var type: String?
public init(field: [String: Any]?) {
id = field?["id"] as? String
alt = field?["alt"] as? String
value = field?["value"] as? String
hidden = field?["is_hidden"] as? Bool
hint = field?["hint"] as? String
label = field?["label"] as? String
options = field?["options"] as? String
ordering = field?["ordering"] as? Int
possibleValues = field?["possible_values"] as? [String]
type = field?["type"] as? String
id = field?[CodingKeys.id] as? String
alt = field?[CodingKeys.alt] as? String
value = field?[CodingKeys.value] as? String
hidden = field?[CodingKeys.hidden] as? Bool
hint = field?[CodingKeys.hint] as? String
label = field?[CodingKeys.label] as? String
options = field?[CodingKeys.options] as? String
ordering = field?[CodingKeys.ordering] as? Int
possibleValues = field?[CodingKeys.possibleValues] as? [String]
type = field?[CodingKeys.type] as? String
}
public init(id: String?) {
@@ -63,3 +76,35 @@ public struct CustomProfileField {
type = profile?.type != nil ? profile?.type : type
}
}
extension CustomProfileField: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
id = try values.decodeIfPresent(String.self, forKey: .id)
alt = try values.decodeIfPresent(String.self, forKey: .alt)
value = try values.decodeIfPresent(String.self, forKey: .value)
hidden = try values.decodeIfPresent(Bool.self, forKey: .hidden)
hint = try values.decodeIfPresent(String.self, forKey: .hint)
label = try values.decodeIfPresent(String.self, forKey: .label)
options = try values.decodeIfPresent(String.self, forKey: .options)
ordering = try values.decodeIfPresent(Int.self, forKey: .ordering)
possibleValues = try values.decodeIfPresent([String].self, forKey: .possibleValues)
type = try values.decodeIfPresent(String.self, forKey: .type)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(id, forKey: .id)
try container.encode(alt, forKey: .alt)
try container.encode(value, forKey: .value)
try container.encode(hidden, forKey: .hidden)
try container.encode(hint, forKey: .hint)
try container.encode(label, forKey: .label)
try container.encode(options, forKey: .options)
try container.encode(ordering, forKey: .ordering)
try container.encode(possibleValues, forKey: .possibleValues)
try container.encode(type, forKey: .type)
}
}
extension CustomProfileField.CodingKeys: CodingKey { }
+35 -5
View File
@@ -22,6 +22,14 @@
// THE SOFTWARE.
public struct DoNotDisturbStatus {
fileprivate enum CodingKeys: String {
case enabled = "dnd_enabled"
case nextDoNotDisturbStart = "next_dnd_start_ts"
case nextDoNotDisturbEnd = "next_dnd_end_ts"
case snoozeEnabled = "snooze_enabled"
case snoozeEndtime = "snooze_endtime"
}
public var enabled: Bool?
public var nextDoNotDisturbStart: Int?
public var nextDoNotDisturbEnd: Int?
@@ -29,10 +37,32 @@ public struct DoNotDisturbStatus {
public var snoozeEndtime: Int?
public init(status: [String: Any]?) {
enabled = status?["dnd_enabled"] as? Bool
nextDoNotDisturbStart = status?["next_dnd_start_ts"] as? Int
nextDoNotDisturbEnd = status?["next_dnd_end_ts"] as? Int
snoozeEnabled = status?["snooze_enabled"] as? Bool
snoozeEndtime = status?["snooze_endtime"] as? Int
enabled = status?[CodingKeys.enabled] as? Bool
nextDoNotDisturbStart = status?[CodingKeys.nextDoNotDisturbStart] as? Int
nextDoNotDisturbEnd = status?[CodingKeys.nextDoNotDisturbEnd] as? Int
snoozeEnabled = status?[CodingKeys.snoozeEnabled] as? Bool
snoozeEndtime = status?[CodingKeys.snoozeEndtime] as? Int
}
}
extension DoNotDisturbStatus: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
enabled = try values.decodeIfPresent(Bool.self, forKey: .enabled)
nextDoNotDisturbStart = try values.decodeIfPresent(Int.self, forKey: .nextDoNotDisturbStart)
nextDoNotDisturbEnd = try values.decodeIfPresent(Int.self, forKey: .nextDoNotDisturbEnd)
snoozeEnabled = try values.decodeIfPresent(Bool.self, forKey: .snoozeEnabled)
snoozeEndtime = try values.decodeIfPresent(Int.self, forKey: .snoozeEndtime)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(enabled, forKey: .enabled)
try container.encode(nextDoNotDisturbStart, forKey: .nextDoNotDisturbStart)
try container.encode(nextDoNotDisturbEnd, forKey: .nextDoNotDisturbEnd)
try container.encode(snoozeEnabled, forKey: .snoozeEnabled)
try container.encode(snoozeEndtime, forKey: .snoozeEndtime)
}
}
extension DoNotDisturbStatus.CodingKeys: CodingKey { }
+23 -2
View File
@@ -22,11 +22,32 @@
// THE SOFTWARE.
public struct Edited {
fileprivate enum CodingKeys: String {
case user
case ts
}
public let user: String?
public let ts: String?
public init(edited: [String: Any]?) {
user = edited?["user"] as? String
ts = edited?["ts"] as? String
user = edited?[CodingKeys.user] as? String
ts = edited?[CodingKeys.ts] as? String
}
}
extension Edited: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
user = try values.decodeIfPresent(String.self, forKey: .user)
ts = try values.decodeIfPresent(String.self, forKey: .ts)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(user, forKey: .user)
try container.encode(ts, forKey: .ts)
}
}
extension Edited.CodingKeys: CodingKey { }
+12
View File
@@ -39,6 +39,18 @@ public extension UInt64 {
}
}
public extension Dictionary where Key == String, Value == Any {
subscript(codingKey: CodingKey) -> Any? {
get {
return self[codingKey.stringValue]
}
set {
self[codingKey.stringValue] = newValue
}
}
}
public func filterNilParameters(_ parameters: [String: Any?]) -> [String: Any] {
var finalParameters = [String: Any]()
for (key, value) in parameters {
+24 -3
View File
@@ -22,11 +22,32 @@
// THE SOFTWARE.
public struct Reply {
fileprivate enum CodingKeys: String {
case user
case ts
}
public let user: String?
public let ts: String?
public init(reply: [String: Any]?) {
user = reply?["user"] as? String
ts = reply?["ts"] as? String
user = reply?[CodingKeys.user] as? String
ts = reply?[CodingKeys.ts] as? String
}
}
extension Reply: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
user = try values.decodeIfPresent(String.self, forKey: .user)
ts = try values.decodeIfPresent(String.self, forKey: .ts)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(user, forKey: .user)
try container.encode(ts, forKey: .ts)
}
}
extension Reply.CodingKeys: CodingKey { }
+47 -8
View File
@@ -22,6 +22,17 @@
// THE SOFTWARE.
public struct TeamIcon {
fileprivate enum CodingKeys: String {
case image34 = "image_34"
case image44 = "image_44"
case image68 = "image_68"
case image88 = "image_88"
case image102 = "image_102"
case image132 = "image_132"
case imageOriginal = "image_original"
case imageDefault = "image_default"
}
public var image34: String?
public var image44: String?
public var image68: String?
@@ -32,13 +43,41 @@ public struct TeamIcon {
public var imageDefault: Bool?
public init(icon: [String: Any]?) {
image34 = icon?["image_34"] as? String
image44 = icon?["image_44"] as? String
image68 = icon?["image_68"] as? String
image88 = icon?["image_88"] as? String
image102 = icon?["image_102"] as? String
image132 = icon?["image_132"] as? String
imageOriginal = icon?["image_original"] as? String
imageDefault = icon?["image_default"] as? Bool
image34 = icon?[CodingKeys.image34] as? String
image44 = icon?[CodingKeys.image44] as? String
image68 = icon?[CodingKeys.image68] as? String
image88 = icon?[CodingKeys.image88] as? String
image102 = icon?[CodingKeys.image102] as? String
image132 = icon?[CodingKeys.image132] as? String
imageOriginal = icon?[CodingKeys.imageOriginal] as? String
imageDefault = icon?[CodingKeys.imageDefault] as? Bool
}
}
extension TeamIcon: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
image34 = try values.decodeIfPresent(String.self, forKey: .image34)
image44 = try values.decodeIfPresent(String.self, forKey: .image44)
image68 = try values.decodeIfPresent(String.self, forKey: .image68)
image88 = try values.decodeIfPresent(String.self, forKey: .image88)
image102 = try values.decodeIfPresent(String.self, forKey: .image102)
image132 = try values.decodeIfPresent(String.self, forKey: .image132)
imageOriginal = try values.decodeIfPresent(String.self, forKey: .imageOriginal)
imageDefault = try values.decodeIfPresent(Bool.self, forKey: .imageDefault)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(image34, forKey: .image34)
try container.encode(image44, forKey: .image44)
try container.encode(image68, forKey: .image68)
try container.encode(image88, forKey: .image88)
try container.encode(image102, forKey: .image102)
try container.encode(image132, forKey: .image132)
try container.encode(imageOriginal, forKey: .imageOriginal)
try container.encode(imageDefault, forKey: .imageDefault)
}
}
extension TeamIcon.CodingKeys: CodingKey { }
+27 -3
View File
@@ -22,13 +22,37 @@
// THE SOFTWARE.
public struct Topic {
fileprivate enum CodingKeys: String {
case value
case creator
case lastSet = "last_set"
}
public let value: String?
public let creator: String?
public let lastSet: Int?
public init(topic: [String: Any]?) {
value = topic?["value"] as? String
creator = topic?["creator"] as? String
lastSet = topic?["last_set"] as? Int
value = topic?[CodingKeys.value] as? String
creator = topic?[CodingKeys.creator] as? String
lastSet = topic?[CodingKeys.lastSet] as? Int
}
}
extension Topic: Codable {
public init(from decoder: Decoder) throws {
let values = try decoder.container(keyedBy: CodingKeys.self)
value = try values.decodeIfPresent(String.self, forKey: .value)
creator = try values.decodeIfPresent(String.self, forKey: .creator)
lastSet = try values.decodeIfPresent(Int.self, forKey: .lastSet)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(value, forKey: .value)
try container.encode(creator, forKey: .creator)
try container.encode(lastSet, forKey: .lastSet)
}
}
extension Topic.CodingKeys: CodingKey { }
+1
View File
@@ -88,6 +88,7 @@ public enum Endpoint: String {
case usersGetPresence = "users.getPresence"
case usersInfo = "users.info"
case usersList = "users.list"
case usersLookupByEmail = "users.lookupByEmail"
case usersProfileSet = "users.profile.set"
case usersSetActive = "users.setActive"
case usersSetPresence = "users.setPresence"
+10 -1
View File
@@ -22,17 +22,26 @@
// THE SOFTWARE.
#if os(Linux)
import Dispatch
import Dispatch
#endif
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
import Foundation
#if !COCOAPODS
import SKCore
#endif
public struct NetworkInterface {
private let apiUrl = "https://slack.com/api/"
#if canImport(FoundationNetworking)
private let session = FoundationNetworking.URLSession(configuration: .default)
#else
private let session = URLSession(configuration: .default)
#endif
internal init() {}
+27 -1
View File
@@ -271,6 +271,7 @@ extension WebAPI {
parse: ParseMode? = nil,
linkNames: Bool? = nil,
attachments: [Attachment?]? = nil,
blocks: [Block]? = nil,
unfurlLinks: Bool? = nil,
unfurlMedia: Bool? = nil,
iconURL: String? = nil,
@@ -290,7 +291,8 @@ extension WebAPI {
"username": username,
"icon_url": iconURL,
"icon_emoji": iconEmoji,
"attachments": encodeAttachments(attachments)
"attachments": encodeAttachments(attachments),
"blocks": encodeBlocks(blocks)
]
networkInterface.request(.chatPostMessage, parameters: parameters, successClosure: {(response) in
success?((ts: response["ts"] as? String, response["channel"] as? String))
@@ -346,6 +348,7 @@ extension WebAPI {
thread: String? = nil,
asUser: Bool? = nil,
attachments: [Attachment?]? = nil,
blocks: [Block]? = nil,
linkNames: Bool? = nil,
parse: ParseMode? = nil,
success: (((ts: String?, channel: String?)) -> Void)?,
@@ -359,6 +362,7 @@ extension WebAPI {
"thread_ts": thread,
"as_user": asUser,
"attachments": encodeAttachments(attachments),
"blocks": encodeBlocks(blocks),
"link_names": linkNames,
"parse": parse?.rawValue,
]
@@ -1134,6 +1138,15 @@ extension WebAPI {
failure?(error)
}
}
public func usersLookupByEmail(_ email: String, success: ((_ user: User) -> Void)?, failure: FailureClosure?) {
let parameters: [String: Any] = ["token": token, "email": email]
networkInterface.request(.usersLookupByEmail, parameters: parameters, successClosure: { response in
success?(User(user: response["user"] as? [String: Any]))
}) { error in
failure?(error)
}
}
public func usersProfileSet(profile: User.Profile, success: SuccessClosure?, failure: FailureClosure?) {
let profileValues = ([
@@ -1241,6 +1254,19 @@ extension WebAPI {
return nil
}
fileprivate func encodeBlocks(_ blocks: [Block]?) -> String? {
if let blocks = blocks {
let blocksArray: [[String: Any]] = blocks.map { $0.dictionary }
do {
let data = try JSONSerialization.data(withJSONObject: blocksArray, options: [])
return String(data: data, encoding: String.Encoding.utf8)
} catch let error {
print(error)
}
}
return nil
}
fileprivate func enumerateDNDStatuses(_ statuses: [String: Any]) -> [String: DoNotDisturbStatus] {
var retVal = [String: DoNotDisturbStatus]()
for key in statuses.keys {
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SlackKit"
s.version = "4.3.0"
s.version = "4.5.0"
s.summary = "Write Slack apps in Swift"
s.homepage = "https://github.com/pvzig/SlackKit"
s.license = "MIT"
@@ -8,7 +8,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/pvzig/SlackKit.git", :tag => s.version.to_s }
s.social_media_url = "https://twitter.com/pvzig"
s.platforms = { :ios => '10.0', :osx => '10.11', :tvos => '10.0' }
s.swift_version = '5.0'
s.swift_version = '5.1'
s.cocoapods_version = '>= 1.4.0'
s.default_subspec = "SlackKit"
+46
View File
@@ -119,6 +119,17 @@
26D4E6082212120900A67B67 /* SKRTMAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E5FE221211B900A67B67 /* SKRTMAPI.h */; settings = {ATTRIBUTES = (Public, ); }; };
26D4E6092212120F00A67B67 /* SKServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E600221211B900A67B67 /* SKServer.h */; settings = {ATTRIBUTES = (Public, ); }; };
26D4E60A2212121400A67B67 /* SKWebAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 26D4E601221211B900A67B67 /* SKWebAPI.h */; settings = {ATTRIBUTES = (Public, ); }; };
9E452ACF22F2376B005E731B /* donotdisturbstatus.json in Resources */ = {isa = PBXBuildFile; fileRef = 9E452ACE22F2376B005E731B /* donotdisturbstatus.json */; };
9E452AD122F237FD005E731B /* customprofilefield.json in Resources */ = {isa = PBXBuildFile; fileRef = 9E452AD022F237FD005E731B /* customprofilefield.json */; };
9E873EFE22EA4A36005ABC26 /* topic.json in Resources */ = {isa = PBXBuildFile; fileRef = 9E873EFD22EA4A36005ABC26 /* topic.json */; };
9E873F0222EA5413005ABC26 /* teamicon.json in Resources */ = {isa = PBXBuildFile; fileRef = 9E873F0122EA5413005ABC26 /* teamicon.json */; };
9EA45FB922C01290006A6D36 /* action.json in Resources */ = {isa = PBXBuildFile; fileRef = 9EA45FB822C01290006A6D36 /* action.json */; };
9EE6A7C322C2CDD6002BD111 /* edited.json in Resources */ = {isa = PBXBuildFile; fileRef = 9EE6A7C222C2CDD6002BD111 /* edited.json */; };
9EEC459622BE63F800206AC3 /* reply.json in Resources */ = {isa = PBXBuildFile; fileRef = 9EEC459522BE63F800206AC3 /* reply.json */; };
9EEC459822BE789600206AC3 /* attachmentfield.json in Resources */ = {isa = PBXBuildFile; fileRef = 9EEC459722BE789600206AC3 /* attachmentfield.json */; };
A20D15EA22DE158000044CFC /* BlockComposition.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E722DE158000044CFC /* BlockComposition.swift */; };
A20D15EB22DE158000044CFC /* BlockElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E822DE158000044CFC /* BlockElement.swift */; };
A20D15EC22DE158000044CFC /* BlockLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A20D15E922DE158000044CFC /* BlockLayout.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -311,6 +322,17 @@
26D4E6292220731800A67B67 /* rtm.connect.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = rtm.connect.json; sourceTree = "<group>"; };
26D4E62A2220731800A67B67 /* file.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = file.json; sourceTree = "<group>"; };
26D4E6362220733F00A67B67 /* SKCoreTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SKCoreTests.swift; sourceTree = "<group>"; };
9E452ACE22F2376B005E731B /* donotdisturbstatus.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = donotdisturbstatus.json; sourceTree = "<group>"; };
9E452AD022F237FD005E731B /* customprofilefield.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = customprofilefield.json; sourceTree = "<group>"; };
9E873EFD22EA4A36005ABC26 /* topic.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = topic.json; sourceTree = "<group>"; };
9E873F0122EA5413005ABC26 /* teamicon.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = teamicon.json; sourceTree = "<group>"; };
9EA45FB822C01290006A6D36 /* action.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = action.json; sourceTree = "<group>"; };
9EE6A7C222C2CDD6002BD111 /* edited.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = edited.json; sourceTree = "<group>"; };
9EEC459522BE63F800206AC3 /* reply.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = reply.json; sourceTree = "<group>"; };
9EEC459722BE789600206AC3 /* attachmentfield.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = attachmentfield.json; sourceTree = "<group>"; };
A20D15E722DE158000044CFC /* BlockComposition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockComposition.swift; sourceTree = "<group>"; };
A20D15E822DE158000044CFC /* BlockElement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockElement.swift; sourceTree = "<group>"; };
A20D15E922DE158000044CFC /* BlockLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlockLayout.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -494,6 +516,9 @@
263B102221FE33A000AF9EF9 /* Action.swift */,
263B100C21FE33A000AF9EF9 /* Attachment.swift */,
263B100B21FE33A000AF9EF9 /* AttachmentField.swift */,
A20D15E722DE158000044CFC /* BlockComposition.swift */,
A20D15E822DE158000044CFC /* BlockElement.swift */,
A20D15E922DE158000044CFC /* BlockLayout.swift */,
263B101B21FE33A000AF9EF9 /* Bot.swift */,
263B101521FE33A000AF9EF9 /* Channel.swift */,
263B101021FE33A000AF9EF9 /* Comment.swift */,
@@ -818,15 +843,23 @@
26D4E618222072A700A67B67 /* Resources */ = {
isa = PBXGroup;
children = (
9EA45FB822C01290006A6D36 /* action.json */,
9EEC459722BE789600206AC3 /* attachmentfield.json */,
26D4E6282220731800A67B67 /* channel.json */,
26D4E6222220731700A67B67 /* conversation.json */,
9E452AD022F237FD005E731B /* customprofilefield.json */,
9E452ACE22F2376B005E731B /* donotdisturbstatus.json */,
9EE6A7C222C2CDD6002BD111 /* edited.json */,
26D4E6262220731800A67B67 /* events.json */,
26D4E62A2220731800A67B67 /* file.json */,
26D4E6272220731800A67B67 /* group.json */,
26D4E6232220731700A67B67 /* im.json */,
26D4E6212220731700A67B67 /* mpim.json */,
9EEC459522BE63F800206AC3 /* reply.json */,
26D4E6292220731800A67B67 /* rtm.connect.json */,
26D4E6202220731700A67B67 /* rtm.start.json */,
9E873F0122EA5413005ABC26 /* teamicon.json */,
9E873EFD22EA4A36005ABC26 /* topic.json */,
26D4E6242220731800A67B67 /* user.json */,
26D4E6252220731800A67B67 /* usergroup.json */,
2601B70D222F766D00F197AB /* member_joined_channel.json */,
@@ -1185,18 +1218,26 @@
buildActionMask = 2147483647;
files = (
2601B6CD2223038A00F197AB /* channel.json in Resources */,
9EA45FB922C01290006A6D36 /* action.json in Resources */,
2601B710222F766D00F197AB /* member_left_channel.json in Resources */,
2601B6CE2223038A00F197AB /* conversation.json in Resources */,
9E873F0222EA5413005ABC26 /* teamicon.json in Resources */,
2601B70F222F766D00F197AB /* member_joined_channel.json in Resources */,
2601B6CF2223038A00F197AB /* events.json in Resources */,
9E452AD122F237FD005E731B /* customprofilefield.json in Resources */,
2601B6D02223038A00F197AB /* file.json in Resources */,
9E452ACF22F2376B005E731B /* donotdisturbstatus.json in Resources */,
2601B6D12223038A00F197AB /* group.json in Resources */,
2601B6D22223038A00F197AB /* im.json in Resources */,
9E873EFE22EA4A36005ABC26 /* topic.json in Resources */,
2601B6D32223038A00F197AB /* mpim.json in Resources */,
2601B6D42223038A00F197AB /* rtm.connect.json in Resources */,
2601B6D52223038A00F197AB /* rtm.start.json in Resources */,
9EEC459822BE789600206AC3 /* attachmentfield.json in Resources */,
2601B6D62223038A00F197AB /* user.json in Resources */,
9EEC459622BE63F800206AC3 /* reply.json in Resources */,
2601B6D72223038A00F197AB /* usergroup.json in Resources */,
9EE6A7C322C2CDD6002BD111 /* edited.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1262,6 +1303,8 @@
263B103D21FE33A000AF9EF9 /* Action.swift in Sources */,
263B102D21FE33A000AF9EF9 /* Item.swift in Sources */,
263B103521FE33A000AF9EF9 /* Extensions.swift in Sources */,
A20D15EA22DE158000044CFC /* BlockComposition.swift in Sources */,
A20D15EB22DE158000044CFC /* BlockElement.swift in Sources */,
263B103621FE33A000AF9EF9 /* Bot.swift in Sources */,
263B102921FE33A000AF9EF9 /* Edited.swift in Sources */,
263B102721FE33A000AF9EF9 /* Attachment.swift in Sources */,
@@ -1269,6 +1312,7 @@
263B103C21FE33A000AF9EF9 /* SlackError.swift in Sources */,
263B103221FE33A000AF9EF9 /* Team.swift in Sources */,
263B103321FE33A000AF9EF9 /* User.swift in Sources */,
A20D15EC22DE158000044CFC /* BlockLayout.swift in Sources */,
263B103021FE33A000AF9EF9 /* Channel.swift in Sources */,
263B102621FE33A000AF9EF9 /* AttachmentField.swift in Sources */,
263B102B21FE33A000AF9EF9 /* Comment.swift in Sources */,
@@ -1873,6 +1917,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.SlackKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1905,6 +1950,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.launchsoft.SlackKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
+27
View File
@@ -0,0 +1,27 @@
{
"name": "any name",
"text": "any text",
"type": "any type",
"value": "any value",
"url": "any url",
"style": "primary",
"confirm":
{
"title": "any title",
"text": "any text",
"ok_text": "any ok text",
"dismiss_text": "any dismiss text"
},
"options":
[
{
"text": "any text 1",
"value": "any value 1"
},
{
"text": "any text 2",
"value": "any value 2"
}
],
"data_source": "channels"
}
@@ -0,0 +1,5 @@
{
"title": "any title",
"value": "any value",
"short": false
}
@@ -0,0 +1,12 @@
{
"id": "any id",
"alt": "any alt",
"value": "any value",
"is_hidden": true,
"hint": "any hint",
"label": "any label",
"options": "any options",
"ordering": 1,
"possible_values": ["first value", "second value"],
"type": "any type"
}
@@ -0,0 +1,7 @@
{
"dnd_enabled": false,
"next_dnd_start_ts": 1000,
"next_dnd_end_ts": 2000,
"snooze_enabled": true,
"snooze_endtime": 3000
}

Some files were not shown because too many files have changed in this diff Show More