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/ResellerDescription.ts
2026-11-28 15:28:09 +02:00

710 linhas
17 KiB
TypeScript

// Generated from the OpenAPI specification. Do not edit by hand: regenerate.
import type { INodeProperties } from 'n8n-workflow';
export const resellerOperations: INodeProperties[] = [{
"displayName": "Operation",
"name": "operation",
"type": "options",
"noDataExpression": true,
"displayOptions": {
"show": {
"resource": [
"reseller"
]
}
},
"options": [
{
"name": "See the reseller programs",
"value": "get",
"description": "Needs `reseller:read`. Which reseller programs this account has: domains, SMS and hosting, and the Agency of the Reseller Program.",
"action": "See the reseller programs",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/reseller"
}
}
},
{
"name": "List reseller accounts",
"value": "servicesList",
"description": "Needs `reseller:read`. The reseller hosting accounts of this account. Access data never comes here.",
"action": "List reseller accounts",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/reseller/services"
},
"output": {
"postReceive": [
{
"type": "rootProperty",
"properties": {
"property": "data"
}
}
]
}
}
},
{
"name": "See a reseller account",
"value": "servicesGet",
"description": "Needs `reseller:read`. One reseller hosting account of this account.",
"action": "See a reseller account",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/reseller/services/{{encodeURIComponent(String($parameter[\"id\"]))}}"
}
}
},
{
"name": "See your Agency",
"value": "programGet",
"description": "Needs `reseller:read`. Your Agency and discount, what counts for the next Agency (paid in the last 12 months plus credit, or active domains and services: one of the two is enough), the review...",
"action": "See your Agency",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/reseller/program"
}
}
},
{
"name": "See your prices",
"value": "pricingList",
"description": "Needs `reseller:read`. Your prices, the same as the catalog: `type=domains` (default) gives the extensions, as in GET /v1/catalog/tlds, and `type=products` the products, as in GET...",
"action": "See your prices",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/reseller/pricing"
},
"output": {
"postReceive": [
{
"type": "rootProperty",
"properties": {
"property": "data"
}
}
]
}
}
},
{
"name": "List end customers",
"value": "customersList",
"description": "Needs `reseller:read`. The domains and services of this account that have an end customer label, newest first. Filter with `type` (`domain` or `service`) and `search` (label or domain). Only for...",
"action": "List end customers",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/reseller/customers"
},
"output": {
"postReceive": [
{
"type": "rootProperty",
"properties": {
"property": "data"
}
}
]
}
}
},
{
"name": "Label an end customer",
"value": "customersSet",
"description": "Needs `reseller:write`. Writes the end customer of a domain or service of this account, up to 80 characters; an empty `name` removes the label. The same label as in your account. Another account's...",
"action": "Label an end customer",
"routing": {
"request": {
"method": "PUT",
"url": "=/v1/reseller/customers/{{encodeURIComponent(String($parameter[\"type\"]))}}/{{encodeURIComponent(String($parameter[\"id\"]))}}"
}
}
},
{
"name": "Create a top-up invoice",
"value": "topUpCreate",
"description": "Needs `reseller:write`. Creates an invoice that adds `amount` to the credit when paid, without tax; nothing is charged. Pay it at `pay_url` with the methods of the account. The minimum is...",
"action": "Create a top-up invoice",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/reseller/top-up",
"headers": {
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
}
}
}
},
{
"name": "See the credit statement",
"value": "statementsGet",
"description": "Needs `reseller:read`. The credit movements of one month (`month=YYYY-MM`, current month by default), oldest first and in pages, with the opening and closing balance and the totals in and out of the...",
"action": "See the credit statement",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/reseller/statements"
}
}
},
{
"name": "See the account webhook",
"value": "webhooksGet",
"description": "Needs `webhooks:read`. The address and the events of the account webhook, never the secret. It is the same address as the SMS webhook. `available_events` lists the events you can choose.",
"action": "See the account webhook",
"routing": {
"request": {
"method": "GET",
"url": "=/v1/webhooks"
}
}
},
{
"name": "Save the account webhook",
"value": "webhooksSet",
"description": "Needs `webhooks:write`. Saves the HTTPS address (port 443) and the full list of events. The `secret` is shown only when the webhook is created or with `rotate_secret: true`: keep it. The SMS webhook...",
"action": "Save the account webhook",
"routing": {
"request": {
"method": "PUT",
"url": "=/v1/webhooks"
}
}
},
{
"name": "Delete the account webhook",
"value": "webhooksDelete",
"description": "Needs `webhooks:write`. Deletes the address and all its events, the SMS ones included, and cancels the events not yet delivered.",
"action": "Delete the account webhook",
"routing": {
"request": {
"method": "DELETE",
"url": "=/v1/webhooks"
}
}
},
{
"name": "Test the account webhook",
"value": "webhooksTest",
"description": "Needs `webhooks:write`. Sends a signed `webhook.test` event to the saved address now and returns what your server answered.",
"action": "Test the account webhook",
"routing": {
"request": {
"method": "POST",
"url": "=/v1/webhooks/test"
}
}
}
],
"default": "get"
}];
export const resellerFields: INodeProperties[] = [
{
"displayName": "Query Parameters",
"name": "queryParameters",
"type": "collection",
"placeholder": "Add Parameter",
"default": {},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"servicesList"
]
}
},
"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": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the account.",
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"servicesGet"
]
}
}
},
{
"displayName": "Query Parameters",
"name": "queryParameters",
"type": "collection",
"placeholder": "Add Parameter",
"default": {},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"pricingList"
]
}
},
"options": [
{
"displayName": "Currency",
"name": "currency",
"type": "string",
"default": "",
"description": "Optional currency code, such as `USD`.",
"routing": {
"send": {
"type": "query",
"property": "currency"
}
}
},
{
"displayName": "Extension",
"name": "extension",
"type": "string",
"default": "",
"description": "Domains only: one extension, such as `co.mz`.",
"routing": {
"send": {
"type": "query",
"property": "extension"
}
}
},
{
"displayName": "Group ID",
"name": "group_id",
"type": "string",
"default": "",
"description": "Products only: one product group.",
"routing": {
"send": {
"type": "query",
"property": "group_id"
}
}
},
{
"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": "Type",
"name": "type",
"type": "options",
"options": [
{
"name": "domains",
"value": "domains"
},
{
"name": "products",
"value": "products"
}
],
"default": "domains",
"description": "`domains` (default) or `products`.",
"routing": {
"send": {
"type": "query",
"property": "type"
}
}
}
]
},
{
"displayName": "Query Parameters",
"name": "queryParameters",
"type": "collection",
"placeholder": "Add Parameter",
"default": {},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"customersList"
]
}
},
"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": "Search",
"name": "search",
"type": "string",
"default": "",
"description": "Text in the label or in the domain, up to 80 characters.",
"routing": {
"send": {
"type": "query",
"property": "search"
}
}
},
{
"displayName": "Type",
"name": "type",
"type": "options",
"options": [
{
"name": "domain",
"value": "domain"
},
{
"name": "service",
"value": "service"
}
],
"default": "domain",
"description": "`domain` or `service`.",
"routing": {
"send": {
"type": "query",
"property": "type"
}
}
}
]
},
{
"displayName": "Type",
"name": "type",
"type": "string",
"required": true,
"default": "",
"description": "`domain` or `service`.",
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"customersSet"
]
}
}
},
{
"displayName": "ID",
"name": "id",
"type": "string",
"required": true,
"default": "",
"description": "The `id` of the domain or service.",
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"customersSet"
]
}
}
},
{
"displayName": "Name",
"name": "name",
"type": "string",
"default": "",
"required": true,
"description": "The end customer. Empty removes the label.",
"routing": {
"send": {
"type": "body",
"property": "name"
}
},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"customersSet"
]
}
}
},
{
"displayName": "Amount",
"name": "amount",
"type": "number",
"default": 0,
"required": true,
"description": "The amount in the currency of the account, from `top_up_minimum`.",
"routing": {
"send": {
"type": "body",
"property": "amount"
}
},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"topUpCreate"
]
}
}
},
{
"displayName": "Query Parameters",
"name": "queryParameters",
"type": "collection",
"placeholder": "Add Parameter",
"default": {},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"statementsGet"
]
}
},
"options": [
{
"displayName": "Month",
"name": "month",
"type": "string",
"default": "",
"description": "The month, as `YYYY-MM`.",
"routing": {
"send": {
"type": "query",
"property": "month"
}
}
},
{
"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": "URL",
"name": "url",
"type": "string",
"default": "",
"required": true,
"description": "HTTPS address, port 443.",
"routing": {
"send": {
"type": "body",
"property": "url"
}
},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"webhooksSet"
]
}
}
},
{
"displayName": "Events",
"name": "events",
"type": "string",
"default": "",
"placeholder": "value1, value2",
"required": true,
"description": "One or more events. Comma-separated.",
"routing": {
"send": {
"type": "body",
"property": "events",
"value": "={{ Array.isArray($value) ? $value : String($value).split(\",\").map(s => s.trim()).filter(s => s !== \"\") }}"
}
},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"webhooksSet"
]
}
}
},
{
"displayName": "Additional Fields",
"name": "additionalFields",
"type": "collection",
"placeholder": "Add Field",
"default": {},
"displayOptions": {
"show": {
"resource": [
"reseller"
],
"operation": [
"webhooksSet"
]
}
},
"options": [
{
"displayName": "Rotate Secret",
"name": "rotate_secret",
"type": "boolean",
"default": false,
"description": "Create a new secret.",
"routing": {
"send": {
"type": "body",
"property": "rotate_secret"
}
}
}
]
}
];