Skip to content

Latest commit

 

History

History
419 lines (293 loc) · 44.4 KB

File metadata and controls

419 lines (293 loc) · 44.4 KB

RepeatItems

(project.queues.repeatItems)

Overview

Project Queues Repeat Items API

Available Operations

  • all - Get Queue Repeat Items
  • append - Append Queue Repeat Item
  • one - Get Queue Repeat Item
  • update - Update Queue Repeat Item
  • delete - Delete Queue Repeat Item

all

Gets all repeatable items of a queue.

Example Usage

import { IntunedClient } from "@intuned/client";

const intunedClient = new IntunedClient({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const result = await intunedClient.project.queues.repeatItems.all("my-project", "my-sample-queue");

  // Handle the result
  console.log(result)
}

run();

Standalone function

The standalone function version of this method:

import { IntunedClientCore } from "@intuned/client/core.js";
import { projectQueuesRepeatItemsAll } from "@intuned/client/funcs/projectQueuesRepeatItemsAll.js";

// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const res = await projectQueuesRepeatItemsAll(intunedClient, "my-project", "my-sample-queue");

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
projectName string ✔️ Your project name. It is the name you provide when creating a project. [object Object]
queueId string ✔️ Your queue ID. It is the ID of the queue you provided when creating it. [object Object]
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.QueueRepeatItem[]>

Errors

Error Object Status Code Content Type
errors.ApiErrorInvalidInput 400 application/json
errors.ApiErrorUnauthorized 401 application/json
errors.SDKError 4xx-5xx /

append

Creates and appends a repeatable item to the queue. Repeatable items will automatically re-append to the queue according to the repeat settings.

Example Usage

import { IntunedClient } from "@intuned/client";

const intunedClient = new IntunedClient({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const result = await intunedClient.project.queues.repeatItems.append("my-project", "my-sample-queue", {
    apiName: "<value>",
    repeat: "10m",
  });

  // Handle the result
  console.log(result)
}

run();

Standalone function

The standalone function version of this method:

import { IntunedClientCore } from "@intuned/client/core.js";
import { projectQueuesRepeatItemsAppend } from "@intuned/client/funcs/projectQueuesRepeatItemsAppend.js";

// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const res = await projectQueuesRepeatItemsAppend(intunedClient, "my-project", "my-sample-queue", {
    apiName: "<value>",
    repeat: "10m",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
projectName string ✔️ Your project name. It is the name you provide when creating a project. [object Object]
queueId string ✔️ Your queue ID. It is the ID of the queue you provided when creating it. [object Object]
queueRepeatItemInput components.QueueRepeatItemInput ✔️ queue repeat item
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.AddQueueRepeatItem>

Errors

Error Object Status Code Content Type
errors.ApiErrorInvalidInput 400 application/json
errors.ApiErrorUnauthorized 401 application/json
errors.SDKError 4xx-5xx /

one

Gets a repeatable item from a queue by ID. The last execution result of the item is also returned.

Example Usage

import { IntunedClient } from "@intuned/client";

const intunedClient = new IntunedClient({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const result = await intunedClient.project.queues.repeatItems.one("my-project", "my-sample-queue", "22222222-2222-2222-2222-222222222222");

  // Handle the result
  console.log(result)
}

run();

Standalone function

The standalone function version of this method:

import { IntunedClientCore } from "@intuned/client/core.js";
import { projectQueuesRepeatItemsOne } from "@intuned/client/funcs/projectQueuesRepeatItemsOne.js";

// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const res = await projectQueuesRepeatItemsOne(intunedClient, "my-project", "my-sample-queue", "22222222-2222-2222-2222-222222222222");

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
projectName string ✔️ Your project name. It is the name you provide when creating a project. [object Object]
queueId string ✔️ Your queue ID. It is the ID of the queue you provided when creating it. [object Object]
itemId string ✔️ Repeat Item ID [object Object]
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.QueueRepeatItem>

Errors

Error Object Status Code Content Type
errors.ApiErrorInvalidInput 400 application/json
errors.ApiErrorUnauthorized 401 application/json
errors.SDKError 4xx-5xx /

update

Updates the configurations of a repeatable item by ID.

Example Usage

import { IntunedClient } from "@intuned/client";

const intunedClient = new IntunedClient({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const result = await intunedClient.project.queues.repeatItems.update("my-project", "my-sample-queue", "22222222-2222-2222-2222-222222222222", {
    apiName: "<value>",
    repeat: "10m",
  });

  // Handle the result
  console.log(result)
}

run();

Standalone function

The standalone function version of this method:

import { IntunedClientCore } from "@intuned/client/core.js";
import { projectQueuesRepeatItemsUpdate } from "@intuned/client/funcs/projectQueuesRepeatItemsUpdate.js";

// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const res = await projectQueuesRepeatItemsUpdate(intunedClient, "my-project", "my-sample-queue", "22222222-2222-2222-2222-222222222222", {
    apiName: "<value>",
    repeat: "10m",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description Example
projectName string ✔️ Your project name. It is the name you provide when creating a project. [object Object]
queueId string ✔️ Your queue ID. It is the ID of the queue you provided when creating it. [object Object]
itemId string ✔️ Repeat Item ID [object Object]
queueRepeatItemInput components.QueueRepeatItemInput ✔️ queue repeatable item
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.UpdateQueueRepeatItem>

Errors

Error Object Status Code Content Type
errors.ApiErrorInvalidInput 400 application/json
errors.ApiErrorUnauthorized 401 application/json
errors.SDKError 4xx-5xx /

delete

Deletes a repeatable item by ID. The item will no longer be re-appended to the queue.

Example Usage

import { IntunedClient } from "@intuned/client";

const intunedClient = new IntunedClient({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  await intunedClient.project.queues.repeatItems.delete("my-project", "my-sample-queue", "22222222-2222-2222-2222-222222222222");

  
}

run();

Standalone function

The standalone function version of this method:

import { IntunedClientCore } from "@intuned/client/core.js";
import { projectQueuesRepeatItemsDelete } from "@intuned/client/funcs/projectQueuesRepeatItemsDelete.js";

// Use `IntunedClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const intunedClient = new IntunedClientCore({
  apiKey: "<YOUR_API_KEY_HERE>",
  workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
});

async function run() {
  const res = await projectQueuesRepeatItemsDelete(intunedClient, "my-project", "my-sample-queue", "22222222-2222-2222-2222-222222222222");

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  
}

run();

Parameters

Parameter Type Required Description Example
projectName string ✔️ Your project name. It is the name you provide when creating a project. [object Object]
queueId string ✔️ Your queue ID. It is the ID of the queue you provided when creating it. [object Object]
itemId string ✔️ Repeat Item ID [object Object]
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 Object Status Code Content Type
errors.ApiErrorInvalidInput 400 application/json
errors.ApiErrorUnauthorized 401 application/json
errors.SDKError 4xx-5xx /