(fileStorage.drives)
- list - List Drives
- create - Create Drive
- get - Get Drive
- update - Update Drive
- delete - Delete Drive
List Drives
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const result = await apideck.fileStorage.drives.list({
serviceId: "salesforce",
filter: {
groupId: "1234",
},
fields: "id,updated_at",
});
for await (const page of result) {
// Handle the page
console.log(page);
}
}
run();
The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { fileStorageDrivesList } from "@apideck/unify/funcs/fileStorageDrivesList.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const res = await fileStorageDrivesList(apideck, {
serviceId: "salesforce",
filter: {
groupId: "1234",
},
fields: "id,updated_at",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
for await (const page of result) {
// Handle the page
console.log(page);
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FileStorageDrivesAllRequest | ✔️ | 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.FileStorageDrivesAllResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequestResponse | 400 | application/json |
errors.UnauthorizedResponse | 401 | application/json |
errors.PaymentRequiredResponse | 402 | application/json |
errors.NotFoundResponse | 404 | application/json |
errors.UnprocessableResponse | 422 | application/json |
errors.APIError | 4XX, 5XX | */* |
Create Drive
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const result = await apideck.fileStorage.drives.create({
serviceId: "salesforce",
drive: {
name: "Project Resources",
description: "A description",
passThrough: [
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
],
},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { fileStorageDrivesCreate } from "@apideck/unify/funcs/fileStorageDrivesCreate.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const res = await fileStorageDrivesCreate(apideck, {
serviceId: "salesforce",
drive: {
name: "Project Resources",
description: "A description",
passThrough: [
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
],
},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FileStorageDrivesAddRequest | ✔️ | 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.FileStorageDrivesAddResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequestResponse | 400 | application/json |
errors.UnauthorizedResponse | 401 | application/json |
errors.PaymentRequiredResponse | 402 | application/json |
errors.NotFoundResponse | 404 | application/json |
errors.UnprocessableResponse | 422 | application/json |
errors.APIError | 4XX, 5XX | */* |
Get Drive
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const result = await apideck.fileStorage.drives.get({
id: "<id>",
serviceId: "salesforce",
fields: "id,updated_at",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { fileStorageDrivesGet } from "@apideck/unify/funcs/fileStorageDrivesGet.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const res = await fileStorageDrivesGet(apideck, {
id: "<id>",
serviceId: "salesforce",
fields: "id,updated_at",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FileStorageDrivesOneRequest | ✔️ | 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.FileStorageDrivesOneResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequestResponse | 400 | application/json |
errors.UnauthorizedResponse | 401 | application/json |
errors.PaymentRequiredResponse | 402 | application/json |
errors.NotFoundResponse | 404 | application/json |
errors.UnprocessableResponse | 422 | application/json |
errors.APIError | 4XX, 5XX | */* |
Update Drive
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const result = await apideck.fileStorage.drives.update({
id: "<id>",
serviceId: "salesforce",
drive: {
name: "Project Resources",
description: "A description",
passThrough: [
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
],
},
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { fileStorageDrivesUpdate } from "@apideck/unify/funcs/fileStorageDrivesUpdate.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const res = await fileStorageDrivesUpdate(apideck, {
id: "<id>",
serviceId: "salesforce",
drive: {
name: "Project Resources",
description: "A description",
passThrough: [
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
],
},
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FileStorageDrivesUpdateRequest | ✔️ | 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.FileStorageDrivesUpdateResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequestResponse | 400 | application/json |
errors.UnauthorizedResponse | 401 | application/json |
errors.PaymentRequiredResponse | 402 | application/json |
errors.NotFoundResponse | 404 | application/json |
errors.UnprocessableResponse | 422 | application/json |
errors.APIError | 4XX, 5XX | */* |
Delete Drive
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const result = await apideck.fileStorage.drives.delete({
id: "<id>",
serviceId: "salesforce",
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { fileStorageDrivesDelete } from "@apideck/unify/funcs/fileStorageDrivesDelete.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
apiKey: process.env["APIDECK_API_KEY"] ?? "",
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
});
async function run() {
const res = await fileStorageDrivesDelete(apideck, {
id: "<id>",
serviceId: "salesforce",
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FileStorageDrivesDeleteRequest | ✔️ | 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.FileStorageDrivesDeleteResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.BadRequestResponse | 400 | application/json |
errors.UnauthorizedResponse | 401 | application/json |
errors.PaymentRequiredResponse | 402 | application/json |
errors.NotFoundResponse | 404 | application/json |
errors.UnprocessableResponse | 422 | application/json |
errors.APIError | 4XX, 5XX | */* |