Skip to content

Latest commit

 

History

History
1307 lines (955 loc) · 99 KB

File metadata and controls

1307 lines (955 loc) · 99 KB

Tasks

Overview

Operations related to Tasks

Available Operations

createIncidentTaskList

Add all tasks from list to incident

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

listIncidentTasks

Retrieve a list of all tasks for a specific incident

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskEntityPaginated>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

createIncidentTask

Create a task

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

getIncidentTask

Retrieve a single task for an incident

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

deleteIncidentTask

Delete a task

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

updateIncidentTask

Update a task's attributes

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

convertIncidentTask

Convert a task to a follow-up

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskEntityPaginated>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

listTaskLists

Lists all task lists for your organization

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskListEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

createTaskList

Creates a new task list

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskListEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

getTaskList

Retrieves a single task list by ID

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskListEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

deleteTaskList

Delete a task list

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

updateTaskList

Updates a task list's attributes and task list items

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.TaskListEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

listChecklistTemplates

List all of the checklist templates that have been added to the organization

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.ChecklistTemplateEntityPaginated>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

createChecklistTemplate

Creates a checklist template for the organization

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.ChecklistTemplateEntity>

Errors

Error Type Status Code Content Type
errors.ErrorEntity 400 application/json
errors.APIError 4XX, 5XX */*

getChecklistTemplate

Retrieves a single checklist template by ID

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.ChecklistTemplateEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

deleteChecklistTemplate

Archive a checklist template

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

updateChecklistTemplate

Update a checklist templates attributes

Example Usage

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();

Standalone function

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();

Parameters

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.

Response

Promise<components.ChecklistTemplateEntity>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*