Skip to content

Latest commit

 

History

History
1056 lines (764 loc) · 81.4 KB

File metadata and controls

1056 lines (764 loc) · 81.4 KB

Changes

Overview

Operations related to Changes

Available Operations

listChanges

List changes for the organization

Example Usage

import { Firehydrant } from "firehydrant-typescript-sdk";

const firehydrant = new Firehydrant({
  apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});

async function run() {
  await firehydrant.changes.listChanges({});


}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesListChanges } from "firehydrant-typescript-sdk/funcs/changesListChanges.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 changesListChanges(firehydrant, {});
  if (res.ok) {
    const { value: result } = res;
    
  } else {
    console.log("changesListChanges failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ListChangesRequest ✔️ 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 */*

createChange

Create a new change entry

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.changes.createChange({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesCreateChange } from "firehydrant-typescript-sdk/funcs/changesCreateChange.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 changesCreateChange(firehydrant, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesCreateChange failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request components.CreateChange ✔️ 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.ChangeEntity>

Errors

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

deleteChange

Archive a change entry

Example Usage

import { Firehydrant } from "firehydrant-typescript-sdk";

const firehydrant = new Firehydrant({
  apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});

async function run() {
  await firehydrant.changes.deleteChange({
    changeId: "<id>",
  });


}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesDeleteChange } from "firehydrant-typescript-sdk/funcs/changesDeleteChange.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 changesDeleteChange(firehydrant, {
    changeId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    
  } else {
    console.log("changesDeleteChange failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.DeleteChangeRequest ✔️ 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 */*

updateChange

Update a change entry

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.changes.updateChange({
    changeId: "<id>",
    updateChange: {},
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesUpdateChange } from "firehydrant-typescript-sdk/funcs/changesUpdateChange.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 changesUpdateChange(firehydrant, {
    changeId: "<id>",
    updateChange: {},
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesUpdateChange failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.UpdateChangeRequest ✔️ 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.ChangeEntity>

Errors

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

listChangeIdentities

Retrieve all identities for the change entry

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.changes.listChangeIdentities({
    changeId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesListChangeIdentities } from "firehydrant-typescript-sdk/funcs/changesListChangeIdentities.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 changesListChangeIdentities(firehydrant, {
    changeId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesListChangeIdentities failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ListChangeIdentitiesRequest ✔️ 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.ChangeIdentityEntityPaginated>

Errors

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

createChangeIdentity

Create an identity for the change entry

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.changes.createChangeIdentity({
    changeId: "<id>",
    createChangeIdentity: {
      type: "<value>",
      value: "<value>",
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesCreateChangeIdentity } from "firehydrant-typescript-sdk/funcs/changesCreateChangeIdentity.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 changesCreateChangeIdentity(firehydrant, {
    changeId: "<id>",
    createChangeIdentity: {
      type: "<value>",
      value: "<value>",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesCreateChangeIdentity failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.CreateChangeIdentityRequest ✔️ 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.ChangeIdentityEntity>

Errors

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

deleteChangeIdentity

Delete an identity from the change entry

Example Usage

import { Firehydrant } from "firehydrant-typescript-sdk";

const firehydrant = new Firehydrant({
  apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});

async function run() {
  await firehydrant.changes.deleteChangeIdentity({
    identityId: "<id>",
    changeId: "<id>",
  });


}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesDeleteChangeIdentity } from "firehydrant-typescript-sdk/funcs/changesDeleteChangeIdentity.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 changesDeleteChangeIdentity(firehydrant, {
    identityId: "<id>",
    changeId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    
  } else {
    console.log("changesDeleteChangeIdentity failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.DeleteChangeIdentityRequest ✔️ 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.ErrorEntity 400 application/json
errors.APIError 4XX, 5XX */*

updateChangeIdentity

Update an identity for the change entry

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.changes.updateChangeIdentity({
    identityId: "<id>",
    changeId: "<id>",
    updateChangeIdentity: {
      type: "<value>",
      value: "<value>",
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesUpdateChangeIdentity } from "firehydrant-typescript-sdk/funcs/changesUpdateChangeIdentity.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 changesUpdateChangeIdentity(firehydrant, {
    identityId: "<id>",
    changeId: "<id>",
    updateChangeIdentity: {
      type: "<value>",
      value: "<value>",
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesUpdateChangeIdentity failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.UpdateChangeIdentityRequest ✔️ 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.ChangeIdentityEntity>

Errors

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

listChangeEvents

List change events for the organization. Note: Not all information is included on a change event like attachments and related changes. You must fetch a change event separately to retrieve all of the information about it

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.changes.listChangeEvents({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesListChangeEvents } from "firehydrant-typescript-sdk/funcs/changesListChangeEvents.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 changesListChangeEvents(firehydrant, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesListChangeEvents failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ListChangeEventsRequest ✔️ 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.ChangeEventSlimEntityPaginated>

Errors

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

createChangeEvent

Create a change event

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.changes.createChangeEvent({
    summary: "<value>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesCreateChangeEvent } from "firehydrant-typescript-sdk/funcs/changesCreateChangeEvent.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 changesCreateChangeEvent(firehydrant, {
    summary: "<value>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesCreateChangeEvent failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request components.CreateChangeEvent ✔️ 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.ChangeEventEntity>

Errors

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

getChangeEvent

Retrieve a change event

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.changes.getChangeEvent({
    changeEventId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesGetChangeEvent } from "firehydrant-typescript-sdk/funcs/changesGetChangeEvent.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 changesGetChangeEvent(firehydrant, {
    changeEventId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesGetChangeEvent failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetChangeEventRequest ✔️ 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.ChangeEventEntity>

Errors

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

deleteChangeEvent

Delete a change event

Example Usage

import { Firehydrant } from "firehydrant-typescript-sdk";

const firehydrant = new Firehydrant({
  apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "",
});

async function run() {
  await firehydrant.changes.deleteChangeEvent({
    changeEventId: "<id>",
  });


}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesDeleteChangeEvent } from "firehydrant-typescript-sdk/funcs/changesDeleteChangeEvent.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 changesDeleteChangeEvent(firehydrant, {
    changeEventId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    
  } else {
    console.log("changesDeleteChangeEvent failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.DeleteChangeEventRequest ✔️ 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 */*

updateChangeEvent

Update a change event

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.changes.updateChangeEvent({
    changeEventId: "<id>",
    updateChangeEvent: {},
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesUpdateChangeEvent } from "firehydrant-typescript-sdk/funcs/changesUpdateChangeEvent.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 changesUpdateChangeEvent(firehydrant, {
    changeEventId: "<id>",
    updateChangeEvent: {},
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesUpdateChangeEvent failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.UpdateChangeEventRequest ✔️ 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.ChangeEventEntity>

Errors

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

listChangeTypes

List change types 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.changes.listChangeTypes({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { FirehydrantCore } from "firehydrant-typescript-sdk/core.js";
import { changesListChangeTypes } from "firehydrant-typescript-sdk/funcs/changesListChangeTypes.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 changesListChangeTypes(firehydrant, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("changesListChangeTypes failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.ListChangeTypesRequest ✔️ 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.ChangeTypeEntityPaginated>

Errors

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