diff --git a/packages/bsky/proto/bsky.proto b/packages/bsky/proto/bsky.proto index 368bb52bb92..dfc748aed8a 100644 --- a/packages/bsky/proto/bsky.proto +++ b/packages/bsky/proto/bsky.proto @@ -1095,7 +1095,19 @@ message GetFollowsFollowingResponse { message PingRequest {} message PingResponse {} +// Subscription entitlement +message SubscriptionEntitlement { + string did = 1; + repeated string entitlements = 2; +} +message GetSubscriptionEntitlementRequest { + repeated string dids = 1; +} + +message GetSubscriptionEntitlementResponse { + repeated SubscriptionEntitlement subscriptionEntitlements = 1; +} service Service { @@ -1238,6 +1250,8 @@ service Service { // Ping rpc Ping(PingRequest) returns (PingResponse); + // Subscription entitlement + rpc GetSubscriptionEntitlement(GetSubscriptionEntitlementRequest) returns (GetSubscriptionEntitlementResponse); @@ -1398,11 +1412,6 @@ message ClearThreadMutesRequest { message ClearThreadMutesResponse {} // Subscription entitlement -message SubscriptionEntitlement { - string did = 1; - repeated string entitlements = 2; -} - message SetSubscriptionEntitlementRequest { SubscriptionEntitlement subscriptionEntitlement = 1; } diff --git a/packages/bsky/src/proto/bsky_connect.ts b/packages/bsky/src/proto/bsky_connect.ts index 634fb2b2191..5abcd8af1c2 100644 --- a/packages/bsky/src/proto/bsky_connect.ts +++ b/packages/bsky/src/proto/bsky_connect.ts @@ -154,6 +154,8 @@ import { GetStarterPackCountsResponse, GetStarterPackRecordsRequest, GetStarterPackRecordsResponse, + GetSubscriptionEntitlementRequest, + GetSubscriptionEntitlementResponse, GetSuggestedEntitiesRequest, GetSuggestedEntitiesResponse, GetSuggestedFeedsRequest, @@ -976,6 +978,17 @@ export const Service = { O: PingResponse, kind: MethodKind.Unary, }, + /** + * Subscription entitlement + * + * @generated from rpc bsky.Service.GetSubscriptionEntitlement + */ + getSubscriptionEntitlement: { + name: 'GetSubscriptionEntitlement', + I: GetSubscriptionEntitlementRequest, + O: GetSubscriptionEntitlementResponse, + kind: MethodKind.Unary, + }, /** * Moderation * diff --git a/packages/bsky/src/proto/bsky_pb.ts b/packages/bsky/src/proto/bsky_pb.ts index 15810138d3d..49f49a2be3f 100644 --- a/packages/bsky/src/proto/bsky_pb.ts +++ b/packages/bsky/src/proto/bsky_pb.ts @@ -11332,6 +11332,203 @@ export class PingResponse extends Message { } } +/** + * Subscription entitlement + * + * @generated from message bsky.SubscriptionEntitlement + */ +export class SubscriptionEntitlement extends Message { + /** + * @generated from field: string did = 1; + */ + did = '' + + /** + * @generated from field: repeated string entitlements = 2; + */ + entitlements: string[] = [] + + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'bsky.SubscriptionEntitlement' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: 'did', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, + { + no: 2, + name: 'entitlements', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + repeated: true, + }, + ]) + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): SubscriptionEntitlement { + return new SubscriptionEntitlement().fromBinary(bytes, options) + } + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): SubscriptionEntitlement { + return new SubscriptionEntitlement().fromJson(jsonValue, options) + } + + static fromJsonString( + jsonString: string, + options?: Partial, + ): SubscriptionEntitlement { + return new SubscriptionEntitlement().fromJsonString(jsonString, options) + } + + static equals( + a: + | SubscriptionEntitlement + | PlainMessage + | undefined, + b: + | SubscriptionEntitlement + | PlainMessage + | undefined, + ): boolean { + return proto3.util.equals(SubscriptionEntitlement, a, b) + } +} + +/** + * @generated from message bsky.GetSubscriptionEntitlementRequest + */ +export class GetSubscriptionEntitlementRequest extends Message { + /** + * @generated from field: repeated string dids = 1; + */ + dids: string[] = [] + + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'bsky.GetSubscriptionEntitlementRequest' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { + no: 1, + name: 'dids', + kind: 'scalar', + T: 9 /* ScalarType.STRING */, + repeated: true, + }, + ]) + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): GetSubscriptionEntitlementRequest { + return new GetSubscriptionEntitlementRequest().fromBinary(bytes, options) + } + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): GetSubscriptionEntitlementRequest { + return new GetSubscriptionEntitlementRequest().fromJson(jsonValue, options) + } + + static fromJsonString( + jsonString: string, + options?: Partial, + ): GetSubscriptionEntitlementRequest { + return new GetSubscriptionEntitlementRequest().fromJsonString( + jsonString, + options, + ) + } + + static equals( + a: + | GetSubscriptionEntitlementRequest + | PlainMessage + | undefined, + b: + | GetSubscriptionEntitlementRequest + | PlainMessage + | undefined, + ): boolean { + return proto3.util.equals(GetSubscriptionEntitlementRequest, a, b) + } +} + +/** + * @generated from message bsky.GetSubscriptionEntitlementResponse + */ +export class GetSubscriptionEntitlementResponse extends Message { + /** + * @generated from field: repeated bsky.SubscriptionEntitlement subscriptionEntitlements = 1; + */ + subscriptionEntitlements: SubscriptionEntitlement[] = [] + + constructor(data?: PartialMessage) { + super() + proto3.util.initPartial(data, this) + } + + static readonly runtime: typeof proto3 = proto3 + static readonly typeName = 'bsky.GetSubscriptionEntitlementResponse' + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { + no: 1, + name: 'subscriptionEntitlements', + kind: 'message', + T: SubscriptionEntitlement, + repeated: true, + }, + ]) + + static fromBinary( + bytes: Uint8Array, + options?: Partial, + ): GetSubscriptionEntitlementResponse { + return new GetSubscriptionEntitlementResponse().fromBinary(bytes, options) + } + + static fromJson( + jsonValue: JsonValue, + options?: Partial, + ): GetSubscriptionEntitlementResponse { + return new GetSubscriptionEntitlementResponse().fromJson(jsonValue, options) + } + + static fromJsonString( + jsonString: string, + options?: Partial, + ): GetSubscriptionEntitlementResponse { + return new GetSubscriptionEntitlementResponse().fromJsonString( + jsonString, + options, + ) + } + + static equals( + a: + | GetSubscriptionEntitlementResponse + | PlainMessage + | undefined, + b: + | GetSubscriptionEntitlementResponse + | PlainMessage + | undefined, + ): boolean { + return proto3.util.equals(GetSubscriptionEntitlementResponse, a, b) + } +} + /** * @generated from message bsky.UpdateActorUpstreamStatusRequest */ @@ -13156,73 +13353,6 @@ export class ClearThreadMutesResponse extends Message /** * Subscription entitlement * - * @generated from message bsky.SubscriptionEntitlement - */ -export class SubscriptionEntitlement extends Message { - /** - * @generated from field: string did = 1; - */ - did = '' - - /** - * @generated from field: repeated string entitlements = 2; - */ - entitlements: string[] = [] - - constructor(data?: PartialMessage) { - super() - proto3.util.initPartial(data, this) - } - - static readonly runtime: typeof proto3 = proto3 - static readonly typeName = 'bsky.SubscriptionEntitlement' - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: 'did', kind: 'scalar', T: 9 /* ScalarType.STRING */ }, - { - no: 2, - name: 'entitlements', - kind: 'scalar', - T: 9 /* ScalarType.STRING */, - repeated: true, - }, - ]) - - static fromBinary( - bytes: Uint8Array, - options?: Partial, - ): SubscriptionEntitlement { - return new SubscriptionEntitlement().fromBinary(bytes, options) - } - - static fromJson( - jsonValue: JsonValue, - options?: Partial, - ): SubscriptionEntitlement { - return new SubscriptionEntitlement().fromJson(jsonValue, options) - } - - static fromJsonString( - jsonString: string, - options?: Partial, - ): SubscriptionEntitlement { - return new SubscriptionEntitlement().fromJsonString(jsonString, options) - } - - static equals( - a: - | SubscriptionEntitlement - | PlainMessage - | undefined, - b: - | SubscriptionEntitlement - | PlainMessage - | undefined, - ): boolean { - return proto3.util.equals(SubscriptionEntitlement, a, b) - } -} - -/** * @generated from message bsky.SetSubscriptionEntitlementRequest */ export class SetSubscriptionEntitlementRequest extends Message {