Skip to content

Commit

Permalink
re-codegen for search skeleton obj
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed Sep 22, 2023
1 parent a698e65 commit f41ddab
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 18 deletions.
2 changes: 2 additions & 0 deletions packages/api/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
import * as AppBskyUnspeccedApplyLabels from './types/app/bsky/unspecced/applyLabels'
import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
Expand Down Expand Up @@ -259,6 +260,7 @@ export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
export * as AppBskyUnspeccedApplyLabels from './types/app/bsky/unspecced/applyLabels'
export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs'
export * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'
export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators'
export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton'
Expand Down
35 changes: 31 additions & 4 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6908,6 +6908,32 @@ export const schemaDict = {
},
},
},
AppBskyUnspeccedDefs: {
lexicon: 1,
id: 'app.bsky.unspecced.defs',
defs: {
skeletonSearchPost: {
type: 'object',
required: ['uri'],
properties: {
uri: {
type: 'string',
format: 'at-uri',
},
},
},
skeletonSearchActor: {
type: 'object',
required: ['did'],
properties: {
did: {
type: 'string',
format: 'did',
},
},
},
},
},
AppBskyUnspeccedGetPopular: {
lexicon: 1,
id: 'app.bsky.unspecced.getPopular',
Expand Down Expand Up @@ -7099,8 +7125,8 @@ export const schemaDict = {
actors: {
type: 'array',
items: {
type: 'string',
format: 'did',
type: 'ref',
ref: 'lex:app.bsky.unspecced.defs#skeletonSearchActor',
},
},
},
Expand Down Expand Up @@ -7160,8 +7186,8 @@ export const schemaDict = {
posts: {
type: 'array',
items: {
type: 'string',
format: 'at-uri',
type: 'ref',
ref: 'lex:app.bsky.unspecced.defs#skeletonSearchPost',
},
},
},
Expand Down Expand Up @@ -7310,6 +7336,7 @@ export const ids = {
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
AppBskyUnspeccedApplyLabels: 'app.bsky.unspecced.applyLabels',
AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
AppBskyUnspeccedGetPopular: 'app.bsky.unspecced.getPopular',
AppBskyUnspeccedGetPopularFeedGenerators:
'app.bsky.unspecced.getPopularFeedGenerators',
Expand Down
41 changes: 41 additions & 0 deletions packages/api/src/client/types/app/bsky/unspecced/defs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { isObj, hasProp } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import { CID } from 'multiformats/cid'

export interface SkeletonSearchPost {
uri: string
[k: string]: unknown
}

export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.unspecced.defs#skeletonSearchPost'
)
}

export function validateSkeletonSearchPost(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchPost', v)
}

export interface SkeletonSearchActor {
did: string
[k: string]: unknown
}

export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.unspecced.defs#skeletonSearchActor'
)
}

