Skip to content

Commit

Permalink
Add assistant.threads.* APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Sep 17, 2024
1 parent 46ff68d commit c0c6238
Show file tree
Hide file tree
Showing 38 changed files with 2,208 additions and 2,501 deletions.
767 changes: 32 additions & 735 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
},
"homepage": "https://github.com/seratch/slack-web-api-client#readme",
"devDependencies": {
"@biomejs/biome": "^1.9.0",
"@biomejs/biome": "^1.9.1",
"@vitest/coverage-v8": "^2.1.1",
"msw": "^2.4.6",
"msw": "^2.4.8",
"typescript": "^5.6.2",
"vitest": "^2.1.1"
},
Expand Down
20 changes: 20 additions & 0 deletions src/client/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ import type {
AppsManifestUpdateRequest,
AppsManifestValidateRequest,
AppsUninstallRequest,
AssistantThreadsSetStatusRequest,
AssistantThreadsSetSuggestedPromptsRequest,
AssistantThreadsSetTitleRequest,
AuthRevokeRequest,
AuthTeamsListRequest,
AuthTestRequest,
Expand Down Expand Up @@ -475,6 +478,9 @@ import type {
TeamExternalTeamsDisconnectResponse,
ConversationsRequestSharedInviteApproveResponse,
ConversationsRequestSharedInviteDenyResponse,
AssistantThreadsSetStatusResponse,
AssistantThreadsSetSuggestedPromptsResponse,
AssistantThreadsSetTitleResponse,
} from "./generated-response/index";

import type { SlackAPIResponse } from "./response";
Expand Down Expand Up @@ -1145,6 +1151,20 @@ export class SlackAPIClient {
uninstall: this.#bindApiCall<AppsUninstallRequest, AppsUninstallResponse>(this, "apps.uninstall"),
};

public readonly assistant = {
threads: {
setStatus: this.#bindApiCall<AssistantThreadsSetStatusRequest, AssistantThreadsSetStatusResponse>(
this,
"assistant.threads.setStatus",
),
setSuggestedPrompts: this.#bindApiCall<AssistantThreadsSetSuggestedPromptsRequest, AssistantThreadsSetSuggestedPromptsResponse>(
this,
"assistant.threads.setSuggestedPrompts",
),
setTitle: this.#bindApiCall<AssistantThreadsSetTitleRequest, AssistantThreadsSetTitleResponse>(this, "assistant.threads.setTitle"),
},
};

public readonly auth = {
revoke: this.#bindNoArgAllowedApiCall<AuthRevokeRequest, AuthRevokeResponse>(this, "auth.revoke"),
teams: {
Expand Down
13 changes: 13 additions & 0 deletions src/client/generated-response/AssistantThreadsSetStatusResponse.ts
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 AssistantThreadsSetStatusResponse = SlackAPIResponse & {
error?: string;
needed?: string;
ok: boolean;
provided?: string;
warning?: string;
};
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 AssistantThreadsSetSuggestedPromptsResponse = SlackAPIResponse & {
error?: string;
needed?: string;
ok: boolean;
provided?: string;
warning?: string;
};
13 changes: 13 additions & 0 deletions src/client/generated-response/AssistantThreadsSetTitleResponse.ts
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 AssistantThreadsSetTitleResponse = SlackAPIResponse & {
error?: string;
needed?: string;
ok: boolean;
provided?: string;
warning?: string;
};
Loading

0 comments on commit c0c6238

Please sign in to comment.