Skip to content

Commit

Permalink
codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Mar 12, 2024
1 parent 09f5934 commit a00745d
Show file tree
Hide file tree
Showing 58 changed files with 549 additions and 12,039 deletions.
2 changes: 1 addition & 1 deletion lexicons/tools/ozone/communication/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
}
}
}
}
}
10 changes: 8 additions & 2 deletions lexicons/tools/ozone/moderation/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
},
"subject": {
"type": "union",
"refs": ["com.atproto.admin.defs#repoRef", "com.atproto.repo.strongRef"]
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef"
]
},
"subjectBlobCids": { "type": "array", "items": { "type": "string" } },
"createdBy": { "type": "string", "format": "did" },
Expand Down Expand Up @@ -91,7 +94,10 @@
"id": { "type": "integer" },
"subject": {
"type": "union",
"refs": ["com.atproto.admin.defs#repoRef", "com.atproto.repo.strongRef"]
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef"
]
},
"subjectBlobCids": {
"type": "array",
Expand Down
174 changes: 0 additions & 174 deletions packages/api/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,19 @@ import {
} from '@atproto/xrpc'
import { schemas } from './lexicons'
import { CID } from 'multiformats/cid'
import * as ComAtprotoAdminCreateCommunicationTemplate from './types/com/atproto/admin/createCommunicationTemplate'
import * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
import * as ComAtprotoAdminDeleteAccount from './types/com/atproto/admin/deleteAccount'
import * as ComAtprotoAdminDeleteCommunicationTemplate from './types/com/atproto/admin/deleteCommunicationTemplate'
import * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites'
import * as ComAtprotoAdminDisableInviteCodes from './types/com/atproto/admin/disableInviteCodes'
import * as ComAtprotoAdminEmitModerationEvent from './types/com/atproto/admin/emitModerationEvent'
import * as ComAtprotoAdminEnableAccountInvites from './types/com/atproto/admin/enableAccountInvites'
import * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAccountInfo'
import * as ComAtprotoAdminGetAccountInfos from './types/com/atproto/admin/getAccountInfos'
import * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes'
import * as ComAtprotoAdminGetModerationEvent from './types/com/atproto/admin/getModerationEvent'
import * as ComAtprotoAdminGetRecord from './types/com/atproto/admin/getRecord'
import * as ComAtprotoAdminGetRepo from './types/com/atproto/admin/getRepo'
import * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus'
import * as ComAtprotoAdminListCommunicationTemplates from './types/com/atproto/admin/listCommunicationTemplates'
import * as ComAtprotoAdminQueryModerationEvents from './types/com/atproto/admin/queryModerationEvents'
import * as ComAtprotoAdminQueryModerationStatuses from './types/com/atproto/admin/queryModerationStatuses'
import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos'
import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
import * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword'
import * as ComAtprotoAdminUpdateCommunicationTemplate from './types/com/atproto/admin/updateCommunicationTemplate'
import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
import * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials'
import * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature'
Expand Down Expand Up @@ -164,30 +153,19 @@ import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecce
import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'

export * as ComAtprotoAdminCreateCommunicationTemplate from './types/com/atproto/admin/createCommunicationTemplate'
export * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs'
export * as ComAtprotoAdminDeleteAccount from './types/com/atproto/admin/deleteAccount'
export * as ComAtprotoAdminDeleteCommunicationTemplate from './types/com/atproto/admin/deleteCommunicationTemplate'
export * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites'
export * as ComAtprotoAdminDisableInviteCodes from './types/com/atproto/admin/disableInviteCodes'
export * as ComAtprotoAdminEmitModerationEvent from './types/com/atproto/admin/emitModerationEvent'
export * as ComAtprotoAdminEnableAccountInvites from './types/com/atproto/admin/enableAccountInvites'
export * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAccountInfo'
export * as ComAtprotoAdminGetAccountInfos from './types/com/atproto/admin/getAccountInfos'
export * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes'
export * as ComAtprotoAdminGetModerationEvent from './types/com/atproto/admin/getModerationEvent'
export * as ComAtprotoAdminGetRecord from './types/com/atproto/admin/getRecord'
export * as ComAtprotoAdminGetRepo from './types/com/atproto/admin/getRepo'
export * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus'
export * as ComAtprotoAdminListCommunicationTemplates from './types/com/atproto/admin/listCommunicationTemplates'
export * as ComAtprotoAdminQueryModerationEvents from './types/com/atproto/admin/queryModerationEvents'
export * as ComAtprotoAdminQueryModerationStatuses from './types/com/atproto/admin/queryModerationStatuses'
export * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos'
export * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
export * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
export * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword'
export * as ComAtprotoAdminUpdateCommunicationTemplate from './types/com/atproto/admin/updateCommunicationTemplate'
export * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
export * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials'
export * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature'
Expand Down Expand Up @@ -321,12 +299,6 @@ export * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecce
export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton'
export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'

export const COM_ATPROTO_ADMIN = {
DefsReviewOpen: 'com.atproto.admin.defs#reviewOpen',
DefsReviewEscalated: 'com.atproto.admin.defs#reviewEscalated',
DefsReviewClosed: 'com.atproto.admin.defs#reviewClosed',
DefsReviewNone: 'com.atproto.admin.defs#reviewNone',
}
export const COM_ATPROTO_MODERATION = {
DefsReasonSpam: 'com.atproto.moderation.defs#reasonSpam',
DefsReasonViolation: 'com.atproto.moderation.defs#reasonViolation',
Expand Down Expand Up @@ -412,22 +384,6 @@ export class ComAtprotoAdminNS {
this._service = service
}

createCommunicationTemplate(
data?: ComAtprotoAdminCreateCommunicationTemplate.InputSchema,
opts?: ComAtprotoAdminCreateCommunicationTemplate.CallOptions,
): Promise<ComAtprotoAdminCreateCommunicationTemplate.Response> {
return this._service.xrpc
.call(
'com.atproto.admin.createCommunicationTemplate',
opts?.qp,
data,
opts,
)
.catch((e) => {
throw ComAtprotoAdminCreateCommunicationTemplate.toKnownErr(e)
})
}

deleteAccount(
data?: ComAtprotoAdminDeleteAccount.InputSchema,
opts?: ComAtprotoAdminDeleteAccount.CallOptions,
Expand All @@ -439,22 +395,6 @@ export class ComAtprotoAdminNS {
})
}

deleteCommunicationTemplate(
data?: ComAtprotoAdminDeleteCommunicationTemplate.InputSchema,
opts?: ComAtprotoAdminDeleteCommunicationTemplate.CallOptions,
): Promise<ComAtprotoAdminDeleteCommunicationTemplate.Response> {
return this._service.xrpc
.call(
'com.atproto.admin.deleteCommunicationTemplate',
opts?.qp,
data,
opts,
)
.catch((e) => {
throw ComAtprotoAdminDeleteCommunicationTemplate.toKnownErr(e)
})
}

disableAccountInvites(
data?: ComAtprotoAdminDisableAccountInvites.InputSchema,
opts?: ComAtprotoAdminDisableAccountInvites.CallOptions,
Expand All @@ -477,17 +417,6 @@ export class ComAtprotoAdminNS {
})
}

