|
1 | 1 | import Foundation
|
| 2 | + |
| 3 | +#if canImport(WordPressAPIInternal) |
2 | 4 | @preconcurrency import WordPressAPIInternal
|
| 5 | +#endif |
3 | 6 |
|
4 | 7 | #if os(Linux)
|
5 | 8 | import FoundationNetworking
|
@@ -107,74 +110,74 @@ extension MediaRequestPerformer: RequestPerformer {
|
107 | 110 | // Allows the performer to respond to everything the PostsRequestExecutor does
|
108 | 111 | extension MediaRequestPerformer: MediaRequestExecutorProtocol {
|
109 | 112 | public func listWithViewContext(
|
110 |
| - params: WordPressAPIInternal.MediaListParams |
111 |
| - ) async throws -> WordPressAPIInternal.MediaRequestListWithViewContextResponse { |
| 113 | + params: MediaListParams |
| 114 | + ) async throws -> MediaRequestListWithViewContextResponse { |
112 | 115 | try await self.executor.listWithViewContext(params: params)
|
113 | 116 | }
|
114 | 117 |
|
115 | 118 | public func listWithEmbedContext(
|
116 |
| - params: WordPressAPIInternal.MediaListParams |
117 |
| - ) async throws -> WordPressAPIInternal.MediaRequestListWithEmbedContextResponse { |
| 119 | + params: MediaListParams |
| 120 | + ) async throws -> MediaRequestListWithEmbedContextResponse { |
118 | 121 | try await self.executor.listWithEmbedContext(params: params)
|
119 | 122 | }
|
120 | 123 |
|
121 | 124 | public func listWithEditContext(
|
122 |
| - params: WordPressAPIInternal.MediaListParams |
123 |
| - ) async throws -> WordPressAPIInternal.MediaRequestListWithEditContextResponse { |
| 125 | + params: MediaListParams |
| 126 | + ) async throws -> MediaRequestListWithEditContextResponse { |
124 | 127 | try await self.executor.listWithEditContext(params: params)
|
125 | 128 | }
|
126 | 129 |
|
127 | 130 | public func delete(
|
128 |
| - mediaId: WordPressAPIInternal.MediaId |
129 |
| - ) async throws -> WordPressAPIInternal.MediaRequestDeleteResponse { |
| 131 | + mediaId: MediaId |
| 132 | + ) async throws -> MediaRequestDeleteResponse { |
130 | 133 | try await self.executor.delete(mediaId: mediaId)
|
131 | 134 | }
|
132 | 135 |
|
133 | 136 | public func filterListWithEditContext(
|
134 |
| - params: WordPressAPIInternal.MediaListParams, |
135 |
| - fields: [WordPressAPIInternal.SparseMediaFieldWithEditContext] |
136 |
| - ) async throws -> WordPressAPIInternal.MediaRequestFilterListWithEditContextResponse { |
| 137 | + params: MediaListParams, |
| 138 | + fields: [SparseMediaFieldWithEditContext] |
| 139 | + ) async throws -> MediaRequestFilterListWithEditContextResponse { |
137 | 140 | try await self.executor.filterListWithEditContext(params: params, fields: fields)
|
138 | 141 | }
|
139 | 142 |
|
140 | 143 | public func filterListWithEmbedContext(
|
141 |
| - params: WordPressAPIInternal.MediaListParams, |
142 |
| - fields: [WordPressAPIInternal.SparseMediaFieldWithEmbedContext] |
143 |
| - ) async throws -> WordPressAPIInternal.MediaRequestFilterListWithEmbedContextResponse { |
| 144 | + params: MediaListParams, |
| 145 | + fields: [SparseMediaFieldWithEmbedContext] |
| 146 | + ) async throws -> MediaRequestFilterListWithEmbedContextResponse { |
144 | 147 | try await self.executor.filterListWithEmbedContext(params: params, fields: fields)
|
145 | 148 | }
|
146 | 149 |
|
147 | 150 | public func filterListWithViewContext(
|
148 |
| - params: WordPressAPIInternal.MediaListParams, |
149 |
| - fields: [WordPressAPIInternal.SparseMediaFieldWithViewContext] |
150 |
| - ) async throws -> WordPressAPIInternal.MediaRequestFilterListWithViewContextResponse { |
| 151 | + params: MediaListParams, |
| 152 | + fields: [SparseMediaFieldWithViewContext] |
| 153 | + ) async throws -> MediaRequestFilterListWithViewContextResponse { |
151 | 154 | try await self.executor.filterListWithViewContext(params: params, fields: fields)
|
152 | 155 | }
|
153 | 156 |
|
154 | 157 | public func filterRetrieveWithEditContext(
|
155 |
| - mediaId: WordPressAPIInternal.MediaId, |
156 |
| - fields: [WordPressAPIInternal.SparseMediaFieldWithEditContext] |
157 |
| - ) async throws -> WordPressAPIInternal.MediaRequestFilterRetrieveWithEditContextResponse { |
| 158 | + mediaId: MediaId, |
| 159 | + fields: [SparseMediaFieldWithEditContext] |
| 160 | + ) async throws -> MediaRequestFilterRetrieveWithEditContextResponse { |
158 | 161 | try await self.executor.filterRetrieveWithEditContext(mediaId: mediaId, fields: fields)
|
159 | 162 | }
|
160 | 163 |
|
161 | 164 | public func filterRetrieveWithEmbedContext(
|
162 |
| - mediaId: WordPressAPIInternal.MediaId, |
163 |
| - fields: [WordPressAPIInternal.SparseMediaFieldWithEmbedContext] |
164 |
| - ) async throws -> WordPressAPIInternal.MediaRequestFilterRetrieveWithEmbedContextResponse { |
| 165 | + mediaId: MediaId, |
| 166 | + fields: [SparseMediaFieldWithEmbedContext] |
| 167 | + ) async throws -> MediaRequestFilterRetrieveWithEmbedContextResponse { |
165 | 168 | try await self.executor.filterRetrieveWithEmbedContext(mediaId: mediaId, fields: fields)
|
166 | 169 | }
|
167 | 170 |
|
168 | 171 | public func filterRetrieveWithViewContext(
|
169 |
| - mediaId: WordPressAPIInternal.MediaId, |
170 |
| - fields: [WordPressAPIInternal.SparseMediaFieldWithViewContext] |
171 |
| - ) async throws -> WordPressAPIInternal.MediaRequestFilterRetrieveWithViewContextResponse { |
| 172 | + mediaId: MediaId, |
| 173 | + fields: [SparseMediaFieldWithViewContext] |
| 174 | + ) async throws -> MediaRequestFilterRetrieveWithViewContextResponse { |
172 | 175 | try await self.executor.filterRetrieveWithViewContext(mediaId: mediaId, fields: fields)
|
173 | 176 | }
|
174 | 177 |
|
175 | 178 | public func retrieveWithEditContext(
|
176 |
| - mediaId: WordPressAPIInternal.MediaId |
177 |
| - ) async throws -> WordPressAPIInternal.MediaRequestRetrieveWithEditContextResponse { |
| 179 | + mediaId: MediaId |
| 180 | + ) async throws -> MediaRequestRetrieveWithEditContextResponse { |
178 | 181 | try await self.executor.retrieveWithEditContext(mediaId: mediaId)
|
179 | 182 | }
|
180 | 183 |
|
|
0 commit comments