(slack)
- createEmojiAction - Create a Slack emoji action
- updateEmojiAction - Update a Slack emoji action
- listUsergroups - List Slack usergroups
Creates a new slack emoji action
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
await firehydrantTypescriptSDK.slack.createEmojiAction({
connectionId: "<id>",
requestBody: {
emojiName: "<value>",
},
});
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { slackCreateEmojiAction } from "firehydrant-typescript-sdk/funcs/slackCreateEmojiAction.js";
// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const res = await slackCreateEmojiAction(firehydrantTypescriptSDK, {
connectionId: "<id>",
requestBody: {
emojiName: "<value>",
},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.CreateSlackEmojiActionRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<void>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
errors.Unauthorized | 401, 403, 407, 511 | application/json |
errors.NotFound | 404, 501, 505 | application/json |
errors.Timeout | 408, 504 | application/json |
errors.RateLimited | 429 | application/json |
errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
errors.APIError | 4XX, 5XX | */* |
Updates a slack emoji action
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
await firehydrantTypescriptSDK.slack.updateEmojiAction({
connectionId: "<id>",
emojiActionId: "<id>",
});
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { slackUpdateEmojiAction } from "firehydrant-typescript-sdk/funcs/slackUpdateEmojiAction.js";
// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const res = await slackUpdateEmojiAction(firehydrantTypescriptSDK, {
connectionId: "<id>",
emojiActionId: "<id>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.UpdateSlackEmojiActionRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<void>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
errors.Unauthorized | 401, 403, 407, 511 | application/json |
errors.NotFound | 404, 501, 505 | application/json |
errors.Timeout | 408, 504 | application/json |
errors.RateLimited | 429 | application/json |
errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
errors.APIError | 4XX, 5XX | */* |
List Slack usergroups
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
await firehydrantTypescriptSDK.slack.listUsergroups();
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { slackListUsergroups } from "firehydrant-typescript-sdk/funcs/slackListUsergroups.js";
// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const res = await slackListUsergroups(firehydrantTypescriptSDK);
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<void>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json |
errors.Unauthorized | 401, 403, 407, 511 | application/json |
errors.NotFound | 404, 501, 505 | application/json |
errors.Timeout | 408, 504 | application/json |
errors.RateLimited | 429 | application/json |
errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
errors.APIError | 4XX, 5XX | */* |