emitModerationEvent(
data?: ComAtprotoAdminEmitModerationEvent.InputSchema,
opts?: ComAtprotoAdminEmitModerationEvent.CallOptions,
): Promise<ComAtprotoAdminEmitModerationEvent.Response> {
return this._service.xrpc
.call('com.atproto.admin.emitModerationEvent', opts?.qp, data, opts)
.catch((e) => {
throw ComAtprotoAdminEmitModerationEvent.toKnownErr(e)
})
}

enableAccountInvites(
data?: ComAtprotoAdminEnableAccountInvites.InputSchema,
opts?: ComAtprotoAdminEnableAccountInvites.CallOptions,
Expand Down Expand Up @@ -532,39 +461,6 @@ export class ComAtprotoAdminNS {
})
}

getModerationEvent(
params?: ComAtprotoAdminGetModerationEvent.QueryParams,
opts?: ComAtprotoAdminGetModerationEvent.CallOptions,
): Promise<ComAtprotoAdminGetModerationEvent.Response> {
return this._service.xrpc
.call('com.atproto.admin.getModerationEvent', params, undefined, opts)
.catch((e) => {
throw ComAtprotoAdminGetModerationEvent.toKnownErr(e)
})
}

getRecord(
params?: ComAtprotoAdminGetRecord.QueryParams,
opts?: ComAtprotoAdminGetRecord.CallOptions,
): Promise<ComAtprotoAdminGetRecord.Response> {
return this._service.xrpc
.call('com.atproto.admin.getRecord', params, undefined, opts)
.catch((e) => {
throw ComAtprotoAdminGetRecord.toKnownErr(e)
})
}

