diff --git a/packages/atproto/lib/com_atproto_services.dart b/packages/atproto/lib/com_atproto_services.dart index 8a113d89b..50f65bdf5 100644 --- a/packages/atproto/lib/com_atproto_services.dart +++ b/packages/atproto/lib/com_atproto_services.dart @@ -11,12 +11,12 @@ // LexGenerator // ************************************************************************** -export 'package:atproto/src/services/codegen/com/atproto/lexicon_service.dart'; -export 'package:atproto/src/services/codegen/com/atproto/repo_service.dart'; -export 'package:atproto/src/services/codegen/com/atproto/server_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/admin_service.dart'; -export 'package:atproto/src/services/codegen/com/atproto/temp_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/identity_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/label_service.dart'; +export 'package:atproto/src/services/codegen/com/atproto/lexicon_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/moderation_service.dart'; +export 'package:atproto/src/services/codegen/com/atproto/repo_service.dart'; +export 'package:atproto/src/services/codegen/com/atproto/server_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/sync_service.dart'; +export 'package:atproto/src/services/codegen/com/atproto/temp_service.dart'; diff --git a/packages/atproto/lib/src/services/codegen/com/atproto/admin_service.dart b/packages/atproto/lib/src/services/codegen/com/atproto/admin_service.dart index c2807d81e..9935d6890 100644 --- a/packages/atproto/lib/src/services/codegen/com/atproto/admin_service.dart +++ b/packages/atproto/lib/src/services/codegen/com/atproto/admin_service.dart @@ -28,71 +28,82 @@ import 'admin/updateSubjectStatus/union_main_subject.dart'; // LexGenerator // ************************************************************************** -/// Administrative action to update an account's handle. -Future> comAtprotoAdminUpdateAccountHandle({ +/// Delete a user account as an administrator. +Future> comAtprotoAdminDeleteAccount({ required String did, - required String handle, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoAdminUpdateAccountHandle, + ns.comAtprotoAdminDeleteAccount, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'did': did, 'handle': handle}, + body: {...?$unknown, 'did': did}, ); -/// Administrative action to update an account's signing key in their Did document. -Future> comAtprotoAdminUpdateAccountSigningKey({ - required String did, - required String signingKey, +/// Disable an account from receiving new invite codes, but does not invalidate existing codes. +Future> comAtprotoAdminDisableAccountInvites({ + required String account, + String? note, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoAdminUpdateAccountSigningKey, + ns.comAtprotoAdminDisableAccountInvites, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'did': did, 'signingKey': signingKey}, + body: {...?$unknown, 'account': account, if (note != null) 'note': note}, ); -/// Delete a user account as an administrator. -Future> comAtprotoAdminDeleteAccount({ - required String did, +/// Disable some set of codes and/or all codes associated with a set of users. +Future> comAtprotoAdminDisableInviteCodes({ + List? codes, + List? accounts, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoAdminDeleteAccount, + ns.comAtprotoAdminDisableInviteCodes, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'did': did}, + body: { + ...?$unknown, + if (codes != null) 'codes': codes, + if (accounts != null) 'accounts': accounts, + }, ); -/// Get the service-specific admin status of a subject (account, record, or blob). -Future> -comAtprotoAdminGetSubjectStatus({ - String? did, - AtUri? uri, - String? blob, +/// Re-enable an account's ability to receive invite codes. +Future> comAtprotoAdminEnableAccountInvites({ + required String account, + String? note, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.comAtprotoAdminEnableAccountInvites, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'account': account, if (note != null) 'note': note}, +); + +/// Get details about an account. +Future> comAtprotoAdminGetAccountInfo({ + required String did, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.comAtprotoAdminGetSubjectStatus, + ns.comAtprotoAdminGetAccountInfo, service: $service, headers: $headers, - parameters: { - ...?$unknown, - if (did != null) 'did': did, - if (uri != null) 'uri': uri.toString(), - if (blob != null) 'blob': blob, - }, - to: const AdminGetSubjectStatusOutputConverter().fromJson, + parameters: {...?$unknown, 'did': did}, + to: const AccountViewConverter().fromJson, ); /// Get details about some accounts. @@ -111,29 +122,6 @@ comAtprotoAdminGetAccountInfos({ to: const AdminGetAccountInfosOutputConverter().fromJson, ); -/// Update the service-specific admin status of a subject (account, record, or blob). -Future> -comAtprotoAdminUpdateSubjectStatus({ - required UAdminUpdateSubjectStatusSubject subject, - StatusAttr? takedown, - StatusAttr? deactivated, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.comAtprotoAdminUpdateSubjectStatus, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'subject': subject.toJson(), - if (takedown != null) 'takedown': takedown.toJson(), - if (deactivated != null) 'deactivated': deactivated.toJson(), - }, - to: const AdminUpdateSubjectStatusOutputConverter().fromJson, -); - /// Get an admin view of invite codes. Future> comAtprotoAdminGetInviteCodes({ AdminGetInviteCodesSort? sort, @@ -156,19 +144,49 @@ Future> comAtprotoAdminGetInviteCodes({ to: const AdminGetInviteCodesOutputConverter().fromJson, ); -/// Disable an account from receiving new invite codes, but does not invalidate existing codes. -Future> comAtprotoAdminDisableAccountInvites({ - required String account, - String? note, +/// Get the service-specific admin status of a subject (account, record, or blob). +Future> +comAtprotoAdminGetSubjectStatus({ + String? did, + AtUri? uri, + String? blob, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.comAtprotoAdminDisableAccountInvites, +}) async => await $ctx.get( + ns.comAtprotoAdminGetSubjectStatus, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'account': account, if (note != null) 'note': note}, + headers: $headers, + parameters: { + ...?$unknown, + if (did != null) 'did': did, + if (uri != null) 'uri': uri.toString(), + if (blob != null) 'blob': blob, + }, + to: const AdminGetSubjectStatusOutputConverter().fromJson, +); + +/// Get list of accounts that matches your search query. +Future> comAtprotoAdminSearchAccounts({ + String? email, + String? cursor, + int? limit, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoAdminSearchAccounts, + service: $service, + headers: $headers, + parameters: { + ...?$unknown, + if (email != null) 'email': email, + if (cursor != null) 'cursor': cursor, + if (limit != null) 'limit': limit, + }, + to: const AdminSearchAccountsOutputConverter().fromJson, ); /// Send email to a user's account email address. @@ -197,36 +215,6 @@ Future> comAtprotoAdminSendEmail({ to: const AdminSendEmailOutputConverter().fromJson, ); -/// Get details about an account. -Future> comAtprotoAdminGetAccountInfo({ - required String did, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoAdminGetAccountInfo, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'did': did}, - to: const AccountViewConverter().fromJson, -); - -/// Re-enable an account's ability to receive invite codes. -Future> comAtprotoAdminEnableAccountInvites({ - required String account, - String? note, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.comAtprotoAdminEnableAccountInvites, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'account': account, if (note != null) 'note': note}, -); - /// Administrative action to update an account's email. Future> comAtprotoAdminUpdateAccountEmail({ required String account, @@ -242,23 +230,19 @@ Future> comAtprotoAdminUpdateAccountEmail({ body: {...?$unknown, 'account': account, 'email': email}, ); -/// Disable some set of codes and/or all codes associated with a set of users. -Future> comAtprotoAdminDisableInviteCodes({ - List? codes, - List? accounts, +/// Administrative action to update an account's handle. +Future> comAtprotoAdminUpdateAccountHandle({ + required String did, + required String handle, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoAdminDisableInviteCodes, + ns.comAtprotoAdminUpdateAccountHandle, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - if (codes != null) 'codes': codes, - if (accounts != null) 'accounts': accounts, - }, + body: {...?$unknown, 'did': did, 'handle': handle}, ); /// Update the password for a user account as an administrator. @@ -276,26 +260,42 @@ Future> comAtprotoAdminUpdateAccountPassword({ body: {...?$unknown, 'did': did, 'password': password}, ); -/// Get list of accounts that matches your search query. -Future> comAtprotoAdminSearchAccounts({ - String? email, - String? cursor, - int? limit, +/// Administrative action to update an account's signing key in their Did document. +Future> comAtprotoAdminUpdateAccountSigningKey({ + required String did, + required String signingKey, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoAdminSearchAccounts, +}) async => await $ctx.post( + ns.comAtprotoAdminUpdateAccountSigningKey, service: $service, - headers: $headers, - parameters: { + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'did': did, 'signingKey': signingKey}, +); + +/// Update the service-specific admin status of a subject (account, record, or blob). +Future> +comAtprotoAdminUpdateSubjectStatus({ + required UAdminUpdateSubjectStatusSubject subject, + StatusAttr? takedown, + StatusAttr? deactivated, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.comAtprotoAdminUpdateSubjectStatus, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: { ...?$unknown, - if (email != null) 'email': email, - if (cursor != null) 'cursor': cursor, - if (limit != null) 'limit': limit, + 'subject': subject.toJson(), + if (takedown != null) 'takedown': takedown.toJson(), + if (deactivated != null) 'deactivated': deactivated.toJson(), }, - to: const AdminSearchAccountsOutputConverter().fromJson, + to: const AdminUpdateSubjectStatusOutputConverter().fromJson, ); /// `com.atproto.admin.*` @@ -305,96 +305,90 @@ base class AdminService { AdminService(this.ctx); - /// Administrative action to update an account's handle. - Future> updateAccountHandle({ + /// Delete a user account as an administrator. + Future> deleteAccount({ required String did, - required String handle, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminUpdateAccountHandle( + }) async => await comAtprotoAdminDeleteAccount( did: did, - handle: handle, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Administrative action to update an account's signing key in their Did document. - Future> updateAccountSigningKey({ - required String did, - required String signingKey, + /// Disable an account from receiving new invite codes, but does not invalidate existing codes. + Future> disableAccountInvites({ + required String account, + String? note, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminUpdateAccountSigningKey( - did: did, - signingKey: signingKey, + }) async => await comAtprotoAdminDisableAccountInvites( + account: account, + note: note, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Delete a user account as an administrator. - Future> deleteAccount({ - required String did, + /// Disable some set of codes and/or all codes associated with a set of users. + Future> disableInviteCodes({ + List? codes, + List? accounts, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminDeleteAccount( - did: did, + }) async => await comAtprotoAdminDisableInviteCodes( + codes: codes, + accounts: accounts, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get the service-specific admin status of a subject (account, record, or blob). - Future> getSubjectStatus({ - String? did, - AtUri? uri, - String? blob, + /// Re-enable an account's ability to receive invite codes. + Future> enableAccountInvites({ + required String account, + String? note, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminGetSubjectStatus( - did: did, - uri: uri, - blob: blob, + }) async => await comAtprotoAdminEnableAccountInvites( + account: account, + note: note, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get details about some accounts. - Future> getAccountInfos({ - required List dids, + /// Get details about an account. + Future> getAccountInfo({ + required String did, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminGetAccountInfos( - dids: dids, + }) async => await comAtprotoAdminGetAccountInfo( + did: did, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Update the service-specific admin status of a subject (account, record, or blob). - Future> updateSubjectStatus({ - required UAdminUpdateSubjectStatusSubject subject, - StatusAttr? takedown, - StatusAttr? deactivated, + /// Get details about some accounts. + Future> getAccountInfos({ + required List dids, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminUpdateSubjectStatus( - subject: subject, - takedown: takedown, - deactivated: deactivated, + }) async => await comAtprotoAdminGetAccountInfos( + dids: dids, $ctx: ctx, $service: $service, $headers: $headers, @@ -419,16 +413,36 @@ base class AdminService { $unknown: $unknown, ); - /// Disable an account from receiving new invite codes, but does not invalidate existing codes. - Future> disableAccountInvites({ - required String account, - String? note, + /// Get the service-specific admin status of a subject (account, record, or blob). + Future> getSubjectStatus({ + String? did, + AtUri? uri, + String? blob, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminDisableAccountInvites( - account: account, - note: note, + }) async => await comAtprotoAdminGetSubjectStatus( + did: did, + uri: uri, + blob: blob, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get list of accounts that matches your search query. + Future> searchAccounts({ + String? email, + String? cursor, + int? limit, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await comAtprotoAdminSearchAccounts( + email: email, + cursor: cursor, + limit: limit, $ctx: ctx, $service: $service, $headers: $headers, @@ -457,36 +471,6 @@ base class AdminService { $unknown: $unknown, ); - /// Get details about an account. - Future> getAccountInfo({ - required String did, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoAdminGetAccountInfo( - did: did, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Re-enable an account's ability to receive invite codes. - Future> enableAccountInvites({ - required String account, - String? note, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoAdminEnableAccountInvites( - account: account, - note: note, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - /// Administrative action to update an account's email. Future> updateAccountEmail({ required String account, @@ -503,16 +487,16 @@ base class AdminService { $unknown: $unknown, ); - /// Disable some set of codes and/or all codes associated with a set of users. - Future> disableInviteCodes({ - List? codes, - List? accounts, + /// Administrative action to update an account's handle. + Future> updateAccountHandle({ + required String did, + required String handle, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminDisableInviteCodes( - codes: codes, - accounts: accounts, + }) async => await comAtprotoAdminUpdateAccountHandle( + did: did, + handle: handle, $ctx: ctx, $service: $service, $headers: $headers, @@ -535,18 +519,34 @@ base class AdminService { $unknown: $unknown, ); - /// Get list of accounts that matches your search query. - Future> searchAccounts({ - String? email, - String? cursor, - int? limit, + /// Administrative action to update an account's signing key in their Did document. + Future> updateAccountSigningKey({ + required String did, + required String signingKey, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoAdminSearchAccounts( - email: email, - cursor: cursor, - limit: limit, + }) async => await comAtprotoAdminUpdateAccountSigningKey( + did: did, + signingKey: signingKey, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Update the service-specific admin status of a subject (account, record, or blob). + Future> updateSubjectStatus({ + required UAdminUpdateSubjectStatusSubject subject, + StatusAttr? takedown, + StatusAttr? deactivated, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await comAtprotoAdminUpdateSubjectStatus( + subject: subject, + takedown: takedown, + deactivated: deactivated, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/atproto/lib/src/services/codegen/com/atproto/identity_service.dart b/packages/atproto/lib/src/services/codegen/com/atproto/identity_service.dart index fe9ffc913..5d57bbfb4 100644 --- a/packages/atproto/lib/src/services/codegen/com/atproto/identity_service.dart +++ b/packages/atproto/lib/src/services/codegen/com/atproto/identity_service.dart @@ -23,87 +23,76 @@ import 'identity/signPlcOperation/output.dart'; // LexGenerator // ************************************************************************** -/// Request an email with a code to in order to request a signed PLC operation. Requires Auth. -Future> comAtprotoIdentityRequestPlcOperationSignature({ +/// Describe the credentials that should be included in the DID doc of an account that is migrating to this service. +Future> +comAtprotoIdentityGetRecommendedDidCredentials({ required ServiceContext $ctx, String? $service, Map? $headers, -}) async => await $ctx.post( - ns.comAtprotoIdentityRequestPlcOperationSignature, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoIdentityGetRecommendedDidCredentials, service: $service, - headers: {...?$headers}, + headers: $headers, + parameters: {...?$unknown}, + to: const IdentityGetRecommendedDidCredentialsOutputConverter().fromJson, ); -/// Resolves DID to DID document. Does not bi-directionally verify handle. -Future> comAtprotoIdentityResolveDid({ - required String did, +/// Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server. +Future> comAtprotoIdentityRefreshIdentity({ + required String identifier, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoIdentityResolveDid, +}) async => await $ctx.post( + ns.comAtprotoIdentityRefreshIdentity, service: $service, - headers: $headers, - parameters: {...?$unknown, 'did': did}, - to: const IdentityResolveDidOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'identifier': identifier}, + to: const IdentityInfoConverter().fromJson, ); -/// Signs a PLC operation to update some value(s) in the requesting DID's document. -Future> -comAtprotoIdentitySignPlcOperation({ - String? token, - List? rotationKeys, - List? alsoKnownAs, - Map? verificationMethods, - Map? services, +/// Request an email with a code to in order to request a signed PLC operation. Requires Auth. +Future> comAtprotoIdentityRequestPlcOperationSignature({ required ServiceContext $ctx, String? $service, Map? $headers, - Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoIdentitySignPlcOperation, + ns.comAtprotoIdentityRequestPlcOperationSignature, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - if (token != null) 'token': token, - if (rotationKeys != null) 'rotationKeys': rotationKeys, - if (alsoKnownAs != null) 'alsoKnownAs': alsoKnownAs, - if (verificationMethods != null) 'verificationMethods': verificationMethods, - if (services != null) 'services': services, - }, - to: const IdentitySignPlcOperationOutputConverter().fromJson, + headers: {...?$headers}, ); -/// Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server. -Future> comAtprotoIdentityRefreshIdentity({ - required String identifier, +/// Resolves DID to DID document. Does not bi-directionally verify handle. +Future> comAtprotoIdentityResolveDid({ + required String did, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.comAtprotoIdentityRefreshIdentity, +}) async => await $ctx.get( + ns.comAtprotoIdentityResolveDid, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'identifier': identifier}, - to: const IdentityInfoConverter().fromJson, + headers: $headers, + parameters: {...?$unknown, 'did': did}, + to: const IdentityResolveDidOutputConverter().fromJson, ); -/// Describe the credentials that should be included in the DID doc of an account that is migrating to this service. -Future> -comAtprotoIdentityGetRecommendedDidCredentials({ +/// Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. +Future> +comAtprotoIdentityResolveHandle({ + required String handle, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.comAtprotoIdentityGetRecommendedDidCredentials, + ns.comAtprotoIdentityResolveHandle, service: $service, headers: $headers, - parameters: {...?$unknown}, - to: const IdentityGetRecommendedDidCredentialsOutputConverter().fromJson, + parameters: {...?$unknown, 'handle': handle}, + to: const IdentityResolveHandleOutputConverter().fromJson, ); /// Resolves an identity (DID or Handle) to a full identity (DID document and verified handle). @@ -121,20 +110,31 @@ Future> comAtprotoIdentityResolveIdentity({ to: const IdentityInfoConverter().fromJson, ); -/// Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. -Future> -comAtprotoIdentityResolveHandle({ - required String handle, +/// Signs a PLC operation to update some value(s) in the requesting DID's document. +Future> +comAtprotoIdentitySignPlcOperation({ + String? token, + List? rotationKeys, + List? alsoKnownAs, + Map? verificationMethods, + Map? services, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoIdentityResolveHandle, +}) async => await $ctx.post( + ns.comAtprotoIdentitySignPlcOperation, service: $service, - headers: $headers, - parameters: {...?$unknown, 'handle': handle}, - to: const IdentityResolveHandleOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: { + ...?$unknown, + if (token != null) 'token': token, + if (rotationKeys != null) 'rotationKeys': rotationKeys, + if (alsoKnownAs != null) 'alsoKnownAs': alsoKnownAs, + if (verificationMethods != null) 'verificationMethods': verificationMethods, + if (services != null) 'services': services, + }, + to: const IdentitySignPlcOperationOutputConverter().fromJson, ); /// Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry @@ -172,73 +172,65 @@ base class IdentityService { IdentityService(this.ctx); - /// Request an email with a code to in order to request a signed PLC operation. Requires Auth. - Future> requestPlcOperationSignature({ + /// Describe the credentials that should be included in the DID doc of an account that is migrating to this service. + Future> + getRecommendedDidCredentials({ String? $service, Map? $headers, - }) async => await comAtprotoIdentityRequestPlcOperationSignature( + Map? $unknown, + }) async => await comAtprotoIdentityGetRecommendedDidCredentials( $ctx: ctx, $service: $service, $headers: $headers, + $unknown: $unknown, ); - /// Resolves DID to DID document. Does not bi-directionally verify handle. - Future> resolveDid({ - required String did, + /// Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server. + Future> refreshIdentity({ + required String identifier, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoIdentityResolveDid( - did: did, + }) async => await comAtprotoIdentityRefreshIdentity( + identifier: identifier, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Signs a PLC operation to update some value(s) in the requesting DID's document. - Future> signPlcOperation({ - String? token, - List? rotationKeys, - List? alsoKnownAs, - Map? verificationMethods, - Map? services, + /// Request an email with a code to in order to request a signed PLC operation. Requires Auth. + Future> requestPlcOperationSignature({ String? $service, Map? $headers, - Map? $unknown, - }) async => await comAtprotoIdentitySignPlcOperation( - token: token, - rotationKeys: rotationKeys, - alsoKnownAs: alsoKnownAs, - verificationMethods: verificationMethods, - services: services, + }) async => await comAtprotoIdentityRequestPlcOperationSignature( $ctx: ctx, $service: $service, $headers: $headers, - $unknown: $unknown, ); - /// Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server. - Future> refreshIdentity({ - required String identifier, + /// Resolves DID to DID document. Does not bi-directionally verify handle. + Future> resolveDid({ + required String did, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoIdentityRefreshIdentity( - identifier: identifier, + }) async => await comAtprotoIdentityResolveDid( + did: did, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Describe the credentials that should be included in the DID doc of an account that is migrating to this service. - Future> - getRecommendedDidCredentials({ + /// Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. + Future> resolveHandle({ + required String handle, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoIdentityGetRecommendedDidCredentials( + }) async => await comAtprotoIdentityResolveHandle( + handle: handle, $ctx: ctx, $service: $service, $headers: $headers, @@ -259,14 +251,22 @@ base class IdentityService { $unknown: $unknown, ); - /// Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. - Future> resolveHandle({ - required String handle, + /// Signs a PLC operation to update some value(s) in the requesting DID's document. + Future> signPlcOperation({ + String? token, + List? rotationKeys, + List? alsoKnownAs, + Map? verificationMethods, + Map? services, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoIdentityResolveHandle( - handle: handle, + }) async => await comAtprotoIdentitySignPlcOperation( + token: token, + rotationKeys: rotationKeys, + alsoKnownAs: alsoKnownAs, + verificationMethods: verificationMethods, + services: services, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/atproto/lib/src/services/codegen/com/atproto/label/defs/label_value.dart b/packages/atproto/lib/src/services/codegen/com/atproto/label/defs/label_value.dart index a883730a9..eb79395e5 100644 --- a/packages/atproto/lib/src/services/codegen/com/atproto/label/defs/label_value.dart +++ b/packages/atproto/lib/src/services/codegen/com/atproto/label/defs/label_value.dart @@ -74,26 +74,20 @@ final class LabelValueConverter extends JsonConverter { enum KnownLabelValue implements Serializable { @JsonValue('!hide') hide('!hide'), - @JsonValue('!no-promote') - noPromote('!no-promote'), @JsonValue('!warn') warn('!warn'), @JsonValue('!no-unauthenticated') noUnauthenticated('!no-unauthenticated'), - @JsonValue('dmca-violation') - dmcaViolation('dmca-violation'), - @JsonValue('doxxing') - doxxing('doxxing'), @JsonValue('porn') porn('porn'), @JsonValue('sexual') sexual('sexual'), @JsonValue('nudity') nudity('nudity'), - @JsonValue('nsfl') - nsfl('nsfl'), - @JsonValue('gore') - gore('gore'); + @JsonValue('graphic-media') + graphicMedia('graphic-media'), + @JsonValue('bot') + bot('bot'); @override final String value; diff --git a/packages/atproto/lib/src/services/codegen/com/atproto/repo_service.dart b/packages/atproto/lib/src/services/codegen/com/atproto/repo_service.dart index 485cc685f..c57f0d00f 100644 --- a/packages/atproto/lib/src/services/codegen/com/atproto/repo_service.dart +++ b/packages/atproto/lib/src/services/codegen/com/atproto/repo_service.dart @@ -36,51 +36,6 @@ import 'repo/uploadBlob/output.dart'; // LexGenerator // ************************************************************************** -/// Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. -Future> comAtprotoRepoPutRecord({ - required String repo, - required String collection, - required String rkey, - bool? validate, - required Map record, - String? swapRecord, - String? swapCommit, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.comAtprotoRepoPutRecord, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'repo': repo, - 'collection': collection, - 'rkey': rkey, - if (validate != null) 'validate': validate, - 'record': record, - if (swapRecord != null) 'swapRecord': swapRecord, - if (swapCommit != null) 'swapCommit': swapCommit, - }, - to: const RepoPutRecordOutputConverter().fromJson, -); - -/// Get information about an account and repository, including the list of collections. Does not require auth. -Future> comAtprotoRepoDescribeRepo({ - required String repo, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoRepoDescribeRepo, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'repo': repo}, - to: const RepoDescribeRepoOutputConverter().fromJson, -); - /// Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. Future> comAtprotoRepoApplyWrites({ required String repo, @@ -133,22 +88,6 @@ Future> comAtprotoRepoCreateRecord({ to: const RepoCreateRecordOutputConverter().fromJson, ); -/// Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS. -Future> comAtprotoRepoUploadBlob({ - required Uint8List bytes, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $parameters, -}) async => await $ctx.post( - ns.comAtprotoRepoUploadBlob, - service: $service, - headers: {'Content-type': '*/*', ...?$headers}, - parameters: $parameters, - body: bytes, - to: const RepoUploadBlobOutputConverter().fromJson, -); - /// Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. Future> comAtprotoRepoDeleteRecord({ required String repo, @@ -175,25 +114,43 @@ Future> comAtprotoRepoDeleteRecord({ to: const RepoDeleteRecordOutputConverter().fromJson, ); -/// Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. -Future> -comAtprotoRepoListMissingBlobs({ - int? limit, - String? cursor, +/// Get information about an account and repository, including the list of collections. Does not require auth. +Future> comAtprotoRepoDescribeRepo({ + required String repo, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.comAtprotoRepoListMissingBlobs, + ns.comAtprotoRepoDescribeRepo, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'repo': repo}, + to: const RepoDescribeRepoOutputConverter().fromJson, +); + +/// Get a single record from a repository. Does not require auth. +Future> comAtprotoRepoGetRecord({ + required String repo, + required String collection, + required String rkey, + String? cid, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoRepoGetRecord, service: $service, headers: $headers, parameters: { ...?$unknown, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, + 'repo': repo, + 'collection': collection, + 'rkey': rkey, + if (cid != null) 'cid': cid, }, - to: const RepoListMissingBlobsOutputConverter().fromJson, + to: const RepoGetRecordOutputConverter().fromJson, ); /// Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set. @@ -211,6 +168,27 @@ Future> comAtprotoRepoImportRepo({ body: bytes, ); +/// Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. +Future> +comAtprotoRepoListMissingBlobs({ + int? limit, + String? cursor, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoRepoListMissingBlobs, + service: $service, + headers: $headers, + parameters: { + ...?$unknown, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const RepoListMissingBlobsOutputConverter().fromJson, +); + /// List a range of records in a repository, matching a specific collection. Does not require auth. Future> comAtprotoRepoListRecords({ required String repo, @@ -237,28 +215,50 @@ Future> comAtprotoRepoListRecords({ to: const RepoListRecordsOutputConverter().fromJson, ); -/// Get a single record from a repository. Does not require auth. -Future> comAtprotoRepoGetRecord({ +/// Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. +Future> comAtprotoRepoPutRecord({ required String repo, required String collection, required String rkey, - String? cid, + bool? validate, + required Map record, + String? swapRecord, + String? swapCommit, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoRepoGetRecord, +}) async => await $ctx.post( + ns.comAtprotoRepoPutRecord, service: $service, - headers: $headers, - parameters: { + headers: {'Content-type': 'application/json', ...?$headers}, + body: { ...?$unknown, 'repo': repo, 'collection': collection, 'rkey': rkey, - if (cid != null) 'cid': cid, + if (validate != null) 'validate': validate, + 'record': record, + if (swapRecord != null) 'swapRecord': swapRecord, + if (swapCommit != null) 'swapCommit': swapCommit, }, - to: const RepoGetRecordOutputConverter().fromJson, + to: const RepoPutRecordOutputConverter().fromJson, +); + +/// Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS. +Future> comAtprotoRepoUploadBlob({ + required Uint8List bytes, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $parameters, +}) async => await $ctx.post( + ns.comAtprotoRepoUploadBlob, + service: $service, + headers: {'Content-type': '*/*', ...?$headers}, + parameters: $parameters, + body: bytes, + to: const RepoUploadBlobOutputConverter().fromJson, ); /// `com.atproto.repo.*` @@ -268,46 +268,6 @@ base class RepoService { RepoService(this.ctx); - /// Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. - Future> putRecord({ - required String repo, - required String collection, - required String rkey, - bool? validate, - required Map record, - String? swapRecord, - String? swapCommit, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoRepoPutRecord( - repo: repo, - collection: collection, - rkey: rkey, - validate: validate, - record: record, - swapRecord: swapRecord, - swapCommit: swapCommit, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Get information about an account and repository, including the list of collections. Does not require auth. - Future> describeRepo({ - required String repo, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoRepoDescribeRepo( - repo: repo, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - /// Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. Future> applyWrites({ required String repo, @@ -352,20 +312,6 @@ base class RepoService { $unknown: $unknown, ); - /// Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS. - Future> uploadBlob({ - required Uint8List bytes, - String? $service, - Map? $headers, - Map? $parameters, - }) async => await comAtprotoRepoUploadBlob( - bytes: bytes, - $parameters: $parameters, - $ctx: ctx, - $service: $service, - $headers: $headers, - ); - /// Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. Future> deleteRecord({ required String repo, @@ -388,16 +334,34 @@ base class RepoService { $unknown: $unknown, ); - /// Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. - Future> listMissingBlobs({ - int? limit, - String? cursor, + /// Get information about an account and repository, including the list of collections. Does not require auth. + Future> describeRepo({ + required String repo, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoRepoListMissingBlobs( - limit: limit, - cursor: cursor, + }) async => await comAtprotoRepoDescribeRepo( + repo: repo, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get a single record from a repository. Does not require auth. + Future> getRecord({ + required String repo, + required String collection, + required String rkey, + String? cid, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await comAtprotoRepoGetRecord( + repo: repo, + collection: collection, + rkey: rkey, + cid: cid, $ctx: ctx, $service: $service, $headers: $headers, @@ -418,6 +382,22 @@ base class RepoService { $headers: $headers, ); + /// Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. + Future> listMissingBlobs({ + int? limit, + String? cursor, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await comAtprotoRepoListMissingBlobs( + limit: limit, + cursor: cursor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + /// List a range of records in a repository, matching a specific collection. Does not require auth. Future> listRecords({ required String repo, @@ -440,23 +420,43 @@ base class RepoService { $unknown: $unknown, ); - /// Get a single record from a repository. Does not require auth. - Future> getRecord({ + /// Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS. + Future> putRecord({ required String repo, required String collection, required String rkey, - String? cid, + bool? validate, + required Map record, + String? swapRecord, + String? swapCommit, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoRepoGetRecord( + }) async => await comAtprotoRepoPutRecord( repo: repo, collection: collection, rkey: rkey, - cid: cid, + validate: validate, + record: record, + swapRecord: swapRecord, + swapCommit: swapCommit, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); + + /// Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS. + Future> uploadBlob({ + required Uint8List bytes, + String? $service, + Map? $headers, + Map? $parameters, + }) async => await comAtprotoRepoUploadBlob( + bytes: bytes, + $parameters: $parameters, + $ctx: ctx, + $service: $service, + $headers: $headers, + ); } diff --git a/packages/atproto/lib/src/services/codegen/com/atproto/server_service.dart b/packages/atproto/lib/src/services/codegen/com/atproto/server_service.dart index 83bcbddf0..56e706d87 100644 --- a/packages/atproto/lib/src/services/codegen/com/atproto/server_service.dart +++ b/packages/atproto/lib/src/services/codegen/com/atproto/server_service.dart @@ -33,13 +33,13 @@ import 'server/reserveSigningKey/output.dart'; // LexGenerator // ************************************************************************** -/// Initiate a user account deletion via email. -Future> comAtprotoServerRequestAccountDelete({ +/// Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup. +Future> comAtprotoServerActivateAccount({ required ServiceContext $ctx, String? $service, Map? $headers, }) async => await $ctx.post( - ns.comAtprotoServerRequestAccountDelete, + ns.comAtprotoServerActivateAccount, service: $service, headers: {...?$headers}, ); @@ -59,102 +59,94 @@ comAtprotoServerCheckAccountStatus({ to: const ServerCheckAccountStatusOutputConverter().fromJson, ); -/// Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup. -Future> comAtprotoServerActivateAccount({ - required ServiceContext $ctx, - String? $service, - Map? $headers, -}) async => await $ctx.post( - ns.comAtprotoServerActivateAccount, - service: $service, - headers: {...?$headers}, -); - -/// Get a signed token on behalf of the requesting DID for the requested service. -Future> -comAtprotoServerGetServiceAuth({ - required String aud, - int? exp, - String? lxm, +/// Confirm an email using a token from com.atproto.server.requestEmailConfirmation. +Future> comAtprotoServerConfirmEmail({ + required String email, + required String token, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoServerGetServiceAuth, +}) async => await $ctx.post( + ns.comAtprotoServerConfirmEmail, service: $service, - headers: $headers, - parameters: { - ...?$unknown, - 'aud': aud, - if (exp != null) 'exp': exp, - if (lxm != null) 'lxm': lxm, - }, - to: const ServerGetServiceAuthOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'email': email, 'token': token}, ); -/// Create an invite code. -Future> -comAtprotoServerCreateInviteCode({ - required int useCount, - String? forAccount, +/// Create an account. Implemented by PDS. +Future> comAtprotoServerCreateAccount({ + String? email, + required String handle, + String? did, + String? inviteCode, + String? verificationCode, + String? verificationPhone, + String? password, + String? recoveryKey, + Map? plcOp, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerCreateInviteCode, + ns.comAtprotoServerCreateAccount, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: { ...?$unknown, - 'useCount': useCount, - if (forAccount != null) 'forAccount': forAccount, + if (email != null) 'email': email, + 'handle': handle, + if (did != null) 'did': did, + if (inviteCode != null) 'inviteCode': inviteCode, + if (verificationCode != null) 'verificationCode': verificationCode, + if (verificationPhone != null) 'verificationPhone': verificationPhone, + if (password != null) 'password': password, + if (recoveryKey != null) 'recoveryKey': recoveryKey, + if (plcOp != null) 'plcOp': plcOp, }, - to: const ServerCreateInviteCodeOutputConverter().fromJson, + to: const ServerCreateAccountOutputConverter().fromJson, ); -/// Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth. -Future> comAtprotoServerDeleteAccount({ - required String did, - required String password, - required String token, +/// Create an App Password. +Future> comAtprotoServerCreateAppPassword({ + required String name, + bool? privileged, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerDeleteAccount, + ns.comAtprotoServerCreateAppPassword, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'did': did, 'password': password, 'token': token}, -); - -/// Request a token in order to update email. -Future> -comAtprotoServerRequestEmailUpdate({ - required ServiceContext $ctx, - String? $service, - Map? $headers, -}) async => await $ctx.post( - ns.comAtprotoServerRequestEmailUpdate, - service: $service, - headers: {...?$headers}, - to: const ServerRequestEmailUpdateOutputConverter().fromJson, + body: { + ...?$unknown, + 'name': name, + if (privileged != null) 'privileged': privileged, + }, + to: const AppPasswordConverter().fromJson, ); -/// Revoke an App Password by name. -Future> comAtprotoServerRevokeAppPassword({ - required String name, +/// Create an invite code. +Future> +comAtprotoServerCreateInviteCode({ + required int useCount, + String? forAccount, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerRevokeAppPassword, + ns.comAtprotoServerCreateInviteCode, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'name': name}, + body: { + ...?$unknown, + 'useCount': useCount, + if (forAccount != null) 'forAccount': forAccount, + }, + to: const ServerCreateInviteCodeOutputConverter().fromJson, ); /// Create invite codes. @@ -180,90 +172,87 @@ comAtprotoServerCreateInviteCodes({ to: const ServerCreateInviteCodesOutputConverter().fromJson, ); -/// Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host. -Future> comAtprotoServerDeactivateAccount({ - DateTime? deleteAfter, +/// Create an authentication session. +Future> comAtprotoServerCreateSession({ + required String identifier, + required String password, + String? authFactorToken, + bool? allowTakendown, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerDeactivateAccount, + ns.comAtprotoServerCreateSession, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: { ...?$unknown, - if (deleteAfter != null) 'deleteAfter': iso8601(deleteAfter), + 'identifier': identifier, + 'password': password, + if (authFactorToken != null) 'authFactorToken': authFactorToken, + if (allowTakendown != null) 'allowTakendown': allowTakendown, }, + to: const ServerCreateSessionOutputConverter().fromJson, ); -/// Create an account. Implemented by PDS. -Future> comAtprotoServerCreateAccount({ - String? email, - required String handle, - String? did, - String? inviteCode, - String? verificationCode, - String? verificationPhone, - String? password, - String? recoveryKey, - Map? plcOp, +/// Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host. +Future> comAtprotoServerDeactivateAccount({ + DateTime? deleteAfter, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerCreateAccount, + ns.comAtprotoServerDeactivateAccount, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: { ...?$unknown, - if (email != null) 'email': email, - 'handle': handle, - if (did != null) 'did': did, - if (inviteCode != null) 'inviteCode': inviteCode, - if (verificationCode != null) 'verificationCode': verificationCode, - if (verificationPhone != null) 'verificationPhone': verificationPhone, - if (password != null) 'password': password, - if (recoveryKey != null) 'recoveryKey': recoveryKey, - if (plcOp != null) 'plcOp': plcOp, + if (deleteAfter != null) 'deleteAfter': iso8601(deleteAfter), }, - to: const ServerCreateAccountOutputConverter().fromJson, ); -/// Initiate a user account password reset via email. -Future> comAtprotoServerRequestPasswordReset({ - required String email, +/// Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth. +Future> comAtprotoServerDeleteAccount({ + required String did, + required String password, + required String token, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerRequestPasswordReset, + ns.comAtprotoServerDeleteAccount, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'email': email}, + body: {...?$unknown, 'did': did, 'password': password, 'token': token}, ); -/// Update an account's email. -Future> comAtprotoServerUpdateEmail({ - required String email, - bool? emailAuthFactor, - String? token, +/// Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). +Future> comAtprotoServerDeleteSession({ required ServiceContext $ctx, String? $service, Map? $headers, - Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerUpdateEmail, + ns.comAtprotoServerDeleteSession, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'email': email, - if (emailAuthFactor != null) 'emailAuthFactor': emailAuthFactor, - if (token != null) 'token': token, - }, + headers: {...?$headers}, +); + +/// Describes the server's account creation requirements and capabilities. Implemented by PDS. +Future> +comAtprotoServerDescribeServer({ + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoServerDescribeServer, + service: $service, + headers: $headers, + parameters: {...?$unknown}, + to: const ServerDescribeServerOutputConverter().fromJson, ); /// Get all invite codes for the current account. Requires auth. @@ -287,173 +276,184 @@ comAtprotoServerGetAccountInviteCodes({ to: const ServerGetAccountInviteCodesOutputConverter().fromJson, ); -/// Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). -Future> -comAtprotoServerRefreshSession({ +/// Get a signed token on behalf of the requesting DID for the requested service. +Future> +comAtprotoServerGetServiceAuth({ + required String aud, + int? exp, + String? lxm, required ServiceContext $ctx, String? $service, Map? $headers, -}) async => await $ctx.post( - ns.comAtprotoServerRefreshSession, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoServerGetServiceAuth, service: $service, - headers: {...?$headers}, - to: const ServerRefreshSessionOutputConverter().fromJson, + headers: $headers, + parameters: { + ...?$unknown, + 'aud': aud, + if (exp != null) 'exp': exp, + if (lxm != null) 'lxm': lxm, + }, + to: const ServerGetServiceAuthOutputConverter().fromJson, ); -/// Confirm an email using a token from com.atproto.server.requestEmailConfirmation. -Future> comAtprotoServerConfirmEmail({ - required String email, - required String token, +/// Get information about the current auth session. Requires auth. +Future> comAtprotoServerGetSession({ required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.comAtprotoServerConfirmEmail, +}) async => await $ctx.get( + ns.comAtprotoServerGetSession, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'email': email, 'token': token}, + headers: $headers, + parameters: {...?$unknown}, + to: const ServerGetSessionOutputConverter().fromJson, ); -/// Reset a user account password using a token. -Future> comAtprotoServerResetPassword({ - required String token, - required String password, +/// List all App Passwords. +Future> +comAtprotoServerListAppPasswords({ required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoServerListAppPasswords, + service: $service, + headers: $headers, + parameters: {...?$unknown}, + to: const ServerListAppPasswordsOutputConverter().fromJson, +); + +/// Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). +Future> +comAtprotoServerRefreshSession({ + required ServiceContext $ctx, + String? $service, + Map? $headers, }) async => await $ctx.post( - ns.comAtprotoServerResetPassword, + ns.comAtprotoServerRefreshSession, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'token': token, 'password': password}, + headers: {...?$headers}, + to: const ServerRefreshSessionOutputConverter().fromJson, ); -/// Describes the server's account creation requirements and capabilities. Implemented by PDS. -Future> -comAtprotoServerDescribeServer({ +/// Initiate a user account deletion via email. +Future> comAtprotoServerRequestAccountDelete({ required ServiceContext $ctx, String? $service, Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoServerDescribeServer, +}) async => await $ctx.post( + ns.comAtprotoServerRequestAccountDelete, service: $service, - headers: $headers, - parameters: {...?$unknown}, - to: const ServerDescribeServerOutputConverter().fromJson, + headers: {...?$headers}, ); -/// Create an authentication session. -Future> comAtprotoServerCreateSession({ - required String identifier, - required String password, - String? authFactorToken, - bool? allowTakendown, +/// Request an email with a code to confirm ownership of email. +Future> comAtprotoServerRequestEmailConfirmation({ required ServiceContext $ctx, String? $service, Map? $headers, - Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerCreateSession, + ns.comAtprotoServerRequestEmailConfirmation, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'identifier': identifier, - 'password': password, - if (authFactorToken != null) 'authFactorToken': authFactorToken, - if (allowTakendown != null) 'allowTakendown': allowTakendown, - }, - to: const ServerCreateSessionOutputConverter().fromJson, + headers: {...?$headers}, ); -/// Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). -Future> comAtprotoServerDeleteSession({ +/// Request a token in order to update email. +Future> +comAtprotoServerRequestEmailUpdate({ required ServiceContext $ctx, String? $service, Map? $headers, }) async => await $ctx.post( - ns.comAtprotoServerDeleteSession, + ns.comAtprotoServerRequestEmailUpdate, service: $service, headers: {...?$headers}, + to: const ServerRequestEmailUpdateOutputConverter().fromJson, ); -/// Create an App Password. -Future> comAtprotoServerCreateAppPassword({ - required String name, - bool? privileged, +/// Initiate a user account password reset via email. +Future> comAtprotoServerRequestPasswordReset({ + required String email, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerCreateAppPassword, + ns.comAtprotoServerRequestPasswordReset, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'name': name, - if (privileged != null) 'privileged': privileged, - }, - to: const AppPasswordConverter().fromJson, + body: {...?$unknown, 'email': email}, ); -/// Get information about the current auth session. Requires auth. -Future> comAtprotoServerGetSession({ +/// Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented. +Future> +comAtprotoServerReserveSigningKey({ + String? did, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoServerGetSession, +}) async => await $ctx.post( + ns.comAtprotoServerReserveSigningKey, service: $service, - headers: $headers, - parameters: {...?$unknown}, - to: const ServerGetSessionOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, if (did != null) 'did': did}, + to: const ServerReserveSigningKeyOutputConverter().fromJson, ); -/// Request an email with a code to confirm ownership of email. -Future> comAtprotoServerRequestEmailConfirmation({ +/// Reset a user account password using a token. +Future> comAtprotoServerResetPassword({ + required String token, + required String password, required ServiceContext $ctx, String? $service, Map? $headers, + Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerRequestEmailConfirmation, + ns.comAtprotoServerResetPassword, service: $service, - headers: {...?$headers}, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'token': token, 'password': password}, ); -/// List all App Passwords. -Future> -comAtprotoServerListAppPasswords({ +/// Revoke an App Password by name. +Future> comAtprotoServerRevokeAppPassword({ + required String name, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoServerListAppPasswords, +}) async => await $ctx.post( + ns.comAtprotoServerRevokeAppPassword, service: $service, - headers: $headers, - parameters: {...?$unknown}, - to: const ServerListAppPasswordsOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'name': name}, ); -/// Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented. -Future> -comAtprotoServerReserveSigningKey({ - String? did, +/// Update an account's email. +Future> comAtprotoServerUpdateEmail({ + required String email, + bool? emailAuthFactor, + String? token, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoServerReserveSigningKey, + ns.comAtprotoServerUpdateEmail, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, if (did != null) 'did': did}, - to: const ServerReserveSigningKeyOutputConverter().fromJson, + body: { + ...?$unknown, + 'email': email, + if (emailAuthFactor != null) 'emailAuthFactor': emailAuthFactor, + if (token != null) 'token': token, + }, ); /// `com.atproto.server.*` @@ -463,28 +463,6 @@ base class ServerService { ServerService(this.ctx); - /// Initiate a user account deletion via email. - Future> requestAccountDelete({ - String? $service, - Map? $headers, - }) async => await comAtprotoServerRequestAccountDelete( - $ctx: ctx, - $service: $service, - $headers: $headers, - ); - - /// Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself. - Future> checkAccountStatus({ - String? $service, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoServerCheckAccountStatus( - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - /// Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup. Future> activateAccount({ String? $service, @@ -495,76 +473,90 @@ base class ServerService { $headers: $headers, ); - /// Get a signed token on behalf of the requesting DID for the requested service. - Future> getServiceAuth({ - required String aud, - int? exp, - String? lxm, + /// Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself. + Future> checkAccountStatus({ String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerGetServiceAuth( - aud: aud, - exp: exp, - lxm: lxm, + }) async => await comAtprotoServerCheckAccountStatus( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Create an invite code. - Future> createInviteCode({ - required int useCount, - String? forAccount, + /// Confirm an email using a token from com.atproto.server.requestEmailConfirmation. + Future> confirmEmail({ + required String email, + required String token, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerCreateInviteCode( - useCount: useCount, - forAccount: forAccount, + }) async => await comAtprotoServerConfirmEmail( + email: email, + token: token, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth. - Future> deleteAccount({ - required String did, - required String password, - required String token, + /// Create an account. Implemented by PDS. + Future> createAccount({ + String? email, + required String handle, + String? did, + String? inviteCode, + String? verificationCode, + String? verificationPhone, + String? password, + String? recoveryKey, + Map? plcOp, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerDeleteAccount( + }) async => await comAtprotoServerCreateAccount( + email: email, + handle: handle, did: did, + inviteCode: inviteCode, + verificationCode: verificationCode, + verificationPhone: verificationPhone, password: password, - token: token, + recoveryKey: recoveryKey, + plcOp: plcOp, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Request a token in order to update email. - Future> requestEmailUpdate({ + /// Create an App Password. + Future> createAppPassword({ + required String name, + bool? privileged, String? $service, Map? $headers, - }) async => await comAtprotoServerRequestEmailUpdate( + Map? $unknown, + }) async => await comAtprotoServerCreateAppPassword( + name: name, + privileged: privileged, $ctx: ctx, $service: $service, $headers: $headers, + $unknown: $unknown, ); - /// Revoke an App Password by name. - Future> revokeAppPassword({ - required String name, + /// Create an invite code. + Future> createInviteCode({ + required int useCount, + String? forAccount, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerRevokeAppPassword( - name: name, + }) async => await comAtprotoServerCreateInviteCode( + useCount: useCount, + forAccount: forAccount, $ctx: ctx, $service: $service, $headers: $headers, @@ -589,6 +581,26 @@ base class ServerService { $unknown: $unknown, ); + /// Create an authentication session. + Future> createSession({ + required String identifier, + required String password, + String? authFactorToken, + bool? allowTakendown, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await comAtprotoServerCreateSession( + identifier: identifier, + password: password, + authFactorToken: authFactorToken, + allowTakendown: allowTakendown, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + /// Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host. Future> deactivateAccount({ DateTime? deleteAfter, @@ -603,62 +615,40 @@ base class ServerService { $unknown: $unknown, ); - /// Create an account. Implemented by PDS. - Future> createAccount({ - String? email, - required String handle, - String? did, - String? inviteCode, - String? verificationCode, - String? verificationPhone, - String? password, - String? recoveryKey, - Map? plcOp, + /// Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth. + Future> deleteAccount({ + required String did, + required String password, + required String token, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerCreateAccount( - email: email, - handle: handle, + }) async => await comAtprotoServerDeleteAccount( did: did, - inviteCode: inviteCode, - verificationCode: verificationCode, - verificationPhone: verificationPhone, password: password, - recoveryKey: recoveryKey, - plcOp: plcOp, + token: token, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Initiate a user account password reset via email. - Future> requestPasswordReset({ - required String email, + /// Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). + Future> deleteSession({ String? $service, Map? $headers, - Map? $unknown, - }) async => await comAtprotoServerRequestPasswordReset( - email: email, + }) async => await comAtprotoServerDeleteSession( $ctx: ctx, $service: $service, $headers: $headers, - $unknown: $unknown, ); - /// Update an account's email. - Future> updateEmail({ - required String email, - bool? emailAuthFactor, - String? token, + /// Describes the server's account creation requirements and capabilities. Implemented by PDS. + Future> describeServer({ String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerUpdateEmail( - email: email, - emailAuthFactor: emailAuthFactor, - token: token, + }) async => await comAtprotoServerDescribeServer( $ctx: ctx, $service: $service, $headers: $headers, @@ -682,148 +672,158 @@ base class ServerService { $unknown: $unknown, ); - /// Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). - Future> refreshSession({ + /// Get a signed token on behalf of the requesting DID for the requested service. + Future> getServiceAuth({ + required String aud, + int? exp, + String? lxm, String? $service, Map? $headers, - }) async => await comAtprotoServerRefreshSession( + Map? $unknown, + }) async => await comAtprotoServerGetServiceAuth( + aud: aud, + exp: exp, + lxm: lxm, $ctx: ctx, $service: $service, $headers: $headers, + $unknown: $unknown, ); - /// Confirm an email using a token from com.atproto.server.requestEmailConfirmation. - Future> confirmEmail({ - required String email, - required String token, + /// Get information about the current auth session. Requires auth. + Future> getSession({ String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerConfirmEmail( - email: email, - token: token, + }) async => await comAtprotoServerGetSession( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Reset a user account password using a token. - Future> resetPassword({ - required String token, - required String password, + /// List all App Passwords. + Future> listAppPasswords({ String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerResetPassword( - token: token, - password: password, + }) async => await comAtprotoServerListAppPasswords( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Describes the server's account creation requirements and capabilities. Implemented by PDS. - Future> describeServer({ + /// Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). + Future> refreshSession({ String? $service, Map? $headers, - Map? $unknown, - }) async => await comAtprotoServerDescribeServer( + }) async => await comAtprotoServerRefreshSession( $ctx: ctx, $service: $service, $headers: $headers, - $unknown: $unknown, ); - /// Create an authentication session. - Future> createSession({ - required String identifier, - required String password, - String? authFactorToken, - bool? allowTakendown, + /// Initiate a user account deletion via email. + Future> requestAccountDelete({ String? $service, Map? $headers, - Map? $unknown, - }) async => await comAtprotoServerCreateSession( - identifier: identifier, - password: password, - authFactorToken: authFactorToken, - allowTakendown: allowTakendown, + }) async => await comAtprotoServerRequestAccountDelete( $ctx: ctx, $service: $service, $headers: $headers, - $unknown: $unknown, ); - /// Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). - Future> deleteSession({ + /// Request an email with a code to confirm ownership of email. + Future> requestEmailConfirmation({ String? $service, Map? $headers, - }) async => await comAtprotoServerDeleteSession( + }) async => await comAtprotoServerRequestEmailConfirmation( $ctx: ctx, $service: $service, $headers: $headers, ); - /// Create an App Password. - Future> createAppPassword({ - required String name, - bool? privileged, + /// Request a token in order to update email. + Future> requestEmailUpdate({ + String? $service, + Map? $headers, + }) async => await comAtprotoServerRequestEmailUpdate( + $ctx: ctx, + $service: $service, + $headers: $headers, + ); + + /// Initiate a user account password reset via email. + Future> requestPasswordReset({ + required String email, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerCreateAppPassword( - name: name, - privileged: privileged, + }) async => await comAtprotoServerRequestPasswordReset( + email: email, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get information about the current auth session. Requires auth. - Future> getSession({ + /// Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented. + Future> reserveSigningKey({ + String? did, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerGetSession( + }) async => await comAtprotoServerReserveSigningKey( + did: did, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Request an email with a code to confirm ownership of email. - Future> requestEmailConfirmation({ + /// Reset a user account password using a token. + Future> resetPassword({ + required String token, + required String password, String? $service, Map? $headers, - }) async => await comAtprotoServerRequestEmailConfirmation( + Map? $unknown, + }) async => await comAtprotoServerResetPassword( + token: token, + password: password, $ctx: ctx, $service: $service, $headers: $headers, + $unknown: $unknown, ); - /// List all App Passwords. - Future> listAppPasswords({ + /// Revoke an App Password by name. + Future> revokeAppPassword({ + required String name, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerListAppPasswords( + }) async => await comAtprotoServerRevokeAppPassword( + name: name, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented. - Future> reserveSigningKey({ - String? did, + /// Update an account's email. + Future> updateEmail({ + required String email, + bool? emailAuthFactor, + String? token, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoServerReserveSigningKey( - did: did, + }) async => await comAtprotoServerUpdateEmail( + email: email, + emailAuthFactor: emailAuthFactor, + token: token, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/atproto/lib/src/services/codegen/com/atproto/sync_service.dart b/packages/atproto/lib/src/services/codegen/com/atproto/sync_service.dart index dbb7a392c..4225b5466 100644 --- a/packages/atproto/lib/src/services/codegen/com/atproto/sync_service.dart +++ b/packages/atproto/lib/src/services/codegen/com/atproto/sync_service.dart @@ -29,6 +29,36 @@ import 'sync/listReposByCollection/output.dart'; // LexGenerator // ************************************************************************** +/// Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. +Future> comAtprotoSyncGetBlob({ + required String did, + required String cid, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoSyncGetBlob, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'did': did, 'cid': cid}, +); + +/// Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS. +Future> comAtprotoSyncGetBlocks({ + required String did, + required List cids, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoSyncGetBlocks, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'did': did, 'cids': cids}, +); + /// DEPRECATED - please use com.atproto.sync.getRepo instead Future> comAtprotoSyncGetCheckout({ required String did, @@ -58,49 +88,85 @@ Future> comAtprotoSyncGetHead({ to: const SyncGetHeadOutputConverter().fromJson, ); -/// Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. -Future> comAtprotoSyncGetBlob({ +/// Returns information about a specified upstream host, as consumed by the server. Implemented by relays. +Future> comAtprotoSyncGetHostStatus({ + required String hostname, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoSyncGetHostStatus, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'hostname': hostname}, + to: const SyncGetHostStatusOutputConverter().fromJson, +); + +/// Get the current commit CID & revision of the specified repo. Does not require auth. +Future> comAtprotoSyncGetLatestCommit({ required String did, - required String cid, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.comAtprotoSyncGetBlob, + ns.comAtprotoSyncGetLatestCommit, service: $service, headers: $headers, - parameters: {...?$unknown, 'did': did, 'cid': cid}, + parameters: {...?$unknown, 'did': did}, + to: const SyncGetLatestCommitOutputConverter().fromJson, ); -/// Returns information about a specified upstream host, as consumed by the server. Implemented by relays. -Future> comAtprotoSyncGetHostStatus({ - required String hostname, +/// Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth. +Future> comAtprotoSyncGetRecord({ + required String did, + required String collection, + required String rkey, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.comAtprotoSyncGetHostStatus, + ns.comAtprotoSyncGetRecord, service: $service, headers: $headers, - parameters: {...?$unknown, 'hostname': hostname}, - to: const SyncGetHostStatusOutputConverter().fromJson, + parameters: { + ...?$unknown, + 'did': did, + 'collection': collection, + 'rkey': rkey, + }, ); -/// Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS. -Future> comAtprotoSyncGetBlocks({ +/// Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS. +Future> comAtprotoSyncGetRepo({ required String did, - required List cids, + String? since, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.comAtprotoSyncGetBlocks, + ns.comAtprotoSyncGetRepo, service: $service, headers: $headers, - parameters: {...?$unknown, 'did': did, 'cids': cids}, + parameters: {...?$unknown, 'did': did, if (since != null) 'since': since}, +); + +/// Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay. +Future> comAtprotoSyncGetRepoStatus({ + required String did, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoSyncGetRepoStatus, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'did': did}, + to: const SyncGetRepoStatusOutputConverter().fromJson, ); /// List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS. @@ -147,20 +213,6 @@ Future> comAtprotoSyncListHosts({ to: const SyncListHostsOutputConverter().fromJson, ); -/// Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl -Future> comAtprotoSyncNotifyOfUpdate({ - required String hostname, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.comAtprotoSyncNotifyOfUpdate, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'hostname': hostname}, -); - /// Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay. Future> comAtprotoSyncListRepos({ int? limit, @@ -181,36 +233,6 @@ Future> comAtprotoSyncListRepos({ to: const SyncListReposOutputConverter().fromJson, ); -/// Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS. -Future> comAtprotoSyncGetRepo({ - required String did, - String? since, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoSyncGetRepo, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'did': did, if (since != null) 'since': since}, -); - -/// Get the current commit CID & revision of the specified repo. Does not require auth. -Future> comAtprotoSyncGetLatestCommit({ - required String did, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoSyncGetLatestCommit, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'did': did}, - to: const SyncGetLatestCommitOutputConverter().fromJson, -); - /// Enumerates all the DIDs which have records with the given collection NSID. Future> comAtprotoSyncListReposByCollection({ @@ -234,54 +256,32 @@ comAtprotoSyncListReposByCollection({ to: const SyncListReposByCollectionOutputConverter().fromJson, ); -/// Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth. -Future> comAtprotoSyncRequestCrawl({ +/// Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl +Future> comAtprotoSyncNotifyOfUpdate({ required String hostname, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.comAtprotoSyncRequestCrawl, + ns.comAtprotoSyncNotifyOfUpdate, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: {...?$unknown, 'hostname': hostname}, ); -/// Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth. -Future> comAtprotoSyncGetRecord({ - required String did, - required String collection, - required String rkey, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoSyncGetRecord, - service: $service, - headers: $headers, - parameters: { - ...?$unknown, - 'did': did, - 'collection': collection, - 'rkey': rkey, - }, -); - -/// Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay. -Future> comAtprotoSyncGetRepoStatus({ - required String did, +/// Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth. +Future> comAtprotoSyncRequestCrawl({ + required String hostname, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoSyncGetRepoStatus, +}) async => await $ctx.post( + ns.comAtprotoSyncRequestCrawl, service: $service, - headers: $headers, - parameters: {...?$unknown, 'did': did}, - to: const SyncGetRepoStatusOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'hostname': hostname}, ); /// Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay. @@ -300,44 +300,60 @@ base class SyncService { SyncService(this.ctx); - /// DEPRECATED - please use com.atproto.sync.getRepo instead - Future> getCheckout({ + /// Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. + Future> getBlob({ required String did, + required String cid, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncGetCheckout( + }) async => await comAtprotoSyncGetBlob( did: did, + cid: cid, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// DEPRECATED - please use com.atproto.sync.getLatestCommit instead - Future> getHead({ + /// Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS. + Future> getBlocks({ required String did, + required List cids, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncGetHead( + }) async => await comAtprotoSyncGetBlocks( did: did, + cids: cids, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS. - Future> getBlob({ + /// DEPRECATED - please use com.atproto.sync.getRepo instead + Future> getCheckout({ required String did, - required String cid, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncGetBlob( + }) async => await comAtprotoSyncGetCheckout( + did: did, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// DEPRECATED - please use com.atproto.sync.getLatestCommit instead + Future> getHead({ + required String did, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await comAtprotoSyncGetHead( did: did, - cid: cid, $ctx: ctx, $service: $service, $headers: $headers, @@ -358,80 +374,80 @@ base class SyncService { $unknown: $unknown, ); - /// Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS. - Future> getBlocks({ + /// Get the current commit CID & revision of the specified repo. Does not require auth. + Future> getLatestCommit({ required String did, - required List cids, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncGetBlocks( + }) async => await comAtprotoSyncGetLatestCommit( did: did, - cids: cids, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS. - Future> listBlobs({ + /// Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth. + Future> getRecord({ required String did, - String? since, - int? limit, - String? cursor, + required String collection, + required String rkey, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncListBlobs( + }) async => await comAtprotoSyncGetRecord( did: did, - since: since, - limit: limit, - cursor: cursor, + collection: collection, + rkey: rkey, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays. - Future> listHosts({ - int? limit, - String? cursor, + /// Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS. + Future> getRepo({ + required String did, + String? since, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncListHosts( - limit: limit, - cursor: cursor, + }) async => await comAtprotoSyncGetRepo( + did: did, + since: since, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl - Future> notifyOfUpdate({ - required String hostname, + /// Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay. + Future> getRepoStatus({ + required String did, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncNotifyOfUpdate( - hostname: hostname, + }) async => await comAtprotoSyncGetRepoStatus( + did: did, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay. - Future> listRepos({ + /// List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS. + Future> listBlobs({ + required String did, + String? since, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncListRepos( + }) async => await comAtprotoSyncListBlobs( + did: did, + since: since, limit: limit, cursor: cursor, $ctx: ctx, @@ -440,30 +456,32 @@ base class SyncService { $unknown: $unknown, ); - /// Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS. - Future> getRepo({ - required String did, - String? since, + /// Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays. + Future> listHosts({ + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncGetRepo( - did: did, - since: since, + }) async => await comAtprotoSyncListHosts( + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get the current commit CID & revision of the specified repo. Does not require auth. - Future> getLatestCommit({ - required String did, + /// Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay. + Future> listRepos({ + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncGetLatestCommit( - did: did, + }) async => await comAtprotoSyncListRepos( + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, @@ -488,13 +506,13 @@ base class SyncService { $unknown: $unknown, ); - /// Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth. - Future> requestCrawl({ + /// Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl + Future> notifyOfUpdate({ required String hostname, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncRequestCrawl( + }) async => await comAtprotoSyncNotifyOfUpdate( hostname: hostname, $ctx: ctx, $service: $service, @@ -502,32 +520,14 @@ base class SyncService { $unknown: $unknown, ); - /// Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth. - Future> getRecord({ - required String did, - required String collection, - required String rkey, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoSyncGetRecord( - did: did, - collection: collection, - rkey: rkey, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay. - Future> getRepoStatus({ - required String did, + /// Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth. + Future> requestCrawl({ + required String hostname, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoSyncGetRepoStatus( - did: did, + }) async => await comAtprotoSyncRequestCrawl( + hostname: hostname, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/atproto/lib/src/services/codegen/com/atproto/temp_service.dart b/packages/atproto/lib/src/services/codegen/com/atproto/temp_service.dart index 000c3ae13..a9e9d6b07 100644 --- a/packages/atproto/lib/src/services/codegen/com/atproto/temp_service.dart +++ b/packages/atproto/lib/src/services/codegen/com/atproto/temp_service.dart @@ -23,6 +23,20 @@ import 'temp/fetchLabels/output.dart'; // LexGenerator // ************************************************************************** +/// Add a handle to the set of reserved handles. +Future> comAtprotoTempAddReservedHandle({ + required String handle, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.comAtprotoTempAddReservedHandle, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'handle': handle}, +); + /// Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions. Future> comAtprotoTempCheckHandleAvailability({ @@ -46,38 +60,19 @@ comAtprotoTempCheckHandleAvailability({ to: const TempCheckHandleAvailabilityOutputConverter().fromJson, ); -/// DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date. -Future> comAtprotoTempFetchLabels({ - int? since, - int? limit, +/// Check accounts location in signup queue. +Future> +comAtprotoTempCheckSignupQueue({ required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.comAtprotoTempFetchLabels, + ns.comAtprotoTempCheckSignupQueue, service: $service, headers: $headers, - parameters: { - ...?$unknown, - if (since != null) 'since': since, - if (limit != null) 'limit': limit, - }, - to: const TempFetchLabelsOutputConverter().fromJson, -); - -/// Add a handle to the set of reserved handles. -Future> comAtprotoTempAddReservedHandle({ - required String handle, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.comAtprotoTempAddReservedHandle, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'handle': handle}, + parameters: {...?$unknown}, + to: const TempCheckSignupQueueOutputConverter().fromJson, ); /// Allows finding the oauth permission scope from a reference @@ -96,6 +91,26 @@ comAtprotoTempDereferenceScope({ to: const TempDereferenceScopeOutputConverter().fromJson, ); +/// DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date. +Future> comAtprotoTempFetchLabels({ + int? since, + int? limit, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.comAtprotoTempFetchLabels, + service: $service, + headers: $headers, + parameters: { + ...?$unknown, + if (since != null) 'since': since, + if (limit != null) 'limit': limit, + }, + to: const TempFetchLabelsOutputConverter().fromJson, +); + /// Request a verification code to be sent to the supplied phone number Future> comAtprotoTempRequestPhoneVerification({ required String phoneNumber, @@ -124,21 +139,6 @@ Future> comAtprotoTempRevokeAccountCredentials({ body: {...?$unknown, 'account': account}, ); -/// Check accounts location in signup queue. -Future> -comAtprotoTempCheckSignupQueue({ - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.comAtprotoTempCheckSignupQueue, - service: $service, - headers: $headers, - parameters: {...?$unknown}, - to: const TempCheckSignupQueueOutputConverter().fromJson, -); - /// `com.atproto.temp.*` base class TempService { @protected @@ -146,6 +146,20 @@ base class TempService { TempService(this.ctx); + /// Add a handle to the set of reserved handles. + Future> addReservedHandle({ + required String handle, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await comAtprotoTempAddReservedHandle( + handle: handle, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + /// Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions. Future> checkHandleAvailability({ @@ -165,44 +179,42 @@ base class TempService { $unknown: $unknown, ); - /// DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date. - Future> fetchLabels({ - int? since, - int? limit, + /// Check accounts location in signup queue. + Future> checkSignupQueue({ String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoTempFetchLabels( - since: since, - limit: limit, + }) async => await comAtprotoTempCheckSignupQueue( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Add a handle to the set of reserved handles. - Future> addReservedHandle({ - required String handle, + /// Allows finding the oauth permission scope from a reference + Future> dereferenceScope({ + required String scope, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoTempAddReservedHandle( - handle: handle, + }) async => await comAtprotoTempDereferenceScope( + scope: scope, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Allows finding the oauth permission scope from a reference - Future> dereferenceScope({ - required String scope, + /// DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date. + Future> fetchLabels({ + int? since, + int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await comAtprotoTempDereferenceScope( - scope: scope, + }) async => await comAtprotoTempFetchLabels( + since: since, + limit: limit, $ctx: ctx, $service: $service, $headers: $headers, @@ -236,16 +248,4 @@ base class TempService { $headers: $headers, $unknown: $unknown, ); - - /// Check accounts location in signup queue. - Future> checkSignupQueue({ - String? $service, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoTempCheckSignupQueue( - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); } diff --git a/packages/bluesky/lib/app_bsky_services.dart b/packages/bluesky/lib/app_bsky_services.dart index 6de2e836e..6f79fa8f3 100644 --- a/packages/bluesky/lib/app_bsky_services.dart +++ b/packages/bluesky/lib/app_bsky_services.dart @@ -11,14 +11,14 @@ // LexGenerator // ************************************************************************** -export 'package:bluesky/src/services/codegen/app/bsky/graph_service.dart'; -export 'package:bluesky/src/services/codegen/app/bsky/draft_service.dart'; -export 'package:bluesky/src/services/codegen/app/bsky/unspecced_service.dart'; -export 'package:bluesky/src/services/codegen/app/bsky/contact_service.dart'; +export 'package:bluesky/src/services/codegen/app/bsky/actor_service.dart'; export 'package:bluesky/src/services/codegen/app/bsky/ageassurance_service.dart'; +export 'package:bluesky/src/services/codegen/app/bsky/bookmark_service.dart'; +export 'package:bluesky/src/services/codegen/app/bsky/contact_service.dart'; +export 'package:bluesky/src/services/codegen/app/bsky/draft_service.dart'; export 'package:bluesky/src/services/codegen/app/bsky/feed_service.dart'; -export 'package:bluesky/src/services/codegen/app/bsky/actor_service.dart'; -export 'package:bluesky/src/services/codegen/app/bsky/video_service.dart'; -export 'package:bluesky/src/services/codegen/app/bsky/notification_service.dart'; +export 'package:bluesky/src/services/codegen/app/bsky/graph_service.dart'; export 'package:bluesky/src/services/codegen/app/bsky/labeler_service.dart'; -export 'package:bluesky/src/services/codegen/app/bsky/bookmark_service.dart'; +export 'package:bluesky/src/services/codegen/app/bsky/notification_service.dart'; +export 'package:bluesky/src/services/codegen/app/bsky/unspecced_service.dart'; +export 'package:bluesky/src/services/codegen/app/bsky/video_service.dart'; diff --git a/packages/bluesky/lib/com_atproto_services.dart b/packages/bluesky/lib/com_atproto_services.dart index 8a113d89b..50f65bdf5 100644 --- a/packages/bluesky/lib/com_atproto_services.dart +++ b/packages/bluesky/lib/com_atproto_services.dart @@ -11,12 +11,12 @@ // LexGenerator // ************************************************************************** -export 'package:atproto/src/services/codegen/com/atproto/lexicon_service.dart'; -export 'package:atproto/src/services/codegen/com/atproto/repo_service.dart'; -export 'package:atproto/src/services/codegen/com/atproto/server_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/admin_service.dart'; -export 'package:atproto/src/services/codegen/com/atproto/temp_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/identity_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/label_service.dart'; +export 'package:atproto/src/services/codegen/com/atproto/lexicon_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/moderation_service.dart'; +export 'package:atproto/src/services/codegen/com/atproto/repo_service.dart'; +export 'package:atproto/src/services/codegen/com/atproto/server_service.dart'; export 'package:atproto/src/services/codegen/com/atproto/sync_service.dart'; +export 'package:atproto/src/services/codegen/com/atproto/temp_service.dart'; diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/actor_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/actor_service.dart index f513c3dc7..585aaa537 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/actor_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/actor_service.dart @@ -44,51 +44,48 @@ import 'package:atproto/com_atproto_services.dart' // LexGenerator // ************************************************************************** -/// Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth. -Future> -appBskyActorSearchActorsTypeahead({ - String? term, - String? q, - int? limit, +/// Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. +Future> appBskyActorGetPreferences({ required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyActorSearchActorsTypeahead, + ns.appBskyActorGetPreferences, service: $service, headers: $headers, - parameters: { - ...?$unknown, - if (term != null) 'term': term, - if (q != null) 'q': q, - if (limit != null) 'limit': limit, - }, - to: const ActorSearchActorsTypeaheadOutputConverter().fromJson, + parameters: {...?$unknown}, + to: const ActorGetPreferencesOutputConverter().fromJson, ); -/// Find actors (profiles) matching search criteria. Does not require auth. -Future> appBskyActorSearchActors({ - String? term, - String? q, - int? limit, - String? cursor, +/// Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. +Future> appBskyActorGetProfile({ + required String actor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyActorSearchActors, + ns.appBskyActorGetProfile, service: $service, headers: $headers, - parameters: { - ...?$unknown, - if (term != null) 'term': term, - if (q != null) 'q': q, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - }, - to: const ActorSearchActorsOutputConverter().fromJson, + parameters: {...?$unknown, 'actor': actor}, + to: const ProfileViewDetailedConverter().fromJson, +); + +/// Get detailed profile views of multiple actors. +Future> appBskyActorGetProfiles({ + required List actors, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyActorGetProfiles, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'actors': actors}, + to: const ActorGetProfilesOutputConverter().fromJson, ); /// Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding. @@ -128,48 +125,51 @@ Future> appBskyActorPutPreferences({ }, ); -/// Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. -Future> appBskyActorGetProfile({ - required String actor, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyActorGetProfile, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'actor': actor}, - to: const ProfileViewDetailedConverter().fromJson, -); - -/// Get detailed profile views of multiple actors. -Future> appBskyActorGetProfiles({ - required List actors, +/// Find actors (profiles) matching search criteria. Does not require auth. +Future> appBskyActorSearchActors({ + String? term, + String? q, + int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyActorGetProfiles, + ns.appBskyActorSearchActors, service: $service, headers: $headers, - parameters: {...?$unknown, 'actors': actors}, - to: const ActorGetProfilesOutputConverter().fromJson, + parameters: { + ...?$unknown, + if (term != null) 'term': term, + if (q != null) 'q': q, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const ActorSearchActorsOutputConverter().fromJson, ); -/// Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. -Future> appBskyActorGetPreferences({ +/// Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth. +Future> +appBskyActorSearchActorsTypeahead({ + String? term, + String? q, + int? limit, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyActorGetPreferences, + ns.appBskyActorSearchActorsTypeahead, service: $service, headers: $headers, - parameters: {...?$unknown}, - to: const ActorGetPreferencesOutputConverter().fromJson, + parameters: { + ...?$unknown, + if (term != null) 'term': term, + if (q != null) 'q': q, + if (limit != null) 'limit': limit, + }, + to: const ActorSearchActorsTypeaheadOutputConverter().fromJson, ); /// `app.bsky.actor.*` @@ -177,45 +177,47 @@ base class ActorService { @protected final ServiceContext ctx; - final ActorStatusRecordAccessor _status; final ActorProfileRecordAccessor _profile; + final ActorStatusRecordAccessor _status; ActorService(this.ctx) - : _status = ActorStatusRecordAccessor(ctx), - _profile = ActorProfileRecordAccessor(ctx); + : _profile = ActorProfileRecordAccessor(ctx), + _status = ActorStatusRecordAccessor(ctx); - /// Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth. - Future> searchActorsTypeahead({ - String? term, - String? q, - int? limit, + /// Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. + Future> getPreferences({ String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyActorSearchActorsTypeahead( - term: term, - q: q, - limit: limit, + }) async => await appBskyActorGetPreferences( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Find actors (profiles) matching search criteria. Does not require auth. - Future> searchActors({ - String? term, - String? q, - int? limit, - String? cursor, + /// Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. + Future> getProfile({ + required String actor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyActorSearchActors( - term: term, - q: q, - limit: limit, - cursor: cursor, + }) async => await appBskyActorGetProfile( + actor: actor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get detailed profile views of multiple actors. + Future> getProfiles({ + required List actors, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyActorGetProfiles( + actors: actors, $ctx: ctx, $service: $service, $headers: $headers, @@ -238,6 +240,9 @@ base class ActorService { $unknown: $unknown, ); + /// A declaration of a Bluesky account profile. + ActorProfileRecordAccessor get profile => _profile; + /// Set the private preferences attached to the account. Future> putPreferences({ required List preferences, @@ -252,57 +257,52 @@ base class ActorService { $unknown: $unknown, ); - /// A declaration of a Bluesky account status. - ActorStatusRecordAccessor get status => _status; - - /// A declaration of a Bluesky account profile. - ActorProfileRecordAccessor get profile => _profile; - - /// Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. - Future> getProfile({ - required String actor, + /// Find actors (profiles) matching search criteria. Does not require auth. + Future> searchActors({ + String? term, + String? q, + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyActorGetProfile( - actor: actor, + }) async => await appBskyActorSearchActors( + term: term, + q: q, + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get detailed profile views of multiple actors. - Future> getProfiles({ - required List actors, + /// Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth. + Future> searchActorsTypeahead({ + String? term, + String? q, + int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyActorGetProfiles( - actors: actors, + }) async => await appBskyActorSearchActorsTypeahead( + term: term, + q: q, + limit: limit, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. - Future> getPreferences({ - String? $service, - Map? $headers, - Map? $unknown, - }) async => await appBskyActorGetPreferences( - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); + /// A declaration of a Bluesky account status. + ActorStatusRecordAccessor get status => _status; } -final class ActorStatusRecordAccessor { +final class ActorProfileRecordAccessor { final ServiceContext ctx; - const ActorStatusRecordAccessor(this.ctx); + const ActorProfileRecordAccessor(this.ctx); Future> get({ required String repo, @@ -312,7 +312,7 @@ final class ActorStatusRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyActorStatus, + collection: ids.appBskyActorProfile, rkey: rkey, cid: cid, $ctx: ctx, @@ -329,7 +329,7 @@ final class ActorStatusRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyActorStatus, + collection: ids.appBskyActorProfile, limit: limit, cursor: cursor, reverse: reverse, @@ -339,9 +339,15 @@ final class ActorStatusRecordAccessor { ); Future> create({ - required ActorStatusStatus status, - UActorStatusEmbed? embed, - int? durationMinutes, + String? displayName, + String? description, + String? pronouns, + String? website, + Blob? avatar, + Blob? banner, + UActorProfileLabels? labels, + RepoStrongRef? joinedViaStarterPack, + RepoStrongRef? pinnedPost, DateTime? createdAt, String rkey = 'self', bool? validate, @@ -350,15 +356,22 @@ final class ActorStatusRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyActorStatus, + collection: ids.appBskyActorProfile, rkey: rkey, validate: validate, record: { ...?$unknown, - 'status': status.toJson(), - if (embed != null) 'embed': embed.toJson(), - if (durationMinutes != null) 'durationMinutes': durationMinutes, - 'createdAt': iso8601(createdAt), + if (displayName != null) 'displayName': displayName, + if (description != null) 'description': description, + if (pronouns != null) 'pronouns': pronouns, + if (website != null) 'website': website, + if (avatar != null) 'avatar': avatar, + if (banner != null) 'banner': banner, + if (labels != null) 'labels': labels.toJson(), + if (joinedViaStarterPack != null) + 'joinedViaStarterPack': joinedViaStarterPack.toJson(), + if (pinnedPost != null) 'pinnedPost': pinnedPost.toJson(), + if (createdAt != null) 'createdAt': iso8601(createdAt), }, swapCommit: swapCommit, $ctx: ctx, @@ -366,9 +379,15 @@ final class ActorStatusRecordAccessor { ); Future> put({ - required ActorStatusStatus status, - UActorStatusEmbed? embed, - int? durationMinutes, + String? displayName, + String? description, + String? pronouns, + String? website, + Blob? avatar, + Blob? banner, + UActorProfileLabels? labels, + RepoStrongRef? joinedViaStarterPack, + RepoStrongRef? pinnedPost, DateTime? createdAt, String rkey = 'self', bool? validate, @@ -378,15 +397,22 @@ final class ActorStatusRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyActorStatus, + collection: ids.appBskyActorProfile, rkey: rkey, validate: validate, record: { ...?$unknown, - 'status': status.toJson(), - if (embed != null) 'embed': embed.toJson(), - if (durationMinutes != null) 'durationMinutes': durationMinutes, - 'createdAt': iso8601(createdAt), + if (displayName != null) 'displayName': displayName, + if (description != null) 'description': description, + if (pronouns != null) 'pronouns': pronouns, + if (website != null) 'website': website, + if (avatar != null) 'avatar': avatar, + if (banner != null) 'banner': banner, + if (labels != null) 'labels': labels.toJson(), + if (joinedViaStarterPack != null) + 'joinedViaStarterPack': joinedViaStarterPack.toJson(), + if (pinnedPost != null) 'pinnedPost': pinnedPost.toJson(), + if (createdAt != null) 'createdAt': iso8601(createdAt), }, swapRecord: swapRecord, swapCommit: swapCommit, @@ -402,7 +428,7 @@ final class ActorStatusRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyActorStatus, + collection: ids.appBskyActorProfile, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, @@ -411,10 +437,10 @@ final class ActorStatusRecordAccessor { ); } -final class ActorProfileRecordAccessor { +final class ActorStatusRecordAccessor { final ServiceContext ctx; - const ActorProfileRecordAccessor(this.ctx); + const ActorStatusRecordAccessor(this.ctx); Future> get({ required String repo, @@ -424,7 +450,7 @@ final class ActorProfileRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyActorProfile, + collection: ids.appBskyActorStatus, rkey: rkey, cid: cid, $ctx: ctx, @@ -441,7 +467,7 @@ final class ActorProfileRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyActorProfile, + collection: ids.appBskyActorStatus, limit: limit, cursor: cursor, reverse: reverse, @@ -451,15 +477,9 @@ final class ActorProfileRecordAccessor { ); Future> create({ - String? displayName, - String? description, - String? pronouns, - String? website, - Blob? avatar, - Blob? banner, - UActorProfileLabels? labels, - RepoStrongRef? joinedViaStarterPack, - RepoStrongRef? pinnedPost, + required ActorStatusStatus status, + UActorStatusEmbed? embed, + int? durationMinutes, DateTime? createdAt, String rkey = 'self', bool? validate, @@ -468,22 +488,15 @@ final class ActorProfileRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyActorProfile, + collection: ids.appBskyActorStatus, rkey: rkey, validate: validate, record: { ...?$unknown, - if (displayName != null) 'displayName': displayName, - if (description != null) 'description': description, - if (pronouns != null) 'pronouns': pronouns, - if (website != null) 'website': website, - if (avatar != null) 'avatar': avatar, - if (banner != null) 'banner': banner, - if (labels != null) 'labels': labels.toJson(), - if (joinedViaStarterPack != null) - 'joinedViaStarterPack': joinedViaStarterPack.toJson(), - if (pinnedPost != null) 'pinnedPost': pinnedPost.toJson(), - if (createdAt != null) 'createdAt': iso8601(createdAt), + 'status': status.toJson(), + if (embed != null) 'embed': embed.toJson(), + if (durationMinutes != null) 'durationMinutes': durationMinutes, + 'createdAt': iso8601(createdAt), }, swapCommit: swapCommit, $ctx: ctx, @@ -491,15 +504,9 @@ final class ActorProfileRecordAccessor { ); Future> put({ - String? displayName, - String? description, - String? pronouns, - String? website, - Blob? avatar, - Blob? banner, - UActorProfileLabels? labels, - RepoStrongRef? joinedViaStarterPack, - RepoStrongRef? pinnedPost, + required ActorStatusStatus status, + UActorStatusEmbed? embed, + int? durationMinutes, DateTime? createdAt, String rkey = 'self', bool? validate, @@ -509,22 +516,15 @@ final class ActorProfileRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyActorProfile, + collection: ids.appBskyActorStatus, rkey: rkey, validate: validate, record: { ...?$unknown, - if (displayName != null) 'displayName': displayName, - if (description != null) 'description': description, - if (pronouns != null) 'pronouns': pronouns, - if (website != null) 'website': website, - if (avatar != null) 'avatar': avatar, - if (banner != null) 'banner': banner, - if (labels != null) 'labels': labels.toJson(), - if (joinedViaStarterPack != null) - 'joinedViaStarterPack': joinedViaStarterPack.toJson(), - if (pinnedPost != null) 'pinnedPost': pinnedPost.toJson(), - if (createdAt != null) 'createdAt': iso8601(createdAt), + 'status': status.toJson(), + if (embed != null) 'embed': embed.toJson(), + if (durationMinutes != null) 'durationMinutes': durationMinutes, + 'createdAt': iso8601(createdAt), }, swapRecord: swapRecord, swapCommit: swapCommit, @@ -540,7 +540,7 @@ final class ActorProfileRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyActorProfile, + collection: ids.appBskyActorStatus, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/ageassurance_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/ageassurance_service.dart index afbf2d9b3..0752c5c3a 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/ageassurance_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/ageassurance_service.dart @@ -21,6 +21,30 @@ import 'ageassurance/getState/output.dart'; // LexGenerator // ************************************************************************** +/// Initiate Age Assurance for an account. +Future> appBskyAgeassuranceBegin({ + required String email, + required String language, + required String countryCode, + String? regionCode, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.appBskyAgeassuranceBegin, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: { + ...?$unknown, + 'email': email, + 'language': language, + 'countryCode': countryCode, + if (regionCode != null) 'regionCode': regionCode, + }, + to: const StateConverter().fromJson, +); + /// Returns Age Assurance configuration for use on the client. Future> appBskyAgeassuranceGetConfig({ required ServiceContext $ctx, @@ -55,30 +79,6 @@ Future> appBskyAgeassuranceGetState({ to: const AgeassuranceGetStateOutputConverter().fromJson, ); -/// Initiate Age Assurance for an account. -Future> appBskyAgeassuranceBegin({ - required String email, - required String language, - required String countryCode, - String? regionCode, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.appBskyAgeassuranceBegin, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'email': email, - 'language': language, - 'countryCode': countryCode, - if (regionCode != null) 'regionCode': regionCode, - }, - to: const StateConverter().fromJson, -); - /// `app.bsky.ageassurance.*` base class AgeassuranceService { @protected @@ -86,46 +86,46 @@ base class AgeassuranceService { AgeassuranceService(this.ctx); - /// Returns Age Assurance configuration for use on the client. - Future> getConfig({ + /// Initiate Age Assurance for an account. + Future> begin({ + required String email, + required String language, + required String countryCode, + String? regionCode, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyAgeassuranceGetConfig( + }) async => await appBskyAgeassuranceBegin( + email: email, + language: language, + countryCode: countryCode, + regionCode: regionCode, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side. - Future> getState({ - required String countryCode, - String? regionCode, + /// Returns Age Assurance configuration for use on the client. + Future> getConfig({ String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyAgeassuranceGetState( - countryCode: countryCode, - regionCode: regionCode, + }) async => await appBskyAgeassuranceGetConfig( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Initiate Age Assurance for an account. - Future> begin({ - required String email, - required String language, + /// Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side. + Future> getState({ required String countryCode, String? regionCode, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyAgeassuranceBegin( - email: email, - language: language, + }) async => await appBskyAgeassuranceGetState( countryCode: countryCode, regionCode: regionCode, $ctx: ctx, diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/contact_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/contact_service.dart index 776379bdf..d40f171a3 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/contact_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/contact_service.dart @@ -22,21 +22,6 @@ import 'contact/verifyPhone/output.dart'; // LexGenerator // ************************************************************************** -/// System endpoint to send notifications related to contact imports. Requires role authentication. -Future> appBskyContactSendNotification({ - required String from, - required String to, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.appBskyContactSendNotification, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'from': from, 'to': to}, -); - /// Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication. Future> appBskyContactDismissMatch({ required String subject, @@ -71,18 +56,34 @@ Future> appBskyContactGetMatches({ to: const ContactGetMatchesOutputConverter().fromJson, ); -/// Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication. -Future> appBskyContactStartPhoneVerification({ - required String phone, +/// Gets the user's current contact import status. Requires authentication. +Future> appBskyContactGetSyncStatus({ + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyContactGetSyncStatus, + service: $service, + headers: $headers, + parameters: {...?$unknown}, + to: const ContactGetSyncStatusOutputConverter().fromJson, +); + +/// Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication. +Future> appBskyContactImportContacts({ + required String token, + required List contacts, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.appBskyContactStartPhoneVerification, + ns.appBskyContactImportContacts, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'phone': phone}, + body: {...?$unknown, 'token': token, 'contacts': contacts}, + to: const ContactImportContactsOutputConverter().fromJson, ); /// Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication. @@ -96,50 +97,49 @@ Future> appBskyContactRemoveData({ headers: {...?$headers}, ); -/// Gets the user's current contact import status. Requires authentication. -Future> appBskyContactGetSyncStatus({ +/// System endpoint to send notifications related to contact imports. Requires role authentication. +Future> appBskyContactSendNotification({ + required String from, + required String to, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.appBskyContactGetSyncStatus, +}) async => await $ctx.post( + ns.appBskyContactSendNotification, service: $service, - headers: $headers, - parameters: {...?$unknown}, - to: const ContactGetSyncStatusOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'from': from, 'to': to}, ); -/// Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication. -Future> appBskyContactVerifyPhone({ +/// Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication. +Future> appBskyContactStartPhoneVerification({ required String phone, - required String code, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.appBskyContactVerifyPhone, + ns.appBskyContactStartPhoneVerification, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'phone': phone, 'code': code}, - to: const ContactVerifyPhoneOutputConverter().fromJson, + body: {...?$unknown, 'phone': phone}, ); -/// Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication. -Future> appBskyContactImportContacts({ - required String token, - required List contacts, +/// Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication. +Future> appBskyContactVerifyPhone({ + required String phone, + required String code, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.appBskyContactImportContacts, + ns.appBskyContactVerifyPhone, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'token': token, 'contacts': contacts}, - to: const ContactImportContactsOutputConverter().fromJson, + body: {...?$unknown, 'phone': phone, 'code': code}, + to: const ContactVerifyPhoneOutputConverter().fromJson, ); /// `app.bsky.contact.*` @@ -149,22 +149,6 @@ base class ContactService { ContactService(this.ctx); - /// System endpoint to send notifications related to contact imports. Requires role authentication. - Future> sendNotification({ - required String from, - required String to, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await appBskyContactSendNotification( - from: from, - to: to, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - /// Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication. Future> dismissMatch({ required String subject, @@ -195,14 +179,28 @@ base class ContactService { $unknown: $unknown, ); - /// Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication. - Future> startPhoneVerification({ - required String phone, + /// Gets the user's current contact import status. Requires authentication. + Future> getSyncStatus({ String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyContactStartPhoneVerification( - phone: phone, + }) async => await appBskyContactGetSyncStatus( + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication. + Future> importContacts({ + required String token, + required List contacts, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyContactImportContacts( + token: token, + contacts: contacts, $ctx: ctx, $service: $service, $headers: $headers, @@ -219,44 +217,46 @@ base class ContactService { $headers: $headers, ); - /// Gets the user's current contact import status. Requires authentication. - Future> getSyncStatus({ + /// System endpoint to send notifications related to contact imports. Requires role authentication. + Future> sendNotification({ + required String from, + required String to, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyContactGetSyncStatus( + }) async => await appBskyContactSendNotification( + from: from, + to: to, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication. - Future> verifyPhone({ + /// Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication. + Future> startPhoneVerification({ required String phone, - required String code, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyContactVerifyPhone( + }) async => await appBskyContactStartPhoneVerification( phone: phone, - code: code, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication. - Future> importContacts({ - required String token, - required List contacts, + /// Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication. + Future> verifyPhone({ + required String phone, + required String code, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyContactImportContacts( - token: token, - contacts: contacts, + }) async => await appBskyContactVerifyPhone( + phone: phone, + code: code, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/draft_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/draft_service.dart index 1fa498305..217f1a07a 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/draft_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/draft_service.dart @@ -22,33 +22,33 @@ import 'draft/getDrafts/output.dart'; // LexGenerator // ************************************************************************** -/// Deletes a draft by ID. Requires authentication. -Future> appBskyDraftDeleteDraft({ - required String id, +/// Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication. +Future> appBskyDraftCreateDraft({ + required Draft draft, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.appBskyDraftDeleteDraft, + ns.appBskyDraftCreateDraft, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'id': id}, + body: {...?$unknown, 'draft': draft.toJson()}, + to: const DraftCreateDraftOutputConverter().fromJson, ); -/// Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication. -Future> appBskyDraftCreateDraft({ - required Draft draft, +/// Deletes a draft by ID. Requires authentication. +Future> appBskyDraftDeleteDraft({ + required String id, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.appBskyDraftCreateDraft, + ns.appBskyDraftDeleteDraft, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'draft': draft.toJson()}, - to: const DraftCreateDraftOutputConverter().fromJson, + body: {...?$unknown, 'id': id}, ); /// Gets views of user drafts. Requires authentication. @@ -92,28 +92,28 @@ base class DraftService { DraftService(this.ctx); - /// Deletes a draft by ID. Requires authentication. - Future> deleteDraft({ - required String id, + /// Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication. + Future> createDraft({ + required Draft draft, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyDraftDeleteDraft( - id: id, + }) async => await appBskyDraftCreateDraft( + draft: draft, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication. - Future> createDraft({ - required Draft draft, + /// Deletes a draft by ID. Requires authentication. + Future> deleteDraft({ + required String id, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyDraftCreateDraft( - draft: draft, + }) async => await appBskyDraftDeleteDraft( + id: id, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/feed_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/feed_service.dart index f32bace57..5bb611211 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/feed_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/feed_service.dart @@ -62,23 +62,24 @@ import 'package:atproto/com_atproto_services.dart' // LexGenerator // ************************************************************************** -/// Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. -Future> appBskyFeedGetPosts({ - required List uris, +/// Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). +Future> +appBskyFeedDescribeFeedGenerator({ required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetPosts, + ns.appBskyFeedDescribeFeedGenerator, service: $service, headers: $headers, - parameters: {...?$unknown, 'uris': uris.map((e) => e.toString()).toList()}, - to: const FeedGetPostsOutputConverter().fromJson, + parameters: {...?$unknown}, + to: const FeedDescribeFeedGeneratorOutputConverter().fromJson, ); -/// Get a list of suggested feeds (feed generators) for the requesting account. -Future> appBskyFeedGetSuggestedFeeds({ +/// Get a list of feeds (feed generator records) created by the actor (in the actor's repo). +Future> appBskyFeedGetActorFeeds({ + required String actor, int? limit, String? cursor, required ServiceContext $ctx, @@ -86,20 +87,21 @@ Future> appBskyFeedGetSuggestedFeeds({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetSuggestedFeeds, + ns.appBskyFeedGetActorFeeds, service: $service, headers: $headers, parameters: { ...?$unknown, + 'actor': actor, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const FeedGetSuggestedFeedsOutputConverter().fromJson, + to: const FeedGetActorFeedsOutputConverter().fromJson, ); -/// Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. -Future> appBskyFeedGetTimeline({ - String? algorithm, +/// Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. +Future> appBskyFeedGetActorLikes({ + required String actor, int? limit, String? cursor, required ServiceContext $ctx, @@ -107,31 +109,64 @@ Future> appBskyFeedGetTimeline({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetTimeline, + ns.appBskyFeedGetActorLikes, service: $service, headers: $headers, parameters: { ...?$unknown, - if (algorithm != null) 'algorithm': algorithm, + 'actor': actor, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const FeedGetTimelineOutputConverter().fromJson, + to: const FeedGetActorLikesOutputConverter().fromJson, ); -/// Get information about a list of feed generators. -Future> appBskyFeedGetFeedGenerators({ - required List feeds, +/// Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. +Future> appBskyFeedGetAuthorFeed({ + required String actor, + int? limit, + String? cursor, + FeedGetAuthorFeedFilter? filter, + bool? includePins, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetFeedGenerators, + ns.appBskyFeedGetAuthorFeed, service: $service, headers: $headers, - parameters: {...?$unknown, 'feeds': feeds.map((e) => e.toString()).toList()}, - to: const FeedGetFeedGeneratorsOutputConverter().fromJson, + parameters: { + ...?$unknown, + 'actor': actor, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + if (filter != null) 'filter': filter.toJson(), + if (includePins != null) 'includePins': includePins, + }, + to: const FeedGetAuthorFeedOutputConverter().fromJson, +); + +/// Get a hydrated feed from an actor's selected feed generator. Implemented by App View. +Future> appBskyFeedGetFeed({ + required AtUri feed, + int? limit, + String? cursor, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyFeedGetFeed, + service: $service, + headers: $headers, + parameters: { + ...?$unknown, + 'feed': feed.toString(), + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const FeedGetFeedOutputConverter().fromJson, ); /// Get information about a feed generator. Implemented by AppView. @@ -149,9 +184,24 @@ Future> appBskyFeedGetFeedGenerator({ to: const FeedGetFeedGeneratorOutputConverter().fromJson, ); -/// Get a list of feeds (feed generator records) created by the actor (in the actor's repo). -Future> appBskyFeedGetActorFeeds({ - required String actor, +/// Get information about a list of feed generators. +Future> appBskyFeedGetFeedGenerators({ + required List feeds, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyFeedGetFeedGenerators, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'feeds': feeds.map((e) => e.toString()).toList()}, + to: const FeedGetFeedGeneratorsOutputConverter().fromJson, +); + +/// Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. +Future> appBskyFeedGetFeedSkeleton({ + required AtUri feed, int? limit, String? cursor, required ServiceContext $ctx, @@ -159,16 +209,16 @@ Future> appBskyFeedGetActorFeeds({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetActorFeeds, + ns.appBskyFeedGetFeedSkeleton, service: $service, headers: $headers, parameters: { ...?$unknown, - 'actor': actor, + 'feed': feed.toString(), if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const FeedGetActorFeedsOutputConverter().fromJson, + to: const FeedGetFeedSkeletonOutputConverter().fromJson, ); /// Get like records which reference a subject (by AT-URI and CID). @@ -195,10 +245,9 @@ Future> appBskyFeedGetLikes({ to: const FeedGetLikesOutputConverter().fromJson, ); -/// Get a list of quotes for a given post. -Future> appBskyFeedGetQuotes({ - required AtUri uri, - String? cid, +/// Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth. +Future> appBskyFeedGetListFeed({ + required AtUri list, int? limit, String? cursor, required ServiceContext $ctx, @@ -206,70 +255,59 @@ Future> appBskyFeedGetQuotes({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetQuotes, + ns.appBskyFeedGetListFeed, service: $service, headers: $headers, parameters: { ...?$unknown, - 'uri': uri.toString(), - if (cid != null) 'cid': cid, + 'list': list.toString(), if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const FeedGetQuotesOutputConverter().fromJson, + to: const FeedGetListFeedOutputConverter().fromJson, ); -/// Get a list of reposts for a given post. -Future> appBskyFeedGetRepostedBy({ +/// Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. +Future> appBskyFeedGetPostThread({ required AtUri uri, - String? cid, - int? limit, - String? cursor, + int? depth, + int? parentHeight, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetRepostedBy, + ns.appBskyFeedGetPostThread, service: $service, headers: $headers, parameters: { ...?$unknown, 'uri': uri.toString(), - if (cid != null) 'cid': cid, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, + if (depth != null) 'depth': depth, + if (parentHeight != null) 'parentHeight': parentHeight, }, - to: const FeedGetRepostedByOutputConverter().fromJson, + to: const FeedGetPostThreadOutputConverter().fromJson, ); -/// Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). -Future> -appBskyFeedDescribeFeedGenerator({ +/// Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. +Future> appBskyFeedGetPosts({ + required List uris, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedDescribeFeedGenerator, + ns.appBskyFeedGetPosts, service: $service, headers: $headers, - parameters: {...?$unknown}, - to: const FeedDescribeFeedGeneratorOutputConverter().fromJson, + parameters: {...?$unknown, 'uris': uris.map((e) => e.toString()).toList()}, + to: const FeedGetPostsOutputConverter().fromJson, ); -/// Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations. -Future> appBskyFeedSearchPosts({ - required String q, - FeedSearchPostsSort? sort, - String? since, - String? until, - String? mentions, - String? author, - String? lang, - String? domain, - String? url, - List? tag, +/// Get a list of quotes for a given post. +Future> appBskyFeedGetQuotes({ + required AtUri uri, + String? cid, int? limit, String? cursor, required ServiceContext $ctx, @@ -277,78 +315,66 @@ Future> appBskyFeedSearchPosts({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedSearchPosts, + ns.appBskyFeedGetQuotes, service: $service, headers: $headers, parameters: { ...?$unknown, - 'q': q, - if (sort != null) 'sort': sort.toJson(), - if (since != null) 'since': since, - if (until != null) 'until': until, - if (mentions != null) 'mentions': mentions, - if (author != null) 'author': author, - if (lang != null) 'lang': lang, - if (domain != null) 'domain': domain, - if (url != null) 'url': url, - if (tag != null) 'tag': tag, + 'uri': uri.toString(), + if (cid != null) 'cid': cid, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const FeedSearchPostsOutputConverter().fromJson, + to: const FeedGetQuotesOutputConverter().fromJson, ); -/// Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. -Future> appBskyFeedGetAuthorFeed({ - required String actor, +/// Get a list of reposts for a given post. +Future> appBskyFeedGetRepostedBy({ + required AtUri uri, + String? cid, int? limit, String? cursor, - FeedGetAuthorFeedFilter? filter, - bool? includePins, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetAuthorFeed, + ns.appBskyFeedGetRepostedBy, service: $service, headers: $headers, parameters: { ...?$unknown, - 'actor': actor, + 'uri': uri.toString(), + if (cid != null) 'cid': cid, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, - if (filter != null) 'filter': filter.toJson(), - if (includePins != null) 'includePins': includePins, }, - to: const FeedGetAuthorFeedOutputConverter().fromJson, + to: const FeedGetRepostedByOutputConverter().fromJson, ); -/// Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. -Future> appBskyFeedGetPostThread({ - required AtUri uri, - int? depth, - int? parentHeight, +/// Get a list of suggested feeds (feed generators) for the requesting account. +Future> appBskyFeedGetSuggestedFeeds({ + int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetPostThread, + ns.appBskyFeedGetSuggestedFeeds, service: $service, headers: $headers, parameters: { ...?$unknown, - 'uri': uri.toString(), - if (depth != null) 'depth': depth, - if (parentHeight != null) 'parentHeight': parentHeight, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, }, - to: const FeedGetPostThreadOutputConverter().fromJson, + to: const FeedGetSuggestedFeedsOutputConverter().fromJson, ); -/// Get a hydrated feed from an actor's selected feed generator. Implemented by App View. -Future> appBskyFeedGetFeed({ - required AtUri feed, +/// Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. +Future> appBskyFeedGetTimeline({ + String? algorithm, int? limit, String? cursor, required ServiceContext $ctx, @@ -356,21 +382,30 @@ Future> appBskyFeedGetFeed({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetFeed, + ns.appBskyFeedGetTimeline, service: $service, headers: $headers, parameters: { ...?$unknown, - 'feed': feed.toString(), + if (algorithm != null) 'algorithm': algorithm, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const FeedGetFeedOutputConverter().fromJson, + to: const FeedGetTimelineOutputConverter().fromJson, ); -/// Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. -Future> appBskyFeedGetFeedSkeleton({ - required AtUri feed, +/// Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations. +Future> appBskyFeedSearchPosts({ + required String q, + FeedSearchPostsSort? sort, + String? since, + String? until, + String? mentions, + String? author, + String? lang, + String? domain, + String? url, + List? tag, int? limit, String? cursor, required ServiceContext $ctx, @@ -378,16 +413,25 @@ Future> appBskyFeedGetFeedSkeleton({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyFeedGetFeedSkeleton, + ns.appBskyFeedSearchPosts, service: $service, headers: $headers, parameters: { ...?$unknown, - 'feed': feed.toString(), + 'q': q, + if (sort != null) 'sort': sort.toJson(), + if (since != null) 'since': since, + if (until != null) 'until': until, + if (mentions != null) 'mentions': mentions, + if (author != null) 'author': author, + if (lang != null) 'lang': lang, + if (domain != null) 'domain': domain, + if (url != null) 'url': url, + if (tag != null) 'tag': tag, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const FeedGetFeedSkeletonOutputConverter().fromJson, + to: const FeedSearchPostsOutputConverter().fromJson, ); /// Send information about interactions with feed items back to the feed generator that served them. @@ -409,92 +453,51 @@ Future> appBskyFeedSendInteractions({ }, ); -/// Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. -Future> appBskyFeedGetActorLikes({ - required String actor, - int? limit, - String? cursor, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyFeedGetActorLikes, - service: $service, - headers: $headers, - parameters: { - ...?$unknown, - 'actor': actor, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - }, - to: const FeedGetActorLikesOutputConverter().fromJson, -); - -/// Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth. -Future> appBskyFeedGetListFeed({ - required AtUri list, - int? limit, - String? cursor, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyFeedGetListFeed, - service: $service, - headers: $headers, - parameters: { - ...?$unknown, - 'list': list.toString(), - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - }, - to: const FeedGetListFeedOutputConverter().fromJson, -); - /// `app.bsky.feed.*` base class FeedService { @protected final ServiceContext ctx; - final FeedLikeRecordAccessor _like; - final FeedThreadgateRecordAccessor _threadgate; final FeedGeneratorRecordAccessor _generator; + final FeedLikeRecordAccessor _like; final FeedPostRecordAccessor _post; - final FeedRepostRecordAccessor _repost; final FeedPostgateRecordAccessor _postgate; + final FeedRepostRecordAccessor _repost; + final FeedThreadgateRecordAccessor _threadgate; FeedService(this.ctx) - : _like = FeedLikeRecordAccessor(ctx), - _threadgate = FeedThreadgateRecordAccessor(ctx), - _generator = FeedGeneratorRecordAccessor(ctx), + : _generator = FeedGeneratorRecordAccessor(ctx), + _like = FeedLikeRecordAccessor(ctx), _post = FeedPostRecordAccessor(ctx), + _postgate = FeedPostgateRecordAccessor(ctx), _repost = FeedRepostRecordAccessor(ctx), - _postgate = FeedPostgateRecordAccessor(ctx); + _threadgate = FeedThreadgateRecordAccessor(ctx); - /// Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. - Future> getPosts({ - required List uris, + /// Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). + Future> describeFeedGenerator({ String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetPosts( - uris: uris, + }) async => await appBskyFeedDescribeFeedGenerator( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a list of suggested feeds (feed generators) for the requesting account. - Future> getSuggestedFeeds({ + /// Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. + FeedGeneratorRecordAccessor get generator => _generator; + + /// Get a list of feeds (feed generator records) created by the actor (in the actor's repo). + Future> getActorFeeds({ + required String actor, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetSuggestedFeeds( + }) async => await appBskyFeedGetActorFeeds( + actor: actor, limit: limit, cursor: cursor, $ctx: ctx, @@ -503,16 +506,56 @@ base class FeedService { $unknown: $unknown, ); - /// Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. - Future> getTimeline({ - String? algorithm, + /// Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. + Future> getActorLikes({ + required String actor, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetTimeline( - algorithm: algorithm, + }) async => await appBskyFeedGetActorLikes( + actor: actor, + limit: limit, + cursor: cursor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. + Future> getAuthorFeed({ + required String actor, + int? limit, + String? cursor, + FeedGetAuthorFeedFilter? filter, + bool? includePins, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyFeedGetAuthorFeed( + actor: actor, + limit: limit, + cursor: cursor, + filter: filter, + includePins: includePins, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get a hydrated feed from an actor's selected feed generator. Implemented by App View. + Future> getFeed({ + required AtUri feed, + int? limit, + String? cursor, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyFeedGetFeed( + feed: feed, limit: limit, cursor: cursor, $ctx: ctx, @@ -521,47 +564,44 @@ base class FeedService { $unknown: $unknown, ); - /// Get information about a list of feed generators. - Future> getFeedGenerators({ - required List feeds, + /// Get information about a feed generator. Implemented by AppView. + Future> getFeedGenerator({ + required AtUri feed, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetFeedGenerators( - feeds: feeds, + }) async => await appBskyFeedGetFeedGenerator( + feed: feed, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Record declaring a 'like' of a piece of subject content. - FeedLikeRecordAccessor get like => _like; - - /// Get information about a feed generator. Implemented by AppView. - Future> getFeedGenerator({ - required AtUri feed, + /// Get information about a list of feed generators. + Future> getFeedGenerators({ + required List feeds, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetFeedGenerator( - feed: feed, + }) async => await appBskyFeedGetFeedGenerators( + feeds: feeds, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a list of feeds (feed generator records) created by the actor (in the actor's repo). - Future> getActorFeeds({ - required String actor, + /// Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. + Future> getFeedSkeleton({ + required AtUri feed, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetActorFeeds( - actor: actor, + }) async => await appBskyFeedGetFeedSkeleton( + feed: feed, limit: limit, cursor: cursor, $ctx: ctx, @@ -590,18 +630,16 @@ base class FeedService { $unknown: $unknown, ); - /// Get a list of quotes for a given post. - Future> getQuotes({ - required AtUri uri, - String? cid, + /// Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth. + Future> getListFeed({ + required AtUri list, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetQuotes( - uri: uri, - cid: cid, + }) async => await appBskyFeedGetListFeed( + list: list, limit: limit, cursor: cursor, $ctx: ctx, @@ -610,69 +648,50 @@ base class FeedService { $unknown: $unknown, ); - /// Get a list of reposts for a given post. - Future> getRepostedBy({ + /// Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. + Future> getPostThread({ required AtUri uri, - String? cid, - int? limit, - String? cursor, + int? depth, + int? parentHeight, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetRepostedBy( + }) async => await appBskyFeedGetPostThread( uri: uri, - cid: cid, - limit: limit, - cursor: cursor, + depth: depth, + parentHeight: parentHeight, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. - FeedThreadgateRecordAccessor get threadgate => _threadgate; - - /// Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). - Future> describeFeedGenerator({ + /// Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. + Future> getPosts({ + required List uris, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedDescribeFeedGenerator( + }) async => await appBskyFeedGetPosts( + uris: uris, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations. - Future> searchPosts({ - required String q, - FeedSearchPostsSort? sort, - String? since, - String? until, - String? mentions, - String? author, - String? lang, - String? domain, - String? url, - List? tag, + /// Get a list of quotes for a given post. + Future> getQuotes({ + required AtUri uri, + String? cid, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedSearchPosts( - q: q, - sort: sort, - since: since, - until: until, - mentions: mentions, - author: author, - lang: lang, - domain: domain, - url: url, - tag: tag, + }) async => await appBskyFeedGetQuotes( + uri: uri, + cid: cid, limit: limit, cursor: cursor, $ctx: ctx, @@ -681,65 +700,52 @@ base class FeedService { $unknown: $unknown, ); - /// Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. - FeedGeneratorRecordAccessor get generator => _generator; - - /// Record containing a Bluesky post. - FeedPostRecordAccessor get post => _post; - - /// Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. - Future> getAuthorFeed({ - required String actor, + /// Get a list of reposts for a given post. + Future> getRepostedBy({ + required AtUri uri, + String? cid, int? limit, String? cursor, - FeedGetAuthorFeedFilter? filter, - bool? includePins, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetAuthorFeed( - actor: actor, + }) async => await appBskyFeedGetRepostedBy( + uri: uri, + cid: cid, limit: limit, cursor: cursor, - filter: filter, - includePins: includePins, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. - Future> getPostThread({ - required AtUri uri, - int? depth, - int? parentHeight, + /// Get a list of suggested feeds (feed generators) for the requesting account. + Future> getSuggestedFeeds({ + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetPostThread( - uri: uri, - depth: depth, - parentHeight: parentHeight, + }) async => await appBskyFeedGetSuggestedFeeds( + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Record representing a 'repost' of an existing Bluesky post. - FeedRepostRecordAccessor get repost => _repost; - - /// Get a hydrated feed from an actor's selected feed generator. Implemented by App View. - Future> getFeed({ - required AtUri feed, + /// Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. + Future> getTimeline({ + String? algorithm, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetFeed( - feed: feed, + }) async => await appBskyFeedGetTimeline( + algorithm: algorithm, limit: limit, cursor: cursor, $ctx: ctx, @@ -748,16 +754,46 @@ base class FeedService { $unknown: $unknown, ); - /// Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. - Future> getFeedSkeleton({ - required AtUri feed, + /// Record declaring a 'like' of a piece of subject content. + FeedLikeRecordAccessor get like => _like; + + /// Record containing a Bluesky post. + FeedPostRecordAccessor get post => _post; + + /// Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. + FeedPostgateRecordAccessor get postgate => _postgate; + + /// Record representing a 'repost' of an existing Bluesky post. + FeedRepostRecordAccessor get repost => _repost; + + /// Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations. + Future> searchPosts({ + required String q, + FeedSearchPostsSort? sort, + String? since, + String? until, + String? mentions, + String? author, + String? lang, + String? domain, + String? url, + List? tag, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyFeedGetFeedSkeleton( - feed: feed, + }) async => await appBskyFeedSearchPosts( + q: q, + sort: sort, + since: since, + until: until, + mentions: mentions, + author: author, + lang: lang, + domain: domain, + url: url, + tag: tag, limit: limit, cursor: cursor, $ctx: ctx, @@ -782,50 +818,14 @@ base class FeedService { $unknown: $unknown, ); - /// Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. - Future> getActorLikes({ - required String actor, - int? limit, - String? cursor, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await appBskyFeedGetActorLikes( - actor: actor, - limit: limit, - cursor: cursor, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth. - Future> getListFeed({ - required AtUri list, - int? limit, - String? cursor, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await appBskyFeedGetListFeed( - list: list, - limit: limit, - cursor: cursor, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. - FeedPostgateRecordAccessor get postgate => _postgate; + /// Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. + FeedThreadgateRecordAccessor get threadgate => _threadgate; } -final class FeedLikeRecordAccessor { +final class FeedGeneratorRecordAccessor { final ServiceContext ctx; - const FeedLikeRecordAccessor(this.ctx); + const FeedGeneratorRecordAccessor(this.ctx); Future> get({ required String repo, @@ -835,7 +835,7 @@ final class FeedLikeRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyFeedLike, + collection: ids.appBskyFeedGenerator, rkey: rkey, cid: cid, $ctx: ctx, @@ -852,7 +852,7 @@ final class FeedLikeRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyFeedLike, + collection: ids.appBskyFeedGenerator, limit: limit, cursor: cursor, reverse: reverse, @@ -862,9 +862,15 @@ final class FeedLikeRecordAccessor { ); Future> create({ - required RepoStrongRef subject, + required String did, + required String displayName, + String? description, + List? descriptionFacets, + Blob? avatar, + bool? acceptsInteractions, + UFeedGeneratorLabels? labels, + FeedGeneratorContentMode? contentMode, DateTime? createdAt, - RepoStrongRef? via, String? rkey, bool? validate, String? swapCommit, @@ -872,14 +878,22 @@ final class FeedLikeRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyFeedLike, + collection: ids.appBskyFeedGenerator, rkey: rkey, validate: validate, record: { ...?$unknown, - 'subject': subject.toJson(), + 'did': did, + 'displayName': displayName, + if (description != null) 'description': description, + if (descriptionFacets != null) + 'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(), + if (avatar != null) 'avatar': avatar, + if (acceptsInteractions != null) + 'acceptsInteractions': acceptsInteractions, + if (labels != null) 'labels': labels.toJson(), + if (contentMode != null) 'contentMode': contentMode.toJson(), 'createdAt': iso8601(createdAt), - if (via != null) 'via': via.toJson(), }, swapCommit: swapCommit, $ctx: ctx, @@ -887,9 +901,15 @@ final class FeedLikeRecordAccessor { ); Future> put({ - required RepoStrongRef subject, + required String did, + required String displayName, + String? description, + List? descriptionFacets, + Blob? avatar, + bool? acceptsInteractions, + UFeedGeneratorLabels? labels, + FeedGeneratorContentMode? contentMode, DateTime? createdAt, - RepoStrongRef? via, required String rkey, bool? validate, String? swapRecord, @@ -898,14 +918,22 @@ final class FeedLikeRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyFeedLike, + collection: ids.appBskyFeedGenerator, rkey: rkey, validate: validate, record: { ...?$unknown, - 'subject': subject.toJson(), + 'did': did, + 'displayName': displayName, + if (description != null) 'description': description, + if (descriptionFacets != null) + 'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(), + if (avatar != null) 'avatar': avatar, + if (acceptsInteractions != null) + 'acceptsInteractions': acceptsInteractions, + if (labels != null) 'labels': labels.toJson(), + if (contentMode != null) 'contentMode': contentMode.toJson(), 'createdAt': iso8601(createdAt), - if (via != null) 'via': via.toJson(), }, swapRecord: swapRecord, swapCommit: swapCommit, @@ -921,7 +949,7 @@ final class FeedLikeRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyFeedLike, + collection: ids.appBskyFeedGenerator, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, @@ -930,10 +958,10 @@ final class FeedLikeRecordAccessor { ); } -final class FeedThreadgateRecordAccessor { +final class FeedLikeRecordAccessor { final ServiceContext ctx; - const FeedThreadgateRecordAccessor(this.ctx); + const FeedLikeRecordAccessor(this.ctx); Future> get({ required String repo, @@ -943,7 +971,7 @@ final class FeedThreadgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyFeedThreadgate, + collection: ids.appBskyFeedLike, rkey: rkey, cid: cid, $ctx: ctx, @@ -960,7 +988,7 @@ final class FeedThreadgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyFeedThreadgate, + collection: ids.appBskyFeedLike, limit: limit, cursor: cursor, reverse: reverse, @@ -970,10 +998,9 @@ final class FeedThreadgateRecordAccessor { ); Future> create({ - required AtUri post, - List? allow, + required RepoStrongRef subject, DateTime? createdAt, - List? hiddenReplies, + RepoStrongRef? via, String? rkey, bool? validate, String? swapCommit, @@ -981,16 +1008,14 @@ final class FeedThreadgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyFeedThreadgate, + collection: ids.appBskyFeedLike, rkey: rkey, validate: validate, record: { ...?$unknown, - 'post': post.toString(), - if (allow != null) 'allow': allow.map((e) => e.toJson()).toList(), + 'subject': subject.toJson(), 'createdAt': iso8601(createdAt), - if (hiddenReplies != null) - 'hiddenReplies': hiddenReplies.map((e) => e.toString()).toList(), + if (via != null) 'via': via.toJson(), }, swapCommit: swapCommit, $ctx: ctx, @@ -998,10 +1023,9 @@ final class FeedThreadgateRecordAccessor { ); Future> put({ - required AtUri post, - List? allow, + required RepoStrongRef subject, DateTime? createdAt, - List? hiddenReplies, + RepoStrongRef? via, required String rkey, bool? validate, String? swapRecord, @@ -1010,16 +1034,14 @@ final class FeedThreadgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyFeedThreadgate, + collection: ids.appBskyFeedLike, rkey: rkey, validate: validate, record: { ...?$unknown, - 'post': post.toString(), - if (allow != null) 'allow': allow.map((e) => e.toJson()).toList(), + 'subject': subject.toJson(), 'createdAt': iso8601(createdAt), - if (hiddenReplies != null) - 'hiddenReplies': hiddenReplies.map((e) => e.toString()).toList(), + if (via != null) 'via': via.toJson(), }, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1035,7 +1057,7 @@ final class FeedThreadgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyFeedThreadgate, + collection: ids.appBskyFeedLike, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1044,10 +1066,10 @@ final class FeedThreadgateRecordAccessor { ); } -final class FeedGeneratorRecordAccessor { +final class FeedPostRecordAccessor { final ServiceContext ctx; - const FeedGeneratorRecordAccessor(this.ctx); + const FeedPostRecordAccessor(this.ctx); Future> get({ required String repo, @@ -1057,7 +1079,7 @@ final class FeedGeneratorRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyFeedGenerator, + collection: ids.appBskyFeedPost, rkey: rkey, cid: cid, $ctx: ctx, @@ -1074,7 +1096,7 @@ final class FeedGeneratorRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyFeedGenerator, + collection: ids.appBskyFeedPost, limit: limit, cursor: cursor, reverse: reverse, @@ -1084,14 +1106,13 @@ final class FeedGeneratorRecordAccessor { ); Future> create({ - required String did, - required String displayName, - String? description, - List? descriptionFacets, - Blob? avatar, - bool? acceptsInteractions, - UFeedGeneratorLabels? labels, - FeedGeneratorContentMode? contentMode, + required String text, + List? facets, + ReplyRef? reply, + UFeedPostEmbed? embed, + List? langs, + UFeedPostLabels? labels, + List? tags, DateTime? createdAt, String? rkey, bool? validate, @@ -1100,21 +1121,18 @@ final class FeedGeneratorRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyFeedGenerator, + collection: ids.appBskyFeedPost, rkey: rkey, validate: validate, record: { ...?$unknown, - 'did': did, - 'displayName': displayName, - if (description != null) 'description': description, - if (descriptionFacets != null) - 'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(), - if (avatar != null) 'avatar': avatar, - if (acceptsInteractions != null) - 'acceptsInteractions': acceptsInteractions, + 'text': text, + if (facets != null) 'facets': facets.map((e) => e.toJson()).toList(), + if (reply != null) 'reply': reply.toJson(), + if (embed != null) 'embed': embed.toJson(), + if (langs != null) 'langs': langs, if (labels != null) 'labels': labels.toJson(), - if (contentMode != null) 'contentMode': contentMode.toJson(), + if (tags != null) 'tags': tags, 'createdAt': iso8601(createdAt), }, swapCommit: swapCommit, @@ -1123,14 +1141,13 @@ final class FeedGeneratorRecordAccessor { ); Future> put({ - required String did, - required String displayName, - String? description, - List? descriptionFacets, - Blob? avatar, - bool? acceptsInteractions, - UFeedGeneratorLabels? labels, - FeedGeneratorContentMode? contentMode, + required String text, + List? facets, + ReplyRef? reply, + UFeedPostEmbed? embed, + List? langs, + UFeedPostLabels? labels, + List? tags, DateTime? createdAt, required String rkey, bool? validate, @@ -1140,21 +1157,18 @@ final class FeedGeneratorRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyFeedGenerator, + collection: ids.appBskyFeedPost, rkey: rkey, validate: validate, record: { ...?$unknown, - 'did': did, - 'displayName': displayName, - if (description != null) 'description': description, - if (descriptionFacets != null) - 'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(), - if (avatar != null) 'avatar': avatar, - if (acceptsInteractions != null) - 'acceptsInteractions': acceptsInteractions, + 'text': text, + if (facets != null) 'facets': facets.map((e) => e.toJson()).toList(), + if (reply != null) 'reply': reply.toJson(), + if (embed != null) 'embed': embed.toJson(), + if (langs != null) 'langs': langs, if (labels != null) 'labels': labels.toJson(), - if (contentMode != null) 'contentMode': contentMode.toJson(), + if (tags != null) 'tags': tags, 'createdAt': iso8601(createdAt), }, swapRecord: swapRecord, @@ -1171,7 +1185,7 @@ final class FeedGeneratorRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyFeedGenerator, + collection: ids.appBskyFeedPost, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1180,10 +1194,10 @@ final class FeedGeneratorRecordAccessor { ); } -final class FeedPostRecordAccessor { +final class FeedPostgateRecordAccessor { final ServiceContext ctx; - const FeedPostRecordAccessor(this.ctx); + const FeedPostgateRecordAccessor(this.ctx); Future> get({ required String repo, @@ -1193,7 +1207,7 @@ final class FeedPostRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyFeedPost, + collection: ids.appBskyFeedPostgate, rkey: rkey, cid: cid, $ctx: ctx, @@ -1210,7 +1224,7 @@ final class FeedPostRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyFeedPost, + collection: ids.appBskyFeedPostgate, limit: limit, cursor: cursor, reverse: reverse, @@ -1220,14 +1234,10 @@ final class FeedPostRecordAccessor { ); Future> create({ - required String text, - List? facets, - ReplyRef? reply, - UFeedPostEmbed? embed, - List? langs, - UFeedPostLabels? labels, - List? tags, DateTime? createdAt, + required AtUri post, + List? detachedEmbeddingUris, + List? embeddingRules, String? rkey, bool? validate, String? swapCommit, @@ -1235,19 +1245,19 @@ final class FeedPostRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyFeedPost, + collection: ids.appBskyFeedPostgate, rkey: rkey, validate: validate, record: { ...?$unknown, - 'text': text, - if (facets != null) 'facets': facets.map((e) => e.toJson()).toList(), - if (reply != null) 'reply': reply.toJson(), - if (embed != null) 'embed': embed.toJson(), - if (langs != null) 'langs': langs, - if (labels != null) 'labels': labels.toJson(), - if (tags != null) 'tags': tags, 'createdAt': iso8601(createdAt), + 'post': post.toString(), + if (detachedEmbeddingUris != null) + 'detachedEmbeddingUris': detachedEmbeddingUris + .map((e) => e.toString()) + .toList(), + if (embeddingRules != null) + 'embeddingRules': embeddingRules.map((e) => e.toJson()).toList(), }, swapCommit: swapCommit, $ctx: ctx, @@ -1255,14 +1265,10 @@ final class FeedPostRecordAccessor { ); Future> put({ - required String text, - List? facets, - ReplyRef? reply, - UFeedPostEmbed? embed, - List? langs, - UFeedPostLabels? labels, - List? tags, DateTime? createdAt, + required AtUri post, + List? detachedEmbeddingUris, + List? embeddingRules, required String rkey, bool? validate, String? swapRecord, @@ -1271,19 +1277,19 @@ final class FeedPostRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyFeedPost, + collection: ids.appBskyFeedPostgate, rkey: rkey, validate: validate, record: { ...?$unknown, - 'text': text, - if (facets != null) 'facets': facets.map((e) => e.toJson()).toList(), - if (reply != null) 'reply': reply.toJson(), - if (embed != null) 'embed': embed.toJson(), - if (langs != null) 'langs': langs, - if (labels != null) 'labels': labels.toJson(), - if (tags != null) 'tags': tags, 'createdAt': iso8601(createdAt), + 'post': post.toString(), + if (detachedEmbeddingUris != null) + 'detachedEmbeddingUris': detachedEmbeddingUris + .map((e) => e.toString()) + .toList(), + if (embeddingRules != null) + 'embeddingRules': embeddingRules.map((e) => e.toJson()).toList(), }, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1299,7 +1305,7 @@ final class FeedPostRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyFeedPost, + collection: ids.appBskyFeedPostgate, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1416,10 +1422,10 @@ final class FeedRepostRecordAccessor { ); } -final class FeedPostgateRecordAccessor { +final class FeedThreadgateRecordAccessor { final ServiceContext ctx; - const FeedPostgateRecordAccessor(this.ctx); + const FeedThreadgateRecordAccessor(this.ctx); Future> get({ required String repo, @@ -1429,7 +1435,7 @@ final class FeedPostgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyFeedPostgate, + collection: ids.appBskyFeedThreadgate, rkey: rkey, cid: cid, $ctx: ctx, @@ -1446,7 +1452,7 @@ final class FeedPostgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyFeedPostgate, + collection: ids.appBskyFeedThreadgate, limit: limit, cursor: cursor, reverse: reverse, @@ -1456,10 +1462,10 @@ final class FeedPostgateRecordAccessor { ); Future> create({ - DateTime? createdAt, required AtUri post, - List? detachedEmbeddingUris, - List? embeddingRules, + List? allow, + DateTime? createdAt, + List? hiddenReplies, String? rkey, bool? validate, String? swapCommit, @@ -1467,19 +1473,16 @@ final class FeedPostgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyFeedPostgate, + collection: ids.appBskyFeedThreadgate, rkey: rkey, validate: validate, record: { ...?$unknown, - 'createdAt': iso8601(createdAt), 'post': post.toString(), - if (detachedEmbeddingUris != null) - 'detachedEmbeddingUris': detachedEmbeddingUris - .map((e) => e.toString()) - .toList(), - if (embeddingRules != null) - 'embeddingRules': embeddingRules.map((e) => e.toJson()).toList(), + if (allow != null) 'allow': allow.map((e) => e.toJson()).toList(), + 'createdAt': iso8601(createdAt), + if (hiddenReplies != null) + 'hiddenReplies': hiddenReplies.map((e) => e.toString()).toList(), }, swapCommit: swapCommit, $ctx: ctx, @@ -1487,10 +1490,10 @@ final class FeedPostgateRecordAccessor { ); Future> put({ - DateTime? createdAt, required AtUri post, - List? detachedEmbeddingUris, - List? embeddingRules, + List? allow, + DateTime? createdAt, + List? hiddenReplies, required String rkey, bool? validate, String? swapRecord, @@ -1499,19 +1502,16 @@ final class FeedPostgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyFeedPostgate, + collection: ids.appBskyFeedThreadgate, rkey: rkey, validate: validate, record: { ...?$unknown, - 'createdAt': iso8601(createdAt), 'post': post.toString(), - if (detachedEmbeddingUris != null) - 'detachedEmbeddingUris': detachedEmbeddingUris - .map((e) => e.toString()) - .toList(), - if (embeddingRules != null) - 'embeddingRules': embeddingRules.map((e) => e.toJson()).toList(), + if (allow != null) 'allow': allow.map((e) => e.toJson()).toList(), + 'createdAt': iso8601(createdAt), + if (hiddenReplies != null) + 'hiddenReplies': hiddenReplies.map((e) => e.toString()).toList(), }, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1527,7 +1527,7 @@ final class FeedPostgateRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyFeedPostgate, + collection: ids.appBskyFeedThreadgate, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/graph_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/graph_service.dart index d8b91e1d1..9bda1cd9f 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/graph_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/graph_service.dart @@ -57,66 +57,9 @@ import 'package:atproto/com_atproto_services.dart' // LexGenerator // ************************************************************************** -/// Unmutes the specified thread. Requires auth. -Future> appBskyGraphUnmuteThread({ - required AtUri root, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.appBskyGraphUnmuteThread, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'root': root.toString()}, -); - -/// Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. -Future> appBskyGraphGetMutes({ - int? limit, - String? cursor, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyGraphGetMutes, - service: $service, - headers: $headers, - parameters: { - ...?$unknown, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - }, - to: const GraphGetMutesOutputConverter().fromJson, -); - -/// Find starter packs matching search criteria. Does not require auth. -Future> -appBskyGraphSearchStarterPacks({ - required String q, - int? limit, - String? cursor, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyGraphSearchStarterPacks, - service: $service, - headers: $headers, - parameters: { - ...?$unknown, - 'q': q, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - }, - to: const GraphSearchStarterPacksOutputConverter().fromJson, -); - -/// Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. -Future> -appBskyGraphGetStarterPacksWithMembership({ +/// Get a list of starter packs created by the actor. +Future> +appBskyGraphGetActorStarterPacks({ required String actor, int? limit, String? cursor, @@ -125,7 +68,7 @@ appBskyGraphGetStarterPacksWithMembership({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyGraphGetStarterPacksWithMembership, + ns.appBskyGraphGetActorStarterPacks, service: $service, headers: $headers, parameters: { @@ -134,21 +77,7 @@ appBskyGraphGetStarterPacksWithMembership({ if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const GraphGetStarterPacksWithMembershipOutputConverter().fromJson, -); - -/// Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. -Future> appBskyGraphMuteThread({ - required AtUri root, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.appBskyGraphMuteThread, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'root': root.toString()}, + to: const GraphGetActorStarterPacksOutputConverter().fromJson, ); /// Enumerates which accounts the requesting account is currently blocking. Requires auth. @@ -171,39 +100,26 @@ Future> appBskyGraphGetBlocks({ to: const GraphGetBlocksOutputConverter().fromJson, ); -/// Enumerates public relationships between one account, and a list of other accounts. Does not require auth. -Future> appBskyGraphGetRelationships({ +/// Enumerates accounts which follow a specified account (actor). +Future> appBskyGraphGetFollowers({ required String actor, - List? others, + int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyGraphGetRelationships, + ns.appBskyGraphGetFollowers, service: $service, headers: $headers, parameters: { ...?$unknown, 'actor': actor, - if (others != null) 'others': others, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, }, - to: const GraphGetRelationshipsOutputConverter().fromJson, -); - -/// Get views for a list of starter packs. -Future> appBskyGraphGetStarterPacks({ - required List uris, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyGraphGetStarterPacks, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'uris': uris.map((e) => e.toString()).toList()}, - to: const GraphGetStarterPacksOutputConverter().fromJson, + to: const GraphGetFollowersOutputConverter().fromJson, ); /// Enumerates accounts which a specified account (actor) follows. @@ -251,20 +167,6 @@ appBskyGraphGetKnownFollowers({ to: const GraphGetKnownFollowersOutputConverter().fromJson, ); -/// Unmutes the specified list of accounts. Requires auth. -Future> appBskyGraphUnmuteActorList({ - required AtUri list, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.appBskyGraphUnmuteActorList, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'list': list.toString()}, -); - /// Gets a 'view' (with additional context) of a specified list. Future> appBskyGraphGetList({ required AtUri list, @@ -287,39 +189,28 @@ Future> appBskyGraphGetList({ to: const GraphGetListOutputConverter().fromJson, ); -/// Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. -Future> appBskyGraphMuteActorList({ - required AtUri list, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.appBskyGraphMuteActorList, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'list': list.toString()}, -); - -/// Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. -Future> -appBskyGraphGetSuggestedFollowsByActor({ - required String actor, +/// Get mod lists that the requesting account (actor) is blocking. Requires auth. +Future> appBskyGraphGetListBlocks({ + int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyGraphGetSuggestedFollowsByActor, + ns.appBskyGraphGetListBlocks, service: $service, headers: $headers, - parameters: {...?$unknown, 'actor': actor}, - to: const GraphGetSuggestedFollowsByActorOutputConverter().fromJson, + parameters: { + ...?$unknown, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const GraphGetListBlocksOutputConverter().fromJson, ); -/// Enumerates accounts which follow a specified account (actor). -Future> appBskyGraphGetFollowers({ - required String actor, +/// Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. +Future> appBskyGraphGetListMutes({ int? limit, String? cursor, required ServiceContext $ctx, @@ -327,30 +218,29 @@ Future> appBskyGraphGetFollowers({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyGraphGetFollowers, + ns.appBskyGraphGetListMutes, service: $service, headers: $headers, parameters: { ...?$unknown, - 'actor': actor, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const GraphGetFollowersOutputConverter().fromJson, + to: const GraphGetListMutesOutputConverter().fromJson, ); -/// Get a list of starter packs created by the actor. -Future> -appBskyGraphGetActorStarterPacks({ +/// Enumerates the lists created by a specified account (actor). +Future> appBskyGraphGetLists({ required String actor, int? limit, String? cursor, + List? purposes, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyGraphGetActorStarterPacks, + ns.appBskyGraphGetLists, service: $service, headers: $headers, parameters: { @@ -358,37 +248,9 @@ appBskyGraphGetActorStarterPacks({ 'actor': actor, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, + if (purposes != null) 'purposes': purposes.map((e) => e.toJson()).toList(), }, - to: const GraphGetActorStarterPacksOutputConverter().fromJson, -); - -/// Gets a view of a starter pack. -Future> appBskyGraphGetStarterPack({ - required AtUri starterPack, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyGraphGetStarterPack, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'starterPack': starterPack.toString()}, - to: const GraphGetStarterPackOutputConverter().fromJson, -); - -/// Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. -Future> appBskyGraphMuteActor({ - required String actor, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.appBskyGraphMuteActor, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'actor': actor}, + to: const GraphGetListsOutputConverter().fromJson, ); /// Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth. @@ -416,8 +278,8 @@ appBskyGraphGetListsWithMembership({ to: const GraphGetListsWithMembershipOutputConverter().fromJson, ); -/// Get mod lists that the requesting account (actor) is blocking. Requires auth. -Future> appBskyGraphGetListBlocks({ +/// Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. +Future> appBskyGraphGetMutes({ int? limit, String? cursor, required ServiceContext $ctx, @@ -425,7 +287,7 @@ Future> appBskyGraphGetListBlocks({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyGraphGetListBlocks, + ns.appBskyGraphGetMutes, service: $service, headers: $headers, parameters: { @@ -433,111 +295,259 @@ Future> appBskyGraphGetListBlocks({ if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, }, - to: const GraphGetListBlocksOutputConverter().fromJson, + to: const GraphGetMutesOutputConverter().fromJson, ); -/// Enumerates the lists created by a specified account (actor). -Future> appBskyGraphGetLists({ +/// Enumerates public relationships between one account, and a list of other accounts. Does not require auth. +Future> appBskyGraphGetRelationships({ required String actor, - int? limit, - String? cursor, - List? purposes, + List? others, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyGraphGetLists, + ns.appBskyGraphGetRelationships, service: $service, headers: $headers, parameters: { ...?$unknown, 'actor': actor, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - if (purposes != null) 'purposes': purposes.map((e) => e.toJson()).toList(), + if (others != null) 'others': others, }, - to: const GraphGetListsOutputConverter().fromJson, + to: const GraphGetRelationshipsOutputConverter().fromJson, ); -/// Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. -Future> appBskyGraphGetListMutes({ - int? limit, - String? cursor, +/// Gets a view of a starter pack. +Future> appBskyGraphGetStarterPack({ + required AtUri starterPack, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyGraphGetListMutes, + ns.appBskyGraphGetStarterPack, service: $service, headers: $headers, - parameters: { - ...?$unknown, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - }, - to: const GraphGetListMutesOutputConverter().fromJson, + parameters: {...?$unknown, 'starterPack': starterPack.toString()}, + to: const GraphGetStarterPackOutputConverter().fromJson, ); -/// Unmutes the specified account. Requires auth. -Future> appBskyGraphUnmuteActor({ - required String actor, +/// Get views for a list of starter packs. +Future> appBskyGraphGetStarterPacks({ + required List uris, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.appBskyGraphUnmuteActor, - service: $service, +}) async => await $ctx.get( + ns.appBskyGraphGetStarterPacks, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'uris': uris.map((e) => e.toString()).toList()}, + to: const GraphGetStarterPacksOutputConverter().fromJson, +); + +/// Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. +Future> +appBskyGraphGetStarterPacksWithMembership({ + required String actor, + int? limit, + String? cursor, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyGraphGetStarterPacksWithMembership, + service: $service, + headers: $headers, + parameters: { + ...?$unknown, + 'actor': actor, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const GraphGetStarterPacksWithMembershipOutputConverter().fromJson, +); + +/// Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. +Future> +appBskyGraphGetSuggestedFollowsByActor({ + required String actor, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyGraphGetSuggestedFollowsByActor, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'actor': actor}, + to: const GraphGetSuggestedFollowsByActorOutputConverter().fromJson, +); + +/// Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. +Future> appBskyGraphMuteActor({ + required String actor, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.appBskyGraphMuteActor, + service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: {...?$unknown, 'actor': actor}, ); +/// Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. +Future> appBskyGraphMuteActorList({ + required AtUri list, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.appBskyGraphMuteActorList, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'list': list.toString()}, +); + +/// Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. +Future> appBskyGraphMuteThread({ + required AtUri root, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.appBskyGraphMuteThread, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'root': root.toString()}, +); + +/// Find starter packs matching search criteria. Does not require auth. +Future> +appBskyGraphSearchStarterPacks({ + required String q, + int? limit, + String? cursor, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyGraphSearchStarterPacks, + service: $service, + headers: $headers, + parameters: { + ...?$unknown, + 'q': q, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const GraphSearchStarterPacksOutputConverter().fromJson, +); + +/// Unmutes the specified account. Requires auth. +Future> appBskyGraphUnmuteActor({ + required String actor, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.appBskyGraphUnmuteActor, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'actor': actor}, +); + +/// Unmutes the specified list of accounts. Requires auth. +Future> appBskyGraphUnmuteActorList({ + required AtUri list, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.appBskyGraphUnmuteActorList, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'list': list.toString()}, +); + +/// Unmutes the specified thread. Requires auth. +Future> appBskyGraphUnmuteThread({ + required AtUri root, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.appBskyGraphUnmuteThread, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'root': root.toString()}, +); + /// `app.bsky.graph.*` base class GraphService { @protected final ServiceContext ctx; - final GraphStarterpackRecordAccessor _starterpack; + final GraphBlockRecordAccessor _block; + final GraphFollowRecordAccessor _follow; final GraphListRecordAccessor _list; final GraphListblockRecordAccessor _listblock; - final GraphFollowRecordAccessor _follow; - final GraphVerificationRecordAccessor _verification; - final GraphBlockRecordAccessor _block; final GraphListitemRecordAccessor _listitem; + final GraphStarterpackRecordAccessor _starterpack; + final GraphVerificationRecordAccessor _verification; GraphService(this.ctx) - : _starterpack = GraphStarterpackRecordAccessor(ctx), + : _block = GraphBlockRecordAccessor(ctx), + _follow = GraphFollowRecordAccessor(ctx), _list = GraphListRecordAccessor(ctx), _listblock = GraphListblockRecordAccessor(ctx), - _follow = GraphFollowRecordAccessor(ctx), - _verification = GraphVerificationRecordAccessor(ctx), - _block = GraphBlockRecordAccessor(ctx), - _listitem = GraphListitemRecordAccessor(ctx); + _listitem = GraphListitemRecordAccessor(ctx), + _starterpack = GraphStarterpackRecordAccessor(ctx), + _verification = GraphVerificationRecordAccessor(ctx); - /// Unmutes the specified thread. Requires auth. - Future> unmuteThread({ - required AtUri root, + /// Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details. + GraphBlockRecordAccessor get block => _block; + + /// Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. + GraphFollowRecordAccessor get follow => _follow; + + /// Get a list of starter packs created by the actor. + Future> getActorStarterPacks({ + required String actor, + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphUnmuteThread( - root: root, + }) async => await appBskyGraphGetActorStarterPacks( + actor: actor, + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. - Future> getMutes({ + /// Enumerates which accounts the requesting account is currently blocking. Requires auth. + Future> getBlocks({ int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetMutes( + }) async => await appBskyGraphGetBlocks( limit: limit, cursor: cursor, $ctx: ctx, @@ -546,16 +556,16 @@ base class GraphService { $unknown: $unknown, ); - /// Find starter packs matching search criteria. Does not require auth. - Future> searchStarterPacks({ - required String q, + /// Enumerates accounts which follow a specified account (actor). + Future> getFollowers({ + required String actor, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphSearchStarterPacks( - q: q, + }) async => await appBskyGraphGetFollowers( + actor: actor, limit: limit, cursor: cursor, $ctx: ctx, @@ -564,47 +574,141 @@ base class GraphService { $unknown: $unknown, ); - /// Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. - Future> - getStarterPacksWithMembership({ + /// Enumerates accounts which a specified account (actor) follows. + Future> getFollows({ + required String actor, + int? limit, + String? cursor, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyGraphGetFollows( + actor: actor, + limit: limit, + cursor: cursor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Enumerates accounts which follow a specified account (actor) and are followed by the viewer. + Future> getKnownFollowers({ + required String actor, + int? limit, + String? cursor, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyGraphGetKnownFollowers( + actor: actor, + limit: limit, + cursor: cursor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Gets a 'view' (with additional context) of a specified list. + Future> getList({ + required AtUri list, + int? limit, + String? cursor, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyGraphGetList( + list: list, + limit: limit, + cursor: cursor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get mod lists that the requesting account (actor) is blocking. Requires auth. + Future> getListBlocks({ + int? limit, + String? cursor, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyGraphGetListBlocks( + limit: limit, + cursor: cursor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. + Future> getListMutes({ + int? limit, + String? cursor, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyGraphGetListMutes( + limit: limit, + cursor: cursor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Enumerates the lists created by a specified account (actor). + Future> getLists({ required String actor, int? limit, String? cursor, + List? purposes, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetStarterPacksWithMembership( + }) async => await appBskyGraphGetLists( actor: actor, limit: limit, cursor: cursor, + purposes: purposes, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. - Future> muteThread({ - required AtUri root, + /// Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth. + Future> + getListsWithMembership({ + required String actor, + int? limit, + String? cursor, + List? purposes, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphMuteThread( - root: root, + }) async => await appBskyGraphGetListsWithMembership( + actor: actor, + limit: limit, + cursor: cursor, + purposes: purposes, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Enumerates which accounts the requesting account is currently blocking. Requires auth. - Future> getBlocks({ + /// Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. + Future> getMutes({ int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetBlocks( + }) async => await appBskyGraphGetMutes( limit: limit, cursor: cursor, $ctx: ctx, @@ -613,9 +717,6 @@ base class GraphService { $unknown: $unknown, ); - /// Record defining a starter pack of actors and feeds for new users. - GraphStarterpackRecordAccessor get starterpack => _starterpack; - /// Enumerates public relationships between one account, and a list of other accounts. Does not require auth. Future> getRelationships({ required String actor, @@ -632,47 +733,44 @@ base class GraphService { $unknown: $unknown, ); - /// Get views for a list of starter packs. - Future> getStarterPacks({ - required List uris, + /// Gets a view of a starter pack. + Future> getStarterPack({ + required AtUri starterPack, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetStarterPacks( - uris: uris, + }) async => await appBskyGraphGetStarterPack( + starterPack: starterPack, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Enumerates accounts which a specified account (actor) follows. - Future> getFollows({ - required String actor, - int? limit, - String? cursor, + /// Get views for a list of starter packs. + Future> getStarterPacks({ + required List uris, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetFollows( - actor: actor, - limit: limit, - cursor: cursor, + }) async => await appBskyGraphGetStarterPacks( + uris: uris, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Enumerates accounts which follow a specified account (actor) and are followed by the viewer. - Future> getKnownFollowers({ + /// Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. + Future> + getStarterPacksWithMembership({ required String actor, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetKnownFollowers( + }) async => await appBskyGraphGetStarterPacksWithMembership( actor: actor, limit: limit, cursor: cursor, @@ -682,14 +780,15 @@ base class GraphService { $unknown: $unknown, ); - /// Unmutes the specified list of accounts. Requires auth. - Future> unmuteActorList({ - required AtUri list, + /// Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. + Future> + getSuggestedFollowsByActor({ + required String actor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphUnmuteActorList( - list: list, + }) async => await appBskyGraphGetSuggestedFollowsByActor( + actor: actor, $ctx: ctx, $service: $service, $headers: $headers, @@ -699,18 +798,20 @@ base class GraphService { /// Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. GraphListRecordAccessor get list => _list; - /// Gets a 'view' (with additional context) of a specified list. - Future> getList({ - required AtUri list, - int? limit, - String? cursor, + /// Record representing a block relationship against an entire an entire list of accounts (actors). + GraphListblockRecordAccessor get listblock => _listblock; + + /// Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. + GraphListitemRecordAccessor get listitem => _listitem; + + /// Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. + Future> muteActor({ + required String actor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetList( - list: list, - limit: limit, - cursor: cursor, + }) async => await appBskyGraphMuteActor( + actor: actor, $ctx: ctx, $service: $service, $headers: $headers, @@ -731,37 +832,30 @@ base class GraphService { $unknown: $unknown, ); - /// Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. - Future> - getSuggestedFollowsByActor({ - required String actor, + /// Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. + Future> muteThread({ + required AtUri root, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetSuggestedFollowsByActor( - actor: actor, + }) async => await appBskyGraphMuteThread( + root: root, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Record representing a block relationship against an entire an entire list of accounts (actors). - GraphListblockRecordAccessor get listblock => _listblock; - - /// Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. - GraphFollowRecordAccessor get follow => _follow; - - /// Enumerates accounts which follow a specified account (actor). - Future> getFollowers({ - required String actor, + /// Find starter packs matching search criteria. Does not require auth. + Future> searchStarterPacks({ + required String q, int? limit, String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetFollowers( - actor: actor, + }) async => await appBskyGraphSearchStarterPacks( + q: q, limit: limit, cursor: cursor, $ctx: ctx, @@ -770,153 +864,155 @@ base class GraphService { $unknown: $unknown, ); - /// Get a list of starter packs created by the actor. - Future> getActorStarterPacks({ + /// Record defining a starter pack of actors and feeds for new users. + GraphStarterpackRecordAccessor get starterpack => _starterpack; + + /// Unmutes the specified account. Requires auth. + Future> unmuteActor({ required String actor, - int? limit, - String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetActorStarterPacks( + }) async => await appBskyGraphUnmuteActor( actor: actor, - limit: limit, - cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Gets a view of a starter pack. - Future> getStarterPack({ - required AtUri starterPack, + /// Unmutes the specified list of accounts. Requires auth. + Future> unmuteActorList({ + required AtUri list, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetStarterPack( - starterPack: starterPack, + }) async => await appBskyGraphUnmuteActorList( + list: list, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. - Future> muteActor({ - required String actor, + /// Unmutes the specified thread. Requires auth. + Future> unmuteThread({ + required AtUri root, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyGraphMuteActor( - actor: actor, + }) async => await appBskyGraphUnmuteThread( + root: root, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth. - Future> - getListsWithMembership({ - required String actor, - int? limit, - String? cursor, - List? purposes, - String? $service, + /// Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted. + GraphVerificationRecordAccessor get verification => _verification; +} + +final class GraphBlockRecordAccessor { + final ServiceContext ctx; + + const GraphBlockRecordAccessor(this.ctx); + + Future> get({ + required String repo, + required String rkey, + String? cid, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetListsWithMembership( - actor: actor, - limit: limit, - cursor: cursor, - purposes: purposes, + }) async => await comAtprotoRepoGetRecord( + repo: repo, + collection: ids.appBskyGraphBlock, + rkey: rkey, + cid: cid, $ctx: ctx, - $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted. - GraphVerificationRecordAccessor get verification => _verification; - - /// Get mod lists that the requesting account (actor) is blocking. Requires auth. - Future> getListBlocks({ + Future> list({ + required String repo, int? limit, String? cursor, - String? $service, + bool? reverse, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetListBlocks( + }) async => await comAtprotoRepoListRecords( + repo: repo, + collection: ids.appBskyGraphBlock, limit: limit, cursor: cursor, + reverse: reverse, $ctx: ctx, - $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details. - GraphBlockRecordAccessor get block => _block; - - /// Enumerates the lists created by a specified account (actor). - Future> getLists({ - required String actor, - int? limit, - String? cursor, - List? purposes, - String? $service, + Future> create({ + required String subject, + DateTime? createdAt, + String? rkey, + bool? validate, + String? swapCommit, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetLists( - actor: actor, - limit: limit, - cursor: cursor, - purposes: purposes, + }) async => await comAtprotoRepoCreateRecord( + repo: ctx.repo, + collection: ids.appBskyGraphBlock, + rkey: rkey, + validate: validate, + record: {...?$unknown, 'subject': subject, 'createdAt': iso8601(createdAt)}, + swapCommit: swapCommit, $ctx: ctx, - $service: $service, $headers: $headers, - $unknown: $unknown, ); - /// Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. - GraphListitemRecordAccessor get listitem => _listitem; - - /// Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. - Future> getListMutes({ - int? limit, - String? cursor, - String? $service, + Future> put({ + required String subject, + DateTime? createdAt, + required String rkey, + bool? validate, + String? swapRecord, + String? swapCommit, Map? $headers, Map? $unknown, - }) async => await appBskyGraphGetListMutes( - limit: limit, - cursor: cursor, + }) async => await comAtprotoRepoPutRecord( + repo: ctx.repo, + collection: ids.appBskyGraphBlock, + rkey: rkey, + validate: validate, + record: {...?$unknown, 'subject': subject, 'createdAt': iso8601(createdAt)}, + swapRecord: swapRecord, + swapCommit: swapCommit, $ctx: ctx, - $service: $service, $headers: $headers, - $unknown: $unknown, ); - /// Unmutes the specified account. Requires auth. - Future> unmuteActor({ - required String actor, - String? $service, + Future> delete({ + required String rkey, + String? swapRecord, + String? swapCommit, Map? $headers, Map? $unknown, - }) async => await appBskyGraphUnmuteActor( - actor: actor, + }) async => await comAtprotoRepoDeleteRecord( + repo: ctx.repo, + collection: ids.appBskyGraphBlock, + rkey: rkey, + swapRecord: swapRecord, + swapCommit: swapCommit, $ctx: ctx, - $service: $service, $headers: $headers, - $unknown: $unknown, ); } -final class GraphStarterpackRecordAccessor { +final class GraphFollowRecordAccessor { final ServiceContext ctx; - const GraphStarterpackRecordAccessor(this.ctx); + const GraphFollowRecordAccessor(this.ctx); Future> get({ required String repo, @@ -926,7 +1022,7 @@ final class GraphStarterpackRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyGraphStarterpack, + collection: ids.appBskyGraphFollow, rkey: rkey, cid: cid, $ctx: ctx, @@ -943,7 +1039,7 @@ final class GraphStarterpackRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyGraphStarterpack, + collection: ids.appBskyGraphFollow, limit: limit, cursor: cursor, reverse: reverse, @@ -953,12 +1049,9 @@ final class GraphStarterpackRecordAccessor { ); Future> create({ - required String name, - String? description, - List? descriptionFacets, - required AtUri list, - List? feeds, + required String subject, DateTime? createdAt, + RepoStrongRef? via, String? rkey, bool? validate, String? swapCommit, @@ -966,18 +1059,14 @@ final class GraphStarterpackRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyGraphStarterpack, + collection: ids.appBskyGraphFollow, rkey: rkey, validate: validate, record: { ...?$unknown, - 'name': name, - if (description != null) 'description': description, - if (descriptionFacets != null) - 'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(), - 'list': list.toString(), - if (feeds != null) 'feeds': feeds.map((e) => e.toJson()).toList(), + 'subject': subject, 'createdAt': iso8601(createdAt), + if (via != null) 'via': via.toJson(), }, swapCommit: swapCommit, $ctx: ctx, @@ -985,12 +1074,9 @@ final class GraphStarterpackRecordAccessor { ); Future> put({ - required String name, - String? description, - List? descriptionFacets, - required AtUri list, - List? feeds, + required String subject, DateTime? createdAt, + RepoStrongRef? via, required String rkey, bool? validate, String? swapRecord, @@ -999,18 +1085,14 @@ final class GraphStarterpackRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyGraphStarterpack, + collection: ids.appBskyGraphFollow, rkey: rkey, validate: validate, record: { ...?$unknown, - 'name': name, - if (description != null) 'description': description, - if (descriptionFacets != null) - 'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(), - 'list': list.toString(), - if (feeds != null) 'feeds': feeds.map((e) => e.toJson()).toList(), + 'subject': subject, 'createdAt': iso8601(createdAt), + if (via != null) 'via': via.toJson(), }, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1026,7 +1108,7 @@ final class GraphStarterpackRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyGraphStarterpack, + collection: ids.appBskyGraphFollow, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1265,10 +1347,10 @@ final class GraphListblockRecordAccessor { ); } -final class GraphFollowRecordAccessor { +final class GraphListitemRecordAccessor { final ServiceContext ctx; - const GraphFollowRecordAccessor(this.ctx); + const GraphListitemRecordAccessor(this.ctx); Future> get({ required String repo, @@ -1278,7 +1360,7 @@ final class GraphFollowRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyGraphFollow, + collection: ids.appBskyGraphListitem, rkey: rkey, cid: cid, $ctx: ctx, @@ -1295,7 +1377,7 @@ final class GraphFollowRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyGraphFollow, + collection: ids.appBskyGraphListitem, limit: limit, cursor: cursor, reverse: reverse, @@ -1306,8 +1388,8 @@ final class GraphFollowRecordAccessor { Future> create({ required String subject, + required AtUri list, DateTime? createdAt, - RepoStrongRef? via, String? rkey, bool? validate, String? swapCommit, @@ -1315,14 +1397,14 @@ final class GraphFollowRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyGraphFollow, + collection: ids.appBskyGraphListitem, rkey: rkey, validate: validate, record: { ...?$unknown, 'subject': subject, + 'list': list.toString(), 'createdAt': iso8601(createdAt), - if (via != null) 'via': via.toJson(), }, swapCommit: swapCommit, $ctx: ctx, @@ -1331,8 +1413,8 @@ final class GraphFollowRecordAccessor { Future> put({ required String subject, + required AtUri list, DateTime? createdAt, - RepoStrongRef? via, required String rkey, bool? validate, String? swapRecord, @@ -1341,14 +1423,14 @@ final class GraphFollowRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyGraphFollow, + collection: ids.appBskyGraphListitem, rkey: rkey, validate: validate, record: { ...?$unknown, 'subject': subject, + 'list': list.toString(), 'createdAt': iso8601(createdAt), - if (via != null) 'via': via.toJson(), }, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1364,7 +1446,7 @@ final class GraphFollowRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyGraphFollow, + collection: ids.appBskyGraphListitem, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1373,10 +1455,10 @@ final class GraphFollowRecordAccessor { ); } -final class GraphVerificationRecordAccessor { +final class GraphStarterpackRecordAccessor { final ServiceContext ctx; - const GraphVerificationRecordAccessor(this.ctx); + const GraphStarterpackRecordAccessor(this.ctx); Future> get({ required String repo, @@ -1386,7 +1468,7 @@ final class GraphVerificationRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyGraphVerification, + collection: ids.appBskyGraphStarterpack, rkey: rkey, cid: cid, $ctx: ctx, @@ -1403,7 +1485,7 @@ final class GraphVerificationRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyGraphVerification, + collection: ids.appBskyGraphStarterpack, limit: limit, cursor: cursor, reverse: reverse, @@ -1413,9 +1495,11 @@ final class GraphVerificationRecordAccessor { ); Future> create({ - required String subject, - required String handle, - required String displayName, + required String name, + String? description, + List? descriptionFacets, + required AtUri list, + List? feeds, DateTime? createdAt, String? rkey, bool? validate, @@ -1424,14 +1508,17 @@ final class GraphVerificationRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyGraphVerification, + collection: ids.appBskyGraphStarterpack, rkey: rkey, validate: validate, record: { ...?$unknown, - 'subject': subject, - 'handle': handle, - 'displayName': displayName, + 'name': name, + if (description != null) 'description': description, + if (descriptionFacets != null) + 'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(), + 'list': list.toString(), + if (feeds != null) 'feeds': feeds.map((e) => e.toJson()).toList(), 'createdAt': iso8601(createdAt), }, swapCommit: swapCommit, @@ -1440,9 +1527,11 @@ final class GraphVerificationRecordAccessor { ); Future> put({ - required String subject, - required String handle, - required String displayName, + required String name, + String? description, + List? descriptionFacets, + required AtUri list, + List? feeds, DateTime? createdAt, required String rkey, bool? validate, @@ -1452,14 +1541,17 @@ final class GraphVerificationRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyGraphVerification, + collection: ids.appBskyGraphStarterpack, rkey: rkey, validate: validate, record: { ...?$unknown, - 'subject': subject, - 'handle': handle, - 'displayName': displayName, + 'name': name, + if (description != null) 'description': description, + if (descriptionFacets != null) + 'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(), + 'list': list.toString(), + if (feeds != null) 'feeds': feeds.map((e) => e.toJson()).toList(), 'createdAt': iso8601(createdAt), }, swapRecord: swapRecord, @@ -1476,103 +1568,7 @@ final class GraphVerificationRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyGraphVerification, - rkey: rkey, - swapRecord: swapRecord, - swapCommit: swapCommit, - $ctx: ctx, - $headers: $headers, - ); -} - -final class GraphBlockRecordAccessor { - final ServiceContext ctx; - - const GraphBlockRecordAccessor(this.ctx); - - Future> get({ - required String repo, - required String rkey, - String? cid, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoRepoGetRecord( - repo: repo, - collection: ids.appBskyGraphBlock, - rkey: rkey, - cid: cid, - $ctx: ctx, - $headers: $headers, - $unknown: $unknown, - ); - - Future> list({ - required String repo, - int? limit, - String? cursor, - bool? reverse, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoRepoListRecords( - repo: repo, - collection: ids.appBskyGraphBlock, - limit: limit, - cursor: cursor, - reverse: reverse, - $ctx: ctx, - $headers: $headers, - $unknown: $unknown, - ); - - Future> create({ - required String subject, - DateTime? createdAt, - String? rkey, - bool? validate, - String? swapCommit, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoRepoCreateRecord( - repo: ctx.repo, - collection: ids.appBskyGraphBlock, - rkey: rkey, - validate: validate, - record: {...?$unknown, 'subject': subject, 'createdAt': iso8601(createdAt)}, - swapCommit: swapCommit, - $ctx: ctx, - $headers: $headers, - ); - - Future> put({ - required String subject, - DateTime? createdAt, - required String rkey, - bool? validate, - String? swapRecord, - String? swapCommit, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoRepoPutRecord( - repo: ctx.repo, - collection: ids.appBskyGraphBlock, - rkey: rkey, - validate: validate, - record: {...?$unknown, 'subject': subject, 'createdAt': iso8601(createdAt)}, - swapRecord: swapRecord, - swapCommit: swapCommit, - $ctx: ctx, - $headers: $headers, - ); - - Future> delete({ - required String rkey, - String? swapRecord, - String? swapCommit, - Map? $headers, - Map? $unknown, - }) async => await comAtprotoRepoDeleteRecord( - repo: ctx.repo, - collection: ids.appBskyGraphBlock, + collection: ids.appBskyGraphStarterpack, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, @@ -1581,10 +1577,10 @@ final class GraphBlockRecordAccessor { ); } -final class GraphListitemRecordAccessor { +final class GraphVerificationRecordAccessor { final ServiceContext ctx; - const GraphListitemRecordAccessor(this.ctx); + const GraphVerificationRecordAccessor(this.ctx); Future> get({ required String repo, @@ -1594,7 +1590,7 @@ final class GraphListitemRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoGetRecord( repo: repo, - collection: ids.appBskyGraphListitem, + collection: ids.appBskyGraphVerification, rkey: rkey, cid: cid, $ctx: ctx, @@ -1611,7 +1607,7 @@ final class GraphListitemRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoListRecords( repo: repo, - collection: ids.appBskyGraphListitem, + collection: ids.appBskyGraphVerification, limit: limit, cursor: cursor, reverse: reverse, @@ -1622,7 +1618,8 @@ final class GraphListitemRecordAccessor { Future> create({ required String subject, - required AtUri list, + required String handle, + required String displayName, DateTime? createdAt, String? rkey, bool? validate, @@ -1631,13 +1628,14 @@ final class GraphListitemRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoCreateRecord( repo: ctx.repo, - collection: ids.appBskyGraphListitem, + collection: ids.appBskyGraphVerification, rkey: rkey, validate: validate, record: { ...?$unknown, 'subject': subject, - 'list': list.toString(), + 'handle': handle, + 'displayName': displayName, 'createdAt': iso8601(createdAt), }, swapCommit: swapCommit, @@ -1647,7 +1645,8 @@ final class GraphListitemRecordAccessor { Future> put({ required String subject, - required AtUri list, + required String handle, + required String displayName, DateTime? createdAt, required String rkey, bool? validate, @@ -1657,13 +1656,14 @@ final class GraphListitemRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoPutRecord( repo: ctx.repo, - collection: ids.appBskyGraphListitem, + collection: ids.appBskyGraphVerification, rkey: rkey, validate: validate, record: { ...?$unknown, 'subject': subject, - 'list': list.toString(), + 'handle': handle, + 'displayName': displayName, 'createdAt': iso8601(createdAt), }, swapRecord: swapRecord, @@ -1680,7 +1680,7 @@ final class GraphListitemRecordAccessor { Map? $unknown, }) async => await comAtprotoRepoDeleteRecord( repo: ctx.repo, - collection: ids.appBskyGraphListitem, + collection: ids.appBskyGraphVerification, rkey: rkey, swapRecord: swapRecord, swapCommit: swapCommit, diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/labeler_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/labeler_service.dart index 76523e3eb..488a1cbb7 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/labeler_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/labeler_service.dart @@ -66,9 +66,6 @@ base class LabelerService { LabelerService(this.ctx) : _service = LabelerServiceRecordAccessor(ctx); - /// A declaration of the existence of labeler service. - LabelerServiceRecordAccessor get service => _service; - /// Get information about a list of labeler services. Future> getServices({ required List dids, @@ -84,6 +81,9 @@ base class LabelerService { $headers: $headers, $unknown: $unknown, ); + + /// A declaration of the existence of labeler service. + LabelerServiceRecordAccessor get service => _service; } final class LabelerServiceRecordAccessor { diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/notification_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/notification_service.dart index f0eb71eef..211318f11 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/notification_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/notification_service.dart @@ -46,70 +46,88 @@ import 'package:atproto/com_atproto_services.dart' // LexGenerator // ************************************************************************** -/// Enumerate notifications for the requesting account. Requires auth. -Future> -appBskyNotificationListNotifications({ - List? reasons, - int? limit, +/// Get notification-related preferences for an account. Requires auth. +Future> +appBskyNotificationGetPreferences({ + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyNotificationGetPreferences, + service: $service, + headers: $headers, + parameters: {...?$unknown}, + to: const NotificationGetPreferencesOutputConverter().fromJson, +); + +/// Count the number of unread notifications for the requesting account. Requires auth. +Future> +appBskyNotificationGetUnreadCount({ bool? priority, - String? cursor, DateTime? seenAt, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyNotificationListNotifications, + ns.appBskyNotificationGetUnreadCount, service: $service, headers: $headers, parameters: { ...?$unknown, - if (reasons != null) 'reasons': reasons, - if (limit != null) 'limit': limit, if (priority != null) 'priority': priority, - if (cursor != null) 'cursor': cursor, if (seenAt != null) 'seenAt': iso8601(seenAt), }, - to: const NotificationListNotificationsOutputConverter().fromJson, + to: const NotificationGetUnreadCountOutputConverter().fromJson, ); -/// Register to receive push notifications, via a specified service, for the requesting account. Requires auth. -Future> appBskyNotificationRegisterPush({ - required String serviceDid, - required String token, - required NotificationRegisterPushPlatform platform, - required String appId, - bool? ageRestricted, +/// Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth. +Future> +appBskyNotificationListActivitySubscriptions({ + int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.appBskyNotificationRegisterPush, +}) async => await $ctx.get( + ns.appBskyNotificationListActivitySubscriptions, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { + headers: $headers, + parameters: { ...?$unknown, - 'serviceDid': serviceDid, - 'token': token, - 'platform': platform.toJson(), - 'appId': appId, - if (ageRestricted != null) 'ageRestricted': ageRestricted, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, }, + to: const NotificationListActivitySubscriptionsOutputConverter().fromJson, ); -/// Notify server that the requesting account has seen notifications. Requires auth. -Future> appBskyNotificationUpdateSeen({ - required DateTime seenAt, +/// Enumerate notifications for the requesting account. Requires auth. +Future> +appBskyNotificationListNotifications({ + List? reasons, + int? limit, + bool? priority, + String? cursor, + DateTime? seenAt, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.appBskyNotificationUpdateSeen, +}) async => await $ctx.get( + ns.appBskyNotificationListNotifications, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'seenAt': iso8601(seenAt)}, + headers: $headers, + parameters: { + ...?$unknown, + if (reasons != null) 'reasons': reasons, + if (limit != null) 'limit': limit, + if (priority != null) 'priority': priority, + if (cursor != null) 'cursor': cursor, + if (seenAt != null) 'seenAt': iso8601(seenAt), + }, + to: const NotificationListNotificationsOutputConverter().fromJson, ); /// Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth. @@ -147,29 +165,6 @@ Future> appBskyNotificationPutPreferences({ body: {...?$unknown, 'priority': priority}, ); -/// The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth. -Future> appBskyNotificationUnregisterPush({ - required String serviceDid, - required String token, - required NotificationUnregisterPushPlatform platform, - required String appId, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.appBskyNotificationUnregisterPush, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'serviceDid': serviceDid, - 'token': token, - 'platform': platform.toJson(), - 'appId': appId, - }, -); - /// Set notification-related preferences for an account. Requires auth. Future> appBskyNotificationPutPreferencesV2({ @@ -214,61 +209,66 @@ appBskyNotificationPutPreferencesV2({ to: const NotificationPutPreferencesV2OutputConverter().fromJson, ); -/// Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth. -Future> -appBskyNotificationListActivitySubscriptions({ - int? limit, - String? cursor, +/// Register to receive push notifications, via a specified service, for the requesting account. Requires auth. +Future> appBskyNotificationRegisterPush({ + required String serviceDid, + required String token, + required NotificationRegisterPushPlatform platform, + required String appId, + bool? ageRestricted, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.appBskyNotificationListActivitySubscriptions, +}) async => await $ctx.post( + ns.appBskyNotificationRegisterPush, service: $service, - headers: $headers, - parameters: { + headers: {'Content-type': 'application/json', ...?$headers}, + body: { ...?$unknown, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, + 'serviceDid': serviceDid, + 'token': token, + 'platform': platform.toJson(), + 'appId': appId, + if (ageRestricted != null) 'ageRestricted': ageRestricted, }, - to: const NotificationListActivitySubscriptionsOutputConverter().fromJson, ); -/// Count the number of unread notifications for the requesting account. Requires auth. -Future> -appBskyNotificationGetUnreadCount({ - bool? priority, - DateTime? seenAt, +/// The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth. +Future> appBskyNotificationUnregisterPush({ + required String serviceDid, + required String token, + required NotificationUnregisterPushPlatform platform, + required String appId, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.appBskyNotificationGetUnreadCount, +}) async => await $ctx.post( + ns.appBskyNotificationUnregisterPush, service: $service, - headers: $headers, - parameters: { + headers: {'Content-type': 'application/json', ...?$headers}, + body: { ...?$unknown, - if (priority != null) 'priority': priority, - if (seenAt != null) 'seenAt': iso8601(seenAt), + 'serviceDid': serviceDid, + 'token': token, + 'platform': platform.toJson(), + 'appId': appId, }, - to: const NotificationGetUnreadCountOutputConverter().fromJson, ); -/// Get notification-related preferences for an account. Requires auth. -Future> -appBskyNotificationGetPreferences({ +/// Notify server that the requesting account has seen notifications. Requires auth. +Future> appBskyNotificationUpdateSeen({ + required DateTime seenAt, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.appBskyNotificationGetPreferences, +}) async => await $ctx.post( + ns.appBskyNotificationUpdateSeen, service: $service, - headers: $headers, - parameters: {...?$unknown}, - to: const NotificationGetPreferencesOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'seenAt': iso8601(seenAt)}, ); /// `app.bsky.notification.*` @@ -281,21 +281,30 @@ base class NotificationService { NotificationService(this.ctx) : _declaration = NotificationDeclarationRecordAccessor(ctx); - /// Enumerate notifications for the requesting account. Requires auth. - Future> listNotifications({ - List? reasons, - int? limit, + /// A declaration of the user's choices related to notifications that can be produced by them. + NotificationDeclarationRecordAccessor get declaration => _declaration; + + /// Get notification-related preferences for an account. Requires auth. + Future> getPreferences({ + String? $service, + Map? $headers, + Map? $unknown, + }) async => await appBskyNotificationGetPreferences( + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Count the number of unread notifications for the requesting account. Requires auth. + Future> getUnreadCount({ bool? priority, - String? cursor, DateTime? seenAt, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyNotificationListNotifications( - reasons: reasons, - limit: limit, + }) async => await appBskyNotificationGetUnreadCount( priority: priority, - cursor: cursor, seenAt: seenAt, $ctx: ctx, $service: $service, @@ -303,35 +312,38 @@ base class NotificationService { $unknown: $unknown, ); - /// Register to receive push notifications, via a specified service, for the requesting account. Requires auth. - Future> registerPush({ - required String serviceDid, - required String token, - required NotificationRegisterPushPlatform platform, - required String appId, - bool? ageRestricted, + /// Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth. + Future> + listActivitySubscriptions({ + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyNotificationRegisterPush( - serviceDid: serviceDid, - token: token, - platform: platform, - appId: appId, - ageRestricted: ageRestricted, + }) async => await appBskyNotificationListActivitySubscriptions( + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Notify server that the requesting account has seen notifications. Requires auth. - Future> updateSeen({ - required DateTime seenAt, + /// Enumerate notifications for the requesting account. Requires auth. + Future> listNotifications({ + List? reasons, + int? limit, + bool? priority, + String? cursor, + DateTime? seenAt, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyNotificationUpdateSeen( + }) async => await appBskyNotificationListNotifications( + reasons: reasons, + limit: limit, + priority: priority, + cursor: cursor, seenAt: seenAt, $ctx: ctx, $service: $service, @@ -370,26 +382,6 @@ base class NotificationService { $unknown: $unknown, ); - /// The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth. - Future> unregisterPush({ - required String serviceDid, - required String token, - required NotificationUnregisterPushPlatform platform, - required String appId, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await appBskyNotificationUnregisterPush( - serviceDid: serviceDid, - token: token, - platform: platform, - appId: appId, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - /// Set notification-related preferences for an account. Requires auth. Future> putPreferencesV2({ ChatPreference? chat, @@ -428,48 +420,56 @@ base class NotificationService { $unknown: $unknown, ); - /// A declaration of the user's choices related to notifications that can be produced by them. - NotificationDeclarationRecordAccessor get declaration => _declaration; - - /// Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth. - Future> - listActivitySubscriptions({ - int? limit, - String? cursor, + /// Register to receive push notifications, via a specified service, for the requesting account. Requires auth. + Future> registerPush({ + required String serviceDid, + required String token, + required NotificationRegisterPushPlatform platform, + required String appId, + bool? ageRestricted, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyNotificationListActivitySubscriptions( - limit: limit, - cursor: cursor, + }) async => await appBskyNotificationRegisterPush( + serviceDid: serviceDid, + token: token, + platform: platform, + appId: appId, + ageRestricted: ageRestricted, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Count the number of unread notifications for the requesting account. Requires auth. - Future> getUnreadCount({ - bool? priority, - DateTime? seenAt, + /// The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth. + Future> unregisterPush({ + required String serviceDid, + required String token, + required NotificationUnregisterPushPlatform platform, + required String appId, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyNotificationGetUnreadCount( - priority: priority, - seenAt: seenAt, + }) async => await appBskyNotificationUnregisterPush( + serviceDid: serviceDid, + token: token, + platform: platform, + appId: appId, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get notification-related preferences for an account. Requires auth. - Future> getPreferences({ + /// Notify server that the requesting account has seen notifications. Requires auth. + Future> updateSeen({ + required DateTime seenAt, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyNotificationGetPreferences( + }) async => await appBskyNotificationUpdateSeen( + seenAt: seenAt, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/unspecced_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/unspecced_service.dart index bb1d9aed8..ac366dec3 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/unspecced_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/unspecced_service.dart @@ -43,25 +43,54 @@ import 'unspecced/searchStarterPacksSkeleton/output.dart'; // LexGenerator // ************************************************************************** -/// Get a list of suggested feeds -Future> -appBskyUnspeccedGetSuggestedFeeds({ +/// Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required. +Future> appBskyUnspeccedGetAgeAssuranceState({ + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyUnspeccedGetAgeAssuranceState, + service: $service, + headers: $headers, + parameters: {...?$unknown}, + to: const AgeAssuranceStateConverter().fromJson, +); + +/// Get miscellaneous runtime configuration. +Future> appBskyUnspeccedGetConfig({ + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyUnspeccedGetConfig, + service: $service, + headers: $headers, + parameters: {...?$unknown}, + to: const UnspeccedGetConfigOutputConverter().fromJson, +); + +/// Get a list of suggested starterpacks for onboarding +Future> +appBskyUnspeccedGetOnboardingSuggestedStarterPacks({ int? limit, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetSuggestedFeeds, + ns.appBskyUnspeccedGetOnboardingSuggestedStarterPacks, service: $service, headers: $headers, parameters: {...?$unknown, if (limit != null) 'limit': limit}, - to: const UnspeccedGetSuggestedFeedsOutputConverter().fromJson, + to: const UnspeccedGetOnboardingSuggestedStarterPacksOutputConverter() + .fromJson, ); -/// Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds -Future> -appBskyUnspeccedGetSuggestedFeedsSkeleton({ +/// Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks +Future> +appBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton({ String? viewer, int? limit, required ServiceContext $ctx, @@ -69,7 +98,7 @@ appBskyUnspeccedGetSuggestedFeedsSkeleton({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetSuggestedFeedsSkeleton, + ns.appBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton, service: $service, headers: $headers, parameters: { @@ -77,54 +106,55 @@ appBskyUnspeccedGetSuggestedFeedsSkeleton({ if (viewer != null) 'viewer': viewer, if (limit != null) 'limit': limit, }, - to: const UnspeccedGetSuggestedFeedsSkeletonOutputConverter().fromJson, + to: const UnspeccedGetOnboardingSuggestedStarterPacksSkeletonOutputConverter() + .fromJson, ); -/// Backend Starter Pack search, returns only skeleton. -Future> -appBskyUnspeccedSearchStarterPacksSkeleton({ - required String q, +/// Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers +Future> +appBskyUnspeccedGetOnboardingSuggestedUsersSkeleton({ String? viewer, + String? category, int? limit, - String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedSearchStarterPacksSkeleton, + ns.appBskyUnspeccedGetOnboardingSuggestedUsersSkeleton, service: $service, headers: $headers, parameters: { ...?$unknown, - 'q': q, if (viewer != null) 'viewer': viewer, + if (category != null) 'category': category, if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, }, - to: const UnspeccedSearchStarterPacksSkeletonOutputConverter().fromJson, + to: const UnspeccedGetOnboardingSuggestedUsersSkeletonOutputConverter() + .fromJson, ); -/// Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks -Future> -appBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton({ - String? viewer, +/// An unspecced view of globally popular feed generators. +Future> +appBskyUnspeccedGetPopularFeedGenerators({ int? limit, + String? cursor, + String? query, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton, + ns.appBskyUnspeccedGetPopularFeedGenerators, service: $service, headers: $headers, parameters: { ...?$unknown, - if (viewer != null) 'viewer': viewer, if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + if (query != null) 'query': query, }, - to: const UnspeccedGetOnboardingSuggestedStarterPacksSkeletonOutputConverter() - .fromJson, + to: const UnspeccedGetPopularFeedGeneratorsOutputConverter().fromJson, ); /// (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests. @@ -143,84 +173,68 @@ appBskyUnspeccedGetPostThreadOtherV2({ to: const UnspeccedGetPostThreadOtherV2OutputConverter().fromJson, ); -/// Backend Posts search, returns only skeleton -Future> -appBskyUnspeccedSearchPostsSkeleton({ - required String q, - UnspeccedSearchPostsSkeletonSort? sort, - String? since, - String? until, - String? mentions, - String? author, - String? lang, - String? domain, - String? url, - List? tag, - String? viewer, - int? limit, - String? cursor, +/// (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests. +Future> +appBskyUnspeccedGetPostThreadV2({ + required AtUri anchor, + bool? above, + int? below, + int? branchingFactor, + UnspeccedGetPostThreadV2Sort? sort, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedSearchPostsSkeleton, + ns.appBskyUnspeccedGetPostThreadV2, service: $service, headers: $headers, parameters: { ...?$unknown, - 'q': q, + 'anchor': anchor.toString(), + if (above != null) 'above': above, + if (below != null) 'below': below, + if (branchingFactor != null) 'branchingFactor': branchingFactor, if (sort != null) 'sort': sort.toJson(), - if (since != null) 'since': since, - if (until != null) 'until': until, - if (mentions != null) 'mentions': mentions, - if (author != null) 'author': author, - if (lang != null) 'lang': lang, - if (domain != null) 'domain': domain, - if (url != null) 'url': url, - if (tag != null) 'tag': tag, - if (viewer != null) 'viewer': viewer, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, }, - to: const UnspeccedSearchPostsSkeletonOutputConverter().fromJson, + to: const UnspeccedGetPostThreadV2OutputConverter().fromJson, ); -/// Get miscellaneous runtime configuration. -Future> appBskyUnspeccedGetConfig({ +/// Get a list of suggested feeds +Future> +appBskyUnspeccedGetSuggestedFeeds({ + int? limit, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetConfig, + ns.appBskyUnspeccedGetSuggestedFeeds, service: $service, headers: $headers, - parameters: {...?$unknown}, - to: const UnspeccedGetConfigOutputConverter().fromJson, + parameters: {...?$unknown, if (limit != null) 'limit': limit}, + to: const UnspeccedGetSuggestedFeedsOutputConverter().fromJson, ); -/// Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers -Future> -appBskyUnspeccedGetSuggestedUsersSkeleton({ +/// Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds +Future> +appBskyUnspeccedGetSuggestedFeedsSkeleton({ String? viewer, - String? category, int? limit, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetSuggestedUsersSkeleton, + ns.appBskyUnspeccedGetSuggestedFeedsSkeleton, service: $service, headers: $headers, parameters: { ...?$unknown, if (viewer != null) 'viewer': viewer, - if (category != null) 'category': category, if (limit != null) 'limit': limit, }, - to: const UnspeccedGetSuggestedUsersSkeletonOutputConverter().fromJson, + to: const UnspeccedGetSuggestedFeedsSkeletonOutputConverter().fromJson, ); /// Get a list of suggested users for onboarding @@ -244,52 +258,46 @@ appBskyUnspeccedGetSuggestedOnboardingUsers({ to: const UnspeccedGetSuggestedOnboardingUsersOutputConverter().fromJson, ); -/// Get the current trends on the network -Future> appBskyUnspeccedGetTrends({ +/// Get a list of suggested starterpacks +Future> +appBskyUnspeccedGetSuggestedStarterPacks({ int? limit, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetTrends, + ns.appBskyUnspeccedGetSuggestedStarterPacks, service: $service, headers: $headers, parameters: {...?$unknown, if (limit != null) 'limit': limit}, - to: const UnspeccedGetTrendsOutputConverter().fromJson, + to: const UnspeccedGetSuggestedStarterPacksOutputConverter().fromJson, ); -/// Backend Actors (profile) search, returns only skeleton. -Future> -appBskyUnspeccedSearchActorsSkeleton({ - required String q, +/// Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks +Future> +appBskyUnspeccedGetSuggestedStarterPacksSkeleton({ String? viewer, - bool? typeahead, int? limit, - String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedSearchActorsSkeleton, + ns.appBskyUnspeccedGetSuggestedStarterPacksSkeleton, service: $service, headers: $headers, parameters: { ...?$unknown, - 'q': q, if (viewer != null) 'viewer': viewer, - if (typeahead != null) 'typeahead': typeahead, if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, }, - to: const UnspeccedSearchActorsSkeletonOutputConverter().fromJson, + to: const UnspeccedGetSuggestedStarterPacksSkeletonOutputConverter().fromJson, ); -/// Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers -Future> -appBskyUnspeccedGetOnboardingSuggestedUsersSkeleton({ - String? viewer, +/// Get a list of suggested users +Future> +appBskyUnspeccedGetSuggestedUsers({ String? category, int? limit, required ServiceContext $ctx, @@ -297,86 +305,78 @@ appBskyUnspeccedGetOnboardingSuggestedUsersSkeleton({ Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetOnboardingSuggestedUsersSkeleton, + ns.appBskyUnspeccedGetSuggestedUsers, service: $service, headers: $headers, parameters: { ...?$unknown, - if (viewer != null) 'viewer': viewer, if (category != null) 'category': category, if (limit != null) 'limit': limit, }, - to: const UnspeccedGetOnboardingSuggestedUsersSkeletonOutputConverter() - .fromJson, + to: const UnspeccedGetSuggestedUsersOutputConverter().fromJson, ); -/// (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests. -Future> -appBskyUnspeccedGetPostThreadV2({ - required AtUri anchor, - bool? above, - int? below, - int? branchingFactor, - UnspeccedGetPostThreadV2Sort? sort, +/// Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers +Future> +appBskyUnspeccedGetSuggestedUsersSkeleton({ + String? viewer, + String? category, + int? limit, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetPostThreadV2, + ns.appBskyUnspeccedGetSuggestedUsersSkeleton, service: $service, headers: $headers, parameters: { ...?$unknown, - 'anchor': anchor.toString(), - if (above != null) 'above': above, - if (below != null) 'below': below, - if (branchingFactor != null) 'branchingFactor': branchingFactor, - if (sort != null) 'sort': sort.toJson(), + if (viewer != null) 'viewer': viewer, + if (category != null) 'category': category, + if (limit != null) 'limit': limit, }, - to: const UnspeccedGetPostThreadV2OutputConverter().fromJson, + to: const UnspeccedGetSuggestedUsersSkeletonOutputConverter().fromJson, ); -/// Get a list of suggested users -Future> -appBskyUnspeccedGetSuggestedUsers({ - String? category, +/// Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions +Future> +appBskyUnspeccedGetSuggestionsSkeleton({ + String? viewer, int? limit, + String? cursor, + String? relativeToDid, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetSuggestedUsers, + ns.appBskyUnspeccedGetSuggestionsSkeleton, service: $service, headers: $headers, parameters: { ...?$unknown, - if (category != null) 'category': category, + if (viewer != null) 'viewer': viewer, if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + if (relativeToDid != null) 'relativeToDid': relativeToDid, }, - to: const UnspeccedGetSuggestedUsersOutputConverter().fromJson, + to: const UnspeccedGetSuggestionsSkeletonOutputConverter().fromJson, ); -/// Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends -Future> -appBskyUnspeccedGetTrendsSkeleton({ - String? viewer, - int? limit, +/// Get a list of suggestions (feeds and users) tagged with categories +Future> +appBskyUnspeccedGetTaggedSuggestions({ required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetTrendsSkeleton, + ns.appBskyUnspeccedGetTaggedSuggestions, service: $service, headers: $headers, - parameters: { - ...?$unknown, - if (viewer != null) 'viewer': viewer, - if (limit != null) 'limit': limit, - }, - to: const UnspeccedGetTrendsSkeletonOutputConverter().fromJson, + parameters: {...?$unknown}, + to: const UnspeccedGetTaggedSuggestionsOutputConverter().fromJson, ); /// Get a list of trending topics @@ -400,63 +400,40 @@ appBskyUnspeccedGetTrendingTopics({ to: const UnspeccedGetTrendingTopicsOutputConverter().fromJson, ); -/// Get a list of suggestions (feeds and users) tagged with categories -Future> -appBskyUnspeccedGetTaggedSuggestions({ - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyUnspeccedGetTaggedSuggestions, - service: $service, - headers: $headers, - parameters: {...?$unknown}, - to: const UnspeccedGetTaggedSuggestionsOutputConverter().fromJson, -); - -/// Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks -Future> -appBskyUnspeccedGetSuggestedStarterPacksSkeleton({ - String? viewer, +/// Get the current trends on the network +Future> appBskyUnspeccedGetTrends({ int? limit, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetSuggestedStarterPacksSkeleton, + ns.appBskyUnspeccedGetTrends, service: $service, headers: $headers, - parameters: { - ...?$unknown, - if (viewer != null) 'viewer': viewer, - if (limit != null) 'limit': limit, - }, - to: const UnspeccedGetSuggestedStarterPacksSkeletonOutputConverter().fromJson, + parameters: {...?$unknown, if (limit != null) 'limit': limit}, + to: const UnspeccedGetTrendsOutputConverter().fromJson, ); -/// An unspecced view of globally popular feed generators. -Future> -appBskyUnspeccedGetPopularFeedGenerators({ +/// Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends +Future> +appBskyUnspeccedGetTrendsSkeleton({ + String? viewer, int? limit, - String? cursor, - String? query, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetPopularFeedGenerators, + ns.appBskyUnspeccedGetTrendsSkeleton, service: $service, headers: $headers, parameters: { ...?$unknown, + if (viewer != null) 'viewer': viewer, if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - if (query != null) 'query': query, }, - to: const UnspeccedGetPopularFeedGeneratorsOutputConverter().fromJson, + to: const UnspeccedGetTrendsSkeletonOutputConverter().fromJson, ); /// Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age. @@ -481,76 +458,99 @@ Future> appBskyUnspeccedInitAgeAssurance({ to: const AgeAssuranceStateConverter().fromJson, ); -/// Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required. -Future> appBskyUnspeccedGetAgeAssuranceState({ - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyUnspeccedGetAgeAssuranceState, - service: $service, - headers: $headers, - parameters: {...?$unknown}, - to: const AgeAssuranceStateConverter().fromJson, -); - -/// Get a list of suggested starterpacks for onboarding -Future> -appBskyUnspeccedGetOnboardingSuggestedStarterPacks({ +/// Backend Actors (profile) search, returns only skeleton. +Future> +appBskyUnspeccedSearchActorsSkeleton({ + required String q, + String? viewer, + bool? typeahead, int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetOnboardingSuggestedStarterPacks, + ns.appBskyUnspeccedSearchActorsSkeleton, service: $service, headers: $headers, - parameters: {...?$unknown, if (limit != null) 'limit': limit}, - to: const UnspeccedGetOnboardingSuggestedStarterPacksOutputConverter() - .fromJson, + parameters: { + ...?$unknown, + 'q': q, + if (viewer != null) 'viewer': viewer, + if (typeahead != null) 'typeahead': typeahead, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const UnspeccedSearchActorsSkeletonOutputConverter().fromJson, ); -/// Get a list of suggested starterpacks -Future> -appBskyUnspeccedGetSuggestedStarterPacks({ +/// Backend Posts search, returns only skeleton +Future> +appBskyUnspeccedSearchPostsSkeleton({ + required String q, + UnspeccedSearchPostsSkeletonSort? sort, + String? since, + String? until, + String? mentions, + String? author, + String? lang, + String? domain, + String? url, + List? tag, + String? viewer, int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetSuggestedStarterPacks, + ns.appBskyUnspeccedSearchPostsSkeleton, service: $service, headers: $headers, - parameters: {...?$unknown, if (limit != null) 'limit': limit}, - to: const UnspeccedGetSuggestedStarterPacksOutputConverter().fromJson, + parameters: { + ...?$unknown, + 'q': q, + if (sort != null) 'sort': sort.toJson(), + if (since != null) 'since': since, + if (until != null) 'until': until, + if (mentions != null) 'mentions': mentions, + if (author != null) 'author': author, + if (lang != null) 'lang': lang, + if (domain != null) 'domain': domain, + if (url != null) 'url': url, + if (tag != null) 'tag': tag, + if (viewer != null) 'viewer': viewer, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const UnspeccedSearchPostsSkeletonOutputConverter().fromJson, ); -/// Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions -Future> -appBskyUnspeccedGetSuggestionsSkeleton({ +/// Backend Starter Pack search, returns only skeleton. +Future> +appBskyUnspeccedSearchStarterPacksSkeleton({ + required String q, String? viewer, int? limit, String? cursor, - String? relativeToDid, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.appBskyUnspeccedGetSuggestionsSkeleton, + ns.appBskyUnspeccedSearchStarterPacksSkeleton, service: $service, headers: $headers, parameters: { ...?$unknown, + 'q': q, if (viewer != null) 'viewer': viewer, if (limit != null) 'limit': limit, if (cursor != null) 'cursor': cursor, - if (relativeToDid != null) 'relativeToDid': relativeToDid, }, - to: const UnspeccedGetSuggestionsSkeletonOutputConverter().fromJson, + to: const UnspeccedSearchStarterPacksSkeletonOutputConverter().fromJson, ); /// `app.bsky.unspecced.*` @@ -560,52 +560,39 @@ base class UnspeccedService { UnspeccedService(this.ctx); - /// Get a list of suggested feeds - Future> getSuggestedFeeds({ - int? limit, + /// Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required. + Future> getAgeAssuranceState({ String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetSuggestedFeeds( - limit: limit, + }) async => await appBskyUnspeccedGetAgeAssuranceState( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds - Future> - getSuggestedFeedsSkeleton({ - String? viewer, - int? limit, + /// Get miscellaneous runtime configuration. + Future> getConfig({ String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetSuggestedFeedsSkeleton( - viewer: viewer, - limit: limit, + }) async => await appBskyUnspeccedGetConfig( $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Backend Starter Pack search, returns only skeleton. - Future> - searchStarterPacksSkeleton({ - required String q, - String? viewer, + /// Get a list of suggested starterpacks for onboarding + Future> + getOnboardingSuggestedStarterPacks({ int? limit, - String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedSearchStarterPacksSkeleton( - q: q, - viewer: viewer, + }) async => await appBskyUnspeccedGetOnboardingSuggestedStarterPacks( limit: limit, - cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, @@ -631,100 +618,88 @@ base class UnspeccedService { $unknown: $unknown, ); - /// (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests. - Future> - getPostThreadOtherV2({ - required AtUri anchor, + /// Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers + Future> + getOnboardingSuggestedUsersSkeleton({ + String? viewer, + String? category, + int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetPostThreadOtherV2( - anchor: anchor, + }) async => await appBskyUnspeccedGetOnboardingSuggestedUsersSkeleton( + viewer: viewer, + category: category, + limit: limit, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Backend Posts search, returns only skeleton - Future> searchPostsSkeleton({ - required String q, - UnspeccedSearchPostsSkeletonSort? sort, - String? since, - String? until, - String? mentions, - String? author, - String? lang, - String? domain, - String? url, - List? tag, - String? viewer, + /// An unspecced view of globally popular feed generators. + Future> + getPopularFeedGenerators({ int? limit, String? cursor, + String? query, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedSearchPostsSkeleton( - q: q, - sort: sort, - since: since, - until: until, - mentions: mentions, - author: author, - lang: lang, - domain: domain, - url: url, - tag: tag, - viewer: viewer, + }) async => await appBskyUnspeccedGetPopularFeedGenerators( limit: limit, cursor: cursor, + query: query, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get miscellaneous runtime configuration. - Future> getConfig({ + /// (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests. + Future> + getPostThreadOtherV2({ + required AtUri anchor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetConfig( + }) async => await appBskyUnspeccedGetPostThreadOtherV2( + anchor: anchor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers - Future> - getSuggestedUsersSkeleton({ - String? viewer, - String? category, - int? limit, + /// (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests. + Future> getPostThreadV2({ + required AtUri anchor, + bool? above, + int? below, + int? branchingFactor, + UnspeccedGetPostThreadV2Sort? sort, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetSuggestedUsersSkeleton( - viewer: viewer, - category: category, - limit: limit, + }) async => await appBskyUnspeccedGetPostThreadV2( + anchor: anchor, + above: above, + below: below, + branchingFactor: branchingFactor, + sort: sort, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a list of suggested users for onboarding - Future> - getSuggestedOnboardingUsers({ - String? category, + /// Get a list of suggested feeds + Future> getSuggestedFeeds({ int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetSuggestedOnboardingUsers( - category: category, + }) async => await appBskyUnspeccedGetSuggestedFeeds( limit: limit, $ctx: ctx, $service: $service, @@ -732,13 +707,16 @@ base class UnspeccedService { $unknown: $unknown, ); - /// Get the current trends on the network - Future> getTrends({ + /// Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds + Future> + getSuggestedFeedsSkeleton({ + String? viewer, int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetTrends( + }) async => await appBskyUnspeccedGetSuggestedFeedsSkeleton( + viewer: viewer, limit: limit, $ctx: ctx, $service: $service, @@ -746,41 +724,31 @@ base class UnspeccedService { $unknown: $unknown, ); - /// Backend Actors (profile) search, returns only skeleton. - Future> - searchActorsSkeleton({ - required String q, - String? viewer, - bool? typeahead, + /// Get a list of suggested users for onboarding + Future> + getSuggestedOnboardingUsers({ + String? category, int? limit, - String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedSearchActorsSkeleton( - q: q, - viewer: viewer, - typeahead: typeahead, + }) async => await appBskyUnspeccedGetSuggestedOnboardingUsers( + category: category, limit: limit, - cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers - Future> - getOnboardingSuggestedUsersSkeleton({ - String? viewer, - String? category, + /// Get a list of suggested starterpacks + Future> + getSuggestedStarterPacks({ int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetOnboardingSuggestedUsersSkeleton( - viewer: viewer, - category: category, + }) async => await appBskyUnspeccedGetSuggestedStarterPacks( limit: limit, $ctx: ctx, $service: $service, @@ -788,22 +756,17 @@ base class UnspeccedService { $unknown: $unknown, ); - /// (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests. - Future> getPostThreadV2({ - required AtUri anchor, - bool? above, - int? below, - int? branchingFactor, - UnspeccedGetPostThreadV2Sort? sort, + /// Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks + Future> + getSuggestedStarterPacksSkeleton({ + String? viewer, + int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetPostThreadV2( - anchor: anchor, - above: above, - below: below, - branchingFactor: branchingFactor, - sort: sort, + }) async => await appBskyUnspeccedGetSuggestedStarterPacksSkeleton( + viewer: viewer, + limit: limit, $ctx: ctx, $service: $service, $headers: $headers, @@ -826,15 +789,18 @@ base class UnspeccedService { $unknown: $unknown, ); - /// Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends - Future> getTrendsSkeleton({ + /// Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers + Future> + getSuggestedUsersSkeleton({ String? viewer, + String? category, int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetTrendsSkeleton( + }) async => await appBskyUnspeccedGetSuggestedUsersSkeleton( viewer: viewer, + category: category, limit: limit, $ctx: ctx, $service: $service, @@ -842,16 +808,21 @@ base class UnspeccedService { $unknown: $unknown, ); - /// Get a list of trending topics - Future> getTrendingTopics({ + /// Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions + Future> + getSuggestionsSkeleton({ String? viewer, int? limit, + String? cursor, + String? relativeToDid, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetTrendingTopics( + }) async => await appBskyUnspeccedGetSuggestionsSkeleton( viewer: viewer, limit: limit, + cursor: cursor, + relativeToDid: relativeToDid, $ctx: ctx, $service: $service, $headers: $headers, @@ -871,15 +842,14 @@ base class UnspeccedService { $unknown: $unknown, ); - /// Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks - Future> - getSuggestedStarterPacksSkeleton({ + /// Get a list of trending topics + Future> getTrendingTopics({ String? viewer, int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetSuggestedStarterPacksSkeleton( + }) async => await appBskyUnspeccedGetTrendingTopics( viewer: viewer, limit: limit, $ctx: ctx, @@ -888,100 +858,130 @@ base class UnspeccedService { $unknown: $unknown, ); - /// An unspecced view of globally popular feed generators. - Future> - getPopularFeedGenerators({ + /// Get the current trends on the network + Future> getTrends({ int? limit, - String? cursor, - String? query, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetPopularFeedGenerators( + }) async => await appBskyUnspeccedGetTrends( limit: limit, - cursor: cursor, - query: query, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age. - Future> initAgeAssurance({ - required String email, - required String language, - required String countryCode, + /// Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends + Future> getTrendsSkeleton({ + String? viewer, + int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedInitAgeAssurance( - email: email, - language: language, - countryCode: countryCode, + }) async => await appBskyUnspeccedGetTrendsSkeleton( + viewer: viewer, + limit: limit, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required. - Future> getAgeAssuranceState({ + /// Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age. + Future> initAgeAssurance({ + required String email, + required String language, + required String countryCode, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetAgeAssuranceState( + }) async => await appBskyUnspeccedInitAgeAssurance( + email: email, + language: language, + countryCode: countryCode, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a list of suggested starterpacks for onboarding - Future> - getOnboardingSuggestedStarterPacks({ + /// Backend Actors (profile) search, returns only skeleton. + Future> + searchActorsSkeleton({ + required String q, + String? viewer, + bool? typeahead, int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetOnboardingSuggestedStarterPacks( + }) async => await appBskyUnspeccedSearchActorsSkeleton( + q: q, + viewer: viewer, + typeahead: typeahead, limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a list of suggested starterpacks - Future> - getSuggestedStarterPacks({ + /// Backend Posts search, returns only skeleton + Future> searchPostsSkeleton({ + required String q, + UnspeccedSearchPostsSkeletonSort? sort, + String? since, + String? until, + String? mentions, + String? author, + String? lang, + String? domain, + String? url, + List? tag, + String? viewer, int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetSuggestedStarterPacks( + }) async => await appBskyUnspeccedSearchPostsSkeleton( + q: q, + sort: sort, + since: since, + until: until, + mentions: mentions, + author: author, + lang: lang, + domain: domain, + url: url, + tag: tag, + viewer: viewer, limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions - Future> - getSuggestionsSkeleton({ + /// Backend Starter Pack search, returns only skeleton. + Future> + searchStarterPacksSkeleton({ + required String q, String? viewer, int? limit, String? cursor, - String? relativeToDid, String? $service, Map? $headers, Map? $unknown, - }) async => await appBskyUnspeccedGetSuggestionsSkeleton( + }) async => await appBskyUnspeccedSearchStarterPacksSkeleton( + q: q, viewer: viewer, limit: limit, cursor: cursor, - relativeToDid: relativeToDid, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/app/bsky/video_service.dart b/packages/bluesky/lib/src/services/codegen/app/bsky/video_service.dart index 5b26b2257..2c81449d0 100644 --- a/packages/bluesky/lib/src/services/codegen/app/bsky/video_service.dart +++ b/packages/bluesky/lib/src/services/codegen/app/bsky/video_service.dart @@ -24,20 +24,19 @@ import 'video/getUploadLimits/output.dart'; // LexGenerator // ************************************************************************** -/// Upload a video to be processed then stored on the PDS. -Future> appBskyVideoUploadVideo({ - required Uint8List bytes, +/// Get status details for a video processing job. +Future> appBskyVideoGetJobStatus({ + required String jobId, required ServiceContext $ctx, String? $service, Map? $headers, - Map? $parameters, -}) async => await $ctx.post( - ns.appBskyVideoUploadVideo, + Map? $unknown, +}) async => await $ctx.get( + ns.appBskyVideoGetJobStatus, service: $service, - headers: {'Content-type': 'video/mp4', ...?$headers}, - parameters: $parameters, - body: bytes, - to: const JobStatusConverter().fromJson, + headers: $headers, + parameters: {...?$unknown, 'jobId': jobId}, + to: const VideoGetJobStatusOutputConverter().fromJson, ); /// Get video upload limits for the authenticated user. @@ -54,19 +53,20 @@ Future> appBskyVideoGetUploadLimits({ to: const VideoGetUploadLimitsOutputConverter().fromJson, ); -/// Get status details for a video processing job. -Future> appBskyVideoGetJobStatus({ - required String jobId, +/// Upload a video to be processed then stored on the PDS. +Future> appBskyVideoUploadVideo({ + required Uint8List bytes, required ServiceContext $ctx, String? $service, Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.appBskyVideoGetJobStatus, + Map? $parameters, +}) async => await $ctx.post( + ns.appBskyVideoUploadVideo, service: $service, - headers: $headers, - parameters: {...?$unknown, 'jobId': jobId}, - to: const VideoGetJobStatusOutputConverter().fromJson, + headers: {'Content-type': 'video/mp4', ...?$headers}, + parameters: $parameters, + body: bytes, + to: const JobStatusConverter().fromJson, ); /// `app.bsky.video.*` @@ -76,18 +76,18 @@ base class VideoService { VideoService(this.ctx); - /// Upload a video to be processed then stored on the PDS. - Future> uploadVideo({ - required Uint8List bytes, + /// Get status details for a video processing job. + Future> getJobStatus({ + required String jobId, String? $service, Map? $headers, - Map? $parameters, - }) async => await appBskyVideoUploadVideo( - bytes: bytes, - $parameters: $parameters, + Map? $unknown, + }) async => await appBskyVideoGetJobStatus( + jobId: jobId, $ctx: ctx, $service: $service, $headers: $headers, + $unknown: $unknown, ); /// Get video upload limits for the authenticated user. @@ -102,17 +102,17 @@ base class VideoService { $unknown: $unknown, ); - /// Get status details for a video processing job. - Future> getJobStatus({ - required String jobId, + /// Upload a video to be processed then stored on the PDS. + Future> uploadVideo({ + required Uint8List bytes, String? $service, Map? $headers, - Map? $unknown, - }) async => await appBskyVideoGetJobStatus( - jobId: jobId, + Map? $parameters, + }) async => await appBskyVideoUploadVideo( + bytes: bytes, + $parameters: $parameters, $ctx: ctx, $service: $service, $headers: $headers, - $unknown: $unknown, ); } diff --git a/packages/bluesky/lib/src/services/codegen/at_uri_extension.dart b/packages/bluesky/lib/src/services/codegen/at_uri_extension.dart index 6cde7c590..d9c9a7d4a 100644 --- a/packages/bluesky/lib/src/services/codegen/at_uri_extension.dart +++ b/packages/bluesky/lib/src/services/codegen/at_uri_extension.dart @@ -15,64 +15,48 @@ import 'package:atproto_core/atproto_core.dart' show AtUri; // ************************************************************************** extension AtUriExtension on AtUri { - /// Returns true if this uri is `com.atproto.lexicon.schema`, otherwise false. - bool get isLexiconSchema => - collection.toString() == 'com.atproto.lexicon.schema'; - - /// Returns true if this uri is not `com.atproto.lexicon.schema`, otherwise false. - bool get isNotLexiconSchema => !isLexiconSchema; - - /// Returns true if this uri is `app.bsky.graph.starterpack`, otherwise false. - bool get isGraphStarterpack => - collection.toString() == 'app.bsky.graph.starterpack'; - - /// Returns true if this uri is not `app.bsky.graph.starterpack`, otherwise false. - bool get isNotGraphStarterpack => !isGraphStarterpack; - - /// Returns true if this uri is `app.bsky.graph.list`, otherwise false. - bool get isGraphList => collection.toString() == 'app.bsky.graph.list'; + /// Returns true if this uri is `app.bsky.actor.profile`, otherwise false. + bool get isActorProfile => collection.toString() == 'app.bsky.actor.profile'; - /// Returns true if this uri is not `app.bsky.graph.list`, otherwise false. - bool get isNotGraphList => !isGraphList; + /// Returns true if this uri is not `app.bsky.actor.profile`, otherwise false. + bool get isNotActorProfile => !isActorProfile; - /// Returns true if this uri is `app.bsky.graph.listblock`, otherwise false. - bool get isGraphListblock => - collection.toString() == 'app.bsky.graph.listblock'; + /// Returns true if this uri is `app.bsky.actor.status`, otherwise false. + bool get isActorStatus => collection.toString() == 'app.bsky.actor.status'; - /// Returns true if this uri is not `app.bsky.graph.listblock`, otherwise false. - bool get isNotGraphListblock => !isGraphListblock; + /// Returns true if this uri is not `app.bsky.actor.status`, otherwise false. + bool get isNotActorStatus => !isActorStatus; - /// Returns true if this uri is `app.bsky.graph.follow`, otherwise false. - bool get isGraphFollow => collection.toString() == 'app.bsky.graph.follow'; + /// Returns true if this uri is `app.bsky.feed.generator`, otherwise false. + bool get isFeedGenerator => + collection.toString() == 'app.bsky.feed.generator'; - /// Returns true if this uri is not `app.bsky.graph.follow`, otherwise false. - bool get isNotGraphFollow => !isGraphFollow; + /// Returns true if this uri is not `app.bsky.feed.generator`, otherwise false. + bool get isNotFeedGenerator => !isFeedGenerator; - /// Returns true if this uri is `app.bsky.graph.verification`, otherwise false. - bool get isGraphVerification => - collection.toString() == 'app.bsky.graph.verification'; + /// Returns true if this uri is `app.bsky.feed.like`, otherwise false. + bool get isFeedLike => collection.toString() == 'app.bsky.feed.like'; - /// Returns true if this uri is not `app.bsky.graph.verification`, otherwise false. - bool get isNotGraphVerification => !isGraphVerification; + /// Returns true if this uri is not `app.bsky.feed.like`, otherwise false. + bool get isNotFeedLike => !isFeedLike; - /// Returns true if this uri is `app.bsky.graph.block`, otherwise false. - bool get isGraphBlock => collection.toString() == 'app.bsky.graph.block'; + /// Returns true if this uri is `app.bsky.feed.post`, otherwise false. + bool get isFeedPost => collection.toString() == 'app.bsky.feed.post'; - /// Returns true if this uri is not `app.bsky.graph.block`, otherwise false. - bool get isNotGraphBlock => !isGraphBlock; + /// Returns true if this uri is not `app.bsky.feed.post`, otherwise false. + bool get isNotFeedPost => !isFeedPost; - /// Returns true if this uri is `app.bsky.graph.listitem`, otherwise false. - bool get isGraphListitem => - collection.toString() == 'app.bsky.graph.listitem'; + /// Returns true if this uri is `app.bsky.feed.postgate`, otherwise false. + bool get isFeedPostgate => collection.toString() == 'app.bsky.feed.postgate'; - /// Returns true if this uri is not `app.bsky.graph.listitem`, otherwise false. - bool get isNotGraphListitem => !isGraphListitem; + /// Returns true if this uri is not `app.bsky.feed.postgate`, otherwise false. + bool get isNotFeedPostgate => !isFeedPostgate; - /// Returns true if this uri is `app.bsky.feed.like`, otherwise false. - bool get isFeedLike => collection.toString() == 'app.bsky.feed.like'; + /// Returns true if this uri is `app.bsky.feed.repost`, otherwise false. + bool get isFeedRepost => collection.toString() == 'app.bsky.feed.repost'; - /// Returns true if this uri is not `app.bsky.feed.like`, otherwise false. - bool get isNotFeedLike => !isFeedLike; + /// Returns true if this uri is not `app.bsky.feed.repost`, otherwise false. + bool get isNotFeedRepost => !isFeedRepost; /// Returns true if this uri is `app.bsky.feed.threadgate`, otherwise false. bool get isFeedThreadgate => @@ -81,49 +65,51 @@ extension AtUriExtension on AtUri { /// Returns true if this uri is not `app.bsky.feed.threadgate`, otherwise false. bool get isNotFeedThreadgate => !isFeedThreadgate; - /// Returns true if this uri is `app.bsky.feed.generator`, otherwise false. - bool get isFeedGenerator => - collection.toString() == 'app.bsky.feed.generator'; + /// Returns true if this uri is `app.bsky.graph.block`, otherwise false. + bool get isGraphBlock => collection.toString() == 'app.bsky.graph.block'; - /// Returns true if this uri is not `app.bsky.feed.generator`, otherwise false. - bool get isNotFeedGenerator => !isFeedGenerator; + /// Returns true if this uri is not `app.bsky.graph.block`, otherwise false. + bool get isNotGraphBlock => !isGraphBlock; - /// Returns true if this uri is `app.bsky.feed.post`, otherwise false. - bool get isFeedPost => collection.toString() == 'app.bsky.feed.post'; + /// Returns true if this uri is `app.bsky.graph.follow`, otherwise false. + bool get isGraphFollow => collection.toString() == 'app.bsky.graph.follow'; - /// Returns true if this uri is not `app.bsky.feed.post`, otherwise false. - bool get isNotFeedPost => !isFeedPost; + /// Returns true if this uri is not `app.bsky.graph.follow`, otherwise false. + bool get isNotGraphFollow => !isGraphFollow; - /// Returns true if this uri is `app.bsky.feed.repost`, otherwise false. - bool get isFeedRepost => collection.toString() == 'app.bsky.feed.repost'; + /// Returns true if this uri is `app.bsky.graph.list`, otherwise false. + bool get isGraphList => collection.toString() == 'app.bsky.graph.list'; - /// Returns true if this uri is not `app.bsky.feed.repost`, otherwise false. - bool get isNotFeedRepost => !isFeedRepost; + /// Returns true if this uri is not `app.bsky.graph.list`, otherwise false. + bool get isNotGraphList => !isGraphList; - /// Returns true if this uri is `app.bsky.feed.postgate`, otherwise false. - bool get isFeedPostgate => collection.toString() == 'app.bsky.feed.postgate'; + /// Returns true if this uri is `app.bsky.graph.listblock`, otherwise false. + bool get isGraphListblock => + collection.toString() == 'app.bsky.graph.listblock'; - /// Returns true if this uri is not `app.bsky.feed.postgate`, otherwise false. - bool get isNotFeedPostgate => !isFeedPostgate; + /// Returns true if this uri is not `app.bsky.graph.listblock`, otherwise false. + bool get isNotGraphListblock => !isGraphListblock; - /// Returns true if this uri is `app.bsky.actor.status`, otherwise false. - bool get isActorStatus => collection.toString() == 'app.bsky.actor.status'; + /// Returns true if this uri is `app.bsky.graph.listitem`, otherwise false. + bool get isGraphListitem => + collection.toString() == 'app.bsky.graph.listitem'; - /// Returns true if this uri is not `app.bsky.actor.status`, otherwise false. - bool get isNotActorStatus => !isActorStatus; + /// Returns true if this uri is not `app.bsky.graph.listitem`, otherwise false. + bool get isNotGraphListitem => !isGraphListitem; - /// Returns true if this uri is `app.bsky.actor.profile`, otherwise false. - bool get isActorProfile => collection.toString() == 'app.bsky.actor.profile'; + /// Returns true if this uri is `app.bsky.graph.starterpack`, otherwise false. + bool get isGraphStarterpack => + collection.toString() == 'app.bsky.graph.starterpack'; - /// Returns true if this uri is not `app.bsky.actor.profile`, otherwise false. - bool get isNotActorProfile => !isActorProfile; + /// Returns true if this uri is not `app.bsky.graph.starterpack`, otherwise false. + bool get isNotGraphStarterpack => !isGraphStarterpack; - /// Returns true if this uri is `app.bsky.notification.declaration`, otherwise false. - bool get isNotificationDeclaration => - collection.toString() == 'app.bsky.notification.declaration'; + /// Returns true if this uri is `app.bsky.graph.verification`, otherwise false. + bool get isGraphVerification => + collection.toString() == 'app.bsky.graph.verification'; - /// Returns true if this uri is not `app.bsky.notification.declaration`, otherwise false. - bool get isNotNotificationDeclaration => !isNotificationDeclaration; + /// Returns true if this uri is not `app.bsky.graph.verification`, otherwise false. + bool get isNotGraphVerification => !isGraphVerification; /// Returns true if this uri is `app.bsky.labeler.service`, otherwise false. bool get isLabelerService => @@ -132,10 +118,24 @@ extension AtUriExtension on AtUri { /// Returns true if this uri is not `app.bsky.labeler.service`, otherwise false. bool get isNotLabelerService => !isLabelerService; + /// Returns true if this uri is `app.bsky.notification.declaration`, otherwise false. + bool get isNotificationDeclaration => + collection.toString() == 'app.bsky.notification.declaration'; + + /// Returns true if this uri is not `app.bsky.notification.declaration`, otherwise false. + bool get isNotNotificationDeclaration => !isNotificationDeclaration; + /// Returns true if this uri is `chat.bsky.actor.declaration`, otherwise false. bool get isActorDeclaration => collection.toString() == 'chat.bsky.actor.declaration'; /// Returns true if this uri is not `chat.bsky.actor.declaration`, otherwise false. bool get isNotActorDeclaration => !isActorDeclaration; + + /// Returns true if this uri is `com.atproto.lexicon.schema`, otherwise false. + bool get isLexiconSchema => + collection.toString() == 'com.atproto.lexicon.schema'; + + /// Returns true if this uri is not `com.atproto.lexicon.schema`, otherwise false. + bool get isNotLexiconSchema => !isLexiconSchema; } diff --git a/packages/bluesky/lib/src/services/codegen/chat/bsky/actor_service.dart b/packages/bluesky/lib/src/services/codegen/chat/bsky/actor_service.dart index 68790d5bc..02ce8296e 100644 --- a/packages/bluesky/lib/src/services/codegen/chat/bsky/actor_service.dart +++ b/packages/bluesky/lib/src/services/codegen/chat/bsky/actor_service.dart @@ -66,6 +66,8 @@ base class ActorService { ActorService(this.ctx) : _declaration = ActorDeclarationRecordAccessor(ctx); + /// A declaration of a Bluesky chat account. + ActorDeclarationRecordAccessor get declaration => _declaration; Future> deleteAccount({ String? $service, Map? $headers, @@ -84,9 +86,6 @@ base class ActorService { $headers: $headers, $unknown: $unknown, ); - - /// A declaration of a Bluesky chat account. - ActorDeclarationRecordAccessor get declaration => _declaration; } final class ActorDeclarationRecordAccessor { diff --git a/packages/bluesky/lib/src/services/codegen/chat/bsky/convo_service.dart b/packages/bluesky/lib/src/services/codegen/chat/bsky/convo_service.dart index e48e426f1..0809b04b5 100644 --- a/packages/bluesky/lib/src/services/codegen/chat/bsky/convo_service.dart +++ b/packages/bluesky/lib/src/services/codegen/chat/bsky/convo_service.dart @@ -40,6 +40,20 @@ import 'convo/updateRead/output.dart'; // LexGenerator // ************************************************************************** +Future> chatBskyConvoAcceptConvo({ + required String convoId, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.chatBskyConvoAcceptConvo, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'convoId': convoId}, + to: const ConvoAcceptConvoOutputConverter().fromJson, +); + /// Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction. Future> chatBskyConvoAddReaction({ required String convoId, @@ -61,40 +75,19 @@ Future> chatBskyConvoAddReaction({ }, to: const ConvoAddReactionOutputConverter().fromJson, ); -Future> chatBskyConvoGetLog({ - String? cursor, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.chatBskyConvoGetLog, - service: $service, - headers: $headers, - parameters: {...?$unknown, if (cursor != null) 'cursor': cursor}, - to: const ConvoGetLogOutputConverter().fromJson, -); - -/// Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't. -Future> chatBskyConvoRemoveReaction({ +Future> chatBskyConvoDeleteMessageForSelf({ required String convoId, required String messageId, - required String value, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.chatBskyConvoRemoveReaction, + ns.chatBskyConvoDeleteMessageForSelf, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'convoId': convoId, - 'messageId': messageId, - 'value': value, - }, - to: const ConvoRemoveReactionOutputConverter().fromJson, + body: {...?$unknown, 'convoId': convoId, 'messageId': messageId}, + to: const DeletedMessageViewConverter().fromJson, ); Future> chatBskyConvoGetConvo({ required String convoId, @@ -109,33 +102,21 @@ Future> chatBskyConvoGetConvo({ parameters: {...?$unknown, 'convoId': convoId}, to: const ConvoGetConvoOutputConverter().fromJson, ); -Future> -chatBskyConvoSendMessageBatch({ - required List items, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.chatBskyConvoSendMessageBatch, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'items': items.map((e) => e.toJson()).toList()}, - to: const ConvoSendMessageBatchOutputConverter().fromJson, -); -Future> chatBskyConvoSendMessage({ - required String convoId, - required MessageInput message, + +/// Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned. +Future> +chatBskyConvoGetConvoAvailability({ + required List members, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.chatBskyConvoSendMessage, +}) async => await $ctx.get( + ns.chatBskyConvoGetConvoAvailability, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'convoId': convoId, 'message': message.toJson()}, - to: const MessageViewConverter().fromJson, + headers: $headers, + parameters: {...?$unknown, 'members': members}, + to: const ConvoGetConvoAvailabilityOutputConverter().fromJson, ); Future> chatBskyConvoGetConvoForMembers({ @@ -151,58 +132,51 @@ chatBskyConvoGetConvoForMembers({ parameters: {...?$unknown, 'members': members}, to: const ConvoGetConvoForMembersOutputConverter().fromJson, ); -Future> chatBskyConvoUpdateAllRead({ - ConvoUpdateAllReadStatus? status, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.chatBskyConvoUpdateAllRead, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, if (status != null) 'status': status.toJson()}, - to: const ConvoUpdateAllReadOutputConverter().fromJson, -); -Future> chatBskyConvoMuteConvo({ - required String convoId, +Future> chatBskyConvoGetLog({ + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.chatBskyConvoMuteConvo, +}) async => await $ctx.get( + ns.chatBskyConvoGetLog, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'convoId': convoId}, - to: const ConvoMuteConvoOutputConverter().fromJson, + headers: $headers, + parameters: {...?$unknown, if (cursor != null) 'cursor': cursor}, + to: const ConvoGetLogOutputConverter().fromJson, ); -Future> chatBskyConvoDeleteMessageForSelf({ +Future> chatBskyConvoGetMessages({ required String convoId, - required String messageId, + int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.chatBskyConvoDeleteMessageForSelf, +}) async => await $ctx.get( + ns.chatBskyConvoGetMessages, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'convoId': convoId, 'messageId': messageId}, - to: const DeletedMessageViewConverter().fromJson, + headers: $headers, + parameters: { + ...?$unknown, + 'convoId': convoId, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const ConvoGetMessagesOutputConverter().fromJson, ); -Future> chatBskyConvoUnmuteConvo({ +Future> chatBskyConvoLeaveConvo({ required String convoId, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.chatBskyConvoUnmuteConvo, + ns.chatBskyConvoLeaveConvo, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: {...?$unknown, 'convoId': convoId}, - to: const ConvoUnmuteConvoOutputConverter().fromJson, + to: const ConvoLeaveConvoOutputConverter().fromJson, ); Future> chatBskyConvoListConvos({ int? limit, @@ -226,85 +200,112 @@ Future> chatBskyConvoListConvos({ }, to: const ConvoListConvosOutputConverter().fromJson, ); -Future> chatBskyConvoLeaveConvo({ +Future> chatBskyConvoMuteConvo({ required String convoId, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.chatBskyConvoLeaveConvo, + ns.chatBskyConvoMuteConvo, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: {...?$unknown, 'convoId': convoId}, - to: const ConvoLeaveConvoOutputConverter().fromJson, + to: const ConvoMuteConvoOutputConverter().fromJson, ); -Future> chatBskyConvoAcceptConvo({ + +/// Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't. +Future> chatBskyConvoRemoveReaction({ required String convoId, + required String messageId, + required String value, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.chatBskyConvoAcceptConvo, + ns.chatBskyConvoRemoveReaction, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'convoId': convoId}, - to: const ConvoAcceptConvoOutputConverter().fromJson, + body: { + ...?$unknown, + 'convoId': convoId, + 'messageId': messageId, + 'value': value, + }, + to: const ConvoRemoveReactionOutputConverter().fromJson, ); -Future> chatBskyConvoUpdateRead({ +Future> chatBskyConvoSendMessage({ required String convoId, - String? messageId, + required MessageInput message, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.chatBskyConvoUpdateRead, + ns.chatBskyConvoSendMessage, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'convoId': convoId, - if (messageId != null) 'messageId': messageId, - }, - to: const ConvoUpdateReadOutputConverter().fromJson, + body: {...?$unknown, 'convoId': convoId, 'message': message.toJson()}, + to: const MessageViewConverter().fromJson, ); - -/// Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned. -Future> -chatBskyConvoGetConvoAvailability({ - required List members, +Future> +chatBskyConvoSendMessageBatch({ + required List items, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.chatBskyConvoGetConvoAvailability, +}) async => await $ctx.post( + ns.chatBskyConvoSendMessageBatch, service: $service, - headers: $headers, - parameters: {...?$unknown, 'members': members}, - to: const ConvoGetConvoAvailabilityOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'items': items.map((e) => e.toJson()).toList()}, + to: const ConvoSendMessageBatchOutputConverter().fromJson, ); -Future> chatBskyConvoGetMessages({ +Future> chatBskyConvoUnmuteConvo({ required String convoId, - int? limit, - String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.chatBskyConvoGetMessages, +}) async => await $ctx.post( + ns.chatBskyConvoUnmuteConvo, service: $service, - headers: $headers, - parameters: { + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'convoId': convoId}, + to: const ConvoUnmuteConvoOutputConverter().fromJson, +); +Future> chatBskyConvoUpdateAllRead({ + ConvoUpdateAllReadStatus? status, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.chatBskyConvoUpdateAllRead, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, if (status != null) 'status': status.toJson()}, + to: const ConvoUpdateAllReadOutputConverter().fromJson, +); +Future> chatBskyConvoUpdateRead({ + required String convoId, + String? messageId, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.chatBskyConvoUpdateRead, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: { ...?$unknown, 'convoId': convoId, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, + if (messageId != null) 'messageId': messageId, }, - to: const ConvoGetMessagesOutputConverter().fromJson, + to: const ConvoUpdateReadOutputConverter().fromJson, ); /// `chat.bsky.convo.*` @@ -314,45 +315,28 @@ base class ConvoService { ConvoService(this.ctx); - /// Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction. - Future> addReaction({ + Future> acceptConvo({ required String convoId, - required String messageId, - required String value, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoAddReaction( + }) async => await chatBskyConvoAcceptConvo( convoId: convoId, - messageId: messageId, - value: value, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - Future> getLog({ - String? cursor, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await chatBskyConvoGetLog( - cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't. - Future> removeReaction({ + /// Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction. + Future> addReaction({ required String convoId, required String messageId, required String value, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoRemoveReaction( + }) async => await chatBskyConvoAddReaction( convoId: convoId, messageId: messageId, value: value, @@ -361,100 +345,92 @@ base class ConvoService { $headers: $headers, $unknown: $unknown, ); - Future> getConvo({ + Future> deleteMessageForSelf({ required String convoId, + required String messageId, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoGetConvo( + }) async => await chatBskyConvoDeleteMessageForSelf( convoId: convoId, + messageId: messageId, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> sendMessageBatch({ - required List items, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await chatBskyConvoSendMessageBatch( - items: items, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - Future> sendMessage({ + Future> getConvo({ required String convoId, - required MessageInput message, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoSendMessage( + }) async => await chatBskyConvoGetConvo( convoId: convoId, - message: message, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> getConvoForMembers({ + + /// Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned. + Future> getConvoAvailability({ required List members, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoGetConvoForMembers( + }) async => await chatBskyConvoGetConvoAvailability( members: members, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> updateAllRead({ - ConvoUpdateAllReadStatus? status, + Future> getConvoForMembers({ + required List members, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoUpdateAllRead( - status: status, + }) async => await chatBskyConvoGetConvoForMembers( + members: members, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> muteConvo({ - required String convoId, + Future> getLog({ + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoMuteConvo( - convoId: convoId, + }) async => await chatBskyConvoGetLog( + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> deleteMessageForSelf({ + Future> getMessages({ required String convoId, - required String messageId, + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoDeleteMessageForSelf( + }) async => await chatBskyConvoGetMessages( convoId: convoId, - messageId: messageId, + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> unmuteConvo({ + Future> leaveConvo({ required String convoId, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoUnmuteConvo( + }) async => await chatBskyConvoLeaveConvo( convoId: convoId, $ctx: ctx, $service: $service, @@ -479,69 +455,95 @@ base class ConvoService { $headers: $headers, $unknown: $unknown, ); - Future> leaveConvo({ + Future> muteConvo({ required String convoId, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoLeaveConvo( + }) async => await chatBskyConvoMuteConvo( convoId: convoId, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> acceptConvo({ + + /// Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't. + Future> removeReaction({ required String convoId, + required String messageId, + required String value, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoAcceptConvo( + }) async => await chatBskyConvoRemoveReaction( convoId: convoId, + messageId: messageId, + value: value, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> updateRead({ + Future> sendMessage({ required String convoId, - String? messageId, + required MessageInput message, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoUpdateRead( + }) async => await chatBskyConvoSendMessage( convoId: convoId, - messageId: messageId, + message: message, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - - /// Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned. - Future> getConvoAvailability({ - required List members, + Future> sendMessageBatch({ + required List items, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoGetConvoAvailability( - members: members, + }) async => await chatBskyConvoSendMessageBatch( + items: items, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - Future> getMessages({ + Future> unmuteConvo({ required String convoId, - int? limit, - String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyConvoGetMessages( + }) async => await chatBskyConvoUnmuteConvo( convoId: convoId, - limit: limit, - cursor: cursor, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + Future> updateAllRead({ + ConvoUpdateAllReadStatus? status, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await chatBskyConvoUpdateAllRead( + status: status, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + Future> updateRead({ + required String convoId, + String? messageId, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await chatBskyConvoUpdateRead( + convoId: convoId, + messageId: messageId, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/chat/bsky/moderation_service.dart b/packages/bluesky/lib/src/services/codegen/chat/bsky/moderation_service.dart index 4790b9fa2..d6e86bcf5 100644 --- a/packages/bluesky/lib/src/services/codegen/chat/bsky/moderation_service.dart +++ b/packages/bluesky/lib/src/services/codegen/chat/bsky/moderation_service.dart @@ -20,24 +20,19 @@ import 'moderation/getMessageContext/output.dart'; // LexGenerator // ************************************************************************** -Future> chatBskyModerationUpdateActorAccess({ +Future> +chatBskyModerationGetActorMetadata({ required String actor, - required bool allowAccess, - String? ref, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.chatBskyModerationUpdateActorAccess, +}) async => await $ctx.get( + ns.chatBskyModerationGetActorMetadata, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'actor': actor, - 'allowAccess': allowAccess, - if (ref != null) 'ref': ref, - }, + headers: $headers, + parameters: {...?$unknown, 'actor': actor}, + to: const ModerationGetActorMetadataOutputConverter().fromJson, ); Future> chatBskyModerationGetMessageContext({ @@ -62,19 +57,24 @@ chatBskyModerationGetMessageContext({ }, to: const ModerationGetMessageContextOutputConverter().fromJson, ); -Future> -chatBskyModerationGetActorMetadata({ +Future> chatBskyModerationUpdateActorAccess({ required String actor, + required bool allowAccess, + String? ref, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.chatBskyModerationGetActorMetadata, +}) async => await $ctx.post( + ns.chatBskyModerationUpdateActorAccess, service: $service, - headers: $headers, - parameters: {...?$unknown, 'actor': actor}, - to: const ModerationGetActorMetadataOutputConverter().fromJson, + headers: {'Content-type': 'application/json', ...?$headers}, + body: { + ...?$unknown, + 'actor': actor, + 'allowAccess': allowAccess, + if (ref != null) 'ref': ref, + }, ); /// `chat.bsky.moderation.*` @@ -84,17 +84,13 @@ base class ModerationService { ModerationService(this.ctx); - Future> updateActorAccess({ + Future> getActorMetadata({ required String actor, - required bool allowAccess, - String? ref, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyModerationUpdateActorAccess( + }) async => await chatBskyModerationGetActorMetadata( actor: actor, - allowAccess: allowAccess, - ref: ref, $ctx: ctx, $service: $service, $headers: $headers, @@ -118,13 +114,17 @@ base class ModerationService { $headers: $headers, $unknown: $unknown, ); - Future> getActorMetadata({ + Future> updateActorAccess({ required String actor, + required bool allowAccess, + String? ref, String? $service, Map? $headers, Map? $unknown, - }) async => await chatBskyModerationGetActorMetadata( + }) async => await chatBskyModerationUpdateActorAccess( actor: actor, + allowAccess: allowAccess, + ref: ref, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/repo_commit_handler.dart b/packages/bluesky/lib/src/services/codegen/repo_commit_handler.dart index 4bf91849f..910eae731 100644 --- a/packages/bluesky/lib/src/services/codegen/repo_commit_handler.dart +++ b/packages/bluesky/lib/src/services/codegen/repo_commit_handler.dart @@ -49,193 +49,193 @@ typedef RepoCommitOnUpdate = typedef RepoCommitOnDelete = FutureOr Function(RepoCommitDelete data); final class RepoCommitHandler { - final RepoCommitOnCreate? _onCreateLexiconSchema; - final RepoCommitOnUpdate? _onUpdateLexiconSchema; - final RepoCommitOnDelete? _onDeleteLexiconSchema; - final RepoCommitOnCreate? _onCreateGraphStarterpack; - final RepoCommitOnUpdate? _onUpdateGraphStarterpack; - final RepoCommitOnDelete? _onDeleteGraphStarterpack; - final RepoCommitOnCreate? _onCreateGraphList; - final RepoCommitOnUpdate? _onUpdateGraphList; - final RepoCommitOnDelete? _onDeleteGraphList; - final RepoCommitOnCreate? _onCreateGraphListblock; - final RepoCommitOnUpdate? _onUpdateGraphListblock; - final RepoCommitOnDelete? _onDeleteGraphListblock; - final RepoCommitOnCreate? _onCreateGraphFollow; - final RepoCommitOnUpdate? _onUpdateGraphFollow; - final RepoCommitOnDelete? _onDeleteGraphFollow; - final RepoCommitOnCreate? _onCreateGraphVerification; - final RepoCommitOnUpdate? _onUpdateGraphVerification; - final RepoCommitOnDelete? _onDeleteGraphVerification; - final RepoCommitOnCreate? _onCreateGraphBlock; - final RepoCommitOnUpdate? _onUpdateGraphBlock; - final RepoCommitOnDelete? _onDeleteGraphBlock; - final RepoCommitOnCreate? _onCreateGraphListitem; - final RepoCommitOnUpdate? _onUpdateGraphListitem; - final RepoCommitOnDelete? _onDeleteGraphListitem; - final RepoCommitOnCreate? _onCreateFeedLike; - final RepoCommitOnUpdate? _onUpdateFeedLike; - final RepoCommitOnDelete? _onDeleteFeedLike; - final RepoCommitOnCreate? _onCreateFeedThreadgate; - final RepoCommitOnUpdate? _onUpdateFeedThreadgate; - final RepoCommitOnDelete? _onDeleteFeedThreadgate; + final RepoCommitOnCreate? _onCreateActorProfile; + final RepoCommitOnUpdate? _onUpdateActorProfile; + final RepoCommitOnDelete? _onDeleteActorProfile; + final RepoCommitOnCreate? _onCreateActorStatus; + final RepoCommitOnUpdate? _onUpdateActorStatus; + final RepoCommitOnDelete? _onDeleteActorStatus; final RepoCommitOnCreate? _onCreateFeedGenerator; final RepoCommitOnUpdate? _onUpdateFeedGenerator; final RepoCommitOnDelete? _onDeleteFeedGenerator; + final RepoCommitOnCreate? _onCreateFeedLike; + final RepoCommitOnUpdate? _onUpdateFeedLike; + final RepoCommitOnDelete? _onDeleteFeedLike; final RepoCommitOnCreate? _onCreateFeedPost; final RepoCommitOnUpdate? _onUpdateFeedPost; final RepoCommitOnDelete? _onDeleteFeedPost; - final RepoCommitOnCreate? _onCreateFeedRepost; - final RepoCommitOnUpdate? _onUpdateFeedRepost; - final RepoCommitOnDelete? _onDeleteFeedRepost; final RepoCommitOnCreate? _onCreateFeedPostgate; final RepoCommitOnUpdate? _onUpdateFeedPostgate; final RepoCommitOnDelete? _onDeleteFeedPostgate; - final RepoCommitOnCreate? _onCreateActorStatus; - final RepoCommitOnUpdate? _onUpdateActorStatus; - final RepoCommitOnDelete? _onDeleteActorStatus; - final RepoCommitOnCreate? _onCreateActorProfile; - final RepoCommitOnUpdate? _onUpdateActorProfile; - final RepoCommitOnDelete? _onDeleteActorProfile; + final RepoCommitOnCreate? _onCreateFeedRepost; + final RepoCommitOnUpdate? _onUpdateFeedRepost; + final RepoCommitOnDelete? _onDeleteFeedRepost; + final RepoCommitOnCreate? _onCreateFeedThreadgate; + final RepoCommitOnUpdate? _onUpdateFeedThreadgate; + final RepoCommitOnDelete? _onDeleteFeedThreadgate; + final RepoCommitOnCreate? _onCreateGraphBlock; + final RepoCommitOnUpdate? _onUpdateGraphBlock; + final RepoCommitOnDelete? _onDeleteGraphBlock; + final RepoCommitOnCreate? _onCreateGraphFollow; + final RepoCommitOnUpdate? _onUpdateGraphFollow; + final RepoCommitOnDelete? _onDeleteGraphFollow; + final RepoCommitOnCreate? _onCreateGraphList; + final RepoCommitOnUpdate? _onUpdateGraphList; + final RepoCommitOnDelete? _onDeleteGraphList; + final RepoCommitOnCreate? _onCreateGraphListblock; + final RepoCommitOnUpdate? _onUpdateGraphListblock; + final RepoCommitOnDelete? _onDeleteGraphListblock; + final RepoCommitOnCreate? _onCreateGraphListitem; + final RepoCommitOnUpdate? _onUpdateGraphListitem; + final RepoCommitOnDelete? _onDeleteGraphListitem; + final RepoCommitOnCreate? _onCreateGraphStarterpack; + final RepoCommitOnUpdate? _onUpdateGraphStarterpack; + final RepoCommitOnDelete? _onDeleteGraphStarterpack; + final RepoCommitOnCreate? _onCreateGraphVerification; + final RepoCommitOnUpdate? _onUpdateGraphVerification; + final RepoCommitOnDelete? _onDeleteGraphVerification; + final RepoCommitOnCreate? _onCreateLabelerService; + final RepoCommitOnUpdate? _onUpdateLabelerService; + final RepoCommitOnDelete? _onDeleteLabelerService; final RepoCommitOnCreate? _onCreateNotificationDeclaration; final RepoCommitOnUpdate? _onUpdateNotificationDeclaration; final RepoCommitOnDelete? _onDeleteNotificationDeclaration; - final RepoCommitOnCreate? _onCreateLabelerService; - final RepoCommitOnUpdate? _onUpdateLabelerService; - final RepoCommitOnDelete? _onDeleteLabelerService; final RepoCommitOnCreate? _onCreateActorDeclaration; final RepoCommitOnUpdate? _onUpdateActorDeclaration; final RepoCommitOnDelete? _onDeleteActorDeclaration; + final RepoCommitOnCreate? _onCreateLexiconSchema; + final RepoCommitOnUpdate? _onUpdateLexiconSchema; + final RepoCommitOnDelete? _onDeleteLexiconSchema; final RepoCommitOnCreate>? _onCreateUnknown; final RepoCommitOnUpdate>? _onUpdateUnknown; final RepoCommitOnDelete? _onDeleteUnknown; const RepoCommitHandler({ - final RepoCommitOnCreate? onCreateLexiconSchema, - final RepoCommitOnUpdate? onUpdateLexiconSchema, - final RepoCommitOnDelete? onDeleteLexiconSchema, - final RepoCommitOnCreate? onCreateGraphStarterpack, - final RepoCommitOnUpdate? onUpdateGraphStarterpack, - final RepoCommitOnDelete? onDeleteGraphStarterpack, + final RepoCommitOnCreate? onCreateActorProfile, + final RepoCommitOnUpdate? onUpdateActorProfile, + final RepoCommitOnDelete? onDeleteActorProfile, + final RepoCommitOnCreate? onCreateActorStatus, + final RepoCommitOnUpdate? onUpdateActorStatus, + final RepoCommitOnDelete? onDeleteActorStatus, + final RepoCommitOnCreate? onCreateFeedGenerator, + final RepoCommitOnUpdate? onUpdateFeedGenerator, + final RepoCommitOnDelete? onDeleteFeedGenerator, + final RepoCommitOnCreate? onCreateFeedLike, + final RepoCommitOnUpdate? onUpdateFeedLike, + final RepoCommitOnDelete? onDeleteFeedLike, + final RepoCommitOnCreate? onCreateFeedPost, + final RepoCommitOnUpdate? onUpdateFeedPost, + final RepoCommitOnDelete? onDeleteFeedPost, + final RepoCommitOnCreate? onCreateFeedPostgate, + final RepoCommitOnUpdate? onUpdateFeedPostgate, + final RepoCommitOnDelete? onDeleteFeedPostgate, + final RepoCommitOnCreate? onCreateFeedRepost, + final RepoCommitOnUpdate? onUpdateFeedRepost, + final RepoCommitOnDelete? onDeleteFeedRepost, + final RepoCommitOnCreate? onCreateFeedThreadgate, + final RepoCommitOnUpdate? onUpdateFeedThreadgate, + final RepoCommitOnDelete? onDeleteFeedThreadgate, + final RepoCommitOnCreate? onCreateGraphBlock, + final RepoCommitOnUpdate? onUpdateGraphBlock, + final RepoCommitOnDelete? onDeleteGraphBlock, + final RepoCommitOnCreate? onCreateGraphFollow, + final RepoCommitOnUpdate? onUpdateGraphFollow, + final RepoCommitOnDelete? onDeleteGraphFollow, final RepoCommitOnCreate? onCreateGraphList, final RepoCommitOnUpdate? onUpdateGraphList, final RepoCommitOnDelete? onDeleteGraphList, final RepoCommitOnCreate? onCreateGraphListblock, final RepoCommitOnUpdate? onUpdateGraphListblock, final RepoCommitOnDelete? onDeleteGraphListblock, - final RepoCommitOnCreate? onCreateGraphFollow, - final RepoCommitOnUpdate? onUpdateGraphFollow, - final RepoCommitOnDelete? onDeleteGraphFollow, + final RepoCommitOnCreate? onCreateGraphListitem, + final RepoCommitOnUpdate? onUpdateGraphListitem, + final RepoCommitOnDelete? onDeleteGraphListitem, + final RepoCommitOnCreate? onCreateGraphStarterpack, + final RepoCommitOnUpdate? onUpdateGraphStarterpack, + final RepoCommitOnDelete? onDeleteGraphStarterpack, final RepoCommitOnCreate? onCreateGraphVerification, final RepoCommitOnUpdate? onUpdateGraphVerification, final RepoCommitOnDelete? onDeleteGraphVerification, - final RepoCommitOnCreate? onCreateGraphBlock, - final RepoCommitOnUpdate? onUpdateGraphBlock, - final RepoCommitOnDelete? onDeleteGraphBlock, - final RepoCommitOnCreate? onCreateGraphListitem, - final RepoCommitOnUpdate? onUpdateGraphListitem, - final RepoCommitOnDelete? onDeleteGraphListitem, - final RepoCommitOnCreate? onCreateFeedLike, - final RepoCommitOnUpdate? onUpdateFeedLike, - final RepoCommitOnDelete? onDeleteFeedLike, - final RepoCommitOnCreate? onCreateFeedThreadgate, - final RepoCommitOnUpdate? onUpdateFeedThreadgate, - final RepoCommitOnDelete? onDeleteFeedThreadgate, - final RepoCommitOnCreate? onCreateFeedGenerator, - final RepoCommitOnUpdate? onUpdateFeedGenerator, - final RepoCommitOnDelete? onDeleteFeedGenerator, - final RepoCommitOnCreate? onCreateFeedPost, - final RepoCommitOnUpdate? onUpdateFeedPost, - final RepoCommitOnDelete? onDeleteFeedPost, - final RepoCommitOnCreate? onCreateFeedRepost, - final RepoCommitOnUpdate? onUpdateFeedRepost, - final RepoCommitOnDelete? onDeleteFeedRepost, - final RepoCommitOnCreate? onCreateFeedPostgate, - final RepoCommitOnUpdate? onUpdateFeedPostgate, - final RepoCommitOnDelete? onDeleteFeedPostgate, - final RepoCommitOnCreate? onCreateActorStatus, - final RepoCommitOnUpdate? onUpdateActorStatus, - final RepoCommitOnDelete? onDeleteActorStatus, - final RepoCommitOnCreate? onCreateActorProfile, - final RepoCommitOnUpdate? onUpdateActorProfile, - final RepoCommitOnDelete? onDeleteActorProfile, + final RepoCommitOnCreate? onCreateLabelerService, + final RepoCommitOnUpdate? onUpdateLabelerService, + final RepoCommitOnDelete? onDeleteLabelerService, final RepoCommitOnCreate? onCreateNotificationDeclaration, final RepoCommitOnUpdate? onUpdateNotificationDeclaration, final RepoCommitOnDelete? onDeleteNotificationDeclaration, - final RepoCommitOnCreate? onCreateLabelerService, - final RepoCommitOnUpdate? onUpdateLabelerService, - final RepoCommitOnDelete? onDeleteLabelerService, final RepoCommitOnCreate? onCreateActorDeclaration, final RepoCommitOnUpdate? onUpdateActorDeclaration, final RepoCommitOnDelete? onDeleteActorDeclaration, + final RepoCommitOnCreate? onCreateLexiconSchema, + final RepoCommitOnUpdate? onUpdateLexiconSchema, + final RepoCommitOnDelete? onDeleteLexiconSchema, final RepoCommitOnCreate>? onCreateUnknown, final RepoCommitOnUpdate>? onUpdateUnknown, final RepoCommitOnDelete? onDeleteUnknown, - }) : _onCreateLexiconSchema = onCreateLexiconSchema, - _onUpdateLexiconSchema = onUpdateLexiconSchema, - _onDeleteLexiconSchema = onDeleteLexiconSchema, - _onCreateGraphStarterpack = onCreateGraphStarterpack, - _onUpdateGraphStarterpack = onUpdateGraphStarterpack, - _onDeleteGraphStarterpack = onDeleteGraphStarterpack, - _onCreateGraphList = onCreateGraphList, - _onUpdateGraphList = onUpdateGraphList, - _onDeleteGraphList = onDeleteGraphList, - _onCreateGraphListblock = onCreateGraphListblock, - _onUpdateGraphListblock = onUpdateGraphListblock, - _onDeleteGraphListblock = onDeleteGraphListblock, - _onCreateGraphFollow = onCreateGraphFollow, - _onUpdateGraphFollow = onUpdateGraphFollow, - _onDeleteGraphFollow = onDeleteGraphFollow, - _onCreateGraphVerification = onCreateGraphVerification, - _onUpdateGraphVerification = onUpdateGraphVerification, - _onDeleteGraphVerification = onDeleteGraphVerification, - _onCreateGraphBlock = onCreateGraphBlock, - _onUpdateGraphBlock = onUpdateGraphBlock, - _onDeleteGraphBlock = onDeleteGraphBlock, - _onCreateGraphListitem = onCreateGraphListitem, - _onUpdateGraphListitem = onUpdateGraphListitem, - _onDeleteGraphListitem = onDeleteGraphListitem, - _onCreateFeedLike = onCreateFeedLike, - _onUpdateFeedLike = onUpdateFeedLike, - _onDeleteFeedLike = onDeleteFeedLike, - _onCreateFeedThreadgate = onCreateFeedThreadgate, - _onUpdateFeedThreadgate = onUpdateFeedThreadgate, - _onDeleteFeedThreadgate = onDeleteFeedThreadgate, + }) : _onCreateActorProfile = onCreateActorProfile, + _onUpdateActorProfile = onUpdateActorProfile, + _onDeleteActorProfile = onDeleteActorProfile, + _onCreateActorStatus = onCreateActorStatus, + _onUpdateActorStatus = onUpdateActorStatus, + _onDeleteActorStatus = onDeleteActorStatus, _onCreateFeedGenerator = onCreateFeedGenerator, _onUpdateFeedGenerator = onUpdateFeedGenerator, _onDeleteFeedGenerator = onDeleteFeedGenerator, + _onCreateFeedLike = onCreateFeedLike, + _onUpdateFeedLike = onUpdateFeedLike, + _onDeleteFeedLike = onDeleteFeedLike, _onCreateFeedPost = onCreateFeedPost, _onUpdateFeedPost = onUpdateFeedPost, _onDeleteFeedPost = onDeleteFeedPost, - _onCreateFeedRepost = onCreateFeedRepost, - _onUpdateFeedRepost = onUpdateFeedRepost, - _onDeleteFeedRepost = onDeleteFeedRepost, _onCreateFeedPostgate = onCreateFeedPostgate, _onUpdateFeedPostgate = onUpdateFeedPostgate, _onDeleteFeedPostgate = onDeleteFeedPostgate, - _onCreateActorStatus = onCreateActorStatus, - _onUpdateActorStatus = onUpdateActorStatus, - _onDeleteActorStatus = onDeleteActorStatus, - _onCreateActorProfile = onCreateActorProfile, - _onUpdateActorProfile = onUpdateActorProfile, - _onDeleteActorProfile = onDeleteActorProfile, - _onCreateNotificationDeclaration = onCreateNotificationDeclaration, - _onUpdateNotificationDeclaration = onUpdateNotificationDeclaration, - _onDeleteNotificationDeclaration = onDeleteNotificationDeclaration, + _onCreateFeedRepost = onCreateFeedRepost, + _onUpdateFeedRepost = onUpdateFeedRepost, + _onDeleteFeedRepost = onDeleteFeedRepost, + _onCreateFeedThreadgate = onCreateFeedThreadgate, + _onUpdateFeedThreadgate = onUpdateFeedThreadgate, + _onDeleteFeedThreadgate = onDeleteFeedThreadgate, + _onCreateGraphBlock = onCreateGraphBlock, + _onUpdateGraphBlock = onUpdateGraphBlock, + _onDeleteGraphBlock = onDeleteGraphBlock, + _onCreateGraphFollow = onCreateGraphFollow, + _onUpdateGraphFollow = onUpdateGraphFollow, + _onDeleteGraphFollow = onDeleteGraphFollow, + _onCreateGraphList = onCreateGraphList, + _onUpdateGraphList = onUpdateGraphList, + _onDeleteGraphList = onDeleteGraphList, + _onCreateGraphListblock = onCreateGraphListblock, + _onUpdateGraphListblock = onUpdateGraphListblock, + _onDeleteGraphListblock = onDeleteGraphListblock, + _onCreateGraphListitem = onCreateGraphListitem, + _onUpdateGraphListitem = onUpdateGraphListitem, + _onDeleteGraphListitem = onDeleteGraphListitem, + _onCreateGraphStarterpack = onCreateGraphStarterpack, + _onUpdateGraphStarterpack = onUpdateGraphStarterpack, + _onDeleteGraphStarterpack = onDeleteGraphStarterpack, + _onCreateGraphVerification = onCreateGraphVerification, + _onUpdateGraphVerification = onUpdateGraphVerification, + _onDeleteGraphVerification = onDeleteGraphVerification, _onCreateLabelerService = onCreateLabelerService, _onUpdateLabelerService = onUpdateLabelerService, _onDeleteLabelerService = onDeleteLabelerService, + _onCreateNotificationDeclaration = onCreateNotificationDeclaration, + _onUpdateNotificationDeclaration = onUpdateNotificationDeclaration, + _onDeleteNotificationDeclaration = onDeleteNotificationDeclaration, _onCreateActorDeclaration = onCreateActorDeclaration, _onUpdateActorDeclaration = onUpdateActorDeclaration, _onDeleteActorDeclaration = onDeleteActorDeclaration, + _onCreateLexiconSchema = onCreateLexiconSchema, + _onUpdateLexiconSchema = onUpdateLexiconSchema, + _onDeleteLexiconSchema = onDeleteLexiconSchema, _onCreateUnknown = onCreateUnknown, _onUpdateUnknown = onUpdateUnknown, @@ -266,10 +266,10 @@ final class RepoCommitHandler { final uri = _getUri(data, op); final record = _getRecord(data, op); - if (uri.isLexiconSchema && LexiconSchemaRecord.validate(record)) { - await _onCreateLexiconSchema?.call( - RepoCommitCreate( - record: const LexiconSchemaRecordConverter().fromJson(record), + if (uri.isActorProfile && ActorProfileRecord.validate(record)) { + await _onCreateActorProfile?.call( + RepoCommitCreate( + record: const ActorProfileRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -278,10 +278,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphStarterpack && GraphStarterpackRecord.validate(record)) { - await _onCreateGraphStarterpack?.call( - RepoCommitCreate( - record: const GraphStarterpackRecordConverter().fromJson(record), + if (uri.isActorStatus && ActorStatusRecord.validate(record)) { + await _onCreateActorStatus?.call( + RepoCommitCreate( + record: const ActorStatusRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -290,10 +290,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphList && GraphListRecord.validate(record)) { - await _onCreateGraphList?.call( - RepoCommitCreate( - record: const GraphListRecordConverter().fromJson(record), + if (uri.isFeedGenerator && FeedGeneratorRecord.validate(record)) { + await _onCreateFeedGenerator?.call( + RepoCommitCreate( + record: const FeedGeneratorRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -302,10 +302,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphListblock && GraphListblockRecord.validate(record)) { - await _onCreateGraphListblock?.call( - RepoCommitCreate( - record: const GraphListblockRecordConverter().fromJson(record), + if (uri.isFeedLike && FeedLikeRecord.validate(record)) { + await _onCreateFeedLike?.call( + RepoCommitCreate( + record: const FeedLikeRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -314,10 +314,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphFollow && GraphFollowRecord.validate(record)) { - await _onCreateGraphFollow?.call( - RepoCommitCreate( - record: const GraphFollowRecordConverter().fromJson(record), + if (uri.isFeedPost && FeedPostRecord.validate(record)) { + await _onCreateFeedPost?.call( + RepoCommitCreate( + record: const FeedPostRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -326,10 +326,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphVerification && GraphVerificationRecord.validate(record)) { - await _onCreateGraphVerification?.call( - RepoCommitCreate( - record: const GraphVerificationRecordConverter().fromJson(record), + if (uri.isFeedPostgate && FeedPostgateRecord.validate(record)) { + await _onCreateFeedPostgate?.call( + RepoCommitCreate( + record: const FeedPostgateRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -338,10 +338,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphBlock && GraphBlockRecord.validate(record)) { - await _onCreateGraphBlock?.call( - RepoCommitCreate( - record: const GraphBlockRecordConverter().fromJson(record), + if (uri.isFeedRepost && FeedRepostRecord.validate(record)) { + await _onCreateFeedRepost?.call( + RepoCommitCreate( + record: const FeedRepostRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -350,10 +350,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphListitem && GraphListitemRecord.validate(record)) { - await _onCreateGraphListitem?.call( - RepoCommitCreate( - record: const GraphListitemRecordConverter().fromJson(record), + if (uri.isFeedThreadgate && FeedThreadgateRecord.validate(record)) { + await _onCreateFeedThreadgate?.call( + RepoCommitCreate( + record: const FeedThreadgateRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -362,10 +362,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedLike && FeedLikeRecord.validate(record)) { - await _onCreateFeedLike?.call( - RepoCommitCreate( - record: const FeedLikeRecordConverter().fromJson(record), + if (uri.isGraphBlock && GraphBlockRecord.validate(record)) { + await _onCreateGraphBlock?.call( + RepoCommitCreate( + record: const GraphBlockRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -374,10 +374,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedThreadgate && FeedThreadgateRecord.validate(record)) { - await _onCreateFeedThreadgate?.call( - RepoCommitCreate( - record: const FeedThreadgateRecordConverter().fromJson(record), + if (uri.isGraphFollow && GraphFollowRecord.validate(record)) { + await _onCreateGraphFollow?.call( + RepoCommitCreate( + record: const GraphFollowRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -386,10 +386,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedGenerator && FeedGeneratorRecord.validate(record)) { - await _onCreateFeedGenerator?.call( - RepoCommitCreate( - record: const FeedGeneratorRecordConverter().fromJson(record), + if (uri.isGraphList && GraphListRecord.validate(record)) { + await _onCreateGraphList?.call( + RepoCommitCreate( + record: const GraphListRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -398,10 +398,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedPost && FeedPostRecord.validate(record)) { - await _onCreateFeedPost?.call( - RepoCommitCreate( - record: const FeedPostRecordConverter().fromJson(record), + if (uri.isGraphListblock && GraphListblockRecord.validate(record)) { + await _onCreateGraphListblock?.call( + RepoCommitCreate( + record: const GraphListblockRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -410,10 +410,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedRepost && FeedRepostRecord.validate(record)) { - await _onCreateFeedRepost?.call( - RepoCommitCreate( - record: const FeedRepostRecordConverter().fromJson(record), + if (uri.isGraphListitem && GraphListitemRecord.validate(record)) { + await _onCreateGraphListitem?.call( + RepoCommitCreate( + record: const GraphListitemRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -422,10 +422,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedPostgate && FeedPostgateRecord.validate(record)) { - await _onCreateFeedPostgate?.call( - RepoCommitCreate( - record: const FeedPostgateRecordConverter().fromJson(record), + if (uri.isGraphStarterpack && GraphStarterpackRecord.validate(record)) { + await _onCreateGraphStarterpack?.call( + RepoCommitCreate( + record: const GraphStarterpackRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -434,10 +434,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorStatus && ActorStatusRecord.validate(record)) { - await _onCreateActorStatus?.call( - RepoCommitCreate( - record: const ActorStatusRecordConverter().fromJson(record), + if (uri.isGraphVerification && GraphVerificationRecord.validate(record)) { + await _onCreateGraphVerification?.call( + RepoCommitCreate( + record: const GraphVerificationRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -446,10 +446,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorProfile && ActorProfileRecord.validate(record)) { - await _onCreateActorProfile?.call( - RepoCommitCreate( - record: const ActorProfileRecordConverter().fromJson(record), + if (uri.isLabelerService && LabelerServiceRecord.validate(record)) { + await _onCreateLabelerService?.call( + RepoCommitCreate( + record: const LabelerServiceRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -473,10 +473,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isLabelerService && LabelerServiceRecord.validate(record)) { - await _onCreateLabelerService?.call( - RepoCommitCreate( - record: const LabelerServiceRecordConverter().fromJson(record), + if (uri.isActorDeclaration && ActorDeclarationRecord.validate(record)) { + await _onCreateActorDeclaration?.call( + RepoCommitCreate( + record: const ActorDeclarationRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -485,10 +485,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorDeclaration && ActorDeclarationRecord.validate(record)) { - await _onCreateActorDeclaration?.call( - RepoCommitCreate( - record: const ActorDeclarationRecordConverter().fromJson(record), + if (uri.isLexiconSchema && LexiconSchemaRecord.validate(record)) { + await _onCreateLexiconSchema?.call( + RepoCommitCreate( + record: const LexiconSchemaRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -513,10 +513,10 @@ final class RepoCommitHandler { final uri = _getUri(data, op); final record = _getRecord(data, op); - if (uri.isLexiconSchema && LexiconSchemaRecord.validate(record)) { - await _onUpdateLexiconSchema?.call( - RepoCommitUpdate( - record: const LexiconSchemaRecordConverter().fromJson(record), + if (uri.isActorProfile && ActorProfileRecord.validate(record)) { + await _onUpdateActorProfile?.call( + RepoCommitUpdate( + record: const ActorProfileRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -526,10 +526,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphStarterpack && GraphStarterpackRecord.validate(record)) { - await _onUpdateGraphStarterpack?.call( - RepoCommitUpdate( - record: const GraphStarterpackRecordConverter().fromJson(record), + if (uri.isActorStatus && ActorStatusRecord.validate(record)) { + await _onUpdateActorStatus?.call( + RepoCommitUpdate( + record: const ActorStatusRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -539,10 +539,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphList && GraphListRecord.validate(record)) { - await _onUpdateGraphList?.call( - RepoCommitUpdate( - record: const GraphListRecordConverter().fromJson(record), + if (uri.isFeedGenerator && FeedGeneratorRecord.validate(record)) { + await _onUpdateFeedGenerator?.call( + RepoCommitUpdate( + record: const FeedGeneratorRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -552,10 +552,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphListblock && GraphListblockRecord.validate(record)) { - await _onUpdateGraphListblock?.call( - RepoCommitUpdate( - record: const GraphListblockRecordConverter().fromJson(record), + if (uri.isFeedLike && FeedLikeRecord.validate(record)) { + await _onUpdateFeedLike?.call( + RepoCommitUpdate( + record: const FeedLikeRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -565,10 +565,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphFollow && GraphFollowRecord.validate(record)) { - await _onUpdateGraphFollow?.call( - RepoCommitUpdate( - record: const GraphFollowRecordConverter().fromJson(record), + if (uri.isFeedPost && FeedPostRecord.validate(record)) { + await _onUpdateFeedPost?.call( + RepoCommitUpdate( + record: const FeedPostRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -578,10 +578,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphVerification && GraphVerificationRecord.validate(record)) { - await _onUpdateGraphVerification?.call( - RepoCommitUpdate( - record: const GraphVerificationRecordConverter().fromJson(record), + if (uri.isFeedPostgate && FeedPostgateRecord.validate(record)) { + await _onUpdateFeedPostgate?.call( + RepoCommitUpdate( + record: const FeedPostgateRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -591,10 +591,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphBlock && GraphBlockRecord.validate(record)) { - await _onUpdateGraphBlock?.call( - RepoCommitUpdate( - record: const GraphBlockRecordConverter().fromJson(record), + if (uri.isFeedRepost && FeedRepostRecord.validate(record)) { + await _onUpdateFeedRepost?.call( + RepoCommitUpdate( + record: const FeedRepostRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -604,10 +604,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphListitem && GraphListitemRecord.validate(record)) { - await _onUpdateGraphListitem?.call( - RepoCommitUpdate( - record: const GraphListitemRecordConverter().fromJson(record), + if (uri.isFeedThreadgate && FeedThreadgateRecord.validate(record)) { + await _onUpdateFeedThreadgate?.call( + RepoCommitUpdate( + record: const FeedThreadgateRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -617,10 +617,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedLike && FeedLikeRecord.validate(record)) { - await _onUpdateFeedLike?.call( - RepoCommitUpdate( - record: const FeedLikeRecordConverter().fromJson(record), + if (uri.isGraphBlock && GraphBlockRecord.validate(record)) { + await _onUpdateGraphBlock?.call( + RepoCommitUpdate( + record: const GraphBlockRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -630,10 +630,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedThreadgate && FeedThreadgateRecord.validate(record)) { - await _onUpdateFeedThreadgate?.call( - RepoCommitUpdate( - record: const FeedThreadgateRecordConverter().fromJson(record), + if (uri.isGraphFollow && GraphFollowRecord.validate(record)) { + await _onUpdateGraphFollow?.call( + RepoCommitUpdate( + record: const GraphFollowRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -643,10 +643,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedGenerator && FeedGeneratorRecord.validate(record)) { - await _onUpdateFeedGenerator?.call( - RepoCommitUpdate( - record: const FeedGeneratorRecordConverter().fromJson(record), + if (uri.isGraphList && GraphListRecord.validate(record)) { + await _onUpdateGraphList?.call( + RepoCommitUpdate( + record: const GraphListRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -656,10 +656,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedPost && FeedPostRecord.validate(record)) { - await _onUpdateFeedPost?.call( - RepoCommitUpdate( - record: const FeedPostRecordConverter().fromJson(record), + if (uri.isGraphListblock && GraphListblockRecord.validate(record)) { + await _onUpdateGraphListblock?.call( + RepoCommitUpdate( + record: const GraphListblockRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -669,10 +669,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedRepost && FeedRepostRecord.validate(record)) { - await _onUpdateFeedRepost?.call( - RepoCommitUpdate( - record: const FeedRepostRecordConverter().fromJson(record), + if (uri.isGraphListitem && GraphListitemRecord.validate(record)) { + await _onUpdateGraphListitem?.call( + RepoCommitUpdate( + record: const GraphListitemRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -682,10 +682,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedPostgate && FeedPostgateRecord.validate(record)) { - await _onUpdateFeedPostgate?.call( - RepoCommitUpdate( - record: const FeedPostgateRecordConverter().fromJson(record), + if (uri.isGraphStarterpack && GraphStarterpackRecord.validate(record)) { + await _onUpdateGraphStarterpack?.call( + RepoCommitUpdate( + record: const GraphStarterpackRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -695,10 +695,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorStatus && ActorStatusRecord.validate(record)) { - await _onUpdateActorStatus?.call( - RepoCommitUpdate( - record: const ActorStatusRecordConverter().fromJson(record), + if (uri.isGraphVerification && GraphVerificationRecord.validate(record)) { + await _onUpdateGraphVerification?.call( + RepoCommitUpdate( + record: const GraphVerificationRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -708,10 +708,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorProfile && ActorProfileRecord.validate(record)) { - await _onUpdateActorProfile?.call( - RepoCommitUpdate( - record: const ActorProfileRecordConverter().fromJson(record), + if (uri.isLabelerService && LabelerServiceRecord.validate(record)) { + await _onUpdateLabelerService?.call( + RepoCommitUpdate( + record: const LabelerServiceRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -737,10 +737,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isLabelerService && LabelerServiceRecord.validate(record)) { - await _onUpdateLabelerService?.call( - RepoCommitUpdate( - record: const LabelerServiceRecordConverter().fromJson(record), + if (uri.isActorDeclaration && ActorDeclarationRecord.validate(record)) { + await _onUpdateActorDeclaration?.call( + RepoCommitUpdate( + record: const ActorDeclarationRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -750,10 +750,10 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorDeclaration && ActorDeclarationRecord.validate(record)) { - await _onUpdateActorDeclaration?.call( - RepoCommitUpdate( - record: const ActorDeclarationRecordConverter().fromJson(record), + if (uri.isLexiconSchema && LexiconSchemaRecord.validate(record)) { + await _onUpdateLexiconSchema?.call( + RepoCommitUpdate( + record: const LexiconSchemaRecordConverter().fromJson(record), uri: uri, cid: op.cid, author: data.repo, @@ -779,8 +779,8 @@ final class RepoCommitHandler { Future _onDelete(final Commit data, final RepoOp op) async { final uri = _getUri(data, op); - if (uri.isLexiconSchema) { - await _onDeleteLexiconSchema?.call( + if (uri.isActorProfile) { + await _onDeleteActorProfile?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -790,8 +790,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphStarterpack) { - await _onDeleteGraphStarterpack?.call( + if (uri.isActorStatus) { + await _onDeleteActorStatus?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -801,8 +801,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphList) { - await _onDeleteGraphList?.call( + if (uri.isFeedGenerator) { + await _onDeleteFeedGenerator?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -812,8 +812,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphListblock) { - await _onDeleteGraphListblock?.call( + if (uri.isFeedLike) { + await _onDeleteFeedLike?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -823,8 +823,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphFollow) { - await _onDeleteGraphFollow?.call( + if (uri.isFeedPost) { + await _onDeleteFeedPost?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -834,8 +834,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphVerification) { - await _onDeleteGraphVerification?.call( + if (uri.isFeedPostgate) { + await _onDeleteFeedPostgate?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -845,8 +845,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphBlock) { - await _onDeleteGraphBlock?.call( + if (uri.isFeedRepost) { + await _onDeleteFeedRepost?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -856,8 +856,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isGraphListitem) { - await _onDeleteGraphListitem?.call( + if (uri.isFeedThreadgate) { + await _onDeleteFeedThreadgate?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -867,8 +867,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedLike) { - await _onDeleteFeedLike?.call( + if (uri.isGraphBlock) { + await _onDeleteGraphBlock?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -878,8 +878,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedThreadgate) { - await _onDeleteFeedThreadgate?.call( + if (uri.isGraphFollow) { + await _onDeleteGraphFollow?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -889,8 +889,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedGenerator) { - await _onDeleteFeedGenerator?.call( + if (uri.isGraphList) { + await _onDeleteGraphList?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -900,8 +900,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedPost) { - await _onDeleteFeedPost?.call( + if (uri.isGraphListblock) { + await _onDeleteGraphListblock?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -911,8 +911,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedRepost) { - await _onDeleteFeedRepost?.call( + if (uri.isGraphListitem) { + await _onDeleteGraphListitem?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -922,8 +922,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isFeedPostgate) { - await _onDeleteFeedPostgate?.call( + if (uri.isGraphStarterpack) { + await _onDeleteGraphStarterpack?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -933,8 +933,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorStatus) { - await _onDeleteActorStatus?.call( + if (uri.isGraphVerification) { + await _onDeleteGraphVerification?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -944,8 +944,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorProfile) { - await _onDeleteActorProfile?.call( + if (uri.isLabelerService) { + await _onDeleteLabelerService?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -966,8 +966,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isLabelerService) { - await _onDeleteLabelerService?.call( + if (uri.isActorDeclaration) { + await _onDeleteActorDeclaration?.call( RepoCommitDelete( uri: uri, author: data.repo, @@ -977,8 +977,8 @@ final class RepoCommitHandler { ); return; } - if (uri.isActorDeclaration) { - await _onDeleteActorDeclaration?.call( + if (uri.isLexiconSchema) { + await _onDeleteLexiconSchema?.call( RepoCommitDelete( uri: uri, author: data.repo, diff --git a/packages/bluesky/lib/src/services/codegen/tools/ozone/communication_service.dart b/packages/bluesky/lib/src/services/codegen/tools/ozone/communication_service.dart index 07718b75a..c34f317c3 100644 --- a/packages/bluesky/lib/src/services/codegen/tools/ozone/communication_service.dart +++ b/packages/bluesky/lib/src/services/codegen/tools/ozone/communication_service.dart @@ -46,34 +46,18 @@ Future> toolsOzoneCommunicationCreateTemplate({ to: const TemplateViewConverter().fromJson, ); -/// Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only. -Future> toolsOzoneCommunicationUpdateTemplate({ +/// Delete a communication template. +Future> toolsOzoneCommunicationDeleteTemplate({ required String id, - String? name, - String? lang, - String? contentMarkdown, - String? subject, - String? updatedBy, - bool? disabled, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.toolsOzoneCommunicationUpdateTemplate, + ns.toolsOzoneCommunicationDeleteTemplate, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'id': id, - if (name != null) 'name': name, - if (lang != null) 'lang': lang, - if (contentMarkdown != null) 'contentMarkdown': contentMarkdown, - if (subject != null) 'subject': subject, - if (updatedBy != null) 'updatedBy': updatedBy, - if (disabled != null) 'disabled': disabled, - }, - to: const TemplateViewConverter().fromJson, + body: {...?$unknown, 'id': id}, ); /// Get list of all communication templates. @@ -91,18 +75,34 @@ toolsOzoneCommunicationListTemplates({ to: const CommunicationListTemplatesOutputConverter().fromJson, ); -/// Delete a communication template. -Future> toolsOzoneCommunicationDeleteTemplate({ +/// Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only. +Future> toolsOzoneCommunicationUpdateTemplate({ required String id, + String? name, + String? lang, + String? contentMarkdown, + String? subject, + String? updatedBy, + bool? disabled, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.toolsOzoneCommunicationDeleteTemplate, + ns.toolsOzoneCommunicationUpdateTemplate, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'id': id}, + body: { + ...?$unknown, + 'id': id, + if (name != null) 'name': name, + if (lang != null) 'lang': lang, + if (contentMarkdown != null) 'contentMarkdown': contentMarkdown, + if (subject != null) 'subject': subject, + if (updatedBy != null) 'updatedBy': updatedBy, + if (disabled != null) 'disabled': disabled, + }, + to: const TemplateViewConverter().fromJson, ); /// `tools.ozone.communication.*` @@ -134,26 +134,14 @@ base class CommunicationService { $unknown: $unknown, ); - /// Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only. - Future> updateTemplate({ + /// Delete a communication template. + Future> deleteTemplate({ required String id, - String? name, - String? lang, - String? contentMarkdown, - String? subject, - String? updatedBy, - bool? disabled, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneCommunicationUpdateTemplate( + }) async => await toolsOzoneCommunicationDeleteTemplate( id: id, - name: name, - lang: lang, - contentMarkdown: contentMarkdown, - subject: subject, - updatedBy: updatedBy, - disabled: disabled, $ctx: ctx, $service: $service, $headers: $headers, @@ -172,14 +160,26 @@ base class CommunicationService { $unknown: $unknown, ); - /// Delete a communication template. - Future> deleteTemplate({ + /// Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only. + Future> updateTemplate({ required String id, + String? name, + String? lang, + String? contentMarkdown, + String? subject, + String? updatedBy, + bool? disabled, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneCommunicationDeleteTemplate( + }) async => await toolsOzoneCommunicationUpdateTemplate( id: id, + name: name, + lang: lang, + contentMarkdown: contentMarkdown, + subject: subject, + updatedBy: updatedBy, + disabled: disabled, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/tools/ozone/moderation_service.dart b/packages/bluesky/lib/src/services/codegen/tools/ozone/moderation_service.dart index 7390af6a3..2696b3d14 100644 --- a/packages/bluesky/lib/src/services/codegen/tools/ozone/moderation_service.dart +++ b/packages/bluesky/lib/src/services/codegen/tools/ozone/moderation_service.dart @@ -45,186 +45,120 @@ import 'moderation/searchRepos/output.dart'; // LexGenerator // ************************************************************************** -/// View moderation statuses of subjects (record or repo). -Future> -toolsOzoneModerationQueryStatuses({ - int? queueCount, - int? queueIndex, - String? queueSeed, - bool? includeAllUserRecords, - String? subject, +/// Cancel all pending scheduled moderation actions for specified subjects +Future> +toolsOzoneModerationCancelScheduledActions({ + required List subjects, String? comment, - DateTime? reportedAfter, - DateTime? reportedBefore, - DateTime? reviewedAfter, - DateTime? hostingDeletedAfter, - DateTime? hostingDeletedBefore, - DateTime? hostingUpdatedAfter, - DateTime? hostingUpdatedBefore, - List? hostingStatuses, - DateTime? reviewedBefore, - bool? includeMuted, - bool? onlyMuted, - ModerationQueryStatusesReviewState? reviewState, - List? ignoreSubjects, - String? lastReviewedBy, - String? sortField, - String? sortDirection, - bool? takendown, - bool? appealed, - int? limit, - List? tags, - List? excludeTags, - String? cursor, - List? collections, - ModerationQueryStatusesSubjectType? subjectType, - int? minAccountSuspendCount, - int? minReportedRecordsCount, - int? minTakendownRecordsCount, - int? minPriorityScore, - int? minStrikeCount, - ModerationQueryStatusesAgeAssuranceState? ageAssuranceState, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.toolsOzoneModerationQueryStatuses, +}) async => await $ctx.post( + ns.toolsOzoneModerationCancelScheduledActions, service: $service, - headers: $headers, - parameters: { + headers: {'Content-type': 'application/json', ...?$headers}, + body: { ...?$unknown, - if (queueCount != null) 'queueCount': queueCount, - if (queueIndex != null) 'queueIndex': queueIndex, - if (queueSeed != null) 'queueSeed': queueSeed, - if (includeAllUserRecords != null) - 'includeAllUserRecords': includeAllUserRecords, - if (subject != null) 'subject': subject, + 'subjects': subjects, if (comment != null) 'comment': comment, - if (reportedAfter != null) 'reportedAfter': iso8601(reportedAfter), - if (reportedBefore != null) 'reportedBefore': iso8601(reportedBefore), - if (reviewedAfter != null) 'reviewedAfter': iso8601(reviewedAfter), - if (hostingDeletedAfter != null) - 'hostingDeletedAfter': iso8601(hostingDeletedAfter), - if (hostingDeletedBefore != null) - 'hostingDeletedBefore': iso8601(hostingDeletedBefore), - if (hostingUpdatedAfter != null) - 'hostingUpdatedAfter': iso8601(hostingUpdatedAfter), - if (hostingUpdatedBefore != null) - 'hostingUpdatedBefore': iso8601(hostingUpdatedBefore), - if (hostingStatuses != null) 'hostingStatuses': hostingStatuses, - if (reviewedBefore != null) 'reviewedBefore': iso8601(reviewedBefore), - if (includeMuted != null) 'includeMuted': includeMuted, - if (onlyMuted != null) 'onlyMuted': onlyMuted, - if (reviewState != null) 'reviewState': reviewState.toJson(), - if (ignoreSubjects != null) 'ignoreSubjects': ignoreSubjects, - if (lastReviewedBy != null) 'lastReviewedBy': lastReviewedBy, - if (sortField != null) 'sortField': sortField, - if (sortDirection != null) 'sortDirection': sortDirection, - if (takendown != null) 'takendown': takendown, - if (appealed != null) 'appealed': appealed, - if (limit != null) 'limit': limit, - if (tags != null) 'tags': tags, - if (excludeTags != null) 'excludeTags': excludeTags, - if (cursor != null) 'cursor': cursor, - if (collections != null) 'collections': collections, - if (subjectType != null) 'subjectType': subjectType.toJson(), - if (minAccountSuspendCount != null) - 'minAccountSuspendCount': minAccountSuspendCount, - if (minReportedRecordsCount != null) - 'minReportedRecordsCount': minReportedRecordsCount, - if (minTakendownRecordsCount != null) - 'minTakendownRecordsCount': minTakendownRecordsCount, - if (minPriorityScore != null) 'minPriorityScore': minPriorityScore, - if (minStrikeCount != null) 'minStrikeCount': minStrikeCount, - if (ageAssuranceState != null) - 'ageAssuranceState': ageAssuranceState.toJson(), }, - to: const ModerationQueryStatusesOutputConverter().fromJson, + to: const CancellationResultsConverter().fromJson, ); -/// Find repositories based on a search term. -Future> -toolsOzoneModerationSearchRepos({ - String? term, - String? q, - int? limit, - String? cursor, +/// Take a moderation action on an actor. +Future> toolsOzoneModerationEmitEvent({ + required UModerationEmitEventEvent event, + required UModerationEmitEventSubject subject, + List? subjectBlobCids, + required String createdBy, + ModTool? modTool, + String? externalId, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.toolsOzoneModerationSearchRepos, +}) async => await $ctx.post( + ns.toolsOzoneModerationEmitEvent, service: $service, - headers: $headers, - parameters: { + headers: {'Content-type': 'application/json', ...?$headers}, + body: { ...?$unknown, - if (term != null) 'term': term, - if (q != null) 'q': q, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, + 'event': event.toJson(), + 'subject': subject.toJson(), + if (subjectBlobCids != null) 'subjectBlobCids': subjectBlobCids, + 'createdBy': createdBy, + if (modTool != null) 'modTool': modTool.toJson(), + if (externalId != null) 'externalId': externalId, }, - to: const ModerationSearchReposOutputConverter().fromJson, + to: const ModEventViewConverter().fromJson, ); -/// Get reporter stats for a list of users. -Future> -toolsOzoneModerationGetReporterStats({ - required List dids, +/// Get timeline of all available events of an account. This includes moderation events, account history and did history. +Future> +toolsOzoneModerationGetAccountTimeline({ + required String did, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.toolsOzoneModerationGetReporterStats, + ns.toolsOzoneModerationGetAccountTimeline, service: $service, headers: $headers, - parameters: {...?$unknown, 'dids': dids}, - to: const ModerationGetReporterStatsOutputConverter().fromJson, + parameters: {...?$unknown, 'did': did}, + to: const ModerationGetAccountTimelineOutputConverter().fromJson, ); -/// Schedule a moderation action to be executed at a future time -Future> -toolsOzoneModerationScheduleAction({ - required UModerationScheduleActionAction action, - required List subjects, - required String createdBy, - required SchedulingConfig scheduling, - ModTool? modTool, +/// Get details about a moderation event. +Future> toolsOzoneModerationGetEvent({ + required int id, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.toolsOzoneModerationScheduleAction, +}) async => await $ctx.get( + ns.toolsOzoneModerationGetEvent, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { + headers: $headers, + parameters: {...?$unknown, 'id': id}, + to: const ModEventViewDetailConverter().fromJson, +); + +/// Get details about a record. +Future> toolsOzoneModerationGetRecord({ + required AtUri uri, + String? cid, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.toolsOzoneModerationGetRecord, + service: $service, + headers: $headers, + parameters: { ...?$unknown, - 'action': action.toJson(), - 'subjects': subjects, - 'createdBy': createdBy, - 'scheduling': scheduling.toJson(), - if (modTool != null) 'modTool': modTool.toJson(), + 'uri': uri.toString(), + if (cid != null) 'cid': cid, }, - to: const ScheduledActionResultsConverter().fromJson, + to: const RecordViewDetailConverter().fromJson, ); -/// Get timeline of all available events of an account. This includes moderation events, account history and did history. -Future> -toolsOzoneModerationGetAccountTimeline({ - required String did, +/// Get details about some records. +Future> +toolsOzoneModerationGetRecords({ + required List uris, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.toolsOzoneModerationGetAccountTimeline, + ns.toolsOzoneModerationGetRecords, service: $service, headers: $headers, - parameters: {...?$unknown, 'did': did}, - to: const ModerationGetAccountTimelineOutputConverter().fromJson, + parameters: {...?$unknown, 'uris': uris.map((e) => e.toString()).toList()}, + to: const ModerationGetRecordsOutputConverter().fromJson, ); /// Get details about a repository. @@ -242,6 +176,53 @@ Future> toolsOzoneModerationGetRepo({ to: const RepoViewDetailConverter().fromJson, ); +/// Get reporter stats for a list of users. +Future> +toolsOzoneModerationGetReporterStats({ + required List dids, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.toolsOzoneModerationGetReporterStats, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'dids': dids}, + to: const ModerationGetReporterStatsOutputConverter().fromJson, +); + +/// Get details about some repositories. +Future> toolsOzoneModerationGetRepos({ + required List dids, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.toolsOzoneModerationGetRepos, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'dids': dids}, + to: const ModerationGetReposOutputConverter().fromJson, +); + +/// Get details about subjects. +Future> +toolsOzoneModerationGetSubjects({ + required List subjects, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.toolsOzoneModerationGetSubjects, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'subjects': subjects}, + to: const ModerationGetSubjectsOutputConverter().fromJson, +); + /// List scheduled moderation actions with optional filtering Future> toolsOzoneModerationListScheduledActions({ @@ -336,135 +317,154 @@ toolsOzoneModerationQueryEvents({ to: const ModerationQueryEventsOutputConverter().fromJson, ); -/// Take a moderation action on an actor. -Future> toolsOzoneModerationEmitEvent({ - required UModerationEmitEventEvent event, - required UModerationEmitEventSubject subject, - List? subjectBlobCids, - required String createdBy, - ModTool? modTool, - String? externalId, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.toolsOzoneModerationEmitEvent, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'event': event.toJson(), - 'subject': subject.toJson(), - if (subjectBlobCids != null) 'subjectBlobCids': subjectBlobCids, - 'createdBy': createdBy, - if (modTool != null) 'modTool': modTool.toJson(), - if (externalId != null) 'externalId': externalId, - }, - to: const ModEventViewConverter().fromJson, -); - -/// Get details about a moderation event. -Future> toolsOzoneModerationGetEvent({ - required int id, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.toolsOzoneModerationGetEvent, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'id': id}, - to: const ModEventViewDetailConverter().fromJson, -); - -/// Get details about a record. -Future> toolsOzoneModerationGetRecord({ - required AtUri uri, - String? cid, +/// View moderation statuses of subjects (record or repo). +Future> +toolsOzoneModerationQueryStatuses({ + int? queueCount, + int? queueIndex, + String? queueSeed, + bool? includeAllUserRecords, + String? subject, + String? comment, + DateTime? reportedAfter, + DateTime? reportedBefore, + DateTime? reviewedAfter, + DateTime? hostingDeletedAfter, + DateTime? hostingDeletedBefore, + DateTime? hostingUpdatedAfter, + DateTime? hostingUpdatedBefore, + List? hostingStatuses, + DateTime? reviewedBefore, + bool? includeMuted, + bool? onlyMuted, + ModerationQueryStatusesReviewState? reviewState, + List? ignoreSubjects, + String? lastReviewedBy, + String? sortField, + String? sortDirection, + bool? takendown, + bool? appealed, + int? limit, + List? tags, + List? excludeTags, + String? cursor, + List? collections, + ModerationQueryStatusesSubjectType? subjectType, + int? minAccountSuspendCount, + int? minReportedRecordsCount, + int? minTakendownRecordsCount, + int? minPriorityScore, + int? minStrikeCount, + ModerationQueryStatusesAgeAssuranceState? ageAssuranceState, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.toolsOzoneModerationGetRecord, + ns.toolsOzoneModerationQueryStatuses, service: $service, headers: $headers, parameters: { ...?$unknown, - 'uri': uri.toString(), - if (cid != null) 'cid': cid, + if (queueCount != null) 'queueCount': queueCount, + if (queueIndex != null) 'queueIndex': queueIndex, + if (queueSeed != null) 'queueSeed': queueSeed, + if (includeAllUserRecords != null) + 'includeAllUserRecords': includeAllUserRecords, + if (subject != null) 'subject': subject, + if (comment != null) 'comment': comment, + if (reportedAfter != null) 'reportedAfter': iso8601(reportedAfter), + if (reportedBefore != null) 'reportedBefore': iso8601(reportedBefore), + if (reviewedAfter != null) 'reviewedAfter': iso8601(reviewedAfter), + if (hostingDeletedAfter != null) + 'hostingDeletedAfter': iso8601(hostingDeletedAfter), + if (hostingDeletedBefore != null) + 'hostingDeletedBefore': iso8601(hostingDeletedBefore), + if (hostingUpdatedAfter != null) + 'hostingUpdatedAfter': iso8601(hostingUpdatedAfter), + if (hostingUpdatedBefore != null) + 'hostingUpdatedBefore': iso8601(hostingUpdatedBefore), + if (hostingStatuses != null) 'hostingStatuses': hostingStatuses, + if (reviewedBefore != null) 'reviewedBefore': iso8601(reviewedBefore), + if (includeMuted != null) 'includeMuted': includeMuted, + if (onlyMuted != null) 'onlyMuted': onlyMuted, + if (reviewState != null) 'reviewState': reviewState.toJson(), + if (ignoreSubjects != null) 'ignoreSubjects': ignoreSubjects, + if (lastReviewedBy != null) 'lastReviewedBy': lastReviewedBy, + if (sortField != null) 'sortField': sortField, + if (sortDirection != null) 'sortDirection': sortDirection, + if (takendown != null) 'takendown': takendown, + if (appealed != null) 'appealed': appealed, + if (limit != null) 'limit': limit, + if (tags != null) 'tags': tags, + if (excludeTags != null) 'excludeTags': excludeTags, + if (cursor != null) 'cursor': cursor, + if (collections != null) 'collections': collections, + if (subjectType != null) 'subjectType': subjectType.toJson(), + if (minAccountSuspendCount != null) + 'minAccountSuspendCount': minAccountSuspendCount, + if (minReportedRecordsCount != null) + 'minReportedRecordsCount': minReportedRecordsCount, + if (minTakendownRecordsCount != null) + 'minTakendownRecordsCount': minTakendownRecordsCount, + if (minPriorityScore != null) 'minPriorityScore': minPriorityScore, + if (minStrikeCount != null) 'minStrikeCount': minStrikeCount, + if (ageAssuranceState != null) + 'ageAssuranceState': ageAssuranceState.toJson(), }, - to: const RecordViewDetailConverter().fromJson, + to: const ModerationQueryStatusesOutputConverter().fromJson, ); -/// Cancel all pending scheduled moderation actions for specified subjects -Future> -toolsOzoneModerationCancelScheduledActions({ +/// Schedule a moderation action to be executed at a future time +Future> +toolsOzoneModerationScheduleAction({ + required UModerationScheduleActionAction action, required List subjects, - String? comment, + required String createdBy, + required SchedulingConfig scheduling, + ModTool? modTool, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.toolsOzoneModerationCancelScheduledActions, + ns.toolsOzoneModerationScheduleAction, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: { ...?$unknown, + 'action': action.toJson(), 'subjects': subjects, - if (comment != null) 'comment': comment, + 'createdBy': createdBy, + 'scheduling': scheduling.toJson(), + if (modTool != null) 'modTool': modTool.toJson(), }, - to: const CancellationResultsConverter().fromJson, -); - -/// Get details about subjects. -Future> -toolsOzoneModerationGetSubjects({ - required List subjects, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.toolsOzoneModerationGetSubjects, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'subjects': subjects}, - to: const ModerationGetSubjectsOutputConverter().fromJson, -); - -/// Get details about some repositories. -Future> toolsOzoneModerationGetRepos({ - required List dids, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.toolsOzoneModerationGetRepos, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'dids': dids}, - to: const ModerationGetReposOutputConverter().fromJson, + to: const ScheduledActionResultsConverter().fromJson, ); -/// Get details about some records. -Future> -toolsOzoneModerationGetRecords({ - required List uris, +/// Find repositories based on a search term. +Future> +toolsOzoneModerationSearchRepos({ + String? term, + String? q, + int? limit, + String? cursor, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, }) async => await $ctx.get( - ns.toolsOzoneModerationGetRecords, + ns.toolsOzoneModerationSearchRepos, service: $service, headers: $headers, - parameters: {...?$unknown, 'uris': uris.map((e) => e.toString()).toList()}, - to: const ModerationGetRecordsOutputConverter().fromJson, + parameters: { + ...?$unknown, + if (term != null) 'term': term, + if (q != null) 'q': q, + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + }, + to: const ModerationSearchReposOutputConverter().fromJson, ); /// `tools.ozone.moderation.*` @@ -474,168 +474,154 @@ base class ModerationService { ModerationService(this.ctx); - /// View moderation statuses of subjects (record or repo). - Future> queryStatuses({ - int? queueCount, - int? queueIndex, - String? queueSeed, - bool? includeAllUserRecords, - String? subject, + /// Cancel all pending scheduled moderation actions for specified subjects + Future> cancelScheduledActions({ + required List subjects, String? comment, - DateTime? reportedAfter, - DateTime? reportedBefore, - DateTime? reviewedAfter, - DateTime? hostingDeletedAfter, - DateTime? hostingDeletedBefore, - DateTime? hostingUpdatedAfter, - DateTime? hostingUpdatedBefore, - List? hostingStatuses, - DateTime? reviewedBefore, - bool? includeMuted, - bool? onlyMuted, - ModerationQueryStatusesReviewState? reviewState, - List? ignoreSubjects, - String? lastReviewedBy, - String? sortField, - String? sortDirection, - bool? takendown, - bool? appealed, - int? limit, - List? tags, - List? excludeTags, - String? cursor, - List? collections, - ModerationQueryStatusesSubjectType? subjectType, - int? minAccountSuspendCount, - int? minReportedRecordsCount, - int? minTakendownRecordsCount, - int? minPriorityScore, - int? minStrikeCount, - ModerationQueryStatusesAgeAssuranceState? ageAssuranceState, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationQueryStatuses( - queueCount: queueCount, - queueIndex: queueIndex, - queueSeed: queueSeed, - includeAllUserRecords: includeAllUserRecords, - subject: subject, + }) async => await toolsOzoneModerationCancelScheduledActions( + subjects: subjects, comment: comment, - reportedAfter: reportedAfter, - reportedBefore: reportedBefore, - reviewedAfter: reviewedAfter, - hostingDeletedAfter: hostingDeletedAfter, - hostingDeletedBefore: hostingDeletedBefore, - hostingUpdatedAfter: hostingUpdatedAfter, - hostingUpdatedBefore: hostingUpdatedBefore, - hostingStatuses: hostingStatuses, - reviewedBefore: reviewedBefore, - includeMuted: includeMuted, - onlyMuted: onlyMuted, - reviewState: reviewState, - ignoreSubjects: ignoreSubjects, - lastReviewedBy: lastReviewedBy, - sortField: sortField, - sortDirection: sortDirection, - takendown: takendown, - appealed: appealed, - limit: limit, - tags: tags, - excludeTags: excludeTags, - cursor: cursor, - collections: collections, - subjectType: subjectType, - minAccountSuspendCount: minAccountSuspendCount, - minReportedRecordsCount: minReportedRecordsCount, - minTakendownRecordsCount: minTakendownRecordsCount, - minPriorityScore: minPriorityScore, - minStrikeCount: minStrikeCount, - ageAssuranceState: ageAssuranceState, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Find repositories based on a search term. - Future> searchRepos({ - String? term, - String? q, - int? limit, - String? cursor, + /// Take a moderation action on an actor. + Future> emitEvent({ + required UModerationEmitEventEvent event, + required UModerationEmitEventSubject subject, + List? subjectBlobCids, + required String createdBy, + ModTool? modTool, + String? externalId, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await toolsOzoneModerationEmitEvent( + event: event, + subject: subject, + subjectBlobCids: subjectBlobCids, + createdBy: createdBy, + modTool: modTool, + externalId: externalId, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get timeline of all available events of an account. This includes moderation events, account history and did history. + Future> getAccountTimeline({ + required String did, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await toolsOzoneModerationGetAccountTimeline( + did: did, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get details about a moderation event. + Future> getEvent({ + required int id, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await toolsOzoneModerationGetEvent( + id: id, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get details about a record. + Future> getRecord({ + required AtUri uri, + String? cid, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationSearchRepos( - term: term, - q: q, - limit: limit, - cursor: cursor, + }) async => await toolsOzoneModerationGetRecord( + uri: uri, + cid: cid, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get reporter stats for a list of users. - Future> getReporterStats({ - required List dids, + /// Get details about some records. + Future> getRecords({ + required List uris, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationGetReporterStats( - dids: dids, + }) async => await toolsOzoneModerationGetRecords( + uris: uris, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Schedule a moderation action to be executed at a future time - Future> scheduleAction({ - required UModerationScheduleActionAction action, - required List subjects, - required String createdBy, - required SchedulingConfig scheduling, - ModTool? modTool, + /// Get details about a repository. + Future> getRepo({ + required String did, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationScheduleAction( - action: action, - subjects: subjects, - createdBy: createdBy, - scheduling: scheduling, - modTool: modTool, + }) async => await toolsOzoneModerationGetRepo( + did: did, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get timeline of all available events of an account. This includes moderation events, account history and did history. - Future> getAccountTimeline({ - required String did, + /// Get reporter stats for a list of users. + Future> getReporterStats({ + required List dids, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationGetAccountTimeline( - did: did, + }) async => await toolsOzoneModerationGetReporterStats( + dids: dids, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get details about a repository. - Future> getRepo({ - required String did, + /// Get details about some repositories. + Future> getRepos({ + required List dids, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationGetRepo( - did: did, + }) async => await toolsOzoneModerationGetRepos( + dids: dids, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + + /// Get details about subjects. + Future> getSubjects({ + required List subjects, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await toolsOzoneModerationGetSubjects( + subjects: subjects, $ctx: ctx, $service: $service, $headers: $headers, @@ -725,112 +711,126 @@ base class ModerationService { $unknown: $unknown, ); - /// Take a moderation action on an actor. - Future> emitEvent({ - required UModerationEmitEventEvent event, - required UModerationEmitEventSubject subject, - List? subjectBlobCids, - required String createdBy, - ModTool? modTool, - String? externalId, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await toolsOzoneModerationEmitEvent( - event: event, - subject: subject, - subjectBlobCids: subjectBlobCids, - createdBy: createdBy, - modTool: modTool, - externalId: externalId, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Get details about a moderation event. - Future> getEvent({ - required int id, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await toolsOzoneModerationGetEvent( - id: id, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Get details about a record. - Future> getRecord({ - required AtUri uri, - String? cid, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await toolsOzoneModerationGetRecord( - uri: uri, - cid: cid, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Cancel all pending scheduled moderation actions for specified subjects - Future> cancelScheduledActions({ - required List subjects, + /// View moderation statuses of subjects (record or repo). + Future> queryStatuses({ + int? queueCount, + int? queueIndex, + String? queueSeed, + bool? includeAllUserRecords, + String? subject, String? comment, + DateTime? reportedAfter, + DateTime? reportedBefore, + DateTime? reviewedAfter, + DateTime? hostingDeletedAfter, + DateTime? hostingDeletedBefore, + DateTime? hostingUpdatedAfter, + DateTime? hostingUpdatedBefore, + List? hostingStatuses, + DateTime? reviewedBefore, + bool? includeMuted, + bool? onlyMuted, + ModerationQueryStatusesReviewState? reviewState, + List? ignoreSubjects, + String? lastReviewedBy, + String? sortField, + String? sortDirection, + bool? takendown, + bool? appealed, + int? limit, + List? tags, + List? excludeTags, + String? cursor, + List? collections, + ModerationQueryStatusesSubjectType? subjectType, + int? minAccountSuspendCount, + int? minReportedRecordsCount, + int? minTakendownRecordsCount, + int? minPriorityScore, + int? minStrikeCount, + ModerationQueryStatusesAgeAssuranceState? ageAssuranceState, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationCancelScheduledActions( - subjects: subjects, + }) async => await toolsOzoneModerationQueryStatuses( + queueCount: queueCount, + queueIndex: queueIndex, + queueSeed: queueSeed, + includeAllUserRecords: includeAllUserRecords, + subject: subject, comment: comment, + reportedAfter: reportedAfter, + reportedBefore: reportedBefore, + reviewedAfter: reviewedAfter, + hostingDeletedAfter: hostingDeletedAfter, + hostingDeletedBefore: hostingDeletedBefore, + hostingUpdatedAfter: hostingUpdatedAfter, + hostingUpdatedBefore: hostingUpdatedBefore, + hostingStatuses: hostingStatuses, + reviewedBefore: reviewedBefore, + includeMuted: includeMuted, + onlyMuted: onlyMuted, + reviewState: reviewState, + ignoreSubjects: ignoreSubjects, + lastReviewedBy: lastReviewedBy, + sortField: sortField, + sortDirection: sortDirection, + takendown: takendown, + appealed: appealed, + limit: limit, + tags: tags, + excludeTags: excludeTags, + cursor: cursor, + collections: collections, + subjectType: subjectType, + minAccountSuspendCount: minAccountSuspendCount, + minReportedRecordsCount: minReportedRecordsCount, + minTakendownRecordsCount: minTakendownRecordsCount, + minPriorityScore: minPriorityScore, + minStrikeCount: minStrikeCount, + ageAssuranceState: ageAssuranceState, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get details about subjects. - Future> getSubjects({ + /// Schedule a moderation action to be executed at a future time + Future> scheduleAction({ + required UModerationScheduleActionAction action, required List subjects, + required String createdBy, + required SchedulingConfig scheduling, + ModTool? modTool, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationGetSubjects( + }) async => await toolsOzoneModerationScheduleAction( + action: action, subjects: subjects, + createdBy: createdBy, + scheduling: scheduling, + modTool: modTool, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Get details about some repositories. - Future> getRepos({ - required List dids, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await toolsOzoneModerationGetRepos( - dids: dids, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - - /// Get details about some records. - Future> getRecords({ - required List uris, + /// Find repositories based on a search term. + Future> searchRepos({ + String? term, + String? q, + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneModerationGetRecords( - uris: uris, + }) async => await toolsOzoneModerationSearchRepos( + term: term, + q: q, + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/tools/ozone/safelink_service.dart b/packages/bluesky/lib/src/services/codegen/tools/ozone/safelink_service.dart index 6faf22423..46148b0ce 100644 --- a/packages/bluesky/lib/src/services/codegen/tools/ozone/safelink_service.dart +++ b/packages/bluesky/lib/src/services/codegen/tools/ozone/safelink_service.dart @@ -26,8 +26,8 @@ import 'safelink/queryRules/output.dart'; // LexGenerator // ************************************************************************** -/// Update an existing URL safety rule -Future> toolsOzoneSafelinkUpdateRule({ +/// Add a new URL safety rule +Future> toolsOzoneSafelinkAddRule({ required String url, required PatternType pattern, required ActionType action, @@ -39,7 +39,7 @@ Future> toolsOzoneSafelinkUpdateRule({ Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.toolsOzoneSafelinkUpdateRule, + ns.toolsOzoneSafelinkAddRule, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: { @@ -136,8 +136,8 @@ Future> toolsOzoneSafelinkRemoveRule({ to: const EventConverter().fromJson, ); -/// Add a new URL safety rule -Future> toolsOzoneSafelinkAddRule({ +/// Update an existing URL safety rule +Future> toolsOzoneSafelinkUpdateRule({ required String url, required PatternType pattern, required ActionType action, @@ -149,7 +149,7 @@ Future> toolsOzoneSafelinkAddRule({ Map? $headers, Map? $unknown, }) async => await $ctx.post( - ns.toolsOzoneSafelinkAddRule, + ns.toolsOzoneSafelinkUpdateRule, service: $service, headers: {'Content-type': 'application/json', ...?$headers}, body: { @@ -171,8 +171,8 @@ base class SafelinkService { SafelinkService(this.ctx); - /// Update an existing URL safety rule - Future> updateRule({ + /// Add a new URL safety rule + Future> addRule({ required String url, required PatternType pattern, required ActionType action, @@ -182,7 +182,7 @@ base class SafelinkService { String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneSafelinkUpdateRule( + }) async => await toolsOzoneSafelinkAddRule( url: url, pattern: pattern, action: action, @@ -265,8 +265,8 @@ base class SafelinkService { $unknown: $unknown, ); - /// Add a new URL safety rule - Future> addRule({ + /// Update an existing URL safety rule + Future> updateRule({ required String url, required PatternType pattern, required ActionType action, @@ -276,7 +276,7 @@ base class SafelinkService { String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneSafelinkAddRule( + }) async => await toolsOzoneSafelinkUpdateRule( url: url, pattern: pattern, action: action, diff --git a/packages/bluesky/lib/src/services/codegen/tools/ozone/set_service.dart b/packages/bluesky/lib/src/services/codegen/tools/ozone/set_service.dart index c5b095521..2679304a4 100644 --- a/packages/bluesky/lib/src/services/codegen/tools/ozone/set_service.dart +++ b/packages/bluesky/lib/src/services/codegen/tools/ozone/set_service.dart @@ -21,6 +21,21 @@ import 'set/querySets/output.dart'; // LexGenerator // ************************************************************************** +/// Add values to a specific set. Attempting to add values to a set that does not exist will result in an error. +Future> toolsOzoneSetAddValues({ + required String name, + required List values, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.toolsOzoneSetAddValues, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'name': name, 'values': values}, +); + /// Delete an entire set. Attempting to delete a set that does not exist will result in an error. Future> toolsOzoneSetDeleteSet({ required String name, @@ -118,21 +133,6 @@ Future> toolsOzoneSetUpsertSet({ to: const SetViewConverter().fromJson, ); -/// Add values to a specific set. Attempting to add values to a set that does not exist will result in an error. -Future> toolsOzoneSetAddValues({ - required String name, - required List values, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.toolsOzoneSetAddValues, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'name': name, 'values': values}, -); - /// `tools.ozone.set.*` base class SetService { @protected @@ -140,6 +140,22 @@ base class SetService { SetService(this.ctx); + /// Add values to a specific set. Attempting to add values to a set that does not exist will result in an error. + Future> addValues({ + required String name, + required List values, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await toolsOzoneSetAddValues( + name: name, + values: values, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); + /// Delete an entire set. Attempting to delete a set that does not exist will result in an error. Future> deleteSet({ required String name, @@ -225,20 +241,4 @@ base class SetService { $headers: $headers, $unknown: $unknown, ); - - /// Add values to a specific set. Attempting to add values to a set that does not exist will result in an error. - Future> addValues({ - required String name, - required List values, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await toolsOzoneSetAddValues( - name: name, - values: values, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); } diff --git a/packages/bluesky/lib/src/services/codegen/tools/ozone/setting_service.dart b/packages/bluesky/lib/src/services/codegen/tools/ozone/setting_service.dart index 2beaa9459..e62385360 100644 --- a/packages/bluesky/lib/src/services/codegen/tools/ozone/setting_service.dart +++ b/packages/bluesky/lib/src/services/codegen/tools/ozone/setting_service.dart @@ -24,30 +24,30 @@ import 'setting/upsertOption/output.dart'; // LexGenerator // ************************************************************************** -/// Create or update setting option -Future> toolsOzoneSettingUpsertOption({ - required String key, - required SettingUpsertOptionScope scope, - required Map value, - String? description, - SettingUpsertOptionManagerRole? managerRole, +/// List settings with optional filtering +Future> toolsOzoneSettingListOptions({ + int? limit, + String? cursor, + SettingListOptionsScope? scope, + String? prefix, + List? keys, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.post( - ns.toolsOzoneSettingUpsertOption, +}) async => await $ctx.get( + ns.toolsOzoneSettingListOptions, service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { + headers: $headers, + parameters: { ...?$unknown, - 'key': key, - 'scope': scope.toJson(), - 'value': value, - if (description != null) 'description': description, - if (managerRole != null) 'managerRole': managerRole.toJson(), + if (limit != null) 'limit': limit, + if (cursor != null) 'cursor': cursor, + if (scope != null) 'scope': scope.toJson(), + if (prefix != null) 'prefix': prefix, + if (keys != null) 'keys': keys, }, - to: const SettingUpsertOptionOutputConverter().fromJson, + to: const SettingListOptionsOutputConverter().fromJson, ); /// Delete settings by key @@ -65,30 +65,30 @@ Future> toolsOzoneSettingRemoveOptions({ body: {...?$unknown, 'keys': keys, 'scope': scope.toJson()}, ); -/// List settings with optional filtering -Future> toolsOzoneSettingListOptions({ - int? limit, - String? cursor, - SettingListOptionsScope? scope, - String? prefix, - List? keys, +/// Create or update setting option +Future> toolsOzoneSettingUpsertOption({ + required String key, + required SettingUpsertOptionScope scope, + required Map value, + String? description, + SettingUpsertOptionManagerRole? managerRole, required ServiceContext $ctx, String? $service, Map? $headers, Map? $unknown, -}) async => await $ctx.get( - ns.toolsOzoneSettingListOptions, +}) async => await $ctx.post( + ns.toolsOzoneSettingUpsertOption, service: $service, - headers: $headers, - parameters: { + headers: {'Content-type': 'application/json', ...?$headers}, + body: { ...?$unknown, - if (limit != null) 'limit': limit, - if (cursor != null) 'cursor': cursor, - if (scope != null) 'scope': scope.toJson(), - if (prefix != null) 'prefix': prefix, - if (keys != null) 'keys': keys, + 'key': key, + 'scope': scope.toJson(), + 'value': value, + if (description != null) 'description': description, + if (managerRole != null) 'managerRole': managerRole.toJson(), }, - to: const SettingListOptionsOutputConverter().fromJson, + to: const SettingUpsertOptionOutputConverter().fromJson, ); /// `tools.ozone.setting.*` @@ -98,22 +98,22 @@ base class SettingService { SettingService(this.ctx); - /// Create or update setting option - Future> upsertOption({ - required String key, - required SettingUpsertOptionScope scope, - required Map value, - String? description, - SettingUpsertOptionManagerRole? managerRole, + /// List settings with optional filtering + Future> listOptions({ + int? limit, + String? cursor, + SettingListOptionsScope? scope, + String? prefix, + List? keys, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneSettingUpsertOption( - key: key, + }) async => await toolsOzoneSettingListOptions( + limit: limit, + cursor: cursor, scope: scope, - value: value, - description: description, - managerRole: managerRole, + prefix: prefix, + keys: keys, $ctx: ctx, $service: $service, $headers: $headers, @@ -136,22 +136,22 @@ base class SettingService { $unknown: $unknown, ); - /// List settings with optional filtering - Future> listOptions({ - int? limit, - String? cursor, - SettingListOptionsScope? scope, - String? prefix, - List? keys, + /// Create or update setting option + Future> upsertOption({ + required String key, + required SettingUpsertOptionScope scope, + required Map value, + String? description, + SettingUpsertOptionManagerRole? managerRole, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneSettingListOptions( - limit: limit, - cursor: cursor, + }) async => await toolsOzoneSettingUpsertOption( + key: key, scope: scope, - prefix: prefix, - keys: keys, + value: value, + description: description, + managerRole: managerRole, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/tools/ozone/signature_service.dart b/packages/bluesky/lib/src/services/codegen/tools/ozone/signature_service.dart index 7d491386f..a461a093d 100644 --- a/packages/bluesky/lib/src/services/codegen/tools/ozone/signature_service.dart +++ b/packages/bluesky/lib/src/services/codegen/tools/ozone/signature_service.dart @@ -21,6 +21,22 @@ import 'signature/searchAccounts/output.dart'; // LexGenerator // ************************************************************************** +/// Find all correlated threat signatures between 2 or more accounts. +Future> +toolsOzoneSignatureFindCorrelation({ + required List dids, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.get( + ns.toolsOzoneSignatureFindCorrelation, + service: $service, + headers: $headers, + parameters: {...?$unknown, 'dids': dids}, + to: const SignatureFindCorrelationOutputConverter().fromJson, +); + /// Get accounts that share some matching threat signatures with the root account. Future> toolsOzoneSignatureFindRelatedAccounts({ @@ -44,22 +60,6 @@ toolsOzoneSignatureFindRelatedAccounts({ to: const SignatureFindRelatedAccountsOutputConverter().fromJson, ); -/// Find all correlated threat signatures between 2 or more accounts. -Future> -toolsOzoneSignatureFindCorrelation({ - required List dids, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.get( - ns.toolsOzoneSignatureFindCorrelation, - service: $service, - headers: $headers, - parameters: {...?$unknown, 'dids': dids}, - to: const SignatureFindCorrelationOutputConverter().fromJson, -); - /// Search for accounts that match one or more threat signature values. Future> toolsOzoneSignatureSearchAccounts({ @@ -90,32 +90,32 @@ base class SignatureService { SignatureService(this.ctx); - /// Get accounts that share some matching threat signatures with the root account. - Future> findRelatedAccounts({ - required String did, - String? cursor, - int? limit, + /// Find all correlated threat signatures between 2 or more accounts. + Future> findCorrelation({ + required List dids, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneSignatureFindRelatedAccounts( - did: did, - cursor: cursor, - limit: limit, + }) async => await toolsOzoneSignatureFindCorrelation( + dids: dids, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Find all correlated threat signatures between 2 or more accounts. - Future> findCorrelation({ - required List dids, + /// Get accounts that share some matching threat signatures with the root account. + Future> findRelatedAccounts({ + required String did, + String? cursor, + int? limit, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneSignatureFindCorrelation( - dids: dids, + }) async => await toolsOzoneSignatureFindRelatedAccounts( + did: did, + cursor: cursor, + limit: limit, $ctx: ctx, $service: $service, $headers: $headers, diff --git a/packages/bluesky/lib/src/services/codegen/tools/ozone/team_service.dart b/packages/bluesky/lib/src/services/codegen/tools/ozone/team_service.dart index 956bfa959..92618c028 100644 --- a/packages/bluesky/lib/src/services/codegen/tools/ozone/team_service.dart +++ b/packages/bluesky/lib/src/services/codegen/tools/ozone/team_service.dart @@ -22,6 +22,36 @@ import 'team/updateMember/main_role.dart'; // LexGenerator // ************************************************************************** +/// Add a member to the ozone team. Requires admin role. +Future> toolsOzoneTeamAddMember({ + required String did, + required TeamAddMemberRole role, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.toolsOzoneTeamAddMember, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'did': did, 'role': role.toJson()}, + to: const MemberConverter().fromJson, +); + +/// Delete a member from ozone team. Requires admin role. +Future> toolsOzoneTeamDeleteMember({ + required String did, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.toolsOzoneTeamDeleteMember, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: {...?$unknown, 'did': did}, +); + /// List all members with access to the ozone service. Future> toolsOzoneTeamListMembers({ String? q, @@ -70,36 +100,6 @@ Future> toolsOzoneTeamUpdateMember({ to: const MemberConverter().fromJson, ); -/// Delete a member from ozone team. Requires admin role. -Future> toolsOzoneTeamDeleteMember({ - required String did, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.toolsOzoneTeamDeleteMember, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'did': did}, -); - -/// Add a member to the ozone team. Requires admin role. -Future> toolsOzoneTeamAddMember({ - required String did, - required TeamAddMemberRole role, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.toolsOzoneTeamAddMember, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: {...?$unknown, 'did': did, 'role': role.toJson()}, - to: const MemberConverter().fromJson, -); - /// `tools.ozone.team.*` base class TeamService { @protected @@ -107,69 +107,69 @@ base class TeamService { TeamService(this.ctx); - /// List all members with access to the ozone service. - Future> listMembers({ - String? q, - bool? disabled, - List? roles, - int? limit, - String? cursor, + /// Add a member to the ozone team. Requires admin role. + Future> addMember({ + required String did, + required TeamAddMemberRole role, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneTeamListMembers( - q: q, - disabled: disabled, - roles: roles, - limit: limit, - cursor: cursor, + }) async => await toolsOzoneTeamAddMember( + did: did, + role: role, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Update a member in the ozone service. Requires admin role. - Future> updateMember({ + /// Delete a member from ozone team. Requires admin role. + Future> deleteMember({ required String did, - bool? disabled, - TeamUpdateMemberRole? role, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneTeamUpdateMember( + }) async => await toolsOzoneTeamDeleteMember( did: did, - disabled: disabled, - role: role, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Delete a member from ozone team. Requires admin role. - Future> deleteMember({ - required String did, + /// List all members with access to the ozone service. + Future> listMembers({ + String? q, + bool? disabled, + List? roles, + int? limit, + String? cursor, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneTeamDeleteMember( - did: did, + }) async => await toolsOzoneTeamListMembers( + q: q, + disabled: disabled, + roles: roles, + limit: limit, + cursor: cursor, $ctx: ctx, $service: $service, $headers: $headers, $unknown: $unknown, ); - /// Add a member to the ozone team. Requires admin role. - Future> addMember({ + /// Update a member in the ozone service. Requires admin role. + Future> updateMember({ required String did, - required TeamAddMemberRole role, + bool? disabled, + TeamUpdateMemberRole? role, String? $service, Map? $headers, Map? $unknown, - }) async => await toolsOzoneTeamAddMember( + }) async => await toolsOzoneTeamUpdateMember( did: did, + disabled: disabled, role: role, $ctx: ctx, $service: $service, diff --git a/packages/bluesky/lib/src/services/codegen/tools/ozone/verification_service.dart b/packages/bluesky/lib/src/services/codegen/tools/ozone/verification_service.dart index a2fc6e61b..843569278 100644 --- a/packages/bluesky/lib/src/services/codegen/tools/ozone/verification_service.dart +++ b/packages/bluesky/lib/src/services/codegen/tools/ozone/verification_service.dart @@ -23,27 +23,6 @@ import 'verification/revokeVerifications/output.dart'; // LexGenerator // ************************************************************************** -/// Revoke previously granted verifications in batches of up to 100. -Future> -toolsOzoneVerificationRevokeVerifications({ - required List uris, - String? revokeReason, - required ServiceContext $ctx, - String? $service, - Map? $headers, - Map? $unknown, -}) async => await $ctx.post( - ns.toolsOzoneVerificationRevokeVerifications, - service: $service, - headers: {'Content-type': 'application/json', ...?$headers}, - body: { - ...?$unknown, - 'uris': uris.map((e) => e.toString()).toList(), - if (revokeReason != null) 'revokeReason': revokeReason, - }, - to: const VerificationRevokeVerificationsOutputConverter().fromJson, -); - /// Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once. Future> toolsOzoneVerificationGrantVerifications({ @@ -96,6 +75,27 @@ toolsOzoneVerificationListVerifications({ to: const VerificationListVerificationsOutputConverter().fromJson, ); +/// Revoke previously granted verifications in batches of up to 100. +Future> +toolsOzoneVerificationRevokeVerifications({ + required List uris, + String? revokeReason, + required ServiceContext $ctx, + String? $service, + Map? $headers, + Map? $unknown, +}) async => await $ctx.post( + ns.toolsOzoneVerificationRevokeVerifications, + service: $service, + headers: {'Content-type': 'application/json', ...?$headers}, + body: { + ...?$unknown, + 'uris': uris.map((e) => e.toString()).toList(), + if (revokeReason != null) 'revokeReason': revokeReason, + }, + to: const VerificationRevokeVerificationsOutputConverter().fromJson, +); + /// `tools.ozone.verification.*` base class VerificationService { @protected @@ -103,23 +103,6 @@ base class VerificationService { VerificationService(this.ctx); - /// Revoke previously granted verifications in batches of up to 100. - Future> - revokeVerifications({ - required List uris, - String? revokeReason, - String? $service, - Map? $headers, - Map? $unknown, - }) async => await toolsOzoneVerificationRevokeVerifications( - uris: uris, - revokeReason: revokeReason, - $ctx: ctx, - $service: $service, - $headers: $headers, - $unknown: $unknown, - ); - /// Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once. Future> grantVerifications({ @@ -162,4 +145,21 @@ base class VerificationService { $headers: $headers, $unknown: $unknown, ); + + /// Revoke previously granted verifications in batches of up to 100. + Future> + revokeVerifications({ + required List uris, + String? revokeReason, + String? $service, + Map? $headers, + Map? $unknown, + }) async => await toolsOzoneVerificationRevokeVerifications( + uris: uris, + revokeReason: revokeReason, + $ctx: ctx, + $service: $service, + $headers: $headers, + $unknown: $unknown, + ); } diff --git a/packages/bluesky/lib/tools_ozone_services.dart b/packages/bluesky/lib/tools_ozone_services.dart index 62ee8d974..081b401e9 100644 --- a/packages/bluesky/lib/tools_ozone_services.dart +++ b/packages/bluesky/lib/tools_ozone_services.dart @@ -11,13 +11,13 @@ // LexGenerator // ************************************************************************** +export 'package:bluesky/src/services/codegen/tools/ozone/communication_service.dart'; +export 'package:bluesky/src/services/codegen/tools/ozone/hosting_service.dart'; +export 'package:bluesky/src/services/codegen/tools/ozone/moderation_service.dart'; export 'package:bluesky/src/services/codegen/tools/ozone/safelink_service.dart'; +export 'package:bluesky/src/services/codegen/tools/ozone/server_service.dart'; export 'package:bluesky/src/services/codegen/tools/ozone/set_service.dart'; export 'package:bluesky/src/services/codegen/tools/ozone/setting_service.dart'; +export 'package:bluesky/src/services/codegen/tools/ozone/signature_service.dart'; export 'package:bluesky/src/services/codegen/tools/ozone/team_service.dart'; -export 'package:bluesky/src/services/codegen/tools/ozone/server_service.dart'; -export 'package:bluesky/src/services/codegen/tools/ozone/communication_service.dart'; -export 'package:bluesky/src/services/codegen/tools/ozone/hosting_service.dart'; export 'package:bluesky/src/services/codegen/tools/ozone/verification_service.dart'; -export 'package:bluesky/src/services/codegen/tools/ozone/moderation_service.dart'; -export 'package:bluesky/src/services/codegen/tools/ozone/signature_service.dart'; diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/actor.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/actor.dart index 4d3ca6aa3..cab4c892c 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/actor.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/actor.dart @@ -27,15 +27,15 @@ import 'actor/status.dart'; final class AppBskyActorCommand extends Command { AppBskyActorCommand() { - addSubcommand(SearchActorsTypeaheadCommand()); - addSubcommand(SearchActorsCommand()); + addSubcommand(GetPreferencesCommand()); + addSubcommand(GetProfileCommand()); + addSubcommand(GetProfilesCommand()); addSubcommand(GetSuggestionsCommand()); + addSubcommand(ProfileCommand()); addSubcommand(PutPreferencesCommand()); + addSubcommand(SearchActorsCommand()); + addSubcommand(SearchActorsTypeaheadCommand()); addSubcommand(StatusCommand()); - addSubcommand(ProfileCommand()); - addSubcommand(GetProfileCommand()); - addSubcommand(GetProfilesCommand()); - addSubcommand(GetPreferencesCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/ageassurance.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/ageassurance.dart index 29dbd586f..65b33987e 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/ageassurance.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/ageassurance.dart @@ -21,9 +21,9 @@ import 'ageassurance/get_state.dart'; final class AppBskyAgeassuranceCommand extends Command { AppBskyAgeassuranceCommand() { + addSubcommand(BeginCommand()); addSubcommand(GetConfigCommand()); addSubcommand(GetStateCommand()); - addSubcommand(BeginCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/contact.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/contact.dart index a53014322..3fccd0c4d 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/contact.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/contact.dart @@ -26,14 +26,14 @@ import 'contact/verify_phone.dart'; final class AppBskyContactCommand extends Command { AppBskyContactCommand() { - addSubcommand(SendNotificationCommand()); addSubcommand(DismissMatchCommand()); addSubcommand(GetMatchesCommand()); - addSubcommand(StartPhoneVerificationCommand()); - addSubcommand(RemoveDataCommand()); addSubcommand(GetSyncStatusCommand()); - addSubcommand(VerifyPhoneCommand()); addSubcommand(ImportContactsCommand()); + addSubcommand(RemoveDataCommand()); + addSubcommand(SendNotificationCommand()); + addSubcommand(StartPhoneVerificationCommand()); + addSubcommand(VerifyPhoneCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/draft.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/draft.dart index 376b913df..57db866d6 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/draft.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/draft.dart @@ -22,8 +22,8 @@ import 'draft/update_draft.dart'; final class AppBskyDraftCommand extends Command { AppBskyDraftCommand() { - addSubcommand(DeleteDraftCommand()); addSubcommand(CreateDraftCommand()); + addSubcommand(DeleteDraftCommand()); addSubcommand(GetDraftsCommand()); addSubcommand(UpdateDraftCommand()); } diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/feed.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/feed.dart index 9aeabaf6f..800b61cbc 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/feed.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/feed.dart @@ -42,30 +42,30 @@ import 'feed/threadgate.dart'; final class AppBskyFeedCommand extends Command { AppBskyFeedCommand() { - addSubcommand(GetPostsCommand()); - addSubcommand(GetSuggestedFeedsCommand()); - addSubcommand(GetTimelineCommand()); - addSubcommand(GetFeedGeneratorsCommand()); - addSubcommand(LikeCommand()); - addSubcommand(GetFeedGeneratorCommand()); - addSubcommand(GetActorFeedsCommand()); - addSubcommand(GetLikesCommand()); - addSubcommand(GetQuotesCommand()); - addSubcommand(GetRepostedByCommand()); - addSubcommand(ThreadgateCommand()); addSubcommand(DescribeFeedGeneratorCommand()); - addSubcommand(SearchPostsCommand()); addSubcommand(GeneratorCommand()); - addSubcommand(PostCommand()); + addSubcommand(GetActorFeedsCommand()); + addSubcommand(GetActorLikesCommand()); addSubcommand(GetAuthorFeedCommand()); - addSubcommand(GetPostThreadCommand()); - addSubcommand(RepostCommand()); addSubcommand(GetFeedCommand()); + addSubcommand(GetFeedGeneratorCommand()); + addSubcommand(GetFeedGeneratorsCommand()); addSubcommand(GetFeedSkeletonCommand()); - addSubcommand(SendInteractionsCommand()); - addSubcommand(GetActorLikesCommand()); + addSubcommand(GetLikesCommand()); addSubcommand(GetListFeedCommand()); + addSubcommand(GetPostThreadCommand()); + addSubcommand(GetPostsCommand()); + addSubcommand(GetQuotesCommand()); + addSubcommand(GetRepostedByCommand()); + addSubcommand(GetSuggestedFeedsCommand()); + addSubcommand(GetTimelineCommand()); + addSubcommand(LikeCommand()); + addSubcommand(PostCommand()); addSubcommand(PostgateCommand()); + addSubcommand(RepostCommand()); + addSubcommand(SearchPostsCommand()); + addSubcommand(SendInteractionsCommand()); + addSubcommand(ThreadgateCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/graph.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/graph.dart index 6620c504c..497b10735 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/graph.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/graph.dart @@ -48,36 +48,36 @@ import 'graph/verification.dart'; final class AppBskyGraphCommand extends Command { AppBskyGraphCommand() { - addSubcommand(UnmuteThreadCommand()); - addSubcommand(GetMutesCommand()); - addSubcommand(SearchStarterPacksCommand()); - addSubcommand(GetStarterPacksWithMembershipCommand()); - addSubcommand(MuteThreadCommand()); + addSubcommand(BlockCommand()); + addSubcommand(FollowCommand()); + addSubcommand(GetActorStarterPacksCommand()); addSubcommand(GetBlocksCommand()); - addSubcommand(StarterpackCommand()); - addSubcommand(GetRelationshipsCommand()); - addSubcommand(GetStarterPacksCommand()); + addSubcommand(GetFollowersCommand()); addSubcommand(GetFollowsCommand()); addSubcommand(GetKnownFollowersCommand()); - addSubcommand(UnmuteActorListCommand()); - addSubcommand(ListCommand()); addSubcommand(GetListCommand()); - addSubcommand(MuteActorListCommand()); - addSubcommand(GetSuggestedFollowsByActorCommand()); - addSubcommand(ListblockCommand()); - addSubcommand(FollowCommand()); - addSubcommand(GetFollowersCommand()); - addSubcommand(GetActorStarterPacksCommand()); - addSubcommand(GetStarterPackCommand()); - addSubcommand(MuteActorCommand()); - addSubcommand(GetListsWithMembershipCommand()); - addSubcommand(VerificationCommand()); addSubcommand(GetListBlocksCommand()); - addSubcommand(BlockCommand()); + addSubcommand(GetListMutesCommand()); addSubcommand(GetListsCommand()); + addSubcommand(GetListsWithMembershipCommand()); + addSubcommand(GetMutesCommand()); + addSubcommand(GetRelationshipsCommand()); + addSubcommand(GetStarterPackCommand()); + addSubcommand(GetStarterPacksCommand()); + addSubcommand(GetStarterPacksWithMembershipCommand()); + addSubcommand(GetSuggestedFollowsByActorCommand()); + addSubcommand(ListCommand()); + addSubcommand(ListblockCommand()); addSubcommand(ListitemCommand()); - addSubcommand(GetListMutesCommand()); + addSubcommand(MuteActorCommand()); + addSubcommand(MuteActorListCommand()); + addSubcommand(MuteThreadCommand()); + addSubcommand(SearchStarterPacksCommand()); + addSubcommand(StarterpackCommand()); addSubcommand(UnmuteActorCommand()); + addSubcommand(UnmuteActorListCommand()); + addSubcommand(UnmuteThreadCommand()); + addSubcommand(VerificationCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/labeler.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/labeler.dart index 570701ebc..aa0b53b1d 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/labeler.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/labeler.dart @@ -20,8 +20,8 @@ import 'labeler/service.dart'; final class AppBskyLabelerCommand extends Command { AppBskyLabelerCommand() { - addSubcommand(ServiceCommand()); addSubcommand(GetServicesCommand()); + addSubcommand(ServiceCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/notification.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/notification.dart index d14e6c3ee..0931aa482 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/notification.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/notification.dart @@ -29,17 +29,17 @@ import 'notification/update_seen.dart'; final class AppBskyNotificationCommand extends Command { AppBskyNotificationCommand() { + addSubcommand(DeclarationCommand()); + addSubcommand(GetPreferencesCommand()); + addSubcommand(GetUnreadCountCommand()); + addSubcommand(ListActivitySubscriptionsCommand()); addSubcommand(ListNotificationsCommand()); - addSubcommand(RegisterPushCommand()); - addSubcommand(UpdateSeenCommand()); addSubcommand(PutActivitySubscriptionCommand()); addSubcommand(PutPreferencesCommand()); - addSubcommand(UnregisterPushCommand()); addSubcommand(PutPreferencesV2Command()); - addSubcommand(DeclarationCommand()); - addSubcommand(ListActivitySubscriptionsCommand()); - addSubcommand(GetUnreadCountCommand()); - addSubcommand(GetPreferencesCommand()); + addSubcommand(RegisterPushCommand()); + addSubcommand(UnregisterPushCommand()); + addSubcommand(UpdateSeenCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/unspecced.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/unspecced.dart index 644e06923..e40adb888 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/unspecced.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/unspecced.dart @@ -42,30 +42,30 @@ import 'unspecced/search_starter_packs_skeleton.dart'; final class AppBskyUnspeccedCommand extends Command { AppBskyUnspeccedCommand() { - addSubcommand(GetSuggestedFeedsCommand()); - addSubcommand(GetSuggestedFeedsSkeletonCommand()); - addSubcommand(SearchStarterPacksSkeletonCommand()); - addSubcommand(GetOnboardingSuggestedStarterPacksSkeletonCommand()); - addSubcommand(GetPostThreadOtherV2Command()); - addSubcommand(SearchPostsSkeletonCommand()); + addSubcommand(GetAgeAssuranceStateCommand()); addSubcommand(GetConfigCommand()); - addSubcommand(GetSuggestedUsersSkeletonCommand()); - addSubcommand(GetSuggestedOnboardingUsersCommand()); - addSubcommand(GetTrendsCommand()); - addSubcommand(SearchActorsSkeletonCommand()); + addSubcommand(GetOnboardingSuggestedStarterPacksCommand()); + addSubcommand(GetOnboardingSuggestedStarterPacksSkeletonCommand()); addSubcommand(GetOnboardingSuggestedUsersSkeletonCommand()); + addSubcommand(GetPopularFeedGeneratorsCommand()); + addSubcommand(GetPostThreadOtherV2Command()); addSubcommand(GetPostThreadV2Command()); + addSubcommand(GetSuggestedFeedsCommand()); + addSubcommand(GetSuggestedFeedsSkeletonCommand()); + addSubcommand(GetSuggestedOnboardingUsersCommand()); + addSubcommand(GetSuggestedStarterPacksCommand()); + addSubcommand(GetSuggestedStarterPacksSkeletonCommand()); addSubcommand(GetSuggestedUsersCommand()); - addSubcommand(GetTrendsSkeletonCommand()); - addSubcommand(GetTrendingTopicsCommand()); + addSubcommand(GetSuggestedUsersSkeletonCommand()); + addSubcommand(GetSuggestionsSkeletonCommand()); addSubcommand(GetTaggedSuggestionsCommand()); - addSubcommand(GetSuggestedStarterPacksSkeletonCommand()); - addSubcommand(GetPopularFeedGeneratorsCommand()); + addSubcommand(GetTrendingTopicsCommand()); + addSubcommand(GetTrendsCommand()); + addSubcommand(GetTrendsSkeletonCommand()); addSubcommand(InitAgeAssuranceCommand()); - addSubcommand(GetAgeAssuranceStateCommand()); - addSubcommand(GetOnboardingSuggestedStarterPacksCommand()); - addSubcommand(GetSuggestedStarterPacksCommand()); - addSubcommand(GetSuggestionsSkeletonCommand()); + addSubcommand(SearchActorsSkeletonCommand()); + addSubcommand(SearchPostsSkeletonCommand()); + addSubcommand(SearchStarterPacksSkeletonCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/video.dart b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/video.dart index eee8eb72d..6de34e2a8 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/video.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/app/bsky/video.dart @@ -20,8 +20,8 @@ import 'video/get_upload_limits.dart'; final class AppBskyVideoCommand extends Command { AppBskyVideoCommand() { - addSubcommand(GetUploadLimitsCommand()); addSubcommand(GetJobStatusCommand()); + addSubcommand(GetUploadLimitsCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/actor.dart b/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/actor.dart index 2ca14d2f4..a2c9047d2 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/actor.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/actor.dart @@ -20,8 +20,8 @@ import 'actor/export_account_data.dart'; final class ChatBskyActorCommand extends Command { ChatBskyActorCommand() { - addSubcommand(ExportAccountDataCommand()); addSubcommand(DeclarationCommand()); + addSubcommand(ExportAccountDataCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/convo.dart b/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/convo.dart index e8c8d5a77..bc937a066 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/convo.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/convo.dart @@ -35,23 +35,23 @@ import 'convo/update_read.dart'; final class ChatBskyConvoCommand extends Command { ChatBskyConvoCommand() { + addSubcommand(AcceptConvoCommand()); addSubcommand(AddReactionCommand()); - addSubcommand(GetLogCommand()); - addSubcommand(RemoveReactionCommand()); + addSubcommand(DeleteMessageForSelfCommand()); addSubcommand(GetConvoCommand()); - addSubcommand(SendMessageBatchCommand()); - addSubcommand(SendMessageCommand()); + addSubcommand(GetConvoAvailabilityCommand()); addSubcommand(GetConvoForMembersCommand()); - addSubcommand(UpdateAllReadCommand()); + addSubcommand(GetLogCommand()); + addSubcommand(GetMessagesCommand()); + addSubcommand(LeaveConvoCommand()); + addSubcommand(ListConvosCommand()); addSubcommand(MuteConvoCommand()); - addSubcommand(DeleteMessageForSelfCommand()); + addSubcommand(RemoveReactionCommand()); + addSubcommand(SendMessageCommand()); + addSubcommand(SendMessageBatchCommand()); addSubcommand(UnmuteConvoCommand()); - addSubcommand(ListConvosCommand()); - addSubcommand(LeaveConvoCommand()); - addSubcommand(AcceptConvoCommand()); + addSubcommand(UpdateAllReadCommand()); addSubcommand(UpdateReadCommand()); - addSubcommand(GetConvoAvailabilityCommand()); - addSubcommand(GetMessagesCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/moderation.dart b/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/moderation.dart index 4a71068e0..974de1a01 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/moderation.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/chat/bsky/moderation.dart @@ -21,9 +21,9 @@ import 'moderation/update_actor_access.dart'; final class ChatBskyModerationCommand extends Command { ChatBskyModerationCommand() { - addSubcommand(UpdateActorAccessCommand()); - addSubcommand(GetMessageContextCommand()); addSubcommand(GetActorMetadataCommand()); + addSubcommand(GetMessageContextCommand()); + addSubcommand(UpdateActorAccessCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/admin.dart b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/admin.dart index fb6403305..ced524092 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/admin.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/admin.dart @@ -33,21 +33,21 @@ import 'admin/update_subject_status.dart'; final class ComAtprotoAdminCommand extends Command { ComAtprotoAdminCommand() { - addSubcommand(UpdateAccountHandleCommand()); - addSubcommand(UpdateAccountSigningKeyCommand()); addSubcommand(DeleteAccountCommand()); - addSubcommand(GetSubjectStatusCommand()); + addSubcommand(DisableAccountInvitesCommand()); + addSubcommand(DisableInviteCodesCommand()); + addSubcommand(EnableAccountInvitesCommand()); + addSubcommand(GetAccountInfoCommand()); addSubcommand(GetAccountInfosCommand()); - addSubcommand(UpdateSubjectStatusCommand()); addSubcommand(GetInviteCodesCommand()); - addSubcommand(DisableAccountInvitesCommand()); + addSubcommand(GetSubjectStatusCommand()); + addSubcommand(SearchAccountsCommand()); addSubcommand(SendEmailCommand()); - addSubcommand(GetAccountInfoCommand()); - addSubcommand(EnableAccountInvitesCommand()); addSubcommand(UpdateAccountEmailCommand()); - addSubcommand(DisableInviteCodesCommand()); + addSubcommand(UpdateAccountHandleCommand()); addSubcommand(UpdateAccountPasswordCommand()); - addSubcommand(SearchAccountsCommand()); + addSubcommand(UpdateAccountSigningKeyCommand()); + addSubcommand(UpdateSubjectStatusCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/identity.dart b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/identity.dart index 89f0d5cc2..dac3f366b 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/identity.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/identity.dart @@ -26,12 +26,12 @@ import 'identity/update_handle.dart'; final class ComAtprotoIdentityCommand extends Command { ComAtprotoIdentityCommand() { - addSubcommand(ResolveDidCommand()); - addSubcommand(SignPlcOperationCommand()); - addSubcommand(RefreshIdentityCommand()); addSubcommand(GetRecommendedDidCredentialsCommand()); - addSubcommand(ResolveIdentityCommand()); + addSubcommand(RefreshIdentityCommand()); + addSubcommand(ResolveDidCommand()); addSubcommand(ResolveHandleCommand()); + addSubcommand(ResolveIdentityCommand()); + addSubcommand(SignPlcOperationCommand()); addSubcommand(SubmitPlcOperationCommand()); addSubcommand(UpdateHandleCommand()); } diff --git a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/repo.dart b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/repo.dart index 4da737994..928626cae 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/repo.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/repo.dart @@ -26,14 +26,14 @@ import 'repo/put_record.dart'; final class ComAtprotoRepoCommand extends Command { ComAtprotoRepoCommand() { - addSubcommand(PutRecordCommand()); - addSubcommand(DescribeRepoCommand()); addSubcommand(ApplyWritesCommand()); addSubcommand(CreateRecordCommand()); addSubcommand(DeleteRecordCommand()); + addSubcommand(DescribeRepoCommand()); + addSubcommand(GetRecordCommand()); addSubcommand(ListMissingBlobsCommand()); addSubcommand(ListRecordsCommand()); - addSubcommand(GetRecordCommand()); + addSubcommand(PutRecordCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/server.dart b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/server.dart index a6aaf75c0..18c2ca7fb 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/server.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/server.dart @@ -38,24 +38,24 @@ import 'server/update_email.dart'; final class ComAtprotoServerCommand extends Command { ComAtprotoServerCommand() { addSubcommand(CheckAccountStatusCommand()); - addSubcommand(GetServiceAuthCommand()); + addSubcommand(ConfirmEmailCommand()); + addSubcommand(CreateAccountCommand()); + addSubcommand(CreateAppPasswordCommand()); addSubcommand(CreateInviteCodeCommand()); - addSubcommand(DeleteAccountCommand()); - addSubcommand(RevokeAppPasswordCommand()); addSubcommand(CreateInviteCodesCommand()); + addSubcommand(CreateSessionCommand()); addSubcommand(DeactivateAccountCommand()); - addSubcommand(CreateAccountCommand()); - addSubcommand(RequestPasswordResetCommand()); - addSubcommand(UpdateEmailCommand()); - addSubcommand(GetAccountInviteCodesCommand()); - addSubcommand(ConfirmEmailCommand()); - addSubcommand(ResetPasswordCommand()); + addSubcommand(DeleteAccountCommand()); addSubcommand(DescribeServerCommand()); - addSubcommand(CreateSessionCommand()); - addSubcommand(CreateAppPasswordCommand()); + addSubcommand(GetAccountInviteCodesCommand()); + addSubcommand(GetServiceAuthCommand()); addSubcommand(GetSessionCommand()); addSubcommand(ListAppPasswordsCommand()); + addSubcommand(RequestPasswordResetCommand()); addSubcommand(ReserveSigningKeyCommand()); + addSubcommand(ResetPasswordCommand()); + addSubcommand(RevokeAppPasswordCommand()); + addSubcommand(UpdateEmailCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/sync.dart b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/sync.dart index 466edb45c..0ab01072a 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/sync.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/sync.dart @@ -33,21 +33,21 @@ import 'sync/request_crawl.dart'; final class ComAtprotoSyncCommand extends Command { ComAtprotoSyncCommand() { + addSubcommand(GetBlobCommand()); + addSubcommand(GetBlocksCommand()); addSubcommand(GetCheckoutCommand()); addSubcommand(GetHeadCommand()); - addSubcommand(GetBlobCommand()); addSubcommand(GetHostStatusCommand()); - addSubcommand(GetBlocksCommand()); + addSubcommand(GetLatestCommitCommand()); + addSubcommand(GetRecordCommand()); + addSubcommand(GetRepoCommand()); + addSubcommand(GetRepoStatusCommand()); addSubcommand(ListBlobsCommand()); addSubcommand(ListHostsCommand()); - addSubcommand(NotifyOfUpdateCommand()); addSubcommand(ListReposCommand()); - addSubcommand(GetRepoCommand()); - addSubcommand(GetLatestCommitCommand()); addSubcommand(ListReposByCollectionCommand()); + addSubcommand(NotifyOfUpdateCommand()); addSubcommand(RequestCrawlCommand()); - addSubcommand(GetRecordCommand()); - addSubcommand(GetRepoStatusCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/temp.dart b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/temp.dart index 6c4268317..bfef3cef0 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/temp.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/com/atproto/temp.dart @@ -25,13 +25,13 @@ import 'temp/revoke_account_credentials.dart'; final class ComAtprotoTempCommand extends Command { ComAtprotoTempCommand() { - addSubcommand(CheckHandleAvailabilityCommand()); - addSubcommand(FetchLabelsCommand()); addSubcommand(AddReservedHandleCommand()); + addSubcommand(CheckHandleAvailabilityCommand()); + addSubcommand(CheckSignupQueueCommand()); addSubcommand(DereferenceScopeCommand()); + addSubcommand(FetchLabelsCommand()); addSubcommand(RequestPhoneVerificationCommand()); addSubcommand(RevokeAccountCredentialsCommand()); - addSubcommand(CheckSignupQueueCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/lex_commands.dart b/packages/bluesky_cli/lib/src/commands/codegen/lex_commands.dart index 6f69c3091..3aadedeef 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/lex_commands.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/lex_commands.dart @@ -47,37 +47,37 @@ import 'tools/ozone/verification.dart'; // ************************************************************************** final lexCommands = [ - ComAtprotoLexiconCommand(), - ComAtprotoRepoCommand(), - ComAtprotoServerCommand(), - ComAtprotoAdminCommand(), - ComAtprotoTempCommand(), - ComAtprotoIdentityCommand(), - ComAtprotoLabelCommand(), - ComAtprotoModerationCommand(), - ComAtprotoSyncCommand(), - AppBskyGraphCommand(), - AppBskyDraftCommand(), - AppBskyUnspeccedCommand(), - AppBskyContactCommand(), + AppBskyActorCommand(), AppBskyAgeassuranceCommand(), + AppBskyBookmarkCommand(), + AppBskyContactCommand(), + AppBskyDraftCommand(), AppBskyFeedCommand(), - AppBskyActorCommand(), - AppBskyVideoCommand(), - AppBskyNotificationCommand(), + AppBskyGraphCommand(), AppBskyLabelerCommand(), - AppBskyBookmarkCommand(), + AppBskyNotificationCommand(), + AppBskyUnspeccedCommand(), + AppBskyVideoCommand(), ChatBskyActorCommand(), ChatBskyConvoCommand(), ChatBskyModerationCommand(), + ComAtprotoAdminCommand(), + ComAtprotoIdentityCommand(), + ComAtprotoLabelCommand(), + ComAtprotoLexiconCommand(), + ComAtprotoModerationCommand(), + ComAtprotoRepoCommand(), + ComAtprotoServerCommand(), + ComAtprotoSyncCommand(), + ComAtprotoTempCommand(), + ToolsOzoneCommunicationCommand(), + ToolsOzoneHostingCommand(), + ToolsOzoneModerationCommand(), ToolsOzoneSafelinkCommand(), + ToolsOzoneServerCommand(), ToolsOzoneSetCommand(), ToolsOzoneSettingCommand(), + ToolsOzoneSignatureCommand(), ToolsOzoneTeamCommand(), - ToolsOzoneServerCommand(), - ToolsOzoneCommunicationCommand(), - ToolsOzoneHostingCommand(), ToolsOzoneVerificationCommand(), - ToolsOzoneModerationCommand(), - ToolsOzoneSignatureCommand(), ]; diff --git a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/communication.dart b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/communication.dart index d008f67c4..f8b4e3ad9 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/communication.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/communication.dart @@ -23,9 +23,9 @@ import 'communication/update_template.dart'; final class ToolsOzoneCommunicationCommand extends Command { ToolsOzoneCommunicationCommand() { addSubcommand(CreateTemplateCommand()); - addSubcommand(UpdateTemplateCommand()); - addSubcommand(ListTemplatesCommand()); addSubcommand(DeleteTemplateCommand()); + addSubcommand(ListTemplatesCommand()); + addSubcommand(UpdateTemplateCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/moderation.dart b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/moderation.dart index 0c2f8af78..eab57944f 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/moderation.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/moderation.dart @@ -33,21 +33,21 @@ import 'moderation/search_repos.dart'; final class ToolsOzoneModerationCommand extends Command { ToolsOzoneModerationCommand() { - addSubcommand(QueryStatusesCommand()); - addSubcommand(SearchReposCommand()); - addSubcommand(GetReporterStatsCommand()); - addSubcommand(ScheduleActionCommand()); - addSubcommand(GetAccountTimelineCommand()); - addSubcommand(GetRepoCommand()); - addSubcommand(ListScheduledActionsCommand()); - addSubcommand(QueryEventsCommand()); + addSubcommand(CancelScheduledActionsCommand()); addSubcommand(EmitEventCommand()); + addSubcommand(GetAccountTimelineCommand()); addSubcommand(GetEventCommand()); addSubcommand(GetRecordCommand()); - addSubcommand(CancelScheduledActionsCommand()); - addSubcommand(GetSubjectsCommand()); - addSubcommand(GetReposCommand()); addSubcommand(GetRecordsCommand()); + addSubcommand(GetRepoCommand()); + addSubcommand(GetReporterStatsCommand()); + addSubcommand(GetReposCommand()); + addSubcommand(GetSubjectsCommand()); + addSubcommand(ListScheduledActionsCommand()); + addSubcommand(QueryEventsCommand()); + addSubcommand(QueryStatusesCommand()); + addSubcommand(ScheduleActionCommand()); + addSubcommand(SearchReposCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/safelink.dart b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/safelink.dart index 760e6e8bf..5710d482a 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/safelink.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/safelink.dart @@ -23,11 +23,11 @@ import 'safelink/update_rule.dart'; final class ToolsOzoneSafelinkCommand extends Command { ToolsOzoneSafelinkCommand() { - addSubcommand(UpdateRuleCommand()); + addSubcommand(AddRuleCommand()); addSubcommand(QueryEventsCommand()); addSubcommand(QueryRulesCommand()); addSubcommand(RemoveRuleCommand()); - addSubcommand(AddRuleCommand()); + addSubcommand(UpdateRuleCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/set.dart b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/set.dart index 6b09687b8..f1c8b76a8 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/set.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/set.dart @@ -23,11 +23,11 @@ import 'set/query_sets.dart'; final class ToolsOzoneSetCommand extends Command { ToolsOzoneSetCommand() { + addSubcommand(AddValuesCommand()); addSubcommand(DeleteSetCommand()); addSubcommand(DeleteValuesCommand()); addSubcommand(GetValuesCommand()); addSubcommand(QuerySetsCommand()); - addSubcommand(AddValuesCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/setting.dart b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/setting.dart index 6fe9e93d5..92c7b6106 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/setting.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/setting.dart @@ -21,9 +21,9 @@ import 'setting/upsert_option.dart'; final class ToolsOzoneSettingCommand extends Command { ToolsOzoneSettingCommand() { - addSubcommand(UpsertOptionCommand()); - addSubcommand(RemoveOptionsCommand()); addSubcommand(ListOptionsCommand()); + addSubcommand(RemoveOptionsCommand()); + addSubcommand(UpsertOptionCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/signature.dart b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/signature.dart index 9facbabf0..a27539670 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/signature.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/signature.dart @@ -21,8 +21,8 @@ import 'signature/search_accounts.dart'; final class ToolsOzoneSignatureCommand extends Command { ToolsOzoneSignatureCommand() { - addSubcommand(FindRelatedAccountsCommand()); addSubcommand(FindCorrelationCommand()); + addSubcommand(FindRelatedAccountsCommand()); addSubcommand(SearchAccountsCommand()); } diff --git a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/team.dart b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/team.dart index ee2ae8a10..7f5f3764f 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/team.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/team.dart @@ -22,10 +22,10 @@ import 'team/update_member.dart'; final class ToolsOzoneTeamCommand extends Command { ToolsOzoneTeamCommand() { + addSubcommand(AddMemberCommand()); + addSubcommand(DeleteMemberCommand()); addSubcommand(ListMembersCommand()); addSubcommand(UpdateMemberCommand()); - addSubcommand(DeleteMemberCommand()); - addSubcommand(AddMemberCommand()); } @override diff --git a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/verification.dart b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/verification.dart index 8fe3a34c8..be3a3df0d 100644 --- a/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/verification.dart +++ b/packages/bluesky_cli/lib/src/commands/codegen/tools/ozone/verification.dart @@ -21,9 +21,9 @@ import 'verification/revoke_verifications.dart'; final class ToolsOzoneVerificationCommand extends Command { ToolsOzoneVerificationCommand() { - addSubcommand(RevokeVerificationsCommand()); addSubcommand(GrantVerificationsCommand()); addSubcommand(ListVerificationsCommand()); + addSubcommand(RevokeVerificationsCommand()); } @override diff --git a/packages/lexicon/lib/src/lexicons.g.dart b/packages/lexicon/lib/src/lexicons.g.dart index fca9ff6b4..75ce77b1e 100644 --- a/packages/lexicon/lib/src/lexicons.g.dart +++ b/packages/lexicon/lib/src/lexicons.g.dart @@ -3081,16 +3081,13 @@ const comAtprotoLabelDefs = { "type": "string", "knownValues": [ "!hide", - "!no-promote", "!warn", "!no-unauthenticated", - "dmca-violation", - "doxxing", "porn", "sexual", "nudity", - "nsfl", - "gore", + "graphic-media", + "bot", ], }, }, diff --git a/website/docs/lexicons/com/atproto/label/defs.md b/website/docs/lexicons/com/atproto/label/defs.md index cc8ef36cb..f0e967453 100644 --- a/website/docs/lexicons/com/atproto/label/defs.md +++ b/website/docs/lexicons/com/atproto/label/defs.md @@ -64,4 +64,4 @@ Strings which describe the label in the UI, localized into a specific language. | Property | Type | Known Values | Required | Description | | --- | --- | --- | :---: | --- | -| **labelValue** | string | !hide
!no-promote
!warn
!no-unauthenticated
dmca-violation
doxxing
porn
sexual
nudity
nsfl
gore | ❌ | - | +| **labelValue** | string | !hide
!warn
!no-unauthenticated
porn
sexual
nudity
graphic-media
bot | ❌ | - |