Skip to content

Commit c39e9d8

Browse files
Update Collect Feedback API (#845)
1 parent bf39ab9 commit c39e9d8

File tree

4 files changed

+5
-19
lines changed

4 files changed

+5
-19
lines changed

Sources/StreamVideo/Call.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,6 @@ public class Call: @unchecked Sendable, WSEventsSubscriber {
11951195
custom: [String: RawJSON]? = nil
11961196
) async throws -> CollectUserFeedbackResponse {
11971197
try await callController.collectUserFeedback(
1198-
sessionID: state.sessionId,
11991198
custom: custom,
12001199
rating: rating,
12011200
reason: reason

Sources/StreamVideo/Controllers/CallController.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,22 +402,19 @@ class CallController: @unchecked Sendable {
402402
/// - Returns: An instance of `CollectUserFeedbackResponse` representing the result of collecting feedback.
403403
/// - Throws: An error if the feedback collection process encounters an issue.
404404
func collectUserFeedback(
405-
sessionID: String,
406405
custom: [String: RawJSON]? = nil,
407406
rating: Int,
408407
reason: String? = nil
409408
) async throws -> CollectUserFeedbackResponse {
410409
try await defaultAPI.collectUserFeedback(
411410
type: callType,
412411
id: callId,
413-
session: sessionID,
414412
collectUserFeedbackRequest: .init(
415413
custom: custom,
416414
rating: rating,
417415
reason: reason,
418416
sdk: SystemEnvironment.sdkName,
419-
sdkVersion: SystemEnvironment.version,
420-
userSessionId: sessionID
417+
sdkVersion: SystemEnvironment.version
421418
)
422419
)
423420
}

Sources/StreamVideo/OpenApi/generated/APIs/DefaultAPI.swift

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -337,29 +337,20 @@ open class DefaultAPI: DefaultAPIEndpoints, @unchecked Sendable {
337337
try self.jsonDecoder.decode(SendEventResponse.self, from: $0)
338338
}
339339
}
340-
340+
341341
open func collectUserFeedback(
342342
type: String,
343343
id: String,
344-
session: String,
345344
collectUserFeedbackRequest: CollectUserFeedbackRequest
346345
) async throws -> CollectUserFeedbackResponse {
347-
var path = "/video/call/{type}/{id}/feedback/{session}"
346+
var path = "/video/call/{type}/{id}/feedback"
348347

349348
let typePreEscape = "\(APIHelper.mapValueToPathItem(type))"
350349
let typePostEscape = typePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
351350
path = path.replacingOccurrences(of: String(format: "{%@}", "type"), with: typePostEscape, options: .literal, range: nil)
352351
let idPreEscape = "\(APIHelper.mapValueToPathItem(id))"
353352
let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
354353
path = path.replacingOccurrences(of: String(format: "{%@}", "id"), with: idPostEscape, options: .literal, range: nil)
355-
let sessionPreEscape = "\(APIHelper.mapValueToPathItem(session))"
356-
let sessionPostEscape = sessionPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
357-
path = path.replacingOccurrences(
358-
of: String(format: "{%@}", "session"),
359-
with: sessionPostEscape,
360-
options: .literal,
361-
range: nil
362-
)
363354

364355
let urlRequest = try makeRequest(
365356
uriPath: path,
@@ -1146,7 +1137,6 @@ protocol DefaultAPIEndpoints {
11461137
func collectUserFeedback(
11471138
type: String,
11481139
id: String,
1149-
session: String,
11501140
collectUserFeedbackRequest: CollectUserFeedbackRequest
11511141
) async throws -> CollectUserFeedbackResponse
11521142

Sources/StreamVideo/OpenApi/generated/Models/CollectUserFeedbackRequest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ public final class CollectUserFeedbackRequest: @unchecked Sendable, Codable, JSO
1111
public var reason: String?
1212
public var sdk: String
1313
public var sdkVersion: String
14-
public var userSessionId: String
14+
public var userSessionId: String?
1515

1616
public init(
1717
custom: [String: RawJSON]? = nil,
1818
rating: Int,
1919
reason: String? = nil,
2020
sdk: String,
2121
sdkVersion: String,
22-
userSessionId: String
22+
userSessionId: String? = nil
2323
) {
2424
self.custom = custom
2525
self.rating = rating

0 commit comments

Comments
 (0)