Vigiar
1
0
Derivar
Você já tinha feito uma derivação do repositório api-n8n-node, anteriormente
0
api-n8n-node/nodes/MozOutMz/descriptions/ServicesDescription.ts
2026-11-28 15:28:09 +02:00

323 linhas
7,5 KiB
TypeScript

// Generated from the OpenAPI specification. Do not edit by hand: regenerate.
import type { INodeProperties } from 'n8n-workflow';
export const servicesOperations: INodeProperties[] = [{
"displayName": "Operation",
"name": "operation",
"type": "options",
"noDataExpression": true,
"displayOptions": {
"show": {
"resource": [
"service"
]
}
},
"options": [
{
"name": "List the services",
"value": "list",
"description": "Needs `hosting:read`. All the services of the account, the newest first. While a service is unpaid, `domain` and `username` may come as `null`.",
"action": "List the services",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/services"
},
"output": {
"postReceive": [
{
"type": "rootProperty",
"properties": {
"property": "data"
}
}
]
}
}
},
{
"name": "See a service",
"value": "get",
"description": "Needs `hosting:read`. Never returns passwords.",
"action": "See a service",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/services/{{encodeURIComponent(String($parameter[\"id\"]))}}"
}
}
},
{
"name": "Buy a plan",
"value": "purchase",
"description": "Needs `billing:purchase`. Buys a plan of the catalog: hosting, reseller hosting, radio, VPS and servers. Also needs the write permission of the product area: `hosting:write` for hosting, reseller...",
"action": "Buy a plan",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/services/purchase",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
}
],
"default": "list"
}];
export const servicesFields: INodeProperties[] = [
{
"displayName": "Query Parameters",
"name": "queryParameters",
"type": "collection",
"placeholder": "Add Parameter",
"default": {},
"displayOptions": {
"show": {
"resource": [
"service"
],
"operation": [
"list"
]
}
},
"options": [
{
"displayName": "Page",
"name": "page",
"type": "number",
"default": 1,
"typeOptions": {
"numberPrecision": 0
},
"description": "The page number. The first is 1.",
"routing": {
"send": {
"type": "query",
"property": "page"
}
}
},
{
"displayName": "Per Page",
"name": "per_page",
"type": "number",
"default": 10,
"typeOptions": {
"numberPrecision": 0
},
"description": "Results per page, from 1 to 100. The default is 10.",
"routing": {
"send": {
"type": "query",
"property": "per_page"
}
}
},
{
"displayName": "Status",
"name": "status",
"type": "options",
"options": [
{
"name": "pending",
"value": "pending"
},
{
"name": "active",
"value": "active"
},
{
"name": "suspended",
"value": "suspended"
},
{
"name": "terminated",
"value": "terminated"
},
{
"name": "cancelled",
"value": "cancelled"
},
{
"name": "fraud",
"value": "fraud"
},
{
"name": "completed",
"value": "completed"
}
],
"default": "pending",
"description": "Only results in this status.",
"routing": {
"send": {
"type": "query",
"property": "status"
}
}
}
]
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the service.",
"displayOptions": {
"show": {
"resource": [
"service"
],
"operation": [
"get"
]
}
}
},
{
"displayName": "Product ID",
"name": "product_id",
"type": "number",
"default": 0,
"typeOptions": {
"numberPrecision": 0
},
"required": true,
"description": "The `id` from the catalog.",
"routing": {
"send": {
"type": "body",
"property": "product_id"
}
},
"displayOptions": {
"show": {
"resource": [
"service"
],
"operation": [
"purchase"
]
}
}
},
{
"displayName": "Billing Cycle",
"name": "billing_cycle",
"type": "options",
"options": [
{
"name": "monthly",
"value": "monthly"
},
{
"name": "quarterly",
"value": "quarterly"
},
{
"name": "semi_annually",
"value": "semi_annually"
},
{
"name": "annually",
"value": "annually"
},
{
"name": "biennially",
"value": "biennially"
},
{
"name": "triennially",
"value": "triennially"
},
{
"name": "one_time",
"value": "one_time"
}
],
"default": "monthly",
"required": true,
"description": "One of the `billing_cycles` of the product.",
"routing": {
"send": {
"type": "body",
"property": "billing_cycle"
}
},
"displayOptions": {
"show": {
"resource": [
"service"
],
"operation": [
"purchase"
]
}
}
},
{
"displayName": "Additional Fields",
"name": "additionalFields",
"type": "collection",
"placeholder": "Add Field",
"default": {},
"displayOptions": {
"show": {
"resource": [
"service"
],
"operation": [
"purchase"
]
}
},
"options": [
{
"displayName": "Config Options",
"name": "config_options",
"type": "json",
"default": "{}",
"description": "Optional. `{\"option id\": choice id}`, from GET /v1/catalog/products/{id}.",
"routing": {
"send": {
"type": "body",
"property": "config_options",
"value": "={{ typeof $value === \"string\" ? ($value.trim() === \"\" ? undefined : JSON.parse($value)) : $value }}"
}
}
},
{
"displayName": "Domain",
"name": "domain",
"type": "string",
"default": "",
"description": "Hosting only, optional: a domain of this account, without `https`. Another domain answers `409` with `domain_not_owned`.",
"routing": {
"send": {
"type": "body",
"property": "domain"
}
}
},
{
"displayName": "Promo Code",
"name": "promo_code",
"type": "string",
"default": "",
"description": "Optional promo code. If it does not apply to this purchase, it answers `422` with `promo_not_applicable` and nothing is charged; if it does not exist, `promo_code_invalid`. In Sandbox the code is only checked to exist.",
"routing": {
"send": {
"type": "body",
"property": "promo_code"
}
}
}
]
}
];