@whop/api
Version:
Whop API client
1 lines • 710 kB
Source Map (JSON)
{"version":3,"sources":["../src/verify-user-token.ts","../src/codegen/proto/index.ts","../src/codegen/proto/index.common.ts","../src/codegen/proto/common/users.ts","../src/codegen/proto/common/common.ts","../src/codegen/proto/common/feed.ts","../src/codegen/proto/common/notifications.ts","../src/codegen/proto/common/product_surface.ts","../src/codegen/proto/common/websockets.ts","../src/codegen/proto/index.google.ts","../src/codegen/proto/index.google.protobuf.ts","../src/codegen/proto/google/protobuf/struct.ts","../src/codegen/proto/index.calendar_bookings_app.ts","../src/codegen/proto/index.bounties_app.ts","../src/codegen/proto/bounties_app/bounties_app.ts","../src/codegen/proto/index.content_app.ts","../src/codegen/proto/index.content_rewards_app.ts","../src/codegen/proto/content_rewards_app/content_rewards_app.ts","../src/codegen/proto/index.courses_app.ts","../src/codegen/proto/index.events_app.ts","../src/codegen/proto/events_app/events_app.ts","../src/codegen/proto/index.wheel_app.ts","../src/codegen/proto/wheel_app/wheel_app.ts","../src/codegen/proto/index.experience.ts","../src/codegen/proto/index.games.ts","../src/codegen/proto/index.games.quizzes.ts","../src/codegen/proto/games/quizzes/quizzes.ts","../src/codegen/proto/index.data_platform.ts","../src/codegen/proto/data_platform/dispute_rates_query.ts","../src/webhooks.ts","../src/utils/retry.ts","../src/attachments/upload-parts.ts","../src/utils/sum.ts","../src/attachments/upload.ts","../src/attachments/analyze.ts","../src/attachments/common.ts","../src/utils/with-awaitable-params.ts","../src/utils/b64.ts","../src/utils/md5.ts","../src/attachments/prepare.ts","../src/attachments/partial-file-sdk-extensions.ts","../src/attachments/file-sdk-extensions.ts","../src/codegen/graphql/client.ts","../src/sdk/sdk-common.ts","../src/websockets/client.common.ts","../src/websockets/client.browser.ts","../src/sdk/client-sdk-shared.ts","../src/codegen/graphql/server.ts","../src/oauth/index.ts","../src/websockets/server.ts","../src/websockets/client.server.ts","../src/sdk/server-sdk-shared.ts"],"sourcesContent":["import { importJWK, jwtVerify } from \"jose\";\n\nconst USER_TOKEN_HEADER_NAME = \"x-whop-user-token\";\nconst USER_TOKEN_VERIFICATION_KEY =\n\t'{\"kty\":\"EC\",\"x\":\"rz8a8vxvexHC0TLT91g7llOdDOsNuYiGEfic4Qhni-E\",\"y\":\"zH0QblKYToexd5PEIMGXPVJS9AB5smKrW4S_TbiXrOs\",\"crv\":\"P-256\"}';\n\nexport function getUserToken(token: string): string;\nexport function getUserToken(\n\ttokenOrHeadersOrRequest: string | Headers | Request | null | undefined,\n): string | null;\nexport function getUserToken(\n\ttokenOrHeadersOrRequest: string | Headers | Request | null | undefined,\n): string | null {\n\tif (typeof tokenOrHeadersOrRequest === \"string\")\n\t\treturn tokenOrHeadersOrRequest;\n\n\tif (tokenOrHeadersOrRequest instanceof Headers)\n\t\treturn tokenOrHeadersOrRequest.get(USER_TOKEN_HEADER_NAME);\n\n\tif (tokenOrHeadersOrRequest instanceof Request)\n\t\treturn tokenOrHeadersOrRequest.headers.get(USER_TOKEN_HEADER_NAME);\n\n\treturn null;\n}\n\nexport interface UserTokenPayload {\n\t/// The user id of the user who is making the request.\n\tuserId: string;\n\n\t/// The app id of the app that is making the request.\n\t/// This will always be the same as the app id passed in the options.\n\tappId: string;\n}\n\nexport interface VerifyUserTokenOptions<DontThrow extends boolean = false> {\n\t/// This is the app id of your app. You can find it in the app settings dashboard.\n\tappId: string;\n\n\t/// The public key used to verify the user token. You don't need to provide this by default.\n\tpublicKey?: string;\n\n\t/// If true, the function will instead return null if the user token is invalid.\n\t/// Otherwise, it will throw an error.\n\tdontThrow?: DontThrow;\n}\n\nexport function makeUserTokenVerifier<DontThrow extends boolean = false>(\n\toptions: VerifyUserTokenOptions<DontThrow>,\n) {\n\treturn async function verifyUserToken<DT extends boolean = DontThrow>(\n\t\ttokenOrHeadersOrRequest: string | Headers | Request | null | undefined,\n\t\toverrideOptions?: Partial<VerifyUserTokenOptions<DT>>,\n\t) {\n\t\treturn await internalVerifyUserToken<DT>(tokenOrHeadersOrRequest, {\n\t\t\t...options,\n\t\t\t...overrideOptions,\n\t\t} as VerifyUserTokenOptions<DT>);\n\t};\n}\n\nexport function verifyUserToken<DontThrow extends boolean = false>(\n\ttokenOrHeadersOrRequest: string | Headers | Request | null | undefined,\n\toverrideOptions?: Partial<VerifyUserTokenOptions<DontThrow>>,\n) {\n\treturn internalVerifyUserToken<DontThrow>(tokenOrHeadersOrRequest, {\n\t\t...overrideOptions,\n\t} as VerifyUserTokenOptions<DontThrow>);\n}\n\nasync function internalVerifyUserToken<DontThrow extends boolean = false>(\n\ttokenOrHeadersOrRequest: string | Headers | Request | null | undefined,\n\toptions: Partial<VerifyUserTokenOptions<DontThrow>>,\n): Promise<\n\tPromise<DontThrow extends true ? UserTokenPayload | null : UserTokenPayload>\n> {\n\ttry {\n\t\tconst tokenString = getUserToken(tokenOrHeadersOrRequest);\n\n\t\tif (!tokenString) {\n\t\t\tthrow new Error(\n\t\t\t\t\"Whop user token not found. If you are the app developer, ensure you are developing in the whop.com iframe and have the dev proxy enabled.\",\n\t\t\t);\n\t\t}\n\n\t\tconst jwkString = options.publicKey ?? USER_TOKEN_VERIFICATION_KEY;\n\t\tconst key = await importJWK(JSON.parse(jwkString), \"ES256\").catch(() => {\n\t\t\tthrow new Error(\"Invalid public key provided to verifyUserToken\");\n\t\t});\n\t\tconst token = await jwtVerify(tokenString, key, {\n\t\t\tissuer: \"urn:whopcom:exp-proxy\",\n\t\t}).catch((_e) => {\n\t\t\tthrow new Error(\"Invalid user token provided to verifyUserToken\");\n\t\t});\n\t\tif (\n\t\t\t!(token.payload.sub && token.payload.aud) ||\n\t\t\tArray.isArray(token.payload.aud)\n\t\t) {\n\t\t\tthrow new Error(\"Invalid user token provided to verifyUserToken\");\n\t\t}\n\t\tif (options.appId && token.payload.aud !== options.appId)\n\t\t\tthrow new Error(\"Invalid app id provided to verifyUserToken\");\n\t\treturn {\n\t\t\tappId: token.payload.aud,\n\t\t\tuserId: token.payload.sub,\n\t\t};\n\t} catch (e) {\n\t\tif (options.dontThrow) {\n\t\t\treturn null as DontThrow extends true ? UserTokenPayload | null : never;\n\t\t}\n\n\t\tthrow e;\n\t}\n}\n","// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.1\n// protoc v4.23.4\n\n/* eslint-disable */\n\nexport * as common from \"./index.common\";\nexport * as google from \"./index.google\";\nexport * as calendar_bookings_app from \"./index.calendar_bookings_app\";\nexport * as bounties_app from \"./index.bounties_app\";\nexport * as content_app from \"./index.content_app\";\nexport * as content_rewards_app from \"./index.content_rewards_app\";\nexport * as courses_app from \"./index.courses_app\";\nexport * as events_app from \"./index.events_app\";\nexport * as wheel_app from \"./index.wheel_app\";\nexport * as experience from \"./index.experience\";\nexport * as games from \"./index.games\";\nexport * as data_platform from \"./index.data_platform\";\n","// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.1\n// protoc v4.23.4\n\n/* eslint-disable */\n\nexport * from \"./common/money\";\nexport * from \"./common/attachment\";\nexport * from \"./common/users\";\nexport * from \"./common/common\";\nexport * from \"./common/feed\";\nexport * from \"./common/notifications\";\nexport * from \"./common/product_surface\";\nexport * from \"./common/websockets\";\n","// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.1\n// protoc v4.23.4\n// source: common/users.proto\n\n/* eslint-disable */\nimport type { FileAttachment } from \"./attachment\";\nimport type { Money } from \"./money\";\n\nexport const UserType = {\n UNKNOWN_TYPE: \"UNKNOWN_TYPE\",\n HUMAN: \"HUMAN\",\n SYSTEM: \"SYSTEM\",\n AGENT: \"AGENT\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type UserType = typeof UserType[keyof typeof UserType];\n\nexport namespace UserType {\n export type UNKNOWN_TYPE = typeof UserType.UNKNOWN_TYPE;\n export type HUMAN = typeof UserType.HUMAN;\n export type SYSTEM = typeof UserType.SYSTEM;\n export type AGENT = typeof UserType.AGENT;\n export type UNRECOGNIZED = typeof UserType.UNRECOGNIZED;\n}\n\nexport interface User {\n id: string;\n email?: string | undefined;\n name?: string | undefined;\n username: string;\n /** @deprecated */\n profilePicUrl?: string | undefined;\n userType: UserType;\n roles: User_PlatformRole[];\n profilePicture: FileAttachment | undefined;\n banner: FileAttachment | undefined;\n createdAt: string | undefined;\n}\n\nexport const User_PlatformRole = {\n UNKNOWN_ROLE: \"UNKNOWN_ROLE\",\n SUPER_ADMIN: \"SUPER_ADMIN\",\n ADMIN: \"ADMIN\",\n TRUST_AND_SAFETY_MANAGER: \"TRUST_AND_SAFETY_MANAGER\",\n MANAGER: \"MANAGER\",\n SUPPORT: \"SUPPORT\",\n TESTER: \"TESTER\",\n SEO_MANAGER: \"SEO_MANAGER\",\n TEMPLATE_USER: \"TEMPLATE_USER\",\n MARKETPLACE_MANAGER: \"MARKETPLACE_MANAGER\",\n DEVELOPER: \"DEVELOPER\",\n FINANCE_MANAGER: \"FINANCE_MANAGER\",\n RESOLUTION_CENTER_MANAGER: \"RESOLUTION_CENTER_MANAGER\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type User_PlatformRole = typeof User_PlatformRole[keyof typeof User_PlatformRole];\n\nexport namespace User_PlatformRole {\n export type UNKNOWN_ROLE = typeof User_PlatformRole.UNKNOWN_ROLE;\n export type SUPER_ADMIN = typeof User_PlatformRole.SUPER_ADMIN;\n export type ADMIN = typeof User_PlatformRole.ADMIN;\n export type TRUST_AND_SAFETY_MANAGER = typeof User_PlatformRole.TRUST_AND_SAFETY_MANAGER;\n export type MANAGER = typeof User_PlatformRole.MANAGER;\n export type SUPPORT = typeof User_PlatformRole.SUPPORT;\n export type TESTER = typeof User_PlatformRole.TESTER;\n export type SEO_MANAGER = typeof User_PlatformRole.SEO_MANAGER;\n export type TEMPLATE_USER = typeof User_PlatformRole.TEMPLATE_USER;\n export type MARKETPLACE_MANAGER = typeof User_PlatformRole.MARKETPLACE_MANAGER;\n export type DEVELOPER = typeof User_PlatformRole.DEVELOPER;\n export type FINANCE_MANAGER = typeof User_PlatformRole.FINANCE_MANAGER;\n export type RESOLUTION_CENTER_MANAGER = typeof User_PlatformRole.RESOLUTION_CENTER_MANAGER;\n export type UNRECOGNIZED = typeof User_PlatformRole.UNRECOGNIZED;\n}\n\nexport interface UserStat {\n userId: string;\n moneyEarned24Hours: Money | undefined;\n moneyEarned30Days: Money | undefined;\n moneyEarned7Days: Money | undefined;\n moneyEarnedLifetime: Money | undefined;\n}\n\nexport interface UserPresence {\n userId: string;\n lastSeenAt?: string | undefined;\n}\n","// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.1\n// protoc v4.23.4\n// source: common/common.proto\n\n/* eslint-disable */\nimport type { FileAttachment } from \"./attachment\";\nimport type { Money } from \"./money\";\nimport type { User } from \"./users\";\n\nexport const AppViewType = {\n APP_VIEW_TYPE_UNKNOWN: \"APP_VIEW_TYPE_UNKNOWN\",\n APP_VIEW_TYPE_HUB: \"APP_VIEW_TYPE_HUB\",\n APP_VIEW_TYPE_DASH: \"APP_VIEW_TYPE_DASH\",\n APP_VIEW_TYPE_ANALYTICS: \"APP_VIEW_TYPE_ANALYTICS\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type AppViewType = typeof AppViewType[keyof typeof AppViewType];\n\nexport namespace AppViewType {\n export type APP_VIEW_TYPE_UNKNOWN = typeof AppViewType.APP_VIEW_TYPE_UNKNOWN;\n export type APP_VIEW_TYPE_HUB = typeof AppViewType.APP_VIEW_TYPE_HUB;\n export type APP_VIEW_TYPE_DASH = typeof AppViewType.APP_VIEW_TYPE_DASH;\n export type APP_VIEW_TYPE_ANALYTICS = typeof AppViewType.APP_VIEW_TYPE_ANALYTICS;\n export type UNRECOGNIZED = typeof AppViewType.UNRECOGNIZED;\n}\n\nexport const AccessType = {\n UNKNOWN_ACCESS_TYPE: \"UNKNOWN_ACCESS_TYPE\",\n NO_ACCESS: \"NO_ACCESS\",\n CUSTOMER: \"CUSTOMER\",\n ADMIN: \"ADMIN\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type AccessType = typeof AccessType[keyof typeof AccessType];\n\nexport namespace AccessType {\n export type UNKNOWN_ACCESS_TYPE = typeof AccessType.UNKNOWN_ACCESS_TYPE;\n export type NO_ACCESS = typeof AccessType.NO_ACCESS;\n export type CUSTOMER = typeof AccessType.CUSTOMER;\n export type ADMIN = typeof AccessType.ADMIN;\n export type UNRECOGNIZED = typeof AccessType.UNRECOGNIZED;\n}\n\nexport const Platform = {\n UNKNOWN: \"UNKNOWN\",\n WEB: \"WEB\",\n IOS: \"IOS\",\n ANDROID: \"ANDROID\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type Platform = typeof Platform[keyof typeof Platform];\n\nexport namespace Platform {\n export type UNKNOWN = typeof Platform.UNKNOWN;\n export type WEB = typeof Platform.WEB;\n export type IOS = typeof Platform.IOS;\n export type ANDROID = typeof Platform.ANDROID;\n export type UNRECOGNIZED = typeof Platform.UNRECOGNIZED;\n}\n\nexport interface App {\n id: string;\n name: string;\n internalIdentifier: string;\n imageUrl: string;\n icon?: FileAttachment | undefined;\n consumerViewUrlTemplate?: string | undefined;\n adminViewUrlTemplate?: string | undefined;\n analyticsViewUrlTemplate?: string | undefined;\n discoverViewUrlTemplate?: string | undefined;\n description?: string | undefined;\n prodIosBuildId?: string | undefined;\n prodAndroidBuildId?: string | undefined;\n prodWebBuildId?: string | undefined;\n botId: string;\n}\n\nexport interface AppBuild {\n id: string;\n appId: string;\n checksum: string;\n platform: Platform;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n status: AppBuild_Status;\n fileUrl: string;\n reviewMessage?: string | undefined;\n supportedAppViewTypes: AppViewType[];\n}\n\nexport const AppBuild_Status = {\n STATUS_UNKNOWN: \"STATUS_UNKNOWN\",\n STATUS_DRAFT: \"STATUS_DRAFT\",\n STATUS_PENDING: \"STATUS_PENDING\",\n STATUS_APPROVED: \"STATUS_APPROVED\",\n STATUS_REJECTED: \"STATUS_REJECTED\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type AppBuild_Status = typeof AppBuild_Status[keyof typeof AppBuild_Status];\n\nexport namespace AppBuild_Status {\n export type STATUS_UNKNOWN = typeof AppBuild_Status.STATUS_UNKNOWN;\n export type STATUS_DRAFT = typeof AppBuild_Status.STATUS_DRAFT;\n export type STATUS_PENDING = typeof AppBuild_Status.STATUS_PENDING;\n export type STATUS_APPROVED = typeof AppBuild_Status.STATUS_APPROVED;\n export type STATUS_REJECTED = typeof AppBuild_Status.STATUS_REJECTED;\n export type UNRECOGNIZED = typeof AppBuild_Status.UNRECOGNIZED;\n}\n\nexport interface Bot {\n id: string;\n /** @deprecated */\n hubRoute: string;\n title: string;\n imageUrl: string;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n isVerified: boolean;\n installedFirstAppAt?: string | undefined;\n whopFourFiveEnabledAt?: string | undefined;\n logo?: FileAttachment | undefined;\n bannerImage?: FileAttachment | undefined;\n route?: string | undefined;\n}\n\nexport interface NotificationTopic {\n id: string;\n}\n\nexport interface CfLocation {\n ipAddress?: string | undefined;\n city?: string | undefined;\n country?: string | undefined;\n continent?: string | undefined;\n longitude?: number | undefined;\n latitude?: number | undefined;\n region?: string | undefined;\n regionCode?: string | undefined;\n metroCode?: string | undefined;\n postalCode?: string | undefined;\n timezone?: string | undefined;\n}\n\nexport interface AccessPass {\n id: string;\n route: string;\n /** @deprecated */\n name: string;\n headline: string;\n imageUrl: string;\n title: string;\n botId: string;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n discardedAt?: string | undefined;\n shortenedDescription?: string | undefined;\n visibility: AccessPass_Visibility;\n discoverableAt?: string | undefined;\n logo?: FileAttachment | undefined;\n bannerImage?: FileAttachment | undefined;\n accessPassType: AccessPass_AccessPassType;\n activeMembersCount: number;\n}\n\nexport const AccessPass_Visibility = {\n VISIBILITY_UNKNOWN: \"VISIBILITY_UNKNOWN\",\n VISIBLE: \"VISIBLE\",\n HIDDEN: \"HIDDEN\",\n ARCHIVED: \"ARCHIVED\",\n QUICK_LINK: \"QUICK_LINK\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type AccessPass_Visibility = typeof AccessPass_Visibility[keyof typeof AccessPass_Visibility];\n\nexport namespace AccessPass_Visibility {\n export type VISIBILITY_UNKNOWN = typeof AccessPass_Visibility.VISIBILITY_UNKNOWN;\n export type VISIBLE = typeof AccessPass_Visibility.VISIBLE;\n export type HIDDEN = typeof AccessPass_Visibility.HIDDEN;\n export type ARCHIVED = typeof AccessPass_Visibility.ARCHIVED;\n export type QUICK_LINK = typeof AccessPass_Visibility.QUICK_LINK;\n export type UNRECOGNIZED = typeof AccessPass_Visibility.UNRECOGNIZED;\n}\n\nexport const AccessPass_AccessPassType = {\n ACCESS_PASS_TYPE_UNKNOWN: \"ACCESS_PASS_TYPE_UNKNOWN\",\n REGULAR: \"REGULAR\",\n APP: \"APP\",\n EXPERIENCE_UPSELL: \"EXPERIENCE_UPSELL\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type AccessPass_AccessPassType = typeof AccessPass_AccessPassType[keyof typeof AccessPass_AccessPassType];\n\nexport namespace AccessPass_AccessPassType {\n export type ACCESS_PASS_TYPE_UNKNOWN = typeof AccessPass_AccessPassType.ACCESS_PASS_TYPE_UNKNOWN;\n export type REGULAR = typeof AccessPass_AccessPassType.REGULAR;\n export type APP = typeof AccessPass_AccessPassType.APP;\n export type EXPERIENCE_UPSELL = typeof AccessPass_AccessPassType.EXPERIENCE_UPSELL;\n export type UNRECOGNIZED = typeof AccessPass_AccessPassType.UNRECOGNIZED;\n}\n\nexport interface Plan {\n id: string;\n baseCurrency: string;\n renewalPrice: Money | undefined;\n initialPrice: Money | undefined;\n initialPriceDue: Money | undefined;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n billingPeriod?: number | undefined;\n trialPeriodDays?: number | undefined;\n expirationDays?: number | undefined;\n unlimitedStock: boolean;\n paymentLinkDescription?: string | undefined;\n releaseMethod: Plan_ReleaseMethod;\n stock?: number | undefined;\n visibility: Plan_Visibility;\n planType: Plan_PlanType;\n}\n\nexport const Plan_Visibility = {\n VISIBILITY_UNKNOWN: \"VISIBILITY_UNKNOWN\",\n VISIBLE: \"VISIBLE\",\n HIDDEN: \"HIDDEN\",\n ARCHIVED: \"ARCHIVED\",\n QUICK_LINK: \"QUICK_LINK\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type Plan_Visibility = typeof Plan_Visibility[keyof typeof Plan_Visibility];\n\nexport namespace Plan_Visibility {\n export type VISIBILITY_UNKNOWN = typeof Plan_Visibility.VISIBILITY_UNKNOWN;\n export type VISIBLE = typeof Plan_Visibility.VISIBLE;\n export type HIDDEN = typeof Plan_Visibility.HIDDEN;\n export type ARCHIVED = typeof Plan_Visibility.ARCHIVED;\n export type QUICK_LINK = typeof Plan_Visibility.QUICK_LINK;\n export type UNRECOGNIZED = typeof Plan_Visibility.UNRECOGNIZED;\n}\n\nexport const Plan_ReleaseMethod = {\n RELEASE_METHOD_UNKNOWN: \"RELEASE_METHOD_UNKNOWN\",\n BUY_NOW: \"BUY_NOW\",\n WAITLIST: \"WAITLIST\",\n RAFFLE: \"RAFFLE\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type Plan_ReleaseMethod = typeof Plan_ReleaseMethod[keyof typeof Plan_ReleaseMethod];\n\nexport namespace Plan_ReleaseMethod {\n export type RELEASE_METHOD_UNKNOWN = typeof Plan_ReleaseMethod.RELEASE_METHOD_UNKNOWN;\n export type BUY_NOW = typeof Plan_ReleaseMethod.BUY_NOW;\n export type WAITLIST = typeof Plan_ReleaseMethod.WAITLIST;\n export type RAFFLE = typeof Plan_ReleaseMethod.RAFFLE;\n export type UNRECOGNIZED = typeof Plan_ReleaseMethod.UNRECOGNIZED;\n}\n\nexport const Plan_PlanType = {\n PLAN_TYPE_UNKNOWN: \"PLAN_TYPE_UNKNOWN\",\n RENEWAL: \"RENEWAL\",\n ONE_TIME: \"ONE_TIME\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type Plan_PlanType = typeof Plan_PlanType[keyof typeof Plan_PlanType];\n\nexport namespace Plan_PlanType {\n export type PLAN_TYPE_UNKNOWN = typeof Plan_PlanType.PLAN_TYPE_UNKNOWN;\n export type RENEWAL = typeof Plan_PlanType.RENEWAL;\n export type ONE_TIME = typeof Plan_PlanType.ONE_TIME;\n export type UNRECOGNIZED = typeof Plan_PlanType.UNRECOGNIZED;\n}\n\nexport interface Entry {\n id: string;\n status: Entry_EntryStatus;\n userId: string;\n botId: string;\n planId: string;\n accessPassId: string;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n discardedAt?: string | undefined;\n}\n\nexport const Entry_EntryStatus = {\n ENTRY_STATUS_UNKNOWN: \"ENTRY_STATUS_UNKNOWN\",\n PENDING: \"PENDING\",\n APPROVED: \"APPROVED\",\n DENIED: \"DENIED\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type Entry_EntryStatus = typeof Entry_EntryStatus[keyof typeof Entry_EntryStatus];\n\nexport namespace Entry_EntryStatus {\n export type ENTRY_STATUS_UNKNOWN = typeof Entry_EntryStatus.ENTRY_STATUS_UNKNOWN;\n export type PENDING = typeof Entry_EntryStatus.PENDING;\n export type APPROVED = typeof Entry_EntryStatus.APPROVED;\n export type DENIED = typeof Entry_EntryStatus.DENIED;\n export type UNRECOGNIZED = typeof Entry_EntryStatus.UNRECOGNIZED;\n}\n\nexport interface AccessPassMember {\n id: string;\n accessPassId: string;\n userId: string;\n botId: string;\n accessLevel: AccessType;\n createdAt: string | undefined;\n updatedAt:\n | string\n | undefined;\n /** @deprecated */\n orderOld?: number | undefined;\n order?: number | undefined;\n}\n\nexport interface Member {\n id: string;\n userId: string;\n botId: string;\n accessLevel: AccessType;\n order?: number | undefined;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n}\n\nexport interface AccessPassExperience {\n id: string;\n accessPassId: string;\n experienceId: string;\n botId: string;\n /** @deprecated */\n isDeleted: boolean;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n discardedAt?: string | undefined;\n upsellType?: AccessPassExperience_UpsellType | undefined;\n upsellPlan?: Plan | undefined;\n order: number;\n sectionId?: string | undefined;\n}\n\nexport const AccessPassExperience_UpsellType = {\n UPSELL_TYPE_UNKNOWN: \"UPSELL_TYPE_UNKNOWN\",\n BEFORE_CHECKOUT: \"BEFORE_CHECKOUT\",\n AFTER_CHECKOUT: \"AFTER_CHECKOUT\",\n ONLY_IN_WHOP: \"ONLY_IN_WHOP\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type AccessPassExperience_UpsellType =\n typeof AccessPassExperience_UpsellType[keyof typeof AccessPassExperience_UpsellType];\n\nexport namespace AccessPassExperience_UpsellType {\n export type UPSELL_TYPE_UNKNOWN = typeof AccessPassExperience_UpsellType.UPSELL_TYPE_UNKNOWN;\n export type BEFORE_CHECKOUT = typeof AccessPassExperience_UpsellType.BEFORE_CHECKOUT;\n export type AFTER_CHECKOUT = typeof AccessPassExperience_UpsellType.AFTER_CHECKOUT;\n export type ONLY_IN_WHOP = typeof AccessPassExperience_UpsellType.ONLY_IN_WHOP;\n export type UNRECOGNIZED = typeof AccessPassExperience_UpsellType.UNRECOGNIZED;\n}\n\nexport interface AccessPassExperienceSection {\n id: string;\n accessPassId: string;\n botId: string;\n title: string;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n discardedAt?: string | undefined;\n order?: number | undefined;\n}\n\nexport interface BotExperienceSection {\n id: string;\n botId: string;\n title: string;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n discardedAt?: string | undefined;\n order?: number | undefined;\n}\n\nexport interface Purchase {\n amount: number;\n currencyCode: string;\n userName: string;\n product: AccessPass | undefined;\n createdAt: number;\n id: string;\n releaseMethod: Purchase_ReleaseMethod;\n formattedAmount: string;\n}\n\nexport const Purchase_ReleaseMethod = {\n UNKNOWN: \"UNKNOWN\",\n BUY_NOW: \"BUY_NOW\",\n WAITLIST: \"WAITLIST\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type Purchase_ReleaseMethod = typeof Purchase_ReleaseMethod[keyof typeof Purchase_ReleaseMethod];\n\nexport namespace Purchase_ReleaseMethod {\n export type UNKNOWN = typeof Purchase_ReleaseMethod.UNKNOWN;\n export type BUY_NOW = typeof Purchase_ReleaseMethod.BUY_NOW;\n export type WAITLIST = typeof Purchase_ReleaseMethod.WAITLIST;\n export type UNRECOGNIZED = typeof Purchase_ReleaseMethod.UNRECOGNIZED;\n}\n\nexport interface MarketplaceStats {\n totalGmvUsd: number;\n usersCount: number;\n}\n\nexport interface ConnectedId {\n type: ConnectedId_Type;\n id: string;\n deviceId: string;\n}\n\nexport const ConnectedId_Type = {\n UNKNOWN: \"UNKNOWN\",\n ANONYMOUS: \"ANONYMOUS\",\n USER: \"USER\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type ConnectedId_Type = typeof ConnectedId_Type[keyof typeof ConnectedId_Type];\n\nexport namespace ConnectedId_Type {\n export type UNKNOWN = typeof ConnectedId_Type.UNKNOWN;\n export type ANONYMOUS = typeof ConnectedId_Type.ANONYMOUS;\n export type USER = typeof ConnectedId_Type.USER;\n export type UNRECOGNIZED = typeof ConnectedId_Type.UNRECOGNIZED;\n}\n\nexport interface Channel {\n type: Channel_Type;\n id: string;\n}\n\nexport const Channel_Type = {\n UNKNOWN: \"UNKNOWN\",\n /** EXPERIENCE - / A channel to which all users of an experience are subscribed, only when vieweing that experience in the UI. The ID is the experience.tag (exp_XXXXX) */\n EXPERIENCE: \"EXPERIENCE\",\n /** NOTIFICATIONS - / Not used right now. */\n NOTIFICATIONS: \"NOTIFICATIONS\",\n /** DMS - / A channel to which all users in a dms_feed are subscribed. Id is the dms_feed.external_id (feed_XXXXX) */\n DMS: \"DMS\",\n /** USER - / A channel to which a single user is subscribed. (Id is the user's id) */\n USER: \"USER\",\n /** EVERYONE - / A single channel to which all connections are subscribed. (Id is empty) */\n EVERYONE: \"EVERYONE\",\n /** AUTHENTICATED - / A single channel to which all authenticated users are subscribed. (Id is empty) */\n AUTHENTICATED: \"AUTHENTICATED\",\n /** ANONYMOUS - / A channel that is created for every anonymous connection. The id is 128bits of random data. */\n ANONYMOUS: \"ANONYMOUS\",\n /** PUBLIC - / A channel type that can be connected to by anyone without authentication. Allows anything after the `public_` prefix. */\n PUBLIC: \"PUBLIC\",\n /** ACCESS_PASS - / A channel to which all users of an access pass are subscribed. The ID is the access_pass.tag (pass_XXXX or prod_XXXX) */\n ACCESS_PASS: \"ACCESS_PASS\",\n /** APP - / A channel that is used by an app to broadcast data to all of its websocket connections. It may look like: app_XXX or app_XXX_exp_XXX or app_XXX_custom_suffix */\n APP: \"APP\",\n /** BOT - / A channel to which all members with valid access to a bot are subscribed. The ID is the bot.id (biz_XXX) */\n BOT: \"BOT\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type Channel_Type = typeof Channel_Type[keyof typeof Channel_Type];\n\nexport namespace Channel_Type {\n export type UNKNOWN = typeof Channel_Type.UNKNOWN;\n export type EXPERIENCE = typeof Channel_Type.EXPERIENCE;\n export type NOTIFICATIONS = typeof Channel_Type.NOTIFICATIONS;\n export type DMS = typeof Channel_Type.DMS;\n export type USER = typeof Channel_Type.USER;\n export type EVERYONE = typeof Channel_Type.EVERYONE;\n export type AUTHENTICATED = typeof Channel_Type.AUTHENTICATED;\n export type ANONYMOUS = typeof Channel_Type.ANONYMOUS;\n export type PUBLIC = typeof Channel_Type.PUBLIC;\n export type ACCESS_PASS = typeof Channel_Type.ACCESS_PASS;\n export type APP = typeof Channel_Type.APP;\n export type BOT = typeof Channel_Type.BOT;\n export type UNRECOGNIZED = typeof Channel_Type.UNRECOGNIZED;\n}\n\nexport interface ChannelSubscriptionState {\n channel: Channel | undefined;\n isSubscribed: boolean;\n wasAlreadySubscribed: boolean;\n disconnectionReason?: ChannelSubscriptionState_DisconnectionReason | undefined;\n}\n\nexport const ChannelSubscriptionState_DisconnectionReason = {\n UNKNOWN: \"UNKNOWN\",\n NO_ACCESS: \"NO_ACCESS\",\n REQUESTED_DISCONNECT: \"REQUESTED_DISCONNECT\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type ChannelSubscriptionState_DisconnectionReason =\n typeof ChannelSubscriptionState_DisconnectionReason[keyof typeof ChannelSubscriptionState_DisconnectionReason];\n\nexport namespace ChannelSubscriptionState_DisconnectionReason {\n export type UNKNOWN = typeof ChannelSubscriptionState_DisconnectionReason.UNKNOWN;\n export type NO_ACCESS = typeof ChannelSubscriptionState_DisconnectionReason.NO_ACCESS;\n export type REQUESTED_DISCONNECT = typeof ChannelSubscriptionState_DisconnectionReason.REQUESTED_DISCONNECT;\n export type UNRECOGNIZED = typeof ChannelSubscriptionState_DisconnectionReason.UNRECOGNIZED;\n}\n\nexport interface Reconnect {\n}\n\nexport interface ReloadClient {\n versionId: string;\n force: boolean;\n}\n\nexport interface BroadcastRequest {\n channel: Channel | undefined;\n typingIndicator?: TypingIndicator | undefined;\n markAsRead?: MarkAsRead | undefined;\n position?: Position | undefined;\n}\n\nexport interface Position {\n x: number;\n y: number;\n type: Position_Type;\n url: string;\n message: string;\n}\n\nexport const Position_Type = {\n UNKNOWN: \"UNKNOWN\",\n MOUSE: \"MOUSE\",\n PLAYER: \"PLAYER\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type Position_Type = typeof Position_Type[keyof typeof Position_Type];\n\nexport namespace Position_Type {\n export type UNKNOWN = typeof Position_Type.UNKNOWN;\n export type MOUSE = typeof Position_Type.MOUSE;\n export type PLAYER = typeof Position_Type.PLAYER;\n export type UNRECOGNIZED = typeof Position_Type.UNRECOGNIZED;\n}\n\nexport interface TypingIndicator {\n expireAfter: string | undefined;\n}\n\nexport interface MarkAsRead {\n experienceId?: string | undefined;\n isGlobal: boolean;\n timestamp: string | undefined;\n}\n\nexport interface BroadcastResponse {\n channel: Channel | undefined;\n fromUserId: string;\n serverForwardedAt: string | undefined;\n typingIndicator?: TypingIndicator | undefined;\n markAsRead?: MarkAsRead | undefined;\n position?: Position | undefined;\n}\n\nexport interface DiscoveryAccessPassLiveData {\n accessPassId: string;\n last24HoursGmv?: Money | undefined;\n last24HoursAffiliateEarnings?: Money | undefined;\n last24HoursNewUsers?: number | undefined;\n last24HoursAverageTimePerUser?: string | undefined;\n globalWhopRanking?: number | undefined;\n totalPublishedReviewsCount?: number | undefined;\n lastReview?: AccessPassReview | undefined;\n last7DaysPublishedReviewsCount?: number | undefined;\n activeUsersCount?: number | undefined;\n last30DaysNewUsers?: number | undefined;\n accessPassActivityItem?: AccessPassActivityItem | undefined;\n}\n\nexport interface AccessPassActivityItem {\n id: string;\n createdAt: string | undefined;\n eventType: string;\n user?: User | undefined;\n}\n\nexport interface AccessPassReview {\n id: string;\n createdAt: string | undefined;\n publishedAt: string | undefined;\n}\n\nexport interface FeedContentItem {\n id: string;\n eventType: string;\n metadata: { [key: string]: any } | undefined;\n restPath: string;\n createdAt: string | undefined;\n updatedAt: string | undefined;\n appId: string;\n botId: string;\n experienceId: string;\n externalId: string;\n parentExternalId: string;\n userId: string;\n attachments: FileAttachment[];\n gifs: FeedContentItem_GiphyGif[];\n}\n\nexport interface FeedContentItem_GiphyGif {\n title: string;\n url: string;\n originalUrl: string;\n previewUrl: string;\n width: number;\n height: number;\n slug: string;\n}\n\nexport interface UserReferralMarketRates {\n previousRates?: UserReferralMarketRate | undefined;\n currentRates?: UserReferralMarketRate | undefined;\n}\n\nexport interface UserReferralMarketRate {\n percentOfPlatformSpend?: number | undefined;\n percentOfSellerPayment?: number | undefined;\n percentOfContentRewardsCampaignMaker?: number | undefined;\n percentOfContentRewardsEarner?: number | undefined;\n}\n\nexport interface GoFetchExperienceList {\n accessPassId: string;\n}\n\nexport interface GoFetchUserExperiences {\n experienceId: string;\n}\n\nexport interface BusinessActivityEvent {\n eventType: BusinessActivityEvent_EventType;\n user: User | undefined;\n accessPass: AccessPass | undefined;\n description: string;\n createdAt: string | undefined;\n}\n\nexport const BusinessActivityEvent_EventType = {\n UNKNOWN: \"UNKNOWN\",\n MEMBER_JOINED: \"MEMBER_JOINED\",\n NEW_PAYMENT: \"NEW_PAYMENT\",\n NEW_DISPUTE: \"NEW_DISPUTE\",\n MEMBER_CANCELED: \"MEMBER_CANCELED\",\n MEMBER_CHURNED: \"MEMBER_CHURNED\",\n NEW_MARKETPLACE_SALE: \"NEW_MARKETPLACE_SALE\",\n NEW_RESOLUTION_CENTER_CASE: \"NEW_RESOLUTION_CENTER_CASE\",\n NEW_REVIEW: \"NEW_REVIEW\",\n TEAM_MEMBER_JOINED: \"TEAM_MEMBER_JOINED\",\n BANNED_USER: \"BANNED_USER\",\n FAILED_PAYMENT: \"FAILED_PAYMENT\",\n PAYOUT_REQUESTED: \"PAYOUT_REQUESTED\",\n PAYOUT_COMPLETED: \"PAYOUT_COMPLETED\",\n PAYOUT_FAILED: \"PAYOUT_FAILED\",\n COMPETITION_ALERT: \"COMPETITION_ALERT\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type BusinessActivityEvent_EventType =\n typeof BusinessActivityEvent_EventType[keyof typeof BusinessActivityEvent_EventType];\n\nexport namespace BusinessActivityEvent_EventType {\n export type UNKNOWN = typeof BusinessActivityEvent_EventType.UNKNOWN;\n export type MEMBER_JOINED = typeof BusinessActivityEvent_EventType.MEMBER_JOINED;\n export type NEW_PAYMENT = typeof BusinessActivityEvent_EventType.NEW_PAYMENT;\n export type NEW_DISPUTE = typeof BusinessActivityEvent_EventType.NEW_DISPUTE;\n export type MEMBER_CANCELED = typeof BusinessActivityEvent_EventType.MEMBER_CANCELED;\n export type MEMBER_CHURNED = typeof BusinessActivityEvent_EventType.MEMBER_CHURNED;\n export type NEW_MARKETPLACE_SALE = typeof BusinessActivityEvent_EventType.NEW_MARKETPLACE_SALE;\n export type NEW_RESOLUTION_CENTER_CASE = typeof BusinessActivityEvent_EventType.NEW_RESOLUTION_CENTER_CASE;\n export type NEW_REVIEW = typeof BusinessActivityEvent_EventType.NEW_REVIEW;\n export type TEAM_MEMBER_JOINED = typeof BusinessActivityEvent_EventType.TEAM_MEMBER_JOINED;\n export type BANNED_USER = typeof BusinessActivityEvent_EventType.BANNED_USER;\n export type FAILED_PAYMENT = typeof BusinessActivityEvent_EventType.FAILED_PAYMENT;\n export type PAYOUT_REQUESTED = typeof BusinessActivityEvent_EventType.PAYOUT_REQUESTED;\n export type PAYOUT_COMPLETED = typeof BusinessActivityEvent_EventType.PAYOUT_COMPLETED;\n export type PAYOUT_FAILED = typeof BusinessActivityEvent_EventType.PAYOUT_FAILED;\n export type COMPETITION_ALERT = typeof BusinessActivityEvent_EventType.COMPETITION_ALERT;\n export type UNRECOGNIZED = typeof BusinessActivityEvent_EventType.UNRECOGNIZED;\n}\n","// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.7.1\n// protoc v4.23.4\n// source: common/feed.proto\n\n/* eslint-disable */\nimport type { FileAttachment } from \"./attachment\";\nimport type { Money } from \"./money\";\nimport type { User, UserType } from \"./users\";\n\nexport interface FeedEntity {\n dmsPost?: FeedDmsPost | undefined;\n dmsFeed?: FeedDmsFeed | undefined;\n dmsFeedMember?: FeedDmsFeedMember | undefined;\n reaction?: FeedReaction | undefined;\n user?: FeedUser | undefined;\n chatFeed?: FeedChatFeed | undefined;\n mutedUser?: FeedMutedUser | undefined;\n forumFeed?: FeedForumFeed | undefined;\n forumPost?: FeedForumPost | undefined;\n postReactionCountUpdate?: FeedPostReactionCountUpdate | undefined;\n livestreamFeed?: FeedLivestreamFeed | undefined;\n dmsUnreadBadgeUpdate?: FeedDmsUnreadBadgeUpdate | undefined;\n}\n\nexport interface SendFeedEntityToUserRequest {\n userId: string;\n feedEntity: FeedEntity | undefined;\n userIds: string[];\n}\n\nexport interface SendFeedEntityToUserResponse {\n sent: boolean;\n}\n\nexport interface FeedSyncError {\n message: string;\n}\n\nexport interface FeedDmsPost {\n /** Entity Base */\n entityType: string;\n entityId: string;\n createdAt: number;\n updatedAt: number;\n Deleted: boolean;\n syncError: FeedSyncError | undefined;\n isSynced: boolean;\n sortKey: string;\n /** Custom Fields */\n feedId: string;\n feedType: string;\n userId: string;\n parentId: string;\n isEdited: boolean;\n title: string;\n content: string;\n richContent: string;\n childrenCount: number;\n /** @deprecated */\n reactionCounts:\n | FeedDmsPost_ReactionCounts\n | undefined;\n /**\n * use files instead\n *\n * @deprecated\n */\n attachments: FeedDmsPost_PostAttachment[];\n gifs: FeedDmsPost_GiphyGif[];\n replyingToPostId: string;\n links: FeedDmsPost_LinkEmbed[];\n isPinned: boolean;\n everyoneMentioned: boolean;\n mentionedUserIds: string[];\n viewCount: number;\n postReactionCounts: PostReactionCount[];\n isPosterAdmin: boolean;\n messageType: FeedDmsPost_MessageType;\n embed?: PostEmbed | undefined;\n user: User | undefined;\n files: FileAttachment[];\n experienceId?: string | undefined;\n poll?: Poll | undefined;\n markdownContent: string;\n replyingToPost?: FeedDmsPost | undefined;\n}\n\nexport const FeedDmsPost_MessageType = {\n UNKNOWN_TYPE: \"UNKNOWN_TYPE\",\n REGULAR: \"REGULAR\",\n SYSTEM: \"SYSTEM\",\n AUTOMATED: \"AUTOMATED\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type FeedDmsPost_MessageType = typeof FeedDmsPost_MessageType[keyof typeof FeedDmsPost_MessageType];\n\nexport namespace FeedDmsPost_MessageType {\n export type UNKNOWN_TYPE = typeof FeedDmsPost_MessageType.UNKNOWN_TYPE;\n export type REGULAR = typeof FeedDmsPost_MessageType.REGULAR;\n export type SYSTEM = typeof FeedDmsPost_MessageType.SYSTEM;\n export type AUTOMATED = typeof FeedDmsPost_MessageType.AUTOMATED;\n export type UNRECOGNIZED = typeof FeedDmsPost_MessageType.UNRECOGNIZED;\n}\n\nexport interface FeedDmsPost_ImageAttachment {\n type: string;\n fileUrl: string;\n fileCategory: string;\n fileName: string;\n /** @deprecated */\n fileSize: number;\n blurDataUrl: string;\n aspectRatio: number;\n byteSize: number;\n}\n\nexport interface FeedDmsPost_DocumentAttachment {\n type: string;\n fileUrl: string;\n fileCategory: string;\n fileName: string;\n /** @deprecated */\n fileSize: number;\n byteSize: number;\n}\n\nexport interface FeedDmsPost_VideoAttachment {\n type: string;\n fileUrl: string;\n fileCategory: string;\n fileName: string;\n /** @deprecated */\n fileSize: number;\n blurDataUrl: string;\n aspectRatio: number;\n thumbnailUrl: string;\n height: number;\n width: number;\n byteSize: number;\n}\n\nexport interface FeedDmsPost_GiphyGif {\n title: string;\n url: string;\n originalUrl: string;\n previewUrl: string;\n width: number;\n height: number;\n slug: string;\n}\n\nexport interface FeedDmsPost_PostAttachment {\n image?: FeedDmsPost_ImageAttachment | undefined;\n document?: FeedDmsPost_DocumentAttachment | undefined;\n video?: FeedDmsPost_VideoAttachment | undefined;\n}\n\nexport interface FeedDmsPost_ReactionCount {\n score: number;\n count: number;\n}\n\nexport interface FeedDmsPost_ReactionCounts {\n counts: { [key: string]: FeedDmsPost_ReactionCount };\n}\n\nexport interface FeedDmsPost_ReactionCounts_CountsEntry {\n key: string;\n value: FeedDmsPost_ReactionCount | undefined;\n}\n\nexport interface FeedDmsPost_LinkEmbed {\n url: string;\n title: string;\n description: string;\n image: string;\n favicon: string;\n processing: boolean;\n}\n\nexport interface FeedDmsFeed {\n /** Entity Base */\n entityType: string;\n entityId: string;\n createdAt: number;\n updatedAt: number;\n Deleted: boolean;\n syncError: FeedSyncError | undefined;\n isSynced: boolean;\n /** Feed Fields */\n rootPostCount: number;\n postCount: number;\n collectionIdentifier: string;\n feedType: string;\n sortKey: string;\n /** Custom Fields */\n customName: string;\n}\n\nexport interface FeedChatFeed {\n /** Entity Base */\n entityType: string;\n entityId: string;\n createdAt: number;\n updatedAt: number;\n Deleted: boolean;\n syncError: FeedSyncError | undefined;\n isSynced: boolean;\n /** Feed Fields */\n rootPostCount: number;\n postCount: number;\n collectionIdentifier: string;\n feedType: string;\n sortKey: string;\n /** Custom Fields */\n experienceId: string;\n banUrls: boolean;\n whoCanReact: FeedChatFeed_MemberPermissionType;\n whoCanPost: FeedChatFeed_MemberPermissionType;\n requiredProductIdsToWrite: string[];\n banMedia: boolean;\n userPostsCooldownSeconds: number;\n banUnverifiedUsers: boolean;\n}\n\nexport const FeedChatFeed_MemberPermissionType = {\n UNKNOWN: \"UNKNOWN\",\n NONE: \"NONE\",\n EVERYONE: \"EVERYONE\",\n MEMBERS: \"MEMBERS\",\n ADMINS: \"ADMINS\",\n PRODUCT_OWNERS: \"PRODUCT_OWNERS\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type FeedChatFeed_MemberPermissionType =\n typeof FeedChatFeed_MemberPermissionType[keyof typeof FeedChatFeed_MemberPermissionType];\n\nexport namespace FeedChatFeed_MemberPermissionType {\n export type UNKNOWN = typeof FeedChatFeed_MemberPermissionType.UNKNOWN;\n export type NONE = typeof FeedChatFeed_MemberPermissionType.NONE;\n export type EVERYONE = typeof FeedChatFeed_MemberPermissionType.EVERYONE;\n export type MEMBERS = typeof FeedChatFeed_MemberPermissionType.MEMBERS;\n export type ADMINS = typeof FeedChatFeed_MemberPermissionType.ADMINS;\n export type PRODUCT_OWNERS = typeof FeedChatFeed_MemberPermissionType.PRODUCT_OWNERS;\n export type UNRECOGNIZED = typeof FeedChatFeed_MemberPermissionType.UNRECOGNIZED;\n}\n\nexport interface FeedLivestreamFeed {\n /** Entity Base */\n entityType: string;\n entityId: string;\n createdAt: number;\n updatedAt: number;\n Deleted: boolean;\n syncError: FeedSyncError | undefined;\n isSynced: boolean;\n /** Feed Fields */\n rootPostCount: number;\n postCount: number;\n collectionIdentifier: string;\n feedType: string;\n sortKey: string;\n /**\n * Custom Fields\n *\n * @deprecated\n */\n experienceId: string;\n banUrls: boolean;\n banMedia: boolean;\n banUnverifiedUsers: boolean;\n bannedWords: string[];\n userPostsCooldownSeconds: number;\n whoCanReact: FeedLivestreamFeed_MemberPermissionType;\n whoCanPost: FeedLivestreamFeed_MemberPermissionType;\n recordingUrl?: string | undefined;\n thumbnailUrl?: string | undefined;\n experienceIds: string[];\n reactionsEnabled: boolean;\n /** Livekit fields */\n title: string;\n description: string;\n emptyTimeout: number;\n maxParticipants: number;\n scheduledAt: number;\n startedAt: number;\n endedAt: number;\n metadata: { [key: string]: string };\n hostId: string;\n recording?: FileAttachment | undefined;\n}\n\nexport const FeedLivestreamFeed_MemberPermissionType = {\n UNKNOWN: \"UNKNOWN\",\n NONE: \"NONE\",\n EVERYONE: \"EVERYONE\",\n ADMINS: \"ADMINS\",\n PRODUCT_OWNERS: \"PRODUCT_OWNERS\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type FeedLivestreamFeed_MemberPermissionType =\n typeof FeedLivestreamFeed_MemberPermissionType[keyof typeof FeedLivestreamFeed_MemberPermissionType];\n\nexport namespace FeedLivestreamFeed_MemberPermissionType {\n export type UNKNOWN = typeof FeedLivestreamFeed_MemberPermissionType.UNKNOWN;\n export type NONE = typeof FeedLivestreamFeed_MemberPermissionType.NONE;\n export type EVERYONE = typeof FeedLivestreamFeed_MemberPermissionType.EVERYONE;\n export type ADMINS = typeof FeedLivestreamFeed_MemberPermissionType.ADMINS;\n export type PRODUCT_OWNERS = typeof FeedLivestreamFeed_MemberPermissionType.PRODUCT_OWNERS;\n export type UNRECOGNIZED = typeof FeedLivestreamFeed_MemberPermissionType.UNRECOGNIZED;\n}\n\nexport interface FeedLivestreamFeed_MetadataEntry {\n key: string;\n value: string;\n}\n\nexport interface FeedMutedUser {\n /** Entity Base */\n entityType: string;\n entityId: string;\n createdAt: number;\n updatedAt: number;\n Deleted: boolean;\n syncError: FeedSyncError | undefined;\n isSynced: boolean;\n /** Custom Fields */\n userId: string;\n feedId: string;\n feedType: string;\n mutedUntil: number;\n}\n\nexport interface FeedDmsFeedMember {\n /** Entity Base */\n entityType: string;\n entityId: string;\n createdAt: number;\n updatedAt: number;\n Deleted: boolean;\n syncError: FeedSyncError | undefined;\n isSynced: boolean;\n /** Feed Member Fields */\n feedId: string;\n userId: string;\n companyId: string;\n feedType: string;\n sortKey: string;\n /** Custom Fields */\n status: FeedDmsFeedMember_DmsFeedMemberStatus;\n lastViewedAt: number;\n lastTypedAt: number;\n notificationPreference: FeedDmsFeedMember_NotificationPreference;\n pinnedPosition?: number | undefined;\n}\n\nexport const FeedDmsFeedMember_DmsFeedMemberStatus = {\n UNKNOWN_STATUS: \"UNKNOWN_STATUS\",\n REQUESTED: \"REQUESTED\",\n ACCEPTED: \"ACCEPTED\",\n REJECTED: \"REJECTED\",\n CLOSED: \"CLOSED\",\n ARCHIVED: \"ARCHIVED\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type FeedDmsFeedMember_DmsFeedMemberStatus =\n typeof FeedDmsFeedMember_DmsFeedMemberStatus[keyof typeof FeedDmsFeedMember_DmsFeedMemberStatus];\n\nexport namespace FeedDmsFeedMember_DmsFeedMemberStatus {\n export type UNKNOWN_STATUS = typeof FeedDmsFeedMember_DmsFeedMemberStatus.UNKNOWN_STATUS;\n export type REQUESTED = typeof FeedDmsFeedMember_DmsFeedMemberStatus.REQUESTED;\n export type ACCEPTED = typeof FeedDmsFeedMember_DmsFeedMemberStatus.ACCEPTED;\n export type REJECTED = typeof FeedDmsFeedMember_DmsFeedMemberStatus.REJECTED;\n export type CLOSED = typeof FeedDmsFeedMember_DmsFeedMemberStatus.CLOSED;\n export type ARCHIVED = typeof FeedDmsFeedMember_DmsFeedMemberStatus.ARCHIVED;\n export type UNRECOGNIZED = typeof FeedDmsFeedMember_DmsFeedMemberStatus.UNRECOGNIZED;\n}\n\nexport const FeedDmsFeedMember_NotificationPreference = {\n UNKNOWN_PREFERENCE: \"UNKNOWN_PREFERENCE\",\n ALL: \"ALL\",\n MENTIONS: \"MENTIONS\",\n NONE: \"NONE\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type FeedDmsFeedMember_NotificationPreference =\n typeof FeedDmsFeedMember_NotificationPreference[keyof typeof FeedDmsFeedMember_NotificationPreference];\n\nexport namespace FeedDmsFeedMember_NotificationPreference {\n export type UNKNOWN_PREFERENCE = typeof FeedDmsFeedMember_NotificationPreference.UNKNOWN_PREFERENCE;\n export type ALL = typeof FeedDmsFeedMember_NotificationPreference.ALL;\n export type MENTIONS = typeof FeedDmsFeedMember_NotificationPreference.MENTIONS;\n export type NONE = typeof FeedDmsFeedMember_NotificationPreference.NONE;\n export type UNRECOGNIZED = typeof FeedDmsFeedMember_NotificationPreference.UNRECOGNIZED;\n}\n\nexport interface FeedReaction {\n /** Entity Base */\n entityType: string;\n entityId: string;\n createdAt: number;\n updatedAt: number;\n Deleted: boolean;\n syncError: FeedSyncError | undefined;\n isSynced: boolean;\n /** Custom Fields */\n postId: string;\n postType: string;\n userId: string;\n feedId: string;\n feedType: string;\n reactionType: FeedReaction_ReactionType;\n value: string;\n score: number;\n}\n\nexport const FeedReaction_ReactionType = {\n UNKNOWN: \"UNKNOWN\",\n LIKE: \"LIKE\",\n EMOJI: \"EMOJI\",\n VIEW: \"VIEW\",\n VOTE: \"VOTE\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type FeedReaction_ReactionType = typeof FeedReaction_ReactionType[keyof typeof FeedReaction_ReactionType];\n\nexport namespace FeedReaction_ReactionType {\n export type UNKNOWN = typeof FeedReaction_ReactionType.UNKNOWN;\n export type LIKE = typeof FeedReaction_ReactionType.LIKE;\n export type EMOJI = typeof FeedReaction_ReactionType.EMOJI;\n export type VIEW = typeof FeedReaction_ReactionType.VIEW;\n export type VOTE = typeof FeedReaction_ReactionType.VOTE;\n export type UNRECOGNIZED = typeof FeedReaction_ReactionType.UNRECOGNIZED;\n}\n\nexport interface FeedUser {\n /** Entity Base */\n entityType: string;\n entityId: string;\n createdAt: number;\n updatedAt: number;\n Deleted: boolean;\n syncError: FeedSyncError | undefined;\n isSynced: boolean;\n /** Custom Fields */\n name: string;\n profilePic: string;\n username: string;\n profilePic32: string;\n profilePic64: string;\n profilePic128: string;\n userType: UserType;\n}\n\nexport interface FeedForumFeed {\n /** Entity Base */\n entityId: string;\n createdAt: number;\n updatedAt: number;\n isDeleted: boolean;\n /** Feed Fields */\n rootPostCount: number;\n postCount: number;\n collectionIdentifier: string;\n feedType: string;\n sortKey: string;\n /** Custom Fields */\n bannerImage: FileAttachment | undefined;\n whoCanPost: FeedForumFeed_MemberPermissionType;\n whoCanComment: FeedForumFeed_MemberPermissionType;\n layoutType: FeedForumFeed_LayoutType;\n discordWebhookUrl: string;\n telegramChannelId: string;\n emailNotificationPreference: FeedForumFeed_EmailNotificationPreferenceType;\n}\n\nexport const FeedForumFeed_MemberPermissionType = {\n UNKNOWN_PERMISSION: \"UNKNOWN_PERMISSION\",\n EVERYONE: \"EVERYONE\",\n ADMINS: \"ADMINS\",\n UNRECOGNIZED: \"UNRECOGNIZED\",\n} as const;\n\nexport type FeedForumFeed_MemberPermissionType =\n typeof FeedForumFeed_MemberPermissionType[keyof typeof FeedForumFeed_MemberPermissionType];\n\nexport namespace FeedForumFeed_MemberPermissionType {\n export type UNKNOWN_PERMISSION = typeof FeedForumFeed_MemberPermissionType.UNKNOWN_PERMISSION;\n export type EVERYONE = typeof FeedForumFeed_MemberPermissionType.EVERYONE;\n export type ADMINS = typeof FeedForumFeed_MemberPermissionType.ADMINS;\n export type UNRECOGNIZED = typeof FeedForumFeed_MemberPermissionType.UNRECOGNIZED;\n}\n\nexport const FeedForumFeed_LayoutType = {\n UNKNOWN_LAYOUT: \"UNKNOWN_LAYOUT\",\n FEED: