Skip to content

Commit 4e3a021

Browse files
committed
Release v0.8.3
Origin-SHA: 15e3931443079d979fec234c42b1a1cf8102ad74
1 parent fb2b19d commit 4e3a021

6 files changed

Lines changed: 271 additions & 40 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @opensea/api-types
22

3+
## 0.8.3
4+
5+
### Patch Changes
6+
7+
- 7f5c1e7: Sync OpenAPI spec: add NFT profile picture endpoints (`POST`/`DELETE /api/v2/profile/nft-pfp`) with `SetNftPfpRequest` and `ClearNftPfpResponse` schemas, and register `/api/v2/profile/nft-pfp` under the `write:profile` scope.
8+
39
## 0.8.2
410

511
### Patch Changes

opensea-api.json

Lines changed: 155 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,85 @@
891891
"x-opensea-auth-scopes": ["write:profile"]
892892
}
893893
},
894+
"/api/v2/profile/nft-pfp": {
895+
"post": {
896+
"tags": ["Account Endpoints"],
897+
"summary": "Set NFT profile picture",
898+
"description": "Set an onchain NFT owned by the authenticated wallet as its verified profile picture. The NFT must be from a verified collection and owned by one of the account's wallets.",
899+
"operationId": "set_profile_nft_pfp",
900+
"requestBody": {
901+
"content": {
902+
"application/json": {
903+
"schema": {
904+
"$ref": "#/components/schemas/SetNftPfpRequest"
905+
}
906+
}
907+
},
908+
"required": true
909+
},
910+
"responses": {
911+
"200": {
912+
"description": "NFT profile picture set successfully",
913+
"content": {
914+
"application/json": {
915+
"schema": {
916+
"$ref": "#/components/schemas/NftPfpResponse"
917+
}
918+
}
919+
}
920+
},
921+
"400": {
922+
"$ref": "#/components/responses/BadRequest"
923+
},
924+
"401": {
925+
"$ref": "#/components/responses/Unauthorized"
926+
},
927+
"403": {
928+
"$ref": "#/components/responses/Forbidden"
929+
}
930+
},
931+
"security": [
932+
{
933+
"ApiKeyAuth": [],
934+
"WalletAuth": ["write:profile"]
935+
}
936+
],
937+
"x-opensea-auth-required": true,
938+
"x-opensea-auth-scopes": ["write:profile"]
939+
},
940+
"delete": {
941+
"tags": ["Account Endpoints"],
942+
"summary": "Clear NFT profile picture",
943+
"description": "Clear the authenticated wallet's NFT profile picture. This operation is idempotent: it returns 200 with `success=false` when no NFT profile picture was set, and `success=true` when one was cleared.",
944+
"operationId": "clear_profile_nft_pfp",
945+
"responses": {
946+
"200": {
947+
"description": "NFT profile picture cleared",
948+
"content": {
949+
"application/json": {
950+
"schema": {
951+
"$ref": "#/components/schemas/ClearNftPfpResponse"
952+
}
953+
}
954+
}
955+
},
956+
"401": {
957+
"$ref": "#/components/responses/Unauthorized"
958+
},
959+
"403": {
960+
"$ref": "#/components/responses/Forbidden"
961+
}
962+
},
963+
"security": [
964+
{
965+
"ApiKeyAuth": [],
966+
"WalletAuth": ["write:profile"]
967+
}
968+
],
969+
"x-opensea-auth-required": true,
970+
"x-opensea-auth-scopes": ["write:profile"]
971+
}
972+
},
894973
"/api/v2/profile/images": {
895974
"post": {
896975
"tags": ["Account Endpoints"],
@@ -9536,6 +9615,70 @@
95369615
},
95379616
"required": ["chain", "contract_address", "token_id"]
95389617
},
9618+
"NftPfpResponse": {
9619+
"type": "object",
9620+
"properties": {
9621+
"contract_address": {
9622+
"type": "string"
9623+
},
9624+
"token_id": {
9625+
"type": "string"
9626+
},
9627+
"chain": {
9628+
"type": "string"
9629+
},
9630+
"collection_slug": {
9631+
"type": "string"
9632+
},
9633+
"image_url": {
9634+
"type": "string"
9635+
},
9636+
"is_verified": {
9637+
"type": "boolean"
9638+
}
9639+
},
9640+
"required": [
9641+
"chain",
9642+
"contract_address",
9643+
"image_url",
9644+
"is_verified",
9645+
"token_id"
9646+
]
9647+
},
9648+
"SetNftPfpRequest": {
9649+
"type": "object",
9650+
"description": "Request body for setting an NFT as the profile picture",
9651+
"properties": {
9652+
"contractAddress": {
9653+
"type": "string",
9654+
"description": "Contract address of the NFT",
9655+
"example": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
9656+
"maxLength": 200,
9657+
"minLength": 0
9658+
},
9659+
"tokenId": {
9660+
"type": "string",
9661+
"description": "Token ID of the NFT",
9662+
"example": 1,
9663+
"maxLength": 200,
9664+
"minLength": 0
9665+
},
9666+
"chain": {
9667+
"type": "string",
9668+
"description": "Chain the NFT is on",
9669+
"example": "ethereum",
9670+
"maxLength": 100,
9671+
"minLength": 0
9672+
},
9673+
"collectionSlug": {
9674+
"type": "string",
9675+
"description": "Collection slug of the NFT",
9676+
"maxLength": 200,
9677+
"minLength": 0
9678+
}
9679+
},
9680+
"required": ["chain", "contractAddress", "tokenId"]
9681+
},
95399682
"UploadContext": {
95409683
"type": "object",
95419684
"description": "This response starts a three-step upload flow. First, request this context from OpenSea. Second, call the returned method at the returned URL. For POST, add every fields entry unchanged as a multipart text field, then add a file part containing the bytes. The file part must be last. Let the HTTP library generate the multipart boundary; do not set the overall multipart Content-Type header yourself. POST storage uploads normally return 204. For PUT, upload the raw bytes, use only headers explicitly required by the endpoint, and expect 200. Treat any 2xx storage response as success. The URL and fields are short-lived sensitive credentials. Do not log, persist, alter, or put them in tickets. Third, after storage succeeds, pass the returned token to the documented OpenSea API endpoint. Do not use the token before the storage upload succeeds.",
@@ -16013,36 +16156,6 @@
1601316156
"social_media_accounts"
1601416157
]
1601516158
},
16016-
"NftPfpResponse": {
16017-
"type": "object",
16018-
"properties": {
16019-
"contract_address": {
16020-
"type": "string"
16021-
},
16022-
"token_id": {
16023-
"type": "string"
16024-
},
16025-
"chain": {
16026-
"type": "string"
16027-
},
16028-
"collection_slug": {
16029-
"type": "string"
16030-
},
16031-
"image_url": {
16032-
"type": "string"
16033-
},
16034-
"is_verified": {
16035-
"type": "boolean"
16036-
}
16037-
},
16038-
"required": [
16039-
"chain",
16040-
"contract_address",
16041-
"image_url",
16042-
"is_verified",
16043-
"token_id"
16044-
]
16045-
},
1604616159
"SocialMediaAccount": {
1604716160
"type": "object",
1604816161
"properties": {
@@ -17010,6 +17123,17 @@
1701017123
},
1701117124
"required": ["removed"]
1701217125
},
17126+
"ClearNftPfpResponse": {
17127+
"type": "object",
17128+
"description": "Response for clearing the NFT profile picture",
17129+
"properties": {
17130+
"success": {
17131+
"type": "boolean",
17132+
"description": "Whether the NFT profile picture was cleared"
17133+
}
17134+
},
17135+
"required": ["success"]
17136+
},
1701317137
"WalletUnlinkResponse": {
1701417138
"type": "object",
1701517139
"properties": {
@@ -17129,6 +17253,7 @@
1712917253
"/api/v2/profile",
1713017254
"/api/v2/profile/username",
1713117255
"/api/v2/profile/images",
17256+
"/api/v2/profile/nft-pfp",
1713217257
"/api/v2/profile/shelves",
1713317258
"/api/v2/profile/shelves/{shelf_id}"
1713417259
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensea/api-types",
3-
"version": "0.8.2",
3+
"version": "0.8.3",
44
"description": "Auto-generated TypeScript types from the OpenSea API OpenAPI spec",
55
"license": "MIT",
66
"author": "OpenSea Developers",

src/auth-scopes-generated.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const AUTH_SCOPES = [
9595
displayName: "Profile editing",
9696
description: "Modify profile settings for authenticated account",
9797
group: "write",
98-
endpoints: ["/api/v2/profile","/api/v2/profile/username","/api/v2/profile/images","/api/v2/profile/shelves","/api/v2/profile/shelves/{shelf_id}"],
98+
endpoints: ["/api/v2/profile","/api/v2/profile/username","/api/v2/profile/images","/api/v2/profile/nft-pfp","/api/v2/profile/shelves","/api/v2/profile/shelves/{shelf_id}"],
9999
mcpTools: ["manage_profile"],
100100
},
101101
{

src/generated.ts

Lines changed: 106 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,30 @@ export interface paths {
208208
patch: operations["reorder_profile_shelves"];
209209
trace?: never;
210210
};
211+
"/api/v2/profile/nft-pfp": {
212+
parameters: {
213+
query?: never;
214+
header?: never;
215+
path?: never;
216+
cookie?: never;
217+
};
218+
get?: never;
219+
put?: never;
220+
/**
221+
* Set NFT profile picture
222+
* @description Set an onchain NFT owned by the authenticated wallet as its verified profile picture. The NFT must be from a verified collection and owned by one of the account's wallets.
223+
*/
224+
post: operations["set_profile_nft_pfp"];
225+
/**
226+
* Clear NFT profile picture
227+
* @description Clear the authenticated wallet's NFT profile picture. This operation is idempotent: it returns 200 with `success=false` when no NFT profile picture was set, and `success=true` when one was cleared.
228+
*/
229+
delete: operations["clear_profile_nft_pfp"];
230+
options?: never;
231+
head?: never;
232+
patch?: never;
233+
trace?: never;
234+
};
211235
"/api/v2/profile/images": {
212236
parameters: {
213237
query?: never;
@@ -3023,6 +3047,34 @@ export interface components {
30233047
/** @description Contract address */
30243048
contract_address: string;
30253049
};
3050+
NftPfpResponse: {
3051+
contract_address: string;
3052+
token_id: string;
3053+
chain: string;
3054+
collection_slug?: string;
3055+
image_url: string;
3056+
is_verified: boolean;
3057+
};
3058+
/** @description Request body for setting an NFT as the profile picture */
3059+
SetNftPfpRequest: {
3060+
/**
3061+
* @description Contract address of the NFT
3062+
* @example 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d
3063+
*/
3064+
contractAddress: string;
3065+
/**
3066+
* @description Token ID of the NFT
3067+
* @example 1
3068+
*/
3069+
tokenId: string;
3070+
/**
3071+
* @description Chain the NFT is on
3072+
* @example ethereum
3073+
*/
3074+
chain: string;
3075+
/** @description Collection slug of the NFT */
3076+
collectionSlug?: string;
3077+
};
30263078
/** @description This response starts a three-step upload flow. First, request this context from OpenSea. Second, call the returned method at the returned URL. For POST, add every fields entry unchanged as a multipart text field, then add a file part containing the bytes. The file part must be last. Let the HTTP library generate the multipart boundary; do not set the overall multipart Content-Type header yourself. POST storage uploads normally return 204. For PUT, upload the raw bytes, use only headers explicitly required by the endpoint, and expect 200. Treat any 2xx storage response as success. The URL and fields are short-lived sensitive credentials. Do not log, persist, alter, or put them in tickets. Third, after storage succeeds, pass the returned token to the documented OpenSea API endpoint. Do not use the token before the storage upload succeeds. */
30273079
UploadContext: {
30283080
/**
@@ -5657,14 +5709,6 @@ export interface components {
56575709
/** Format: date */
56585710
joined_date: string;
56595711
};
5660-
NftPfpResponse: {
5661-
contract_address: string;
5662-
token_id: string;
5663-
chain: string;
5664-
collection_slug?: string;
5665-
image_url: string;
5666-
is_verified: boolean;
5667-
};
56685712
SocialMediaAccount: {
56695713
platform: string;
56705714
username: string;
@@ -6194,6 +6238,11 @@ export interface components {
61946238
/** @description Whether a saved tool existed and was removed */
61956239
removed: boolean;
61966240
};
6241+
/** @description Response for clearing the NFT profile picture */
6242+
ClearNftPfpResponse: {
6243+
/** @description Whether the NFT profile picture was cleared */
6244+
success: boolean;
6245+
};
61976246
WalletUnlinkResponse: {
61986247
success: boolean;
61996248
};
@@ -6742,6 +6791,55 @@ export interface operations {
67426791
404: components["responses"]["NotFound"];
67436792
};
67446793
};
6794+
set_profile_nft_pfp: {
6795+
parameters: {
6796+
query?: never;
6797+
header?: never;
6798+
path?: never;
6799+
cookie?: never;
6800+
};
6801+
requestBody: {
6802+
content: {
6803+
"application/json": components["schemas"]["SetNftPfpRequest"];
6804+
};
6805+
};
6806+
responses: {
6807+
/** @description NFT profile picture set successfully */
6808+
200: {
6809+
headers: {
6810+
[name: string]: unknown;
6811+
};
6812+
content: {
6813+
"application/json": components["schemas"]["NftPfpResponse"];
6814+
};
6815+
};
6816+
400: components["responses"]["BadRequest"];
6817+
401: components["responses"]["Unauthorized"];
6818+
403: components["responses"]["Forbidden"];
6819+
};
6820+
};
6821+
clear_profile_nft_pfp: {
6822+
parameters: {
6823+
query?: never;
6824+
header?: never;
6825+
path?: never;
6826+
cookie?: never;
6827+
};
6828+
requestBody?: never;
6829+
responses: {
6830+
/** @description NFT profile picture cleared */
6831+
200: {
6832+
headers: {
6833+
[name: string]: unknown;
6834+
};
6835+
content: {
6836+
"application/json": components["schemas"]["ClearNftPfpResponse"];
6837+
};
6838+
};
6839+
401: components["responses"]["Unauthorized"];
6840+
403: components["responses"]["Forbidden"];
6841+
};
6842+
};
67456843
upload_profile_image: {
67466844
parameters: {
67476845
query?: never;

0 commit comments

Comments
 (0)