Skip to content

Commit

Permalink
Add conversations.externalInvitePermissions.set API
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Jun 25, 2024
1 parent 41fa9f6 commit 022770e
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/client/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import type {
ConversationsCloseRequest,
ConversationsCreateRequest,
ConversationsDeclineSharedInviteRequest,
ConversationsExternalInvitePermissionsSetRequest,
ConversationsHistoryRequest,
ConversationsInfoRequest,
ConversationsInviteRequest,
Expand Down Expand Up @@ -467,6 +468,7 @@ import type {
ConversationsCanvasesCreateResponse,
UsersDiscoverableContactsLookupResponse,
TeamExternalTeamsListResponse,
ConversationsExternalInvitePermissionsSetResponse,
} from "./generated-response/index";

import type { SlackAPIResponse } from "./response";
Expand Down Expand Up @@ -1577,6 +1579,12 @@ export class SlackAPIClient {
ConversationsCanvasesCreateResponse
>(this, "conversations.canvases.create"),
},
externalInvitePermissions: {
set: this.#bindApiCall<
ConversationsExternalInvitePermissionsSetRequest,
ConversationsExternalInvitePermissionsSetResponse
>(this, "conversations.externalInvitePermissions.set"),
},
};

public readonly dnd = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// deno-lint-ignore-file ban-unused-ignore no-explicit-any no-empty-interface
///////////////////////////////////
// !!! DO NOT EDIT THIS FILE !!! //
///////////////////////////////////

import type { SlackAPIResponse } from "../response";
export type ConversationsExternalInvitePermissionsSetResponse =
SlackAPIResponse & {
error?: string;
needed?: string;
ok: boolean;
provided?: string;
};
1 change: 1 addition & 0 deletions src/client/generated-response/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export type { ConversationsCanvasesCreateResponse } from "./ConversationsCanvase
export type { ConversationsCloseResponse } from "./ConversationsCloseResponse";
export type { ConversationsCreateResponse } from "./ConversationsCreateResponse";
export type { ConversationsDeclineSharedInviteResponse } from "./ConversationsDeclineSharedInviteResponse";
export type { ConversationsExternalInvitePermissionsSetResponse } from "./ConversationsExternalInvitePermissionsSetResponse";
export type { ConversationsHistoryResponse } from "./ConversationsHistoryResponse";
export type { ConversationsInfoResponse } from "./ConversationsInfoResponse";
export type { ConversationsInviteResponse } from "./ConversationsInviteResponse";
Expand Down
6 changes: 6 additions & 0 deletions src/client/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,12 @@ export interface ConversationsCanvasesCreateRequest extends SlackAPIRequest {
channel_id: string;
document_content: CanvasDocumentContent;
}
export interface ConversationsExternalInvitePermissionsSetRequest
extends SlackAPIRequest {
action: "upgrade" | "downgrade";
channel: string;
target_team: string;
}

/*
* `dnd.*`
Expand Down
8 changes: 8 additions & 0 deletions src_deno/client/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import type {
ConversationsCloseRequest,
ConversationsCreateRequest,
ConversationsDeclineSharedInviteRequest,
ConversationsExternalInvitePermissionsSetRequest,
ConversationsHistoryRequest,
ConversationsInfoRequest,
ConversationsInviteRequest,
Expand Down Expand Up @@ -373,6 +374,7 @@ import type {
ConversationsCloseResponse,
ConversationsCreateResponse,
ConversationsDeclineSharedInviteResponse,
ConversationsExternalInvitePermissionsSetResponse,
ConversationsHistoryResponse,
ConversationsInfoResponse,
ConversationsInviteResponse,
Expand Down Expand Up @@ -1578,6 +1580,12 @@ export class SlackAPIClient {
ConversationsCanvasesCreateResponse
>(this, "conversations.canvases.create"),
},
externalInvitePermissions: {
set: this.#bindApiCall<
ConversationsExternalInvitePermissionsSetRequest,
ConversationsExternalInvitePermissionsSetResponse
>(this, "conversations.externalInvitePermissions.set"),
},
};

public readonly dnd = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// deno-lint-ignore-file ban-unused-ignore no-explicit-any no-empty-interface
///////////////////////////////////
// !!! DO NOT EDIT THIS FILE !!! //
///////////////////////////////////

import type { SlackAPIResponse } from "../response.ts";
export type ConversationsExternalInvitePermissionsSetResponse =
& SlackAPIResponse
& {
error?: string;
needed?: string;
ok: boolean;
provided?: string;
};
1 change: 1 addition & 0 deletions src_deno/client/generated-response/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export type { ConversationsCanvasesCreateResponse } from "./ConversationsCanvase
export type { ConversationsCloseResponse } from "./ConversationsCloseResponse.ts";
export type { ConversationsCreateResponse } from "./ConversationsCreateResponse.ts";
export type { ConversationsDeclineSharedInviteResponse } from "./ConversationsDeclineSharedInviteResponse.ts";
export type { ConversationsExternalInvitePermissionsSetResponse } from "./ConversationsExternalInvitePermissionsSetResponse.ts";
export type { ConversationsHistoryResponse } from "./ConversationsHistoryResponse.ts";
export type { ConversationsInfoResponse } from "./ConversationsInfoResponse.ts";
export type { ConversationsInviteResponse } from "./ConversationsInviteResponse.ts";
Expand Down
6 changes: 6 additions & 0 deletions src_deno/client/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,12 @@ export interface ConversationsCanvasesCreateRequest extends SlackAPIRequest {
channel_id: string;
document_content: CanvasDocumentContent;
}
export interface ConversationsExternalInvitePermissionsSetRequest
extends SlackAPIRequest {
action: "upgrade" | "downgrade";
channel: string;
target_team: string;
}

/*
* `dnd.*`
Expand Down

0 comments on commit 022770e

Please sign in to comment.