diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/CreateCommunicationTemplateAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/CreateCommunicationTemplateAsAdmin.swift index e4501a15b8..6e2bb926f6 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/CreateCommunicationTemplateAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/CreateCommunicationTemplateAsAdmin.swift @@ -35,7 +35,7 @@ extension ATProtoAdmin { named name: String, contentMarkdown: String, subject: String, - createdBy: String? + createdBy: String? = nil ) async throws -> ToolsOzoneLexicon.Communication.TemplateViewDefinition { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/DisableAccountInvitesAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/DisableAccountInvitesAsAdmin.swift index aaf23f612c..2c2679de94 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/DisableAccountInvitesAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/DisableAccountInvitesAsAdmin.swift @@ -29,7 +29,7 @@ extension ATProtoAdmin { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func disableAccountInvites( for accountDID: String, - note: String? + note: String? = nil ) async throws { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/EmitEventAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/EmitEventAsAdmin.swift index b67a22fb4b..d9b2037696 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/EmitEventAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/EmitEventAsAdmin.swift @@ -34,7 +34,7 @@ extension ATProtoAdmin { public func emitEvent( _ event: ATUnion.EmitEventUnion, subject: ATUnion.EmitEventSubjectUnion, - subjectBlobCIDHashes: [String]?, + subjectBlobCIDHashes: [String]? = nil, createdBy: String ) async throws -> ToolsOzoneLexicon.Moderation.ModerationEventViewDefinition { guard session != nil, diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/EnableAccountInvitesAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/EnableAccountInvitesAsAdmin.swift index 472dc77098..534ca2760a 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/EnableAccountInvitesAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/EnableAccountInvitesAsAdmin.swift @@ -32,7 +32,7 @@ extension ATProtoAdmin { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func enableAccountInvites( for accountDID: String, - note: String? + note: String? = nil ) async throws { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/GetRecordAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/GetRecordAsAdmin.swift index f91aef090f..0f8a49fff1 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/GetRecordAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/GetRecordAsAdmin.swift @@ -31,7 +31,7 @@ extension ATProtoAdmin { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func getRecord( _ recordURI: String, - recordCID: String? + recordCID: String? = nil ) async throws -> Result { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/QueryModerationStatusesAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/QueryModerationStatusesAsAdmin.swift index 084e41a2bf..13428f04cb 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/QueryModerationStatusesAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/QueryModerationStatusesAsAdmin.swift @@ -63,25 +63,25 @@ extension ATProtoAdmin { /// - Throws: An ``ATProtoError``-conforming error type, depending on the issue. Go to /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func queryStatuses( - _ subject: String?, - comment: String?, - reportedAfter: Date?, - reportedBefore: Date?, - reviewedAfter: Date?, - reviewedBefore: Date?, + _ subject: String? = nil, + comment: String? = nil, + reportedAfter: Date? = nil, + reportedBefore: Date? = nil, + reviewedAfter: Date? = nil, + reviewedBefore: Date? = nil, shouldIncludeMuted: Bool? = false, - isOnlyMuted: Bool?, - reviewState: String?, - ignoreSubjects: [String]?, - lastReviewedBy: String?, + isOnlyMuted: Bool? = nil, + reviewState: String? = nil, + ignoreSubjects: [String]? = nil, + lastReviewedBy: String? = nil, sortField: ToolsOzoneLexicon.Moderation.QueryStatuses.SortField? = .lastReportedAt, sortDirection: ToolsOzoneLexicon.Moderation.QueryStatuses.SortDirection? = .descending, - isTakenDown: Bool?, - isAppealed: Bool?, + isTakenDown: Bool? = nil, + isAppealed: Bool? = nil, limit: Int? = 50, - tags: [String]?, - excludeTags: [String]?, - cursor: String? + tags: [String]? = nil, + excludeTags: [String]? = nil, + cursor: String? = nil ) async throws -> Result { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SearchAccountsAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SearchAccountsAsAdmin.swift index 2992e56fa9..5aebfc3758 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SearchAccountsAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SearchAccountsAsAdmin.swift @@ -34,7 +34,7 @@ extension ATProtoAdmin { /// - Throws: An ``ATProtoError``-conforming error type, depending on the issue. Go to /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func searchAccounts( - by email: String?, + by email: String? = nil, cursor: String? = nil, limit: Int? = 50 ) async throws -> Result { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SearchRepositoriesAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SearchRepositoriesAsAdmin.swift index 1a59be0e61..f5d7fb3236 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SearchRepositoriesAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SearchRepositoriesAsAdmin.swift @@ -33,7 +33,7 @@ extension ATProtoAdmin { /// - Throws: An ``ATProtoError``-conforming error type, depending on the issue. Go to /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func searchRepositories( - _ query: String?, + _ query: String? = nil, withLimitOf limit: Int? = 50, cursor: String? ) async throws -> Result { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SendEmailAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SendEmailAsAdmin.swift index e9b9002e2a..c7142e578e 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SendEmailAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/SendEmailAsAdmin.swift @@ -35,10 +35,10 @@ extension ATProtoAdmin { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func sendEmail( to recipientDID: String, - withSubjectLine subjectLine: String?, + withSubjectLine subjectLine: String? = nil, content: String, senderDID: String, - comment: String? + comment: String? = nil ) async throws -> Result { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/UpdateCommunicationTemplateAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/UpdateCommunicationTemplateAsAdmin.swift index 61352c77d7..bd35eafe15 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/UpdateCommunicationTemplateAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/UpdateCommunicationTemplateAsAdmin.swift @@ -37,11 +37,11 @@ extension ATProtoKit { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func updateCommunicationTemplate( _ id: String, - name: String?, - contentMarkdown: String?, - subject: String?, - updatedBy: String?, - isDisabled: Bool? + name: String? = nil, + contentMarkdown: String? = nil, + subject: String? = nil, + updatedBy: String? = nil, + isDisabled: Bool? = nil ) async throws -> Result { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/UpdateSubjectStatusAsAdmin.swift b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/UpdateSubjectStatusAsAdmin.swift index 91d4ca642a..441e4a55c1 100644 --- a/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/UpdateSubjectStatusAsAdmin.swift +++ b/Sources/ATProtoKit/APIReference/AdminAndModeratorAPI/UpdateSubjectStatusAsAdmin.swift @@ -33,8 +33,8 @@ extension ATProtoAdmin { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func updateSubjectStatusAsAdmin( _ subject: ATUnion.AdminUpdateSubjectStatusUnion, - takedown: ComAtprotoLexicon.Admin.StatusAttributesDefinition?, - deactivated: ComAtprotoLexicon.Admin.StatusAttributesDefinition? + takedown: ComAtprotoLexicon.Admin.StatusAttributesDefinition? = nil, + deactivated: ComAtprotoLexicon.Admin.StatusAttributesDefinition? = nil ) async throws -> Result { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/AppBskyAPI/DescribeFeedGenerator.swift b/Sources/ATProtoKit/APIReference/AppBskyAPI/DescribeFeedGenerator.swift index d48f909fc5..ae0d3d6e41 100644 --- a/Sources/ATProtoKit/APIReference/AppBskyAPI/DescribeFeedGenerator.swift +++ b/Sources/ATProtoKit/APIReference/AppBskyAPI/DescribeFeedGenerator.swift @@ -10,18 +10,19 @@ import Foundation extension ATProtoKit { /// Gets information about a given feed generator. - /// + /// /// - Note: According to the AT Protocol specifications: "Get information about a /// feed generator, including policies and offered feed URIs. Does not require auth; /// implemented by Feed Generator services (not App View)." - /// + /// /// - SeeAlso: This is based on the [`app.bsky.feed.describeFeedGenerator`][github] lexicon. - /// + /// /// [github]: https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/feed/describeFeedGenerator.json - /// + /// + /// - Parameter pdsURL: The URL of the Personal Data Server (PDS). Optional. /// - Returns:The details of a feed generator, including its decentralized identifier (DID), /// feed URIs, and policy information. - /// + /// /// - Throws: An ``ATProtoError``-conforming error type, depending on the issue. Go to /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func describeFeedGenerator(pdsURL: String? = nil) async throws -> AppBskyLexicon.Feed.DescribeFeedGeneratorOutput { diff --git a/Sources/ATProtoKit/APIReference/AppBskyAPI/GetTaggedSuggestions.swift b/Sources/ATProtoKit/APIReference/AppBskyAPI/GetTaggedSuggestions.swift index 6cd3dbce84..76d72e0d1c 100644 --- a/Sources/ATProtoKit/APIReference/AppBskyAPI/GetTaggedSuggestions.swift +++ b/Sources/ATProtoKit/APIReference/AppBskyAPI/GetTaggedSuggestions.swift @@ -10,19 +10,20 @@ import Foundation extension ATProtoKit { /// Retrieves an array of tagged feeds and users. - /// + /// /// - Important: This is an unspecced method, and as such, this is highly volatile and may /// change or be removed at any time. Use at your own risk. - /// + /// /// - Note: According to the AT Protocol specifications: "Get a list of suggestions (feeds and /// users) tagged with categories." - /// + /// /// - SeeAlso: This is based on the [`app.bsky.unspecced.getTaggedSuggestions`][github] lexicon. - /// + /// /// [github]: https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/unspecced/getTaggedSuggestions.json - /// + /// + /// - Parameter pdsURL: The URL of the Personal Data Server (PDS). Optional. /// - Returns: An array of suggestions. - /// + /// /// - Throws: An ``ATProtoError``-conforming error type, depending on the issue. Go to /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func getTaggedSuggestions(pdsURL: String? = nil) async throws -> AppBskyLexicon.Unspecced.GetTaggedSuggestionsOutput { diff --git a/Sources/ATProtoKit/APIReference/AppBskyAPI/SearchPosts.swift b/Sources/ATProtoKit/APIReference/AppBskyAPI/SearchPosts.swift index f289fc8503..fe5e574867 100644 --- a/Sources/ATProtoKit/APIReference/AppBskyAPI/SearchPosts.swift +++ b/Sources/ATProtoKit/APIReference/AppBskyAPI/SearchPosts.swift @@ -47,14 +47,14 @@ extension ATProtoKit { public func searchPosts( with searchQuery: String, sortRanking: AppBskyLexicon.Feed.SearchPosts.SortRanking? = .latest, - sinceDate: Date?, - untilDate: Date?, + sinceDate: Date? = nil, + untilDate: Date? = nil, mentionIdentifier: String? = nil, author: String? = nil, - language: Locale?, - domain: String?, - url: String?, - tags: [String]?, + language: Locale? = nil, + domain: String? = nil, + url: String? = nil, + tags: [String]? = nil, limit: Int? = 25, cursor: String? = nil ) async throws -> AppBskyLexicon.Feed.SearchPostsOutput { diff --git a/Sources/ATProtoKit/APIReference/AppBskyAPI/SearchPostsSkeleton.swift b/Sources/ATProtoKit/APIReference/AppBskyAPI/SearchPostsSkeleton.swift index 167a001590..27d373dd0c 100644 --- a/Sources/ATProtoKit/APIReference/AppBskyAPI/SearchPostsSkeleton.swift +++ b/Sources/ATProtoKit/APIReference/AppBskyAPI/SearchPostsSkeleton.swift @@ -50,14 +50,14 @@ extension ATProtoKit { public func searchPostsSkeleton( with searchQuery: String, sortRanking: AppBskyLexicon.Unspecced.SearchPostsSkeleton.Sort? = .latest, - sinceDate: Date?, - untilDate: Date?, + sinceDate: Date? = nil, + untilDate: Date? = nil, mentionIdentifier: String? = nil, author: String? = nil, - language: Locale?, - domain: String?, - url: String?, - tags: [String]?, + language: Locale? = nil, + domain: String? = nil, + url: String? = nil, + tags: [String]? = nil, limit: Int? = 25, cursor: String? = nil, pdsURL: String? = nil diff --git a/Sources/ATProtoKit/APIReference/ChatBskyAPI/ChatGetMessageContext.swift b/Sources/ATProtoKit/APIReference/ChatBskyAPI/ChatGetMessageContext.swift index cba013c482..601ff6a242 100644 --- a/Sources/ATProtoKit/APIReference/ChatBskyAPI/ChatGetMessageContext.swift +++ b/Sources/ATProtoKit/APIReference/ChatBskyAPI/ChatGetMessageContext.swift @@ -30,7 +30,7 @@ extension ATProtoBlueskyChat { /// - Throws: An ``ATProtoError``-conforming error type, depending on the issue. Go to /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func getMessageContext( - from conversationID: String?, + from conversationID: String? = nil, messageID: String, messagesBefore: Int? = 5, messagesAfter: Int? = 5 diff --git a/Sources/ATProtoKit/APIReference/ChatBskyAPI/ChatUpdateActorAccess.swift b/Sources/ATProtoKit/APIReference/ChatBskyAPI/ChatUpdateActorAccess.swift index 3ea4a1b414..4cf4acba6e 100644 --- a/Sources/ATProtoKit/APIReference/ChatBskyAPI/ChatUpdateActorAccess.swift +++ b/Sources/ATProtoKit/APIReference/ChatBskyAPI/ChatUpdateActorAccess.swift @@ -28,7 +28,7 @@ extension ATProtoBlueskyChat { public func updateActorAccess( actorDID: String, doesAllowAccess: Bool, - reference: String? + reference: String? = nil ) async throws { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/ApplyWrites.swift b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/ApplyWrites.swift index 18d44be053..86a36b4a61 100644 --- a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/ApplyWrites.swift +++ b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/ApplyWrites.swift @@ -30,7 +30,7 @@ extension ATProtoKit { _ repositoryDID: String, shouldValidate: Bool? = true, writes: [ATUnion.ApplyWritesUnion], - swapCommit: String? + swapCommit: String? = nil ) async throws { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/CreateAppPassword.swift b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/CreateAppPassword.swift index a4566ebb9d..f2c147fc72 100644 --- a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/CreateAppPassword.swift +++ b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/CreateAppPassword.swift @@ -33,7 +33,7 @@ extension ATProtoKit { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func createAppPassword( named passwordName: String, - isPrivileged: Bool? + isPrivileged: Bool? = nil ) async throws -> Result { guard session != nil, let accessToken = session?.accessToken else { diff --git a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/CreateReport.swift b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/CreateReport.swift index 6fa9a3dc99..43bd74d59b 100644 --- a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/CreateReport.swift +++ b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/CreateReport.swift @@ -31,7 +31,7 @@ extension ATProtoAdmin { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func createReport( with reasonType: ComAtprotoLexicon.Moderation.ReasonTypeDefinition, - withContextof reason: String?, + withContextof reason: String? = nil, subject: ATUnion.CreateReportSubjectUnion ) async throws -> Result { guard session != nil, diff --git a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/QueryLabels.swift b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/QueryLabels.swift index 7c1a171fec..86e771d281 100644 --- a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/QueryLabels.swift +++ b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/QueryLabels.swift @@ -40,7 +40,7 @@ extension ATProtoKit { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func queryLabels( uriPatterns: [String], - sources: [String]?, + sources: [String]? = nil, limit: Int? = 50, cursor: String? = nil, pdsURL: String? = nil, diff --git a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/SignPLCOperation.swift b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/SignPLCOperation.swift index c16aedfe2b..28907154e3 100644 --- a/Sources/ATProtoKit/APIReference/ComAtprotoAPI/SignPLCOperation.swift +++ b/Sources/ATProtoKit/APIReference/ComAtprotoAPI/SignPLCOperation.swift @@ -35,8 +35,8 @@ extension ATProtoKit { /// ``ATAPIError`` and ``ATRequestPrepareError`` for more details. public func signPLCOperation( token: String, - rotationKeys: [String]?, - alsoKnownAs: [String]?, + rotationKeys: [String]? = nil, + alsoKnownAs: [String]? = nil, verificationMethods: VerificationMethod?, service: ATService? ) async throws -> Result {