-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@W-16589742: [iOS] REST wrappers for select SFAP APIs (Additional Nam…
…ing Convention Updates)
- Loading branch information
1 parent
74df154
commit 42a5865
Showing
12 changed files
with
149 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
SFAPAPIChatGenerationsRequestBody.swift | ||
ChatGenerationsRequestBody.swift | ||
SalesforceSDKCore | ||
|
||
Created by Eric C. Johnson ([email protected]) on 20250114. | ||
|
@@ -57,8 +57,8 @@ import Foundation | |
* try super.encode(to: encoder) | ||
* } | ||
*/ | ||
@objc | ||
open class SFAPAPIChatGenerationsRequestBody : NSObject, Codable { | ||
@objc(SFChatGenerationsRequestBody) | ||
open class ChatGenerationsRequestBody : NSObject, Codable { | ||
|
||
/// The request messages parameter value | ||
public let messages: Array<Message> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
SFAPAPIChatGenerationsResponseBody.swift | ||
ChatGenerationsResponseBody.swift | ||
SalesforceSDKCore | ||
|
||
Created by Eric C. Johnson ([email protected]) on 20250114. | ||
|
@@ -32,8 +32,8 @@ import Foundation | |
/** | ||
* Models a `sfap_api` "chat-generations" endpoint response. | ||
*/ | ||
@objc | ||
public class SFAPAPIChatGenerationsResponseBody : NSObject, Codable { | ||
@objc(SFChatGenerationsResponseBody) | ||
public class ChatGenerationsResponseBody : NSObject, Codable { | ||
public let id: String? | ||
public let generationDetails: GenerationDetails? | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
SFAPAPIEmbeddingsRequestBody.swift | ||
EmbeddingsRequestBody.swift | ||
SalesforceSDKCore | ||
|
||
Created by Eric C. Johnson ([email protected]) on 20250114. | ||
|
@@ -33,8 +33,8 @@ import Foundation | |
* Models a `sfap_api` `embeddings` endpoint request. | ||
* See https://developer.salesforce.com/docs/einstein/genai/references/models-api?meta=generateText | ||
*/ | ||
@objc | ||
public class SFAPAPIEmbeddingsRequestBody : NSObject, Codable { | ||
@objc(SFEmbeddingsRequestBody) | ||
public class EmbeddingsRequestBody : NSObject, Codable { | ||
public let input: Array<String> | ||
|
||
public init(input: Array<String>) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
SFAPAPIEmbeddingsResponseBody.swift | ||
EmbeddingsResponseBody.swift | ||
SalesforceSDKCore | ||
|
||
Created by Eric C. Johnson ([email protected]) on 20250114. | ||
|
@@ -32,8 +32,8 @@ import Foundation | |
/** | ||
* Models a `sfap_api` `embeddings` endpoint response. | ||
*/ | ||
@objc | ||
public class SFAPAPIEmbeddingsResponseBody : NSObject, Codable { | ||
@objc(SFEmbeddingsResponseBody) | ||
public class EmbeddingsResponseBody : NSObject, Codable { | ||
public let embeddings: Array<Embedding>? | ||
public let parameters: Parameters? | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
SFAPAPIFeedbackRequestBody.swift | ||
FeedbackRequestBody.swift | ||
SalesforceSDKCore | ||
|
||
Created by Eric C. Johnson ([email protected]) on 20250114. | ||
|
@@ -57,8 +57,8 @@ import Foundation | |
* try super.encode(to: encoder) | ||
* } | ||
*/ | ||
@objc | ||
public class SFAPAPIFeedbackRequestBody : NSObject, Codable { | ||
@objc(SFFeedbackRequestBody) | ||
public class FeedbackRequestBody : NSObject, Codable { | ||
public let id: String? | ||
public let appGeneration: String? | ||
public let appGenerationId: String? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
SFAPAPIFeedbackResponseBody.swift | ||
FeedbackResponseBody.swift | ||
SalesforceSDKCore | ||
|
||
Created by Eric C. Johnson ([email protected]) on 20250114. | ||
|
@@ -32,8 +32,8 @@ import Foundation | |
/** | ||
* Models a `sfap_api` `feedback` endpoint response. | ||
*/ | ||
@objc | ||
public class SFAPAPIFeedbackResponseBody : NSObject, Codable { | ||
@objc(SFFeedbackResponseBody) | ||
public class FeedbackResponseBody : NSObject, Codable { | ||
public let message: String? | ||
|
||
/** The original JSON used to initialize this response body */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
SFAPAPIGenerationsRequestBody.swift | ||
GenerationsRequestBody.swift | ||
SalesforceSDKCore | ||
|
||
Created by Eric C. Johnson ([email protected]) on 20250108. | ||
|
@@ -33,8 +33,13 @@ import Foundation | |
Models a `sfap_api` `generations` endpoint request. | ||
See https://developer.salesforce.com/docs/einstein/genai/references/models-api?meta=generateText | ||
*/ | ||
struct SFAPAPIGenerationsRequestBody: Codable { | ||
@objc(SFGenerationsRequestBody) | ||
class GenerationsRequestBody: NSObject, Codable { | ||
|
||
/// The request prompt parameter value | ||
public let prompt: String | ||
|
||
public init(prompt: String) { | ||
self.prompt = prompt | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
SFAPAPIGenerationsResponseBody.swift | ||
GenerationsResponseBody.swift | ||
SalesforceSDKCore | ||
|
||
Created by Eric C. Johnson ([email protected]) on 20250108. | ||
|
@@ -33,8 +33,8 @@ import Foundation | |
* Models a `sfap_api` "generations" endpoint response. | ||
* See https://developer.salesforce.com/docs/einstein/genai/references/models-api?meta=generateText | ||
*/ | ||
@objc | ||
public class SFAPAPIGenerationsResponseBody: NSObject, Codable { | ||
@objc(SFGenerationsResponseBody) | ||
public class GenerationsResponseBody: NSObject, Codable { | ||
public let id: String? | ||
public let generation: Generation? | ||
public let moreGenerations: String? | ||
|
Oops, something went wrong.