Improvements to 'edit profile' error messages
parent
8501cf1c7d
commit
22ddfaa2b5
|
@ -2161,12 +2161,12 @@ var ZodTuple = class extends ZodType {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ZodTuple.create = (schemas, params2) => {
|
ZodTuple.create = (schemas2, params2) => {
|
||||||
if (!Array.isArray(schemas)) {
|
if (!Array.isArray(schemas2)) {
|
||||||
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
||||||
}
|
}
|
||||||
return new ZodTuple({
|
return new ZodTuple({
|
||||||
items: schemas,
|
items: schemas2,
|
||||||
typeName: ZodFirstPartyTypeKind.ZodTuple,
|
typeName: ZodFirstPartyTypeKind.ZodTuple,
|
||||||
rest: null,
|
rest: null,
|
||||||
...processCreateParams(params2)
|
...processCreateParams(params2)
|
||||||
|
@ -4198,8 +4198,8 @@ function isErrorResponseBody(v) {
|
||||||
var defaultInst = new Client();
|
var defaultInst = new Client();
|
||||||
|
|
||||||
// src/client/lexicons.ts
|
// src/client/lexicons.ts
|
||||||
var lexicons = [
|
var schemaDict = {
|
||||||
{
|
ComAtprotoAccountCreate: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.account.create",
|
id: "com.atproto.account.create",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4268,7 +4268,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoAccountCreateInviteCode: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.account.createInviteCode",
|
id: "com.atproto.account.createInviteCode",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4302,7 +4302,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoAccountDelete: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.account.delete",
|
id: "com.atproto.account.delete",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4312,7 +4312,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoAccountGet: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.account.get",
|
id: "com.atproto.account.get",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4322,7 +4322,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoAccountRequestPasswordReset: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.account.requestPasswordReset",
|
id: "com.atproto.account.requestPasswordReset",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4344,7 +4344,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoAccountResetPassword: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.account.resetPassword",
|
id: "com.atproto.account.resetPassword",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4377,7 +4377,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoBlobUpload: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.blob.upload",
|
id: "com.atproto.blob.upload",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4398,16 +4398,11 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
errors: [
|
|
||||||
{
|
|
||||||
name: "InvalidBlob"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoHandleResolve: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.handle.resolve",
|
id: "com.atproto.handle.resolve",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4438,7 +4433,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoRepoBatchWrite: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.repo.batchWrite",
|
id: "com.atproto.repo.batchWrite",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4532,7 +4527,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoRepoCreateRecord: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.repo.createRecord",
|
id: "com.atproto.repo.createRecord",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4583,7 +4578,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoRepoDeleteRecord: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.repo.deleteRecord",
|
id: "com.atproto.repo.deleteRecord",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4614,7 +4609,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoRepoDescribe: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.repo.describe",
|
id: "com.atproto.repo.describe",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4667,7 +4662,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoRepoGetRecord: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.repo.getRecord",
|
id: "com.atproto.repo.getRecord",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4717,7 +4712,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoRepoListRecords: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.repo.listRecords",
|
id: "com.atproto.repo.listRecords",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4794,7 +4789,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoRepoPutRecord: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.repo.putRecord",
|
id: "com.atproto.repo.putRecord",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4849,7 +4844,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoRepoStrongRef: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.repo.strongRef",
|
id: "com.atproto.repo.strongRef",
|
||||||
description: "A URI with a content-hash fingerprint.",
|
description: "A URI with a content-hash fingerprint.",
|
||||||
|
@ -4868,7 +4863,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoServerGetAccountsConfig: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.server.getAccountsConfig",
|
id: "com.atproto.server.getAccountsConfig",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4911,7 +4906,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoSessionCreate: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.session.create",
|
id: "com.atproto.session.create",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4957,7 +4952,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoSessionDelete: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.session.delete",
|
id: "com.atproto.session.delete",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4967,7 +4962,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoSessionGet: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.session.get",
|
id: "com.atproto.session.get",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -4992,7 +4987,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoSessionRefresh: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.session.refresh",
|
id: "com.atproto.session.refresh",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5023,7 +5018,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoSyncGetRepo: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.sync.getRepo",
|
id: "com.atproto.sync.getRepo",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5050,7 +5045,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoSyncGetRoot: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.sync.getRoot",
|
id: "com.atproto.sync.getRoot",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5082,7 +5077,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
ComAtprotoSyncUpdateRepo: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "com.atproto.sync.updateRepo",
|
id: "com.atproto.sync.updateRepo",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5105,7 +5100,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyActorCreateScene: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.actor.createScene",
|
id: "app.bsky.actor.createScene",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5157,7 +5152,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyActorGetProfile: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.actor.getProfile",
|
id: "app.bsky.actor.getProfile",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5211,6 +5206,9 @@ var lexicons = [
|
||||||
avatar: {
|
avatar: {
|
||||||
type: "string"
|
type: "string"
|
||||||
},
|
},
|
||||||
|
banner: {
|
||||||
|
type: "string"
|
||||||
|
},
|
||||||
followersCount: {
|
followersCount: {
|
||||||
type: "integer"
|
type: "integer"
|
||||||
},
|
},
|
||||||
|
@ -5244,7 +5242,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyActorGetSuggestions: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.actor.getSuggestions",
|
id: "app.bsky.actor.getSuggestions",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5328,7 +5326,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyActorProfile: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.actor.profile",
|
id: "app.bsky.actor.profile",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5353,13 +5351,20 @@ var lexicons = [
|
||||||
maxWidth: 500,
|
maxWidth: 500,
|
||||||
maxHeight: 500,
|
maxHeight: 500,
|
||||||
maxSize: 3e5
|
maxSize: 3e5
|
||||||
|
},
|
||||||
|
banner: {
|
||||||
|
type: "image",
|
||||||
|
accept: ["image/png", "image/jpeg"],
|
||||||
|
maxWidth: 1500,
|
||||||
|
maxHeight: 500,
|
||||||
|
maxSize: 5e5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyActorRef: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.actor.ref",
|
id: "app.bsky.actor.ref",
|
||||||
description: "A reference to an actor in the network.",
|
description: "A reference to an actor in the network.",
|
||||||
|
@ -5401,7 +5406,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyActorSearch: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.actor.search",
|
id: "app.bsky.actor.search",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5477,7 +5482,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyActorSearchTypeahead: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.actor.searchTypeahead",
|
id: "app.bsky.actor.searchTypeahead",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5541,7 +5546,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyActorUpdateProfile: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.actor.updateProfile",
|
id: "app.bsky.actor.updateProfile",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5570,6 +5575,13 @@ var lexicons = [
|
||||||
maxWidth: 500,
|
maxWidth: 500,
|
||||||
maxHeight: 500,
|
maxHeight: 500,
|
||||||
maxSize: 1e5
|
maxSize: 1e5
|
||||||
|
},
|
||||||
|
banner: {
|
||||||
|
type: "image",
|
||||||
|
accept: ["image/png", "image/jpeg"],
|
||||||
|
maxWidth: 1500,
|
||||||
|
maxHeight: 500,
|
||||||
|
maxSize: 5e5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5591,11 +5603,25 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
errors: [
|
||||||
|
{
|
||||||
|
name: "InvalidBlob"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "BlobTooLarge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "InvalidMimeType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "InvalidImageDimensions"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedEmbed: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.embed",
|
id: "app.bsky.feed.embed",
|
||||||
description: "Content embedded in other content, such as an image or link embedded in a post.",
|
description: "Content embedded in other content, such as an image or link embedded in a post.",
|
||||||
|
@ -5674,7 +5700,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedGetAuthorFeed: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.getAuthorFeed",
|
id: "app.bsky.feed.getAuthorFeed",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5795,7 +5821,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedGetPostThread: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.getPostThread",
|
id: "app.bsky.feed.getPostThread",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -5933,7 +5959,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedGetRepostedBy: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.getRepostedBy",
|
id: "app.bsky.feed.getRepostedBy",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6017,7 +6043,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedGetTimeline: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.getTimeline",
|
id: "app.bsky.feed.getTimeline",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6137,7 +6163,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedGetVotes: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.getVotes",
|
id: "app.bsky.feed.getVotes",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6216,7 +6242,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedPost: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.post",
|
id: "app.bsky.feed.post",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6295,7 +6321,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedRepost: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.repost",
|
id: "app.bsky.feed.repost",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6318,7 +6344,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedSetVote: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.setVote",
|
id: "app.bsky.feed.setVote",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6359,7 +6385,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedTrend: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.trend",
|
id: "app.bsky.feed.trend",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6382,7 +6408,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyFeedVote: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.feed.vote",
|
id: "app.bsky.feed.vote",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6409,7 +6435,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphAssertCreator: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.assertCreator",
|
id: "app.bsky.graph.assertCreator",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6419,7 +6445,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphAssertMember: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.assertMember",
|
id: "app.bsky.graph.assertMember",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6429,7 +6455,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphAssertion: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.assertion",
|
id: "app.bsky.graph.assertion",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6455,7 +6481,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphConfirmation: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.confirmation",
|
id: "app.bsky.graph.confirmation",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6482,7 +6508,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphFollow: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.follow",
|
id: "app.bsky.graph.follow",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6506,7 +6532,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphGetAssertions: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.getAssertions",
|
id: "app.bsky.graph.getAssertions",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6620,7 +6646,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphGetFollowers: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.getFollowers",
|
id: "app.bsky.graph.getFollowers",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6700,7 +6726,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphGetFollows: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.getFollows",
|
id: "app.bsky.graph.getFollows",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6777,7 +6803,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphGetMembers: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.getMembers",
|
id: "app.bsky.graph.getMembers",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6854,7 +6880,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyGraphGetMemberships: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.graph.getMemberships",
|
id: "app.bsky.graph.getMemberships",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6931,7 +6957,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyNotificationGetCount: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.notification.getCount",
|
id: "app.bsky.notification.getCount",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -6952,7 +6978,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyNotificationList: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.notification.list",
|
id: "app.bsky.notification.list",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -7043,7 +7069,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskyNotificationUpdateSeen: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.notification.updateSeen",
|
id: "app.bsky.notification.updateSeen",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -7065,7 +7091,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskySystemActorScene: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.system.actorScene",
|
id: "app.bsky.system.actorScene",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -7075,7 +7101,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskySystemActorUser: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.system.actorUser",
|
id: "app.bsky.system.actorUser",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -7085,7 +7111,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskySystemDeclRef: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.system.declRef",
|
id: "app.bsky.system.declRef",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -7108,7 +7134,7 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
AppBskySystemDeclaration: {
|
||||||
lexicon: 1,
|
lexicon: 1,
|
||||||
id: "app.bsky.system.declaration",
|
id: "app.bsky.system.declaration",
|
||||||
defs: {
|
defs: {
|
||||||
|
@ -7132,7 +7158,9 @@ var lexicons = [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
};
|
||||||
|
var schemas = Object.values(schemaDict);
|
||||||
|
var lexicons = new Lexicons(schemas);
|
||||||
|
|
||||||
// src/client/types/com/atproto/account/create.ts
|
// src/client/types/com/atproto/account/create.ts
|
||||||
var create_exports = {};
|
var create_exports = {};
|
||||||
|
@ -7251,18 +7279,10 @@ function toKnownErr6(e) {
|
||||||
// src/client/types/com/atproto/blob/upload.ts
|
// src/client/types/com/atproto/blob/upload.ts
|
||||||
var upload_exports = {};
|
var upload_exports = {};
|
||||||
__export(upload_exports, {
|
__export(upload_exports, {
|
||||||
InvalidBlobError: () => InvalidBlobError,
|
|
||||||
toKnownErr: () => toKnownErr7
|
toKnownErr: () => toKnownErr7
|
||||||
});
|
});
|
||||||
var InvalidBlobError = class extends XRPCError {
|
|
||||||
constructor(src) {
|
|
||||||
super(src.status, src.error, src.message);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
function toKnownErr7(e) {
|
function toKnownErr7(e) {
|
||||||
if (e instanceof XRPCError) {
|
if (e instanceof XRPCError) {
|
||||||
if (e.error === "InvalidBlob")
|
|
||||||
return new InvalidBlobError(e);
|
|
||||||
}
|
}
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
@ -7517,10 +7537,42 @@ function toKnownErr28(e) {
|
||||||
// src/client/types/app/bsky/actor/updateProfile.ts
|
// src/client/types/app/bsky/actor/updateProfile.ts
|
||||||
var updateProfile_exports = {};
|
var updateProfile_exports = {};
|
||||||
__export(updateProfile_exports, {
|
__export(updateProfile_exports, {
|
||||||
|
BlobTooLargeError: () => BlobTooLargeError,
|
||||||
|
InvalidBlobError: () => InvalidBlobError,
|
||||||
|
InvalidImageDimensionsError: () => InvalidImageDimensionsError,
|
||||||
|
InvalidMimeTypeError: () => InvalidMimeTypeError,
|
||||||
toKnownErr: () => toKnownErr29
|
toKnownErr: () => toKnownErr29
|
||||||
});
|
});
|
||||||
|
var InvalidBlobError = class extends XRPCError {
|
||||||
|
constructor(src) {
|
||||||
|
super(src.status, src.error, src.message);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var BlobTooLargeError = class extends XRPCError {
|
||||||
|
constructor(src) {
|
||||||
|
super(src.status, src.error, src.message);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var InvalidMimeTypeError = class extends XRPCError {
|
||||||
|
constructor(src) {
|
||||||
|
super(src.status, src.error, src.message);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var InvalidImageDimensionsError = class extends XRPCError {
|
||||||
|
constructor(src) {
|
||||||
|
super(src.status, src.error, src.message);
|
||||||
|
}
|
||||||
|
};
|
||||||
function toKnownErr29(e) {
|
function toKnownErr29(e) {
|
||||||
if (e instanceof XRPCError) {
|
if (e instanceof XRPCError) {
|
||||||
|
if (e.error === "InvalidBlob")
|
||||||
|
return new InvalidBlobError(e);
|
||||||
|
if (e.error === "BlobTooLarge")
|
||||||
|
return new BlobTooLargeError(e);
|
||||||
|
if (e.error === "InvalidMimeType")
|
||||||
|
return new InvalidMimeTypeError(e);
|
||||||
|
if (e.error === "InvalidImageDimensions")
|
||||||
|
return new InvalidImageDimensionsError(e);
|
||||||
}
|
}
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
@ -7766,7 +7818,7 @@ var APP_BSKY_SYSTEM = {
|
||||||
var Client2 = class {
|
var Client2 = class {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.xrpc = new Client();
|
this.xrpc = new Client();
|
||||||
this.xrpc.addLexicons(lexicons);
|
this.xrpc.addLexicons(schemas);
|
||||||
}
|
}
|
||||||
service(serviceUri) {
|
service(serviceUri) {
|
||||||
return new ServiceClient2(this, this.xrpc.service(serviceUri));
|
return new ServiceClient2(this, this.xrpc.service(serviceUri));
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -12,6 +12,7 @@ export interface OutputSchema {
|
||||||
displayName?: string;
|
displayName?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
|
banner?: string;
|
||||||
followersCount: number;
|
followersCount: number;
|
||||||
followsCount: number;
|
followsCount: number;
|
||||||
membersCount: number;
|
membersCount: number;
|
||||||
|
|
|
@ -6,5 +6,10 @@ export interface Record {
|
||||||
mimeType: string;
|
mimeType: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
};
|
};
|
||||||
|
banner?: {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Headers } from '@atproto/xrpc';
|
import { Headers, XRPCError } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export interface InputSchema {
|
export interface InputSchema {
|
||||||
|
@ -10,6 +10,11 @@ export interface InputSchema {
|
||||||
mimeType: string;
|
mimeType: string;
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
};
|
};
|
||||||
|
banner?: {
|
||||||
|
cid: string;
|
||||||
|
mimeType: string;
|
||||||
|
[k: string]: unknown;
|
||||||
|
};
|
||||||
[k: string]: unknown;
|
[k: string]: unknown;
|
||||||
}
|
}
|
||||||
export interface OutputSchema {
|
export interface OutputSchema {
|
||||||
|
@ -28,4 +33,16 @@ export interface Response {
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
|
export declare class InvalidBlobError extends XRPCError {
|
||||||
|
constructor(src: XRPCError);
|
||||||
|
}
|
||||||
|
export declare class BlobTooLargeError extends XRPCError {
|
||||||
|
constructor(src: XRPCError);
|
||||||
|
}
|
||||||
|
export declare class InvalidMimeTypeError extends XRPCError {
|
||||||
|
constructor(src: XRPCError);
|
||||||
|
}
|
||||||
|
export declare class InvalidImageDimensionsError extends XRPCError {
|
||||||
|
constructor(src: XRPCError);
|
||||||
|
}
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Headers, XRPCError } from '@atproto/xrpc';
|
import { Headers } from '@atproto/xrpc';
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
}
|
}
|
||||||
export declare type InputSchema = string | Uint8Array;
|
export declare type InputSchema = string | Uint8Array;
|
||||||
|
@ -9,14 +9,11 @@ export interface OutputSchema {
|
||||||
export interface CallOptions {
|
export interface CallOptions {
|
||||||
headers?: Headers;
|
headers?: Headers;
|
||||||
qp?: QueryParams;
|
qp?: QueryParams;
|
||||||
encoding: '*/*';
|
encoding: string;
|
||||||
}
|
}
|
||||||
export interface Response {
|
export interface Response {
|
||||||
success: boolean;
|
success: boolean;
|
||||||
headers: Headers;
|
headers: Headers;
|
||||||
data: OutputSchema;
|
data: OutputSchema;
|
||||||
}
|
}
|
||||||
export declare class InvalidBlobError extends XRPCError {
|
|
||||||
constructor(src: XRPCError);
|
|
||||||
}
|
|
||||||
export declare function toKnownErr(e: any): any;
|
export declare function toKnownErr(e: any): any;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,4 @@
|
||||||
import React, {useState} from 'react'
|
import React, {useState} from 'react'
|
||||||
import {ComAtprotoBlobUpload} from '../../../third-party/api/index'
|
|
||||||
import * as Toast from '../util/Toast'
|
import * as Toast from '../util/Toast'
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
|
@ -20,6 +19,7 @@ import {
|
||||||
MAX_DISPLAY_NAME,
|
MAX_DISPLAY_NAME,
|
||||||
MAX_DESCRIPTION,
|
MAX_DESCRIPTION,
|
||||||
} from '../../../lib/strings'
|
} from '../../../lib/strings'
|
||||||
|
import {isNetworkError} from '../../../lib/errors'
|
||||||
import {UserBanner} from '../util/UserBanner'
|
import {UserBanner} from '../util/UserBanner'
|
||||||
import {UserAvatar} from '../util/UserAvatar'
|
import {UserAvatar} from '../util/UserAvatar'
|
||||||
|
|
||||||
|
@ -52,7 +52,6 @@ export function Component({
|
||||||
store.shell.closeModal()
|
store.shell.closeModal()
|
||||||
}
|
}
|
||||||
const onSelectNewAvatar = (img: PickedImage) => {
|
const onSelectNewAvatar = (img: PickedImage) => {
|
||||||
console.log(img)
|
|
||||||
setNewUserAvatar(img)
|
setNewUserAvatar(img)
|
||||||
setUserAvatar(img.path)
|
setUserAvatar(img.path)
|
||||||
}
|
}
|
||||||
|
@ -74,14 +73,12 @@ export function Component({
|
||||||
onUpdate?.()
|
onUpdate?.()
|
||||||
store.shell.closeModal()
|
store.shell.closeModal()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
if (e instanceof ComAtprotoBlobUpload.InvalidBlobError) {
|
if (isNetworkError(e)) {
|
||||||
setError(e.message)
|
setError(
|
||||||
|
'Failed to save your profile. Check your internet connection and try again.',
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
// TODO replace when error detection is correct
|
|
||||||
setError(e.message)
|
setError(e.message)
|
||||||
// setError(
|
|
||||||
// 'Failed to save your profile. Check your internet connection and try again.',
|
|
||||||
// )
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setProcessing(false)
|
setProcessing(false)
|
||||||
|
|
Loading…
Reference in New Issue