// Generated by `contrail connect`. Re-run the command to update; do not edit. import { createPublicServiceClient } from "@atmo-dev/contrail/client"; import type { PublicServiceClientOptions } from "@atmo-dev/contrail/client"; import type {} from "./types/index.js"; export const contrailApi = { namespace: "watch.atmo", serviceMethods: [ "watch.atmo.comment.getRecord", "watch.atmo.comment.listRecords", "watch.atmo.getCursor", "watch.atmo.getProfile", "watch.atmo.like.getRecord", "watch.atmo.like.listRecords", "watch.atmo.list.getRecord", "watch.atmo.list.listRecords", "watch.atmo.listItem.getRecord", "watch.atmo.listItem.listRecords", "watch.atmo.notifyOfUpdate", "watch.atmo.review.getRatingSummary", "watch.atmo.review.getRecord", "watch.atmo.review.getTopRated", "watch.atmo.review.listRecords", "watch.atmo.review.listWrittenRecords", "watch.atmo.video.getRecord", "watch.atmo.video.listRandomRecords", "watch.atmo.video.listRecords", ], protectedMethods: [ "watch.atmo.notifyOfUpdate", ], collections: [ "app.bsky.actor.profile", "social.popfeed.actor.profile", "social.popfeed.feed.comment", "social.popfeed.feed.like", "social.popfeed.feed.list", "social.popfeed.feed.listItem", "social.popfeed.feed.review", "watch.atmo.alpha.video", ], notifyMethod: "watch.atmo.notifyOfUpdate", } as const; export const contrailTarget = { endpoint: "https://api.atmo.watch", serviceDid: "did:web:api.atmo.watch", serviceAudience: "did:web:api.atmo.watch#contrail", scope: "rpc?aud=did:web:api.atmo.watch%23contrail&lxm=watch.atmo.notifyOfUpdate", protectedMethods: [ "watch.atmo.notifyOfUpdate", ], serviceMethods: [ "watch.atmo.comment.getRecord", "watch.atmo.comment.listRecords", "watch.atmo.getCursor", "watch.atmo.getProfile", "watch.atmo.like.getRecord", "watch.atmo.like.listRecords", "watch.atmo.list.getRecord", "watch.atmo.list.listRecords", "watch.atmo.listItem.getRecord", "watch.atmo.listItem.listRecords", "watch.atmo.notifyOfUpdate", "watch.atmo.review.getRatingSummary", "watch.atmo.review.getRecord", "watch.atmo.review.getTopRated", "watch.atmo.review.listRecords", "watch.atmo.review.listWrittenRecords", "watch.atmo.video.getRecord", "watch.atmo.video.listRandomRecords", "watch.atmo.video.listRecords", ], collections: [ "app.bsky.actor.profile", "social.popfeed.actor.profile", "social.popfeed.feed.comment", "social.popfeed.feed.like", "social.popfeed.feed.list", "social.popfeed.feed.listItem", "social.popfeed.feed.review", "watch.atmo.alpha.video", ], notifyMethod: "watch.atmo.notifyOfUpdate", } as const; export const contrailMethods = contrailTarget.serviceMethods; export type ContrailTarget = Pick< PublicServiceClientOptions, "endpoint" | "allowInsecureHttp" | "serviceDid" | "serviceAudience" | "scope" | "protectedMethods" | "serviceMethods" | "collections" > & { notifyMethod?: PublicServiceClientOptions["notifyMethod"] | null; }; export function createContrailClient(target: ContrailTarget = contrailTarget) { const { notifyMethod: targetNotifyMethod, ...runtimeTarget } = target; const notifyMethod = targetNotifyMethod === undefined ? contrailApi.notifyMethod : targetNotifyMethod; return createPublicServiceClient({ ...runtimeTarget, serviceMethods: target.serviceMethods ?? contrailApi.serviceMethods, collections: target.collections ?? contrailApi.collections, ...(notifyMethod ? { notifyMethod } : {}), }); } export function createLocalContrailClient( endpoint = "http://127.0.0.1:8787", ) { return createContrailClient({ endpoint, allowInsecureHttp: true, serviceMethods: contrailApi.serviceMethods, collections: contrailApi.collections, notifyMethod: contrailApi.notifyMethod, }); } export const contrail = createContrailClient();