diff --git a/webapp/platform/client/src/client4.ts b/webapp/platform/client/src/client4.ts index 3d1c519dff..7d5b75f775 100644 --- a/webapp/platform/client/src/client4.ts +++ b/webapp/platform/client/src/client4.ts @@ -615,7 +615,7 @@ export default class Client4 { ); }; - patchUser = (userPatch: Partial & {id: string}) => { + patchUser = (userPatch: PartialExcept) => { return this.doFetch( `${this.getUserRoute(userPatch.id)}/patch`, {method: 'put', body: JSON.stringify(userPatch)}, @@ -1240,7 +1240,7 @@ export default class Client4 { ); }; - patchTeam = (team: Partial & {id: string}) => { + patchTeam = (team: PartialExcept) => { return this.doFetch( `${this.getTeamRoute(team.id)}/patch`, {method: 'put', body: JSON.stringify(team)}, @@ -1579,7 +1579,7 @@ export default class Client4 { ); } - createChannel = (channel: Channel) => { + createChannel = (channel: PartialExcept) => { return this.doFetch( `${this.getChannelsRoute()}`, {method: 'post', body: JSON.stringify(channel)}, @@ -2120,7 +2120,7 @@ export default class Client4 { // Post Routes - createPost = async (post: Post) => { + createPost = async (post: PartialExcept) => { const result = await this.doFetch( `${this.getPostsRoute()}`, {method: 'post', body: JSON.stringify(post)}, @@ -2149,7 +2149,7 @@ export default class Client4 { ); }; - patchPost = (postPatch: Partial & {id: string}) => { + patchPost = (postPatch: PartialExcept) => { return this.doFetch( `${this.getPostRoute(postPatch.id)}/patch`, {method: 'put', body: JSON.stringify(postPatch)}, @@ -2623,7 +2623,7 @@ export default class Client4 { // Integration Routes - createIncomingWebhook = (hook: IncomingWebhook) => { + createIncomingWebhook = (hook: PartialExcept) => { return this.doFetch( `${this.getIncomingHooksRoute()}`, {method: 'post', body: JSON.stringify(hook)}, @@ -2788,7 +2788,7 @@ export default class Client4 { ); }; - createOAuthApp = (app: OAuthApp) => { + createOAuthApp = (app: PartialExcept) => { return this.doFetch( `${this.getOAuthAppsRoute()}`, {method: 'post', body: JSON.stringify(app)}, @@ -2909,7 +2909,7 @@ export default class Client4 { // Emoji Routes - createCustomEmoji = (emoji: CustomEmoji, imageData: File) => { + createCustomEmoji = (emoji: PartialExcept, imageData: File) => { const formData = new FormData(); formData.append('image', imageData); formData.append('emoji', JSON.stringify(emoji)); @@ -3512,7 +3512,7 @@ export default class Client4 { ); }; - createScheme = (scheme: Scheme) => { + createScheme = (scheme: PartialExcept) => { return this.doFetch( `${this.getSchemesRoute()}`, {method: 'post', body: JSON.stringify(scheme)}, @@ -4295,7 +4295,7 @@ export default class Client4 { }; // Schedule Post methods - createScheduledPost = (schedulePost: ScheduledPost, connectionId: string) => { + createScheduledPost = (schedulePost: PartialExcept, connectionId: string) => { this.trackFeatureEvent(TrackScheduledPostsFeature, 'create_scheduled_post', {[TrackPropertyUser]: schedulePost.user_id, [TrackPropertyUserAgent]: 'desktop'}); return this.doFetchWithResponse(