Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Mar 17, 2023
2 parents b0254c8 + 228431e commit f4d3869
Show file tree
Hide file tree
Showing 50 changed files with 1,373 additions and 329 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-and-push-pds-mirror
name: build-and-push-pds-aws
on:
push:
branches:
Expand All @@ -10,7 +10,7 @@ env:
IMAGE_NAME: pds

jobs:
pds-container-mirror:
pds-container-aws:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -30,7 +30,6 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ env.USERNAME}}
password: ${{ env.PASSWORD }}
ecr: false # Disable ECR mode since we're using standard Docker auth.

- name: Extract Docker metadata
id: meta
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-and-push-pds
name: build-and-push-pds-ghcr
on:
push:
branches:
Expand All @@ -12,7 +12,7 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
pds-container:
pds-container-ghcr:
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
31 changes: 31 additions & 0 deletions lexicons/app/bsky/unspecced/getPopular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"lexicon": 1,
"id": "app.bsky.unspecced.getPopular",
"defs": {
"main": {
"type": "query",
"description": "An unspecced view of globally popular items",
"parameters": {
"type": "params",
"properties": {
"limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50},
"cursor": {"type": "string"}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["feed"],
"properties": {
"cursor": {"type": "string"},
"feed": {
"type": "array",
"items": {"type": "ref", "ref": "app.bsky.feed.defs#feedViewPost"}
}
}
}
}
}
}
}
23 changes: 23 additions & 0 deletions packages/api/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notificatio
import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications'
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
import * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'

export * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
export * as ComAtprotoAdminGetModerationAction from './types/com/atproto/admin/getModerationAction'
Expand Down Expand Up @@ -163,6 +164,7 @@ export * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notificatio
export * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications'
export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet'
export * as AppBskyUnspeccedGetPopular from './types/app/bsky/unspecced/getPopular'

export const COM_ATPROTO_ADMIN = {
DefsTakedown: 'com.atproto.admin.defs#takedown',
Expand Down Expand Up @@ -766,6 +768,7 @@ export class BskyNS {
graph: GraphNS
notification: NotificationNS
richtext: RichtextNS
unspecced: UnspeccedNS

constructor(service: AtpServiceClient) {
this._service = service
Expand All @@ -775,6 +778,7 @@ export class BskyNS {
this.graph = new GraphNS(service)
this.notification = new NotificationNS(service)
this.richtext = new RichtextNS(service)
this.unspecced = new UnspeccedNS(service)
}
}

Expand Down Expand Up @@ -1349,3 +1353,22 @@ export class RichtextNS {
this._service = service
}
}

export class UnspeccedNS {
_service: AtpServiceClient

constructor(service: AtpServiceClient) {
this._service = service
}

getPopular(
params?: AppBskyUnspeccedGetPopular.QueryParams,
opts?: AppBskyUnspeccedGetPopular.CallOptions,
): Promise<AppBskyUnspeccedGetPopular.Response> {
return this._service.xrpc
.call('app.bsky.unspecced.getPopular', params, undefined, opts)
.catch((e) => {
throw AppBskyUnspeccedGetPopular.toKnownErr(e)
})
}
}
44 changes: 44 additions & 0 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4011,6 +4011,49 @@ export const schemaDict = {
},
},
},
AppBskyUnspeccedGetPopular: {
lexicon: 1,
id: 'app.bsky.unspecced.getPopular',
defs: {
main: {
type: 'query',
description: 'An unspecced view of globally popular items',
parameters: {
type: 'params',
properties: {
limit: {
type: 'integer',
minimum: 1,
maximum: 100,
default: 50,
},
cursor: {
type: 'string',
},
},
},
output: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['feed'],
properties: {
cursor: {
type: 'string',
},
feed: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.feed.defs#feedViewPost',
},
},
},
},
},
},
},
},
}
export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
export const lexicons: Lexicons = new Lexicons(schemas)
Expand Down Expand Up @@ -4098,4 +4141,5 @@ export const ids = {
'app.bsky.notification.listNotifications',
AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen',
AppBskyRichtextFacet: 'app.bsky.richtext.facet',
AppBskyUnspeccedGetPopular: 'app.bsky.unspecced.getPopular',
}
37 changes: 37 additions & 0 deletions packages/api/src/client/types/app/bsky/unspecced/getPopular.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { Headers, XRPCError } from '@atproto/xrpc'
import { ValidationResult } from '@atproto/lexicon'
import { isObj, hasProp } from '../../../../util'
import { lexicons } from '../../../../lexicons'
import * as AppBskyFeedDefs from '../feed/defs'

export interface QueryParams {
limit?: number
cursor?: string
}

export type InputSchema = undefined

export interface OutputSchema {
cursor?: string
feed: AppBskyFeedDefs.FeedViewPost[]
[k: string]: unknown
}

export interface CallOptions {
headers?: Headers
}

export interface Response {
success: boolean
headers: Headers
data: OutputSchema
}

export function toKnownErr(e: any) {
if (e instanceof XRPCError) {
}
return e
}
1 change: 1 addition & 0 deletions packages/dev-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@atproto/uri": "*",
"@did-plc/lib": "^0.0.1",
"@did-plc/server": "^0.0.1",
"better-sqlite3": "^7.6.2",
"chalk": "^5.0.1",
"dotenv": "^16.0.1",
"get-port": "^6.1.2",
Expand Down
101 changes: 0 additions & 101 deletions packages/handle/src/index.ts

This file was deleted.

Loading

0 comments on commit f4d3869

Please sign in to comment.