(tasks)
Operations related to Tasks
- listChecklistTemplates - List checklist templates
- createChecklistTemplate - Create a checklist template
- deleteChecklistTemplate - Archive a checklist template
- updateChecklistTemplate - Update a checklist template
- listForIncident - List tasks for an incident
- create - Create a task for an incident
- getForIncident - Get a task for an incident
- delete - Delete a task from an incident
- updateTask - Update a task for an incident
- convertToFollowup - Convert a task to a follow-up
- listTasks - List task lists
- createList - Create a task list
- get - Get a task list
- update - Update a task list
List all of the checklist templates that have been added to the organization
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.listChecklistTemplates({});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksListChecklistTemplates } from "firehydrant-typescript-sdk/funcs/tasksListChecklistTemplates.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 tasksListChecklistTemplates(firehydrantTypescriptSDK, {});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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 | */* |
Creates a checklist template for the organization
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.createChecklistTemplate({
name: "<value>",
checks: [
{
name: "<value>",
},
],
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksCreateChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksCreateChecklistTemplate.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 tasksCreateChecklistTemplate(firehydrantTypescriptSDK, {
name: "<value>",
checks: [
{
name: "<value>",
},
],
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.PostV1ChecklistTemplates | ✔️ | 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.Unauthorized | 401, 403, 407, 511 | application/json |
errors.NotFound | 404, 501, 505 | application/json |
errors.Timeout | 408, 504 | application/json |
errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json |
errors.RateLimited | 429 | application/json |
errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json |
errors.APIError | 4XX, 5XX | */* |
Archive a checklist template
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.deleteChecklistTemplate({
id: "<id>",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksDeleteChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksDeleteChecklistTemplate.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 tasksDeleteChecklistTemplate(firehydrantTypescriptSDK, {
id: "<id>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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<components.ChecklistTemplateEntity>
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 | */* |
Update a checklist templates attributes
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.updateChecklistTemplate({
id: "<id>",
patchV1ChecklistTemplatesId: {},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksUpdateChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksUpdateChecklistTemplate.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 tasksUpdateChecklistTemplate(firehydrantTypescriptSDK, {
id: "<id>",
patchV1ChecklistTemplatesId: {},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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 | */* |
Retrieve a list of all tasks for a specific incident
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.listForIncident({
incidentId: "<id>",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksListForIncident } from "firehydrant-typescript-sdk/funcs/tasksListForIncident.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 tasksListForIncident(firehydrantTypescriptSDK, {
incidentId: "<id>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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 | */* |
Create a task
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.create({
incidentId: "<id>",
postV1IncidentsIncidentIdTasks: {
title: "<value>",
},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksCreate } from "firehydrant-typescript-sdk/funcs/tasksCreate.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 tasksCreate(firehydrantTypescriptSDK, {
incidentId: "<id>",
postV1IncidentsIncidentIdTasks: {
title: "<value>",
},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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 | */* |
Retrieve a single task for an incident
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
await firehydrantTypescriptSDK.tasks.getForIncident({
taskId: "<id>",
incidentId: "<id>",
});
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksGetForIncident } from "firehydrant-typescript-sdk/funcs/tasksGetForIncident.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 tasksGetForIncident(firehydrantTypescriptSDK, {
taskId: "<id>",
incidentId: "<id>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
}
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.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 | */* |
Delete a task
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
await firehydrantTypescriptSDK.tasks.delete({
taskId: "<id>",
incidentId: "<id>",
});
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksDelete } from "firehydrant-typescript-sdk/funcs/tasksDelete.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 tasksDelete(firehydrantTypescriptSDK, {
taskId: "<id>",
incidentId: "<id>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
}
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.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 | */* |
Update a task's attributes
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.updateTask({
taskId: "<id>",
incidentId: "<id>",
patchV1IncidentsIncidentIdTasksTaskId: {},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksUpdateTask } from "firehydrant-typescript-sdk/funcs/tasksUpdateTask.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 tasksUpdateTask(firehydrantTypescriptSDK, {
taskId: "<id>",
incidentId: "<id>",
patchV1IncidentsIncidentIdTasksTaskId: {},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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 | */* |
Convert a task to a follow-up
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.convertToFollowup({
taskId: "<id>",
incidentId: "<id>",
postV1IncidentsIncidentIdTasksTaskIdConvert: {},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksConvertToFollowup } from "firehydrant-typescript-sdk/funcs/tasksConvertToFollowup.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 tasksConvertToFollowup(firehydrantTypescriptSDK, {
taskId: "<id>",
incidentId: "<id>",
postV1IncidentsIncidentIdTasksTaskIdConvert: {},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ConvertIncidentTaskToFollowupRequest | ✔️ | 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.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 | */* |
Lists all task lists for your organization
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.listTasks({});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksListTasks } from "firehydrant-typescript-sdk/funcs/tasksListTasks.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 tasksListTasks(firehydrantTypescriptSDK, {});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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 | */* |
Creates a new task list
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.createList({
name: "<value>",
taskListItems: [
{
summary: "<value>",
},
{
summary: "<value>",
},
],
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksCreateList } from "firehydrant-typescript-sdk/funcs/tasksCreateList.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 tasksCreateList(firehydrantTypescriptSDK, {
name: "<value>",
taskListItems: [
{
summary: "<value>",
},
{
summary: "<value>",
},
],
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.PostV1TaskLists | ✔️ | 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.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 | */* |
Retrieves a single task list by ID
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.get({
taskListId: "<id>",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksGet } from "firehydrant-typescript-sdk/funcs/tasksGet.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 tasksGet(firehydrantTypescriptSDK, {
taskListId: "<id>",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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 task list's attributes and task list items
import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk";
const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({
apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "",
});
async function run() {
const result = await firehydrantTypescriptSDK.tasks.update({
taskListId: "<id>",
patchV1TaskListsTaskListId: {},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js";
import { tasksUpdate } from "firehydrant-typescript-sdk/funcs/tasksUpdate.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 tasksUpdate(firehydrantTypescriptSDK, {
taskListId: "<id>",
patchV1TaskListsTaskListId: {},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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 | */* |