From 45770bb165de4a9a846c35edc3c67455e1ad5ceb Mon Sep 17 00:00:00 2001 From: devin ivy Date: Wed, 21 Aug 2024 20:38:54 -0400 Subject: [PATCH] Appview: sync-up protos for quotes and postgates (#2733) appview: sync-up protos for quotes and postgates --- packages/bsky/proto/bsky.proto | 53 +- .../bsky/src/api/app/bsky/feed/getQuotes.ts | 23 +- .../src/data-plane/server/routes/quotes.ts | 4 +- .../src/data-plane/server/routes/records.ts | 2 +- packages/bsky/src/hydration/feed.ts | 2 +- packages/bsky/src/proto/bsky_connect.ts | 39 +- packages/bsky/src/proto/bsky_pb.ts | 452 ++++++++++++------ 7 files changed, 365 insertions(+), 210 deletions(-) diff --git a/packages/bsky/proto/bsky.proto b/packages/bsky/proto/bsky.proto index 050459aff22..f1f5aa30afd 100644 --- a/packages/bsky/proto/bsky.proto +++ b/packages/bsky/proto/bsky.proto @@ -125,11 +125,11 @@ message GetThreadGateRecordsResponse { repeated Record records = 1; } -message GetPostGateRecordsRequest { +message GetPostgateRecordsRequest { repeated string uris = 1; } -message GetPostGateRecordsResponse { +message GetPostgateRecordsResponse { repeated Record records = 1; } @@ -231,6 +231,17 @@ message GetLikesBySubjectSortedResponse { string cursor = 2; } +message GetQuotesBySubjectSortedRequest { + RecordRef subject = 1; + int32 limit = 2; + string cursor = 3; +} + +message GetQuotesBySubjectSortedResponse { + repeated string uris = 1; + string cursor = 2; +} + // - return like uris for user A on subject B, C, D... // - viewer state on posts message GetLikesByActorAndSubjectsRequest { @@ -260,23 +271,6 @@ message GetActorLikesResponse { string cursor = 2; } -// -// Quotes -// - -message GetQuotesBySubjectRequest { - RecordRef subject = 1; - int32 limit = 2; - string cursor = 3; -} - -message GetQuotesBySubjectResponse { - repeated RecordRef refs = 1; - string cursor = 2; -} - -// - return post uris that quote the given subject uri - // // Interactions // @@ -322,6 +316,15 @@ message GetListCountsResponse { repeated int32 list_items = 1; } +message GetNewUserCountForRangeRequest { + google.protobuf.Timestamp start = 1; + google.protobuf.Timestamp end = 2; +} + +message GetNewUserCountForRangeResponse { + int32 count = 1; +} + // // Reposts // @@ -597,7 +600,6 @@ message GetThreadMutesOnSubjectsResponse { repeated bool muted = 1; } - // // Blocks // @@ -1059,15 +1061,19 @@ message GetRecordTakedownResponse { // Polo-backed Graph Endpoints -// GetFollowsFollowing gets the list of DIDs that the actor follows that also follow the target + + +// GetFollowsFollowing gets the list of DIDs that the actor follows that also follow the targets message GetFollowsFollowingRequest { string actor_did = 1; repeated string target_dids = 2; } + message FollowsFollowing { string target_did = 1; repeated string dids = 2; } + message GetFollowsFollowingResponse { repeated FollowsFollowing results = 1; } @@ -1097,7 +1103,7 @@ service Service { rpc GetActorChatDeclarationRecords(GetActorChatDeclarationRecordsRequest) returns (GetActorChatDeclarationRecordsResponse); rpc GetRepostRecords(GetRepostRecordsRequest) returns (GetRepostRecordsResponse); rpc GetThreadGateRecords(GetThreadGateRecordsRequest) returns (GetThreadGateRecordsResponse); - rpc GetPostGateRecords(GetPostGateRecordsRequest) returns (GetPostGateRecordsResponse); + rpc GetPostgateRecords(GetPostgateRecordsRequest) returns (GetPostgateRecordsResponse); rpc GetLabelerRecords(GetLabelerRecordsRequest) returns (GetLabelerRecordsResponse); rpc GetStarterPackRecords(GetStarterPackRecordsRequest) returns (GetStarterPackRecordsResponse); @@ -1118,13 +1124,14 @@ service Service { rpc GetActorReposts(GetActorRepostsRequest) returns (GetActorRepostsResponse); // Quotes - rpc GetQuotesBySubject(GetQuotesBySubjectRequest) returns (GetQuotesBySubjectResponse); + rpc GetQuotesBySubjectSorted(GetQuotesBySubjectSortedRequest) returns (GetQuotesBySubjectSortedResponse); // Interaction Counts rpc GetInteractionCounts(GetInteractionCountsRequest) returns (GetInteractionCountsResponse); rpc GetCountsForUsers(GetCountsForUsersRequest) returns (GetCountsForUsersResponse); rpc GetStarterPackCounts(GetStarterPackCountsRequest) returns (GetStarterPackCountsResponse); rpc GetListCounts(GetListCountsRequest) returns (GetListCountsResponse); + rpc GetNewUserCountForRange(GetNewUserCountForRangeRequest) returns (GetNewUserCountForRangeResponse); // Profile rpc GetActors(GetActorsRequest) returns (GetActorsResponse); diff --git a/packages/bsky/src/api/app/bsky/feed/getQuotes.ts b/packages/bsky/src/api/app/bsky/feed/getQuotes.ts index b9ff9e2064e..bdc7da301fd 100644 --- a/packages/bsky/src/api/app/bsky/feed/getQuotes.ts +++ b/packages/bsky/src/api/app/bsky/feed/getQuotes.ts @@ -10,7 +10,7 @@ import { import { Views } from '../../../../views' import { mapDefined } from '@atproto/common' import { QueryParams } from '../../../../lexicon/types/app/bsky/feed/getQuotes' -import { ItemRef, parseString } from '../../../../hydration/util' +import { parseString } from '../../../../hydration/util' export default function (server: Server, ctx: AppContext) { const getQuotes = createPipeline(skeleton, hydration, noBlocks, presentation) @@ -40,15 +40,15 @@ const skeleton = async (inputs: { }): Promise => { const { ctx, params } = inputs if (clearlyBadCursor(params.cursor)) { - return { refs: [] } + return { uris: [] } } - const quotesRes = await ctx.hydrator.dataplane.getQuotesBySubject({ + const quotesRes = await ctx.hydrator.dataplane.getQuotesBySubjectSorted({ subject: { uri: params.uri, cid: params.cid }, cursor: params.cursor, limit: params.limit, }) return { - refs: quotesRes.refs, + uris: quotesRes.uris, cursor: parseString(quotesRes.cursor), } } @@ -59,7 +59,10 @@ const hydration = async (inputs: { skeleton: Skeleton }) => { const { ctx, params, skeleton } = inputs - return await ctx.hydrator.hydratePosts(skeleton.refs, params.hydrateCtx) + return await ctx.hydrator.hydratePosts( + skeleton.uris.map((uri) => ({ uri })), + params.hydrateCtx, + ) } const noBlocks = (inputs: { @@ -68,8 +71,8 @@ const noBlocks = (inputs: { hydration: HydrationState }) => { const { ctx, skeleton, hydration } = inputs - skeleton.refs = skeleton.refs.filter((ref) => { - return !ctx.views.viewerBlockExists(ref.uri, hydration) + skeleton.uris = skeleton.uris.filter((uri) => { + return !ctx.views.viewerBlockExists(uri, hydration) }) return skeleton } @@ -81,8 +84,8 @@ const presentation = (inputs: { hydration: HydrationState }) => { const { ctx, params, skeleton, hydration } = inputs - const postViews = mapDefined(skeleton.refs, (ref) => { - return ctx.views.post(ref.uri, hydration) + const postViews = mapDefined(skeleton.uris, (uri) => { + return ctx.views.post(uri, hydration) }) return { posts: postViews, @@ -100,6 +103,6 @@ type Context = { type Params = QueryParams & { hydrateCtx: HydrateCtx } type Skeleton = { - refs: ItemRef[] + uris: string[] cursor?: string } diff --git a/packages/bsky/src/data-plane/server/routes/quotes.ts b/packages/bsky/src/data-plane/server/routes/quotes.ts index fd4a8cd6768..70992101611 100644 --- a/packages/bsky/src/data-plane/server/routes/quotes.ts +++ b/packages/bsky/src/data-plane/server/routes/quotes.ts @@ -4,7 +4,7 @@ import { Database } from '../db' import { paginate, TimeCidKeyset } from '../db/pagination' export default (db: Database): Partial> => ({ - async getQuotesBySubject(req) { + async getQuotesBySubjectSorted(req) { const { subject, cursor, limit } = req const { ref } = db.db.dynamic @@ -25,7 +25,7 @@ export default (db: Database): Partial> => ({ const quotes = await builder.execute() return { - refs: quotes.map((q) => ({ uri: q.uri, cid: q.cid })), + uris: quotes.map((q) => q.uri), cursor: keyset.packFromResult(quotes), } }, diff --git a/packages/bsky/src/data-plane/server/routes/records.ts b/packages/bsky/src/data-plane/server/routes/records.ts index 77d2e9ccdcb..769208c26c1 100644 --- a/packages/bsky/src/data-plane/server/routes/records.ts +++ b/packages/bsky/src/data-plane/server/routes/records.ts @@ -20,7 +20,7 @@ export default (db: Database): Partial> => ({ getProfileRecords: getRecords(db, ids.AppBskyActorProfile), getRepostRecords: getRecords(db, ids.AppBskyFeedRepost), getThreadGateRecords: getRecords(db, ids.AppBskyFeedThreadgate), - getPostGateRecords: getRecords(db, ids.AppBskyFeedPostgate), + getPostgateRecords: getRecords(db, ids.AppBskyFeedPostgate), getLabelerRecords: getRecords(db, ids.AppBskyLabelerService), getActorChatDeclarationRecords: getRecords(db, ids.ChatBskyActorDeclaration), getStarterPackRecords: getRecords(db, ids.AppBskyGraphStarterpack), diff --git a/packages/bsky/src/hydration/feed.ts b/packages/bsky/src/hydration/feed.ts index 28480d723d0..4630d044c24 100644 --- a/packages/bsky/src/hydration/feed.ts +++ b/packages/bsky/src/hydration/feed.ts @@ -239,7 +239,7 @@ export class FeedHydrator { uris: string[], includeTakedowns = false, ): Promise { - const res = await this.dataplane.getPostGateRecords({ uris }) + const res = await this.dataplane.getPostgateRecords({ uris }) return uris.reduce((acc, uri, i) => { const record = parseRecord( res.records[i], diff --git a/packages/bsky/src/proto/bsky_connect.ts b/packages/bsky/src/proto/bsky_connect.ts index 7496f51505e..42303cbe8e8 100644 --- a/packages/bsky/src/proto/bsky_connect.ts +++ b/packages/bsky/src/proto/bsky_connect.ts @@ -124,20 +124,22 @@ import { GetMutelistSubscriptionsResponse, GetMutesRequest, GetMutesResponse, + GetNewUserCountForRangeRequest, + GetNewUserCountForRangeResponse, GetNotificationSeenRequest, GetNotificationSeenResponse, GetNotificationsRequest, GetNotificationsResponse, - GetPostGateRecordsRequest, - GetPostGateRecordsResponse, + GetPostgateRecordsRequest, + GetPostgateRecordsResponse, GetPostRecordsRequest, GetPostRecordsResponse, GetPostReplyCountsRequest, GetPostReplyCountsResponse, GetProfileRecordsRequest, GetProfileRecordsResponse, - GetQuotesBySubjectRequest, - GetQuotesBySubjectResponse, + GetQuotesBySubjectSortedRequest, + GetQuotesBySubjectSortedResponse, GetRecordTakedownRequest, GetRecordTakedownResponse, GetRelationshipsRequest, @@ -314,12 +316,12 @@ export const Service = { kind: MethodKind.Unary, }, /** - * @generated from rpc bsky.Service.GetPostGateRecords + * @generated from rpc bsky.Service.GetPostgateRecords */ - getPostGateRecords: { - name: 'GetPostGateRecords', - I: GetPostGateRecordsRequest, - O: GetPostGateRecordsResponse, + getPostgateRecords: { + name: 'GetPostgateRecords', + I: GetPostgateRecordsRequest, + O: GetPostgateRecordsResponse, kind: MethodKind.Unary, }, /** @@ -439,12 +441,12 @@ export const Service = { /** * Quotes * - * @generated from rpc bsky.Service.GetQuotesBySubject + * @generated from rpc bsky.Service.GetQuotesBySubjectSorted */ - getQuotesBySubject: { - name: 'GetQuotesBySubject', - I: GetQuotesBySubjectRequest, - O: GetQuotesBySubjectResponse, + getQuotesBySubjectSorted: { + name: 'GetQuotesBySubjectSorted', + I: GetQuotesBySubjectSortedRequest, + O: GetQuotesBySubjectSortedResponse, kind: MethodKind.Unary, }, /** @@ -485,6 +487,15 @@ export const Service = { O: GetListCountsResponse, kind: MethodKind.Unary, }, + /** + * @generated from rpc bsky.Service.GetNewUserCountForRange + */ + getNewUserCountForRange: { + name: 'GetNewUserCountForRange', + I: GetNewUserCountForRangeRequest, + O: GetNewUserCountForRangeResponse, + kind: MethodKind.Unary, + }, /** * Profile * diff --git a/packages/bsky/src/proto/bsky_pb.ts b/packages/bsky/src/proto/bsky_pb.ts index 0b381907074..594d4eb03b4 100644 --- a/packages/bsky/src/proto/bsky_pb.ts +++ b/packages/bsky/src/proto/bsky_pb.ts @@ -1642,21 +1642,21 @@ export class GetThreadGateRecordsResponse extends Message { +export class GetPostgateRecordsRequest extends Message { /** * @generated from field: repeated string uris = 1; */ uris: string[] = [] - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super() proto3.util.initPartial(data, this) } static readonly runtime: typeof proto3 = proto3 - static readonly typeName = 'bsky.GetPostGateRecordsRequest' + static readonly typeName = 'bsky.GetPostgateRecordsRequest' static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, @@ -1670,54 +1670,54 @@ export class GetPostGateRecordsRequest extends Message, - ): GetPostGateRecordsRequest { - return new GetPostGateRecordsRequest().fromBinary(bytes, options) + ): GetPostgateRecordsRequest { + return new GetPostgateRecordsRequest().fromBinary(bytes, options) } static fromJson( jsonValue: JsonValue, options?: Partial, - ): GetPostGateRecordsRequest { - return new GetPostGateRecordsRequest().fromJson(jsonValue, options) + ): GetPostgateRecordsRequest { + return new GetPostgateRecordsRequest().fromJson(jsonValue, options) } static fromJsonString( jsonString: string, options?: Partial, - ): GetPostGateRecordsRequest { - return new GetPostGateRecordsRequest().fromJsonString(jsonString, options) + ): GetPostgateRecordsRequest { + return new GetPostgateRecordsRequest().fromJsonString(jsonString, options) } static equals( a: - | GetPostGateRecordsRequest - | PlainMessage + | GetPostgateRecordsRequest + | PlainMessage | undefined, b: - | GetPostGateRecordsRequest - | PlainMessage + | GetPostgateRecordsRequest + | PlainMessage | undefined, ): boolean { - return proto3.util.equals(GetPostGateRecordsRequest, a, b) + return proto3.util.equals(GetPostgateRecordsRequest, a, b) } } /** - * @generated from message bsky.GetPostGateRecordsResponse + * @generated from message bsky.GetPostgateRecordsResponse */ -export class GetPostGateRecordsResponse extends Message { +export class GetPostgateRecordsResponse extends Message { /** * @generated from field: repeated bsky.Record records = 1; */ records: Record[] = [] - constructor(data?: PartialMessage) { + constructor(data?: PartialMessage) { super() proto3.util.initPartial(data, this) } static readonly runtime: typeof proto3 = proto3 - static readonly typeName = 'bsky.GetPostGateRecordsResponse' + static readonly typeName = 'bsky.GetPostgateRecordsResponse' static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: 'records', kind: 'message', T: Record, repeated: true }, ]) @@ -1725,35 +1725,35 @@ export class GetPostGateRecordsResponse extends Message, - ): GetPostGateRecordsResponse { - return new GetPostGateRecordsResponse().fromBinary(bytes, options) + ): GetPostgateRecordsResponse { + return new GetPostgateRecordsResponse().fromBinary(bytes, options) } static fromJson( jsonValue: JsonValue, options?: Partial, - ): GetPostGateRecordsResponse { - return new GetPostGateRecordsResponse().fromJson(jsonValue, options) + ): GetPostgateRecordsResponse { + return new GetPostgateRecordsResponse().fromJson(jsonValue, options) } static fromJsonString( jsonString: string, options?: Partial, - ): GetPostGateRecordsResponse { - return new GetPostGateRecordsResponse().fromJsonString(jsonString, options) + ): GetPostgateRecordsResponse { + return new GetPostgateRecordsResponse().fromJsonString(jsonString, options) } static equals( a: - | GetPostGateRecordsResponse - | PlainMessage + | GetPostgateRecordsResponse + | PlainMessage | undefined, b: - | GetPostGateRecordsResponse - | PlainMessage + | GetPostgateRecordsResponse + | PlainMessage | undefined, ): boolean { - return proto3.util.equals(GetPostGateRecordsResponse, a, b) + return proto3.util.equals(GetPostgateRecordsResponse, a, b) } } @@ -2828,6 +2828,146 @@ export class GetLikesBySubjectSortedResponse extends Message { + /** + * @generated from field: bsky.RecordRef subject = 1; + */ + subject?: RecordRef + + /** + * @generated from field: int32 limit = 2; + */ + limit = 0 + + /** + * @generated from field: string cursor = 3; + */ + cursor = '' + + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'bsky.GetQuotesBySubjectSortedRequest' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: 'subject', kind: 'message', T: RecordRef }, + { no: 2, name: 'limit', kind: 'scalar', T: 5 /* ScalarType.INT32 */ }, + { no: 3, name: 'cursor', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): GetQuotesBySubjectSortedRequest { + return new GetQuotesBySubjectSortedRequest().fromBinary(bytes, options) + } + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): GetQuotesBySubjectSortedRequest { + return new GetQuotesBySubjectSortedRequest().fromJson(jsonValue, options) + } + + static fromJsonString( + jsonString: string, + options?: Partial, + ): GetQuotesBySubjectSortedRequest { + return new GetQuotesBySubjectSortedRequest().fromJsonString( + jsonString, + options, + ) + } + + static equals( + a: + | GetQuotesBySubjectSortedRequest + | PlainMessage + | undefined, + b: + | GetQuotesBySubjectSortedRequest + | PlainMessage + | undefined, + ): boolean { + return proto3.util.equals(GetQuotesBySubjectSortedRequest, a, b) + } +} + +/** + * @generated from message bsky.GetQuotesBySubjectSortedResponse + */ +export class GetQuotesBySubjectSortedResponse extends Message { + /** + * @generated from field: repeated string uris = 1; + */ + uris: string[] = [] + + /** + * @generated from field: string cursor = 2; + */ + cursor = '' + + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'bsky.GetQuotesBySubjectSortedResponse' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { + no: 1, + name: 'uris', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + repeated: true, + }, + { no: 2, name: 'cursor', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + ]) + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): GetQuotesBySubjectSortedResponse { + return new GetQuotesBySubjectSortedResponse().fromBinary(bytes, options) + } + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): GetQuotesBySubjectSortedResponse { + return new GetQuotesBySubjectSortedResponse().fromJson(jsonValue, options) + } + + static fromJsonString( + jsonString: string, + options?: Partial, + ): GetQuotesBySubjectSortedResponse { + return new GetQuotesBySubjectSortedResponse().fromJsonString( + jsonString, + options, + ) + } + + static equals( + a: + | GetQuotesBySubjectSortedResponse + | PlainMessage + | undefined, + b: + | GetQuotesBySubjectSortedResponse + | PlainMessage + | undefined, + ): boolean { + return proto3.util.equals(GetQuotesBySubjectSortedResponse, a, b) + } +} + /** * - return like uris for user A on subject B, C, D... * - viewer state on posts @@ -3133,134 +3273,6 @@ export class GetActorLikesResponse extends Message { } } -/** - * @generated from message bsky.GetQuotesBySubjectRequest - */ -export class GetQuotesBySubjectRequest extends Message { - /** - * @generated from field: bsky.RecordRef subject = 1; - */ - subject?: RecordRef - - /** - * @generated from field: int32 limit = 2; - */ - limit = 0 - - /** - * @generated from field: string cursor = 3; - */ - cursor = '' - - constructor(data?: PartialMessage) { - super() - proto3.util.initPartial(data, this) - } - - static readonly runtime: typeof proto3 = proto3 - static readonly typeName = 'bsky.GetQuotesBySubjectRequest' - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'subject', kind: 'message', T: RecordRef }, - { no: 2, name: 'limit', kind: 'scalar', T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: 'cursor', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]) - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): GetQuotesBySubjectRequest { - return new GetQuotesBySubjectRequest().fromBinary(bytes, options) - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): GetQuotesBySubjectRequest { - return new GetQuotesBySubjectRequest().fromJson(jsonValue, options) - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): GetQuotesBySubjectRequest { - return new GetQuotesBySubjectRequest().fromJsonString(jsonString, options) - } - - static equals( - a: - | GetQuotesBySubjectRequest - | PlainMessage - | undefined, - b: - | GetQuotesBySubjectRequest - | PlainMessage - | undefined, - ): boolean { - return proto3.util.equals(GetQuotesBySubjectRequest, a, b) - } -} - -/** - * @generated from message bsky.GetQuotesBySubjectResponse - */ -export class GetQuotesBySubjectResponse extends Message { - /** - * @generated from field: repeated bsky.RecordRef refs = 1; - */ - refs: RecordRef[] = [] - - /** - * @generated from field: string cursor = 2; - */ - cursor = '' - - constructor(data?: PartialMessage) { - super() - proto3.util.initPartial(data, this) - } - - static readonly runtime: typeof proto3 = proto3 - static readonly typeName = 'bsky.GetQuotesBySubjectResponse' - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'refs', kind: 'message', T: RecordRef, repeated: true }, - { no: 2, name: 'cursor', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - ]) - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): GetQuotesBySubjectResponse { - return new GetQuotesBySubjectResponse().fromBinary(bytes, options) - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): GetQuotesBySubjectResponse { - return new GetQuotesBySubjectResponse().fromJson(jsonValue, options) - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): GetQuotesBySubjectResponse { - return new GetQuotesBySubjectResponse().fromJsonString(jsonString, options) - } - - static equals( - a: - | GetQuotesBySubjectResponse - | PlainMessage - | undefined, - b: - | GetQuotesBySubjectResponse - | PlainMessage - | undefined, - ): boolean { - return proto3.util.equals(GetQuotesBySubjectResponse, a, b) - } -} - /** * * Interactions @@ -3849,6 +3861,128 @@ export class GetListCountsResponse extends Message { } } +/** + * @generated from message bsky.GetNewUserCountForRangeRequest + */ +export class GetNewUserCountForRangeRequest extends Message { + /** + * @generated from field: google.protobuf.Timestamp start = 1; + */ + start?: Timestamp + + /** + * @generated from field: google.protobuf.Timestamp end = 2; + */ + end?: Timestamp + + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'bsky.GetNewUserCountForRangeRequest' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: 'start', kind: 'message', T: Timestamp }, + { no: 2, name: 'end', kind: 'message', T: Timestamp }, + ]) + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): GetNewUserCountForRangeRequest { + return new GetNewUserCountForRangeRequest().fromBinary(bytes, options) + } + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): GetNewUserCountForRangeRequest { + return new GetNewUserCountForRangeRequest().fromJson(jsonValue, options) + } + + static fromJsonString( + jsonString: string, + options?: Partial, + ): GetNewUserCountForRangeRequest { + return new GetNewUserCountForRangeRequest().fromJsonString( + jsonString, + options, + ) + } + + static equals( + a: + | GetNewUserCountForRangeRequest + | PlainMessage + | undefined, + b: + | GetNewUserCountForRangeRequest + | PlainMessage + | undefined, + ): boolean { + return proto3.util.equals(GetNewUserCountForRangeRequest, a, b) + } +} + +/** + * @generated from message bsky.GetNewUserCountForRangeResponse + */ +export class GetNewUserCountForRangeResponse extends Message { + /** + * @generated from field: int32 count = 1; + */ + count = 0 + + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'bsky.GetNewUserCountForRangeResponse' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: 'count', kind: 'scalar', T: 5 /* ScalarType.INT32 */ }, + ]) + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): GetNewUserCountForRangeResponse { + return new GetNewUserCountForRangeResponse().fromBinary(bytes, options) + } + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): GetNewUserCountForRangeResponse { + return new GetNewUserCountForRangeResponse().fromJson(jsonValue, options) + } + + static fromJsonString( + jsonString: string, + options?: Partial, + ): GetNewUserCountForRangeResponse { + return new GetNewUserCountForRangeResponse().fromJsonString( + jsonString, + options, + ) + } + + static equals( + a: + | GetNewUserCountForRangeResponse + | PlainMessage + | undefined, + b: + | GetNewUserCountForRangeResponse + | PlainMessage + | undefined, + ): boolean { + return proto3.util.equals(GetNewUserCountForRangeResponse, a, b) + } +} + /** * - return repost uris where subject uri is subject A * - `getReposts` list for a post @@ -10785,7 +10919,7 @@ export class GetRecordTakedownResponse extends Message