Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lexicon: Replace all user parameters with actor or repo #655

Merged
merged 6 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lexicons/app/bsky/actor/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Find users matching search criteria.",
"description": "Find actors matching search criteria.",
"parameters": {
"type": "params",
"properties": {
Expand All @@ -17,10 +17,10 @@
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["users"],
"required": ["actors"],
"properties": {
"cursor": {"type": "string"},
"users": {
"actors": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.actor.profile#viewBasic"}
}
Expand Down
6 changes: 3 additions & 3 deletions lexicons/app/bsky/actor/searchTypeahead.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Find user suggestions for a search term.",
"description": "Find actor suggestions for a search term.",
"parameters": {
"type": "params",
"properties": {
Expand All @@ -16,9 +16,9 @@
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["users"],
"required": ["actors"],
"properties": {
"users": {
"actors": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.actor.ref#withInfo"}
}
Expand Down
6 changes: 3 additions & 3 deletions lexicons/app/bsky/feed/getAuthorFeed.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"defs": {
"main": {
"type": "query",
"description": "A view of a user's feed.",
"description": "A view of an actor's feed.",
"parameters": {
"type": "params",
"required": ["author"],
"required": ["actor"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a bit of liberty here & changed it to actor even tho it wasn't ambiguous like user. Let me know if you disagree

"properties": {
"author": {"type": "string"},
"actor": {"type": "string"},
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
"before": {"type": "string"}
}
Expand Down
6 changes: 3 additions & 3 deletions lexicons/app/bsky/graph/getFollowers.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"defs": {
"main": {
"type": "query",
"description": "Who is following a user?",
"description": "Who is following an actor?",
"parameters": {
"type": "params",
"required": ["user"],
"required": ["actor"],
"properties": {
"user": {"type": "string"},
"actor": {"type": "string"},
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
"before": {"type": "string"}
}
Expand Down
6 changes: 3 additions & 3 deletions lexicons/app/bsky/graph/getFollows.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"defs": {
"main": {
"type": "query",
"description": "Who is a user following?",
"description": "Who is an actor following?",
"parameters": {
"type": "params",
"required": ["user"],
"required": ["actor"],
"properties": {
"user": {"type": "string"},
"actor": {"type": "string"},
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
"before": {"type": "string"}
}
Expand Down
4 changes: 2 additions & 2 deletions lexicons/app/bsky/graph/mute.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["user"],
"required": ["actor"],
"properties": {
"user": { "type": "string" }
"actor": { "type": "string" }
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lexicons/app/bsky/graph/unmute.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["user"],
"required": ["actor"],
"properties": {
"user": { "type": "string" }
"actor": { "type": "string" }
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lexicons/com/atproto/repo/describe.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"description": "Get information about the repo, including the list of collections.",
"parameters": {
"type": "params",
"required": ["user"],
"required": ["repo"],
"properties": {
"user": {"type": "string", "description": "The handle or DID of the repo."}
"repo": {"type": "string", "description": "The handle or DID of the repo."}
}
},
"output": {
Expand Down
4 changes: 2 additions & 2 deletions lexicons/com/atproto/repo/getRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"description": "Fetch a record.",
"parameters": {
"type": "params",
"required": ["user", "collection", "rkey"],
"required": ["repo", "collection", "rkey"],
"properties": {
"user": {"type": "string", "description": "The handle or DID of the repo."},
"repo": {"type": "string", "description": "The handle or DID of the repo."},
"collection": {"type": "string", "description": "The NSID of the collection."},
"rkey": {"type": "string", "description": "The key of the record."},
"cid": {
Expand Down
4 changes: 2 additions & 2 deletions lexicons/com/atproto/repo/listRecords.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"description": "List a range of records in a collection.",
"parameters": {
"type": "params",
"required": ["user", "collection"],
"required": ["repo", "collection"],
"properties": {
"user": {"type": "string", "description": "The handle or DID of the repo."},
"repo": {"type": "string", "description": "The handle or DID of the repo."},
"collection": {"type": "string", "description": "The NSID of the record type."},
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50, "description": "The number of records to return."},
"before": {"type": "string", "description": "A TID to filter the range of records returned."},
Expand Down
50 changes: 25 additions & 25 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1472,9 +1472,9 @@ export const schemaDict = {
'Get information about the repo, including the list of collections.',
parameters: {
type: 'params',
required: ['user'],
required: ['repo'],
properties: {
user: {
repo: {
type: 'string',
description: 'The handle or DID of the repo.',
},
Expand Down Expand Up @@ -1526,9 +1526,9 @@ export const schemaDict = {
description: 'Fetch a record.',
parameters: {
type: 'params',
required: ['user', 'collection', 'rkey'],
required: ['repo', 'collection', 'rkey'],
properties: {
user: {
repo: {
type: 'string',
description: 'The handle or DID of the repo.',
},
Expand Down Expand Up @@ -1580,9 +1580,9 @@ export const schemaDict = {
description: 'List a range of records in a collection.',
parameters: {
type: 'params',
required: ['user', 'collection'],
required: ['repo', 'collection'],
properties: {
user: {
repo: {
type: 'string',
description: 'The handle or DID of the repo.',
},
Expand Down Expand Up @@ -2784,7 +2784,7 @@ export const schemaDict = {
defs: {
main: {
type: 'query',
description: 'Find users matching search criteria.',
description: 'Find actors matching search criteria.',
parameters: {
type: 'params',
properties: {
Expand All @@ -2806,12 +2806,12 @@ export const schemaDict = {
encoding: 'application/json',
schema: {
type: 'object',
required: ['users'],
required: ['actors'],
properties: {
cursor: {
type: 'string',
},
users: {
actors: {
type: 'array',
items: {
type: 'ref',
Expand All @@ -2830,7 +2830,7 @@ export const schemaDict = {
defs: {
main: {
type: 'query',
description: 'Find user suggestions for a search term.',
description: 'Find actor suggestions for a search term.',
parameters: {
type: 'params',
properties: {
Expand All @@ -2849,9 +2849,9 @@ export const schemaDict = {
encoding: 'application/json',
schema: {
type: 'object',
required: ['users'],
required: ['actors'],
properties: {
users: {
actors: {
type: 'array',
items: {
type: 'ref',
Expand Down Expand Up @@ -3195,12 +3195,12 @@ export const schemaDict = {
defs: {
main: {
type: 'query',
description: "A view of a user's feed.",
description: "A view of an actor's feed.",
parameters: {
type: 'params',
required: ['author'],
required: ['actor'],
properties: {
author: {
actor: {
type: 'string',
},
limit: {
Expand Down Expand Up @@ -3875,12 +3875,12 @@ export const schemaDict = {
defs: {
main: {
type: 'query',
description: 'Who is following a user?',
description: 'Who is following an actor?',
parameters: {
type: 'params',
required: ['user'],
required: ['actor'],
properties: {
user: {
actor: {
type: 'string',
},
limit: {
Expand Down Expand Up @@ -3926,12 +3926,12 @@ export const schemaDict = {
defs: {
main: {
type: 'query',
description: 'Who is a user following?',
description: 'Who is an actor following?',
parameters: {
type: 'params',
required: ['user'],
required: ['actor'],
properties: {
user: {
actor: {
type: 'string',
},
limit: {
Expand Down Expand Up @@ -4025,9 +4025,9 @@ export const schemaDict = {
encoding: 'application/json',
schema: {
type: 'object',
required: ['user'],
required: ['actor'],
properties: {
user: {
actor: {
type: 'string',
},
},
Expand All @@ -4047,9 +4047,9 @@ export const schemaDict = {
encoding: 'application/json',
schema: {
type: 'object',
required: ['user'],
required: ['actor'],
properties: {
user: {
actor: {
type: 'string',
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/types/app/bsky/actor/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type InputSchema = undefined

export interface OutputSchema {
cursor?: string
users: AppBskyActorProfile.ViewBasic[]
actors: AppBskyActorProfile.ViewBasic[]
[k: string]: unknown
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface QueryParams {
export type InputSchema = undefined

export interface OutputSchema {
users: AppBskyActorRef.WithInfo[]
actors: AppBskyActorRef.WithInfo[]
[k: string]: unknown
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { lexicons } from '../../../../lexicons'
import * as AppBskyFeedFeedViewPost from './feedViewPost'

export interface QueryParams {
author: string
actor: string
limit?: number
before?: string
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { lexicons } from '../../../../lexicons'
import * as AppBskyActorRef from '../actor/ref'

export interface QueryParams {
user: string
actor: string
limit?: number
before?: string
}
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/types/app/bsky/graph/getFollows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { lexicons } from '../../../../lexicons'
import * as AppBskyActorRef from '../actor/ref'

export interface QueryParams {
user: string
actor: string
limit?: number
before?: string
}
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/types/app/bsky/graph/mute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { lexicons } from '../../../../lexicons'
export interface QueryParams {}

export interface InputSchema {
user: string
actor: string
[k: string]: unknown
}

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/types/app/bsky/graph/unmute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { lexicons } from '../../../../lexicons'
export interface QueryParams {}

export interface InputSchema {
user: string
actor: string
[k: string]: unknown
}

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/client/types/com/atproto/repo/describe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { lexicons } from '../../../../lexicons'

export interface QueryParams {
/** The handle or DID of the repo. */
user: string
repo: string
}

export type InputSchema = undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { lexicons } from '../../../../lexicons'

export interface QueryParams {
/** The handle or DID of the repo. */
user: string
repo: string
/** The NSID of the collection. */
collection: string
/** The key of the record. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { lexicons } from '../../../../lexicons'

export interface QueryParams {
/** The handle or DID of the repo. */
user: string
repo: string
/** The NSID of the record type. */
collection: string
/** The number of records to return. */
Expand Down
Loading