@tuanltntu/n8n-nodes-bitrix24
Version:
Comprehensive n8n community node for Bitrix24 API integration with CRM, Tasks, Chat, Telephony, and more
260 lines • 7.56 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.catalogOperationFields = exports.catalogOperations = void 0;
/**
* Operations available for Catalog
* (operations now defined in catalogOperationFields)
*/
exports.catalogOperations = [
// Operation field for standalone catalog resource
{
displayName: "Operation",
name: "operation",
type: "options",
noDataExpression: true,
displayOptions: {
show: {},
},
options: [
{
name: "Create",
value: "create",
description: "Create a new catalog (crm.catalog.add)",
action: "Create a catalog",
},
{
name: "Delete",
value: "delete",
description: "Delete a catalog (crm.catalog.delete)",
action: "Delete a catalog",
},
{
name: "Get",
value: "get",
description: "Get a catalog (crm.catalog.get)",
action: "Get a catalog",
},
{
name: "Get All",
value: "getAll",
description: "Get all catalogs (crm.catalog.list)",
action: "Get all catalogs",
},
{
name: "Get Fields",
value: "getFields",
description: "Get catalog fields (crm.catalog.fields)",
action: "Get catalog fields",
},
{
name: "Update",
value: "update",
description: "Update a catalog (crm.catalog.update)",
action: "Update a catalog",
},
],
default: "getAll",
},
// Operation field for CRM catalog sub-resource
{
displayName: "CRM Catalog Operation",
name: "crmCatalogOperation",
type: "options",
noDataExpression: true,
displayOptions: {
show: {
crmResource: ["catalog"],
},
},
options: [
{
name: "Create",
value: "create",
description: "Create a catalog (crm.catalog.add)",
action: "Create a catalog",
},
{
name: "Delete",
value: "delete",
description: "Delete a catalog (crm.catalog.delete)",
action: "Delete a catalog",
},
{
name: "Get",
value: "get",
description: "Get a catalog (crm.catalog.get)",
action: "Get a catalog",
},
{
name: "Get All",
value: "getAll",
description: "Get all catalogs (crm.catalog.list)",
action: "Get all catalogs",
},
{
name: "Get Fields",
value: "getFields",
description: "Get catalog fields (crm.catalog.fields)",
action: "Get catalog fields",
},
{
name: "Update",
value: "update",
description: "Update a catalog (crm.catalog.update)",
action: "Update a catalog",
},
],
default: "getAll",
},
// Fields for all operations
{
displayName: "ID",
name: "id",
type: "string",
required: true,
default: "",
displayOptions: {
show: {
operation: ["get", "update", "delete"],
},
},
description: "ID of the catalog",
},
// Fields for create and update operations
{
displayName: "Name",
name: "name",
type: "string",
required: true,
default: "",
displayOptions: {
show: {
operation: ["create", "update"],
},
},
description: "Name of the catalog",
},
{
displayName: "Is Default",
name: "isDefault",
type: "boolean",
default: false,
displayOptions: {
show: {
operation: ["create", "update"],
},
},
description: "Whether this is the default catalog",
},
{
displayName: "Is SKU",
name: "isSku",
type: "boolean",
default: false,
displayOptions: {
show: {
operation: ["create", "update"],
},
},
description: "Whether this is a SKU catalog",
},
{
displayName: "JSON Parameters",
name: "jsonParameters",
type: "boolean",
default: false,
displayOptions: {
show: {
operation: ["getAll"],
},
},
},
// Filter fields for getAll
{
displayName: "Filters",
name: "filtersJson",
type: "json",
default: "",
displayOptions: {
show: {
operation: ["getAll"],
jsonParameters: [true],
},
},
description: "Filter for the query",
},
{
displayName: "Options",
name: "options",
type: "collection",
default: {},
description: "Additional options for fetching catalogs",
placeholder: "Add option",
options: [
{
displayName: "Order",
name: "order",
type: "json",
default: "",
description: "Sort order for the results",
placeholder: '{ "SORT": "ASC" }',
},
{
displayName: "Select",
name: "select",
type: "json",
default: "",
description: "Fields to return in the response",
placeholder: '["ID", "NAME"]',
},
{
displayName: "Start",
name: "start",
type: "number",
default: 0,
description: "Offset for pagination",
},
],
},
// Add additional catalog properties
{
displayName: "Additional Fields",
name: "additionalFields",
type: "collection",
placeholder: "Add Field",
default: {},
options: [
{
displayName: "Description",
name: "description",
type: "string",
default: "",
description: "Description of the catalog",
},
{
displayName: "Sort",
name: "sort",
type: "number",
default: 100,
description: "Sort order",
},
{
displayName: "Owner ID",
name: "ownerId",
type: "string",
default: "",
description: "Owner of the catalog",
},
{
displayName: "XML ID",
name: "xmlId",
type: "string",
default: "",
description: "External ID",
},
],
},
];
// Export legacy field names for backward compatibility
exports.catalogOperationFields = exports.catalogOperations;
//# sourceMappingURL=CatalogDescription.js.map