Chart of accounts.
- deleteAccount - Delete Account
- getAccount - Get Account
- getAccountMetaInfo - Get Account Meta Information
- listLinkedAccounts - List Accounts
- updateAccount - Update Account
Delete Account
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.accounts.deleteAccount({
id: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { accountsDeleteAccount } from "@stackone/stackone-client-ts/funcs/accountsDeleteAccount.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await accountsDeleteAccount(stackOne, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("accountsDeleteAccount failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneDeleteAccountRequest | ✔️ | 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<operations.StackoneDeleteAccountResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Account
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.accounts.getAccount({
id: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { accountsGetAccount } from "@stackone/stackone-client-ts/funcs/accountsGetAccount.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await accountsGetAccount(stackOne, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("accountsGetAccount failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneGetAccountRequest | ✔️ | 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<operations.StackoneGetAccountResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Account Meta Information
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.accounts.getAccountMetaInfo({
id: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { accountsGetAccountMetaInfo } from "@stackone/stackone-client-ts/funcs/accountsGetAccountMetaInfo.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await accountsGetAccountMetaInfo(stackOne, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("accountsGetAccountMetaInfo failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneGetAccountMetaInfoRequest | ✔️ | 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<operations.StackoneGetAccountMetaInfoResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
List Accounts
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.accounts.listLinkedAccounts({});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { accountsListLinkedAccounts } from "@stackone/stackone-client-ts/funcs/accountsListLinkedAccounts.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await accountsListLinkedAccounts(stackOne, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("accountsListLinkedAccounts failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneListLinkedAccountsRequest | ✔️ | 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<operations.StackoneListLinkedAccountsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Update Account
import { StackOne } from "@stackone/stackone-client-ts";
import { PatchAccountExternalDtoType } from "@stackone/stackone-client-ts/sdk/models/shared";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.accounts.updateAccount({
patchAccountExternalDto: {
type: PatchAccountExternalDtoType.Test,
},
id: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { accountsUpdateAccount } from "@stackone/stackone-client-ts/funcs/accountsUpdateAccount.js";
import { PatchAccountExternalDtoType } from "@stackone/stackone-client-ts/sdk/models/shared";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await accountsUpdateAccount(stackOne, {
patchAccountExternalDto: {
type: PatchAccountExternalDtoType.Test,
},
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("accountsUpdateAccount failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneUpdateAccountRequest | ✔️ | 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<operations.StackoneUpdateAccountResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |