Getting Started
A typescript client to interact with the Tribe GraphQL API.
#
How to use#
Basic Usageyou can provide graphql url and token as options to the client.
or you can set the url in the environment variable TRIBE_GQL_ENDPOINT
.
you can also set the token per request.
#
App UsageTo use the client in an app, you need to provide
clientId
and clientSecret
when initializing TribeClient
.
Then you can use generateToken
to generate a token
per network by providing networkId
to make queries.
In case you want to act as a member you can provide memberId
to generateToken
.
#
Supported Mutations#
archiveMemberSchemaField(key: String!): Network!- β t.network.archiveMemberSchemaField()
#
updateMemberSchemaField(input: UpdateCustomFieldSchemaInput!): Network!- β t.network.updateMemberSchemaField()
#
addMemberSchemaField(input: CustomFieldSchemaInput!): Network!- β t.network.addMemberSchemaField()
#
addReaction(input: AddReactionInput!, postId: ID!): Action!- β t.posts.addReaction()
#
addSpaceMembers(input: [AddSpaceMemberInput!]!, spaceId: ID!): [SpaceMember!]!- β t.spaceMembers.add()
#
addTrialPlan(trial: AddTrialInput!): Plan!- β
#
approveSpaceMembershipRequest(): Action!- β t.spaceMembership.approveRequest()
#
cancelEmailUpdate(id: ID): Action!- β t.members.cancelEmailUpdate()
#
changeNetworkSubscriptionPlan(name: PlanName!): Network!- β
#
clearNewDomain: Action!- β t.network.clearNewDomain()
#
clearNotificationsCount: Action!- β t.notifications.clearNotificationsCount()
#
confirmResetPassword(input: ConfirmResetPasswordInput!): Action!- β
#
createAccessGroup(input: CreateAccessGroupInput!): AccessGroup!- β
#
createCollection(input: CreateCollectionInput!): Collection!- β t.collections.create()
#
createEmojis(input: [CreateEmojiInput!]!): [Emoji!]!- β t.media.createEmojis()
#
createImages(input: [CreateImageInput!]!): [SignedUrl!]!- β t.media.createImages()
#
createMigrationRequest(): ImportRequest!- β
#
createNetwork(input: AddNetworkInput!): AuthTokenWithOtp!- β
#
createPermission(input: CreatePermissionInput!): Permission!- β
#
createPost(input: CreatePostInput!, spaceId: ID!): Post!- β t.posts.create()
#
createPostTypeTemplate(input: CreatePostTypeTemplateInput!): PostTypeTemplate!- β
#
createReply(input: CreatePostInput!, postId: ID!): Post!- β t.posts.reply()
#
createReport(input: CreateReportInput!): ModerationItem!- β
#
createSpace(input: CreateSpaceInput!): Space!- β t.spaces.create()
#
createSpaceType(input: CreateSpaceTypeInput!): SpaceType!- β t.spaces.createType()
#
createTag(input: CreateTagInput!, spaceId: ID!): Tag!- β t.tags.create()
#
declineSpaceMembershipRequest(): Action!- β t.spaceMembership.declineRequest()
#
deleteAccessGroup(id: ID!): Action!- β
#
deleteCollection(id: ID!): Action!- β t.collections.delete()
#
deleteMember(id: ID!): Action!- β t.members.delete()
#
deleteNetwork: Action!- β
#
deleteNotification(notificationId: ID!): Action!- β t.notifications.deleteNotification()
#
deleteNotifications(ids: [ID!]): Action!- β t.notifications.deleteNotifications()
#
deletePermission(id: ID!): Action!- β
#
deletePost(id: ID!): Action!- β t.posts.delete()
#
deleteSpace(id: ID!): Action!- β t.spaces.delete()
#
deleteSpaceType(spaceTypeId: ID!): Action!- β
#
deleteSsoMembership(memberId: String!, type: SsoType!): Action!- β
#
extendCurrentTrial(newEndDate: DateTime!): Plan!- β
#
globalCreateApp(input: CreateAppInput!): App!- β
#
globalCreateWidget(appId: ID!, input: CreateWidgetInput!): Widget!- β
#
globalDeleteAppSetting(): AppSetting!- β
#
globalDeleteWidget(id: ID!): Action!- β
#
globalRegenerateClientSecret(appId: ID!): App!- β
#
globalUpdateApp(id: ID!, input: UpdateAppInput!): App!- β
#
globalUpdateAppSetting(): AppSetting!- β
#
globalUpdateWidget(id: ID!, input: UpdateWidgetInput!): Widget!- β
#
hidePost(id: ID!): Action!- β
#
installApp(appId: ID!, input: InstallAppInput!): AppInstallation!- β t.app.install()
#
installPostTypeTemplate(input: InstallPostTypeTemplateInput!): PostType!- β
#
inviteMembers(input: InviteMembersInput!): [MemberInvitation!]!- β
#
joinNetwork(input: JoinNetworkInput!): AuthToken!- β t.auth.joinNetwork()
#
joinNetworkWithInvitationLink(input: JoinNetworkWithLinkInput!): AuthToken!- β t.auth.joinNetworkWithInvitationLink()
#
joinNetworkWithToken(input: JoinNetworkWithTokenInput!): AuthToken!- β t.auth.joinNetworkWithToken()
#
joinSpace(spaceId: ID!): Action!- β t.spaces.join()
#
leaveSpace(spaceId: ID!): Action!- β t.spaces.leave()
#
organizeCollections(ids: [String!]!): Action!- β t.collections.organize()
#
organizeSpacesInCollection(): Action!- β t.spaces.organize()
#
pinPostToSpace(postId: ID!): Action!- β t.posts.pinToSpace()
#
pinReplyToPost(postId: ID!, replyId: ID!): Action!- β
#
purchase(input: PurchaseInput!): Subscription!- β
#
readNotification(notificationId: ID!): Action!- β t.notifications.readNotification()
#
readNotifications(ids: [ID!]): Action!- β t.notifications.readNotifications()
#
removeReaction(postId: ID!, reaction: String!): Action!- β t.posts.removeReaction()
#
removeSpaceMembers(memberIds: [ID!]!, spaceId: ID!): [Action!]!- β t.spaceMembers.remove()
#
requestGlobalTokenCode(input: RequestGlobalTokenInput!): Action!- β
#
requestSpaceMembership(spaceId: ID!): SpaceJoinRequest!- β t.spaceMembership.request()
#
resendGlobalTokenCode(input: RequestGlobalTokenInput!): Action!- β
#
resendVerification: Action!- β t.auth.resendVerification()
#
sendResetPasswordEmail(email: String!): Action!- β t.auth.sendResetPasswordEmail()
#
transferToNewDomain: Action!- β t.network.transferToNewDomain()
#
unhidePost(id: ID!): Action!- β
#
uninstallApp(appInstallationId: ID!, reason: String): AppInstallation- β t.app.uninstall()
#
unpinPostFromSpace(postId: ID!): Action!- β t.posts.unpinFromSpace()
#
unpinReplyFromPost(postId: ID!, replyId: ID!): Action!- β
#
unsubscribeFromNotification(input: UnsubscribeWithTokenInput!): Action!- β t.notifications.unsubscribe()
#
updateAccessGroup(id: ID!, input: UpdateAccessGroupInput!): AccessGroup!- β
#
updateAppInstallation(): AppInstallation!- β
#
updateAppNetworkSettings(appId: ID!, settings: String!): AppAction!- β t.app.updateNetworkSettings()
#
updateAppSpaceSetting(appId: ID!, settings: String!, spaceId: ID!): AppAction!- β
#
updateBillingDetails(input: BillingDetailsInput!): BillingDetails!- β
#
updateCollection(id: ID!, input: UpdateCollectionInput!): Action!- β t.collections.update()
#
updateCustomSso(input: UpdateCustomSsoInput!): Sso!- β t.auth.updateCustomSso()
#
updateDefaultSsoStatus(sso: DefaultSsoType!, status: SsoStatus!): Action!- β t.auth.updateDefaultSsoStatus()
#
updateImage(id: String!, input: UpdateImageInput!): Image!- β
#
updateMember(id: ID, input: UpdateMemberInput!): Member!- β t.members.update()
#
updateMemberNetworkNotificationSettings(): MemberNetworkNotificationSettings!- β t.notifications.updateNetworkSettings()
#
updateMemberSpaceNotificationSettings(): MemberSpaceNotificationSettings!- β
#
updateMemberSpaceRole(): Action!- β
#
updateModerationItem(id: ID!, input: UpdateModerationItemInput!): Action!- β t.moderation.updateItem()
#
updateModerationSettings(): ModerationSettings!- β t.moderation.updateSettings()
#
updateNetwork(input: UpdateNetworkInput!): Network!- β t.network.update()
#
updateNetworkCustomCapacities(): Network!- β
#
updateNetworkStatus(input: UpdateNetworkStatusInput!): Action!- β
#
updateNewDomain(input: UpdateNewDomainInput!): DomainTransferStatus!- β t.network.updateNewDomain()
#
updatePasswordWithToken(input: UpdatePasswordWithTokenInput!): Action!- β
#
updatePermission(id: ID!, input: UpdatePermissionInput!): Permission!- β
#
updatePost(id: ID!, input: UpdatePostInput!): Post!- β t.posts.update()
#
updateSpace(id: ID!, input: UpdateSpaceInput!): Space!- β t.spaces.update()
#
updateSpaceHighlightedTags(): Action!- β
#
updateSpaceTagFilter(input: UpdateTagFilter!, spaceId: ID!): Action!- β
#
updateSpaceType(id: ID!, input: UpdateSpaceTypeInput!): SpaceType!- β
#
updateTag(id: ID!, input: UpdateTagInput!, spaceId: ID!): Tag!- β t.tags.update()
#
uploadMigrationFiles(): UploadCollectionsResponse!- β
#
upsertTheme(input: UpsertTheme!): NewTheme!- β t.theme.upsert()
#
verifyMember(input: VerifyMemberInput!): AuthToken!- β t.auth.verifyMember()
#
verifyMemberEmail(input: VerifyMemberEmailInput!): Action!- β
#
Supported Queries#
accessGroup(id: ID!): AccessGroup!- β
#
accessGroups: [AccessGroup!]!- β
#
app(id: ID, slug: String): App!- β t.app.get()
#
apps(): PaginatedApp!- β t.app.list()
#
getNetworkAppInstallations(): PaginatedAppInstallation!- β t.app.appInstallations()
#
authMember: Member!- β
#
postTypes(): PaginatedPostType!- β t.posts.listPostTypes()
#
spacePostTypes(): PaginatedSpacePostType!- β t.spacePostType.list()
#
spacePostType(): SpacePostType!- β t.spacePostType.get()
#
updateSpacePostTypes(): [SpacePostType!]!- β t.spacePostType.update()
#
baskets(input: BasketsInput!): [Basket!]!- β
#
billingDetails: BillingDetails!- β t.billing.details()
#
cancelSubscription: Action!- β
#
collection(id: ID): Collection!- β t.collections.get()
#
collections(): [Collection!]!- β t.collections.list()
#
domainAvailability(input: DomainAvailabilityInput!): DomainAvailability!- β t.network.domainAvailability()
#
emailAvailability(email: String!): EmailAvailability!- β
#
embed(input: EmbedInput!): Embed!- β t.media.embed()
#
exploreSpaces(): PaginatedSpace!- β t.spaces.explore()
#
feed(): PaginatedPost!- β t.posts.feed()
#
getAppNetworkSettings(appId: ID!): String!- β t.app.networkSettings()
#
getAppSpaceSettings(appId: ID!, spaceId: ID!): String!- β t.app.spaceSettings()
#
getAppWidget(appId: ID!, widgetId: ID!): Widget!- β
#
getAppWidgets(): PaginatedWidget!- β
#
getMemberAppInstallations(): PaginatedAppInstallation!- β
#
globalApp(id: ID, slug: String): App!- β
#
globalAppSettings(): AppSetting!- β
#
globalAppWidget(appId: ID!, widgetId: ID!): Widget!- β
#
globalAppWidgets(): PaginatedWidget!- β
#
globalApps(): PaginatedApp!- β
#
globalNetworks(): PaginatedNetwork!- β
#
globalToken(input: GlobalTokenInput!): GlobalToken!- β
#
impersonateLoginToNetwork(): AuthInfoWithOtp!- β
#
invitationLinkValidity(id: String!): MemberInvitationLink!#
limitedToken(): AppToken!- β t.getLimitedToken()
#
loginNetwork(input: LoginNetworkWithPasswordInput!): AuthToken!- β t.auth.login()
#
loginNetworkWithGlobalToken(): AuthToken!- β
#
loginNetworkWithPassword(input: LoginNetworkWithPasswordInput!): AuthToken!- β
#
loginSupportWithSsoCode(): SupportAuthToken!- β
#
loginWithSsoCode(input: LoginWithSsoCodeInput!): AuthToken!- β
#
media(id: ID!): Media!- β
#
member(id: ID, username: String): Member!- β t.members.get()
#
memberInvitation(id: ID!): MemberInvitation!- β t.invitations.list()
#
memberInvitationLink: MemberInvitationLink!- β t.invitations.getLink()
#
memberInvitationValidity(token: String!): MemberInvitation!- β t.invitations.validate()
#
memberInvitations(): PaginatedMemberInvitation!- β t.invitations.list()
#
memberNotificationSettings(id: ID): MemberNotificationSettings!- β
#
memberPosts(): PaginatedPost!- β t.posts.byMember()
#
memberSpaceMembershipRequest(): [SpaceJoinRequest!]!- β t.spaceMemberships.getMemberRequests()
#
memberSpaces(): PaginatedSpaceMember!- β t.spaceMembers.listSpaces()
#
members(): PaginatedMember!- β t.memebrs.list()
#
moderationItem(id: ID!): ModerationItem!- β t.moderation.getItem()
#
moderationItemReporters(): PaginatedModerationItemReporter!- β t.moderation.getItemReporters()
#
moderationItems(): PaginatedModeration!- β t.moderation.getItems()
#
moderationSettings: ModerationSettings!- β t.moderation.settings()
#
network: Network!- β t.network.get()
#
networkApps(status: AppInstallationStatus): [App!]!- β
#
networkPublicInfo: NetworkPublicInfo!- β
#
networks(): PaginatedNetwork!- β
#
networksMembers(): PaginatedPluralMember!- β
#
newDomainStatus(domain: String!): DomainTransferStatus!- β t.network.newDomainStatus()
#
notifications(after: String, limit: Int!): PaginatedNotification!- β t.notifications.list()
#
notificationsCount: NotificationsCount!- β t.notifications.count()
#
passwordComplexity(password: String!): PasswordComplexity!- β
#
permission(id: ID!): Permission!- β
#
permissions: [Permission!]!- β
#
post(id: ID!): Post!- β t.posts.get()
#
postReactionParticipants(): PaginatedPostReactionParticipant!- β t.posts.reactionParticipants()
#
postType(id: ID!): PostType!- β t.posts.getPostType()
#
postTypeTemplates: [PostTypeTemplate!]!- β
#
posts(): PaginatedPost!- β t.posts.list()
#
redirect(url: String!): Redirect!- β
#
replies(): PaginatedPost!- β t.posts.replies()
#
report(input: ReportInput!, spaceId: String): Report!- β t.report.get()
#
roles(orderBy: RoleListOrderByEnum, reverse: Boolean): [Role!]!- β t.roles.list()
#
scopes(contexts: [PermissionsContextInput!]): Scopes!- β
#
search(input: SearchInput!): SearchResult!- β t.search()
#
space(id: ID, slug: ID): Space!- β t.spaces.get()
#
spaceMembers(): PaginatedSpaceMember!- β t.spaceMembers.listMembers()
#
spaceMembershipRequests(): [SpaceJoinRequest!]!- β t.spaceMembership.getRequests()
#
spacePinnedPosts(spaceId: ID!): [Post!]!- β t.spaces.pinnedPosts()
#
spaceRoles(): [SpaceRole!]!- β t.spaceRoles.list()
#
spaces(): PaginatedSpace!- β t.spaces.list()
#
ssoMemberships(memberId: String!): [SsoMembership!]!- β t.auth.ssoMemberships()
#
ssoUrl(input: SsoUrlInput!): SsoUrl!- β t.auth.ssoUrl()
#
ssos(status: SsoStatus): [Sso!]!- β t.auth.ssos()
#
subscription(input: subscriptionInput!): Subscription!- β
#
supportNetworkTokens(networkId: String!): SupportLimitedAuthToken!- β
#
supportSsoUrl(input: SupportSsoUrlInput): SupportSsoUrl!- β
#
tagPosts(): PaginatedPost!- β
#
tags(): PaginatedTag!- β t.tags.list()
#
tokens(): AuthToken!- β
#
usernameAvailability(username: String!): UsernameAvailability!- β
#
vatTypes: [VatTypeInfo!]!- β
#
widget(id: ID!): Slate!- β