diff --git a/packages/discovery-provider/src/api/v1/transactions.py b/packages/discovery-provider/src/api/v1/transactions.py index 739443b78cc..e4b925bcb74 100644 --- a/packages/discovery-provider/src/api/v1/transactions.py +++ b/packages/discovery-provider/src/api/v1/transactions.py @@ -72,8 +72,8 @@ class GetTransactionHistory(Resource): params={"id": "A User ID"}, ) @full_user_ns.expect(transaction_history_parser) + @auth_middleware(transaction_history_parser, required=True) @full_user_ns.marshal_with(transaction_history_response) - @auth_middleware() def get(self, id, authed_user_id=None): user_id = decode_with_abort(id, full_user_ns) return self._get(user_id, authed_user_id) @@ -103,8 +103,8 @@ class LegacyGetTransactionHistory(GetTransactionHistory): deprecated=True, ) @full_ns.expect(transaction_history_parser) + @auth_middleware(transaction_history_parser, required=True) @full_ns.marshal_with(transaction_history_response) - @auth_middleware() def get(self, authed_user_id=None): """Gets the user's $AUDIO transaction history within the App @@ -130,8 +130,8 @@ class GetTransactionHistoryCount(Resource): params={"id": "A User ID"}, ) @full_user_ns.expect(transaction_history_count_parser) + @auth_middleware(transaction_history_count_parser, required=True) @full_user_ns.marshal_with(transaction_history_count_response) - @auth_middleware() def get(self, id, authed_user_id=None): user_id = decode_with_abort(id, full_ns) if authed_user_id is None: @@ -150,8 +150,8 @@ class LegacyGetTransactionHistoryCount(Resource): deprecated=True, ) @full_ns.expect(transaction_history_count_parser) + @auth_middleware(transaction_history_count_parser, required=True) @full_ns.marshal_with(transaction_history_count_response) - @auth_middleware() def get(self, authed_user_id=None): """Gets the count of the user's $AUDIO transaction history within the App. @@ -204,8 +204,8 @@ class GetUSDCTransactionHistory(Resource): params={"id": "A User ID"}, ) @full_user_ns.expect(usdc_transaction_history_parser) + @auth_middleware(usdc_transaction_history_parser, required=True) @full_user_ns.marshal_with(transaction_history_response) - @auth_middleware() def get(self, id, authed_user_id=None): user_id = decode_with_abort(id, full_ns) if authed_user_id is None: @@ -244,8 +244,8 @@ class GetUSDCTransactionHistoryCount(Resource): params={"id": "A User ID"}, ) @full_user_ns.expect(usdc_transaction_history_count_parser) + @auth_middleware(usdc_transaction_history_count_parser, required=True) @full_user_ns.marshal_with(transaction_history_count_response) - @auth_middleware() def get(self, id, authed_user_id=None): user_id = decode_with_abort(id, full_ns) if authed_user_id is None: diff --git a/packages/discovery-provider/src/api/v1/users.py b/packages/discovery-provider/src/api/v1/users.py index 24e64a30f50..b63b1a78bcc 100644 --- a/packages/discovery-provider/src/api/v1/users.py +++ b/packages/discovery-provider/src/api/v1/users.py @@ -343,8 +343,8 @@ class TrackList(Resource): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @ns.expect(user_tracks_route_parser) + @auth_middleware(user_tracks_route_parser, required=False) @ns.marshal_with(tracks_response) - @auth_middleware() @cache(ttl_sec=5) def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, ns) @@ -401,8 +401,8 @@ class FullTrackList(Resource): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @full_ns.expect(user_tracks_route_parser) + @auth_middleware(user_tracks_route_parser, required=False) @full_ns.marshal_with(full_tracks_response) - @auth_middleware() @cache(ttl_sec=5) def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, ns) @@ -481,7 +481,6 @@ def _get(self, handle, authed_user_id=None): tracks = list(map(extend_track, tracks)) return success_response(tracks) - @auth_middleware() @full_ns.doc( id="""Get Tracks by User Handle""", description="""Gets the tracks created by a user using the user's handle""", @@ -491,6 +490,7 @@ def _get(self, handle, authed_user_id=None): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @full_ns.expect(user_tracks_route_parser) + @auth_middleware(user_tracks_route_parser, required=False) @full_ns.marshal_with(full_tracks_response) def get(self, handle, authed_user_id=None): return self._get(handle, authed_user_id) @@ -498,7 +498,6 @@ def get(self, handle, authed_user_id=None): @ns.route(USER_HANDLE_TRACKS, doc=False) class HandleTrackList(HandleFullTrackList): - @auth_middleware() @ns.doc( id="""Get Tracks by User Handle""", description="""Gets the tracks created by a user using the user's handle""", @@ -508,6 +507,7 @@ class HandleTrackList(HandleFullTrackList): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @ns.expect(user_tracks_route_parser) + @auth_middleware(user_tracks_route_parser, required=False) @ns.marshal_with(tracks_response) def get(self, handle, authed_user_id): return super()._get(handle, authed_user_id) @@ -550,7 +550,6 @@ def _get(self, handle, authed_user_id=None): tracks = list(map(extend_track, tracks)) return success_response(tracks) - @auth_middleware() @full_ns.doc( id="""Get AI Attributed Tracks by User Handle""", description="""Gets the AI generated tracks attributed to a user using the user's handle""", @@ -560,6 +559,7 @@ def _get(self, handle, authed_user_id=None): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @full_ns.expect(user_tracks_route_parser) + @auth_middleware(user_tracks_route_parser, required=False) @full_ns.marshal_with(full_tracks_response) def get(self, handle, authed_user_id=None): return self._get(handle, authed_user_id) @@ -567,7 +567,6 @@ def get(self, handle, authed_user_id=None): @ns.route(USER_AI_ATTRIBUTED_TRACKS) class HandleAITrackList(HandleFullAITrackList): - @auth_middleware() @ns.doc( id="""Get AI Attributed Tracks by User Handle""", description="""Gets the AI generated tracks attributed to a user using the user's handle""", @@ -577,6 +576,7 @@ class HandleAITrackList(HandleFullAITrackList): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @ns.expect(user_tracks_route_parser) + @auth_middleware(user_tracks_route_parser, required=False) @ns.marshal_with(tracks_response) def get(self, handle, authed_user_id): return super()._get(handle, authed_user_id) @@ -808,8 +808,8 @@ class UserTracksLibraryFull(Resource): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @full_ns.expect(user_tracks_library_parser) + @auth_middleware(user_tracks_library_parser, required=False) @full_ns.marshal_with(track_library_full_response) - @auth_middleware() @cache(ttl_sec=5) def get(self, id: str, authed_user_id: Optional[int] = None): """Fetch a user's full library tracks.""" @@ -883,8 +883,8 @@ class UserPlaylistsLibraryFull(Resource): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @full_ns.expect(user_collections_library_parser) + @auth_middleware(user_collections_library_parser, required=False) @full_ns.marshal_with(collection_library_full_response) - @auth_middleware() @cache(ttl_sec=5) def get(self, id: str, authed_user_id: Optional[int] = None): """Fetch a user's full library playlists.""" @@ -901,8 +901,8 @@ class UserAlbumsLibraryFull(Resource): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @full_ns.expect(user_collections_library_parser) + @auth_middleware(user_collections_library_parser, required=False) @full_ns.marshal_with(collection_library_full_response) - @auth_middleware() @cache(ttl_sec=5) def get(self, id: str, authed_user_id: Optional[int] = None): """Fetch a user's full library playlists.""" @@ -1005,7 +1005,6 @@ def get(self, id): @full_ns.route(USER_HISTORY_TRACKS_ROUTE) class TrackHistoryFull(Resource): @record_metrics - @auth_middleware() @cache(ttl_sec=5) def _get(self, id, authed_user_id): args = track_history_parser.parse_args() @@ -1038,6 +1037,7 @@ def _get(self, id, authed_user_id): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @full_ns.expect(track_history_parser) + @auth_middleware(track_history_parser, required=False) @full_ns.marshal_with(history_response_full) def get(self, id): return self._get(id) @@ -1052,8 +1052,8 @@ class TrackHistory(TrackHistoryFull): responses={200: "Success", 400: "Bad request", 500: "Server error"}, ) @ns.expect(track_history_parser) + @auth_middleware(track_history_parser, required=False) @ns.marshal_with(history_response) - @auth_middleware() def get(self, id, authed_user_id): return super()._get(id, authed_user_id) @@ -2122,9 +2122,6 @@ def get(self, id): ) -purchases_and_sales_count_parser = current_user_parser.copy() - - purchases_response = make_full_response( "purchases_response", full_ns, fields.List(fields.Nested(purchase)) ) @@ -2143,8 +2140,8 @@ class FullPurchases(Resource): params={"id": "A User ID"}, ) @full_ns.expect(purchases_and_sales_parser) + @auth_middleware(purchases_and_sales_parser, required=True) @full_ns.marshal_with(purchases_response) - @auth_middleware() def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, full_ns) if decoded_id != authed_user_id: @@ -2165,6 +2162,9 @@ def get(self, id, authed_user_id=None): return success_response(list(map(extend_purchase, purchases))) +purchases_and_sales_count_parser = current_user_parser.copy() + + @full_ns.route("//purchases/count") class FullPurchasesCount(Resource): @full_ns.doc( @@ -2173,8 +2173,8 @@ class FullPurchasesCount(Resource): params={"id": "A User ID"}, ) @full_ns.expect(purchases_and_sales_count_parser) + @auth_middleware(purchases_and_sales_count_parser, required=True) @full_ns.marshal_with(purchases_count_response) - @auth_middleware() def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, full_ns) if decoded_id != authed_user_id: @@ -2195,8 +2195,8 @@ class FullSales(Resource): params={"id": "A User ID"}, ) @full_ns.expect(purchases_and_sales_parser) + @auth_middleware(purchases_and_sales_parser, required=True) @full_ns.marshal_with(purchases_response) - @auth_middleware() def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, full_ns) if decoded_id != authed_user_id: @@ -2225,8 +2225,8 @@ class FullSalesCount(Resource): params={"id": "A User ID"}, ) @full_ns.expect(purchases_and_sales_count_parser) + @auth_middleware(purchases_and_sales_count_parser, required=True) @full_ns.marshal_with(purchases_count_response) - @auth_middleware() def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, full_ns) if decoded_id != authed_user_id: @@ -2239,19 +2239,19 @@ def get(self, id, authed_user_id=None): return success_response(count) -csv_download_parser = current_user_parser.copy() +purchases_download_parser = current_user_parser.copy() @ns.route("//purchases/download") -class FullPurchasesDownload(Resource): +class PurchasesDownload(Resource): @ns.doc( id="Download Purchases as CSV", description="Downloads the purchases the user has made as a CSV file", params={"id": "A User ID"}, ) @ns.produces(["text/csv"]) - @ns.expect(csv_download_parser) - @auth_middleware() + @ns.expect(purchases_download_parser) + @auth_middleware(purchases_download_parser, required=True) def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, ns) if decoded_id != authed_user_id: @@ -2263,16 +2263,19 @@ def get(self, id, authed_user_id=None): return response +sales_download_parser = current_user_parser.copy() + + @ns.route("//sales/download") -class FullSalesDownload(Resource): +class SalesDownload(Resource): @ns.doc( id="Download Sales as CSV", description="Downloads the sales the user has made as a CSV file", params={"id": "A User ID"}, ) @ns.produces(["text/csv"]) - @ns.expect(csv_download_parser) - @auth_middleware() + @ns.expect(sales_download_parser) + @auth_middleware(sales_download_parser, required=True) def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, ns) if decoded_id != authed_user_id: @@ -2284,16 +2287,19 @@ def get(self, id, authed_user_id=None): return response +withdrawals_download_parser = current_user_parser.copy() + + @ns.route("//withdrawals/download") -class FullWithdrawalsDownload(Resource): +class WithdrawalsDownload(Resource): @ns.doc( id="""Download USDC Withdrawals as CSV""", description="""Downloads the USDC withdrawals the user has made as a CSV file""", params={"id": "A User ID"}, ) @ns.produces(["text/csv"]) - @ns.expect(csv_download_parser) - @auth_middleware() + @ns.expect(withdrawals_download_parser) + @auth_middleware(withdrawals_download_parser, required=True) def get(self, id, authed_user_id=None): decoded_id = decode_with_abort(id, ns) if decoded_id != authed_user_id: diff --git a/packages/discovery-provider/src/utils/auth_middleware.py b/packages/discovery-provider/src/utils/auth_middleware.py index 74f02a7bfff..48dc5054b50 100644 --- a/packages/discovery-provider/src/utils/auth_middleware.py +++ b/packages/discovery-provider/src/utils/auth_middleware.py @@ -3,6 +3,7 @@ from eth_account.messages import encode_defunct from flask.globals import request +from flask_restx import reqparse from src.models.users.user import User from src.utils import db_session, web3_provider @@ -13,28 +14,50 @@ SIGNATURE_HEADER = "Encoded-Data-Signature" -def auth_middleware(**kwargs): +def auth_middleware(parser: reqparse.RequestParser = None, required: bool = False): """ Auth middleware decorator. Should decorate a route and be used to supply an authed user to the query behind a route. - Example: + e.g. - @auth_middleware + @auth_middleware() + def get(self, authed_user_id): + print(authed_user_id) + + If a flask restx RequestParser is passed, header arguments + Encoded-Data-Message and Encoded-Data-Signature are expected on the parser. + + e.g. + + @ns.expect(request_parser) + @auth_middleware(request_parser) def get(self): - args = track_slug_parser.parse_args() - slug, handle = (args.get("slug"), args.get("handle")) - routes = args.get("route") + request.headers.get("Encoded-Data-Message") - @functools.wraps simply ensures that if Python introspects `inner_wrap`, it refers to - `func` rather than `inner_wrap`. """ - def outer_wrap(func): + def decorator(func): + if parser: + parser.add_argument( + MESSAGE_HEADER, + required=required, + description="The data that was signed by the user for signature recovery", + location="headers", + ) + parser.add_argument( + SIGNATURE_HEADER, + required=required, + description="The signature of data, used for signature recovery", + location="headers", + ) + + # @functools.wraps simply ensures that if Python introspects `wrapper`, it refers to + # `func` rather than `wrapper`. @functools.wraps(func) - def inner_wrap(*args, **kwargs): + def wrapper(*args, **kwargs): message = request.headers.get(MESSAGE_HEADER) signature = request.headers.get(SIGNATURE_HEADER) @@ -66,6 +89,6 @@ def inner_wrap(*args, **kwargs): ) return func(*args, **kwargs, authed_user_id=authed_user_id) - return inner_wrap + return wrapper - return outer_wrap + return decorator diff --git a/packages/libs/src/sdk/api/generated/default/.openapi-generator/VERSION b/packages/libs/src/sdk/api/generated/default/.openapi-generator/VERSION index 08bfd0643b8..fff4bdd7ab5 100644 --- a/packages/libs/src/sdk/api/generated/default/.openapi-generator/VERSION +++ b/packages/libs/src/sdk/api/generated/default/.openapi-generator/VERSION @@ -1 +1 @@ -7.5.0-SNAPSHOT +7.3.0-SNAPSHOT \ No newline at end of file diff --git a/packages/libs/src/sdk/api/generated/default/apis/UsersApi.ts b/packages/libs/src/sdk/api/generated/default/apis/UsersApi.ts index d46f5957078..9e6d48388fd 100644 --- a/packages/libs/src/sdk/api/generated/default/apis/UsersApi.ts +++ b/packages/libs/src/sdk/api/generated/default/apis/UsersApi.ts @@ -73,16 +73,22 @@ import { export interface DownloadPurchasesAsCSVRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; userId?: string; } export interface DownloadSalesAsCSVRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; userId?: string; } export interface DownloadUSDCWithdrawalsAsCSVRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; userId?: string; } @@ -96,6 +102,8 @@ export interface GetAIAttributedTracksByUserHandleRequest { sortMethod?: GetAIAttributedTracksByUserHandleSortMethodEnum; sortDirection?: GetAIAttributedTracksByUserHandleSortDirectionEnum; filterTracks?: GetAIAttributedTracksByUserHandleFilterTracksEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } export interface GetAuthorizedAppsRequest { @@ -177,6 +185,8 @@ export interface GetTracksByUserRequest { sortMethod?: GetTracksByUserSortMethodEnum; sortDirection?: GetTracksByUserSortDirectionEnum; filterTracks?: GetTracksByUserFilterTracksEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } export interface GetUserRequest { @@ -214,6 +224,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling downloadPurchasesAsCSV.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling downloadPurchasesAsCSV.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling downloadPurchasesAsCSV.'); + } + const queryParameters: any = {}; if (params.userId !== undefined) { @@ -222,6 +240,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/purchases/download`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -248,6 +274,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling downloadSalesAsCSV.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling downloadSalesAsCSV.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling downloadSalesAsCSV.'); + } + const queryParameters: any = {}; if (params.userId !== undefined) { @@ -256,6 +290,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/sales/download`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -282,6 +324,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling downloadUSDCWithdrawalsAsCSV.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling downloadUSDCWithdrawalsAsCSV.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling downloadUSDCWithdrawalsAsCSV.'); + } + const queryParameters: any = {}; if (params.userId !== undefined) { @@ -290,6 +340,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/withdrawals/download`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -352,6 +410,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/handle/{handle}/tracks/ai_attributed`.replace(`{${"handle"}}`, encodeURIComponent(String(params.handle))), method: 'GET', @@ -873,6 +939,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', diff --git a/packages/libs/src/sdk/api/generated/full/.openapi-generator/VERSION b/packages/libs/src/sdk/api/generated/full/.openapi-generator/VERSION index 08bfd0643b8..fff4bdd7ab5 100644 --- a/packages/libs/src/sdk/api/generated/full/.openapi-generator/VERSION +++ b/packages/libs/src/sdk/api/generated/full/.openapi-generator/VERSION @@ -1 +1 @@ -7.5.0-SNAPSHOT +7.3.0-SNAPSHOT \ No newline at end of file diff --git a/packages/libs/src/sdk/api/generated/full/apis/TransactionsApi.ts b/packages/libs/src/sdk/api/generated/full/apis/TransactionsApi.ts index 340e78f0b27..3b7f43418a0 100644 --- a/packages/libs/src/sdk/api/generated/full/apis/TransactionsApi.ts +++ b/packages/libs/src/sdk/api/generated/full/apis/TransactionsApi.ts @@ -27,12 +27,19 @@ import { } from '../models'; export interface GetAudioTransactionHistoryRequest { + encodedDataMessage: string; + encodedDataSignature: string; offset?: number; limit?: number; sortMethod?: GetAudioTransactionHistorySortMethodEnum; sortDirection?: GetAudioTransactionHistorySortDirectionEnum; } +export interface GetAudioTransactionHistoryCountRequest { + encodedDataMessage: string; + encodedDataSignature: string; +} + /** * */ @@ -45,6 +52,14 @@ export class TransactionsApi extends runtime.BaseAPI { * Gets the user\'s $AUDIO transaction history within the App */ async getAudioTransactionHistoryRaw(params: GetAudioTransactionHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getAudioTransactionHistory.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getAudioTransactionHistory.'); + } + const queryParameters: any = {}; if (params.offset !== undefined) { @@ -65,6 +80,14 @@ export class TransactionsApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/transactions`, method: 'GET', @@ -80,7 +103,7 @@ export class TransactionsApi extends runtime.BaseAPI { * Deprecated: Use `/users/{id}/transactions/audio` or `sdk.full.users.getAudioTransactions()` instead. * Gets the user\'s $AUDIO transaction history within the App */ - async getAudioTransactionHistory(params: GetAudioTransactionHistoryRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async getAudioTransactionHistory(params: GetAudioTransactionHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getAudioTransactionHistoryRaw(params, initOverrides); return await response.value(); } @@ -91,11 +114,27 @@ export class TransactionsApi extends runtime.BaseAPI { * Deprecated: Use `/users/{id}/transactions/audio/count` or `sdk.full.users.getAudioTransactionCount()` instead. * Gets the count of the user\'s $AUDIO transaction history within the App */ - async getAudioTransactionHistoryCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getAudioTransactionHistoryCountRaw(params: GetAudioTransactionHistoryCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getAudioTransactionHistoryCount.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getAudioTransactionHistoryCount.'); + } + const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/transactions/count`, method: 'GET', @@ -111,8 +150,8 @@ export class TransactionsApi extends runtime.BaseAPI { * Deprecated: Use `/users/{id}/transactions/audio/count` or `sdk.full.users.getAudioTransactionCount()` instead. * Gets the count of the user\'s $AUDIO transaction history within the App */ - async getAudioTransactionHistoryCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAudioTransactionHistoryCountRaw(initOverrides); + async getAudioTransactionHistoryCount(params: GetAudioTransactionHistoryCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getAudioTransactionHistoryCountRaw(params, initOverrides); return await response.value(); } diff --git a/packages/libs/src/sdk/api/generated/full/apis/UsersApi.ts b/packages/libs/src/sdk/api/generated/full/apis/UsersApi.ts index 0ea32a4e1d1..b96c473bd64 100644 --- a/packages/libs/src/sdk/api/generated/full/apis/UsersApi.ts +++ b/packages/libs/src/sdk/api/generated/full/apis/UsersApi.ts @@ -101,14 +101,20 @@ export interface GetAIAttributedTracksByUserHandleRequest { sortMethod?: GetAIAttributedTracksByUserHandleSortMethodEnum; sortDirection?: GetAIAttributedTracksByUserHandleSortDirectionEnum; filterTracks?: GetAIAttributedTracksByUserHandleFilterTracksEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } export interface GetAudioTransactionCountRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; } export interface GetAudioTransactionsRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; offset?: number; limit?: number; sortMethod?: GetAudioTransactionsSortMethodEnum; @@ -141,6 +147,8 @@ export interface GetFollowingRequest { export interface GetPurchasesRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; offset?: number; limit?: number; userId?: string; @@ -150,6 +158,8 @@ export interface GetPurchasesRequest { export interface GetPurchasesCountRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; userId?: string; } @@ -176,6 +186,8 @@ export interface GetRepostsByHandleRequest { export interface GetSalesRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; offset?: number; limit?: number; userId?: string; @@ -185,6 +197,8 @@ export interface GetSalesRequest { export interface GetSalesCountRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; userId?: string; } @@ -243,6 +257,8 @@ export interface GetTracksByUserRequest { sortMethod?: GetTracksByUserSortMethodEnum; sortDirection?: GetTracksByUserSortDirectionEnum; filterTracks?: GetTracksByUserFilterTracksEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } export interface GetTracksByUserHandleRequest { @@ -255,6 +271,8 @@ export interface GetTracksByUserHandleRequest { sortMethod?: GetTracksByUserHandleSortMethodEnum; sortDirection?: GetTracksByUserHandleSortDirectionEnum; filterTracks?: GetTracksByUserHandleFilterTracksEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } export interface GetUSDCTransactionCountRequest { @@ -268,6 +286,8 @@ export interface GetUSDCTransactionCountRequest { export interface GetUSDCTransactionsRequest { id: string; + encodedDataMessage: string; + encodedDataSignature: string; offset?: number; limit?: number; sortMethod?: GetUSDCTransactionsSortMethodEnum; @@ -296,6 +316,8 @@ export interface GetUserLibraryAlbumsRequest { sortDirection?: GetUserLibraryAlbumsSortDirectionEnum; type?: GetUserLibraryAlbumsTypeEnum; sortMethod?: GetUserLibraryAlbumsSortMethodEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } export interface GetUserLibraryPlaylistsRequest { @@ -307,6 +329,8 @@ export interface GetUserLibraryPlaylistsRequest { sortDirection?: GetUserLibraryPlaylistsSortDirectionEnum; type?: GetUserLibraryPlaylistsTypeEnum; sortMethod?: GetUserLibraryPlaylistsSortMethodEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } export interface GetUserLibraryTracksRequest { @@ -318,6 +342,8 @@ export interface GetUserLibraryTracksRequest { sortMethod?: GetUserLibraryTracksSortMethodEnum; sortDirection?: GetUserLibraryTracksSortDirectionEnum; type?: GetUserLibraryTracksTypeEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } export interface GetUserReplicaSetRequest { @@ -333,6 +359,8 @@ export interface GetUsersTrackHistoryRequest { query?: string; sortMethod?: GetUsersTrackHistorySortMethodEnum; sortDirection?: GetUsersTrackHistorySortDirectionEnum; + encodedDataMessage?: string; + encodedDataSignature?: string; } /** @@ -455,6 +483,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/handle/{handle}/tracks/ai_attributed`.replace(`{${"handle"}}`, encodeURIComponent(String(params.handle))), method: 'GET', @@ -482,10 +518,26 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getAudioTransactionCount.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getAudioTransactionCount.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getAudioTransactionCount.'); + } + const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/transactions/audio/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -513,6 +565,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getAudioTransactions.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getAudioTransactions.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getAudioTransactions.'); + } + const queryParameters: any = {}; if (params.offset !== undefined) { @@ -533,6 +593,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/transactions/audio`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -701,6 +769,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getPurchases.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getPurchases.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getPurchases.'); + } + const queryParameters: any = {}; if (params.offset !== undefined) { @@ -725,6 +801,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/purchases`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -752,6 +836,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getPurchasesCount.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getPurchasesCount.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getPurchasesCount.'); + } + const queryParameters: any = {}; if (params.userId !== undefined) { @@ -760,6 +852,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/purchases/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -916,6 +1016,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSales.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getSales.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getSales.'); + } + const queryParameters: any = {}; if (params.offset !== undefined) { @@ -940,6 +1048,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/sales`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -967,6 +1083,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getSalesCount.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getSalesCount.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getSalesCount.'); + } + const queryParameters: any = {}; if (params.userId !== undefined) { @@ -975,6 +1099,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/sales/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -1323,6 +1455,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -1386,6 +1526,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/handle/{handle}/tracks`.replace(`{${"handle"}}`, encodeURIComponent(String(params.handle))), method: 'GET', @@ -1413,6 +1561,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUSDCTransactionCount.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getUSDCTransactionCount.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getUSDCTransactionCount.'); + } + const queryParameters: any = {}; if (params.type) { @@ -1429,6 +1585,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/transactions/usdc/count`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -1456,6 +1620,14 @@ export class UsersApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter params.id was null or undefined when calling getUSDCTransactions.'); } + if (params.encodedDataMessage === null || params.encodedDataMessage === undefined) { + throw new runtime.RequiredError('encodedDataMessage','Required parameter params.encodedDataMessage was null or undefined when calling getUSDCTransactions.'); + } + + if (params.encodedDataSignature === null || params.encodedDataSignature === undefined) { + throw new runtime.RequiredError('encodedDataSignature','Required parameter params.encodedDataSignature was null or undefined when calling getUSDCTransactions.'); + } + const queryParameters: any = {}; if (params.offset !== undefined) { @@ -1488,6 +1660,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/transactions/usdc`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -1618,6 +1798,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/library/albums`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -1679,6 +1867,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/library/playlists`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -1740,6 +1936,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/library/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', @@ -1831,6 +2035,14 @@ export class UsersApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (params.encodedDataMessage !== undefined && params.encodedDataMessage !== null) { + headerParameters['Encoded-Data-Message'] = String(params.encodedDataMessage); + } + + if (params.encodedDataSignature !== undefined && params.encodedDataSignature !== null) { + headerParameters['Encoded-Data-Signature'] = String(params.encodedDataSignature); + } + const response = await this.request({ path: `/users/{id}/history/tracks`.replace(`{${"id"}}`, encodeURIComponent(String(params.id))), method: 'GET', diff --git a/packages/libs/src/sdk/api/generated/full/models/PlaylistFullWithoutTracks.ts b/packages/libs/src/sdk/api/generated/full/models/PlaylistFullWithoutTracks.ts index 014d1a32cf9..300a4aea6e7 100644 --- a/packages/libs/src/sdk/api/generated/full/models/PlaylistFullWithoutTracks.ts +++ b/packages/libs/src/sdk/api/generated/full/models/PlaylistFullWithoutTracks.ts @@ -315,11 +315,8 @@ export function PlaylistFullWithoutTracksFromJSONTyped(json: any, ignoreDiscrimi 'totalPlayCount': json['total_play_count'], 'user': UserFullFromJSON(json['user']), 'ddexApp': !exists(json, 'ddex_app') ? undefined : json['ddex_app'], -<<<<<<< HEAD -======= 'access': !exists(json, 'access') ? undefined : AccessFromJSON(json['access']), 'upc': !exists(json, 'upc') ? undefined : json['upc'], ->>>>>>> origin/main 'blocknumber': json['blocknumber'], 'createdAt': !exists(json, 'created_at') ? undefined : json['created_at'], 'followeeReposts': ((json['followee_reposts'] as Array).map(RepostFromJSON)), @@ -363,11 +360,8 @@ export function PlaylistFullWithoutTracksToJSON(value?: PlaylistFullWithoutTrack 'total_play_count': value.totalPlayCount, 'user': UserFullToJSON(value.user), 'ddex_app': value.ddexApp, -<<<<<<< HEAD -======= 'access': AccessToJSON(value.access), 'upc': value.upc, ->>>>>>> origin/main 'blocknumber': value.blocknumber, 'created_at': value.createdAt, 'followee_reposts': ((value.followeeReposts as Array).map(RepostToJSON)),