getRepo(
params?: ComAtprotoAdminGetRepo.QueryParams,
opts?: ComAtprotoAdminGetRepo.CallOptions,
): Promise<ComAtprotoAdminGetRepo.Response> {
return this._service.xrpc
.call('com.atproto.admin.getRepo', params, undefined, opts)
.catch((e) => {
throw ComAtprotoAdminGetRepo.toKnownErr(e)
})
}

getSubjectStatus(
params?: ComAtprotoAdminGetSubjectStatus.QueryParams,
opts?: ComAtprotoAdminGetSubjectStatus.CallOptions,
Expand All @@ -576,60 +472,6 @@ export class ComAtprotoAdminNS {
})
}

listCommunicationTemplates(
params?: ComAtprotoAdminListCommunicationTemplates.QueryParams,
opts?: ComAtprotoAdminListCommunicationTemplates.CallOptions,
): Promise<ComAtprotoAdminListCommunicationTemplates.Response> {
return this._service.xrpc
.call(
'com.atproto.admin.listCommunicationTemplates',
params,
undefined,
opts,
)
.catch((e) => {
throw ComAtprotoAdminListCommunicationTemplates.toKnownErr(e)
})
}

queryModerationEvents(
params?: ComAtprotoAdminQueryModerationEvents.QueryParams,
opts?: ComAtprotoAdminQueryModerationEvents.CallOptions,
): Promise<ComAtprotoAdminQueryModerationEvents.Response> {
return this._service.xrpc
.call('com.atproto.admin.queryModerationEvents', params, undefined, opts)
.catch((e) => {
throw ComAtprotoAdminQueryModerationEvents.toKnownErr(e)
})
}

queryModerationStatuses(
params?: ComAtprotoAdminQueryModerationStatuses.QueryParams,
opts?: ComAtprotoAdminQueryModerationStatuses.CallOptions,
): Promise<ComAtprotoAdminQueryModerationStatuses.Response> {
return this._service.xrpc
.call(
'com.atproto.admin.queryModerationStatuses',
params,
undefined,
opts,
)
.catch((e) => {
throw ComAtprotoAdminQueryModerationStatuses.toKnownErr(e)
})
}

searchRepos(
params?: ComAtprotoAdminSearchRepos.QueryParams,
opts?: ComAtprotoAdminSearchRepos.CallOptions,
): Promise<ComAtprotoAdminSearchRepos.Response> {
return this._service.xrpc
.call('com.atproto.admin.searchRepos', params, undefined, opts)
.catch((e) => {
throw ComAtprotoAdminSearchRepos.toKnownErr(e)
})
}

sendEmail(
data?: ComAtprotoAdminSendEmail.InputSchema,
opts?: ComAtprotoAdminSendEmail.CallOptions,
Expand Down Expand Up @@ -674,22 +516,6 @@ export class ComAtprotoAdminNS {
})
}

updateCommunicationTemplate(
data?: ComAtprotoAdminUpdateCommunicationTemplate.InputSchema,
opts?: ComAtprotoAdminUpdateCommunicationTemplate.CallOptions,
): Promise<ComAtprotoAdminUpdateCommunicationTemplate.Response> {
return this._service.xrpc
.call(
'com.atproto.admin.updateCommunicationTemplate',
opts?.qp,
data,
opts,
)
.catch((e) => {
throw ComAtprotoAdminUpdateCommunicationTemplate.toKnownErr(e)
})
}

updateSubjectStatus(
data?: ComAtprotoAdminUpdateSubjectStatus.InputSchema,
opts?: ComAtprotoAdminUpdateSubjectStatus.CallOptions,
Expand Down
Loading

0 comments on commit a00745d

Please sign in to comment.