From de50840aa1889826b1a254eeb9a08980d15d78ff Mon Sep 17 00:00:00 2001 From: nightspite Date: Sun, 22 Sep 2024 16:56:29 +0200 Subject: [PATCH] BREAKING CHANGE: api v2 - organization based api key --- .github/workflows/tests.yml | 1 + client/Client.ts | 6 + client/services.gen.ts | 331 +- client/types.gen.ts | 3568 +++++++++----- openapi/openapi.json | 2 +- openapi/openapi.yaml | 9228 ++++++++++++++++++++--------------- package-lock.json | 4 +- readme.md | 66 +- src/index.spec.ts | 114 +- 9 files changed, 8073 insertions(+), 5247 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f667e2..eedeacb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-latest env: BUNDLE_SOCIAL_API_KEY: ${{ secrets.BUNDLE_SOCIAL_API_KEY }} + BUNDLE_SOCIAL_TEAM_ID: ${{ secrets.BUNDLE_SOCIAL_TEAM_ID }} steps: - name: Checkout uses: actions/checkout@v4 diff --git a/client/Client.ts b/client/Client.ts index 5896948..f5f32f2 100644 --- a/client/Client.ts +++ b/client/Client.ts @@ -4,7 +4,9 @@ import { Interceptors } from './core/OpenAPI'; import { FetchHttpRequest } from './core/FetchHttpRequest'; import { AppService } from './services.gen'; +import { OrganizationService } from './services.gen'; import { PostService } from './services.gen'; +import { SocialAccountService } from './services.gen'; import { TeamService } from './services.gen'; import { UploadService } from './services.gen'; @@ -13,7 +15,9 @@ type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; export class Client { public readonly app: AppService; + public readonly organization: OrganizationService; public readonly post: PostService; + public readonly socialAccount: SocialAccountService; public readonly team: TeamService; public readonly upload: UploadService; @@ -37,7 +41,9 @@ export class Client { }); this.app = new AppService(this.request); + this.organization = new OrganizationService(this.request); this.post = new PostService(this.request); + this.socialAccount = new SocialAccountService(this.request); this.team = new TeamService(this.request); this.upload = new UploadService(this.request); } diff --git a/client/services.gen.ts b/client/services.gen.ts index 64875b6..a64d409 100644 --- a/client/services.gen.ts +++ b/client/services.gen.ts @@ -2,7 +2,7 @@ import type { CancelablePromise } from './core/CancelablePromise'; import type { BaseHttpRequest } from './core/BaseHttpRequest'; -import type { AppGetHealthResponse, TeamGetTeamResponse, UploadCreateData, UploadCreateResponse, UploadGetListResponse, UploadDeleteManyData, UploadDeleteManyResponse, UploadGetData, UploadGetResponse, UploadDeleteData, UploadDeleteResponse, PostCreateData, PostCreateResponse, PostGetListData, PostGetListResponse, PostGetData, PostGetResponse, PostUpdateData, PostUpdateResponse, PostDeleteData, PostDeleteResponse } from './types.gen'; +import type { AppGetHealthResponse, OrganizationGetOrganizationResponse, TeamGetTeamData, TeamGetTeamResponse, TeamUpdateTeamData, TeamUpdateTeamResponse, TeamDeleteTeamData, TeamDeleteTeamResponse, TeamCreateTeamData, TeamCreateTeamResponse, SocialAccountConnectData, SocialAccountConnectResponse, SocialAccountDisconnectData, SocialAccountDisconnectResponse, SocialAccountSetChannelData, SocialAccountSetChannelResponse, SocialAccountRefreshChannelsData, SocialAccountRefreshChannelsResponse, UploadGetListData, UploadGetListResponse, UploadCreateData, UploadCreateResponse, UploadDeleteManyData, UploadDeleteManyResponse, UploadGetData, UploadGetResponse, UploadDeleteData, UploadDeleteResponse, PostGetData, PostGetResponse, PostUpdateData, PostUpdateResponse, PostDeleteData, PostDeleteResponse, PostGetListData, PostGetListResponse, PostCreateData, PostCreateResponse } from './types.gen'; export class AppService { constructor(public readonly httpRequest: BaseHttpRequest) { } @@ -29,18 +29,125 @@ export class AppService { } +export class OrganizationService { + constructor(public readonly httpRequest: BaseHttpRequest) { } + + /** + * Get organization + * @returns unknown 200 + * @throws ApiError + */ + public organizationGetOrganization(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v1/organization/', + errors: { + 400: '400', + 401: '401', + 403: '403', + 404: '404', + 429: '429', + 500: '500', + } + }); + } + +} + export class TeamService { constructor(public readonly httpRequest: BaseHttpRequest) { } /** * Get team + * @param data The data for the request. + * @param data.id * @returns unknown 200 * @throws ApiError */ - public teamGetTeam(): CancelablePromise { + public teamGetTeam(data: TeamGetTeamData): CancelablePromise { return this.httpRequest.request({ method: 'GET', + url: '/api/v1/team/{id}', + path: { + id: data.id + }, + errors: { + 400: '400', + 401: '401', + 403: '403', + 404: '404', + 429: '429', + 500: '500', + } + }); + } + + /** + * Update team + * @param data The data for the request. + * @param data.id + * @param data.requestBody Body + * @returns unknown 200 + * @throws ApiError + */ + public teamUpdateTeam(data: TeamUpdateTeamData): CancelablePromise { + return this.httpRequest.request({ + method: 'PATCH', + url: '/api/v1/team/{id}', + path: { + id: data.id + }, + body: data.requestBody, + mediaType: 'application/json', + errors: { + 400: '400', + 401: '401', + 403: '403', + 404: '404', + 429: '429', + 500: '500', + } + }); + } + + /** + * Delete team + * @param data The data for the request. + * @param data.id + * @returns unknown 200 + * @throws ApiError + */ + public teamDeleteTeam(data: TeamDeleteTeamData): CancelablePromise { + return this.httpRequest.request({ + method: 'DELETE', + url: '/api/v1/team/{id}', + path: { + id: data.id + }, + errors: { + 400: '400', + 401: '401', + 403: '403', + 404: '404', + 429: '429', + 500: '500', + } + }); + } + + /** + * Create new team + * @param data The data for the request. + * @param data.requestBody Body + * @returns unknown 200 + * @throws ApiError + */ + public teamCreateTeam(data: TeamCreateTeamData = {}): CancelablePromise { + return this.httpRequest.request({ + method: 'POST', url: '/api/v1/team/', + body: data.requestBody, + mediaType: 'application/json', errors: { 400: '400', 401: '401', @@ -54,23 +161,70 @@ export class TeamService { } -export class UploadService { +export class SocialAccountService { constructor(public readonly httpRequest: BaseHttpRequest) { } /** - * Create upload - * Upload a file. This is the only endpoint that uses multipart/form-data. + * Generate OAuth URL * @param data The data for the request. - * @param data.formData Body + * @param data.requestBody Body * @returns unknown 200 * @throws ApiError */ - public uploadCreate(data: UploadCreateData = {}): CancelablePromise { + public socialAccountConnect(data: SocialAccountConnectData = {}): CancelablePromise { return this.httpRequest.request({ method: 'POST', - url: '/api/v1/upload/', - formData: data.formData, - mediaType: 'multipart/form-data', + url: '/api/v1/social-account/connect', + body: data.requestBody, + mediaType: 'application/json', + errors: { + 400: '400', + 401: '401', + 403: '403', + 404: '404', + 429: '429', + 500: '500', + } + }); + } + + /** + * Disconnect social account from team + * @param data The data for the request. + * @param data.requestBody Body + * @returns unknown 200 + * @throws ApiError + */ + public socialAccountDisconnect(data: SocialAccountDisconnectData = {}): CancelablePromise { + return this.httpRequest.request({ + method: 'DELETE', + url: '/api/v1/social-account/disconnect', + body: data.requestBody, + mediaType: 'application/json', + errors: { + 400: '400', + 401: '401', + 403: '403', + 404: '404', + 429: '429', + 500: '500', + } + }); + } + + /** + * Set channel for social account + * @param data The data for the request. + * @param data.requestBody Body + * @returns unknown 200 + * @throws ApiError + */ + public socialAccountSetChannel(data: SocialAccountSetChannelData = {}): CancelablePromise { + return this.httpRequest.request({ + method: 'POST', + url: '/api/v1/social-account/set-channel', + body: data.requestBody, + mediaType: 'application/json', errors: { 400: '400', 401: '401', @@ -82,15 +236,74 @@ export class UploadService { }); } + /** + * Refresh channels for social account + * @param data The data for the request. + * @param data.requestBody Body + * @returns unknown 200 + * @throws ApiError + */ + public socialAccountRefreshChannels(data: SocialAccountRefreshChannelsData = {}): CancelablePromise { + return this.httpRequest.request({ + method: 'POST', + url: '/api/v1/social-account/refresh-channels', + body: data.requestBody, + mediaType: 'application/json', + errors: { + 400: '400', + 401: '401', + 403: '403', + 404: '404', + 429: '429', + 500: '500', + } + }); + } + +} + +export class UploadService { + constructor(public readonly httpRequest: BaseHttpRequest) { } + /** * Get upload list + * @param data The data for the request. + * @param data.teamId * @returns unknown 200 * @throws ApiError */ - public uploadGetList(): CancelablePromise { + public uploadGetList(data: UploadGetListData): CancelablePromise { return this.httpRequest.request({ method: 'GET', url: '/api/v1/upload/', + query: { + teamId: data.teamId + }, + errors: { + 400: '400', + 401: '401', + 403: '403', + 404: '404', + 429: '429', + 500: '500', + } + }); + } + + /** + * Create upload + * Upload a file. This is the only endpoint that uses multipart/form-data. + * @param data The data for the request. + * @param data.formData Body + * @returns unknown 200 + * @throws ApiError + */ + public uploadCreate(data: UploadCreateData = {}): CancelablePromise { + return this.httpRequest.request({ + method: 'POST', + url: '/api/v1/upload/', + formData: data.formData, + mediaType: 'multipart/form-data', errors: { 400: '400', 401: '401', @@ -182,18 +395,19 @@ export class PostService { constructor(public readonly httpRequest: BaseHttpRequest) { } /** - * Create post + * Get post * @param data The data for the request. - * @param data.requestBody Body + * @param data.id * @returns unknown 200 * @throws ApiError */ - public postCreate(data: PostCreateData = {}): CancelablePromise { + public postGet(data: PostGetData): CancelablePromise { return this.httpRequest.request({ - method: 'POST', - url: '/api/v1/post/', - body: data.requestBody, - mediaType: 'application/json', + method: 'GET', + url: '/api/v1/post/{id}', + path: { + id: data.id + }, errors: { 400: '400', 401: '401', @@ -206,31 +420,22 @@ export class PostService { } /** - * Get post list + * Update post * @param data The data for the request. - * @param data.status - * @param data.orderBy - * @param data.order - * @param data.q - * @param data.platforms - * @param data.offset - * @param data.limit + * @param data.id + * @param data.requestBody Body * @returns unknown 200 * @throws ApiError */ - public postGetList(data: PostGetListData = {}): CancelablePromise { + public postUpdate(data: PostUpdateData): CancelablePromise { return this.httpRequest.request({ - method: 'GET', - url: '/api/v1/post/', - query: { - status: data.status, - orderBy: data.orderBy, - order: data.order, - q: data.q, - platforms: data.platforms, - offset: data.offset, - limit: data.limit + method: 'PATCH', + url: '/api/v1/post/{id}', + path: { + id: data.id }, + body: data.requestBody, + mediaType: 'application/json', errors: { 400: '400', 401: '401', @@ -243,15 +448,15 @@ export class PostService { } /** - * Get post + * Delete post * @param data The data for the request. * @param data.id * @returns unknown 200 * @throws ApiError */ - public postGet(data: PostGetData): CancelablePromise { + public postDelete(data: PostDeleteData): CancelablePromise { return this.httpRequest.request({ - method: 'GET', + method: 'DELETE', url: '/api/v1/post/{id}', path: { id: data.id @@ -268,22 +473,33 @@ export class PostService { } /** - * Update post + * Get post list * @param data The data for the request. - * @param data.id - * @param data.requestBody Body + * @param data.teamId + * @param data.status + * @param data.orderBy + * @param data.order + * @param data.q + * @param data.platforms + * @param data.offset + * @param data.limit * @returns unknown 200 * @throws ApiError */ - public postUpdate(data: PostUpdateData): CancelablePromise { + public postGetList(data: PostGetListData): CancelablePromise { return this.httpRequest.request({ - method: 'PUT', - url: '/api/v1/post/{id}', - path: { - id: data.id + method: 'GET', + url: '/api/v1/post/', + query: { + teamId: data.teamId, + status: data.status, + orderBy: data.orderBy, + order: data.order, + q: data.q, + platforms: data.platforms, + offset: data.offset, + limit: data.limit }, - body: data.requestBody, - mediaType: 'application/json', errors: { 400: '400', 401: '401', @@ -296,19 +512,18 @@ export class PostService { } /** - * Delete post + * Create post * @param data The data for the request. - * @param data.id + * @param data.requestBody Body * @returns unknown 200 * @throws ApiError */ - public postDelete(data: PostDeleteData): CancelablePromise { + public postCreate(data: PostCreateData = {}): CancelablePromise { return this.httpRequest.request({ - method: 'DELETE', - url: '/api/v1/post/{id}', - path: { - id: data.id - }, + method: 'POST', + url: '/api/v1/post/', + body: data.requestBody, + mediaType: 'application/json', errors: { 400: '400', 401: '401', diff --git a/client/types.gen.ts b/client/types.gen.ts index 69815a2..c473d3f 100644 --- a/client/types.gen.ts +++ b/client/types.gen.ts @@ -5,33 +5,26 @@ export type AppGetHealthResponse = { createdAt: string; }; -export type TeamGetTeamResponse = { +export type OrganizationGetOrganizationResponse = { id: string; - name: string; - avatarUrl?: string | null; createdById: string; + name?: string | null; + avatarUrl?: string | null; + defaultPaymentMethodFilled?: boolean; + billingAddressFilled?: boolean; + apiAccess?: boolean; createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; - users: Array<{ - userId: string; - teamId: string; + teams: Array<{ + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; - user: { - id: string; - externalId: string; - email: string; - emailVerified?: string | null; - firstName?: string | null; - lastName?: string | null; - avatarUrl?: string | null; - role: 'ADMIN' | 'CUSTOMER'; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }; }>; createdBy: { id: string; @@ -46,27 +39,83 @@ export type TeamGetTeamResponse = { updatedAt: string | null; deletedAt?: string | null; }; - invitations: Array<{ + organizationSubscription?: { + id: string; + organizationId: string; + stripeSubscriptionId: string; + stripeSubscriptionItems?: Array<{ + id: string; + price: string; + quantity: number; + }> | null; + status: 'trialing' | 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'unpaid' | 'paused'; + metadata?: unknown; + cancelAtPeriodEnd: boolean; + created: string | null; + currentPeriodStart: string | null; + currentPeriodEnd: string | null; + endedAt?: string | null; + cancelAt?: string | null; + canceledAt?: string | null; + trialStart?: string | null; + trialEnd?: string | null; + createdAt: string | null; + updatedAt: string | null; + teamPlan?: { + id: string; + organizationSubscriptionId: string; + teamId: string; + stripePriceId: string; + tier: 'PRO'; + createdAt: string | null; + updatedAt: string | null; + } | null; + } | null; +}; + +export type TeamGetTeamData = { + id: string; +}; + +export type TeamGetTeamResponse = { + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + organization: { id: string; - email: string; - teamId: string; createdById: string; + name?: string | null; + avatarUrl?: string | null; + defaultPaymentMethodFilled?: boolean; + billingAddressFilled?: boolean; + apiAccess?: boolean; createdAt: string | null; updatedAt: string | null; - }>; - bots: Array<{ + deletedAt?: string | null; + }; + createdBy: { id: string; - name: string; + externalId: string; + email: string; + emailVerified?: string | null; + firstName?: string | null; + lastName?: string | null; avatarUrl?: string | null; - teamId: string; + role: 'ADMIN' | 'CUSTOMER'; createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; - }>; - webhooks: Array<{ + }; + bots: Array<{ id: string; + name: string; + avatarUrl?: string | null; teamId: string; - url: string; createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; @@ -99,18 +148,231 @@ export type TeamGetTeamResponse = { usage: { monthlyPosts: number; }; + teamPlan?: { + id: string; + organizationSubscriptionId: string; + teamId: string; + stripePriceId: string; + tier: 'PRO'; + createdAt: string | null; + updatedAt: string | null; + organizationSubscription?: { + id: string; + organizationId: string; + stripeSubscriptionId: string; + stripeSubscriptionItems?: Array<{ + id: string; + price: string; + quantity: number; + }> | null; + status: 'trialing' | 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'unpaid' | 'paused'; + metadata?: unknown; + cancelAtPeriodEnd: boolean; + created: string | null; + currentPeriodStart: string | null; + currentPeriodEnd: string | null; + endedAt?: string | null; + cancelAt?: string | null; + canceledAt?: string | null; + trialStart?: string | null; + trialEnd?: string | null; + createdAt: string | null; + updatedAt: string | null; + } | null; + } | null; +}; + +export type TeamUpdateTeamData = { + id: string; + /** + * Body + */ + requestBody?: { + name?: string; + avatarUrl?: string | null; + }; }; -export type UploadCreateData = { +export type TeamUpdateTeamResponse = { + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; +}; + +export type TeamDeleteTeamData = { + id: string; +}; + +export type TeamDeleteTeamResponse = { + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; +}; + +export type TeamCreateTeamData = { /** * Body */ - formData?: { - file?: (Blob | File) | null; + requestBody?: { + name: string; + tier: 'FREE' | 'PRO'; + avatarUrl?: string | null; }; }; -export type UploadCreateResponse = { +export type TeamCreateTeamResponse = { + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; +}; + +export type SocialAccountConnectData = { + /** + * Body + */ + requestBody?: { + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'DISCORD' | 'SLACK'; + teamId: string; + redirectUrl: string; + }; +}; + +export type SocialAccountConnectResponse = { + /** + * OAuth URL - Redirect user to this URL to connect social account + */ + url: string; +}; + +export type SocialAccountDisconnectData = { + /** + * Body + */ + requestBody?: { + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'DISCORD' | 'SLACK'; + teamId: string; + }; +}; + +export type SocialAccountDisconnectResponse = { + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; +}; + +export type SocialAccountSetChannelData = { + /** + * Body + */ + requestBody?: { + type: 'FACEBOOK' | 'INSTAGRAM' | 'LINKEDIN' | 'YOUTUBE'; + teamId: string; + channelId: string; + }; +}; + +export type SocialAccountSetChannelResponse = { + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; +}; + +export type SocialAccountRefreshChannelsData = { + /** + * Body + */ + requestBody?: { + type: 'DISCORD' | 'SLACK' | 'REDDIT' | 'PINTEREST'; + teamId: string; + }; +}; + +export type SocialAccountRefreshChannelsResponse = { + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; +}; + +export type UploadGetListData = { + teamId: string; +}; + +export type UploadGetListResponse = Array<{ id: string; teamId: string; expiresAt?: string | null; @@ -129,9 +391,26 @@ export type UploadCreateResponse = { ext?: string | null; createdAt: string | null; updatedAt: string | null; + posts: Array<{ + postId: string; + uploadId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }>; +}>; + +export type UploadCreateData = { + /** + * Body + */ + formData?: { + teamId: string; + file?: (Blob | File) | null; + }; }; -export type UploadGetListResponse = Array<{ +export type UploadCreateResponse = { id: string; teamId: string; expiresAt?: string | null; @@ -150,14 +429,7 @@ export type UploadGetListResponse = Array<{ ext?: string | null; createdAt: string | null; updatedAt: string | null; - posts: Array<{ - postId: string; - uploadId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }>; -}>; +}; export type UploadDeleteManyData = { /** @@ -239,151 +511,11 @@ export type UploadDeleteResponse = { updatedAt: string | null; }; -export type PostCreateData = { - /** - * Body - */ - requestBody?: { - title: string; - postDate: string; - status: 'DRAFT' | 'SCHEDULED'; - socialAccountTypes: Array<('TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK')>; - data: { - TWITTER?: { - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - PINTEREST?: { - text?: string | null; - description?: string | null; - boardName: string; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the Pin will link to. - */ - link?: string | null; - /** - * The alt text for the image. This is used by screen readers and when the image can't be loaded. - */ - altText?: string | null; - /** - * A note about the Pin. This is not visible to the public. - */ - note?: string | null; - /** - * The dominant color of the image. This is used to display the image before it's loaded. - */ - dominantColor?: string | null; - } | null; - FACEBOOK?: { - type?: 'POST' | 'REEL' | 'STORY'; - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - INSTAGRAM?: { - type?: 'POST' | 'REEL' | 'STORY'; - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - TIKTOK?: { - text?: string | null; - uploadIds?: Array<(string)> | null; - privacy?: 'SELF_ONLY' | 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | null; - /** - * Set to true if the video is a paid partnership to promote a third-party business. - */ - isBrandContent?: boolean | null; - /** - * Set to true if this video is promoting the creator's own business. - */ - isOrganicBrandContent?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make comments on this post. - */ - disableComments?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make Stitches using this post. - */ - disableDuet?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make Duets using this post. - */ - disableStitch?: boolean | null; - } | null; - LINKEDIN?: { - text: string; - uploadIds?: Array<(string)> | null; - privacy?: 'CONNECTIONS' | 'PUBLIC' | 'LOGGED_IN' | 'CONTAINER' | null; - /** - * Set to true if the post shouldn't be displayed in the main feed. - */ - hideFromFeed?: boolean | null; - /** - * Set to true if the post is not allowed to be reshared. - */ - disableReshare?: boolean | null; - } | null; - YOUTUBE?: { - type?: 'VIDEO' | 'SHORT'; - uploadIds?: Array<(string)> | null; - text?: string | null; - description?: string | null; - privacy?: 'PRIVATE' | 'PUBLIC' | 'UNLISTED' | null; - /** - * Set to true if the video is made for kids. - */ - madeForKids?: boolean | null; - } | null; - REDDIT?: { - /** - * Subreddit name. Example: r/subredditName or u/username - */ - sr: string; - text: string; - description?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the post will link to. - */ - link?: string | null; - /** - * Set to true if the post is NSFW. - */ - nsfw?: boolean | null; - } | null; - DISCORD?: { - channelId: string; - text?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The username to display as the author of the message. - */ - username?: string | null; - /** - * Avatar url to display as the author of the message. - */ - avatarUrl?: string | null; - } | null; - SLACK?: { - channelId: string; - text?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The username to display as the author of the message. - */ - username?: string | null; - /** - * Avatar url to display as the author of the message. - */ - avatarUrl?: string | null; - } | null; - TELEGRAM?: unknown; - THREADS?: unknown; - }; - }; +export type PostGetData = { + id: string; }; -export type PostCreateResponse = { +export type PostGetResponse = { id: string; teamId: string; title: string; @@ -595,27 +727,78 @@ export type PostCreateResponse = { createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; + uploads: Array<{ + postId: string; + uploadId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + upload: { + id: string; + teamId: string; + expiresAt?: string | null; + iconUrl?: string | null; + thumbnailUrl?: string | null; + url?: string | null; + iconPath?: string | null; + thumbnailPath?: string | null; + path?: string | null; + type: 'image' | 'video'; + width?: number | null; + height?: number | null; + fileSize?: number | null; + videoLength?: number | null; + mime?: string | null; + ext?: string | null; + createdAt: string | null; + updatedAt: string | null; + }; + }>; + socialAccounts: Array<{ + postId: string; + socialAccountId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + socialAccount: { + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }; + }>; }; -export type PostGetListData = { - limit?: number | null; - offset?: number | null; - order?: 'ASC' | 'DESC' | null; - orderBy?: 'createdAt' | 'updatedAt' | 'postDate' | 'postedDate' | 'deletedAt' | null; - platforms?: Array<('TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK')> | null; - q?: string | null; - status?: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING' | null; -}; - -export type PostGetListResponse = { - items: Array<{ - id: string; - teamId: string; - title: string; - postDate: string | null; - postedDate?: string | null; - status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; - data: { +export type PostUpdateData = { + id: string; + /** + * Body + */ + requestBody?: { + title?: string; + postDate?: string; + status?: 'DRAFT' | 'SCHEDULED'; + socialAccountTypes?: Array<('TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK')>; + data?: { TWITTER?: { text?: string | null; uploadIds?: Array<(string)> | null; @@ -747,157 +930,20 @@ export type PostGetListResponse = { TELEGRAM?: unknown; THREADS?: unknown; }; - error?: string | null; - errors?: { - TWITTER?: string | null; - PINTEREST?: string | null; - FACEBOOK?: string | null; - INSTAGRAM?: string | null; - TIKTOK?: string | null; - LINKEDIN?: string | null; - REDDIT?: string | null; - DISCORD?: string | null; - SLACK?: string | null; - YOUTUBE?: string | null; - TELEGRAM?: string | null; - THREADS?: string | null; - } | null; - externalData?: { - TWITTER?: { - id?: string | null; - permalink?: string | null; - } | null; - PINTEREST?: { - id?: string | null; - permalink?: string | null; - } | null; - FACEBOOK?: { - id?: string | null; - postId?: string | null; - videoId?: string | null; - permalink?: string | null; - } | null; - INSTAGRAM?: { - id?: string | null; - permalink?: string | null; - } | null; - TIKTOK?: { - id?: string | null; - permalink?: string | null; - } | null; - LINKEDIN?: { - id?: string | null; - permalink?: string | null; - } | null; - REDDIT?: { - id?: string | null; - permalink?: string | null; - subreddit_name?: string | null; - } | null; - DISCORD?: { - id?: string | null; - permalink?: string | null; - channelId?: string | null; - } | null; - SLACK?: { - id?: string | null; - permalink?: string | null; - channelId?: string | null; - } | null; - YOUTUBE?: { - id?: string | null; - permalink?: string | null; - } | null; - TELEGRAM?: { - id?: string | null; - permalink?: string | null; - } | null; - THREADS?: { - id?: string | null; - permalink?: string | null; - } | null; - } | null; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - uploads: Array<{ - postId: string; - uploadId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - upload: { - id: string; - teamId: string; - expiresAt?: string | null; - iconUrl?: string | null; - thumbnailUrl?: string | null; - url?: string | null; - iconPath?: string | null; - thumbnailPath?: string | null; - path?: string | null; - type: 'image' | 'video'; - width?: number | null; - height?: number | null; - fileSize?: number | null; - videoLength?: number | null; - mime?: string | null; - ext?: string | null; - createdAt: string | null; - updatedAt: string | null; - }; - }>; - socialAccounts: Array<{ - postId: string; - socialAccountId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - socialAccount: { - id: string; - type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; - teamId: string; - username?: string | null; - displayName?: string | null; - externalId?: string | null; - userUsername?: string | null; - userDisplayName?: string | null; - userId?: string | null; - channels?: Array<{ - id: string; - name?: string | null; - username?: string | null; - webhook?: { - id?: string | null; - name?: string | null; - avatar?: string | null; - url?: string | null; - } | null; - }> | null; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }; - }>; - }>; - total: number; -}; - -export type PostGetData = { - id: string; -}; - -export type PostGetResponse = { - id: string; - teamId: string; - title: string; - postDate: string | null; - postedDate?: string | null; - status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; - data: { - TWITTER?: { - text?: string | null; - uploadIds?: Array<(string)> | null; + }; +}; + +export type PostUpdateResponse = { + id: string; + teamId: string; + title: string; + postDate: string | null; + postedDate?: string | null; + status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; + data: { + TWITTER?: { + text?: string | null; + uploadIds?: Array<(string)> | null; } | null; PINTEREST?: { text?: string | null; @@ -1099,213 +1145,13 @@ export type PostGetResponse = { createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; - uploads: Array<{ - postId: string; - uploadId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - upload: { - id: string; - teamId: string; - expiresAt?: string | null; - iconUrl?: string | null; - thumbnailUrl?: string | null; - url?: string | null; - iconPath?: string | null; - thumbnailPath?: string | null; - path?: string | null; - type: 'image' | 'video'; - width?: number | null; - height?: number | null; - fileSize?: number | null; - videoLength?: number | null; - mime?: string | null; - ext?: string | null; - createdAt: string | null; - updatedAt: string | null; - }; - }>; - socialAccounts: Array<{ - postId: string; - socialAccountId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - socialAccount: { - id: string; - type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; - teamId: string; - username?: string | null; - displayName?: string | null; - externalId?: string | null; - userUsername?: string | null; - userDisplayName?: string | null; - userId?: string | null; - channels?: Array<{ - id: string; - name?: string | null; - username?: string | null; - webhook?: { - id?: string | null; - name?: string | null; - avatar?: string | null; - url?: string | null; - } | null; - }> | null; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }; - }>; }; -export type PostUpdateData = { +export type PostDeleteData = { id: string; - /** - * Body - */ - requestBody?: { - title?: string; - postDate?: string; - status?: 'DRAFT' | 'SCHEDULED'; - socialAccountTypes?: Array<('TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK')>; - data?: { - TWITTER?: { - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - PINTEREST?: { - text?: string | null; - description?: string | null; - boardName: string; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the Pin will link to. - */ - link?: string | null; - /** - * The alt text for the image. This is used by screen readers and when the image can't be loaded. - */ - altText?: string | null; - /** - * A note about the Pin. This is not visible to the public. - */ - note?: string | null; - /** - * The dominant color of the image. This is used to display the image before it's loaded. - */ - dominantColor?: string | null; - } | null; - FACEBOOK?: { - type?: 'POST' | 'REEL' | 'STORY'; - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - INSTAGRAM?: { - type?: 'POST' | 'REEL' | 'STORY'; - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - TIKTOK?: { - text?: string | null; - uploadIds?: Array<(string)> | null; - privacy?: 'SELF_ONLY' | 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | null; - /** - * Set to true if the video is a paid partnership to promote a third-party business. - */ - isBrandContent?: boolean | null; - /** - * Set to true if this video is promoting the creator's own business. - */ - isOrganicBrandContent?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make comments on this post. - */ - disableComments?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make Stitches using this post. - */ - disableDuet?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make Duets using this post. - */ - disableStitch?: boolean | null; - } | null; - LINKEDIN?: { - text: string; - uploadIds?: Array<(string)> | null; - privacy?: 'CONNECTIONS' | 'PUBLIC' | 'LOGGED_IN' | 'CONTAINER' | null; - /** - * Set to true if the post shouldn't be displayed in the main feed. - */ - hideFromFeed?: boolean | null; - /** - * Set to true if the post is not allowed to be reshared. - */ - disableReshare?: boolean | null; - } | null; - YOUTUBE?: { - type?: 'VIDEO' | 'SHORT'; - uploadIds?: Array<(string)> | null; - text?: string | null; - description?: string | null; - privacy?: 'PRIVATE' | 'PUBLIC' | 'UNLISTED' | null; - /** - * Set to true if the video is made for kids. - */ - madeForKids?: boolean | null; - } | null; - REDDIT?: { - /** - * Subreddit name. Example: r/subredditName or u/username - */ - sr: string; - text: string; - description?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the post will link to. - */ - link?: string | null; - /** - * Set to true if the post is NSFW. - */ - nsfw?: boolean | null; - } | null; - DISCORD?: { - channelId: string; - text?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The username to display as the author of the message. - */ - username?: string | null; - /** - * Avatar url to display as the author of the message. - */ - avatarUrl?: string | null; - } | null; - SLACK?: { - channelId: string; - text?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The username to display as the author of the message. - */ - username?: string | null; - /** - * Avatar url to display as the author of the message. - */ - avatarUrl?: string | null; - } | null; - TELEGRAM?: unknown; - THREADS?: unknown; - }; - }; }; -export type PostUpdateResponse = { +export type PostDeleteResponse = { id: string; teamId: string; title: string; @@ -1519,42 +1365,470 @@ export type PostUpdateResponse = { deletedAt?: string | null; }; -export type PostDeleteData = { - id: string; +export type PostGetListData = { + limit?: number | null; + offset?: number | null; + order?: 'ASC' | 'DESC' | null; + orderBy?: 'createdAt' | 'updatedAt' | 'postDate' | 'postedDate' | 'deletedAt' | null; + platforms?: Array<('TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK')> | null; + q?: string | null; + status?: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING' | null; + teamId: string; }; -export type PostDeleteResponse = { - id: string; - teamId: string; - title: string; - postDate: string | null; - postedDate?: string | null; - status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; - data: { - TWITTER?: { - text?: string | null; - uploadIds?: Array<(string)> | null; +export type PostGetListResponse = { + items: Array<{ + id: string; + teamId: string; + title: string; + postDate: string | null; + postedDate?: string | null; + status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; + data: { + TWITTER?: { + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + PINTEREST?: { + text?: string | null; + description?: string | null; + boardName: string; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the Pin will link to. + */ + link?: string | null; + /** + * The alt text for the image. This is used by screen readers and when the image can't be loaded. + */ + altText?: string | null; + /** + * A note about the Pin. This is not visible to the public. + */ + note?: string | null; + /** + * The dominant color of the image. This is used to display the image before it's loaded. + */ + dominantColor?: string | null; + } | null; + FACEBOOK?: { + type?: 'POST' | 'REEL' | 'STORY'; + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + INSTAGRAM?: { + type?: 'POST' | 'REEL' | 'STORY'; + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + TIKTOK?: { + text?: string | null; + uploadIds?: Array<(string)> | null; + privacy?: 'SELF_ONLY' | 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | null; + /** + * Set to true if the video is a paid partnership to promote a third-party business. + */ + isBrandContent?: boolean | null; + /** + * Set to true if this video is promoting the creator's own business. + */ + isOrganicBrandContent?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make comments on this post. + */ + disableComments?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make Stitches using this post. + */ + disableDuet?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make Duets using this post. + */ + disableStitch?: boolean | null; + } | null; + LINKEDIN?: { + text: string; + uploadIds?: Array<(string)> | null; + privacy?: 'CONNECTIONS' | 'PUBLIC' | 'LOGGED_IN' | 'CONTAINER' | null; + /** + * Set to true if the post shouldn't be displayed in the main feed. + */ + hideFromFeed?: boolean | null; + /** + * Set to true if the post is not allowed to be reshared. + */ + disableReshare?: boolean | null; + } | null; + YOUTUBE?: { + type?: 'VIDEO' | 'SHORT'; + uploadIds?: Array<(string)> | null; + text?: string | null; + description?: string | null; + privacy?: 'PRIVATE' | 'PUBLIC' | 'UNLISTED' | null; + /** + * Set to true if the video is made for kids. + */ + madeForKids?: boolean | null; + } | null; + REDDIT?: { + /** + * Subreddit name. Example: r/subredditName or u/username + */ + sr: string; + text: string; + description?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the post will link to. + */ + link?: string | null; + /** + * Set to true if the post is NSFW. + */ + nsfw?: boolean | null; + } | null; + DISCORD?: { + channelId: string; + text?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The username to display as the author of the message. + */ + username?: string | null; + /** + * Avatar url to display as the author of the message. + */ + avatarUrl?: string | null; + } | null; + SLACK?: { + channelId: string; + text?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The username to display as the author of the message. + */ + username?: string | null; + /** + * Avatar url to display as the author of the message. + */ + avatarUrl?: string | null; + } | null; + TELEGRAM?: unknown; + THREADS?: unknown; + }; + error?: string | null; + errors?: { + TWITTER?: string | null; + PINTEREST?: string | null; + FACEBOOK?: string | null; + INSTAGRAM?: string | null; + TIKTOK?: string | null; + LINKEDIN?: string | null; + REDDIT?: string | null; + DISCORD?: string | null; + SLACK?: string | null; + YOUTUBE?: string | null; + TELEGRAM?: string | null; + THREADS?: string | null; } | null; - PINTEREST?: { - text?: string | null; - description?: string | null; - boardName: string; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the Pin will link to. - */ - link?: string | null; - /** - * The alt text for the image. This is used by screen readers and when the image can't be loaded. - */ - altText?: string | null; - /** - * A note about the Pin. This is not visible to the public. - */ - note?: string | null; - /** - * The dominant color of the image. This is used to display the image before it's loaded. - */ + externalData?: { + TWITTER?: { + id?: string | null; + permalink?: string | null; + } | null; + PINTEREST?: { + id?: string | null; + permalink?: string | null; + } | null; + FACEBOOK?: { + id?: string | null; + postId?: string | null; + videoId?: string | null; + permalink?: string | null; + } | null; + INSTAGRAM?: { + id?: string | null; + permalink?: string | null; + } | null; + TIKTOK?: { + id?: string | null; + permalink?: string | null; + } | null; + LINKEDIN?: { + id?: string | null; + permalink?: string | null; + } | null; + REDDIT?: { + id?: string | null; + permalink?: string | null; + subreddit_name?: string | null; + } | null; + DISCORD?: { + id?: string | null; + permalink?: string | null; + channelId?: string | null; + } | null; + SLACK?: { + id?: string | null; + permalink?: string | null; + channelId?: string | null; + } | null; + YOUTUBE?: { + id?: string | null; + permalink?: string | null; + } | null; + TELEGRAM?: { + id?: string | null; + permalink?: string | null; + } | null; + THREADS?: { + id?: string | null; + permalink?: string | null; + } | null; + } | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + uploads: Array<{ + postId: string; + uploadId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + upload: { + id: string; + teamId: string; + expiresAt?: string | null; + iconUrl?: string | null; + thumbnailUrl?: string | null; + url?: string | null; + iconPath?: string | null; + thumbnailPath?: string | null; + path?: string | null; + type: 'image' | 'video'; + width?: number | null; + height?: number | null; + fileSize?: number | null; + videoLength?: number | null; + mime?: string | null; + ext?: string | null; + createdAt: string | null; + updatedAt: string | null; + }; + }>; + socialAccounts: Array<{ + postId: string; + socialAccountId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + socialAccount: { + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }; + }>; + }>; + total: number; +}; + +export type PostCreateData = { + /** + * Body + */ + requestBody?: { + teamId: string; + title: string; + postDate: string; + status: 'DRAFT' | 'SCHEDULED'; + socialAccountTypes: Array<('TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK')>; + data: { + TWITTER?: { + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + PINTEREST?: { + text?: string | null; + description?: string | null; + boardName: string; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the Pin will link to. + */ + link?: string | null; + /** + * The alt text for the image. This is used by screen readers and when the image can't be loaded. + */ + altText?: string | null; + /** + * A note about the Pin. This is not visible to the public. + */ + note?: string | null; + /** + * The dominant color of the image. This is used to display the image before it's loaded. + */ + dominantColor?: string | null; + } | null; + FACEBOOK?: { + type?: 'POST' | 'REEL' | 'STORY'; + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + INSTAGRAM?: { + type?: 'POST' | 'REEL' | 'STORY'; + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + TIKTOK?: { + text?: string | null; + uploadIds?: Array<(string)> | null; + privacy?: 'SELF_ONLY' | 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | null; + /** + * Set to true if the video is a paid partnership to promote a third-party business. + */ + isBrandContent?: boolean | null; + /** + * Set to true if this video is promoting the creator's own business. + */ + isOrganicBrandContent?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make comments on this post. + */ + disableComments?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make Stitches using this post. + */ + disableDuet?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make Duets using this post. + */ + disableStitch?: boolean | null; + } | null; + LINKEDIN?: { + text: string; + uploadIds?: Array<(string)> | null; + privacy?: 'CONNECTIONS' | 'PUBLIC' | 'LOGGED_IN' | 'CONTAINER' | null; + /** + * Set to true if the post shouldn't be displayed in the main feed. + */ + hideFromFeed?: boolean | null; + /** + * Set to true if the post is not allowed to be reshared. + */ + disableReshare?: boolean | null; + } | null; + YOUTUBE?: { + type?: 'VIDEO' | 'SHORT'; + uploadIds?: Array<(string)> | null; + text?: string | null; + description?: string | null; + privacy?: 'PRIVATE' | 'PUBLIC' | 'UNLISTED' | null; + /** + * Set to true if the video is made for kids. + */ + madeForKids?: boolean | null; + } | null; + REDDIT?: { + /** + * Subreddit name. Example: r/subredditName or u/username + */ + sr: string; + text: string; + description?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the post will link to. + */ + link?: string | null; + /** + * Set to true if the post is NSFW. + */ + nsfw?: boolean | null; + } | null; + DISCORD?: { + channelId: string; + text?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The username to display as the author of the message. + */ + username?: string | null; + /** + * Avatar url to display as the author of the message. + */ + avatarUrl?: string | null; + } | null; + SLACK?: { + channelId: string; + text?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The username to display as the author of the message. + */ + username?: string | null; + /** + * Avatar url to display as the author of the message. + */ + avatarUrl?: string | null; + } | null; + TELEGRAM?: unknown; + THREADS?: unknown; + }; + }; +}; + +export type PostCreateResponse = { + id: string; + teamId: string; + title: string; + postDate: string | null; + postedDate?: string | null; + status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; + data: { + TWITTER?: { + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + PINTEREST?: { + text?: string | null; + description?: string | null; + boardName: string; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the Pin will link to. + */ + link?: string | null; + /** + * The alt text for the image. This is used by screen readers and when the image can't be loaded. + */ + altText?: string | null; + /** + * A note about the Pin. This is not visible to the public. + */ + note?: string | null; + /** + * The dominant color of the image. This is used to display the image before it's loaded. + */ dominantColor?: string | null; } | null; FACEBOOK?: { @@ -1662,91 +1936,477 @@ export type PostDeleteResponse = { TELEGRAM?: unknown; THREADS?: unknown; }; - error?: string | null; - errors?: { - TWITTER?: string | null; - PINTEREST?: string | null; - FACEBOOK?: string | null; - INSTAGRAM?: string | null; - TIKTOK?: string | null; - LINKEDIN?: string | null; - REDDIT?: string | null; - DISCORD?: string | null; - SLACK?: string | null; - YOUTUBE?: string | null; - TELEGRAM?: string | null; - THREADS?: string | null; - } | null; - externalData?: { - TWITTER?: { - id?: string | null; - permalink?: string | null; - } | null; - PINTEREST?: { - id?: string | null; - permalink?: string | null; - } | null; - FACEBOOK?: { - id?: string | null; - postId?: string | null; - videoId?: string | null; - permalink?: string | null; - } | null; - INSTAGRAM?: { - id?: string | null; - permalink?: string | null; - } | null; - TIKTOK?: { - id?: string | null; - permalink?: string | null; - } | null; - LINKEDIN?: { - id?: string | null; - permalink?: string | null; - } | null; - REDDIT?: { - id?: string | null; - permalink?: string | null; - subreddit_name?: string | null; - } | null; - DISCORD?: { - id?: string | null; - permalink?: string | null; - channelId?: string | null; - } | null; - SLACK?: { - id?: string | null; - permalink?: string | null; - channelId?: string | null; - } | null; - YOUTUBE?: { - id?: string | null; - permalink?: string | null; - } | null; - TELEGRAM?: { - id?: string | null; - permalink?: string | null; - } | null; - THREADS?: { - id?: string | null; - permalink?: string | null; - } | null; - } | null; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; -}; - -export type $OpenApiTs = { - '/api/v1/': { + error?: string | null; + errors?: { + TWITTER?: string | null; + PINTEREST?: string | null; + FACEBOOK?: string | null; + INSTAGRAM?: string | null; + TIKTOK?: string | null; + LINKEDIN?: string | null; + REDDIT?: string | null; + DISCORD?: string | null; + SLACK?: string | null; + YOUTUBE?: string | null; + TELEGRAM?: string | null; + THREADS?: string | null; + } | null; + externalData?: { + TWITTER?: { + id?: string | null; + permalink?: string | null; + } | null; + PINTEREST?: { + id?: string | null; + permalink?: string | null; + } | null; + FACEBOOK?: { + id?: string | null; + postId?: string | null; + videoId?: string | null; + permalink?: string | null; + } | null; + INSTAGRAM?: { + id?: string | null; + permalink?: string | null; + } | null; + TIKTOK?: { + id?: string | null; + permalink?: string | null; + } | null; + LINKEDIN?: { + id?: string | null; + permalink?: string | null; + } | null; + REDDIT?: { + id?: string | null; + permalink?: string | null; + subreddit_name?: string | null; + } | null; + DISCORD?: { + id?: string | null; + permalink?: string | null; + channelId?: string | null; + } | null; + SLACK?: { + id?: string | null; + permalink?: string | null; + channelId?: string | null; + } | null; + YOUTUBE?: { + id?: string | null; + permalink?: string | null; + } | null; + TELEGRAM?: { + id?: string | null; + permalink?: string | null; + } | null; + THREADS?: { + id?: string | null; + permalink?: string | null; + } | null; + } | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; +}; + +export type $OpenApiTs = { + '/api/v1/': { + get: { + res: { + /** + * 200 + */ + 200: { + status: string; + createdAt: string; + }; + /** + * 400 + */ + 400: { + message: string; + issues?: Array<{ + message: string; + path?: Array<(string | number)> | null; + }> | null; + }; + /** + * 401 + */ + 401: { + message: string; + }; + /** + * 403 + */ + 403: { + message: string; + }; + /** + * 404 + */ + 404: { + message: string; + }; + /** + * 429 + */ + 429: { + message: string; + }; + /** + * 500 + */ + 500: { + message: string; + }; + }; + }; + }; + '/api/v1/organization/': { + get: { + res: { + /** + * 200 + */ + 200: { + id: string; + createdById: string; + name?: string | null; + avatarUrl?: string | null; + defaultPaymentMethodFilled?: boolean; + billingAddressFilled?: boolean; + apiAccess?: boolean; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + teams: Array<{ + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }>; + createdBy: { + id: string; + externalId: string; + email: string; + emailVerified?: string | null; + firstName?: string | null; + lastName?: string | null; + avatarUrl?: string | null; + role: 'ADMIN' | 'CUSTOMER'; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }; + organizationSubscription?: { + id: string; + organizationId: string; + stripeSubscriptionId: string; + stripeSubscriptionItems?: Array<{ + id: string; + price: string; + quantity: number; + }> | null; + status: 'trialing' | 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'unpaid' | 'paused'; + metadata?: unknown; + cancelAtPeriodEnd: boolean; + created: string | null; + currentPeriodStart: string | null; + currentPeriodEnd: string | null; + endedAt?: string | null; + cancelAt?: string | null; + canceledAt?: string | null; + trialStart?: string | null; + trialEnd?: string | null; + createdAt: string | null; + updatedAt: string | null; + teamPlan?: { + id: string; + organizationSubscriptionId: string; + teamId: string; + stripePriceId: string; + tier: 'PRO'; + createdAt: string | null; + updatedAt: string | null; + } | null; + } | null; + }; + /** + * 400 + */ + 400: { + message: string; + issues?: Array<{ + message: string; + path?: Array<(string | number)> | null; + }> | null; + }; + /** + * 401 + */ + 401: { + message: string; + }; + /** + * 403 + */ + 403: { + message: string; + }; + /** + * 404 + */ + 404: { + message: string; + }; + /** + * 429 + */ + 429: { + message: string; + }; + /** + * 500 + */ + 500: { + message: string; + }; + }; + }; + }; + '/api/v1/team/{id}': { get: { + req: TeamGetTeamData; + res: { + /** + * 200 + */ + 200: { + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + organization: { + id: string; + createdById: string; + name?: string | null; + avatarUrl?: string | null; + defaultPaymentMethodFilled?: boolean; + billingAddressFilled?: boolean; + apiAccess?: boolean; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }; + createdBy: { + id: string; + externalId: string; + email: string; + emailVerified?: string | null; + firstName?: string | null; + lastName?: string | null; + avatarUrl?: string | null; + role: 'ADMIN' | 'CUSTOMER'; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }; + bots: Array<{ + id: string; + name: string; + avatarUrl?: string | null; + teamId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }>; + socialAccounts: Array<{ + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }>; + usage: { + monthlyPosts: number; + }; + teamPlan?: { + id: string; + organizationSubscriptionId: string; + teamId: string; + stripePriceId: string; + tier: 'PRO'; + createdAt: string | null; + updatedAt: string | null; + organizationSubscription?: { + id: string; + organizationId: string; + stripeSubscriptionId: string; + stripeSubscriptionItems?: Array<{ + id: string; + price: string; + quantity: number; + }> | null; + status: 'trialing' | 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'unpaid' | 'paused'; + metadata?: unknown; + cancelAtPeriodEnd: boolean; + created: string | null; + currentPeriodStart: string | null; + currentPeriodEnd: string | null; + endedAt?: string | null; + cancelAt?: string | null; + canceledAt?: string | null; + trialStart?: string | null; + trialEnd?: string | null; + createdAt: string | null; + updatedAt: string | null; + } | null; + } | null; + }; + /** + * 400 + */ + 400: { + message: string; + issues?: Array<{ + message: string; + path?: Array<(string | number)> | null; + }> | null; + }; + /** + * 401 + */ + 401: { + message: string; + }; + /** + * 403 + */ + 403: { + message: string; + }; + /** + * 404 + */ + 404: { + message: string; + }; + /** + * 429 + */ + 429: { + message: string; + }; + /** + * 500 + */ + 500: { + message: string; + }; + }; + }; + patch: { + req: TeamUpdateTeamData; + res: { + /** + * 200 + */ + 200: { + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }; + /** + * 400 + */ + 400: { + message: string; + issues?: Array<{ + message: string; + path?: Array<(string | number)> | null; + }> | null; + }; + /** + * 401 + */ + 401: { + message: string; + }; + /** + * 403 + */ + 403: { + message: string; + }; + /** + * 404 + */ + 404: { + message: string; + }; + /** + * 429 + */ + 429: { + message: string; + }; + /** + * 500 + */ + 500: { + message: string; + }; + }; + }; + delete: { + req: TeamDeleteTeamData; res: { /** * 200 */ 200: { - status: string; - createdAt: string; + id: string; + name: string; + avatarUrl?: string | null; + organizationId: string; + createdById: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; }; /** * 400 @@ -1792,7 +2452,8 @@ export type $OpenApiTs = { }; }; '/api/v1/team/': { - get: { + post: { + req: TeamCreateTeamData; res: { /** * 200 @@ -1801,96 +2462,142 @@ export type $OpenApiTs = { id: string; name: string; avatarUrl?: string | null; + organizationId: string; createdById: string; createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; - users: Array<{ - userId: string; - teamId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - user: { - id: string; - externalId: string; - email: string; - emailVerified?: string | null; - firstName?: string | null; - lastName?: string | null; - avatarUrl?: string | null; - role: 'ADMIN' | 'CUSTOMER'; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }; - }>; - createdBy: { - id: string; - externalId: string; - email: string; - emailVerified?: string | null; - firstName?: string | null; - lastName?: string | null; - avatarUrl?: string | null; - role: 'ADMIN' | 'CUSTOMER'; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }; - invitations: Array<{ - id: string; - email: string; - teamId: string; - createdById: string; - createdAt: string | null; - updatedAt: string | null; - }>; - bots: Array<{ - id: string; - name: string; - avatarUrl?: string | null; - teamId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }>; - webhooks: Array<{ - id: string; - teamId: string; - url: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }>; - socialAccounts: Array<{ + }; + /** + * 400 + */ + 400: { + message: string; + issues?: Array<{ + message: string; + path?: Array<(string | number)> | null; + }> | null; + }; + /** + * 401 + */ + 401: { + message: string; + }; + /** + * 403 + */ + 403: { + message: string; + }; + /** + * 404 + */ + 404: { + message: string; + }; + /** + * 429 + */ + 429: { + message: string; + }; + /** + * 500 + */ + 500: { + message: string; + }; + }; + }; + }; + '/api/v1/social-account/connect': { + post: { + req: SocialAccountConnectData; + res: { + /** + * 200 + */ + 200: { + /** + * OAuth URL - Redirect user to this URL to connect social account + */ + url: string; + }; + /** + * 400 + */ + 400: { + message: string; + issues?: Array<{ + message: string; + path?: Array<(string | number)> | null; + }> | null; + }; + /** + * 401 + */ + 401: { + message: string; + }; + /** + * 403 + */ + 403: { + message: string; + }; + /** + * 404 + */ + 404: { + message: string; + }; + /** + * 429 + */ + 429: { + message: string; + }; + /** + * 500 + */ + 500: { + message: string; + }; + }; + }; + }; + '/api/v1/social-account/disconnect': { + delete: { + req: SocialAccountDisconnectData; + res: { + /** + * 200 + */ + 200: { + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ id: string; - type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; - teamId: string; + name?: string | null; username?: string | null; - displayName?: string | null; - externalId?: string | null; - userUsername?: string | null; - userDisplayName?: string | null; - userId?: string | null; - channels?: Array<{ - id: string; + webhook?: { + id?: string | null; name?: string | null; - username?: string | null; - webhook?: { - id?: string | null; - name?: string | null; - avatar?: string | null; - url?: string | null; - } | null; - }> | null; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }>; - usage: { - monthlyPosts: number; - }; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; }; /** * 400 @@ -1935,32 +2642,37 @@ export type $OpenApiTs = { }; }; }; - '/api/v1/upload/': { + '/api/v1/social-account/set-channel': { post: { - req: UploadCreateData; + req: SocialAccountSetChannelData; res: { /** * 200 */ 200: { id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; teamId: string; - expiresAt?: string | null; - iconUrl?: string | null; - thumbnailUrl?: string | null; - url?: string | null; - iconPath?: string | null; - thumbnailPath?: string | null; - path?: string | null; - type: 'image' | 'video'; - width?: number | null; - height?: number | null; - fileSize?: number | null; - videoLength?: number | null; - mime?: string | null; - ext?: string | null; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; createdAt: string | null; updatedAt: string | null; + deletedAt?: string | null; }; /** * 400 @@ -2004,38 +2716,39 @@ export type $OpenApiTs = { }; }; }; - get: { + }; + '/api/v1/social-account/refresh-channels': { + post: { + req: SocialAccountRefreshChannelsData; res: { /** * 200 */ - 200: Array<{ + 200: { id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; teamId: string; - expiresAt?: string | null; - iconUrl?: string | null; - thumbnailUrl?: string | null; - url?: string | null; - iconPath?: string | null; - thumbnailPath?: string | null; - path?: string | null; - type: 'image' | 'video'; - width?: number | null; - height?: number | null; - fileSize?: number | null; - videoLength?: number | null; - mime?: string | null; - ext?: string | null; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; createdAt: string | null; updatedAt: string | null; - posts: Array<{ - postId: string; - uploadId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }>; - }>; + deletedAt?: string | null; + }; /** * 400 */ @@ -2078,8 +2791,10 @@ export type $OpenApiTs = { }; }; }; - delete: { - req: UploadDeleteManyData; + }; + '/api/v1/upload/': { + get: { + req: UploadGetListData; res: { /** * 200 @@ -2103,6 +2818,13 @@ export type $OpenApiTs = { ext?: string | null; createdAt: string | null; updatedAt: string | null; + posts: Array<{ + postId: string; + uploadId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }>; }>; /** * 400 @@ -2146,10 +2868,8 @@ export type $OpenApiTs = { }; }; }; - }; - '/api/v1/upload/{id}': { - get: { - req: UploadGetData; + post: { + req: UploadCreateData; res: { /** * 200 @@ -2217,12 +2937,12 @@ export type $OpenApiTs = { }; }; delete: { - req: UploadDeleteData; + req: UploadDeleteManyData; res: { /** * 200 */ - 200: { + 200: Array<{ id: string; teamId: string; expiresAt?: string | null; @@ -2241,7 +2961,7 @@ export type $OpenApiTs = { ext?: string | null; createdAt: string | null; updatedAt: string | null; - }; + }>; /** * 400 */ @@ -2285,225 +3005,100 @@ export type $OpenApiTs = { }; }; }; - '/api/v1/post/': { - post: { - req: PostCreateData; - res: { - /** - * 200 - */ - 200: { - id: string; - teamId: string; - title: string; - postDate: string | null; - postedDate?: string | null; - status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; - data: { - TWITTER?: { - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - PINTEREST?: { - text?: string | null; - description?: string | null; - boardName: string; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the Pin will link to. - */ - link?: string | null; - /** - * The alt text for the image. This is used by screen readers and when the image can't be loaded. - */ - altText?: string | null; - /** - * A note about the Pin. This is not visible to the public. - */ - note?: string | null; - /** - * The dominant color of the image. This is used to display the image before it's loaded. - */ - dominantColor?: string | null; - } | null; - FACEBOOK?: { - type?: 'POST' | 'REEL' | 'STORY'; - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - INSTAGRAM?: { - type?: 'POST' | 'REEL' | 'STORY'; - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - TIKTOK?: { - text?: string | null; - uploadIds?: Array<(string)> | null; - privacy?: 'SELF_ONLY' | 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | null; - /** - * Set to true if the video is a paid partnership to promote a third-party business. - */ - isBrandContent?: boolean | null; - /** - * Set to true if this video is promoting the creator's own business. - */ - isOrganicBrandContent?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make comments on this post. - */ - disableComments?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make Stitches using this post. - */ - disableDuet?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make Duets using this post. - */ - disableStitch?: boolean | null; - } | null; - LINKEDIN?: { - text: string; - uploadIds?: Array<(string)> | null; - privacy?: 'CONNECTIONS' | 'PUBLIC' | 'LOGGED_IN' | 'CONTAINER' | null; - /** - * Set to true if the post shouldn't be displayed in the main feed. - */ - hideFromFeed?: boolean | null; - /** - * Set to true if the post is not allowed to be reshared. - */ - disableReshare?: boolean | null; - } | null; - YOUTUBE?: { - type?: 'VIDEO' | 'SHORT'; - uploadIds?: Array<(string)> | null; - text?: string | null; - description?: string | null; - privacy?: 'PRIVATE' | 'PUBLIC' | 'UNLISTED' | null; - /** - * Set to true if the video is made for kids. - */ - madeForKids?: boolean | null; - } | null; - REDDIT?: { - /** - * Subreddit name. Example: r/subredditName or u/username - */ - sr: string; - text: string; - description?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the post will link to. - */ - link?: string | null; - /** - * Set to true if the post is NSFW. - */ - nsfw?: boolean | null; - } | null; - DISCORD?: { - channelId: string; - text?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The username to display as the author of the message. - */ - username?: string | null; - /** - * Avatar url to display as the author of the message. - */ - avatarUrl?: string | null; - } | null; - SLACK?: { - channelId: string; - text?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The username to display as the author of the message. - */ - username?: string | null; - /** - * Avatar url to display as the author of the message. - */ - avatarUrl?: string | null; - } | null; - TELEGRAM?: unknown; - THREADS?: unknown; - }; - error?: string | null; - errors?: { - TWITTER?: string | null; - PINTEREST?: string | null; - FACEBOOK?: string | null; - INSTAGRAM?: string | null; - TIKTOK?: string | null; - LINKEDIN?: string | null; - REDDIT?: string | null; - DISCORD?: string | null; - SLACK?: string | null; - YOUTUBE?: string | null; - TELEGRAM?: string | null; - THREADS?: string | null; - } | null; - externalData?: { - TWITTER?: { - id?: string | null; - permalink?: string | null; - } | null; - PINTEREST?: { - id?: string | null; - permalink?: string | null; - } | null; - FACEBOOK?: { - id?: string | null; - postId?: string | null; - videoId?: string | null; - permalink?: string | null; - } | null; - INSTAGRAM?: { - id?: string | null; - permalink?: string | null; - } | null; - TIKTOK?: { - id?: string | null; - permalink?: string | null; - } | null; - LINKEDIN?: { - id?: string | null; - permalink?: string | null; - } | null; - REDDIT?: { - id?: string | null; - permalink?: string | null; - subreddit_name?: string | null; - } | null; - DISCORD?: { - id?: string | null; - permalink?: string | null; - channelId?: string | null; - } | null; - SLACK?: { - id?: string | null; - permalink?: string | null; - channelId?: string | null; - } | null; - YOUTUBE?: { - id?: string | null; - permalink?: string | null; - } | null; - TELEGRAM?: { - id?: string | null; - permalink?: string | null; - } | null; - THREADS?: { - id?: string | null; - permalink?: string | null; - } | null; - } | null; + '/api/v1/upload/{id}': { + get: { + req: UploadGetData; + res: { + /** + * 200 + */ + 200: { + id: string; + teamId: string; + expiresAt?: string | null; + iconUrl?: string | null; + thumbnailUrl?: string | null; + url?: string | null; + iconPath?: string | null; + thumbnailPath?: string | null; + path?: string | null; + type: 'image' | 'video'; + width?: number | null; + height?: number | null; + fileSize?: number | null; + videoLength?: number | null; + mime?: string | null; + ext?: string | null; + createdAt: string | null; + updatedAt: string | null; + }; + /** + * 400 + */ + 400: { + message: string; + issues?: Array<{ + message: string; + path?: Array<(string | number)> | null; + }> | null; + }; + /** + * 401 + */ + 401: { + message: string; + }; + /** + * 403 + */ + 403: { + message: string; + }; + /** + * 404 + */ + 404: { + message: string; + }; + /** + * 429 + */ + 429: { + message: string; + }; + /** + * 500 + */ + 500: { + message: string; + }; + }; + }; + delete: { + req: UploadDeleteData; + res: { + /** + * 200 + */ + 200: { + id: string; + teamId: string; + expiresAt?: string | null; + iconUrl?: string | null; + thumbnailUrl?: string | null; + url?: string | null; + iconPath?: string | null; + thumbnailPath?: string | null; + path?: string | null; + type: 'image' | 'video'; + width?: number | null; + height?: number | null; + fileSize?: number | null; + videoLength?: number | null; + mime?: string | null; + ext?: string | null; createdAt: string | null; updatedAt: string | null; - deletedAt?: string | null; }; /** * 400 @@ -2547,286 +3142,285 @@ export type $OpenApiTs = { }; }; }; + }; + '/api/v1/post/{id}': { get: { - req: PostGetListData; + req: PostGetData; res: { /** * 200 */ 200: { - items: Array<{ - id: string; - teamId: string; - title: string; - postDate: string | null; - postedDate?: string | null; - status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; - data: { - TWITTER?: { - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - PINTEREST?: { - text?: string | null; - description?: string | null; - boardName: string; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the Pin will link to. - */ - link?: string | null; - /** - * The alt text for the image. This is used by screen readers and when the image can't be loaded. - */ - altText?: string | null; - /** - * A note about the Pin. This is not visible to the public. - */ - note?: string | null; - /** - * The dominant color of the image. This is used to display the image before it's loaded. - */ - dominantColor?: string | null; - } | null; - FACEBOOK?: { - type?: 'POST' | 'REEL' | 'STORY'; - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - INSTAGRAM?: { - type?: 'POST' | 'REEL' | 'STORY'; - text?: string | null; - uploadIds?: Array<(string)> | null; - } | null; - TIKTOK?: { - text?: string | null; - uploadIds?: Array<(string)> | null; - privacy?: 'SELF_ONLY' | 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | null; - /** - * Set to true if the video is a paid partnership to promote a third-party business. - */ - isBrandContent?: boolean | null; - /** - * Set to true if this video is promoting the creator's own business. - */ - isOrganicBrandContent?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make comments on this post. - */ - disableComments?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make Stitches using this post. - */ - disableDuet?: boolean | null; - /** - * If set to true, other TikTok users will not be allowed to make Duets using this post. - */ - disableStitch?: boolean | null; - } | null; - LINKEDIN?: { - text: string; - uploadIds?: Array<(string)> | null; - privacy?: 'CONNECTIONS' | 'PUBLIC' | 'LOGGED_IN' | 'CONTAINER' | null; - /** - * Set to true if the post shouldn't be displayed in the main feed. - */ - hideFromFeed?: boolean | null; - /** - * Set to true if the post is not allowed to be reshared. - */ - disableReshare?: boolean | null; - } | null; - YOUTUBE?: { - type?: 'VIDEO' | 'SHORT'; - uploadIds?: Array<(string)> | null; - text?: string | null; - description?: string | null; - privacy?: 'PRIVATE' | 'PUBLIC' | 'UNLISTED' | null; - /** - * Set to true if the video is made for kids. - */ - madeForKids?: boolean | null; - } | null; - REDDIT?: { - /** - * Subreddit name. Example: r/subredditName or u/username - */ - sr: string; - text: string; - description?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The URL to which the post will link to. - */ - link?: string | null; - /** - * Set to true if the post is NSFW. - */ - nsfw?: boolean | null; - } | null; - DISCORD?: { - channelId: string; - text?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The username to display as the author of the message. - */ - username?: string | null; - /** - * Avatar url to display as the author of the message. - */ - avatarUrl?: string | null; - } | null; - SLACK?: { - channelId: string; - text?: string | null; - uploadIds?: Array<(string)> | null; - /** - * The username to display as the author of the message. - */ - username?: string | null; - /** - * Avatar url to display as the author of the message. - */ - avatarUrl?: string | null; - } | null; - TELEGRAM?: unknown; - THREADS?: unknown; - }; - error?: string | null; - errors?: { - TWITTER?: string | null; - PINTEREST?: string | null; - FACEBOOK?: string | null; - INSTAGRAM?: string | null; - TIKTOK?: string | null; - LINKEDIN?: string | null; - REDDIT?: string | null; - DISCORD?: string | null; - SLACK?: string | null; - YOUTUBE?: string | null; - TELEGRAM?: string | null; - THREADS?: string | null; + id: string; + teamId: string; + title: string; + postDate: string | null; + postedDate?: string | null; + status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; + data: { + TWITTER?: { + text?: string | null; + uploadIds?: Array<(string)> | null; } | null; - externalData?: { - TWITTER?: { - id?: string | null; - permalink?: string | null; - } | null; - PINTEREST?: { - id?: string | null; - permalink?: string | null; - } | null; - FACEBOOK?: { - id?: string | null; - postId?: string | null; - videoId?: string | null; - permalink?: string | null; - } | null; - INSTAGRAM?: { - id?: string | null; - permalink?: string | null; - } | null; - TIKTOK?: { - id?: string | null; - permalink?: string | null; - } | null; - LINKEDIN?: { - id?: string | null; - permalink?: string | null; - } | null; - REDDIT?: { - id?: string | null; - permalink?: string | null; - subreddit_name?: string | null; - } | null; - DISCORD?: { - id?: string | null; - permalink?: string | null; - channelId?: string | null; - } | null; - SLACK?: { - id?: string | null; - permalink?: string | null; - channelId?: string | null; - } | null; - YOUTUBE?: { - id?: string | null; - permalink?: string | null; - } | null; - TELEGRAM?: { - id?: string | null; - permalink?: string | null; - } | null; - THREADS?: { - id?: string | null; - permalink?: string | null; - } | null; + PINTEREST?: { + text?: string | null; + description?: string | null; + boardName: string; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the Pin will link to. + */ + link?: string | null; + /** + * The alt text for the image. This is used by screen readers and when the image can't be loaded. + */ + altText?: string | null; + /** + * A note about the Pin. This is not visible to the public. + */ + note?: string | null; + /** + * The dominant color of the image. This is used to display the image before it's loaded. + */ + dominantColor?: string | null; + } | null; + FACEBOOK?: { + type?: 'POST' | 'REEL' | 'STORY'; + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + INSTAGRAM?: { + type?: 'POST' | 'REEL' | 'STORY'; + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + TIKTOK?: { + text?: string | null; + uploadIds?: Array<(string)> | null; + privacy?: 'SELF_ONLY' | 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | null; + /** + * Set to true if the video is a paid partnership to promote a third-party business. + */ + isBrandContent?: boolean | null; + /** + * Set to true if this video is promoting the creator's own business. + */ + isOrganicBrandContent?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make comments on this post. + */ + disableComments?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make Stitches using this post. + */ + disableDuet?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make Duets using this post. + */ + disableStitch?: boolean | null; + } | null; + LINKEDIN?: { + text: string; + uploadIds?: Array<(string)> | null; + privacy?: 'CONNECTIONS' | 'PUBLIC' | 'LOGGED_IN' | 'CONTAINER' | null; + /** + * Set to true if the post shouldn't be displayed in the main feed. + */ + hideFromFeed?: boolean | null; + /** + * Set to true if the post is not allowed to be reshared. + */ + disableReshare?: boolean | null; + } | null; + YOUTUBE?: { + type?: 'VIDEO' | 'SHORT'; + uploadIds?: Array<(string)> | null; + text?: string | null; + description?: string | null; + privacy?: 'PRIVATE' | 'PUBLIC' | 'UNLISTED' | null; + /** + * Set to true if the video is made for kids. + */ + madeForKids?: boolean | null; + } | null; + REDDIT?: { + /** + * Subreddit name. Example: r/subredditName or u/username + */ + sr: string; + text: string; + description?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the post will link to. + */ + link?: string | null; + /** + * Set to true if the post is NSFW. + */ + nsfw?: boolean | null; + } | null; + DISCORD?: { + channelId: string; + text?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The username to display as the author of the message. + */ + username?: string | null; + /** + * Avatar url to display as the author of the message. + */ + avatarUrl?: string | null; + } | null; + SLACK?: { + channelId: string; + text?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The username to display as the author of the message. + */ + username?: string | null; + /** + * Avatar url to display as the author of the message. + */ + avatarUrl?: string | null; + } | null; + TELEGRAM?: unknown; + THREADS?: unknown; + }; + error?: string | null; + errors?: { + TWITTER?: string | null; + PINTEREST?: string | null; + FACEBOOK?: string | null; + INSTAGRAM?: string | null; + TIKTOK?: string | null; + LINKEDIN?: string | null; + REDDIT?: string | null; + DISCORD?: string | null; + SLACK?: string | null; + YOUTUBE?: string | null; + TELEGRAM?: string | null; + THREADS?: string | null; + } | null; + externalData?: { + TWITTER?: { + id?: string | null; + permalink?: string | null; + } | null; + PINTEREST?: { + id?: string | null; + permalink?: string | null; + } | null; + FACEBOOK?: { + id?: string | null; + postId?: string | null; + videoId?: string | null; + permalink?: string | null; + } | null; + INSTAGRAM?: { + id?: string | null; + permalink?: string | null; + } | null; + TIKTOK?: { + id?: string | null; + permalink?: string | null; + } | null; + LINKEDIN?: { + id?: string | null; + permalink?: string | null; } | null; + REDDIT?: { + id?: string | null; + permalink?: string | null; + subreddit_name?: string | null; + } | null; + DISCORD?: { + id?: string | null; + permalink?: string | null; + channelId?: string | null; + } | null; + SLACK?: { + id?: string | null; + permalink?: string | null; + channelId?: string | null; + } | null; + YOUTUBE?: { + id?: string | null; + permalink?: string | null; + } | null; + TELEGRAM?: { + id?: string | null; + permalink?: string | null; + } | null; + THREADS?: { + id?: string | null; + permalink?: string | null; + } | null; + } | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + uploads: Array<{ + postId: string; + uploadId: string; createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; - uploads: Array<{ - postId: string; - uploadId: string; + upload: { + id: string; + teamId: string; + expiresAt?: string | null; + iconUrl?: string | null; + thumbnailUrl?: string | null; + url?: string | null; + iconPath?: string | null; + thumbnailPath?: string | null; + path?: string | null; + type: 'image' | 'video'; + width?: number | null; + height?: number | null; + fileSize?: number | null; + videoLength?: number | null; + mime?: string | null; + ext?: string | null; createdAt: string | null; updatedAt: string | null; - deletedAt?: string | null; - upload: { + }; + }>; + socialAccounts: Array<{ + postId: string; + socialAccountId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + socialAccount: { + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ id: string; - teamId: string; - expiresAt?: string | null; - iconUrl?: string | null; - thumbnailUrl?: string | null; - url?: string | null; - iconPath?: string | null; - thumbnailPath?: string | null; - path?: string | null; - type: 'image' | 'video'; - width?: number | null; - height?: number | null; - fileSize?: number | null; - videoLength?: number | null; - mime?: string | null; - ext?: string | null; - createdAt: string | null; - updatedAt: string | null; - }; - }>; - socialAccounts: Array<{ - postId: string; - socialAccountId: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; - socialAccount: { - id: string; - type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; - teamId: string; - username?: string | null; - displayName?: string | null; - externalId?: string | null; - userUsername?: string | null; - userDisplayName?: string | null; - userId?: string | null; - channels?: Array<{ - id: string; - name?: string | null; - username?: string | null; - webhook?: { - id?: string | null; - name?: string | null; - avatar?: string | null; - url?: string | null; - } | null; - }> | null; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }; - }>; + }; }>; - total: number; }; /** * 400 @@ -2870,10 +3464,8 @@ export type $OpenApiTs = { }; }; }; - }; - '/api/v1/post/{id}': { - get: { - req: PostGetData; + patch: { + req: PostUpdateData; res: { /** * 200 @@ -3090,65 +3682,6 @@ export type $OpenApiTs = { createdAt: string | null; updatedAt: string | null; deletedAt?: string | null; - uploads: Array<{ - postId: string; - uploadId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - upload: { - id: string; - teamId: string; - expiresAt?: string | null; - iconUrl?: string | null; - thumbnailUrl?: string | null; - url?: string | null; - iconPath?: string | null; - thumbnailPath?: string | null; - path?: string | null; - type: 'image' | 'video'; - width?: number | null; - height?: number | null; - fileSize?: number | null; - videoLength?: number | null; - mime?: string | null; - ext?: string | null; - createdAt: string | null; - updatedAt: string | null; - }; - }>; - socialAccounts: Array<{ - postId: string; - socialAccountId: string; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - socialAccount: { - id: string; - type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; - teamId: string; - username?: string | null; - displayName?: string | null; - externalId?: string | null; - userUsername?: string | null; - userDisplayName?: string | null; - userId?: string | null; - channels?: Array<{ - id: string; - name?: string | null; - username?: string | null; - webhook?: { - id?: string | null; - name?: string | null; - avatar?: string | null; - url?: string | null; - } | null; - }> | null; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; - }; - }>; }; /** * 400 @@ -3192,8 +3725,8 @@ export type $OpenApiTs = { }; }; }; - put: { - req: PostUpdateData; + delete: { + req: PostDeleteData; res: { /** * 200 @@ -3402,14 +3935,339 @@ export type $OpenApiTs = { id?: string | null; permalink?: string | null; } | null; - THREADS?: { - id?: string | null; - permalink?: string | null; + THREADS?: { + id?: string | null; + permalink?: string | null; + } | null; + } | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }; + /** + * 400 + */ + 400: { + message: string; + issues?: Array<{ + message: string; + path?: Array<(string | number)> | null; + }> | null; + }; + /** + * 401 + */ + 401: { + message: string; + }; + /** + * 403 + */ + 403: { + message: string; + }; + /** + * 404 + */ + 404: { + message: string; + }; + /** + * 429 + */ + 429: { + message: string; + }; + /** + * 500 + */ + 500: { + message: string; + }; + }; + }; + }; + '/api/v1/post/': { + get: { + req: PostGetListData; + res: { + /** + * 200 + */ + 200: { + items: Array<{ + id: string; + teamId: string; + title: string; + postDate: string | null; + postedDate?: string | null; + status: 'DRAFT' | 'SCHEDULED' | 'POSTED' | 'ERROR' | 'DELETED' | 'PROCESSING'; + data: { + TWITTER?: { + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + PINTEREST?: { + text?: string | null; + description?: string | null; + boardName: string; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the Pin will link to. + */ + link?: string | null; + /** + * The alt text for the image. This is used by screen readers and when the image can't be loaded. + */ + altText?: string | null; + /** + * A note about the Pin. This is not visible to the public. + */ + note?: string | null; + /** + * The dominant color of the image. This is used to display the image before it's loaded. + */ + dominantColor?: string | null; + } | null; + FACEBOOK?: { + type?: 'POST' | 'REEL' | 'STORY'; + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + INSTAGRAM?: { + type?: 'POST' | 'REEL' | 'STORY'; + text?: string | null; + uploadIds?: Array<(string)> | null; + } | null; + TIKTOK?: { + text?: string | null; + uploadIds?: Array<(string)> | null; + privacy?: 'SELF_ONLY' | 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | null; + /** + * Set to true if the video is a paid partnership to promote a third-party business. + */ + isBrandContent?: boolean | null; + /** + * Set to true if this video is promoting the creator's own business. + */ + isOrganicBrandContent?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make comments on this post. + */ + disableComments?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make Stitches using this post. + */ + disableDuet?: boolean | null; + /** + * If set to true, other TikTok users will not be allowed to make Duets using this post. + */ + disableStitch?: boolean | null; + } | null; + LINKEDIN?: { + text: string; + uploadIds?: Array<(string)> | null; + privacy?: 'CONNECTIONS' | 'PUBLIC' | 'LOGGED_IN' | 'CONTAINER' | null; + /** + * Set to true if the post shouldn't be displayed in the main feed. + */ + hideFromFeed?: boolean | null; + /** + * Set to true if the post is not allowed to be reshared. + */ + disableReshare?: boolean | null; + } | null; + YOUTUBE?: { + type?: 'VIDEO' | 'SHORT'; + uploadIds?: Array<(string)> | null; + text?: string | null; + description?: string | null; + privacy?: 'PRIVATE' | 'PUBLIC' | 'UNLISTED' | null; + /** + * Set to true if the video is made for kids. + */ + madeForKids?: boolean | null; + } | null; + REDDIT?: { + /** + * Subreddit name. Example: r/subredditName or u/username + */ + sr: string; + text: string; + description?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The URL to which the post will link to. + */ + link?: string | null; + /** + * Set to true if the post is NSFW. + */ + nsfw?: boolean | null; + } | null; + DISCORD?: { + channelId: string; + text?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The username to display as the author of the message. + */ + username?: string | null; + /** + * Avatar url to display as the author of the message. + */ + avatarUrl?: string | null; + } | null; + SLACK?: { + channelId: string; + text?: string | null; + uploadIds?: Array<(string)> | null; + /** + * The username to display as the author of the message. + */ + username?: string | null; + /** + * Avatar url to display as the author of the message. + */ + avatarUrl?: string | null; + } | null; + TELEGRAM?: unknown; + THREADS?: unknown; + }; + error?: string | null; + errors?: { + TWITTER?: string | null; + PINTEREST?: string | null; + FACEBOOK?: string | null; + INSTAGRAM?: string | null; + TIKTOK?: string | null; + LINKEDIN?: string | null; + REDDIT?: string | null; + DISCORD?: string | null; + SLACK?: string | null; + YOUTUBE?: string | null; + TELEGRAM?: string | null; + THREADS?: string | null; + } | null; + externalData?: { + TWITTER?: { + id?: string | null; + permalink?: string | null; + } | null; + PINTEREST?: { + id?: string | null; + permalink?: string | null; + } | null; + FACEBOOK?: { + id?: string | null; + postId?: string | null; + videoId?: string | null; + permalink?: string | null; + } | null; + INSTAGRAM?: { + id?: string | null; + permalink?: string | null; + } | null; + TIKTOK?: { + id?: string | null; + permalink?: string | null; + } | null; + LINKEDIN?: { + id?: string | null; + permalink?: string | null; + } | null; + REDDIT?: { + id?: string | null; + permalink?: string | null; + subreddit_name?: string | null; + } | null; + DISCORD?: { + id?: string | null; + permalink?: string | null; + channelId?: string | null; + } | null; + SLACK?: { + id?: string | null; + permalink?: string | null; + channelId?: string | null; + } | null; + YOUTUBE?: { + id?: string | null; + permalink?: string | null; + } | null; + TELEGRAM?: { + id?: string | null; + permalink?: string | null; + } | null; + THREADS?: { + id?: string | null; + permalink?: string | null; + } | null; } | null; - } | null; - createdAt: string | null; - updatedAt: string | null; - deletedAt?: string | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + uploads: Array<{ + postId: string; + uploadId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + upload: { + id: string; + teamId: string; + expiresAt?: string | null; + iconUrl?: string | null; + thumbnailUrl?: string | null; + url?: string | null; + iconPath?: string | null; + thumbnailPath?: string | null; + path?: string | null; + type: 'image' | 'video'; + width?: number | null; + height?: number | null; + fileSize?: number | null; + videoLength?: number | null; + mime?: string | null; + ext?: string | null; + createdAt: string | null; + updatedAt: string | null; + }; + }>; + socialAccounts: Array<{ + postId: string; + socialAccountId: string; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + socialAccount: { + id: string; + type: 'TIKTOK' | 'YOUTUBE' | 'INSTAGRAM' | 'FACEBOOK' | 'TWITTER' | 'THREADS' | 'LINKEDIN' | 'PINTEREST' | 'REDDIT' | 'TELEGRAM' | 'DISCORD' | 'SLACK'; + teamId: string; + username?: string | null; + displayName?: string | null; + externalId?: string | null; + userUsername?: string | null; + userDisplayName?: string | null; + userId?: string | null; + channels?: Array<{ + id: string; + name?: string | null; + username?: string | null; + webhook?: { + id?: string | null; + name?: string | null; + avatar?: string | null; + url?: string | null; + } | null; + }> | null; + createdAt: string | null; + updatedAt: string | null; + deletedAt?: string | null; + }; + }>; + }>; + total: number; }; /** * 400 @@ -3453,8 +4311,8 @@ export type $OpenApiTs = { }; }; }; - delete: { - req: PostDeleteData; + post: { + req: PostCreateData; res: { /** * 200 diff --git a/openapi/openapi.json b/openapi/openapi.json index 1fe9793..48f3992 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.2","paths":{"/api/v1/":{"get":{"summary":"Get health","tags":["app"],"parameters":[],"operationId":"app.getHealth","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["status","createdAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/team/":{"get":{"summary":"Get team","tags":["team"],"parameters":[],"operationId":"team.getTeam","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"createdById":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"users":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"teamId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"user":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"string","format":"date-time","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"role":{"type":"string","enum":["ADMIN","CUSTOMER"]},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","externalId","email","role","createdAt","updatedAt"]}},"required":["userId","teamId","createdAt","updatedAt","user"]}},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"string","format":"date-time","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"role":{"type":"string","enum":["ADMIN","CUSTOMER"]},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","externalId","email","role","createdAt","updatedAt"]},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"teamId":{"type":"string"},"createdById":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","email","teamId","createdById","createdAt","updatedAt"]}},"bots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"teamId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","teamId","createdAt","updatedAt"]}},"webhooks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"url":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","url","createdAt","updatedAt"]}},"socialAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}},"usage":{"type":"object","properties":{"monthlyPosts":{"type":"number"}},"required":["monthlyPosts"]}},"required":["id","name","createdById","createdAt","updatedAt","users","createdBy","invitations","bots","webhooks","socialAccounts","usage"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/upload/":{"post":{"description":"Upload a file. This is the only endpoint that uses multipart/form-data.","summary":"Create upload","tags":["upload"],"parameters":[],"operationId":"upload.create","requestBody":{"description":"Body","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"nullable":true,"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"get":{"summary":"Get upload list","tags":["upload"],"parameters":[],"operationId":"upload.getList","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"posts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"uploadId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["postId","uploadId","createdAt","updatedAt"]}}},"required":["id","teamId","type","createdAt","updatedAt","posts"]}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"summary":"Delete many uploads","tags":["upload"],"parameters":[],"operationId":"upload.deleteMany","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["ids"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/upload/{id}":{"get":{"summary":"Get upload","tags":["upload"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"upload.get","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"summary":"Delete upload","tags":["upload"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"upload.delete","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/post/":{"post":{"summary":"Create post","tags":["post"],"parameters":[],"operationId":"post.create","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"postDate":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SCHEDULED"]},"socialAccountTypes":{"type":"array","items":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"minItems":1},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}}},"required":["title","postDate","status","socialAccountTypes","data"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"get":{"summary":"Get post list","tags":["post"],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"],"nullable":true}},{"name":"orderBy","in":"query","schema":{"type":"string","enum":["createdAt","updatedAt","postDate","postedDate","deletedAt"],"nullable":true}},{"name":"order","in":"query","schema":{"type":"string","enum":["ASC","DESC"],"nullable":true}},{"name":"q","in":"query","schema":{"type":"string","nullable":true}},{"name":"platforms","in":"query","schema":{"type":"array","items":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"nullable":true}},{"name":"offset","in":"query","schema":{"default":0,"type":"number","nullable":true}},{"name":"limit","in":"query","schema":{"default":10,"type":"number","nullable":true}}],"operationId":"post.getList","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"uploads":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"uploadId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"upload":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}},"required":["postId","uploadId","createdAt","updatedAt","upload"]}},"socialAccounts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"socialAccountId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"socialAccount":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}},"required":["postId","socialAccountId","createdAt","updatedAt","socialAccount"]}}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt","uploads","socialAccounts"]}},"total":{"type":"number"}},"required":["items","total"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/post/{id}":{"get":{"summary":"Get post","tags":["post"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"post.get","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"uploads":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"uploadId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"upload":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}},"required":["postId","uploadId","createdAt","updatedAt","upload"]}},"socialAccounts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"socialAccountId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"socialAccount":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}},"required":["postId","socialAccountId","createdAt","updatedAt","socialAccount"]}}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt","uploads","socialAccounts"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"summary":"Update post","tags":["post"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"post.update","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"postDate":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SCHEDULED"]},"socialAccountTypes":{"type":"array","items":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"minItems":1},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"summary":"Delete post","tags":["post"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"post.delete","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}}},"info":{"title":"bundle.social API","description":"The purpose of this API is to provide an easy way to create & schedule social media posts.","version":"1.0.0","contact":{"email":"contact@bundle.social"},"termsOfService":"https://bundle.social/terms"},"servers":[{"url":"https://api.bundle.social"},{"url":"http://localhost:3001"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}}},"security":[{"ApiKeyAuth":[]}]} \ No newline at end of file +{"openapi":"3.0.2","paths":{"/api/v1/":{"get":{"summary":"Get health","tags":["app"],"parameters":[],"operationId":"app.getHealth","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["status","createdAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/organization/":{"get":{"summary":"Get organization","tags":["organization"],"parameters":[],"operationId":"organization.getOrganization","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":"string"},"name":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"defaultPaymentMethodFilled":{"default":false,"type":"boolean"},"billingAddressFilled":{"default":false,"type":"boolean"},"apiAccess":{"default":true,"type":"boolean"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"organizationId":{"type":"string"},"createdById":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","organizationId","createdById","createdAt","updatedAt"]}},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"string","format":"date-time","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"role":{"type":"string","enum":["ADMIN","CUSTOMER"]},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","externalId","email","role","createdAt","updatedAt"]},"organizationSubscription":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"stripeSubscriptionId":{"type":"string"},"stripeSubscriptionItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"price":{"type":"string"},"quantity":{"type":"number"}},"required":["id","price","quantity"]},"nullable":true},"status":{"type":"string","enum":["trialing","active","canceled","incomplete","incomplete_expired","past_due","unpaid","paused"]},"metadata":{"type":"object","properties":{},"nullable":true},"cancelAtPeriodEnd":{"type":"boolean"},"created":{"type":"string","format":"date-time","nullable":true},"currentPeriodStart":{"type":"string","format":"date-time","nullable":true},"currentPeriodEnd":{"type":"string","format":"date-time","nullable":true},"endedAt":{"type":"string","format":"date-time","nullable":true},"cancelAt":{"type":"string","format":"date-time","nullable":true},"canceledAt":{"type":"string","format":"date-time","nullable":true},"trialStart":{"type":"string","format":"date-time","nullable":true},"trialEnd":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"teamPlan":{"type":"object","properties":{"id":{"type":"string"},"organizationSubscriptionId":{"type":"string"},"teamId":{"type":"string"},"stripePriceId":{"type":"string"},"tier":{"type":"string","enum":["PRO"]},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","organizationSubscriptionId","teamId","stripePriceId","tier","createdAt","updatedAt"],"nullable":true}},"required":["id","organizationId","stripeSubscriptionId","status","cancelAtPeriodEnd","created","currentPeriodStart","currentPeriodEnd","createdAt","updatedAt"],"nullable":true}},"required":["id","createdById","createdAt","updatedAt","teams","createdBy"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/team/{id}":{"get":{"summary":"Get team","tags":["team"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"team.getTeam","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"organizationId":{"type":"string"},"createdById":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"organization":{"type":"object","properties":{"id":{"type":"string"},"createdById":{"type":"string"},"name":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"defaultPaymentMethodFilled":{"default":false,"type":"boolean"},"billingAddressFilled":{"default":false,"type":"boolean"},"apiAccess":{"default":true,"type":"boolean"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","createdById","createdAt","updatedAt"]},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"string","format":"date-time","nullable":true},"firstName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"role":{"type":"string","enum":["ADMIN","CUSTOMER"]},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","externalId","email","role","createdAt","updatedAt"]},"bots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"teamId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","teamId","createdAt","updatedAt"]}},"socialAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}},"usage":{"type":"object","properties":{"monthlyPosts":{"type":"number"}},"required":["monthlyPosts"]},"teamPlan":{"type":"object","properties":{"id":{"type":"string"},"organizationSubscriptionId":{"type":"string"},"teamId":{"type":"string"},"stripePriceId":{"type":"string"},"tier":{"type":"string","enum":["PRO"]},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"organizationSubscription":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"stripeSubscriptionId":{"type":"string"},"stripeSubscriptionItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"price":{"type":"string"},"quantity":{"type":"number"}},"required":["id","price","quantity"]},"nullable":true},"status":{"type":"string","enum":["trialing","active","canceled","incomplete","incomplete_expired","past_due","unpaid","paused"]},"metadata":{"type":"object","properties":{},"nullable":true},"cancelAtPeriodEnd":{"type":"boolean"},"created":{"type":"string","format":"date-time","nullable":true},"currentPeriodStart":{"type":"string","format":"date-time","nullable":true},"currentPeriodEnd":{"type":"string","format":"date-time","nullable":true},"endedAt":{"type":"string","format":"date-time","nullable":true},"cancelAt":{"type":"string","format":"date-time","nullable":true},"canceledAt":{"type":"string","format":"date-time","nullable":true},"trialStart":{"type":"string","format":"date-time","nullable":true},"trialEnd":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","organizationId","stripeSubscriptionId","status","cancelAtPeriodEnd","created","currentPeriodStart","currentPeriodEnd","createdAt","updatedAt"],"nullable":true}},"required":["id","organizationSubscriptionId","teamId","stripePriceId","tier","createdAt","updatedAt"],"nullable":true}},"required":["id","name","organizationId","createdById","createdAt","updatedAt","organization","createdBy","bots","socialAccounts","usage"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"summary":"Update team","tags":["team"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"team.updateTeam","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":80},"avatarUrl":{"type":"string","nullable":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"organizationId":{"type":"string"},"createdById":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","organizationId","createdById","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"summary":"Delete team","tags":["team"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"team.deleteTeam","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"organizationId":{"type":"string"},"createdById":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","organizationId","createdById","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/team/":{"post":{"summary":"Create new team","tags":["team"],"parameters":[],"operationId":"team.createTeam","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":80},"tier":{"type":"string","enum":["FREE","PRO"]},"avatarUrl":{"type":"string","nullable":true}},"required":["name","tier"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","nullable":true},"organizationId":{"type":"string"},"createdById":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","name","organizationId","createdById","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/social-account/connect":{"post":{"summary":"Generate OAuth URL","tags":["socialAccount"],"parameters":[],"operationId":"socialAccount.connect","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","LINKEDIN","PINTEREST","REDDIT","DISCORD","SLACK"]},"teamId":{"type":"string"},"redirectUrl":{"type":"string","format":"uri"}},"required":["type","teamId","redirectUrl"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"OAuth URL - Redirect user to this URL to connect social account"}},"required":["url"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/social-account/disconnect":{"delete":{"summary":"Disconnect social account from team","tags":["socialAccount"],"parameters":[],"operationId":"socialAccount.disconnect","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","LINKEDIN","PINTEREST","REDDIT","DISCORD","SLACK"]},"teamId":{"type":"string"}},"required":["type","teamId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/social-account/set-channel":{"post":{"summary":"Set channel for social account","tags":["socialAccount"],"parameters":[],"operationId":"socialAccount.setChannel","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["FACEBOOK","INSTAGRAM","LINKEDIN","YOUTUBE"]},"teamId":{"type":"string"},"channelId":{"type":"string"}},"required":["type","teamId","channelId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/social-account/refresh-channels":{"post":{"summary":"Refresh channels for social account","tags":["socialAccount"],"parameters":[],"operationId":"socialAccount.refreshChannels","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["DISCORD","SLACK","REDDIT","PINTEREST"]},"teamId":{"type":"string"}},"required":["type","teamId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/upload/":{"get":{"summary":"Get upload list","tags":["upload"],"parameters":[{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}}],"operationId":"upload.getList","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"posts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"uploadId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["postId","uploadId","createdAt","updatedAt"]}}},"required":["id","teamId","type","createdAt","updatedAt","posts"]}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"description":"Upload a file. This is the only endpoint that uses multipart/form-data.","summary":"Create upload","tags":["upload"],"parameters":[],"operationId":"upload.create","requestBody":{"description":"Body","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"file":{"nullable":true,"type":"string","format":"binary"}},"required":["teamId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"summary":"Delete many uploads","tags":["upload"],"parameters":[],"operationId":"upload.deleteMany","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["ids"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/upload/{id}":{"get":{"summary":"Get upload","tags":["upload"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"upload.get","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"summary":"Delete upload","tags":["upload"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"upload.delete","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/post/{id}":{"get":{"summary":"Get post","tags":["post"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"post.get","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"uploads":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"uploadId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"upload":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}},"required":["postId","uploadId","createdAt","updatedAt","upload"]}},"socialAccounts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"socialAccountId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"socialAccount":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}},"required":["postId","socialAccountId","createdAt","updatedAt","socialAccount"]}}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt","uploads","socialAccounts"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"summary":"Update post","tags":["post"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"post.update","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"postDate":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SCHEDULED"]},"socialAccountTypes":{"type":"array","items":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"minItems":1},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"summary":"Delete post","tags":["post"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"post.delete","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/api/v1/post/":{"get":{"summary":"Get post list","tags":["post"],"parameters":[{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"],"nullable":true}},{"name":"orderBy","in":"query","schema":{"type":"string","enum":["createdAt","updatedAt","postDate","postedDate","deletedAt"],"nullable":true}},{"name":"order","in":"query","schema":{"type":"string","enum":["ASC","DESC"],"nullable":true}},{"name":"q","in":"query","schema":{"type":"string","nullable":true}},{"name":"platforms","in":"query","schema":{"type":"array","items":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"nullable":true}},{"name":"offset","in":"query","schema":{"default":0,"type":"number","nullable":true}},{"name":"limit","in":"query","schema":{"default":10,"type":"number","nullable":true}}],"operationId":"post.getList","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"uploads":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"uploadId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"upload":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","nullable":true},"iconUrl":{"type":"string","format":"uri","nullable":true},"thumbnailUrl":{"type":"string","format":"uri","nullable":true},"url":{"type":"string","format":"uri","nullable":true},"iconPath":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"path":{"type":"string","nullable":true},"type":{"type":"string","enum":["image","video"]},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"fileSize":{"type":"number","nullable":true},"videoLength":{"type":"number","nullable":true},"mime":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","type","createdAt","updatedAt"]}},"required":["postId","uploadId","createdAt","updatedAt","upload"]}},"socialAccounts":{"type":"array","items":{"type":"object","properties":{"postId":{"type":"string"},"socialAccountId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true},"socialAccount":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"teamId":{"type":"string"},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true},"userUsername":{"type":"string","nullable":true},"userDisplayName":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"webhook":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"nullable":true}},"required":["id"]},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","type","teamId","createdAt","updatedAt"]}},"required":["postId","socialAccountId","createdAt","updatedAt","socialAccount"]}}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt","uploads","socialAccounts"]}},"total":{"type":"number"}},"required":["items","total"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"post":{"summary":"Create post","tags":["post"],"parameters":[],"operationId":"post.create","requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"title":{"type":"string","minLength":1},"postDate":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SCHEDULED"]},"socialAccountTypes":{"type":"array","items":{"type":"string","enum":["TIKTOK","YOUTUBE","INSTAGRAM","FACEBOOK","TWITTER","THREADS","LINKEDIN","PINTEREST","REDDIT","TELEGRAM","DISCORD","SLACK"]},"minItems":1},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}}},"required":["teamId","title","postDate","status","socialAccountTypes","data"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"title":{"type":"string"},"postDate":{"type":"string","format":"date-time","nullable":true},"postedDate":{"type":"string","format":"date-time","nullable":true},"status":{"type":"string","enum":["DRAFT","SCHEDULED","POSTED","ERROR","DELETED","PROCESSING"]},"data":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"boardName":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the Pin will link to."},"altText":{"type":"string","nullable":true,"description":"The alt text for the image. This is used by screen readers and when the image can't be loaded."},"note":{"type":"string","nullable":true,"description":"A note about the Pin. This is not visible to the public."},"dominantColor":{"type":"string","nullable":true,"description":"The dominant color of the image. This is used to display the image before it's loaded."}},"required":["boardName"],"nullable":true},"FACEBOOK":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"type":{"default":"POST","type":"string","enum":["POST","REEL","STORY"]},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["SELF_ONLY","PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR"],"nullable":true},"isBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is a paid partnership to promote a third-party business."},"isOrganicBrandContent":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if this video is promoting the creator's own business."},"disableComments":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make comments on this post."},"disableDuet":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Stitches using this post."},"disableStitch":{"default":false,"type":"boolean","nullable":true,"description":"If set to true, other TikTok users will not be allowed to make Duets using this post."}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"text":{"type":"string"},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"privacy":{"type":"string","enum":["CONNECTIONS","PUBLIC","LOGGED_IN","CONTAINER"],"nullable":true},"hideFromFeed":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post shouldn't be displayed in the main feed."},"disableReshare":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is not allowed to be reshared."}},"required":["text"],"nullable":true},"YOUTUBE":{"type":"object","properties":{"type":{"default":"SHORT","type":"string","enum":["VIDEO","SHORT"]},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"text":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"privacy":{"type":"string","enum":["PRIVATE","PUBLIC","UNLISTED"],"nullable":true},"madeForKids":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the video is made for kids."}},"nullable":true},"REDDIT":{"type":"object","properties":{"sr":{"type":"string","description":"Subreddit name. Example: r/subredditName or u/username"},"text":{"type":"string"},"description":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"link":{"type":"string","nullable":true,"description":"The URL to which the post will link to."},"nsfw":{"default":false,"type":"boolean","nullable":true,"description":"Set to true if the post is NSFW."}},"required":["sr","text"],"nullable":true},"DISCORD":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"SLACK":{"type":"object","properties":{"channelId":{"type":"string"},"text":{"type":"string","nullable":true},"uploadIds":{"type":"array","items":{"type":"string"},"nullable":true},"username":{"type":"string","nullable":true,"description":"The username to display as the author of the message."},"avatarUrl":{"type":"string","nullable":true,"description":"Avatar url to display as the author of the message."}},"required":["channelId"],"nullable":true},"TELEGRAM":{"type":"object","properties":{},"nullable":true},"THREADS":{"type":"object","properties":{},"nullable":true}}},"error":{"type":"string","nullable":true},"errors":{"type":"object","properties":{"TWITTER":{"type":"string","nullable":true},"PINTEREST":{"type":"string","nullable":true},"FACEBOOK":{"type":"string","nullable":true},"INSTAGRAM":{"type":"string","nullable":true},"TIKTOK":{"type":"string","nullable":true},"LINKEDIN":{"type":"string","nullable":true},"REDDIT":{"type":"string","nullable":true},"DISCORD":{"type":"string","nullable":true},"SLACK":{"type":"string","nullable":true},"YOUTUBE":{"type":"string","nullable":true},"TELEGRAM":{"type":"string","nullable":true},"THREADS":{"type":"string","nullable":true}},"nullable":true},"externalData":{"type":"object","properties":{"TWITTER":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"PINTEREST":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"FACEBOOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"postId":{"type":"string","nullable":true},"videoId":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"INSTAGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TIKTOK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"LINKEDIN":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"REDDIT":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"subreddit_name":{"type":"string","nullable":true}},"nullable":true},"DISCORD":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"SLACK":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true},"channelId":{"type":"string","nullable":true}},"nullable":true},"YOUTUBE":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"TELEGRAM":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true},"THREADS":{"type":"object","properties":{"id":{"type":"string","nullable":true},"permalink":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time","nullable":true},"deletedAt":{"type":"string","format":"date-time","nullable":true}},"required":["id","teamId","title","postDate","status","data","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]},"nullable":true}},"required":["message"]},"nullable":true}},"required":["message"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}}},"info":{"title":"bundle.social API","description":"The purpose of this API is to provide an easy way to create & schedule social media posts.","version":"1.0.0","contact":{"email":"contact@bundle.social"},"termsOfService":"https://bundle.social/terms"},"servers":[{"url":"https://api.bundle.social"},{"url":"http://localhost:3001"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}}},"security":[{"ApiKeyAuth":[]}]} \ No newline at end of file diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 8551936..8d4aa1d 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -105,13 +105,13 @@ paths: type: string required: - message - /api/v1/team/: + /api/v1/organization/: get: - summary: Get team + summary: Get organization tags: - - team + - organization parameters: [] - operationId: team.getTeam + operationId: organization.getOrganization responses: '200': description: '200' @@ -122,13 +122,23 @@ paths: properties: id: type: string + createdById: + type: string name: type: string + nullable: true avatarUrl: type: string nullable: true - createdById: - type: string + defaultPaymentMethodFilled: + default: false + type: boolean + billingAddressFilled: + default: false + type: boolean + apiAccess: + default: true + type: boolean createdAt: type: string format: date-time @@ -141,14 +151,21 @@ paths: type: string format: date-time nullable: true - users: + teams: type: array items: type: object properties: - userId: + id: type: string - teamId: + name: + type: string + avatarUrl: + type: string + nullable: true + organizationId: + type: string + createdById: type: string createdAt: type: string @@ -162,58 +179,13 @@ paths: type: string format: date-time nullable: true - user: - type: object - properties: - id: - type: string - externalId: - type: string - email: - type: string - emailVerified: - type: string - format: date-time - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - avatarUrl: - type: string - nullable: true - role: - type: string - enum: - - ADMIN - - CUSTOMER - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - required: - - id - - externalId - - email - - role - - createdAt - - updatedAt required: - - userId - - teamId + - id + - name + - organizationId + - createdById - createdAt - updatedAt - - user createdBy: type: object properties: @@ -260,229 +232,161 @@ paths: - role - createdAt - updatedAt - invitations: - type: array - items: - type: object - properties: - id: - type: string - email: - type: string - teamId: - type: string - createdById: - type: string - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - required: - - id - - email - - teamId - - createdById - - createdAt - - updatedAt - bots: - type: array - items: - type: object - properties: - id: - type: string - name: - type: string - avatarUrl: - type: string - nullable: true - teamId: - type: string - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - required: - - id - - name - - teamId - - createdAt - - updatedAt - webhooks: + organizationSubscription: + type: object + properties: + id: + type: string + organizationId: + type: string + stripeSubscriptionId: + type: string + stripeSubscriptionItems: + type: array + items: + type: object + properties: + id: + type: string + price: + type: string + quantity: + type: number + required: + - id + - price + - quantity + nullable: true + status: + type: string + enum: + - trialing + - active + - canceled + - incomplete + - incomplete_expired + - past_due + - unpaid + - paused + metadata: + type: object + properties: {} + nullable: true + cancelAtPeriodEnd: + type: boolean + created: + type: string + format: date-time + nullable: true + currentPeriodStart: + type: string + format: date-time + nullable: true + currentPeriodEnd: + type: string + format: date-time + nullable: true + endedAt: + type: string + format: date-time + nullable: true + cancelAt: + type: string + format: date-time + nullable: true + canceledAt: + type: string + format: date-time + nullable: true + trialStart: + type: string + format: date-time + nullable: true + trialEnd: + type: string + format: date-time + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + teamPlan: + type: object + properties: + id: + type: string + organizationSubscriptionId: + type: string + teamId: + type: string + stripePriceId: + type: string + tier: + type: string + enum: + - PRO + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + required: + - id + - organizationSubscriptionId + - teamId + - stripePriceId + - tier + - createdAt + - updatedAt + nullable: true + required: + - id + - organizationId + - stripeSubscriptionId + - status + - cancelAtPeriodEnd + - created + - currentPeriodStart + - currentPeriodEnd + - createdAt + - updatedAt + nullable: true + required: + - id + - createdById + - createdAt + - updatedAt + - teams + - createdBy + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: type: array items: type: object properties: - id: - type: string - teamId: - type: string - url: - type: string - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: + message: type: string - format: date-time - nullable: true - required: - - id - - teamId - - url - - createdAt - - updatedAt - socialAccounts: - type: array - items: - type: object - properties: - id: - type: string - type: - type: string - enum: - - TIKTOK - - YOUTUBE - - INSTAGRAM - - FACEBOOK - - TWITTER - - THREADS - - LINKEDIN - - PINTEREST - - REDDIT - - TELEGRAM - - DISCORD - - SLACK - teamId: - type: string - username: - type: string - nullable: true - displayName: - type: string - nullable: true - externalId: - type: string - nullable: true - userUsername: - type: string - nullable: true - userDisplayName: - type: string - nullable: true - userId: - type: string - nullable: true - channels: - type: array - items: - type: object - properties: - id: - type: string - name: - type: string - nullable: true - username: - type: string - nullable: true - webhook: - type: object - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - avatar: - type: string - nullable: true - url: - type: string - nullable: true - nullable: true - required: - - id - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - required: - - id - - type - - teamId - - createdAt - - updatedAt - usage: - type: object - properties: - monthlyPosts: - type: number - required: - - monthlyPosts - required: - - id - - name - - createdById - - createdAt - - updatedAt - - users - - createdBy - - invitations - - bots - - webhooks - - socialAccounts - - usage - '400': - description: '400' - content: - application/json: - schema: - type: object - properties: - message: - type: string - issues: - type: array - items: - type: object - properties: - message: - type: string - path: - type: array - items: - oneOf: - - type: string - - type: number + path: + type: array + items: + oneOf: + - type: string + - type: number nullable: true required: - message @@ -544,25 +448,18 @@ paths: type: string required: - message - /api/v1/upload/: - post: - description: Upload a file. This is the only endpoint that uses multipart/form-data. - summary: Create upload + /api/v1/team/{id}: + get: + summary: Get team tags: &ref_0 - - upload - parameters: [] - operationId: upload.create - requestBody: - description: Body - content: - multipart/form-data: - schema: - type: object - properties: - file: - nullable: true - type: string - format: binary + - team + parameters: + - name: id + in: path + required: true + schema: + type: string + operationId: team.getTeam responses: '200': description: '200' @@ -573,56 +470,15 @@ paths: properties: id: type: string - teamId: - type: string - expiresAt: - type: string - format: date-time - nullable: true - iconUrl: - type: string - format: uri - nullable: true - thumbnailUrl: - type: string - format: uri - nullable: true - url: - type: string - format: uri - nullable: true - iconPath: - type: string - nullable: true - thumbnailPath: - type: string - nullable: true - path: + name: type: string - nullable: true - type: + avatarUrl: type: string - enum: - - image - - video - width: - type: number - nullable: true - height: - type: number nullable: true - fileSize: - type: number - nullable: true - videoLength: - type: number - nullable: true - mime: + organizationId: type: string - nullable: true - ext: + createdById: type: string - nullable: true createdAt: type: string format: date-time @@ -631,246 +487,407 @@ paths: type: string format: date-time nullable: true - required: - - id - - teamId - - type - - createdAt - - updatedAt - '400': - description: '400' - content: - application/json: - schema: - type: object - properties: - message: + deletedAt: type: string - issues: - type: array - items: - type: object - properties: - message: - type: string - path: - type: array - items: - oneOf: - - type: string - - type: number - nullable: true - required: - - message + format: date-time nullable: true - required: - - message - '401': - description: '401' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: '403' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '404': - description: '404' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '429': - description: '429' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '500': - description: '500' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - get: - summary: Get upload list - tags: *ref_0 - parameters: [] - operationId: upload.getList - responses: - '200': - description: '200' - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: string - teamId: - type: string - expiresAt: - type: string - format: date-time - nullable: true - iconUrl: - type: string - format: uri - nullable: true - thumbnailUrl: - type: string - format: uri - nullable: true - url: - type: string - format: uri - nullable: true - iconPath: - type: string - nullable: true - thumbnailPath: - type: string - nullable: true - path: - type: string - nullable: true - type: - type: string - enum: - - image - - video - width: - type: number - nullable: true - height: - type: number - nullable: true - fileSize: - type: number - nullable: true - videoLength: - type: number - nullable: true - mime: - type: string - nullable: true - ext: - type: string - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - posts: - type: array - items: - type: object - properties: - postId: - type: string - uploadId: - type: string - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - required: - - postId - - uploadId - - createdAt - - updatedAt - required: - - id - - teamId - - type - - createdAt - - updatedAt - - posts - '400': - description: '400' - content: - application/json: - schema: - type: object - properties: - message: - type: string - issues: + organization: + type: object + properties: + id: + type: string + createdById: + type: string + name: + type: string + nullable: true + avatarUrl: + type: string + nullable: true + defaultPaymentMethodFilled: + default: false + type: boolean + billingAddressFilled: + default: false + type: boolean + apiAccess: + default: true + type: boolean + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - createdById + - createdAt + - updatedAt + createdBy: + type: object + properties: + id: + type: string + externalId: + type: string + email: + type: string + emailVerified: + type: string + format: date-time + nullable: true + firstName: + type: string + nullable: true + lastName: + type: string + nullable: true + avatarUrl: + type: string + nullable: true + role: + type: string + enum: + - ADMIN + - CUSTOMER + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - externalId + - email + - role + - createdAt + - updatedAt + bots: type: array items: type: object properties: - message: + id: type: string - path: - type: array - items: - oneOf: - - type: string - - type: number + name: + type: string + avatarUrl: + type: string + nullable: true + teamId: + type: string + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time nullable: true required: - - message - nullable: true - required: - - message - '401': - description: '401' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: '403' - content: - application/json: + - id + - name + - teamId + - createdAt + - updatedAt + socialAccounts: + type: array + items: + type: object + properties: + id: + type: string + type: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - THREADS + - LINKEDIN + - PINTEREST + - REDDIT + - TELEGRAM + - DISCORD + - SLACK + teamId: + type: string + username: + type: string + nullable: true + displayName: + type: string + nullable: true + externalId: + type: string + nullable: true + userUsername: + type: string + nullable: true + userDisplayName: + type: string + nullable: true + userId: + type: string + nullable: true + channels: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + nullable: true + username: + type: string + nullable: true + webhook: + type: object + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + avatar: + type: string + nullable: true + url: + type: string + nullable: true + nullable: true + required: + - id + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - type + - teamId + - createdAt + - updatedAt + usage: + type: object + properties: + monthlyPosts: + type: number + required: + - monthlyPosts + teamPlan: + type: object + properties: + id: + type: string + organizationSubscriptionId: + type: string + teamId: + type: string + stripePriceId: + type: string + tier: + type: string + enum: + - PRO + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + organizationSubscription: + type: object + properties: + id: + type: string + organizationId: + type: string + stripeSubscriptionId: + type: string + stripeSubscriptionItems: + type: array + items: + type: object + properties: + id: + type: string + price: + type: string + quantity: + type: number + required: + - id + - price + - quantity + nullable: true + status: + type: string + enum: + - trialing + - active + - canceled + - incomplete + - incomplete_expired + - past_due + - unpaid + - paused + metadata: + type: object + properties: {} + nullable: true + cancelAtPeriodEnd: + type: boolean + created: + type: string + format: date-time + nullable: true + currentPeriodStart: + type: string + format: date-time + nullable: true + currentPeriodEnd: + type: string + format: date-time + nullable: true + endedAt: + type: string + format: date-time + nullable: true + cancelAt: + type: string + format: date-time + nullable: true + canceledAt: + type: string + format: date-time + nullable: true + trialStart: + type: string + format: date-time + nullable: true + trialEnd: + type: string + format: date-time + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + required: + - id + - organizationId + - stripeSubscriptionId + - status + - cancelAtPeriodEnd + - created + - currentPeriodStart + - currentPeriodEnd + - createdAt + - updatedAt + nullable: true + required: + - id + - organizationSubscriptionId + - teamId + - stripePriceId + - tier + - createdAt + - updatedAt + nullable: true + required: + - id + - name + - organizationId + - createdById + - createdAt + - updatedAt + - organization + - createdBy + - bots + - socialAccounts + - usage + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: schema: type: object properties: @@ -911,11 +928,16 @@ paths: type: string required: - message - delete: - summary: Delete many uploads + patch: + summary: Update team tags: *ref_0 - parameters: [] - operationId: upload.deleteMany + parameters: + - name: id + in: path + required: true + schema: + type: string + operationId: team.updateTeam requestBody: description: Body content: @@ -923,89 +945,51 @@ paths: schema: type: object properties: - ids: - type: array - items: - type: string - minItems: 1 - required: - - ids + name: + type: string + minLength: 3 + maxLength: 80 + avatarUrl: + type: string + nullable: true responses: '200': description: '200' content: application/json: schema: - type: array - items: - type: object - properties: - id: - type: string - teamId: - type: string - expiresAt: - type: string - format: date-time - nullable: true - iconUrl: - type: string - format: uri - nullable: true - thumbnailUrl: - type: string - format: uri - nullable: true - url: - type: string - format: uri - nullable: true - iconPath: - type: string - nullable: true - thumbnailPath: - type: string - nullable: true - path: - type: string - nullable: true - type: - type: string - enum: - - image - - video - width: - type: number - nullable: true - height: - type: number - nullable: true - fileSize: - type: number - nullable: true - videoLength: - type: number - nullable: true - mime: - type: string - nullable: true - ext: - type: string - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - required: - - id - - teamId - - type - - createdAt - - updatedAt + type: object + properties: + id: + type: string + name: + type: string + avatarUrl: + type: string + nullable: true + organizationId: + type: string + createdById: + type: string + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - name + - organizationId + - createdById + - createdAt + - updatedAt '400': description: '400' content: @@ -1089,9 +1073,8 @@ paths: type: string required: - message - /api/v1/upload/{id}: - get: - summary: Get upload + delete: + summary: Delete team tags: *ref_0 parameters: - name: id @@ -1099,7 +1082,7 @@ paths: required: true schema: type: string - operationId: upload.get + operationId: team.deleteTeam responses: '200': description: '200' @@ -1110,56 +1093,15 @@ paths: properties: id: type: string - teamId: - type: string - expiresAt: - type: string - format: date-time - nullable: true - iconUrl: - type: string - format: uri - nullable: true - thumbnailUrl: - type: string - format: uri - nullable: true - url: - type: string - format: uri - nullable: true - iconPath: - type: string - nullable: true - thumbnailPath: - type: string - nullable: true - path: + name: type: string - nullable: true - type: + avatarUrl: type: string - enum: - - image - - video - width: - type: number - nullable: true - height: - type: number - nullable: true - fileSize: - type: number nullable: true - videoLength: - type: number - nullable: true - mime: + organizationId: type: string - nullable: true - ext: + createdById: type: string - nullable: true createdAt: type: string format: date-time @@ -1168,10 +1110,15 @@ paths: type: string format: date-time nullable: true + deletedAt: + type: string + format: date-time + nullable: true required: - id - - teamId - - type + - name + - organizationId + - createdById - createdAt - updatedAt '400': @@ -1257,16 +1204,34 @@ paths: type: string required: - message - delete: - summary: Delete upload + /api/v1/team/: + post: + summary: Create new team tags: *ref_0 - parameters: - - name: id - in: path - required: true - schema: - type: string - operationId: upload.delete + parameters: [] + operationId: team.createTeam + requestBody: + description: Body + content: + application/json: + schema: + type: object + properties: + name: + type: string + minLength: 3 + maxLength: 80 + tier: + type: string + enum: + - FREE + - PRO + avatarUrl: + type: string + nullable: true + required: + - name + - tier responses: '200': description: '200' @@ -1277,56 +1242,15 @@ paths: properties: id: type: string - teamId: - type: string - expiresAt: - type: string - format: date-time - nullable: true - iconUrl: - type: string - format: uri - nullable: true - thumbnailUrl: - type: string - format: uri - nullable: true - url: - type: string - format: uri - nullable: true - iconPath: - type: string - nullable: true - thumbnailPath: - type: string - nullable: true - path: + name: type: string - nullable: true - type: + avatarUrl: type: string - enum: - - image - - video - width: - type: number - nullable: true - height: - type: number - nullable: true - fileSize: - type: number - nullable: true - videoLength: - type: number nullable: true - mime: + organizationId: type: string - nullable: true - ext: + createdById: type: string - nullable: true createdAt: type: string format: date-time @@ -1335,10 +1259,15 @@ paths: type: string format: date-time nullable: true + deletedAt: + type: string + format: date-time + nullable: true required: - id - - teamId - - type + - name + - organizationId + - createdById - createdAt - updatedAt '400': @@ -1424,13 +1353,13 @@ paths: type: string required: - message - /api/v1/post/: + /api/v1/social-account/connect: post: - summary: Create post + summary: Generate OAuth URL tags: &ref_1 - - post + - socialAccount parameters: [] - operationId: post.create + operationId: socialAccount.connect requestBody: description: Body content: @@ -1438,19 +1367,168 @@ paths: schema: type: object properties: - title: + type: type: string - minLength: 1 - postDate: + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - LINKEDIN + - PINTEREST + - REDDIT + - DISCORD + - SLACK + teamId: type: string - status: + redirectUrl: type: string - enum: - - DRAFT - - SCHEDULED - socialAccountTypes: - type: array - items: + format: uri + required: + - type + - teamId + - redirectUrl + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + url: + type: string + description: >- + OAuth URL - Redirect user to this URL to connect social + account + required: + - url + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + /api/v1/social-account/disconnect: + delete: + summary: Disconnect social account from team + tags: *ref_1 + parameters: [] + operationId: socialAccount.disconnect + requestBody: + description: Body + content: + application/json: + schema: + type: object + properties: + type: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - LINKEDIN + - PINTEREST + - REDDIT + - DISCORD + - SLACK + teamId: + type: string + required: + - type + - teamId + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + id: + type: string + type: type: string enum: - TIKTOK @@ -1465,321 +1543,390 @@ paths: - TELEGRAM - DISCORD - SLACK - minItems: 1 - data: - type: object - properties: - TWITTER: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - PINTEREST: + teamId: + type: string + username: + type: string + nullable: true + displayName: + type: string + nullable: true + externalId: + type: string + nullable: true + userUsername: + type: string + nullable: true + userDisplayName: + type: string + nullable: true + userId: + type: string + nullable: true + channels: + type: array + items: type: object properties: - text: - type: string - nullable: true - description: - type: string - nullable: true - boardName: - type: string - uploadIds: - type: array - items: - type: string - nullable: true - link: + id: type: string - nullable: true - description: The URL to which the Pin will link to. - altText: + name: type: string nullable: true - description: >- - The alt text for the image. This is used by screen - readers and when the image can't be loaded. - note: + username: type: string nullable: true - description: >- - A note about the Pin. This is not visible to the - public. - dominantColor: - type: string + webhook: + type: object + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + avatar: + type: string + nullable: true + url: + type: string + nullable: true nullable: true - description: >- - The dominant color of the image. This is used to - display the image before it's loaded. required: - - boardName - nullable: true - FACEBOOK: + - id + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - type + - teamId + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: type: object properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: + message: type: string - nullable: true - uploadIds: + path: type: array items: - type: string + oneOf: + - type: string + - type: number nullable: true - nullable: true - INSTAGRAM: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - TIKTOK: + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + /api/v1/social-account/set-channel: + post: + summary: Set channel for social account + tags: *ref_1 + parameters: [] + operationId: socialAccount.setChannel + requestBody: + description: Body + content: + application/json: + schema: + type: object + properties: + type: + type: string + enum: + - FACEBOOK + - INSTAGRAM + - LINKEDIN + - YOUTUBE + teamId: + type: string + channelId: + type: string + required: + - type + - teamId + - channelId + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + id: + type: string + type: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - THREADS + - LINKEDIN + - PINTEREST + - REDDIT + - TELEGRAM + - DISCORD + - SLACK + teamId: + type: string + username: + type: string + nullable: true + displayName: + type: string + nullable: true + externalId: + type: string + nullable: true + userUsername: + type: string + nullable: true + userDisplayName: + type: string + nullable: true + userId: + type: string + nullable: true + channels: + type: array + items: type: object properties: - text: + id: type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - privacy: + name: type: string - enum: - - SELF_ONLY - - PUBLIC_TO_EVERYONE - - MUTUAL_FOLLOW_FRIENDS - - FOLLOWER_OF_CREATOR - nullable: true - isBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if the video is a paid partnership to - promote a third-party business. - isOrganicBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if this video is promoting the creator's - own business. - disableComments: - default: false - type: boolean nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make comments on this post. - disableDuet: - default: false - type: boolean + username: + type: string nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make Stitches using this post. - disableStitch: - default: false - type: boolean + webhook: + type: object + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + avatar: + type: string + nullable: true + url: + type: string + nullable: true nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make Duets using this post. - nullable: true - LINKEDIN: + required: + - id + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - type + - teamId + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: type: object properties: - text: + message: type: string - uploadIds: + path: type: array items: - type: string - nullable: true - privacy: - type: string - enum: - - CONNECTIONS - - PUBLIC - - LOGGED_IN - - CONTAINER - nullable: true - hideFromFeed: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post shouldn't be displayed in - the main feed. - disableReshare: - default: false - type: boolean + oneOf: + - type: string + - type: number nullable: true - description: >- - Set to true if the post is not allowed to be - reshared. required: - - text - nullable: true - YOUTUBE: - type: object - properties: - type: - default: SHORT - type: string - enum: - - VIDEO - - SHORT - uploadIds: - type: array - items: - type: string - nullable: true - text: - type: string - nullable: true - description: - type: string - nullable: true - privacy: - type: string - enum: - - PRIVATE - - PUBLIC - - UNLISTED - nullable: true - madeForKids: - default: false - type: boolean - nullable: true - description: Set to true if the video is made for kids. - nullable: true - REDDIT: - type: object - properties: - sr: - type: string - description: >- - Subreddit name. Example: r/subredditName or - u/username - text: - type: string - description: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - link: - type: string - nullable: true - description: The URL to which the post will link to. - nsfw: - default: false - type: boolean - nullable: true - description: Set to true if the post is NSFW. - required: - - sr - - text - nullable: true - DISCORD: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: Avatar url to display as the author of the message. - required: - - channelId - nullable: true - SLACK: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: Avatar url to display as the author of the message. - required: - - channelId - nullable: true - TELEGRAM: - type: object - properties: {} - nullable: true - THREADS: - type: object - properties: {} - nullable: true + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + /api/v1/social-account/refresh-channels: + post: + summary: Refresh channels for social account + tags: *ref_1 + parameters: [] + operationId: socialAccount.refreshChannels + requestBody: + description: Body + content: + application/json: + schema: + type: object + properties: + type: + type: string + enum: + - DISCORD + - SLACK + - REDDIT + - PINTEREST + teamId: + type: string required: - - title - - postDate - - status - - socialAccountTypes - - data + - type + - teamId responses: '200': description: '200' @@ -1790,1566 +1937,2272 @@ paths: properties: id: type: string + type: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - THREADS + - LINKEDIN + - PINTEREST + - REDDIT + - TELEGRAM + - DISCORD + - SLACK teamId: type: string - title: + username: type: string - postDate: + nullable: true + displayName: type: string - format: date-time nullable: true - postedDate: + externalId: type: string - format: date-time nullable: true - status: + userUsername: type: string - enum: - - DRAFT - - SCHEDULED - - POSTED - - ERROR - - DELETED - - PROCESSING - data: - type: object - properties: - TWITTER: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - PINTEREST: - type: object - properties: - text: - type: string - nullable: true - description: - type: string - nullable: true - boardName: - type: string - uploadIds: - type: array - items: + nullable: true + userDisplayName: + type: string + nullable: true + userId: + type: string + nullable: true + channels: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + nullable: true + username: + type: string + nullable: true + webhook: + type: object + properties: + id: type: string - nullable: true - link: + nullable: true + name: + type: string + nullable: true + avatar: + type: string + nullable: true + url: + type: string + nullable: true + nullable: true + required: + - id + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - type + - teamId + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + /api/v1/upload/: + get: + summary: Get upload list + tags: &ref_2 + - upload + parameters: + - name: teamId + in: query + required: true + schema: + type: string + operationId: upload.getList + responses: + '200': + description: '200' + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + teamId: + type: string + expiresAt: + type: string + format: date-time + nullable: true + iconUrl: + type: string + format: uri + nullable: true + thumbnailUrl: + type: string + format: uri + nullable: true + url: + type: string + format: uri + nullable: true + iconPath: + type: string + nullable: true + thumbnailPath: + type: string + nullable: true + path: + type: string + nullable: true + type: + type: string + enum: + - image + - video + width: + type: number + nullable: true + height: + type: number + nullable: true + fileSize: + type: number + nullable: true + videoLength: + type: number + nullable: true + mime: + type: string + nullable: true + ext: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + posts: + type: array + items: + type: object + properties: + postId: type: string - nullable: true - description: The URL to which the Pin will link to. - altText: + uploadId: + type: string + createdAt: type: string + format: date-time nullable: true - description: >- - The alt text for the image. This is used by screen - readers and when the image can't be loaded. - note: + updatedAt: type: string + format: date-time nullable: true - description: >- - A note about the Pin. This is not visible to the - public. - dominantColor: + deletedAt: type: string + format: date-time nullable: true - description: >- - The dominant color of the image. This is used to - display the image before it's loaded. required: - - boardName - nullable: true - FACEBOOK: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - INSTAGRAM: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - TIKTOK: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - privacy: - type: string - enum: - - SELF_ONLY - - PUBLIC_TO_EVERYONE - - MUTUAL_FOLLOW_FRIENDS - - FOLLOWER_OF_CREATOR - nullable: true - isBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if the video is a paid partnership to - promote a third-party business. - isOrganicBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if this video is promoting the - creator's own business. - disableComments: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make comments on this post. - disableDuet: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make Stitches using this post. - disableStitch: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make Duets using this post. - nullable: true - LINKEDIN: - type: object - properties: - text: - type: string - uploadIds: - type: array - items: - type: string - nullable: true - privacy: - type: string - enum: - - CONNECTIONS - - PUBLIC - - LOGGED_IN - - CONTAINER - nullable: true - hideFromFeed: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post shouldn't be displayed in - the main feed. - disableReshare: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post is not allowed to be - reshared. - required: - - text - nullable: true - YOUTUBE: - type: object - properties: - type: - default: SHORT - type: string - enum: - - VIDEO - - SHORT - uploadIds: - type: array - items: - type: string - nullable: true - text: - type: string - nullable: true - description: - type: string - nullable: true - privacy: - type: string - enum: - - PRIVATE - - PUBLIC - - UNLISTED - nullable: true - madeForKids: - default: false - type: boolean - nullable: true - description: Set to true if the video is made for kids. - nullable: true - REDDIT: - type: object - properties: - sr: - type: string - description: >- - Subreddit name. Example: r/subredditName or - u/username - text: - type: string - description: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - link: - type: string - nullable: true - description: The URL to which the post will link to. - nsfw: - default: false - type: boolean - nullable: true - description: Set to true if the post is NSFW. - required: - - sr - - text - nullable: true - DISCORD: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: >- - Avatar url to display as the author of the - message. - required: - - channelId - nullable: true - SLACK: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: >- - Avatar url to display as the author of the - message. - required: - - channelId - nullable: true - TELEGRAM: - type: object - properties: {} - nullable: true - THREADS: - type: object - properties: {} - nullable: true - error: - type: string - nullable: true - errors: - type: object - properties: - TWITTER: - type: string - nullable: true - PINTEREST: - type: string - nullable: true - FACEBOOK: - type: string - nullable: true - INSTAGRAM: - type: string - nullable: true - TIKTOK: - type: string - nullable: true - LINKEDIN: - type: string - nullable: true - REDDIT: - type: string - nullable: true - DISCORD: - type: string - nullable: true - SLACK: - type: string - nullable: true - YOUTUBE: - type: string - nullable: true - TELEGRAM: - type: string - nullable: true - THREADS: - type: string - nullable: true - nullable: true - externalData: - type: object - properties: - TWITTER: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - PINTEREST: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - FACEBOOK: - type: object - properties: - id: - type: string - nullable: true - postId: - type: string - nullable: true - videoId: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - INSTAGRAM: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - TIKTOK: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - LINKEDIN: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - REDDIT: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - subreddit_name: - type: string - nullable: true - nullable: true - DISCORD: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - channelId: - type: string - nullable: true - nullable: true - SLACK: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - channelId: - type: string - nullable: true - nullable: true - YOUTUBE: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - TELEGRAM: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - THREADS: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - required: - - id - - teamId - - title - - postDate - - status - - data - - createdAt - - updatedAt - '400': - description: '400' - content: - application/json: - schema: - type: object - properties: - message: - type: string - issues: - type: array - items: - type: object - properties: - message: - type: string - path: - type: array - items: - oneOf: - - type: string - - type: number - nullable: true - required: - - message - nullable: true - required: - - message - '401': - description: '401' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: '403' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '404': - description: '404' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '429': - description: '429' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '500': - description: '500' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - get: - summary: Get post list - tags: *ref_1 - parameters: - - name: status - in: query - schema: - type: string - enum: - - DRAFT - - SCHEDULED - - POSTED - - ERROR - - DELETED - - PROCESSING - nullable: true - - name: orderBy - in: query - schema: - type: string - enum: - - createdAt - - updatedAt - - postDate - - postedDate - - deletedAt - nullable: true - - name: order - in: query - schema: - type: string - enum: - - ASC - - DESC - nullable: true - - name: q - in: query - schema: - type: string - nullable: true - - name: platforms - in: query - schema: - type: array - items: - type: string - enum: - - TIKTOK - - YOUTUBE - - INSTAGRAM - - FACEBOOK - - TWITTER - - THREADS - - LINKEDIN - - PINTEREST - - REDDIT - - TELEGRAM - - DISCORD - - SLACK - nullable: true - - name: offset - in: query - schema: - default: 0 - type: number - nullable: true - - name: limit - in: query - schema: - default: 10 - type: number - nullable: true - operationId: post.getList - responses: - '200': - description: '200' - content: - application/json: - schema: - type: object - properties: - items: - type: array - items: - type: object - properties: - id: - type: string - teamId: - type: string - title: - type: string - postDate: - type: string - format: date-time - nullable: true - postedDate: - type: string - format: date-time - nullable: true - status: - type: string - enum: - - DRAFT - - SCHEDULED - - POSTED - - ERROR - - DELETED - - PROCESSING - data: - type: object - properties: - TWITTER: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - PINTEREST: - type: object - properties: - text: - type: string - nullable: true - description: - type: string - nullable: true - boardName: - type: string - uploadIds: - type: array - items: - type: string - nullable: true - link: - type: string - nullable: true - description: The URL to which the Pin will link to. - altText: - type: string - nullable: true - description: >- - The alt text for the image. This is used by - screen readers and when the image can't be - loaded. - note: - type: string - nullable: true - description: >- - A note about the Pin. This is not visible to - the public. - dominantColor: - type: string - nullable: true - description: >- - The dominant color of the image. This is - used to display the image before it's - loaded. - required: - - boardName - nullable: true - FACEBOOK: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - INSTAGRAM: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - TIKTOK: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - privacy: - type: string - enum: - - SELF_ONLY - - PUBLIC_TO_EVERYONE - - MUTUAL_FOLLOW_FRIENDS - - FOLLOWER_OF_CREATOR - nullable: true - isBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if the video is a paid - partnership to promote a third-party - business. - isOrganicBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if this video is promoting the - creator's own business. - disableComments: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not - be allowed to make comments on this post. - disableDuet: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not - be allowed to make Stitches using this post. - disableStitch: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not - be allowed to make Duets using this post. - nullable: true - LINKEDIN: - type: object - properties: - text: - type: string - uploadIds: - type: array - items: - type: string - nullable: true - privacy: - type: string - enum: - - CONNECTIONS - - PUBLIC - - LOGGED_IN - - CONTAINER - nullable: true - hideFromFeed: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post shouldn't be - displayed in the main feed. - disableReshare: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post is not allowed to be - reshared. - required: - - text - nullable: true - YOUTUBE: - type: object - properties: - type: - default: SHORT - type: string - enum: - - VIDEO - - SHORT - uploadIds: - type: array - items: - type: string - nullable: true - text: - type: string - nullable: true - description: - type: string - nullable: true - privacy: - type: string - enum: - - PRIVATE - - PUBLIC - - UNLISTED - nullable: true - madeForKids: - default: false - type: boolean - nullable: true - description: Set to true if the video is made for kids. - nullable: true - REDDIT: - type: object - properties: - sr: - type: string - description: >- - Subreddit name. Example: r/subredditName or - u/username - text: - type: string - description: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - link: - type: string - nullable: true - description: The URL to which the post will link to. - nsfw: - default: false - type: boolean - nullable: true - description: Set to true if the post is NSFW. - required: - - sr - - text - nullable: true - DISCORD: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: >- - Avatar url to display as the author of the - message. - required: - - channelId - nullable: true - SLACK: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: >- - Avatar url to display as the author of the - message. - required: - - channelId - nullable: true - TELEGRAM: - type: object - properties: {} - nullable: true - THREADS: - type: object - properties: {} - nullable: true - error: + - postId + - uploadId + - createdAt + - updatedAt + required: + - id + - teamId + - type + - createdAt + - updatedAt + - posts + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + post: + description: Upload a file. This is the only endpoint that uses multipart/form-data. + summary: Create upload + tags: *ref_2 + parameters: [] + operationId: upload.create + requestBody: + description: Body + content: + multipart/form-data: + schema: + type: object + properties: + teamId: + type: string + file: + nullable: true + type: string + format: binary + required: + - teamId + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + id: + type: string + teamId: + type: string + expiresAt: + type: string + format: date-time + nullable: true + iconUrl: + type: string + format: uri + nullable: true + thumbnailUrl: + type: string + format: uri + nullable: true + url: + type: string + format: uri + nullable: true + iconPath: + type: string + nullable: true + thumbnailPath: + type: string + nullable: true + path: + type: string + nullable: true + type: + type: string + enum: + - image + - video + width: + type: number + nullable: true + height: + type: number + nullable: true + fileSize: + type: number + nullable: true + videoLength: + type: number + nullable: true + mime: + type: string + nullable: true + ext: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + required: + - id + - teamId + - type + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + delete: + summary: Delete many uploads + tags: *ref_2 + parameters: [] + operationId: upload.deleteMany + requestBody: + description: Body + content: + application/json: + schema: + type: object + properties: + ids: + type: array + items: + type: string + minItems: 1 + required: + - ids + responses: + '200': + description: '200' + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + teamId: + type: string + expiresAt: + type: string + format: date-time + nullable: true + iconUrl: + type: string + format: uri + nullable: true + thumbnailUrl: + type: string + format: uri + nullable: true + url: + type: string + format: uri + nullable: true + iconPath: + type: string + nullable: true + thumbnailPath: + type: string + nullable: true + path: + type: string + nullable: true + type: + type: string + enum: + - image + - video + width: + type: number + nullable: true + height: + type: number + nullable: true + fileSize: + type: number + nullable: true + videoLength: + type: number + nullable: true + mime: + type: string + nullable: true + ext: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + required: + - id + - teamId + - type + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + /api/v1/upload/{id}: + get: + summary: Get upload + tags: *ref_2 + parameters: + - name: id + in: path + required: true + schema: + type: string + operationId: upload.get + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + id: + type: string + teamId: + type: string + expiresAt: + type: string + format: date-time + nullable: true + iconUrl: + type: string + format: uri + nullable: true + thumbnailUrl: + type: string + format: uri + nullable: true + url: + type: string + format: uri + nullable: true + iconPath: + type: string + nullable: true + thumbnailPath: + type: string + nullable: true + path: + type: string + nullable: true + type: + type: string + enum: + - image + - video + width: + type: number + nullable: true + height: + type: number + nullable: true + fileSize: + type: number + nullable: true + videoLength: + type: number + nullable: true + mime: + type: string + nullable: true + ext: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + required: + - id + - teamId + - type + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + delete: + summary: Delete upload + tags: *ref_2 + parameters: + - name: id + in: path + required: true + schema: + type: string + operationId: upload.delete + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + id: + type: string + teamId: + type: string + expiresAt: + type: string + format: date-time + nullable: true + iconUrl: + type: string + format: uri + nullable: true + thumbnailUrl: + type: string + format: uri + nullable: true + url: + type: string + format: uri + nullable: true + iconPath: + type: string + nullable: true + thumbnailPath: + type: string + nullable: true + path: + type: string + nullable: true + type: + type: string + enum: + - image + - video + width: + type: number + nullable: true + height: + type: number + nullable: true + fileSize: + type: number + nullable: true + videoLength: + type: number + nullable: true + mime: + type: string + nullable: true + ext: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + required: + - id + - teamId + - type + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + /api/v1/post/{id}: + get: + summary: Get post + tags: &ref_3 + - post + parameters: + - name: id + in: path + required: true + schema: + type: string + operationId: post.get + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + id: + type: string + teamId: + type: string + title: + type: string + postDate: + type: string + format: date-time + nullable: true + postedDate: + type: string + format: date-time + nullable: true + status: + type: string + enum: + - DRAFT + - SCHEDULED + - POSTED + - ERROR + - DELETED + - PROCESSING + data: + type: object + properties: + TWITTER: + type: object + properties: + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + PINTEREST: + type: object + properties: + text: + type: string + nullable: true + description: + type: string + nullable: true + boardName: + type: string + uploadIds: + type: array + items: + type: string + nullable: true + link: + type: string + nullable: true + description: The URL to which the Pin will link to. + altText: + type: string + nullable: true + description: >- + The alt text for the image. This is used by screen + readers and when the image can't be loaded. + note: + type: string + nullable: true + description: >- + A note about the Pin. This is not visible to the + public. + dominantColor: + type: string + nullable: true + description: >- + The dominant color of the image. This is used to + display the image before it's loaded. + required: + - boardName + nullable: true + FACEBOOK: + type: object + properties: + type: + default: POST + type: string + enum: + - POST + - REEL + - STORY + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + INSTAGRAM: + type: object + properties: + type: + default: POST + type: string + enum: + - POST + - REEL + - STORY + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + TIKTOK: + type: object + properties: + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + privacy: + type: string + enum: + - SELF_ONLY + - PUBLIC_TO_EVERYONE + - MUTUAL_FOLLOW_FRIENDS + - FOLLOWER_OF_CREATOR + nullable: true + isBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if the video is a paid partnership to + promote a third-party business. + isOrganicBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if this video is promoting the + creator's own business. + disableComments: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make comments on this post. + disableDuet: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make Stitches using this post. + disableStitch: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make Duets using this post. + nullable: true + LINKEDIN: + type: object + properties: + text: + type: string + uploadIds: + type: array + items: + type: string + nullable: true + privacy: + type: string + enum: + - CONNECTIONS + - PUBLIC + - LOGGED_IN + - CONTAINER + nullable: true + hideFromFeed: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post shouldn't be displayed in + the main feed. + disableReshare: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post is not allowed to be + reshared. + required: + - text + nullable: true + YOUTUBE: + type: object + properties: + type: + default: SHORT + type: string + enum: + - VIDEO + - SHORT + uploadIds: + type: array + items: + type: string + nullable: true + text: + type: string + nullable: true + description: + type: string + nullable: true + privacy: + type: string + enum: + - PRIVATE + - PUBLIC + - UNLISTED + nullable: true + madeForKids: + default: false + type: boolean + nullable: true + description: Set to true if the video is made for kids. + nullable: true + REDDIT: + type: object + properties: + sr: + type: string + description: >- + Subreddit name. Example: r/subredditName or + u/username + text: + type: string + description: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + link: + type: string + nullable: true + description: The URL to which the post will link to. + nsfw: + default: false + type: boolean + nullable: true + description: Set to true if the post is NSFW. + required: + - sr + - text + nullable: true + DISCORD: + type: object + properties: + channelId: + type: string + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: >- + Avatar url to display as the author of the + message. + required: + - channelId + nullable: true + SLACK: + type: object + properties: + channelId: + type: string + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: >- + Avatar url to display as the author of the + message. + required: + - channelId + nullable: true + TELEGRAM: + type: object + properties: {} + nullable: true + THREADS: + type: object + properties: {} + nullable: true + error: + type: string + nullable: true + errors: + type: object + properties: + TWITTER: + type: string + nullable: true + PINTEREST: + type: string + nullable: true + FACEBOOK: + type: string + nullable: true + INSTAGRAM: + type: string + nullable: true + TIKTOK: + type: string + nullable: true + LINKEDIN: + type: string + nullable: true + REDDIT: + type: string + nullable: true + DISCORD: + type: string + nullable: true + SLACK: + type: string + nullable: true + YOUTUBE: + type: string + nullable: true + TELEGRAM: + type: string + nullable: true + THREADS: + type: string + nullable: true + nullable: true + externalData: + type: object + properties: + TWITTER: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + PINTEREST: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + FACEBOOK: + type: object + properties: + id: + type: string + nullable: true + postId: + type: string + nullable: true + videoId: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + INSTAGRAM: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + TIKTOK: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + LINKEDIN: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + REDDIT: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + subreddit_name: + type: string + nullable: true + nullable: true + DISCORD: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + channelId: + type: string + nullable: true + nullable: true + SLACK: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + channelId: + type: string + nullable: true + nullable: true + YOUTUBE: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + TELEGRAM: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + THREADS: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + uploads: + type: array + items: + type: object + properties: + postId: type: string + uploadId: + type: string + createdAt: + type: string + format: date-time nullable: true - errors: + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + upload: type: object properties: - TWITTER: + id: + type: string + teamId: + type: string + expiresAt: type: string + format: date-time nullable: true - PINTEREST: + iconUrl: type: string + format: uri nullable: true - FACEBOOK: + thumbnailUrl: type: string + format: uri nullable: true - INSTAGRAM: + url: type: string + format: uri nullable: true - TIKTOK: + iconPath: type: string nullable: true - LINKEDIN: + thumbnailPath: type: string nullable: true - REDDIT: + path: type: string nullable: true - DISCORD: + type: type: string + enum: + - image + - video + width: + type: number nullable: true - SLACK: + height: + type: number + nullable: true + fileSize: + type: number + nullable: true + videoLength: + type: number + nullable: true + mime: type: string nullable: true - YOUTUBE: + ext: type: string nullable: true - TELEGRAM: + createdAt: type: string + format: date-time nullable: true - THREADS: + updatedAt: type: string + format: date-time nullable: true + required: + - id + - teamId + - type + - createdAt + - updatedAt + required: + - postId + - uploadId + - createdAt + - updatedAt + - upload + socialAccounts: + type: array + items: + type: object + properties: + postId: + type: string + socialAccountId: + type: string + createdAt: + type: string + format: date-time nullable: true - externalData: + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + socialAccount: type: object properties: - TWITTER: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - PINTEREST: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - FACEBOOK: - type: object - properties: - id: - type: string - nullable: true - postId: - type: string - nullable: true - videoId: - type: string - nullable: true - permalink: - type: string - nullable: true + id: + type: string + type: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - THREADS + - LINKEDIN + - PINTEREST + - REDDIT + - TELEGRAM + - DISCORD + - SLACK + teamId: + type: string + username: + type: string nullable: true - INSTAGRAM: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true + displayName: + type: string nullable: true - TIKTOK: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true + externalId: + type: string nullable: true - LINKEDIN: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true + userUsername: + type: string nullable: true - REDDIT: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - subreddit_name: - type: string - nullable: true + userDisplayName: + type: string nullable: true - DISCORD: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - channelId: - type: string - nullable: true + userId: + type: string nullable: true - SLACK: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - channelId: - type: string - nullable: true + channels: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + nullable: true + username: + type: string + nullable: true + webhook: + type: object + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + avatar: + type: string + nullable: true + url: + type: string + nullable: true + nullable: true + required: + - id nullable: true - YOUTUBE: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true + createdAt: + type: string + format: date-time nullable: true - TELEGRAM: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true + updatedAt: + type: string + format: date-time nullable: true - THREADS: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true + deletedAt: + type: string + format: date-time nullable: true + required: + - id + - type + - teamId + - createdAt + - updatedAt + required: + - postId + - socialAccountId + - createdAt + - updatedAt + - socialAccount + required: + - id + - teamId + - title + - postDate + - status + - data + - createdAt + - updatedAt + - uploads + - socialAccounts + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + patch: + summary: Update post + tags: *ref_3 + parameters: + - name: id + in: path + required: true + schema: + type: string + operationId: post.update + requestBody: + description: Body + content: + application/json: + schema: + type: object + properties: + title: + type: string + minLength: 1 + postDate: + type: string + status: + type: string + enum: + - DRAFT + - SCHEDULED + socialAccountTypes: + type: array + items: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - THREADS + - LINKEDIN + - PINTEREST + - REDDIT + - TELEGRAM + - DISCORD + - SLACK + minItems: 1 + data: + type: object + properties: + TWITTER: + type: object + properties: + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + PINTEREST: + type: object + properties: + text: + type: string + nullable: true + description: + type: string + nullable: true + boardName: + type: string + uploadIds: + type: array + items: + type: string + nullable: true + link: + type: string + nullable: true + description: The URL to which the Pin will link to. + altText: + type: string + nullable: true + description: >- + The alt text for the image. This is used by screen + readers and when the image can't be loaded. + note: + type: string + nullable: true + description: >- + A note about the Pin. This is not visible to the + public. + dominantColor: + type: string + nullable: true + description: >- + The dominant color of the image. This is used to + display the image before it's loaded. + required: + - boardName + nullable: true + FACEBOOK: + type: object + properties: + type: + default: POST + type: string + enum: + - POST + - REEL + - STORY + text: + type: string nullable: true - createdAt: + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + INSTAGRAM: + type: object + properties: + type: + default: POST + type: string + enum: + - POST + - REEL + - STORY + text: type: string - format: date-time nullable: true - updatedAt: + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + TIKTOK: + type: object + properties: + text: type: string - format: date-time nullable: true - deletedAt: + uploadIds: + type: array + items: + type: string + nullable: true + privacy: type: string - format: date-time + enum: + - SELF_ONLY + - PUBLIC_TO_EVERYONE + - MUTUAL_FOLLOW_FRIENDS + - FOLLOWER_OF_CREATOR nullable: true - uploads: + isBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if the video is a paid partnership to + promote a third-party business. + isOrganicBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if this video is promoting the creator's + own business. + disableComments: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make comments on this post. + disableDuet: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make Stitches using this post. + disableStitch: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make Duets using this post. + nullable: true + LINKEDIN: + type: object + properties: + text: + type: string + uploadIds: type: array items: - type: object - properties: - postId: - type: string - uploadId: - type: string - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - upload: - type: object - properties: - id: - type: string - teamId: - type: string - expiresAt: - type: string - format: date-time - nullable: true - iconUrl: - type: string - format: uri - nullable: true - thumbnailUrl: - type: string - format: uri - nullable: true - url: - type: string - format: uri - nullable: true - iconPath: - type: string - nullable: true - thumbnailPath: - type: string - nullable: true - path: - type: string - nullable: true - type: - type: string - enum: - - image - - video - width: - type: number - nullable: true - height: - type: number - nullable: true - fileSize: - type: number - nullable: true - videoLength: - type: number - nullable: true - mime: - type: string - nullable: true - ext: - type: string - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - required: - - id - - teamId - - type - - createdAt - - updatedAt - required: - - postId - - uploadId - - createdAt - - updatedAt - - upload - socialAccounts: + type: string + nullable: true + privacy: + type: string + enum: + - CONNECTIONS + - PUBLIC + - LOGGED_IN + - CONTAINER + nullable: true + hideFromFeed: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post shouldn't be displayed in + the main feed. + disableReshare: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post is not allowed to be + reshared. + required: + - text + nullable: true + YOUTUBE: + type: object + properties: + type: + default: SHORT + type: string + enum: + - VIDEO + - SHORT + uploadIds: + type: array + items: + type: string + nullable: true + text: + type: string + nullable: true + description: + type: string + nullable: true + privacy: + type: string + enum: + - PRIVATE + - PUBLIC + - UNLISTED + nullable: true + madeForKids: + default: false + type: boolean + nullable: true + description: Set to true if the video is made for kids. + nullable: true + REDDIT: + type: object + properties: + sr: + type: string + description: >- + Subreddit name. Example: r/subredditName or + u/username + text: + type: string + description: + type: string + nullable: true + uploadIds: type: array items: - type: object - properties: - postId: - type: string - socialAccountId: - type: string - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - socialAccount: - type: object - properties: - id: - type: string - type: - type: string - enum: - - TIKTOK - - YOUTUBE - - INSTAGRAM - - FACEBOOK - - TWITTER - - THREADS - - LINKEDIN - - PINTEREST - - REDDIT - - TELEGRAM - - DISCORD - - SLACK - teamId: - type: string - username: - type: string - nullable: true - displayName: - type: string - nullable: true - externalId: - type: string - nullable: true - userUsername: - type: string - nullable: true - userDisplayName: - type: string - nullable: true - userId: - type: string - nullable: true - channels: - type: array - items: - type: object - properties: - id: - type: string - name: - type: string - nullable: true - username: - type: string - nullable: true - webhook: - type: object - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - avatar: - type: string - nullable: true - url: - type: string - nullable: true - nullable: true - required: - - id - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - required: - - id - - type - - teamId - - createdAt - - updatedAt - required: - - postId - - socialAccountId - - createdAt - - updatedAt - - socialAccount + type: string + nullable: true + link: + type: string + nullable: true + description: The URL to which the post will link to. + nsfw: + default: false + type: boolean + nullable: true + description: Set to true if the post is NSFW. required: - - id - - teamId - - title - - postDate - - status - - data - - createdAt - - updatedAt - - uploads - - socialAccounts - total: - type: number - required: - - items - - total - '400': - description: '400' - content: - application/json: - schema: - type: object - properties: - message: - type: string - issues: - type: array - items: + - sr + - text + nullable: true + DISCORD: type: object properties: - message: + channelId: type: string - path: + text: + type: string + nullable: true + uploadIds: type: array items: - oneOf: - - type: string - - type: number + type: string nullable: true - required: - - message - nullable: true - required: - - message - '401': - description: '401' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: '403' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '404': - description: '404' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '429': - description: '429' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '500': - description: '500' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - /api/v1/post/{id}: - get: - summary: Get post - tags: *ref_1 - parameters: - - name: id - in: path - required: true - schema: - type: string - operationId: post.get + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: Avatar url to display as the author of the message. + required: + - channelId + nullable: true + SLACK: + type: object + properties: + channelId: + type: string + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: Avatar url to display as the author of the message. + required: + - channelId + nullable: true + TELEGRAM: + type: object + properties: {} + nullable: true + THREADS: + type: object + properties: {} + nullable: true responses: '200': description: '200' @@ -3814,739 +4667,889 @@ paths: permalink: type: string nullable: true - subreddit_name: - type: string + subreddit_name: + type: string + nullable: true + nullable: true + DISCORD: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + channelId: + type: string + nullable: true + nullable: true + SLACK: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + channelId: + type: string + nullable: true + nullable: true + YOUTUBE: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + TELEGRAM: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + THREADS: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - teamId + - title + - postDate + - status + - data + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + delete: + summary: Delete post + tags: *ref_3 + parameters: + - name: id + in: path + required: true + schema: + type: string + operationId: post.delete + responses: + '200': + description: '200' + content: + application/json: + schema: + type: object + properties: + id: + type: string + teamId: + type: string + title: + type: string + postDate: + type: string + format: date-time + nullable: true + postedDate: + type: string + format: date-time + nullable: true + status: + type: string + enum: + - DRAFT + - SCHEDULED + - POSTED + - ERROR + - DELETED + - PROCESSING + data: + type: object + properties: + TWITTER: + type: object + properties: + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string nullable: true nullable: true - DISCORD: + PINTEREST: type: object properties: - id: + text: type: string nullable: true - permalink: + description: type: string nullable: true - channelId: + boardName: type: string + uploadIds: + type: array + items: + type: string nullable: true - nullable: true - SLACK: - type: object - properties: - id: + link: type: string nullable: true - permalink: + description: The URL to which the Pin will link to. + altText: type: string nullable: true - channelId: + description: >- + The alt text for the image. This is used by screen + readers and when the image can't be loaded. + note: type: string nullable: true + description: >- + A note about the Pin. This is not visible to the + public. + dominantColor: + type: string + nullable: true + description: >- + The dominant color of the image. This is used to + display the image before it's loaded. + required: + - boardName nullable: true - YOUTUBE: + FACEBOOK: type: object properties: - id: + type: + default: POST type: string - nullable: true - permalink: + enum: + - POST + - REEL + - STORY + text: type: string nullable: true + uploadIds: + type: array + items: + type: string + nullable: true nullable: true - TELEGRAM: + INSTAGRAM: type: object properties: - id: + type: + default: POST type: string - nullable: true - permalink: + enum: + - POST + - REEL + - STORY + text: type: string nullable: true + uploadIds: + type: array + items: + type: string + nullable: true nullable: true - THREADS: + TIKTOK: type: object properties: - id: - type: string - nullable: true - permalink: + text: type: string nullable: true - nullable: true - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - uploads: - type: array - items: - type: object - properties: - postId: - type: string - uploadId: - type: string - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - upload: - type: object - properties: - id: - type: string - teamId: - type: string - expiresAt: - type: string - format: date-time - nullable: true - iconUrl: - type: string - format: uri - nullable: true - thumbnailUrl: - type: string - format: uri - nullable: true - url: - type: string - format: uri - nullable: true - iconPath: - type: string - nullable: true - thumbnailPath: - type: string - nullable: true - path: - type: string - nullable: true - type: - type: string - enum: - - image - - video - width: - type: number - nullable: true - height: - type: number - nullable: true - fileSize: - type: number - nullable: true - videoLength: - type: number - nullable: true - mime: - type: string - nullable: true - ext: - type: string - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - required: - - id - - teamId - - type - - createdAt - - updatedAt - required: - - postId - - uploadId - - createdAt - - updatedAt - - upload - socialAccounts: - type: array - items: - type: object - properties: - postId: - type: string - socialAccountId: - type: string - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - socialAccount: - type: object - properties: - id: - type: string - type: - type: string - enum: - - TIKTOK - - YOUTUBE - - INSTAGRAM - - FACEBOOK - - TWITTER - - THREADS - - LINKEDIN - - PINTEREST - - REDDIT - - TELEGRAM - - DISCORD - - SLACK - teamId: - type: string - username: - type: string - nullable: true - displayName: - type: string - nullable: true - externalId: - type: string - nullable: true - userUsername: + uploadIds: + type: array + items: type: string - nullable: true - userDisplayName: + nullable: true + privacy: + type: string + enum: + - SELF_ONLY + - PUBLIC_TO_EVERYONE + - MUTUAL_FOLLOW_FRIENDS + - FOLLOWER_OF_CREATOR + nullable: true + isBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if the video is a paid partnership to + promote a third-party business. + isOrganicBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if this video is promoting the + creator's own business. + disableComments: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make comments on this post. + disableDuet: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make Stitches using this post. + disableStitch: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make Duets using this post. + nullable: true + LINKEDIN: + type: object + properties: + text: + type: string + uploadIds: + type: array + items: type: string - nullable: true - userId: + nullable: true + privacy: + type: string + enum: + - CONNECTIONS + - PUBLIC + - LOGGED_IN + - CONTAINER + nullable: true + hideFromFeed: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post shouldn't be displayed in + the main feed. + disableReshare: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post is not allowed to be + reshared. + required: + - text + nullable: true + YOUTUBE: + type: object + properties: + type: + default: SHORT + type: string + enum: + - VIDEO + - SHORT + uploadIds: + type: array + items: type: string - nullable: true - channels: - type: array - items: - type: object - properties: - id: - type: string - name: - type: string - nullable: true - username: - type: string - nullable: true - webhook: - type: object - properties: - id: - type: string - nullable: true - name: - type: string - nullable: true - avatar: - type: string - nullable: true - url: - type: string - nullable: true - nullable: true - required: - - id - nullable: true - createdAt: + nullable: true + text: + type: string + nullable: true + description: + type: string + nullable: true + privacy: + type: string + enum: + - PRIVATE + - PUBLIC + - UNLISTED + nullable: true + madeForKids: + default: false + type: boolean + nullable: true + description: Set to true if the video is made for kids. + nullable: true + REDDIT: + type: object + properties: + sr: + type: string + description: >- + Subreddit name. Example: r/subredditName or + u/username + text: + type: string + description: + type: string + nullable: true + uploadIds: + type: array + items: type: string - format: date-time - nullable: true - updatedAt: + nullable: true + link: + type: string + nullable: true + description: The URL to which the post will link to. + nsfw: + default: false + type: boolean + nullable: true + description: Set to true if the post is NSFW. + required: + - sr + - text + nullable: true + DISCORD: + type: object + properties: + channelId: + type: string + text: + type: string + nullable: true + uploadIds: + type: array + items: type: string - format: date-time - nullable: true - deletedAt: + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: >- + Avatar url to display as the author of the + message. + required: + - channelId + nullable: true + SLACK: + type: object + properties: + channelId: + type: string + text: + type: string + nullable: true + uploadIds: + type: array + items: type: string - format: date-time - nullable: true - required: - - id - - type - - teamId - - createdAt - - updatedAt - required: - - postId - - socialAccountId - - createdAt - - updatedAt - - socialAccount - required: - - id - - teamId - - title - - postDate - - status - - data - - createdAt - - updatedAt - - uploads - - socialAccounts - '400': - description: '400' - content: - application/json: - schema: - type: object - properties: - message: + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: >- + Avatar url to display as the author of the + message. + required: + - channelId + nullable: true + TELEGRAM: + type: object + properties: {} + nullable: true + THREADS: + type: object + properties: {} + nullable: true + error: type: string - issues: - type: array - items: - type: object - properties: - message: - type: string - path: - type: array - items: - oneOf: - - type: string - - type: number - nullable: true - required: - - message nullable: true - required: - - message - '401': - description: '401' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: '403' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '404': - description: '404' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '429': - description: '429' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '500': - description: '500' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - put: - summary: Update post - tags: *ref_1 - parameters: - - name: id - in: path - required: true - schema: - type: string - operationId: post.update - requestBody: - description: Body - content: - application/json: - schema: - type: object - properties: - title: - type: string - minLength: 1 - postDate: - type: string - status: - type: string - enum: - - DRAFT - - SCHEDULED - socialAccountTypes: - type: array - items: - type: string - enum: - - TIKTOK - - YOUTUBE - - INSTAGRAM - - FACEBOOK - - TWITTER - - THREADS - - LINKEDIN - - PINTEREST - - REDDIT - - TELEGRAM - - DISCORD - - SLACK - minItems: 1 - data: - type: object - properties: - TWITTER: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: + errors: + type: object + properties: + TWITTER: + type: string + nullable: true + PINTEREST: + type: string + nullable: true + FACEBOOK: + type: string + nullable: true + INSTAGRAM: + type: string + nullable: true + TIKTOK: + type: string + nullable: true + LINKEDIN: + type: string + nullable: true + REDDIT: + type: string + nullable: true + DISCORD: + type: string + nullable: true + SLACK: + type: string + nullable: true + YOUTUBE: + type: string + nullable: true + TELEGRAM: + type: string + nullable: true + THREADS: + type: string + nullable: true + nullable: true + externalData: + type: object + properties: + TWITTER: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + PINTEREST: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + FACEBOOK: + type: object + properties: + id: + type: string + nullable: true + postId: + type: string + nullable: true + videoId: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + INSTAGRAM: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + TIKTOK: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + LINKEDIN: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + REDDIT: + type: object + properties: + id: type: string - nullable: true - nullable: true - PINTEREST: - type: object - properties: - text: - type: string - nullable: true - description: - type: string - nullable: true - boardName: - type: string - uploadIds: - type: array - items: + nullable: true + permalink: type: string - nullable: true - link: - type: string - nullable: true - description: The URL to which the Pin will link to. - altText: - type: string - nullable: true - description: >- - The alt text for the image. This is used by screen - readers and when the image can't be loaded. - note: - type: string - nullable: true - description: >- - A note about the Pin. This is not visible to the - public. - dominantColor: - type: string - nullable: true - description: >- - The dominant color of the image. This is used to - display the image before it's loaded. - required: - - boardName - nullable: true - FACEBOOK: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: + nullable: true + subreddit_name: type: string - nullable: true - nullable: true - INSTAGRAM: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: + nullable: true + nullable: true + DISCORD: + type: object + properties: + id: type: string - nullable: true - nullable: true - TIKTOK: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: + nullable: true + permalink: type: string - nullable: true - privacy: - type: string - enum: - - SELF_ONLY - - PUBLIC_TO_EVERYONE - - MUTUAL_FOLLOW_FRIENDS - - FOLLOWER_OF_CREATOR - nullable: true - isBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if the video is a paid partnership to - promote a third-party business. - isOrganicBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if this video is promoting the creator's - own business. - disableComments: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make comments on this post. - disableDuet: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make Stitches using this post. - disableStitch: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make Duets using this post. - nullable: true - LINKEDIN: - type: object - properties: - text: - type: string - uploadIds: - type: array - items: + nullable: true + channelId: type: string - nullable: true - privacy: - type: string - enum: - - CONNECTIONS - - PUBLIC - - LOGGED_IN - - CONTAINER - nullable: true - hideFromFeed: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post shouldn't be displayed in - the main feed. - disableReshare: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post is not allowed to be - reshared. - required: - - text - nullable: true - YOUTUBE: - type: object - properties: - type: - default: SHORT - type: string - enum: - - VIDEO - - SHORT - uploadIds: - type: array - items: + nullable: true + nullable: true + SLACK: + type: object + properties: + id: type: string - nullable: true - text: - type: string - nullable: true - description: - type: string - nullable: true - privacy: - type: string - enum: - - PRIVATE - - PUBLIC - - UNLISTED - nullable: true - madeForKids: - default: false - type: boolean - nullable: true - description: Set to true if the video is made for kids. - nullable: true - REDDIT: - type: object - properties: - sr: - type: string - description: >- - Subreddit name. Example: r/subredditName or - u/username - text: - type: string - description: - type: string - nullable: true - uploadIds: - type: array - items: + nullable: true + permalink: + type: string + nullable: true + channelId: + type: string + nullable: true + nullable: true + YOUTUBE: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + TELEGRAM: + type: object + properties: + id: type: string - nullable: true - link: - type: string - nullable: true - description: The URL to which the post will link to. - nsfw: - default: false - type: boolean - nullable: true - description: Set to true if the post is NSFW. - required: - - sr - - text - nullable: true - DISCORD: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: + nullable: true + permalink: type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: Avatar url to display as the author of the message. - required: - - channelId - nullable: true - SLACK: + nullable: true + nullable: true + THREADS: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - teamId + - title + - postDate + - status + - data + - createdAt + - updatedAt + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: + type: string + issues: + type: array + items: type: object properties: - channelId: - type: string - text: + message: type: string - nullable: true - uploadIds: + path: type: array items: - type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string + oneOf: + - type: string + - type: number nullable: true - description: Avatar url to display as the author of the message. required: - - channelId - nullable: true - TELEGRAM: - type: object - properties: {} - nullable: true - THREADS: - type: object - properties: {} - nullable: true + - message + nullable: true + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + /api/v1/post/: + get: + summary: Get post list + tags: *ref_3 + parameters: + - name: teamId + in: query + required: true + schema: + type: string + - name: status + in: query + schema: + type: string + enum: + - DRAFT + - SCHEDULED + - POSTED + - ERROR + - DELETED + - PROCESSING + nullable: true + - name: orderBy + in: query + schema: + type: string + enum: + - createdAt + - updatedAt + - postDate + - postedDate + - deletedAt + nullable: true + - name: order + in: query + schema: + type: string + enum: + - ASC + - DESC + nullable: true + - name: q + in: query + schema: + type: string + nullable: true + - name: platforms + in: query + schema: + type: array + items: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - THREADS + - LINKEDIN + - PINTEREST + - REDDIT + - TELEGRAM + - DISCORD + - SLACK + nullable: true + - name: offset + in: query + schema: + default: 0 + type: number + nullable: true + - name: limit + in: query + schema: + default: 10 + type: number + nullable: true + operationId: post.getList responses: '200': description: '200' @@ -4555,637 +5558,1212 @@ paths: schema: type: object properties: - id: - type: string - teamId: - type: string - title: - type: string - postDate: - type: string - format: date-time - nullable: true - postedDate: - type: string - format: date-time - nullable: true - status: - type: string - enum: - - DRAFT - - SCHEDULED - - POSTED - - ERROR - - DELETED - - PROCESSING - data: - type: object - properties: - TWITTER: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - PINTEREST: - type: object - properties: - text: - type: string - nullable: true - description: - type: string - nullable: true - boardName: - type: string - uploadIds: - type: array - items: - type: string - nullable: true - link: - type: string - nullable: true - description: The URL to which the Pin will link to. - altText: - type: string - nullable: true - description: >- - The alt text for the image. This is used by screen - readers and when the image can't be loaded. - note: - type: string - nullable: true - description: >- - A note about the Pin. This is not visible to the - public. - dominantColor: - type: string - nullable: true - description: >- - The dominant color of the image. This is used to - display the image before it's loaded. - required: - - boardName - nullable: true - FACEBOOK: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - INSTAGRAM: - type: object - properties: - type: - default: POST - type: string - enum: - - POST - - REEL - - STORY - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - nullable: true - TIKTOK: - type: object - properties: - text: - type: string - nullable: true - uploadIds: - type: array - items: - type: string - nullable: true - privacy: - type: string - enum: - - SELF_ONLY - - PUBLIC_TO_EVERYONE - - MUTUAL_FOLLOW_FRIENDS - - FOLLOWER_OF_CREATOR - nullable: true - isBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if the video is a paid partnership to - promote a third-party business. - isOrganicBrandContent: - default: false - type: boolean - nullable: true - description: >- - Set to true if this video is promoting the - creator's own business. - disableComments: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make comments on this post. - disableDuet: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make Stitches using this post. - disableStitch: - default: false - type: boolean - nullable: true - description: >- - If set to true, other TikTok users will not be - allowed to make Duets using this post. - nullable: true - LINKEDIN: - type: object - properties: - text: - type: string - uploadIds: - type: array - items: + items: + type: array + items: + type: object + properties: + id: + type: string + teamId: + type: string + title: + type: string + postDate: + type: string + format: date-time + nullable: true + postedDate: + type: string + format: date-time + nullable: true + status: + type: string + enum: + - DRAFT + - SCHEDULED + - POSTED + - ERROR + - DELETED + - PROCESSING + data: + type: object + properties: + TWITTER: + type: object + properties: + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + PINTEREST: + type: object + properties: + text: + type: string + nullable: true + description: + type: string + nullable: true + boardName: + type: string + uploadIds: + type: array + items: + type: string + nullable: true + link: + type: string + nullable: true + description: The URL to which the Pin will link to. + altText: + type: string + nullable: true + description: >- + The alt text for the image. This is used by + screen readers and when the image can't be + loaded. + note: + type: string + nullable: true + description: >- + A note about the Pin. This is not visible to + the public. + dominantColor: + type: string + nullable: true + description: >- + The dominant color of the image. This is + used to display the image before it's + loaded. + required: + - boardName + nullable: true + FACEBOOK: + type: object + properties: + type: + default: POST + type: string + enum: + - POST + - REEL + - STORY + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + INSTAGRAM: + type: object + properties: + type: + default: POST + type: string + enum: + - POST + - REEL + - STORY + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + nullable: true + TIKTOK: + type: object + properties: + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + privacy: + type: string + enum: + - SELF_ONLY + - PUBLIC_TO_EVERYONE + - MUTUAL_FOLLOW_FRIENDS + - FOLLOWER_OF_CREATOR + nullable: true + isBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if the video is a paid + partnership to promote a third-party + business. + isOrganicBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if this video is promoting the + creator's own business. + disableComments: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not + be allowed to make comments on this post. + disableDuet: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not + be allowed to make Stitches using this post. + disableStitch: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not + be allowed to make Duets using this post. + nullable: true + LINKEDIN: + type: object + properties: + text: + type: string + uploadIds: + type: array + items: + type: string + nullable: true + privacy: + type: string + enum: + - CONNECTIONS + - PUBLIC + - LOGGED_IN + - CONTAINER + nullable: true + hideFromFeed: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post shouldn't be + displayed in the main feed. + disableReshare: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post is not allowed to be + reshared. + required: + - text + nullable: true + YOUTUBE: + type: object + properties: + type: + default: SHORT + type: string + enum: + - VIDEO + - SHORT + uploadIds: + type: array + items: + type: string + nullable: true + text: + type: string + nullable: true + description: + type: string + nullable: true + privacy: + type: string + enum: + - PRIVATE + - PUBLIC + - UNLISTED + nullable: true + madeForKids: + default: false + type: boolean + nullable: true + description: Set to true if the video is made for kids. + nullable: true + REDDIT: + type: object + properties: + sr: + type: string + description: >- + Subreddit name. Example: r/subredditName or + u/username + text: + type: string + description: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + link: + type: string + nullable: true + description: The URL to which the post will link to. + nsfw: + default: false + type: boolean + nullable: true + description: Set to true if the post is NSFW. + required: + - sr + - text + nullable: true + DISCORD: + type: object + properties: + channelId: + type: string + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: >- + Avatar url to display as the author of the + message. + required: + - channelId + nullable: true + SLACK: + type: object + properties: + channelId: + type: string + text: + type: string + nullable: true + uploadIds: + type: array + items: + type: string + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: >- + Avatar url to display as the author of the + message. + required: + - channelId + nullable: true + TELEGRAM: + type: object + properties: {} + nullable: true + THREADS: + type: object + properties: {} + nullable: true + error: + type: string + nullable: true + errors: + type: object + properties: + TWITTER: type: string - nullable: true - privacy: - type: string - enum: - - CONNECTIONS - - PUBLIC - - LOGGED_IN - - CONTAINER - nullable: true - hideFromFeed: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post shouldn't be displayed in - the main feed. - disableReshare: - default: false - type: boolean - nullable: true - description: >- - Set to true if the post is not allowed to be - reshared. - required: - - text - nullable: true - YOUTUBE: - type: object - properties: - type: - default: SHORT - type: string - enum: - - VIDEO - - SHORT - uploadIds: - type: array - items: + nullable: true + PINTEREST: type: string - nullable: true - text: - type: string - nullable: true - description: - type: string - nullable: true - privacy: - type: string - enum: - - PRIVATE - - PUBLIC - - UNLISTED - nullable: true - madeForKids: - default: false - type: boolean - nullable: true - description: Set to true if the video is made for kids. - nullable: true - REDDIT: - type: object - properties: - sr: - type: string - description: >- - Subreddit name. Example: r/subredditName or - u/username - text: - type: string - description: - type: string - nullable: true - uploadIds: - type: array - items: + nullable: true + FACEBOOK: type: string - nullable: true - link: - type: string - nullable: true - description: The URL to which the post will link to. - nsfw: - default: false - type: boolean - nullable: true - description: Set to true if the post is NSFW. - required: - - sr - - text - nullable: true - DISCORD: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: + nullable: true + INSTAGRAM: type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: >- - Avatar url to display as the author of the - message. - required: - - channelId - nullable: true - SLACK: - type: object - properties: - channelId: - type: string - text: - type: string - nullable: true - uploadIds: - type: array - items: + nullable: true + TIKTOK: type: string - nullable: true - username: - type: string - nullable: true - description: >- - The username to display as the author of the - message. - avatarUrl: - type: string - nullable: true - description: >- - Avatar url to display as the author of the - message. - required: - - channelId - nullable: true - TELEGRAM: - type: object - properties: {} - nullable: true - THREADS: - type: object - properties: {} - nullable: true - error: + nullable: true + LINKEDIN: + type: string + nullable: true + REDDIT: + type: string + nullable: true + DISCORD: + type: string + nullable: true + SLACK: + type: string + nullable: true + YOUTUBE: + type: string + nullable: true + TELEGRAM: + type: string + nullable: true + THREADS: + type: string + nullable: true + nullable: true + externalData: + type: object + properties: + TWITTER: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + PINTEREST: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + FACEBOOK: + type: object + properties: + id: + type: string + nullable: true + postId: + type: string + nullable: true + videoId: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + INSTAGRAM: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + TIKTOK: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + LINKEDIN: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + REDDIT: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + subreddit_name: + type: string + nullable: true + nullable: true + DISCORD: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + channelId: + type: string + nullable: true + nullable: true + SLACK: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + channelId: + type: string + nullable: true + nullable: true + YOUTUBE: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + TELEGRAM: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + THREADS: + type: object + properties: + id: + type: string + nullable: true + permalink: + type: string + nullable: true + nullable: true + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + uploads: + type: array + items: + type: object + properties: + postId: + type: string + uploadId: + type: string + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + upload: + type: object + properties: + id: + type: string + teamId: + type: string + expiresAt: + type: string + format: date-time + nullable: true + iconUrl: + type: string + format: uri + nullable: true + thumbnailUrl: + type: string + format: uri + nullable: true + url: + type: string + format: uri + nullable: true + iconPath: + type: string + nullable: true + thumbnailPath: + type: string + nullable: true + path: + type: string + nullable: true + type: + type: string + enum: + - image + - video + width: + type: number + nullable: true + height: + type: number + nullable: true + fileSize: + type: number + nullable: true + videoLength: + type: number + nullable: true + mime: + type: string + nullable: true + ext: + type: string + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + required: + - id + - teamId + - type + - createdAt + - updatedAt + required: + - postId + - uploadId + - createdAt + - updatedAt + - upload + socialAccounts: + type: array + items: + type: object + properties: + postId: + type: string + socialAccountId: + type: string + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + socialAccount: + type: object + properties: + id: + type: string + type: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - THREADS + - LINKEDIN + - PINTEREST + - REDDIT + - TELEGRAM + - DISCORD + - SLACK + teamId: + type: string + username: + type: string + nullable: true + displayName: + type: string + nullable: true + externalId: + type: string + nullable: true + userUsername: + type: string + nullable: true + userDisplayName: + type: string + nullable: true + userId: + type: string + nullable: true + channels: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + nullable: true + username: + type: string + nullable: true + webhook: + type: object + properties: + id: + type: string + nullable: true + name: + type: string + nullable: true + avatar: + type: string + nullable: true + url: + type: string + nullable: true + nullable: true + required: + - id + nullable: true + createdAt: + type: string + format: date-time + nullable: true + updatedAt: + type: string + format: date-time + nullable: true + deletedAt: + type: string + format: date-time + nullable: true + required: + - id + - type + - teamId + - createdAt + - updatedAt + required: + - postId + - socialAccountId + - createdAt + - updatedAt + - socialAccount + required: + - id + - teamId + - title + - postDate + - status + - data + - createdAt + - updatedAt + - uploads + - socialAccounts + total: + type: number + required: + - items + - total + '400': + description: '400' + content: + application/json: + schema: + type: object + properties: + message: type: string + issues: + type: array + items: + type: object + properties: + message: + type: string + path: + type: array + items: + oneOf: + - type: string + - type: number + nullable: true + required: + - message nullable: true - errors: - type: object - properties: - TWITTER: - type: string - nullable: true - PINTEREST: - type: string - nullable: true - FACEBOOK: - type: string - nullable: true - INSTAGRAM: - type: string - nullable: true - TIKTOK: - type: string - nullable: true - LINKEDIN: - type: string - nullable: true - REDDIT: - type: string - nullable: true - DISCORD: - type: string - nullable: true - SLACK: - type: string - nullable: true - YOUTUBE: - type: string - nullable: true - TELEGRAM: - type: string - nullable: true - THREADS: - type: string - nullable: true - nullable: true - externalData: - type: object - properties: - TWITTER: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - PINTEREST: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - FACEBOOK: - type: object - properties: - id: - type: string - nullable: true - postId: - type: string - nullable: true - videoId: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - INSTAGRAM: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - TIKTOK: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - LINKEDIN: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - nullable: true - REDDIT: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - subreddit_name: - type: string - nullable: true - nullable: true - DISCORD: - type: object - properties: - id: - type: string - nullable: true - permalink: - type: string - nullable: true - channelId: - type: string - nullable: true - nullable: true - SLACK: - type: object - properties: - id: + required: + - message + '401': + description: '401' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '403': + description: '403' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '404': + description: '404' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '429': + description: '429' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + '500': + description: '500' + content: + application/json: + schema: + type: object + properties: + message: + type: string + required: + - message + post: + summary: Create post + tags: *ref_3 + parameters: [] + operationId: post.create + requestBody: + description: Body + content: + application/json: + schema: + type: object + properties: + teamId: + type: string + title: + type: string + minLength: 1 + postDate: + type: string + status: + type: string + enum: + - DRAFT + - SCHEDULED + socialAccountTypes: + type: array + items: + type: string + enum: + - TIKTOK + - YOUTUBE + - INSTAGRAM + - FACEBOOK + - TWITTER + - THREADS + - LINKEDIN + - PINTEREST + - REDDIT + - TELEGRAM + - DISCORD + - SLACK + minItems: 1 + data: + type: object + properties: + TWITTER: + type: object + properties: + text: + type: string + nullable: true + uploadIds: + type: array + items: type: string - nullable: true - permalink: + nullable: true + nullable: true + PINTEREST: + type: object + properties: + text: + type: string + nullable: true + description: + type: string + nullable: true + boardName: + type: string + uploadIds: + type: array + items: type: string - nullable: true - channelId: + nullable: true + link: + type: string + nullable: true + description: The URL to which the Pin will link to. + altText: + type: string + nullable: true + description: >- + The alt text for the image. This is used by screen + readers and when the image can't be loaded. + note: + type: string + nullable: true + description: >- + A note about the Pin. This is not visible to the + public. + dominantColor: + type: string + nullable: true + description: >- + The dominant color of the image. This is used to + display the image before it's loaded. + required: + - boardName + nullable: true + FACEBOOK: + type: object + properties: + type: + default: POST + type: string + enum: + - POST + - REEL + - STORY + text: + type: string + nullable: true + uploadIds: + type: array + items: type: string - nullable: true - nullable: true - YOUTUBE: - type: object - properties: - id: + nullable: true + nullable: true + INSTAGRAM: + type: object + properties: + type: + default: POST + type: string + enum: + - POST + - REEL + - STORY + text: + type: string + nullable: true + uploadIds: + type: array + items: type: string - nullable: true - permalink: + nullable: true + nullable: true + TIKTOK: + type: object + properties: + text: + type: string + nullable: true + uploadIds: + type: array + items: type: string - nullable: true - nullable: true - TELEGRAM: - type: object - properties: - id: + nullable: true + privacy: + type: string + enum: + - SELF_ONLY + - PUBLIC_TO_EVERYONE + - MUTUAL_FOLLOW_FRIENDS + - FOLLOWER_OF_CREATOR + nullable: true + isBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if the video is a paid partnership to + promote a third-party business. + isOrganicBrandContent: + default: false + type: boolean + nullable: true + description: >- + Set to true if this video is promoting the creator's + own business. + disableComments: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make comments on this post. + disableDuet: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make Stitches using this post. + disableStitch: + default: false + type: boolean + nullable: true + description: >- + If set to true, other TikTok users will not be + allowed to make Duets using this post. + nullable: true + LINKEDIN: + type: object + properties: + text: + type: string + uploadIds: + type: array + items: type: string - nullable: true - permalink: + nullable: true + privacy: + type: string + enum: + - CONNECTIONS + - PUBLIC + - LOGGED_IN + - CONTAINER + nullable: true + hideFromFeed: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post shouldn't be displayed in + the main feed. + disableReshare: + default: false + type: boolean + nullable: true + description: >- + Set to true if the post is not allowed to be + reshared. + required: + - text + nullable: true + YOUTUBE: + type: object + properties: + type: + default: SHORT + type: string + enum: + - VIDEO + - SHORT + uploadIds: + type: array + items: type: string - nullable: true - nullable: true - THREADS: - type: object - properties: - id: + nullable: true + text: + type: string + nullable: true + description: + type: string + nullable: true + privacy: + type: string + enum: + - PRIVATE + - PUBLIC + - UNLISTED + nullable: true + madeForKids: + default: false + type: boolean + nullable: true + description: Set to true if the video is made for kids. + nullable: true + REDDIT: + type: object + properties: + sr: + type: string + description: >- + Subreddit name. Example: r/subredditName or + u/username + text: + type: string + description: + type: string + nullable: true + uploadIds: + type: array + items: type: string - nullable: true - permalink: + nullable: true + link: + type: string + nullable: true + description: The URL to which the post will link to. + nsfw: + default: false + type: boolean + nullable: true + description: Set to true if the post is NSFW. + required: + - sr + - text + nullable: true + DISCORD: + type: object + properties: + channelId: + type: string + text: + type: string + nullable: true + uploadIds: + type: array + items: type: string - nullable: true - nullable: true - nullable: true - createdAt: - type: string - format: date-time - nullable: true - updatedAt: - type: string - format: date-time - nullable: true - deletedAt: - type: string - format: date-time - nullable: true - required: - - id - - teamId - - title - - postDate - - status - - data - - createdAt - - updatedAt - '400': - description: '400' - content: - application/json: - schema: - type: object - properties: - message: - type: string - issues: - type: array - items: + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string + nullable: true + description: Avatar url to display as the author of the message. + required: + - channelId + nullable: true + SLACK: type: object properties: - message: + channelId: type: string - path: + text: + type: string + nullable: true + uploadIds: type: array items: - oneOf: - - type: string - - type: number + type: string + nullable: true + username: + type: string + nullable: true + description: >- + The username to display as the author of the + message. + avatarUrl: + type: string nullable: true + description: Avatar url to display as the author of the message. required: - - message - nullable: true - required: - - message - '401': - description: '401' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '403': - description: '403' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '404': - description: '404' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '429': - description: '429' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - '500': - description: '500' - content: - application/json: - schema: - type: object - properties: - message: - type: string - required: - - message - delete: - summary: Delete post - tags: *ref_1 - parameters: - - name: id - in: path - required: true - schema: - type: string - operationId: post.delete + - channelId + nullable: true + TELEGRAM: + type: object + properties: {} + nullable: true + THREADS: + type: object + properties: {} + nullable: true + required: + - teamId + - title + - postDate + - status + - socialAccountTypes + - data responses: '200': description: '200' diff --git a/package-lock.json b/package-lock.json index 6667e5d..b0c1025 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bundlesocial", - "version": "1.5.0", + "version": "1.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bundlesocial", - "version": "1.5.0", + "version": "1.6.0", "license": "MIT", "devDependencies": { "@hey-api/openapi-ts": "0.45.1", diff --git a/readme.md b/readme.md index f822412..bcbb5ce 100644 --- a/readme.md +++ b/readme.md @@ -20,16 +20,76 @@ const bundleSocial = new BundleSocial('YOUR_API_KEY'); ``` ## Usage +### Get the organization information +```ts +const organization = await bundlesocial.organization.organizationGetOrganization(); +``` + +### Create a team +```ts +const createdTeam = await bundlesocial.team.teamCreateTeam({ + requestBody: { + name: 'Test Team', + tier: 'FREE', + }, +}); +``` + ### Get the team information ```ts -const team = await bundlesocial.team.teamGetTeam(); +const team = await bundlesocial.team.teamGetTeam({ + id: createdTeam?.id, +}); +``` + +### Manage social accounts (needed for product integration only) +If you can connect social accounts directly through our web app, you can skip this step. + +For more info check out our docs: [https://info.bundle.social/api-reference](https://info.bundle.social/api-reference) + +#### Connect social account +```ts +const response = await bundlesocial.socialAccount.socialAccountConnect({ + requestBody: { + type: 'TIKTOK', + teamId: team.id, + redirectUrl: 'https://your-redirect-url.com', + } +}); + +// Redirect the user to the response.url +// After the user has connected the account, the user will be redirected to the redirectUrl ``` +#### Select page, account or channel (required for FACEBOOK, INSTAGRAM, YOUTUBE, LINKEDIN, DISCORD AND SLACK) +After the user has connected the account and was redirected to your page, you can let the user select the page, account or channel. We unified the data for all platforms. Each social account has a `channels` field, that is an array of their channels (pages, accounts, channels depending on the platform). + +```ts +const team = await bundlesocial.team.teamGetTeam({ + id: team.id, +}); + +const socialAccount = team?.socialAccounts?.find((account) => account.type === 'TIKTOK'); +const socialAccountChannelId = socialAccount?.channels?.[0]?.id; + +if (socialAccountChannelId) { + await bundlesocial.socialAccount.socialAccountSetChannel({ + requestBody: { + type, + teamId: team.id, + channelId: socialAccountChannelId, + } + }); +} +``` + + ### Upload a file ```ts const video = await fs.readFile('./video.mp4'); const videoUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: team.id, file: new Blob([video], { type: 'video/mp4' }), } }); @@ -37,6 +97,7 @@ const videoUpload = await bundlesocial.upload.uploadCreate({ const jpgImage = await fs.readFile('./image.jpg'); const jpgUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: team.id, file: new Blob([jpgImage], { type: 'image/jpeg' }), } }); @@ -48,6 +109,7 @@ const jpgUpload = await bundlesocial.upload.uploadCreate({ // Make sure you have connected a social account to the team. const createdPost = await bundlesocial.post.postCreate({ requestBody: { + teamId: team.id, data: { INSTAGRAM: { text: 'Test Post', @@ -98,7 +160,7 @@ const post = await bundlesocial.post.postGet({ ## Handling errors ```ts try { - const team = await bundlesocial.team.teamGetTeam(); + const organization = await bundlesocial.organization.organizationGetOrganization(); } catch (error) { if (error instanceof ApiError) { // Handle the error diff --git a/src/index.spec.ts b/src/index.spec.ts index f0271b5..f1d7834 100644 --- a/src/index.spec.ts +++ b/src/index.spec.ts @@ -6,7 +6,12 @@ if (!process.env.BUNDLE_SOCIAL_API_KEY) { throw new Error('BUNDLE_SOCIAL_API_KEY env var is required'); } +if (!process.env.BUNDLE_SOCIAL_TEAM_ID) { + throw new Error('BUNDLE_SOCIAL_TEAM_ID env var is required'); +} + const bundlesocial = new Bundlesocial(process.env.BUNDLE_SOCIAL_API_KEY); +const TEAM_ID = process.env.BUNDLE_SOCIAL_TEAM_ID; // APP describe('App', () => { @@ -30,21 +35,53 @@ describe('App', () => { }); }); +// ORGANIZATION +describe('Organization', () => { + describe('organizationGetOrganization', () => { + it('should return an organization', async () => { + expect.assertions(1); + try { + const response = await bundlesocial.organization.organizationGetOrganization(); + + expect(response).toMatchObject({ + id: expect.any(String), + name: expect.any(String), + createdById: expect.any(String), + defaultPaymentMethodFilled: expect.any(Boolean), + billingAddressFilled: expect.any(Boolean), + apiAccess: expect.any(Boolean), + + teams: expect.arrayContaining([]), + createdBy: expect.any(Object), + organizationSubscription: expect.any(Object), + }); + } catch (error) { + if (error instanceof ApiError) { + console.error(error); + } + throw error; + } + }); + }); +}); + // TEAM describe('Team', () => { describe('teamGetTeam', () => { it('should return a team', async () => { expect.assertions(1); try { - const response = await bundlesocial.team.teamGetTeam(); + const response = await bundlesocial.team.teamGetTeam({ + id: TEAM_ID, + }); expect(response).toMatchObject({ id: expect.any(String), name: expect.any(String), - users: expect.arrayContaining([]), + organizationId: expect.any(String), + organization: expect.any(Object), createdById: expect.any(String), createdBy: expect.any(Object), - invitations: expect.arrayContaining([]), bots: expect.arrayContaining([]), socialAccounts: expect.arrayContaining([]), usage: { @@ -59,6 +96,57 @@ describe('Team', () => { } }); }); + + describe('teamGetTeams', () => { + it('should create a team', async () => { + expect.assertions(1); + try { + const response = await bundlesocial.team.teamCreateTeam({ + requestBody: { + name: 'Test Team', + tier: 'FREE', + }, + }); + + expect(response).toMatchObject({ + id: expect.any(String), + name: 'Test Team', + }); + } catch (error) { + if (error instanceof ApiError) { + console.error(error); + } + throw error; + } + }); + }); +}); + +// SOCIAL ACCOUNT +describe('Social Account', () => { + describe('socialAccountConnect', () => { + it('should return a URL', async () => { + expect.assertions(1); + try { + const response = await bundlesocial.socialAccount.socialAccountConnect({ + requestBody: { + type: 'TIKTOK', + teamId: TEAM_ID, + redirectUrl: 'https://bundle.social/dashboard', + } + }); + + expect(response).toMatchObject({ + url: expect.any(String), + }); + } catch (error) { + if (error instanceof ApiError) { + console.error(error); + } + throw error; + } + }); + }); }); @@ -103,6 +191,7 @@ describe('Uploads', () => { const jpgImage = await fs.readFile('./src/test/jpg-square.jpg'); const createdUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([jpgImage], { type: 'image/jpeg' }), } }); @@ -133,6 +222,7 @@ describe('Uploads', () => { const pngImage = await fs.readFile('./src/test/png-square.png'); const createdUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([pngImage], { type: 'image/png' }), } }); @@ -163,6 +253,7 @@ describe('Uploads', () => { const video = await fs.readFile('./src/test/mp4-horizontal.mp4'); const createdUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([video], { type: 'video/mp4' }), } }); @@ -193,6 +284,7 @@ describe('Uploads', () => { const jpgImage = await fs.readFile('./src/test/jpg-square.jpg'); const createdJpgUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([jpgImage], { type: 'image/jpeg' }), } }); @@ -201,6 +293,7 @@ describe('Uploads', () => { const pngImage = await fs.readFile('./src/test/png-square.png'); const createdPngUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([pngImage], { type: 'image/png' }), } }); @@ -209,12 +302,15 @@ describe('Uploads', () => { const video = await fs.readFile('./src/test/mp4-horizontal.mp4'); const createdVideoUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([video], { type: 'video/mp4' }), } }); expect(createdVideoUpload).toMatchObject(videoUploadMatcher); - const uploads = await bundlesocial.upload.uploadGetList(); + const uploads = await bundlesocial.upload.uploadGetList({ + teamId: TEAM_ID, + }); expect(uploads).toEqual(expect.arrayContaining([ expect.objectContaining(jpgUploadMatcher), @@ -273,6 +369,7 @@ describe('Post', () => { try { const createdPost = await bundlesocial.post.postCreate({ requestBody: { + teamId: TEAM_ID, data: { FACEBOOK: { text: 'Hello, world!', @@ -315,6 +412,7 @@ describe('Post', () => { const jpgImage = await fs.readFile('./src/test/jpg-square.jpg'); const createdJpgUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([jpgImage], { type: 'image/jpeg' }), } }); @@ -322,6 +420,7 @@ describe('Post', () => { const createdPost = await bundlesocial.post.postCreate({ requestBody: { + teamId: TEAM_ID, data: { FACEBOOK: { text: 'Hello, world!', @@ -364,6 +463,7 @@ describe('Post', () => { const video = await fs.readFile('./src/test/mp4-horizontal.mp4'); const createdVideoUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([video], { type: 'video/mp4' }), } }); @@ -371,6 +471,7 @@ describe('Post', () => { const createdPost = await bundlesocial.post.postCreate({ requestBody: { + teamId: TEAM_ID, data: { FACEBOOK: { text: 'Hello, world!', @@ -413,6 +514,7 @@ describe('Post', () => { const jpgImage = await fs.readFile('./src/test/jpg-square.jpg'); const createdJpgUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([jpgImage], { type: 'image/jpeg' }), } }); @@ -421,6 +523,7 @@ describe('Post', () => { const video = await fs.readFile('./src/test/mp4-horizontal.mp4'); const createdVideoUpload = await bundlesocial.upload.uploadCreate({ formData: { + teamId: TEAM_ID, file: new Blob([video], { type: 'video/mp4' }), } }); @@ -428,6 +531,7 @@ describe('Post', () => { const createdPost1 = await bundlesocial.post.postCreate({ requestBody: { + teamId: TEAM_ID, data: { FACEBOOK: { text: 'Hello, world!', @@ -446,6 +550,7 @@ describe('Post', () => { const createdPost2 = await bundlesocial.post.postCreate({ requestBody: { + teamId: TEAM_ID, data: { FACEBOOK: { text: 'Hello, world!', @@ -463,6 +568,7 @@ describe('Post', () => { expect(createdPost2).toMatchObject(postMatcherWithUploads); const posts = await bundlesocial.post.postGetList({ + teamId: TEAM_ID, offset: 0, limit: 10, });