- list - List custom object schemas
- create - Create custom object schema
- get - Get custom object schema
- update - Update custom object schema
- delete - Delete custom object schema
List custom object schemas
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const result = await apideck.crm.customObjectSchemas.list({
serviceId: "salesforce",
passThrough: {
"search": "San Francisco",
},
});
for await (const page of result) {
console.log(page);
}
}
run();The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { crmCustomObjectSchemasList } from "@apideck/unify/funcs/crmCustomObjectSchemasList.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const res = await crmCustomObjectSchemasList(apideck, {
serviceId: "salesforce",
passThrough: {
"search": "San Francisco",
},
});
if (res.ok) {
const { value: result } = res;
for await (const page of result) {
console.log(page);
}
} else {
console.log("crmCustomObjectSchemasList failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CrmCustomObjectSchemasAllRequest | ✔️ | 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.CrmCustomObjectSchemasAllResponse>
| 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 custom object schema
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const result = await apideck.crm.customObjectSchemas.create({
serviceId: "salesforce",
customObjectSchema: {
name: "project",
description: "This schema defines a project custom object",
fields: [
{
id: "field_123",
name: "project_name",
description: "Name of the project",
type: "string",
required: true,
options: [
{
value: "option1",
label: "Option 1",
},
],
defaultValue: "New Project",
},
],
visible: true,
active: true,
passThrough: [
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
{
serviceId: "<id>",
extendPaths: [
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
],
},
});
console.log(result);
}
run();The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { crmCustomObjectSchemasCreate } from "@apideck/unify/funcs/crmCustomObjectSchemasCreate.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const res = await crmCustomObjectSchemasCreate(apideck, {
serviceId: "salesforce",
customObjectSchema: {
name: "project",
description: "This schema defines a project custom object",
fields: [
{
id: "field_123",
name: "project_name",
description: "Name of the project",
type: "string",
required: true,
options: [
{
value: "option1",
label: "Option 1",
},
],
defaultValue: "New Project",
},
],
visible: true,
active: true,
passThrough: [
{
serviceId: "<id>",
extendPaths: [
{
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) {
const { value: result } = res;
console.log(result);
} else {
console.log("crmCustomObjectSchemasCreate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CrmCustomObjectSchemasAddRequest | ✔️ | 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.CrmCustomObjectSchemasAddResponse>
| 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 custom object schema
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const result = await apideck.crm.customObjectSchemas.get({
id: "<id>",
serviceId: "salesforce",
});
console.log(result);
}
run();The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { crmCustomObjectSchemasGet } from "@apideck/unify/funcs/crmCustomObjectSchemasGet.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const res = await crmCustomObjectSchemasGet(apideck, {
id: "<id>",
serviceId: "salesforce",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("crmCustomObjectSchemasGet failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CrmCustomObjectSchemasOneRequest | ✔️ | 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.CrmCustomObjectSchemasOneResponse>
| 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 custom object schema
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const result = await apideck.crm.customObjectSchemas.update({
id: "<id>",
serviceId: "salesforce",
customObjectSchema: {
name: "project",
description: "This schema defines a project custom object",
fields: [
{
id: "field_123",
name: "project_name",
description: "Name of the project",
type: "string",
required: true,
options: [
{
value: "option1",
label: "Option 1",
},
{
value: "option1",
label: "Option 1",
},
],
defaultValue: "New Project",
},
{
id: "field_123",
name: "project_name",
description: "Name of the project",
type: "string",
required: true,
options: [
{
value: "option1",
label: "Option 1",
},
{
value: "option1",
label: "Option 1",
},
],
defaultValue: "New Project",
},
{
id: "field_123",
name: "project_name",
description: "Name of the project",
type: "string",
required: true,
options: [
{
value: "option1",
label: "Option 1",
},
{
value: "option1",
label: "Option 1",
},
],
defaultValue: "New Project",
},
],
visible: true,
active: true,
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",
},
},
},
{
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",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
],
},
});
console.log(result);
}
run();The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { crmCustomObjectSchemasUpdate } from "@apideck/unify/funcs/crmCustomObjectSchemasUpdate.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const res = await crmCustomObjectSchemasUpdate(apideck, {
id: "<id>",
serviceId: "salesforce",
customObjectSchema: {
name: "project",
description: "This schema defines a project custom object",
fields: [
{
id: "field_123",
name: "project_name",
description: "Name of the project",
type: "string",
required: true,
options: [
{
value: "option1",
label: "Option 1",
},
{
value: "option1",
label: "Option 1",
},
],
defaultValue: "New Project",
},
{
id: "field_123",
name: "project_name",
description: "Name of the project",
type: "string",
required: true,
options: [
{
value: "option1",
label: "Option 1",
},
{
value: "option1",
label: "Option 1",
},
],
defaultValue: "New Project",
},
{
id: "field_123",
name: "project_name",
description: "Name of the project",
type: "string",
required: true,
options: [
{
value: "option1",
label: "Option 1",
},
{
value: "option1",
label: "Option 1",
},
],
defaultValue: "New Project",
},
],
visible: true,
active: true,
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",
},
},
},
{
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",
},
},
},
{
path: "$.nested.property",
value: {
"TaxClassificationRef": {
"value": "EUC-99990201-V1-00020000",
},
},
},
],
},
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("crmCustomObjectSchemasUpdate failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CrmCustomObjectSchemasUpdateRequest | ✔️ | 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.CrmCustomObjectSchemasUpdateResponse>
| 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 custom object schema
import { Apideck } from "@apideck/unify";
const apideck = new Apideck({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const result = await apideck.crm.customObjectSchemas.delete({
id: "<id>",
serviceId: "salesforce",
});
console.log(result);
}
run();The standalone function version of this method:
import { ApideckCore } from "@apideck/unify/core.js";
import { crmCustomObjectSchemasDelete } from "@apideck/unify/funcs/crmCustomObjectSchemasDelete.js";
// Use `ApideckCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const apideck = new ApideckCore({
consumerId: "test-consumer",
appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
apiKey: process.env["APIDECK_API_KEY"] ?? "",
});
async function run() {
const res = await crmCustomObjectSchemasDelete(apideck, {
id: "<id>",
serviceId: "salesforce",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("crmCustomObjectSchemasDelete failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CrmCustomObjectSchemasDeleteRequest | ✔️ | 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.CrmCustomObjectSchemasDeleteResponse>
| 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 | */* |