export function validateSkeletonSearchActor(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchActor', v)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { isObj, hasProp } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import { CID } from 'multiformats/cid'
import * as AppBskyUnspeccedDefs from './defs'

export interface QueryParams {
/** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax */
Expand All @@ -23,7 +24,7 @@ export interface OutputSchema {
cursor?: string
/** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
hitsTotal?: number
actors: string[]
actors: AppBskyUnspeccedDefs.SkeletonSearchActor[]
[k: string]: unknown
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { isObj, hasProp } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import { CID } from 'multiformats/cid'
import * as AppBskyUnspeccedDefs from './defs'

export interface QueryParams {
/** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
Expand All @@ -21,7 +22,7 @@ export interface OutputSchema {
cursor?: string
/** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
hitsTotal?: number
posts: string[]
posts: AppBskyUnspeccedDefs.SkeletonSearchPost[]
[k: string]: unknown
}

Expand Down
35 changes: 31 additions & 4 deletions packages/bsky/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6908,6 +6908,32 @@ export const schemaDict = {
},
},
},
AppBskyUnspeccedDefs: {
lexicon: 1,
id: 'app.bsky.unspecced.defs',
defs: {
skeletonSearchPost: {
type: 'object',
required: ['uri'],
properties: {
uri: {
type: 'string',
format: 'at-uri',
},
},
},
skeletonSearchActor: {
type: 'object',
required: ['did'],
properties: {
did: {
type: 'string',
format: 'did',
},
},
},
},
},
AppBskyUnspeccedGetPopular: {
lexicon: 1,
id: 'app.bsky.unspecced.getPopular',
Expand Down Expand Up @@ -7099,8 +7125,8 @@ export const schemaDict = {
actors: {
type: 'array',
items: {
type: 'string',
format: 'did',
type: 'ref',
ref: 'lex:app.bsky.unspecced.defs#skeletonSearchActor',
},
},
},
Expand Down Expand Up @@ -7160,8 +7186,8 @@ export const schemaDict = {
posts: {
type: 'array',
items: {
type: 'string',
format: 'at-uri',
type: 'ref',
ref: 'lex:app.bsky.unspecced.defs#skeletonSearchPost',
},
},
},
Expand Down Expand Up @@ -7310,6 +7336,7 @@ export const ids = {
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
AppBskyUnspeccedApplyLabels: 'app.bsky.unspecced.applyLabels',
AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
AppBskyUnspeccedGetPopular: 'app.bsky.unspecced.getPopular',
AppBskyUnspeccedGetPopularFeedGenerators:
'app.bsky.unspecced.getPopularFeedGenerators',
Expand Down
41 changes: 41 additions & 0 deletions packages/bsky/src/lexicon/types/app/bsky/unspecced/defs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'

export interface SkeletonSearchPost {
uri: string
[k: string]: unknown
}

export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.unspecced.defs#skeletonSearchPost'
)
}

export function validateSkeletonSearchPost(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchPost', v)
}

export interface SkeletonSearchActor {
did: string
[k: string]: unknown
}

export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.unspecced.defs#skeletonSearchActor'
)
}

export function validateSkeletonSearchActor(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchActor', v)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
import * as AppBskyUnspeccedDefs from './defs'

export interface QueryParams {
/** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax */
Expand All @@ -24,7 +25,7 @@ export interface OutputSchema {
cursor?: string
/** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
hitsTotal?: number
actors: string[]
actors: AppBskyUnspeccedDefs.SkeletonSearchActor[]
[k: string]: unknown
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
import * as AppBskyUnspeccedDefs from './defs'

export interface QueryParams {
/** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
Expand All @@ -22,7 +23,7 @@ export interface OutputSchema {
cursor?: string
/** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
hitsTotal?: number
posts: string[]
posts: AppBskyUnspeccedDefs.SkeletonSearchPost[]
[k: string]: unknown
}

Expand Down
35 changes: 31 additions & 4 deletions packages/pds/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6908,6 +6908,32 @@ export const schemaDict = {
},
},
},
AppBskyUnspeccedDefs: {
lexicon: 1,
id: 'app.bsky.unspecced.defs',
defs: {
skeletonSearchPost: {
type: 'object',
required: ['uri'],
properties: {
uri: {
type: 'string',
format: 'at-uri',
},
},
},
skeletonSearchActor: {
type: 'object',
required: ['did'],
properties: {
did: {
type: 'string',
format: 'did',
},
},
},
},
},
AppBskyUnspeccedGetPopular: {
lexicon: 1,
id: 'app.bsky.unspecced.getPopular',
Expand Down Expand Up @@ -7099,8 +7125,8 @@ export const schemaDict = {
actors: {
type: 'array',
items: {
type: 'string',
format: 'did',
type: 'ref',
ref: 'lex:app.bsky.unspecced.defs#skeletonSearchActor',
},
},
},
Expand Down Expand Up @@ -7160,8 +7186,8 @@ export const schemaDict = {
posts: {
type: 'array',
items: {
type: 'string',
format: 'at-uri',
type: 'ref',
ref: 'lex:app.bsky.unspecced.defs#skeletonSearchPost',
},
},
},
Expand Down Expand Up @@ -7310,6 +7336,7 @@ export const ids = {
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
AppBskyUnspeccedApplyLabels: 'app.bsky.unspecced.applyLabels',
AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs',
AppBskyUnspeccedGetPopular: 'app.bsky.unspecced.getPopular',
AppBskyUnspeccedGetPopularFeedGenerators:
'app.bsky.unspecced.getPopularFeedGenerators',
Expand Down
41 changes: 41 additions & 0 deletions packages/pds/src/lexicon/types/app/bsky/unspecced/defs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'

export interface SkeletonSearchPost {
uri: string
[k: string]: unknown
}

export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.unspecced.defs#skeletonSearchPost'
)
}

export function validateSkeletonSearchPost(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchPost', v)
}

export interface SkeletonSearchActor {
did: string
[k: string]: unknown
}

export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.unspecced.defs#skeletonSearchActor'
)
}

export function validateSkeletonSearchActor(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchActor', v)
}
Loading

0 comments on commit f41ddab

Please sign in to comment.