Operations related to Tasks
- createIncidentTaskList - Add tasks from a task list to an incident
- listIncidentTasks - List tasks for an incident
- createIncidentTask - Create an incident task
- getIncidentTask - Get an incident task
- deleteIncidentTask - Delete an incident task
- updateIncidentTask - Update an incident task
- convertIncidentTask - Convert a task to a follow-up
- listTaskLists - List task lists
- createTaskList - Create a task list
- getTaskList - Get a task list
- deleteTaskList - Delete a task list
- updateTaskList - Update a task list
- listChecklistTemplates - List checklist templates
- createChecklistTemplate - Create a checklist template
- getChecklistTemplate - Get a checklist template
- deleteChecklistTemplate - Archive a checklist template
- updateChecklistTemplate - Update a checklist template
Add all tasks from list to incident
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.createIncidentTaskList({
incidentId: "<id>",
createIncidentTaskList: {
taskListId: "<id>",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksCreateIncidentTaskList } from "firehydrant-typescript-sdk/funcs/tasksCreateIncidentTaskList.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksCreateIncidentTaskList(firehydrant, {
incidentId: "<id>",
createIncidentTaskList: {
taskListId: "<id>",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksCreateIncidentTaskList failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CreateIncidentTaskListRequest | ✔️ | 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<components.TaskEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Retrieve a list of all tasks for a specific incident
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.listIncidentTasks({
incidentId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksListIncidentTasks } from "firehydrant-typescript-sdk/funcs/tasksListIncidentTasks.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksListIncidentTasks(firehydrant, {
incidentId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksListIncidentTasks failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListIncidentTasksRequest | ✔️ | 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<components.TaskEntityPaginated>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Create a task
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.createIncidentTask({
incidentId: "<id>",
createIncidentTask: {
title: "<value>",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksCreateIncidentTask } from "firehydrant-typescript-sdk/funcs/tasksCreateIncidentTask.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksCreateIncidentTask(firehydrant, {
incidentId: "<id>",
createIncidentTask: {
title: "<value>",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksCreateIncidentTask failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CreateIncidentTaskRequest | ✔️ | 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<components.TaskEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Retrieve a single task for an incident
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
await firehydrant.tasks.getIncidentTask({
taskId: "<id>",
incidentId: "<id>",
});
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksGetIncidentTask } from "firehydrant-typescript-sdk/funcs/tasksGetIncidentTask.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksGetIncidentTask(firehydrant, {
taskId: "<id>",
incidentId: "<id>",
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("tasksGetIncidentTask failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetIncidentTaskRequest | ✔️ | 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.APIError | 4XX, 5XX | */* |
Delete a task
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
await firehydrant.tasks.deleteIncidentTask({
taskId: "<id>",
incidentId: "<id>",
});
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksDeleteIncidentTask } from "firehydrant-typescript-sdk/funcs/tasksDeleteIncidentTask.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksDeleteIncidentTask(firehydrant, {
taskId: "<id>",
incidentId: "<id>",
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("tasksDeleteIncidentTask failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteIncidentTaskRequest | ✔️ | 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.APIError | 4XX, 5XX | */* |
Update a task's attributes
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.updateIncidentTask({
taskId: "<id>",
incidentId: "<id>",
updateIncidentTask: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksUpdateIncidentTask } from "firehydrant-typescript-sdk/funcs/tasksUpdateIncidentTask.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksUpdateIncidentTask(firehydrant, {
taskId: "<id>",
incidentId: "<id>",
updateIncidentTask: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksUpdateIncidentTask failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateIncidentTaskRequest | ✔️ | 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<components.TaskEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Convert a task to a follow-up
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.convertIncidentTask({
taskId: "<id>",
incidentId: "<id>",
convertIncidentTask: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksConvertIncidentTask } from "firehydrant-typescript-sdk/funcs/tasksConvertIncidentTask.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksConvertIncidentTask(firehydrant, {
taskId: "<id>",
incidentId: "<id>",
convertIncidentTask: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksConvertIncidentTask failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ConvertIncidentTaskRequest | ✔️ | 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<components.TaskEntityPaginated>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Lists all task lists for your organization
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.listTaskLists({});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksListTaskLists } from "firehydrant-typescript-sdk/funcs/tasksListTaskLists.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksListTaskLists(firehydrant, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksListTaskLists failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListTaskListsRequest | ✔️ | 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<components.TaskListEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Creates a new task list
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.createTaskList({
name: "<value>",
taskListItems: [
{
summary: "<value>",
},
],
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksCreateTaskList } from "firehydrant-typescript-sdk/funcs/tasksCreateTaskList.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksCreateTaskList(firehydrant, {
name: "<value>",
taskListItems: [
{
summary: "<value>",
},
],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksCreateTaskList failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
components.CreateTaskList | ✔️ | 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<components.TaskListEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Retrieves a single task list by ID
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.getTaskList({
taskListId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksGetTaskList } from "firehydrant-typescript-sdk/funcs/tasksGetTaskList.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksGetTaskList(firehydrant, {
taskListId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksGetTaskList failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetTaskListRequest | ✔️ | 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<components.TaskListEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Delete a task list
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
await firehydrant.tasks.deleteTaskList({
taskListId: "<id>",
});
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksDeleteTaskList } from "firehydrant-typescript-sdk/funcs/tasksDeleteTaskList.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksDeleteTaskList(firehydrant, {
taskListId: "<id>",
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("tasksDeleteTaskList failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteTaskListRequest | ✔️ | 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.APIError | 4XX, 5XX | */* |
Updates a task list's attributes and task list items
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.updateTaskList({
taskListId: "<id>",
updateTaskList: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksUpdateTaskList } from "firehydrant-typescript-sdk/funcs/tasksUpdateTaskList.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksUpdateTaskList(firehydrant, {
taskListId: "<id>",
updateTaskList: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksUpdateTaskList failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateTaskListRequest | ✔️ | 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<components.TaskListEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
List all of the checklist templates that have been added to the organization
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.listChecklistTemplates({});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksListChecklistTemplates } from "firehydrant-typescript-sdk/funcs/tasksListChecklistTemplates.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksListChecklistTemplates(firehydrant, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksListChecklistTemplates failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ListChecklistTemplatesRequest | ✔️ | 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<components.ChecklistTemplateEntityPaginated>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Creates a checklist template for the organization
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.createChecklistTemplate({
name: "<value>",
checks: [
{
name: "<value>",
},
],
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksCreateChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksCreateChecklistTemplate.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksCreateChecklistTemplate(firehydrant, {
name: "<value>",
checks: [
{
name: "<value>",
},
],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksCreateChecklistTemplate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
components.CreateChecklistTemplate | ✔️ | 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<components.ChecklistTemplateEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorEntity | 400 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Retrieves a single checklist template by ID
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.getChecklistTemplate({
id: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksGetChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksGetChecklistTemplate.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksGetChecklistTemplate(firehydrant, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksGetChecklistTemplate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetChecklistTemplateRequest | ✔️ | 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<components.ChecklistTemplateEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Archive a checklist template
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
await firehydrant.tasks.deleteChecklistTemplate({
id: "<id>",
});
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksDeleteChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksDeleteChecklistTemplate.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksDeleteChecklistTemplate(firehydrant, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("tasksDeleteChecklistTemplate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteChecklistTemplateRequest | ✔️ | 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.APIError | 4XX, 5XX | */* |
Update a checklist templates attributes
import { Firehydrant } from "firehydrant-typescript-sdk";
const firehydrant = new Firehydrant({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrant.tasks.updateChecklistTemplate({
id: "<id>",
updateChecklistTemplate: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { tasksUpdateChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksUpdateChecklistTemplate.js";
// Use `FirehydrantCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const firehydrant = new FirehydrantCore({
apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});
async function run() {
const res = await tasksUpdateChecklistTemplate(firehydrant, {
id: "<id>",
updateChecklistTemplate: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("tasksUpdateChecklistTemplate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateChecklistTemplateRequest | ✔️ | 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<components.ChecklistTemplateEntity>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |