Opero Docs
API OperoModuły własne

Pobierz schematy typów pól obiektów własnych

GET
/v1/custom-modules/field-types

Zwraca maszynowo czytelne schematy dozwolonych payloadów tworzenia i aktualizacji, schematy opcji, wartości domyślne oraz przykłady dla typów pól obiektów własnych.

Autoryzacja

api-token
AutoryzacjaBearer <token>

Token Opero API. Przekaż go jako Authorization: Bearer ek_...

In: header

Treść odpowiedzi

application/json

application/json

application/json

curl -X GET "https://example.com/v1/custom-modules/field-types"
{  "data": {    "version": 0,    "entries": [      {        "type": "TEXT",        "label": "string",        "valueKind": "string",        "optionSources": [          "none"        ],        "configSchemaVersion": 0,        "optionsSchema": {},        "createSchema": {},        "updateSchema": {},        "valueSchema": {},        "defaults": {},        "examples": {},        "notes": [          "string"        ],        "capabilities": {          "schemaVersion": 1,          "format": "tiptap",          "nodes": {            "property1": {              "leaf": true,              "markable": true,              "attrs": {                "property1": {                  "type": "string",                  "required": true,                  "enum": [                    "string"                  ],                  "maxLength": 0,                  "minimum": 0,                  "maximum": 0,                  "nullable": true                },                "property2": {                  "type": "string",                  "required": true,                  "enum": [                    "string"                  ],                  "maxLength": 0,                  "minimum": 0,                  "maximum": 0,                  "nullable": true                }              }            },            "property2": {              "leaf": true,              "markable": true,              "attrs": {                "property1": {                  "type": "string",                  "required": true,                  "enum": [                    "string"                  ],                  "maxLength": 0,                  "minimum": 0,                  "maximum": 0,                  "nullable": true                },                "property2": {                  "type": "string",                  "required": true,                  "enum": [                    "string"                  ],                  "maxLength": 0,                  "minimum": 0,                  "maximum": 0,                  "nullable": true                }              }            }          },          "marks": {            "property1": {              "attrs": {                "property1": {                  "type": "string",                  "required": true,                  "enum": [                    "string"                  ],                  "maxLength": 0,                  "minimum": 0,                  "maximum": 0,                  "nullable": true                },                "property2": {                  "type": "string",                  "required": true,                  "enum": [                    "string"                  ],                  "maxLength": 0,                  "minimum": 0,                  "maximum": 0,                  "nullable": true                }              }            },            "property2": {              "attrs": {                "property1": {                  "type": "string",                  "required": true,                  "enum": [                    "string"                  ],                  "maxLength": 0,                  "minimum": 0,                  "maximum": 0,                  "nullable": true                },                "property2": {                  "type": "string",                  "required": true,                  "enum": [                    "string"                  ],                  "maxLength": 0,                  "minimum": 0,                  "maximum": 0,                  "nullable": true                }              }            }          },          "limits": {            "property1": 0,            "property2": 0          }        }      }    ]  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}