(accounts)
- deleteAccount - Delete Account
- getAccount - Get Account
- getAccountMetaInfo - Get meta information of the account
- 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>",
});
// Handle the result
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) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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>",
});
// Handle the result
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) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.SDKError | 4XX, 5XX | */* |
Get meta information of the account
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>",
});
// Handle the result
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) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.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({});
// Handle the result
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) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
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.SDKError | 4XX, 5XX | */* |
Update Account
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.accounts.updateAccount({
patchAccountExternalDto: {},
id: "<id>",
});
// Handle the result
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";
// 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: {},
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.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.SDKError | 4XX, 5XX | */* |