Skip to content

Commit

Permalink
add views.publish method and types
Browse files Browse the repository at this point in the history
  • Loading branch information
aoberoi committed Oct 23, 2019
1 parent e421a1a commit dee3016
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/web-api/src/WebClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ export class WebClient extends EventEmitter<WebClientEvent> {
*/
public readonly views = {
open: (this.apiCall.bind(this, 'views.open')) as Method<methods.ViewsOpenArguments>,
publish: (this.apiCall.bind(this, 'views.publish')) as Method<methods.ViewsPublishArguments>,
push: (this.apiCall.bind(this, 'views.push')) as Method<methods.ViewsPushArguments>,
update: (this.apiCall.bind(this, 'views.update')) as Method<methods.ViewsUpdateArguments>,
};
Expand Down
6 changes: 6 additions & 0 deletions packages/web-api/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,12 @@ export interface ViewsPushArguments extends WebAPICallOptions, TokenOverridable
view: View;
}

export interface ViewsPublishArguments extends WebAPICallOptions, TokenOverridable {
user_id: string;
view: View;
hash?: string;
}

export interface ViewsUpdateArguments extends WebAPICallOptions, TokenOverridable {
view_id: string;
view: View;
Expand Down

0 comments on commit dee3016

Please sign in to comment.