|
1 | 1 | /* Options:
|
2 |
| -Date: 2021-03-09 07:19:50 |
| 2 | +Date: 2021-03-18 17:23:07 |
3 | 3 | SwiftVersion: 5.0
|
4 | 4 | Version: 5.105
|
5 | 5 | Tip: To override a DTO option, remove "//" prefix before updating
|
@@ -310,7 +310,7 @@ public class UpdateOrganizationMemberInvite : IReturn, IPut, Codable
|
310 | 310 | }
|
311 | 311 |
|
312 | 312 | // @Route("/posts", "GET")
|
313 |
| -public class QueryPosts : QueryDb<Post>, IReturn, IGet |
| 313 | +public class QueryPosts : QueryDb_1<Post>, IReturn, IGet |
314 | 314 | {
|
315 | 315 | public typealias Return = QueryResponse<Post>
|
316 | 316 |
|
@@ -698,9 +698,9 @@ public class GetAllTechnologies : IReturn, IGet, Codable
|
698 | 698 |
|
699 | 699 | // @Route("/technology/search")
|
700 | 700 | // @AutoQueryViewer(DefaultSearchField="Tier", DefaultSearchText="Data", DefaultSearchType="=", Description="Explore different Technologies", IconUrl="octicon:database", Title="Find Technologies")
|
701 |
| -public class FindTechnologies : QueryDb<Technology>, IReturn, IGet |
| 701 | +public class FindTechnologies : QueryDb_2<Technology, TechnologyView>, IReturn, IGet |
702 | 702 | {
|
703 |
| - public typealias Return = QueryResponse<Technology> |
| 703 | + public typealias Return = QueryResponse<TechnologyView> |
704 | 704 |
|
705 | 705 | public var ids:[Int] = []
|
706 | 706 | public var name:String?
|
@@ -744,9 +744,9 @@ public class FindTechnologies : QueryDb<Technology>, IReturn, IGet
|
744 | 744 | }
|
745 | 745 |
|
746 | 746 | // @Route("/technology/query")
|
747 |
| -public class QueryTechnology : QueryDb<Technology>, IReturn, IGet |
| 747 | +public class QueryTechnology : QueryDb_2<Technology, TechnologyView>, IReturn, IGet |
748 | 748 | {
|
749 |
| - public typealias Return = QueryResponse<Technology> |
| 749 | + public typealias Return = QueryResponse<TechnologyView> |
750 | 750 |
|
751 | 751 | public var ids:[Int] = []
|
752 | 752 | public var name:String?
|
@@ -897,9 +897,9 @@ public class HourlyTask : IReturn, IGet, Codable
|
897 | 897 |
|
898 | 898 | // @Route("/techstacks/search")
|
899 | 899 | // @AutoQueryViewer(DefaultSearchField="Description", DefaultSearchText="ServiceStack", DefaultSearchType="Contains", Description="Explore different Technology Stacks", IconUrl="material-icons:cloud", Title="Find Technology Stacks")
|
900 |
| -public class FindTechStacks : QueryDb<TechnologyStack>, IReturn, IGet |
| 900 | +public class FindTechStacks : QueryDb_2<TechnologyStack, TechnologyStackView>, IReturn, IGet |
901 | 901 | {
|
902 |
| - public typealias Return = QueryResponse<TechnologyStack> |
| 902 | + public typealias Return = QueryResponse<TechnologyStackView> |
903 | 903 |
|
904 | 904 | public var ids:[Int] = []
|
905 | 905 | public var name:String?
|
@@ -943,9 +943,9 @@ public class FindTechStacks : QueryDb<TechnologyStack>, IReturn, IGet
|
943 | 943 | }
|
944 | 944 |
|
945 | 945 | // @Route("/techstacks/query")
|
946 |
| -public class QueryTechStacks : QueryDb<TechnologyStack>, IReturn, IGet |
| 946 | +public class QueryTechStacks : QueryDb_2<TechnologyStack, TechnologyStackView>, IReturn, IGet |
947 | 947 | {
|
948 |
| - public typealias Return = QueryResponse<TechnologyStack> |
| 948 | + public typealias Return = QueryResponse<TechnologyStackView> |
949 | 949 |
|
950 | 950 | public var ids:[Int] = []
|
951 | 951 | public var name:String?
|
@@ -1320,7 +1320,7 @@ public class ImportUserVoiceSuggestion : IReturn, IPost, Codable
|
1320 | 1320 | }
|
1321 | 1321 |
|
1322 | 1322 | // @Route("/posts/comment", "GET")
|
1323 |
| -public class QueryPostComments : QueryDb<PostComment>, IReturn, IGet |
| 1323 | +public class QueryPostComments : QueryDb_1<PostComment>, IReturn, IGet |
1324 | 1324 | {
|
1325 | 1325 | public typealias Return = QueryResponse<PostComment>
|
1326 | 1326 |
|
@@ -1397,49 +1397,6 @@ public class QueryPostComments : QueryDb<PostComment>, IReturn, IGet
|
1397 | 1397 | }
|
1398 | 1398 | }
|
1399 | 1399 |
|
1400 |
| -// @Route("/admin/technology/search") |
1401 |
| -// @AutoQueryViewer(DefaultSearchField="Tier", DefaultSearchText="Data", DefaultSearchType="=", Description="Explore different Technologies", IconUrl="octicon:database", Title="Find Technologies Admin") |
1402 |
| -public class FindTechnologiesAdmin : QueryDb<Technology>, IReturn |
1403 |
| -{ |
1404 |
| - public typealias Return = QueryResponse<Technology> |
1405 |
| - |
1406 |
| - public var id:Int? |
1407 |
| - public var name:String? |
1408 |
| - public var vendorName:String? |
1409 |
| - public var nameContains:String? |
1410 |
| - public var vendorNameContains:String? |
1411 |
| - |
1412 |
| - required public init(){ super.init() } |
1413 |
| - |
1414 |
| - private enum CodingKeys : String, CodingKey { |
1415 |
| - case id |
1416 |
| - case name |
1417 |
| - case vendorName |
1418 |
| - case nameContains |
1419 |
| - case vendorNameContains |
1420 |
| - } |
1421 |
| - |
1422 |
| - required public init(from decoder: Decoder) throws { |
1423 |
| - try super.init(from: decoder) |
1424 |
| - let container = try decoder.container(keyedBy: CodingKeys.self) |
1425 |
| - id = try container.decodeIfPresent(Int.self, forKey: .id) |
1426 |
| - name = try container.decodeIfPresent(String.self, forKey: .name) |
1427 |
| - vendorName = try container.decodeIfPresent(String.self, forKey: .vendorName) |
1428 |
| - nameContains = try container.decodeIfPresent(String.self, forKey: .nameContains) |
1429 |
| - vendorNameContains = try container.decodeIfPresent(String.self, forKey: .vendorNameContains) |
1430 |
| - } |
1431 |
| - |
1432 |
| - public override func encode(to encoder: Encoder) throws { |
1433 |
| - try super.encode(to: encoder) |
1434 |
| - var container = encoder.container(keyedBy: CodingKeys.self) |
1435 |
| - if id != nil { try container.encode(id, forKey: .id) } |
1436 |
| - if name != nil { try container.encode(name, forKey: .name) } |
1437 |
| - if vendorName != nil { try container.encode(vendorName, forKey: .vendorName) } |
1438 |
| - if nameContains != nil { try container.encode(nameContains, forKey: .nameContains) } |
1439 |
| - if vendorNameContains != nil { try container.encode(vendorNameContains, forKey: .vendorNameContains) } |
1440 |
| - } |
1441 |
| -} |
1442 |
| - |
1443 | 1400 | public class GetOrganizationResponse : Codable
|
1444 | 1401 | {
|
1445 | 1402 | public var cache:Int?
|
@@ -2245,18 +2202,18 @@ public class PostCommentReportInfo : Codable
|
2245 | 2202 | required public init(){}
|
2246 | 2203 | }
|
2247 | 2204 |
|
2248 |
| -public class QueryDb<T : Codable> : QueryBase |
2249 |
| -{ |
2250 |
| - required public init(){ super.init() } |
2251 |
| - |
2252 |
| - required public init(from decoder: Decoder) throws { |
2253 |
| - try super.init(from: decoder) |
2254 |
| - } |
2255 |
| - |
2256 |
| - public override func encode(to encoder: Encoder) throws { |
2257 |
| - try super.encode(to: encoder) |
2258 |
| - } |
2259 |
| -} |
| 2205 | +//public class QueryDb_1<T : Codable> : QueryBase |
| 2206 | +//{ |
| 2207 | +// required public init(){ super.init() } |
| 2208 | +// |
| 2209 | +// required public init(from decoder: Decoder) throws { |
| 2210 | +// try super.init(from: decoder) |
| 2211 | +// } |
| 2212 | +// |
| 2213 | +// public override func encode(to encoder: Encoder) throws { |
| 2214 | +// try super.encode(to: encoder) |
| 2215 | +// } |
| 2216 | +//} |
2260 | 2217 |
|
2261 | 2218 | public class PostComment : Codable
|
2262 | 2219 | {
|
@@ -2424,6 +2381,46 @@ public class TechnologyHistory : TechnologyBase
|
2424 | 2381 | }
|
2425 | 2382 | }
|
2426 | 2383 |
|
| 2384 | +//public class QueryDb_2<From : Codable, Into : Codable> : QueryBase |
| 2385 | +//{ |
| 2386 | +// required public init(){ super.init() } |
| 2387 | +// |
| 2388 | +// required public init(from decoder: Decoder) throws { |
| 2389 | +// try super.init(from: decoder) |
| 2390 | +// } |
| 2391 | +// |
| 2392 | +// public override func encode(to encoder: Encoder) throws { |
| 2393 | +// try super.encode(to: encoder) |
| 2394 | +// } |
| 2395 | +//} |
| 2396 | + |
| 2397 | +public class TechnologyView : Codable |
| 2398 | +{ |
| 2399 | + public var id:Int? |
| 2400 | + public var name:String? |
| 2401 | + public var vendorName:String? |
| 2402 | + public var vendorUrl:String? |
| 2403 | + public var productUrl:String? |
| 2404 | + public var logoUrl:String? |
| 2405 | + public var Description:String? |
| 2406 | + public var created:Date? |
| 2407 | + public var createdBy:String? |
| 2408 | + public var lastModified:Date? |
| 2409 | + public var lastModifiedBy:String? |
| 2410 | + public var ownerId:String? |
| 2411 | + public var slug:String? |
| 2412 | + public var logoApproved:Bool? |
| 2413 | + public var isLocked:Bool? |
| 2414 | + public var tier:TechnologyTier? |
| 2415 | + public var lastStatusUpdate:Date? |
| 2416 | + public var organizationId:Int? |
| 2417 | + public var commentsPostId:Int? |
| 2418 | + public var viewCount:Int? |
| 2419 | + public var favCount:Int? |
| 2420 | + |
| 2421 | + required public init(){} |
| 2422 | +} |
| 2423 | + |
2427 | 2424 | public protocol IRegisterStats
|
2428 | 2425 | {
|
2429 | 2426 | }
|
@@ -2472,6 +2469,32 @@ public class TechnologyStackHistory : TechnologyStackBase
|
2472 | 2469 | }
|
2473 | 2470 | }
|
2474 | 2471 |
|
| 2472 | +public class TechnologyStackView : Codable |
| 2473 | +{ |
| 2474 | + public var id:Int? |
| 2475 | + public var name:String? |
| 2476 | + public var vendorName:String? |
| 2477 | + public var Description:String? |
| 2478 | + public var appUrl:String? |
| 2479 | + public var screenshotUrl:String? |
| 2480 | + public var created:Date? |
| 2481 | + public var createdBy:String? |
| 2482 | + public var lastModified:Date? |
| 2483 | + public var lastModifiedBy:String? |
| 2484 | + public var isLocked:Bool? |
| 2485 | + public var ownerId:String? |
| 2486 | + public var slug:String? |
| 2487 | + public var details:String? |
| 2488 | + public var detailsHtml:String? |
| 2489 | + public var lastStatusUpdate:Date? |
| 2490 | + public var organizationId:Int? |
| 2491 | + public var commentsPostId:Int? |
| 2492 | + public var viewCount:Int? |
| 2493 | + public var favCount:Int? |
| 2494 | + |
| 2495 | + required public init(){} |
| 2496 | +} |
| 2497 | + |
2475 | 2498 | public class UserInfo : Codable
|
2476 | 2499 | {
|
2477 | 2500 | public var userName:String?
|
|
0 commit comments