From 3bbd4123697535f687c72cd865f16f95df1f0970 Mon Sep 17 00:00:00 2001 From: ntimo Date: Sat, 21 Dec 2019 23:21:11 +0100 Subject: [PATCH] [API] Update API docs with app password routes --- data/web/_apidocs.html | 5855 +++++++++++++++++++++------------------- 1 file changed, 3138 insertions(+), 2717 deletions(-) diff --git a/data/web/_apidocs.html b/data/web/_apidocs.html index cc2b8b32..7cf7cedf 100644 --- a/data/web/_apidocs.html +++ b/data/web/_apidocs.html @@ -5,7 +5,8 @@ - + + @@ -74,21 +75,31 @@ function component_subscribe(component, store, callback) { component.$$.on_destroy.push(subscribe(store, callback)); } - function create_slot(definition, ctx, fn) { + function create_slot(definition, ctx, $$scope, fn) { if (definition) { - const slot_ctx = get_slot_context(definition, ctx, fn); + const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); return definition[0](slot_ctx); } } - function get_slot_context(definition, ctx, fn) { - return definition[1] - ? assign({}, assign(ctx.$$scope.ctx, definition[1](fn ? fn(ctx) : {}))) - : ctx.$$scope.ctx; + function get_slot_context(definition, ctx, $$scope, fn) { + return definition[1] && fn + ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) + : $$scope.ctx; } - function get_slot_changes(definition, ctx, changed, fn) { - return definition[1] - ? assign({}, assign(ctx.$$scope.changed || {}, definition[1](fn ? fn(changed) : {}))) - : ctx.$$scope.changed || {}; + function get_slot_changes(definition, $$scope, dirty, fn) { + if (definition[2] && fn) { + const lets = definition[2](fn(dirty)); + if (typeof $$scope.dirty === 'object') { + const merged = []; + const len = Math.max($$scope.dirty.length, lets.length); + for (let i = 0; i < len; i += 1) { + merged[i] = $$scope.dirty[i] | lets[i]; + } + return merged; + } + return $$scope.dirty | lets; + } + return $$scope.dirty; } function exclude_internal_props(props) { const result = {}; @@ -113,6 +124,7 @@ store.set(value); return ret; } + const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop); const is_client = typeof window !== 'undefined'; let now = is_client @@ -128,32 +140,33 @@ } const tasks = new Set(); - let running = false; - function run_tasks() { + function run_tasks(now) { tasks.forEach(task => { - if (!task[0](now())) { + if (!task.c(now)) { tasks.delete(task); - task[1](); + task.f(); } }); - running = tasks.size > 0; - if (running) + if (tasks.size !== 0) raf(run_tasks); } + /** + * For testing purposes only! + */ function clear_loops() { - // for testing... - tasks.forEach(task => tasks.delete(task)); - running = false; + tasks.clear(); } - function loop(fn) { + /** + * Creates a new task that runs on each raf frame + * until it returns a falsy value or is aborted + */ + function loop(callback) { let task; - if (!running) { - running = true; + if (tasks.size === 0) raf(run_tasks); - } return { - promise: new Promise(fulfil => { - tasks.add(task = [fn, fulfil]); + promise: new Promise(fulfill => { + tasks.add(task = { c: callback, f: fulfill }); }), abort() { tasks.delete(task); @@ -183,10 +196,9 @@ return document.createElement(name, { is }); } function object_without_properties(obj, exclude) { - // eslint-disable-next-line @typescript-eslint/no-object-literal-type-assertion const target = {}; for (const k in obj) { - if (Object.prototype.hasOwnProperty.call(obj, k) + if (has_prop(obj, k) // @ts-ignore && exclude.indexOf(k) === -1) { // @ts-ignore @@ -235,15 +247,20 @@ function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute); - else + else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value); } function set_attributes(node, attributes) { + // @ts-ignore + const descriptors = Object.getOwnPropertyDescriptors(node.__proto__); for (const key in attributes) { - if (key === 'style') { + if (attributes[key] == null) { + node.removeAttribute(key); + } + else if (key === 'style') { node.style.cssText = attributes[key]; } - else if (key in node) { + else if (descriptors[key] && descriptors[key].set) { node[key] = attributes[key]; } else { @@ -364,6 +381,7 @@ } const object = document.createElement('object'); object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;'); + object.setAttribute('aria-hidden', 'true'); object.type = 'text/html'; object.tabIndex = -1; let win; @@ -567,7 +585,7 @@ get_current_component().$$.on_destroy.push(fn); } function createEventDispatcher() { - const component = current_component; + const component = get_current_component(); return (type, detail) => { const callbacks = component.$$.callbacks[type]; if (callbacks) { @@ -650,11 +668,12 @@ update_scheduled = false; } function update($$) { - if ($$.fragment) { - $$.update($$.dirty); + if ($$.fragment !== null) { + $$.update(); run_all($$.before_update); - $$.fragment.p($$.dirty, $$.ctx); - $$.dirty = null; + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } @@ -939,9 +958,14 @@ function update(type, index, key, value) { if (info.token !== token) return; - info.resolved = key && { [key]: value }; - const child_ctx = assign(assign({}, info.ctx), info.resolved); + info.resolved = value; + let child_ctx = info.ctx; + if (key !== undefined) { + child_ctx = child_ctx.slice(); + child_ctx[key] = value; + } const block = type && (info.current = type)(child_ctx); + let needs_flush = false; if (info.block) { if (info.blocks) { info.blocks.forEach((block, i) => { @@ -960,11 +984,14 @@ block.c(); transition_in(block, 1); block.m(info.mount(), info.anchor); - flush(); + needs_flush = true; } info.block = block; if (info.blocks) info.blocks[index] = block; + if (needs_flush) { + flush(); + } } if (is_promise(promise)) { const current_component = get_current_component(); @@ -988,7 +1015,7 @@ update(info.then, 1, info.value, promise); return true; } - info.resolved = { [info.value]: promise }; + info.resolved = promise; } } @@ -1011,7 +1038,7 @@ block.f(); outro_and_destroy_block(block, lookup); } - function update_keyed_each(old_blocks, changed, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { + function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { let o = old_blocks.length; let n = list.length; let i = o; @@ -1031,7 +1058,7 @@ block.c(); } else if (dynamic) { - block.p(changed, child_ctx); + block.p(child_ctx, dirty); } new_lookup.set(key, new_blocks[i] = block); if (key in old_indexes) @@ -1131,24 +1158,63 @@ return typeof spread_props === 'object' && spread_props !== null ? spread_props : {}; } + // source: https://html.spec.whatwg.org/multipage/indices.html + const boolean_attributes = new Set([ + 'allowfullscreen', + 'allowpaymentrequest', + 'async', + 'autofocus', + 'autoplay', + 'checked', + 'controls', + 'default', + 'defer', + 'disabled', + 'formnovalidate', + 'hidden', + 'ismap', + 'loop', + 'multiple', + 'muted', + 'nomodule', + 'novalidate', + 'open', + 'playsinline', + 'readonly', + 'required', + 'reversed', + 'selected' + ]); + const invalid_attribute_name_character = /[\s'">/=\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u; // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 // https://infra.spec.whatwg.org/#noncharacter - function spread(args) { + function spread(args, classes_to_add) { const attributes = Object.assign({}, ...args); + if (classes_to_add) { + if (attributes.class == null) { + attributes.class = classes_to_add; + } + else { + attributes.class += ' ' + classes_to_add; + } + } let str = ''; Object.keys(attributes).forEach(name => { if (invalid_attribute_name_character.test(name)) return; const value = attributes[name]; - if (value === undefined) - return; if (value === true) str += " " + name; - const escaped = String(value) - .replace(/"/g, '"') - .replace(/'/g, '''); - str += " " + name + "=" + JSON.stringify(escaped); + else if (boolean_attributes.has(name.toLowerCase())) { + if (value) + str += " " + name; + } + else if (value != null) { + str += " " + name + "=" + JSON.stringify(String(value) + .replace(/"/g, '"') + .replace(/'/g, ''')); + } }); return str; } @@ -1231,14 +1297,21 @@ } function bind(component, name, callback) { - if (component.$$.props.indexOf(name) === -1) - return; - component.$$.bound[name] = callback; - callback(component.$$.ctx[name]); + const index = component.$$.props[name]; + if (index !== undefined) { + component.$$.bound[index] = callback; + callback(component.$$.ctx[index]); + } + } + function create_component(block) { + block && block.c(); + } + function claim_component(block, parent_nodes) { + block && block.l(parent_nodes); } function mount_component(component, target, anchor) { const { fragment, on_mount, on_destroy, after_update } = component.$$; - fragment.m(target, anchor); + fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate add_render_callback(() => { const new_on_destroy = on_mount.map(run).filter(is_function); @@ -1255,32 +1328,33 @@ after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { - if (component.$$.fragment) { - run_all(component.$$.on_destroy); - component.$$.fragment.d(detaching); + const $$ = component.$$; + if ($$.fragment !== null) { + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to // preserve final state?) - component.$$.on_destroy = component.$$.fragment = null; - component.$$.ctx = {}; + $$.on_destroy = $$.fragment = null; + $$.ctx = []; } } - function make_dirty(component, key) { - if (!component.$$.dirty) { + function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); - component.$$.dirty = blank_object(); + component.$$.dirty.fill(0); } - component.$$.dirty[key] = true; + component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); } - function init(component, options, instance, create_fragment, not_equal, prop_names) { + function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { const parent_component = current_component; set_current_component(component); - const props = options.props || {}; + const prop_values = options.props || {}; const $$ = component.$$ = { fragment: null, ctx: null, // state - props: prop_names, + props, update: noop, not_equal, bound: blank_object(), @@ -1292,32 +1366,33 @@ context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blank_object(), - dirty: null + dirty }; let ready = false; $$.ctx = instance - ? instance(component, props, (key, ret, value = ret) => { - if ($$.ctx && not_equal($$.ctx[key], $$.ctx[key] = value)) { - if ($$.bound[key]) - $$.bound[key](value); + ? instance(component, prop_values, (i, ret, value = ret) => { + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if ($$.bound[i]) + $$.bound[i](value); if (ready) - make_dirty(component, key); + make_dirty(component, i); } return ret; }) - : props; + : []; $$.update(); ready = true; run_all($$.before_update); - $$.fragment = create_fragment($$.ctx); + // `false` as a special case of no DOM component + $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment.l(children(options.target)); + $$.fragment && $$.fragment.l(children(options.target)); } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - $$.fragment.c(); + $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); @@ -1327,7 +1402,7 @@ set_current_component(parent_component); } let SvelteElement; - if (typeof HTMLElement !== 'undefined') { + if (typeof HTMLElement === 'function') { SvelteElement = class extends HTMLElement { constructor() { super(); @@ -1460,6 +1535,14 @@ }; } } + function loop_guard(timeout) { + const start = Date.now(); + return () => { + if (Date.now() - start > timeout) { + throw new Error(`Infinite loop detected`); + } + }; + } 'use strict'; @@ -8758,6 +8841,7 @@ }; var merge$1 = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ if (!source) { return target; } @@ -9270,6 +9354,7 @@ var has$3 = Object.prototype.hasOwnProperty; + var isArray$3 = Array.isArray; var defaults$2 = { allowDots: false, @@ -9350,10 +9435,14 @@ val = interpretNumericEntities(val); } - if (val && options.comma && val.indexOf(',') > -1) { + if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { val = val.split(','); } + if (part.indexOf('[]=') > -1) { + val = isArray$3(val) ? [val] : val; + } + if (has$3.call(obj, key)) { obj[key] = utils$1.combine(obj[key], val); } else { @@ -10158,13 +10247,6 @@ } return { set, update, subscribe }; } - /** - * Derived value store by synchronizing one or more readable stores and - * applying an aggregation function over its input values. - * @param {Stores} stores input stores - * @param {function(Stores=, function(*)=):*}fn function callback that aggregates the values - * @param {*=}initial_value when used asynchronously - */ function derived(stores, fn, initial_value) { const single = !Array.isArray(stores); const stores_array = single @@ -10377,7 +10459,25 @@ return { title: title, [key]: items }; }; - const filterActions = (tagActions, regex) => { + function escape$2(text) { + return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + + const filterActions = (tagActions, query) => { + if (query.startsWith("g:")) { + return tagActions + .map(tag => { + const children = tag.children.filter(child => { + return slugify(child.title) === query.substr(2); + }); + + return filteredItem(tag.title, "children", children.filter(Boolean)); + }) + .filter(Boolean); + } + + const regex = new RegExp(escape$2(query), "gi"); + return tagActions .map(tag => { const children = tag.children.map(child => { @@ -10545,77 +10645,98 @@ const getEnv = () => store2.get("env"); - /* usr/local/lib/node_modules/snowboard/templates/winter/components/MenuItem.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/components/MenuItem.svelte generated by Svelte v3.16.5 */ function add_css() { var style = element("style"); - style.id = 'svelte-39af3j-style'; + style.id = "svelte-39af3j-style"; style.textContent = ".tag.svelte-39af3j{width:3.5rem}.menu-ellipsis.svelte-39af3j{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0.25em 0.75em}.menu-action.svelte-39af3j{vertical-align:middle}"; append(document.head, style); } function get_each_context(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.action = list[i]; + const child_ctx = ctx.slice(); + child_ctx[7] = list[i]; return child_ctx; } - // (29:0) {#if title} + // (30:0) {#if title} function create_if_block_1(ctx) { - var li, a, span, i, t0, t1, dispose; + let li; + let a0; + let t0; + let a0_data_slug_value; + let a0_href_value; + let t1; + let a1; + let span; + let i; + let dispose; return { c() { li = element("li"); - a = element("a"); + a0 = element("a"); + t0 = text(/*title*/ ctx[1]); + t1 = space(); + a1 = element("a"); span = element("span"); i = element("i"); - t0 = space(); - t1 = text(ctx.title); + attr(a0, "data-slug", a0_data_slug_value = slugify(/*title*/ ctx[1])); + attr(a0, "href", a0_href_value = "#/g~" + slugify(/*title*/ ctx[1])); + attr(a0, "class", "is-inline-block"); attr(i, "class", "fas"); - toggle_class(i, "fa-chevron-right", ctx.hidden); - toggle_class(i, "fa-chevron-down", !ctx.hidden); - attr(span, "class", "icon has-text-grey-light"); - attr(a, "href", "javascript:void(0)"); - dispose = listen(a, "click", ctx.click_handler); - }, + toggle_class(i, "fa-chevron-right", /*hidden*/ ctx[0]); + toggle_class(i, "fa-chevron-down", !/*hidden*/ ctx[0]); + attr(span, "class", "icon is-small has-text-grey-light"); + attr(a1, "href", "javascript:void(0)"); + attr(a1, "class", "is-inline-block is-pulled-right"); + dispose = [ + listen(a0, "click", /*handleGroupClick*/ ctx[5]), + listen(a1, "click", /*click_handler*/ ctx[6]) + ]; + }, m(target, anchor) { insert(target, li, anchor); - append(li, a); - append(a, span); + append(li, a0); + append(a0, t0); + append(li, t1); + append(li, a1); + append(a1, span); append(span, i); - append(a, t0); - append(a, t1); }, + p(ctx, dirty) { + if (dirty & /*title*/ 2) set_data(t0, /*title*/ ctx[1]); - p(changed, ctx) { - if (changed.hidden) { - toggle_class(i, "fa-chevron-right", ctx.hidden); - toggle_class(i, "fa-chevron-down", !ctx.hidden); + if (dirty & /*title*/ 2 && a0_data_slug_value !== (a0_data_slug_value = slugify(/*title*/ ctx[1]))) { + attr(a0, "data-slug", a0_data_slug_value); } - if (changed.title) { - set_data(t1, ctx.title); + if (dirty & /*title*/ 2 && a0_href_value !== (a0_href_value = "#/g~" + slugify(/*title*/ ctx[1]))) { + attr(a0, "href", a0_href_value); + } + + if (dirty & /*hidden*/ 1) { + toggle_class(i, "fa-chevron-right", /*hidden*/ ctx[0]); + } + + if (dirty & /*hidden*/ 1) { + toggle_class(i, "fa-chevron-down", !/*hidden*/ ctx[0]); } }, - d(detaching) { - if (detaching) { - detach(li); - } - - dispose(); + if (detaching) detach(li); + run_all(dispose); } }; } - // (43:0) {#if actions.length > 0} + // (53:0) {#if actions.length > 0} function create_if_block(ctx) { - var li, ul; - - let each_value = ctx.actions; - + let li; + let ul; + let each_value = /*actions*/ ctx[2]; let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { @@ -10630,9 +10751,9 @@ for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } - toggle_class(li, "is-hidden", ctx.hidden); - }, + toggle_class(li, "is-hidden", /*hidden*/ ctx[0]); + }, m(target, anchor) { insert(target, li, anchor); append(li, ul); @@ -10641,17 +10762,16 @@ each_blocks[i].m(ul, null); } }, - - p(changed, ctx) { - if (changed.actions || changed.currentSlug || changed.colorize) { - each_value = ctx.actions; - + p(ctx, dirty) { + if (dirty & /*actions, currentSlug, handleClick, colorize*/ 28) { + each_value = /*actions*/ ctx[2]; let i; + for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context(ctx, each_value, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); } else { each_blocks[i] = create_each_block(child_ctx); each_blocks[i].c(); @@ -10662,27 +10782,37 @@ for (; i < each_blocks.length; i += 1) { each_blocks[i].d(1); } + each_blocks.length = each_value.length; } - if (changed.hidden) { - toggle_class(li, "is-hidden", ctx.hidden); + if (dirty & /*hidden*/ 1) { + toggle_class(li, "is-hidden", /*hidden*/ ctx[0]); } }, - d(detaching) { - if (detaching) { - detach(li); - } - + if (detaching) detach(li); destroy_each(each_blocks, detaching); } }; } - // (46:6) {#each actions as action} + // (56:6) {#each actions as action} function create_each_block(ctx) { - var li, a, code, t0_value = ctx.action.method + "", t0, code_class_value, t1, span, t2_value = ctx.action.title + "", t2, a_data_slug_value, a_href_value, t3, dispose; + let li; + let a; + let code; + let t0_value = /*action*/ ctx[7].method + ""; + let t0; + let code_class_value; + let t1; + let span; + let t2_value = /*action*/ ctx[7].title + ""; + let t2; + let a_data_slug_value; + let a_href_value; + let t3; + let dispose; return { c() { @@ -10694,15 +10824,14 @@ span = element("span"); t2 = text(t2_value); t3 = space(); - attr(code, "class", code_class_value = "tag " + colorize(ctx.action.method) + " is-uppercase" + " svelte-39af3j"); + attr(code, "class", code_class_value = "tag " + colorize(/*action*/ ctx[7].method) + " is-uppercase" + " svelte-39af3j"); attr(span, "class", "menu-action svelte-39af3j"); - attr(a, "data-slug", a_data_slug_value = ctx.action.slug); - attr(a, "href", a_href_value = "#/" + ctx.action.slug); + attr(a, "data-slug", a_data_slug_value = /*action*/ ctx[7].slug); + attr(a, "href", a_href_value = "#/" + /*action*/ ctx[7].slug); attr(a, "class", "menu-ellipsis svelte-39af3j"); - toggle_class(a, "is-active", ctx.action.slug === ctx.currentSlug); - dispose = listen(a, "click", ctx.handleClick); + toggle_class(a, "is-active", /*action*/ ctx[7].slug === /*currentSlug*/ ctx[3]); + dispose = listen(a, "click", /*handleClick*/ ctx[4]); }, - m(target, anchor) { insert(target, li, anchor); append(li, a); @@ -10713,49 +10842,39 @@ append(span, t2); append(li, t3); }, + p(ctx, dirty) { + if (dirty & /*actions*/ 4 && t0_value !== (t0_value = /*action*/ ctx[7].method + "")) set_data(t0, t0_value); - p(changed, ctx) { - if ((changed.actions) && t0_value !== (t0_value = ctx.action.method + "")) { - set_data(t0, t0_value); - } - - if ((changed.actions) && code_class_value !== (code_class_value = "tag " + colorize(ctx.action.method) + " is-uppercase" + " svelte-39af3j")) { + if (dirty & /*actions*/ 4 && code_class_value !== (code_class_value = "tag " + colorize(/*action*/ ctx[7].method) + " is-uppercase" + " svelte-39af3j")) { attr(code, "class", code_class_value); } - if ((changed.actions) && t2_value !== (t2_value = ctx.action.title + "")) { - set_data(t2, t2_value); - } + if (dirty & /*actions*/ 4 && t2_value !== (t2_value = /*action*/ ctx[7].title + "")) set_data(t2, t2_value); - if ((changed.actions) && a_data_slug_value !== (a_data_slug_value = ctx.action.slug)) { + if (dirty & /*actions*/ 4 && a_data_slug_value !== (a_data_slug_value = /*action*/ ctx[7].slug)) { attr(a, "data-slug", a_data_slug_value); } - if ((changed.actions) && a_href_value !== (a_href_value = "#/" + ctx.action.slug)) { + if (dirty & /*actions*/ 4 && a_href_value !== (a_href_value = "#/" + /*action*/ ctx[7].slug)) { attr(a, "href", a_href_value); } - if ((changed.actions || changed.currentSlug)) { - toggle_class(a, "is-active", ctx.action.slug === ctx.currentSlug); + if (dirty & /*actions, currentSlug*/ 12) { + toggle_class(a, "is-active", /*action*/ ctx[7].slug === /*currentSlug*/ ctx[3]); } }, - d(detaching) { - if (detaching) { - detach(li); - } - + if (detaching) detach(li); dispose(); } }; } function create_fragment(ctx) { - var t, if_block1_anchor; - - var if_block0 = (ctx.title) && create_if_block_1(ctx); - - var if_block1 = (ctx.actions.length > 0) && create_if_block(ctx); + let t; + let if_block1_anchor; + let if_block0 = /*title*/ ctx[1] && create_if_block_1(ctx); + let if_block1 = /*actions*/ ctx[2].length > 0 && create_if_block(ctx); return { c() { @@ -10764,18 +10883,16 @@ if (if_block1) if_block1.c(); if_block1_anchor = empty(); }, - m(target, anchor) { if (if_block0) if_block0.m(target, anchor); insert(target, t, anchor); if (if_block1) if_block1.m(target, anchor); insert(target, if_block1_anchor, anchor); }, - - p(changed, ctx) { - if (ctx.title) { + p(ctx, [dirty]) { + if (/*title*/ ctx[1]) { if (if_block0) { - if_block0.p(changed, ctx); + if_block0.p(ctx, dirty); } else { if_block0 = create_if_block_1(ctx); if_block0.c(); @@ -10786,9 +10903,9 @@ if_block0 = null; } - if (ctx.actions.length > 0) { + if (/*actions*/ ctx[2].length > 0) { if (if_block1) { - if_block1.p(changed, ctx); + if_block1.p(ctx, dirty); } else { if_block1 = create_if_block(ctx); if_block1.c(); @@ -10799,90 +10916,151 @@ if_block1 = null; } }, - i: noop, o: noop, - d(detaching) { if (if_block0) if_block0.d(detaching); - - if (detaching) { - detach(t); - } - + if (detaching) detach(t); if (if_block1) if_block1.d(detaching); - - if (detaching) { - detach(if_block1_anchor); - } + if (detaching) detach(if_block1_anchor); } }; } function instance($$self, $$props, $$invalidate) { - let { title, actions, currentSlug, hidden = false, handleClick } = $$props; - - const click_handler = () => ($$invalidate('hidden', hidden = !hidden)); + let { title } = $$props; + let { actions } = $$props; + let { currentSlug } = $$props; + let { hidden = false } = $$props; + let { handleClick } = $$props; + let { handleGroupClick } = $$props; + const click_handler = () => $$invalidate(0, hidden = !hidden); $$self.$set = $$props => { - if ('title' in $$props) $$invalidate('title', title = $$props.title); - if ('actions' in $$props) $$invalidate('actions', actions = $$props.actions); - if ('currentSlug' in $$props) $$invalidate('currentSlug', currentSlug = $$props.currentSlug); - if ('hidden' in $$props) $$invalidate('hidden', hidden = $$props.hidden); - if ('handleClick' in $$props) $$invalidate('handleClick', handleClick = $$props.handleClick); + if ("title" in $$props) $$invalidate(1, title = $$props.title); + if ("actions" in $$props) $$invalidate(2, actions = $$props.actions); + if ("currentSlug" in $$props) $$invalidate(3, currentSlug = $$props.currentSlug); + if ("hidden" in $$props) $$invalidate(0, hidden = $$props.hidden); + if ("handleClick" in $$props) $$invalidate(4, handleClick = $$props.handleClick); + if ("handleGroupClick" in $$props) $$invalidate(5, handleGroupClick = $$props.handleGroupClick); }; - return { + return [ + hidden, title, actions, currentSlug, - hidden, handleClick, + handleGroupClick, click_handler - }; + ]; } class MenuItem extends SvelteComponent { constructor(options) { super(); if (!document.getElementById("svelte-39af3j-style")) add_css(); - init(this, options, instance, create_fragment, safe_not_equal, ["title", "actions", "currentSlug", "hidden", "handleClick"]); + + init(this, options, instance, create_fragment, safe_not_equal, { + title: 1, + actions: 2, + currentSlug: 3, + hidden: 0, + handleClick: 4, + handleGroupClick: 5 + }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/MenuPanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/MenuPanel.svelte generated by Svelte v3.16.5 */ function add_css$1() { var style = element("style"); - style.id = 'svelte-1xl6iim-style'; - style.textContent = ".hero.svelte-1xl6iim,.menu-wrapper.svelte-1xl6iim{padding:0 2.75rem 0 2rem}.hero.svelte-1xl6iim{position:sticky;top:54px;background-color:#fafafa;margin-bottom:1.5rem}.hero-body.svelte-1xl6iim{padding:1.5rem 0;box-shadow:0 2px 0 0 #f5f5f5}.menu-wrapper.svelte-1xl6iim::-webkit-scrollbar{display:none}@media screen and (min-width: 768px){.hero.svelte-1xl6iim,.menu-wrapper.svelte-1xl6iim{width:-moz-calc(25% - 0.5rem);width:-webkit-calc(25% - 0.5rem);width:-o-calc(25% - 0.5rem);width:calc(25% - 0.5rem)}.hero.svelte-1xl6iim{position:fixed;padding:0 1.25rem}.menu-wrapper.svelte-1xl6iim{position:fixed;top:140px;padding:1.5rem 1.25rem 1.25rem;height:-moz-calc(100% - 150px - 2.5rem);height:-webkit-calc(100% - 150px - 2.5rem);height:-o-calc(100% - 150px - 2.5rem);height:calc(100% - 150px - 2.5rem);overflow:-moz-scrollbars-none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:auto;transition:opacity 0.3s, left 0.3s}.menu.is-collapsed.svelte-1xl6iim{width:3rem}.is-collapsed.svelte-1xl6iim .hero.svelte-1xl6iim,.is-collapsed.svelte-1xl6iim .hero-body.svelte-1xl6iim{width:calc(3rem - 2px)}.is-collapsed.svelte-1xl6iim .hero.svelte-1xl6iim{padding-left:0;padding-right:0}.is-collapsed.svelte-1xl6iim .hero-body.svelte-1xl6iim{padding-left:0.3175rem;padding-right:0.3175rem;box-shadow:none}.is-collapsed.svelte-1xl6iim .input.is-rounded.svelte-1xl6iim{padding-left:0;padding-right:0;opacity:0}.is-collapsed.svelte-1xl6iim .icon-input-search.svelte-1xl6iim{color:#b5b5b5;background-color:#eee;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;cursor:pointer;pointer-events:auto}.is-collapsed.svelte-1xl6iim .icon-input-search.svelte-1xl6iim:hover{color:#999;background-color:#e0e0e0}.is-collapsed.svelte-1xl6iim .menu-wrapper.svelte-1xl6iim{left:-30%;opacity:0}}"; + style.id = "svelte-fvssqr-style"; + style.textContent = ".hero.svelte-fvssqr,.menu-wrapper.svelte-fvssqr{padding:0 2.75rem 0 2rem}.hero.svelte-fvssqr{position:sticky;top:54px;background-color:#fafafa;margin-bottom:1.5rem}.hero.is-darkmode.svelte-fvssqr{background-color:#000}.hero-body.svelte-fvssqr{padding:1.5rem 0;box-shadow:0 2px 0 0 #f5f5f5}.hero-body.is-darkmode.svelte-fvssqr{box-shadow:0 2px 0 0 #363636}.menu-wrapper.svelte-fvssqr::-webkit-scrollbar{display:none}@media screen and (min-width: 768px){.hero.svelte-fvssqr,.menu-wrapper.svelte-fvssqr{width:-moz-calc(25% - 0.5rem);width:-webkit-calc(25% - 0.5rem);width:-o-calc(25% - 0.5rem);width:calc(25% - 0.5rem)}.hero.svelte-fvssqr{position:fixed;padding:0 1.25rem}.menu-wrapper.svelte-fvssqr{position:fixed;top:140px;padding:1.5rem 1.25rem 1.25rem;height:-moz-calc(100% - 150px - 2.5rem);height:-webkit-calc(100% - 150px - 2.5rem);height:-o-calc(100% - 150px - 2.5rem);height:calc(100% - 150px - 2.5rem);overflow:-moz-scrollbars-none;-ms-overflow-style:none;overflow-x:hidden;overflow-y:auto;transition:opacity 0.3s, left 0.3s}.menu.is-collapsed.svelte-fvssqr{width:3rem}.is-collapsed.svelte-fvssqr .hero.svelte-fvssqr,.is-collapsed.svelte-fvssqr .hero-body.svelte-fvssqr{width:calc(3rem - 2px)}.is-collapsed.svelte-fvssqr .hero.svelte-fvssqr{padding-left:0;padding-right:0}.is-collapsed.svelte-fvssqr .hero-body.svelte-fvssqr{padding-left:0.3175rem;padding-right:0.3175rem;box-shadow:none}.is-collapsed.svelte-fvssqr .input.is-rounded.svelte-fvssqr{padding-left:0;padding-right:0;opacity:0}.is-collapsed.svelte-fvssqr .icon-input-search.svelte-fvssqr{color:#b5b5b5;background-color:#eee;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;cursor:pointer;pointer-events:auto}.is-collapsed.svelte-fvssqr .icon-input-search.svelte-fvssqr:hover{color:#999;background-color:#e0e0e0}.is-collapsed.svelte-fvssqr .is-darkmode .icon-input-search.svelte-fvssqr{color:#ccc;background-color:#484848}.is-collapsed.svelte-fvssqr .is-darkmode .icon-input-search.svelte-fvssqr:hover{color:#fff;background-color:#484848}.is-collapsed.svelte-fvssqr .menu-wrapper.svelte-fvssqr{left:-30%;opacity:0}}"; append(document.head, style); } function get_each_context_1(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.child = list[i]; + const child_ctx = ctx.slice(); + child_ctx[17] = list[i]; return child_ctx; } function get_each_context$1(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.tag = list[i]; + const child_ctx = ctx.slice(); + child_ctx[14] = list[i]; return child_ctx; } function get_each_context_2(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.header = list[i]; + const child_ctx = ctx.slice(); + child_ctx[20] = list[i]; return child_ctx; } - // (156:6) {#if tagHeaders} + // (165:4) {#if query === ''} function create_if_block_1$1(ctx) { - var li, ul; + let ul; + let li; + let a; + let t0; + let a_href_value; + let t1; + let dispose; + let if_block = /*tagHeaders*/ ctx[2] && create_if_block_2(ctx); - let each_value_2 = ctx.tagHeaders; + return { + c() { + ul = element("ul"); + li = element("li"); + a = element("a"); + t0 = text("Introduction"); + t1 = space(); + if (if_block) if_block.c(); + attr(a, "href", a_href_value = basePath(/*config*/ ctx[1])); + attr(ul, "class", "menu-list"); + dispose = listen(a, "click", prevent_default(/*tocClick*/ ctx[9])); + }, + m(target, anchor) { + insert(target, ul, anchor); + append(ul, li); + append(li, a); + append(a, t0); + append(ul, t1); + if (if_block) if_block.m(ul, null); + }, + p(ctx, dirty) { + if (dirty & /*config*/ 2 && a_href_value !== (a_href_value = basePath(/*config*/ ctx[1]))) { + attr(a, "href", a_href_value); + } + if (/*tagHeaders*/ ctx[2]) { + if (if_block) { + if_block.p(ctx, dirty); + } else { + if_block = create_if_block_2(ctx); + if_block.c(); + if_block.m(ul, null); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + }, + d(detaching) { + if (detaching) detach(ul); + if (if_block) if_block.d(); + dispose(); + } + }; + } + + // (172:8) {#if tagHeaders} + function create_if_block_2(ctx) { + let li; + let ul; + let each_value_2 = /*tagHeaders*/ ctx[2]; let each_blocks = []; for (let i = 0; i < each_value_2.length; i += 1) { @@ -10898,7 +11076,6 @@ each_blocks[i].c(); } }, - m(target, anchor) { insert(target, li, anchor); append(li, ul); @@ -10907,17 +11084,16 @@ each_blocks[i].m(ul, null); } }, - - p(changed, ctx) { - if (changed.tagHeaders || changed.headerLink) { - each_value_2 = ctx.tagHeaders; - + p(ctx, dirty) { + if (dirty & /*tagHeaders, headerLink, tocClick*/ 516) { + each_value_2 = /*tagHeaders*/ ctx[2]; let i; + for (i = 0; i < each_value_2.length; i += 1) { const child_ctx = get_each_context_2(ctx, each_value_2, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); } else { each_blocks[i] = create_each_block_2(child_ctx); each_blocks[i].c(); @@ -10928,23 +11104,26 @@ for (; i < each_blocks.length; i += 1) { each_blocks[i].d(1); } + each_blocks.length = each_value_2.length; } }, - d(detaching) { - if (detaching) { - detach(li); - } - + if (detaching) detach(li); destroy_each(each_blocks, detaching); } }; } - // (160:14) {#if header.level === 0} - function create_if_block_2(ctx) { - var li, a, t0_value = ctx.header.text + "", t0, a_href_value, t1, dispose; + // (176:16) {#if header.level === 0} + function create_if_block_3(ctx) { + let li; + let a; + let t0_value = /*header*/ ctx[20].text + ""; + let t0; + let a_href_value; + let t1; + let dispose; return { c() { @@ -10952,60 +11131,49 @@ a = element("a"); t0 = text(t0_value); t1 = space(); - attr(a, "href", a_href_value = "#" + headerLink(ctx.header.text)); - dispose = listen(a, "click", ctx.tocClick); + attr(a, "href", a_href_value = "#" + headerLink(/*header*/ ctx[20].text)); + dispose = listen(a, "click", /*tocClick*/ ctx[9]); }, - m(target, anchor) { insert(target, li, anchor); append(li, a); append(a, t0); append(li, t1); }, + p(ctx, dirty) { + if (dirty & /*tagHeaders*/ 4 && t0_value !== (t0_value = /*header*/ ctx[20].text + "")) set_data(t0, t0_value); - p(changed, ctx) { - if ((changed.tagHeaders) && t0_value !== (t0_value = ctx.header.text + "")) { - set_data(t0, t0_value); - } - - if ((changed.tagHeaders) && a_href_value !== (a_href_value = "#" + headerLink(ctx.header.text))) { + if (dirty & /*tagHeaders*/ 4 && a_href_value !== (a_href_value = "#" + headerLink(/*header*/ ctx[20].text))) { attr(a, "href", a_href_value); } }, - d(detaching) { - if (detaching) { - detach(li); - } - + if (detaching) detach(li); dispose(); } }; } - // (159:12) {#each tagHeaders as header} + // (175:14) {#each tagHeaders as header} function create_each_block_2(ctx) { - var if_block_anchor; - - var if_block = (ctx.header.level === 0) && create_if_block_2(ctx); + let if_block_anchor; + let if_block = /*header*/ ctx[20].level === 0 && create_if_block_3(ctx); return { c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, - m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); }, - - p(changed, ctx) { - if (ctx.header.level === 0) { + p(ctx, dirty) { + if (/*header*/ ctx[20].level === 0) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); } else { - if_block = create_if_block_2(ctx); + if_block = create_if_block_3(ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } @@ -11014,20 +11182,18 @@ if_block = null; } }, - d(detaching) { if (if_block) if_block.d(detaching); - - if (detaching) { - detach(if_block_anchor); - } + if (detaching) detach(if_block_anchor); } }; } - // (174:6) {#if tag.title} + // (191:6) {#if tag.title} function create_if_block$1(ctx) { - var p, t_value = ctx.tag.title + "", t; + let p; + let t_value = /*tag*/ ctx[14].title + ""; + let t; return { c() { @@ -11035,86 +11201,75 @@ t = text(t_value); attr(p, "class", "menu-label"); }, - m(target, anchor) { insert(target, p, anchor); append(p, t); }, - - p(changed, ctx) { - if ((changed.filteredActions) && t_value !== (t_value = ctx.tag.title + "")) { - set_data(t, t_value); - } + p(ctx, dirty) { + if (dirty & /*filteredActions*/ 2048 && t_value !== (t_value = /*tag*/ ctx[14].title + "")) set_data(t, t_value); }, - d(detaching) { - if (detaching) { - detach(p); - } + if (detaching) detach(p); } }; } - // (179:8) {#each tag.children as child} + // (196:8) {#each tag.children as child} function create_each_block_1(ctx) { - var current; + let current; - var menuitem = new MenuItem({ - props: { - title: ctx.child.title, - actions: ctx.child.actions, - hidden: ctx.actionsCount > 50, - currentSlug: ctx.currentSlug, - handleClick: ctx.handleClick - } - }); + const menuitem = new MenuItem({ + props: { + title: /*child*/ ctx[17].title, + actions: /*child*/ ctx[17].actions, + hidden: /*actionsCount*/ ctx[4] > 50, + currentSlug: /*currentSlug*/ ctx[3], + handleClick: /*handleClick*/ ctx[7], + handleGroupClick: /*handleGroupClick*/ ctx[8] + } + }); return { c() { - menuitem.$$.fragment.c(); + create_component(menuitem.$$.fragment); }, - m(target, anchor) { mount_component(menuitem, target, anchor); current = true; }, - - p(changed, ctx) { - var menuitem_changes = {}; - if (changed.filteredActions) menuitem_changes.title = ctx.child.title; - if (changed.filteredActions) menuitem_changes.actions = ctx.child.actions; - if (changed.actionsCount) menuitem_changes.hidden = ctx.actionsCount > 50; - if (changed.currentSlug) menuitem_changes.currentSlug = ctx.currentSlug; - if (changed.handleClick) menuitem_changes.handleClick = ctx.handleClick; + p(ctx, dirty) { + const menuitem_changes = {}; + if (dirty & /*filteredActions*/ 2048) menuitem_changes.title = /*child*/ ctx[17].title; + if (dirty & /*filteredActions*/ 2048) menuitem_changes.actions = /*child*/ ctx[17].actions; + if (dirty & /*actionsCount*/ 16) menuitem_changes.hidden = /*actionsCount*/ ctx[4] > 50; + if (dirty & /*currentSlug*/ 8) menuitem_changes.currentSlug = /*currentSlug*/ ctx[3]; + if (dirty & /*handleClick*/ 128) menuitem_changes.handleClick = /*handleClick*/ ctx[7]; + if (dirty & /*handleGroupClick*/ 256) menuitem_changes.handleGroupClick = /*handleGroupClick*/ ctx[8]; menuitem.$set(menuitem_changes); }, - i(local) { if (current) return; transition_in(menuitem.$$.fragment, local); - current = true; }, - o(local) { transition_out(menuitem.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(menuitem, detaching); } }; } - // (173:4) {#each filteredActions as tag} + // (190:4) {#each filteredActions as tag} function create_each_block$1(ctx) { - var t0, ul, t1, current; - - var if_block = (ctx.tag.title) && create_if_block$1(ctx); - - let each_value_1 = ctx.tag.children; - + let t0; + let ul; + let t1; + let current; + let if_block = /*tag*/ ctx[14].title && create_if_block$1(ctx); + let each_value_1 = /*tag*/ ctx[14].children; let each_blocks = []; for (let i = 0; i < each_value_1.length; i += 1) { @@ -11138,7 +11293,6 @@ t1 = space(); attr(ul, "class", "menu-list"); }, - m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, t0, anchor); @@ -11151,11 +11305,10 @@ append(ul, t1); current = true; }, - - p(changed, ctx) { - if (ctx.tag.title) { + p(ctx, dirty) { + if (/*tag*/ ctx[14].title) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); } else { if_block = create_if_block$1(ctx); if_block.c(); @@ -11166,15 +11319,15 @@ if_block = null; } - if (changed.filteredActions || changed.actionsCount || changed.currentSlug || changed.handleClick) { - each_value_1 = ctx.tag.children; - + if (dirty & /*filteredActions, actionsCount, currentSlug, handleClick, handleGroupClick*/ 2456) { + each_value_1 = /*tag*/ ctx[14].children; let i; + for (i = 0; i < each_value_1.length; i += 1) { const child_ctx = get_each_context_1(ctx, each_value_1, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); transition_in(each_blocks[i], 1); } else { each_blocks[i] = create_each_block_1(child_ctx); @@ -11185,55 +11338,63 @@ } group_outros(); + for (i = each_value_1.length; i < each_blocks.length; i += 1) { out(i); } + check_outros(); } }, - i(local) { if (current) return; + for (let i = 0; i < each_value_1.length; i += 1) { transition_in(each_blocks[i]); } current = true; }, - o(local) { each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { transition_out(each_blocks[i]); } current = false; }, - d(detaching) { if (if_block) if_block.d(detaching); - - if (detaching) { - detach(t0); - detach(ul); - } - + if (detaching) detach(t0); + if (detaching) detach(ul); destroy_each(each_blocks, detaching); } }; } function create_fragment$1(ctx) { - var aside, section, div1, div0, p0, input, t0, span, t1, div2, p1, t3, ul, li, a, t4, a_href_value, t5, t6, current, dispose; - - var if_block = (ctx.tagHeaders) && create_if_block_1$1(ctx); - - let each_value = ctx.filteredActions; - + let aside; + let section; + let div1; + let div0; + let p0; + let input; + let t0; + let span; + let t1; + let div2; + let p1; + let t3; + let t4; + let current; + let dispose; + let if_block = /*query*/ ctx[0] === "" && create_if_block_1$1(ctx); + let each_value = /*filteredActions*/ ctx[11]; let each_blocks = []; - for (let i_1 = 0; i_1 < each_value.length; i_1 += 1) { - each_blocks[i_1] = create_each_block$1(get_each_context$1(ctx, each_value, i_1)); + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); } const out = i => transition_out(each_blocks[i], 1, 1, () => { @@ -11256,39 +11417,33 @@ p1 = element("p"); p1.textContent = "API"; t3 = space(); - ul = element("ul"); - li = element("li"); - a = element("a"); - t4 = text("Introduction"); - t5 = space(); if (if_block) if_block.c(); - t6 = space(); + t4 = space(); - for (let i_1 = 0; i_1 < each_blocks.length; i_1 += 1) { - each_blocks[i_1].c(); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); } + attr(input, "id", "search-input-text"); - attr(input, "class", "input is-rounded svelte-1xl6iim"); + attr(input, "class", "input is-rounded svelte-fvssqr"); attr(input, "placeholder", "Filter by path, method, and title..."); - attr(span, "class", "icon is-right icon-input-search svelte-1xl6iim"); + attr(span, "class", "icon is-right icon-input-search svelte-fvssqr"); attr(p0, "class", "control has-icons-right"); attr(div0, "class", "field"); - attr(div1, "class", "hero-body svelte-1xl6iim"); - attr(section, "class", "hero is-sticky svelte-1xl6iim"); + attr(div1, "class", "hero-body svelte-fvssqr"); + toggle_class(div1, "is-darkmode", /*isDarkmode*/ ctx[6]); + attr(section, "class", "hero is-sticky svelte-fvssqr"); + toggle_class(section, "is-darkmode", /*isDarkmode*/ ctx[6]); attr(p1, "class", "menu-label"); - attr(a, "href", a_href_value = basePath(ctx.config)); - attr(ul, "class", "menu-list"); - attr(div2, "class", "menu-wrapper svelte-1xl6iim"); - attr(aside, "class", "menu svelte-1xl6iim"); - toggle_class(aside, "is-collapsed", ctx.isCollapsed); + attr(div2, "class", "menu-wrapper svelte-fvssqr"); + attr(aside, "class", "menu svelte-fvssqr"); + toggle_class(aside, "is-collapsed", /*isCollapsed*/ ctx[5]); dispose = [ - listen(input, "input", ctx.input_input_handler), - listen(span, "click", ctx.searchClick), - listen(a, "click", prevent_default(ctx.tocClick)) + listen(input, "input", /*input_input_handler*/ ctx[13]), + listen(span, "click", /*searchClick*/ ctx[10]) ]; }, - m(target, anchor) { insert(target, aside, anchor); append(aside, section); @@ -11296,190 +11451,208 @@ append(div1, div0); append(div0, p0); append(p0, input); - - set_input_value(input, ctx.query); - + set_input_value(input, /*query*/ ctx[0]); append(p0, t0); append(p0, span); append(aside, t1); append(aside, div2); append(div2, p1); append(div2, t3); - append(div2, ul); - append(ul, li); - append(li, a); - append(a, t4); - append(ul, t5); - if (if_block) if_block.m(ul, null); - append(div2, t6); + if (if_block) if_block.m(div2, null); + append(div2, t4); - for (let i_1 = 0; i_1 < each_blocks.length; i_1 += 1) { - each_blocks[i_1].m(div2, null); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(div2, null); } current = true; }, - - p(changed, ctx) { - if (changed.query && (input.value !== ctx.query)) set_input_value(input, ctx.query); - - if ((!current || changed.config) && a_href_value !== (a_href_value = basePath(ctx.config))) { - attr(a, "href", a_href_value); + p(ctx, [dirty]) { + if (dirty & /*query*/ 1 && input.value !== /*query*/ ctx[0]) { + set_input_value(input, /*query*/ ctx[0]); } - if (ctx.tagHeaders) { + if (dirty & /*isDarkmode*/ 64) { + toggle_class(div1, "is-darkmode", /*isDarkmode*/ ctx[6]); + } + + if (dirty & /*isDarkmode*/ 64) { + toggle_class(section, "is-darkmode", /*isDarkmode*/ ctx[6]); + } + + if (/*query*/ ctx[0] === "") { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); } else { if_block = create_if_block_1$1(ctx); if_block.c(); - if_block.m(ul, null); + if_block.m(div2, t4); } } else if (if_block) { if_block.d(1); if_block = null; } - if (changed.filteredActions || changed.actionsCount || changed.currentSlug || changed.handleClick) { - each_value = ctx.filteredActions; + if (dirty & /*filteredActions, actionsCount, currentSlug, handleClick, handleGroupClick*/ 2456) { + each_value = /*filteredActions*/ ctx[11]; + let i; - let i_1; - for (i_1 = 0; i_1 < each_value.length; i_1 += 1) { - const child_ctx = get_each_context$1(ctx, each_value, i_1); + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$1(ctx, each_value, i); - if (each_blocks[i_1]) { - each_blocks[i_1].p(changed, child_ctx); - transition_in(each_blocks[i_1], 1); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); } else { - each_blocks[i_1] = create_each_block$1(child_ctx); - each_blocks[i_1].c(); - transition_in(each_blocks[i_1], 1); - each_blocks[i_1].m(div2, null); + each_blocks[i] = create_each_block$1(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(div2, null); } } group_outros(); - for (i_1 = each_value.length; i_1 < each_blocks.length; i_1 += 1) { - out(i_1); + + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); } + check_outros(); } - if (changed.isCollapsed) { - toggle_class(aside, "is-collapsed", ctx.isCollapsed); + if (dirty & /*isCollapsed*/ 32) { + toggle_class(aside, "is-collapsed", /*isCollapsed*/ ctx[5]); } }, - i(local) { if (current) return; - for (let i_1 = 0; i_1 < each_value.length; i_1 += 1) { - transition_in(each_blocks[i_1]); + + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); } current = true; }, - o(local) { each_blocks = each_blocks.filter(Boolean); - for (let i_1 = 0; i_1 < each_blocks.length; i_1 += 1) { - transition_out(each_blocks[i_1]); + + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); } current = false; }, - d(detaching) { - if (detaching) { - detach(aside); - } - + if (detaching) detach(aside); if (if_block) if_block.d(); - destroy_each(each_blocks, detaching); - run_all(dispose); } }; } - function escape$2(text) { - return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - function headerLink(text) { - return text.toLowerCase().replace(/\s/g, "-"); + return text.toLowerCase().replace(/\s/g, "-"); } function instance$1($$self, $$props, $$invalidate) { - - - let { config = {}, tagActions = [], tagHeaders = [], currentSlug, actionsCount, isCollapsed, handleClick, tocClick, searchClick } = $$props; - - let query = ""; + let { config = {} } = $$props; + let { tagActions = [] } = $$props; + let { tagHeaders = [] } = $$props; + let { currentSlug } = $$props; + let { actionsCount } = $$props; + let { isCollapsed } = $$props; + let { isDarkmode } = $$props; + let { handleClick } = $$props; + let { handleGroupClick } = $$props; + let { tocClick } = $$props; + let { searchClick } = $$props; + let { query } = $$props; function input_input_handler() { query = this.value; - $$invalidate('query', query); + $$invalidate(0, query); } $$self.$set = $$props => { - if ('config' in $$props) $$invalidate('config', config = $$props.config); - if ('tagActions' in $$props) $$invalidate('tagActions', tagActions = $$props.tagActions); - if ('tagHeaders' in $$props) $$invalidate('tagHeaders', tagHeaders = $$props.tagHeaders); - if ('currentSlug' in $$props) $$invalidate('currentSlug', currentSlug = $$props.currentSlug); - if ('actionsCount' in $$props) $$invalidate('actionsCount', actionsCount = $$props.actionsCount); - if ('isCollapsed' in $$props) $$invalidate('isCollapsed', isCollapsed = $$props.isCollapsed); - if ('handleClick' in $$props) $$invalidate('handleClick', handleClick = $$props.handleClick); - if ('tocClick' in $$props) $$invalidate('tocClick', tocClick = $$props.tocClick); - if ('searchClick' in $$props) $$invalidate('searchClick', searchClick = $$props.searchClick); + if ("config" in $$props) $$invalidate(1, config = $$props.config); + if ("tagActions" in $$props) $$invalidate(12, tagActions = $$props.tagActions); + if ("tagHeaders" in $$props) $$invalidate(2, tagHeaders = $$props.tagHeaders); + if ("currentSlug" in $$props) $$invalidate(3, currentSlug = $$props.currentSlug); + if ("actionsCount" in $$props) $$invalidate(4, actionsCount = $$props.actionsCount); + if ("isCollapsed" in $$props) $$invalidate(5, isCollapsed = $$props.isCollapsed); + if ("isDarkmode" in $$props) $$invalidate(6, isDarkmode = $$props.isDarkmode); + if ("handleClick" in $$props) $$invalidate(7, handleClick = $$props.handleClick); + if ("handleGroupClick" in $$props) $$invalidate(8, handleGroupClick = $$props.handleGroupClick); + if ("tocClick" in $$props) $$invalidate(9, tocClick = $$props.tocClick); + if ("searchClick" in $$props) $$invalidate(10, searchClick = $$props.searchClick); + if ("query" in $$props) $$invalidate(0, query = $$props.query); }; - let regex, filteredActions; + let filteredActions; - $$self.$$.update = ($$dirty = { query: 1, tagActions: 1, regex: 1 }) => { - if ($$dirty.query) { $$invalidate('regex', regex = new RegExp(escape$2(query), "gi")); } - if ($$dirty.tagActions || $$dirty.regex) { $$invalidate('filteredActions', filteredActions = filterActions(tagActions, regex)); } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*tagActions, query*/ 4097) { + $$invalidate(11, filteredActions = filterActions(tagActions, query)); + } }; - return { + return [ + query, config, - tagActions, tagHeaders, currentSlug, actionsCount, isCollapsed, + isDarkmode, handleClick, + handleGroupClick, tocClick, searchClick, - query, filteredActions, + tagActions, input_input_handler - }; + ]; } class MenuPanel extends SvelteComponent { constructor(options) { super(); - if (!document.getElementById("svelte-1xl6iim-style")) add_css$1(); - init(this, options, instance$1, create_fragment$1, safe_not_equal, ["config", "tagActions", "tagHeaders", "currentSlug", "actionsCount", "isCollapsed", "handleClick", "tocClick", "searchClick"]); + if (!document.getElementById("svelte-fvssqr-style")) add_css$1(); + + init(this, options, instance$1, create_fragment$1, safe_not_equal, { + config: 1, + tagActions: 12, + tagHeaders: 2, + currentSlug: 3, + actionsCount: 4, + isCollapsed: 5, + isDarkmode: 6, + handleClick: 7, + handleGroupClick: 8, + tocClick: 9, + searchClick: 10, + query: 0 + }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/tables/HeaderTable.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/tables/HeaderTable.svelte generated by Svelte v3.16.5 */ function get_each_context$2(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.name = list[i].name; - child_ctx.example = list[i].example; + const child_ctx = ctx.slice(); + child_ctx[1] = list[i].name; + child_ctx[2] = list[i].example; return child_ctx; } // (5:0) {#if headers.length > 0} function create_if_block$2(ctx) { - var table, thead, t_1, tbody; - - let each_value = ctx.headers; - + let table; + let thead; + let t1; + let tbody; + let each_value = /*headers*/ ctx[0]; let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { @@ -11491,36 +11664,35 @@ table = element("table"); thead = element("thead"); thead.innerHTML = `Headers`; - t_1 = space(); + t1 = space(); tbody = element("tbody"); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } + attr(table, "class", "table is-stripped is-fullwidth"); }, - m(target, anchor) { insert(target, table, anchor); append(table, thead); - append(table, t_1); + append(table, t1); append(table, tbody); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].m(tbody, null); } }, - - p(changed, ctx) { - if (changed.headers) { - each_value = ctx.headers; - + p(ctx, dirty) { + if (dirty & /*headers*/ 1) { + each_value = /*headers*/ ctx[0]; let i; + for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context$2(ctx, each_value, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); } else { each_blocks[i] = create_each_block$2(child_ctx); each_blocks[i].c(); @@ -11531,15 +11703,12 @@ for (; i < each_blocks.length; i += 1) { each_blocks[i].d(1); } + each_blocks.length = each_value.length; } }, - d(detaching) { - if (detaching) { - detach(table); - } - + if (detaching) detach(table); destroy_each(each_blocks, detaching); } }; @@ -11547,7 +11716,16 @@ // (13:6) {#each headers as { name, example }} function create_each_block$2(ctx) { - var tr, td0, t0_value = ctx.name + "", t0, t1, td1, code, t2_value = ctx.example + "", t2, t3; + let tr; + let td0; + let t0_value = /*name*/ ctx[1] + ""; + let t0; + let t1; + let td1; + let code; + let t2_value = /*example*/ ctx[2] + ""; + let t2; + let t3; return { c() { @@ -11560,7 +11738,6 @@ t2 = text(t2_value); t3 = space(); }, - m(target, anchor) { insert(target, tr, anchor); append(tr, td0); @@ -11571,45 +11748,33 @@ append(code, t2); append(tr, t3); }, - - p(changed, ctx) { - if ((changed.headers) && t0_value !== (t0_value = ctx.name + "")) { - set_data(t0, t0_value); - } - - if ((changed.headers) && t2_value !== (t2_value = ctx.example + "")) { - set_data(t2, t2_value); - } + p(ctx, dirty) { + if (dirty & /*headers*/ 1 && t0_value !== (t0_value = /*name*/ ctx[1] + "")) set_data(t0, t0_value); + if (dirty & /*headers*/ 1 && t2_value !== (t2_value = /*example*/ ctx[2] + "")) set_data(t2, t2_value); }, - d(detaching) { - if (detaching) { - detach(tr); - } + if (detaching) detach(tr); } }; } function create_fragment$2(ctx) { - var if_block_anchor; - - var if_block = (ctx.headers.length > 0) && create_if_block$2(ctx); + let if_block_anchor; + let if_block = /*headers*/ ctx[0].length > 0 && create_if_block$2(ctx); return { c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, - m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); }, - - p(changed, ctx) { - if (ctx.headers.length > 0) { + p(ctx, [dirty]) { + if (/*headers*/ ctx[0].length > 0) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); } else { if_block = create_if_block$2(ctx); if_block.c(); @@ -11620,16 +11785,11 @@ if_block = null; } }, - i: noop, o: noop, - d(detaching) { if (if_block) if_block.d(detaching); - - if (detaching) { - detach(if_block_anchor); - } + if (detaching) detach(if_block_anchor); } }; } @@ -11638,81 +11798,74 @@ let { headers = [] } = $$props; $$self.$set = $$props => { - if ('headers' in $$props) $$invalidate('headers', headers = $$props.headers); + if ("headers" in $$props) $$invalidate(0, headers = $$props.headers); }; - return { headers }; + return [headers]; } class HeaderTable extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$2, create_fragment$2, safe_not_equal, ["headers"]); + init(this, options, instance$2, create_fragment$2, safe_not_equal, { headers: 0 }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/components/CodeBlock.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/components/CodeBlock.svelte generated by Svelte v3.16.5 */ - // (10:0) {#if body} function create_if_block$3(ctx) { - var pre, code, raw_value = highlight(stringify$2(ctx.body), ctx.mime) + "", code_class_value, pre_class_value; + let pre; + let code; + let raw_value = highlight(stringify$2(/*body*/ ctx[0]), /*mime*/ ctx[1]) + ""; + let code_class_value; + let pre_class_value; return { c() { pre = element("pre"); code = element("code"); - attr(code, "class", code_class_value = "language-" + ctx.mime); - attr(pre, "class", pre_class_value = "language-" + ctx.mime); + attr(code, "class", code_class_value = "language-" + /*mime*/ ctx[1]); + attr(pre, "class", pre_class_value = "language-" + /*mime*/ ctx[1]); }, - m(target, anchor) { insert(target, pre, anchor); append(pre, code); code.innerHTML = raw_value; }, + p(ctx, dirty) { + if (dirty & /*body, mime*/ 3 && raw_value !== (raw_value = highlight(stringify$2(/*body*/ ctx[0]), /*mime*/ ctx[1]) + "")) code.innerHTML = raw_value;; - p(changed, ctx) { - if ((changed.body || changed.mime) && raw_value !== (raw_value = highlight(stringify$2(ctx.body), ctx.mime) + "")) { - code.innerHTML = raw_value; - } - - if ((changed.mime) && code_class_value !== (code_class_value = "language-" + ctx.mime)) { + if (dirty & /*mime*/ 2 && code_class_value !== (code_class_value = "language-" + /*mime*/ ctx[1])) { attr(code, "class", code_class_value); } - if ((changed.mime) && pre_class_value !== (pre_class_value = "language-" + ctx.mime)) { + if (dirty & /*mime*/ 2 && pre_class_value !== (pre_class_value = "language-" + /*mime*/ ctx[1])) { attr(pre, "class", pre_class_value); } }, - d(detaching) { - if (detaching) { - detach(pre); - } + if (detaching) detach(pre); } }; } function create_fragment$3(ctx) { - var if_block_anchor; - - var if_block = (ctx.body) && create_if_block$3(ctx); + let if_block_anchor; + let if_block = /*body*/ ctx[0] && create_if_block$3(ctx); return { c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, - m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); }, - - p(changed, ctx) { - if (ctx.body) { + p(ctx, [dirty]) { + if (/*body*/ ctx[0]) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); } else { if_block = create_if_block$3(ctx); if_block.c(); @@ -11723,67 +11876,84 @@ if_block = null; } }, - i: noop, o: noop, - d(detaching) { if (if_block) if_block.d(detaching); - - if (detaching) { - detach(if_block_anchor); - } + if (detaching) detach(if_block_anchor); } }; } function instance$3($$self, $$props, $$invalidate) { - let { type, body } = $$props; + let { type } = $$props; + let { body } = $$props; $$self.$set = $$props => { - if ('type' in $$props) $$invalidate('type', type = $$props.type); - if ('body' in $$props) $$invalidate('body', body = $$props.body); + if ("type" in $$props) $$invalidate(2, type = $$props.type); + if ("body" in $$props) $$invalidate(0, body = $$props.body); }; let mime; - $$self.$$.update = ($$dirty = { type: 1 }) => { - if ($$dirty.type) { $$invalidate('mime', mime = alias(type)); } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*type*/ 4) { + $$invalidate(1, mime = alias(type)); + } }; - return { type, body, mime }; + return [body, mime, type]; } class CodeBlock extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$3, create_fragment$3, safe_not_equal, ["type", "body"]); + init(this, options, instance$3, create_fragment$3, safe_not_equal, { type: 2, body: 0 }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/CodePanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/CodePanel.svelte generated by Svelte v3.16.5 */ function add_css$2() { var style = element("style"); - style.id = 'svelte-15v28ah-style'; + style.id = "svelte-15v28ah-style"; style.textContent = ".tab-content.svelte-15v28ah{display:none}.tab-content.is-active.svelte-15v28ah{display:block}"; append(document.head, style); } // (32:0) {#if example || schema} function create_if_block$4(ctx) { - var div2, div0, ul, li0, a0, t1, li1, a1, t3, div1, section0, section0_class_value, t4, section1, section1_class_value, current, dispose; + let div2; + let div0; + let ul; + let li0; + let a0; + let t1; + let li1; + let a1; + let t3; + let div1; + let section0; + let section0_class_value; + let t4; + let section1; + let section1_class_value; + let current; + let dispose; - var codeblock0 = new CodeBlock({ - props: { type: ctx.contentType, body: ctx.example } - }); + const codeblock0 = new CodeBlock({ + props: { + type: /*contentType*/ ctx[0], + body: /*example*/ ctx[1] + } + }); - var codeblock1 = new CodeBlock({ - props: { - type: "application/json", - body: ctx.schema - } - }); + const codeblock1 = new CodeBlock({ + props: { + type: "application/json", + body: /*schema*/ ctx[2] + } + }); return { c() { @@ -11800,28 +11970,27 @@ t3 = space(); div1 = element("div"); section0 = element("section"); - codeblock0.$$.fragment.c(); + create_component(codeblock0.$$.fragment); t4 = space(); section1 = element("section"); - codeblock1.$$.fragment.c(); + create_component(codeblock1.$$.fragment); attr(a0, "data-index", "0"); attr(a0, "href", "javascript:void(0)"); - toggle_class(li0, "is-active", ctx.tabIndex === 0); + toggle_class(li0, "is-active", /*tabIndex*/ ctx[7] === 0); attr(a1, "data-index", "1"); attr(a1, "href", "javascript:void(0)"); - toggle_class(li1, "is-active", ctx.tabIndex === 1); + toggle_class(li1, "is-active", /*tabIndex*/ ctx[7] === 1); attr(div0, "class", "tabs is-fullwidth"); - toggle_class(div0, "is-toggle", ctx.asToggle); - attr(section0, "class", section0_class_value = "tab-content " + ctx.activeBody + " svelte-15v28ah"); - attr(section1, "class", section1_class_value = "tab-content " + ctx.activeSchema + " svelte-15v28ah"); + toggle_class(div0, "is-toggle", /*asToggle*/ ctx[3]); + attr(section0, "class", section0_class_value = "tab-content " + /*activeBody*/ ctx[5] + " svelte-15v28ah"); + attr(section1, "class", section1_class_value = "tab-content " + /*activeSchema*/ ctx[6] + " svelte-15v28ah"); attr(div2, "class", "tabs-with-content"); dispose = [ - listen(a0, "click", ctx.tabSelect), - listen(a1, "click", ctx.tabSelect) + listen(a0, "click", /*tabSelect*/ ctx[4]), + listen(a1, "click", /*tabSelect*/ ctx[4]) ]; }, - m(target, anchor) { insert(target, div2, anchor); append(div2, div0); @@ -11840,85 +12009,75 @@ mount_component(codeblock1, section1, null); current = true; }, - - p(changed, ctx) { - if (changed.tabIndex) { - toggle_class(li0, "is-active", ctx.tabIndex === 0); - toggle_class(li1, "is-active", ctx.tabIndex === 1); + p(ctx, dirty) { + if (dirty & /*tabIndex*/ 128) { + toggle_class(li0, "is-active", /*tabIndex*/ ctx[7] === 0); } - if (changed.asToggle) { - toggle_class(div0, "is-toggle", ctx.asToggle); + if (dirty & /*tabIndex*/ 128) { + toggle_class(li1, "is-active", /*tabIndex*/ ctx[7] === 1); } - var codeblock0_changes = {}; - if (changed.contentType) codeblock0_changes.type = ctx.contentType; - if (changed.example) codeblock0_changes.body = ctx.example; + if (dirty & /*asToggle*/ 8) { + toggle_class(div0, "is-toggle", /*asToggle*/ ctx[3]); + } + + const codeblock0_changes = {}; + if (dirty & /*contentType*/ 1) codeblock0_changes.type = /*contentType*/ ctx[0]; + if (dirty & /*example*/ 2) codeblock0_changes.body = /*example*/ ctx[1]; codeblock0.$set(codeblock0_changes); - if ((!current || changed.activeBody) && section0_class_value !== (section0_class_value = "tab-content " + ctx.activeBody + " svelte-15v28ah")) { + if (!current || dirty & /*activeBody*/ 32 && section0_class_value !== (section0_class_value = "tab-content " + /*activeBody*/ ctx[5] + " svelte-15v28ah")) { attr(section0, "class", section0_class_value); } - var codeblock1_changes = {}; - if (changed.schema) codeblock1_changes.body = ctx.schema; + const codeblock1_changes = {}; + if (dirty & /*schema*/ 4) codeblock1_changes.body = /*schema*/ ctx[2]; codeblock1.$set(codeblock1_changes); - if ((!current || changed.activeSchema) && section1_class_value !== (section1_class_value = "tab-content " + ctx.activeSchema + " svelte-15v28ah")) { + if (!current || dirty & /*activeSchema*/ 64 && section1_class_value !== (section1_class_value = "tab-content " + /*activeSchema*/ ctx[6] + " svelte-15v28ah")) { attr(section1, "class", section1_class_value); } }, - i(local) { if (current) return; transition_in(codeblock0.$$.fragment, local); - transition_in(codeblock1.$$.fragment, local); - current = true; }, - o(local) { transition_out(codeblock0.$$.fragment, local); transition_out(codeblock1.$$.fragment, local); current = false; }, - d(detaching) { - if (detaching) { - detach(div2); - } - + if (detaching) detach(div2); destroy_component(codeblock0); - destroy_component(codeblock1); - run_all(dispose); } }; } function create_fragment$4(ctx) { - var if_block_anchor, current; - - var if_block = (ctx.example || ctx.schema) && create_if_block$4(ctx); + let if_block_anchor; + let current; + let if_block = (/*example*/ ctx[1] || /*schema*/ ctx[2]) && create_if_block$4(ctx); return { c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, - m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); current = true; }, - - p(changed, ctx) { - if (ctx.example || ctx.schema) { + p(ctx, [dirty]) { + if (/*example*/ ctx[1] || /*schema*/ ctx[2]) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); transition_in(if_block, 1); } else { if_block = create_if_block$4(ctx); @@ -11928,164 +12087,164 @@ } } else if (if_block) { group_outros(); + transition_out(if_block, 1, 1, () => { if_block = null; }); + check_outros(); } }, - i(local) { if (current) return; transition_in(if_block); current = true; }, - o(local) { transition_out(if_block); current = false; }, - d(detaching) { if (if_block) if_block.d(detaching); - - if (detaching) { - detach(if_block_anchor); - } + if (detaching) detach(if_block_anchor); } }; } function instance$4($$self, $$props, $$invalidate) { - let { contentType, example, schema, asToggle } = $$props; + let { contentType } = $$props; + let { example } = $$props; + let { schema } = $$props; + let { asToggle } = $$props; + let activeBody = "is-active"; + let activeSchema = ""; + let tabIndex = 0; - let activeBody = "is-active"; - let activeSchema = ""; - let tabIndex = 0; - - const tabSelect = event => { - const index = event.target.dataset["index"]; - $$invalidate('tabIndex', tabIndex = parseInt(index, 10)); - }; + const tabSelect = event => { + const index = event.target.dataset["index"]; + $$invalidate(7, tabIndex = parseInt(index, 10)); + }; $$self.$set = $$props => { - if ('contentType' in $$props) $$invalidate('contentType', contentType = $$props.contentType); - if ('example' in $$props) $$invalidate('example', example = $$props.example); - if ('schema' in $$props) $$invalidate('schema', schema = $$props.schema); - if ('asToggle' in $$props) $$invalidate('asToggle', asToggle = $$props.asToggle); + if ("contentType" in $$props) $$invalidate(0, contentType = $$props.contentType); + if ("example" in $$props) $$invalidate(1, example = $$props.example); + if ("schema" in $$props) $$invalidate(2, schema = $$props.schema); + if ("asToggle" in $$props) $$invalidate(3, asToggle = $$props.asToggle); }; - $$self.$$.update = ($$dirty = { tabIndex: 1 }) => { - if ($$dirty.tabIndex) { $$invalidate('activeBody', activeBody = tabIndex === 0 ? "is-active" : ""); } - if ($$dirty.tabIndex) { $$invalidate('activeSchema', activeSchema = tabIndex === 1 ? "is-active" : ""); } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*tabIndex*/ 128) { + $$invalidate(5, activeBody = tabIndex === 0 ? "is-active" : ""); + } + + if ($$self.$$.dirty & /*tabIndex*/ 128) { + $$invalidate(6, activeSchema = tabIndex === 1 ? "is-active" : ""); + } }; - return { + return [ contentType, example, schema, asToggle, + tabSelect, activeBody, activeSchema, - tabIndex, - tabSelect - }; + tabIndex + ]; } class CodePanel extends SvelteComponent { constructor(options) { super(); if (!document.getElementById("svelte-15v28ah-style")) add_css$2(); - init(this, options, instance$4, create_fragment$4, safe_not_equal, ["contentType", "example", "schema", "asToggle", "tabSelect"]); + + init(this, options, instance$4, create_fragment$4, safe_not_equal, { + contentType: 0, + example: 1, + schema: 2, + asToggle: 3, + tabSelect: 4 + }); } get tabSelect() { - return this.$$.ctx.tabSelect; + return this.$$.ctx[4]; } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/RequestPanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/RequestPanel.svelte generated by Svelte v3.16.5 */ - // (16:0) {#if description} function create_if_block_1$2(ctx) { - var div, raw_value = markdown(ctx.description) + ""; + let div; + let raw_value = markdown(/*description*/ ctx[0]) + ""; return { c() { div = element("div"); attr(div, "class", "content"); }, - m(target, anchor) { insert(target, div, anchor); div.innerHTML = raw_value; }, - - p(changed, ctx) { - if ((changed.description) && raw_value !== (raw_value = markdown(ctx.description) + "")) { - div.innerHTML = raw_value; - } + p(ctx, dirty) { + if (dirty & /*description*/ 1 && raw_value !== (raw_value = markdown(/*description*/ ctx[0]) + "")) div.innerHTML = raw_value;; }, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } // (26:0) {#if showRequest} function create_if_block$5(ctx) { - var hr; + let hr; return { c() { hr = element("hr"); }, - m(target, anchor) { insert(target, hr, anchor); }, - d(detaching) { - if (detaching) { - detach(hr); - } + if (detaching) detach(hr); } }; } function create_fragment$5(ctx) { - var t0, t1, t2, if_block1_anchor, current; + let t0; + let t1; + let t2; + let if_block1_anchor; + let current; + let if_block0 = /*description*/ ctx[0] && create_if_block_1$2(ctx); + const headertable = new HeaderTable({ props: { headers: /*headers*/ ctx[1] } }); - var if_block0 = (ctx.description) && create_if_block_1$2(ctx); + const codepanel = new CodePanel({ + props: { + contentType: /*contentType*/ ctx[2], + example: /*example*/ ctx[3], + schema: /*schema*/ ctx[4], + asToggle: true + } + }); - var headertable = new HeaderTable({ props: { headers: ctx.headers } }); - - var codepanel = new CodePanel({ - props: { - contentType: ctx.contentType, - example: ctx.example, - schema: ctx.schema, - asToggle: true - } - }); - - var if_block1 = (ctx.showRequest) && create_if_block$5(ctx); + let if_block1 = /*showRequest*/ ctx[5] && create_if_block$5(ctx); return { c() { if (if_block0) if_block0.c(); t0 = space(); - headertable.$$.fragment.c(); + create_component(headertable.$$.fragment); t1 = space(); - codepanel.$$.fragment.c(); + create_component(codepanel.$$.fragment); t2 = space(); if (if_block1) if_block1.c(); if_block1_anchor = empty(); }, - m(target, anchor) { if (if_block0) if_block0.m(target, anchor); insert(target, t0, anchor); @@ -12097,11 +12256,10 @@ insert(target, if_block1_anchor, anchor); current = true; }, - - p(changed, ctx) { - if (ctx.description) { + p(ctx, [dirty]) { + if (/*description*/ ctx[0]) { if (if_block0) { - if_block0.p(changed, ctx); + if_block0.p(ctx, dirty); } else { if_block0 = create_if_block_1$2(ctx); if_block0.c(); @@ -12112,364 +12270,397 @@ if_block0 = null; } - var headertable_changes = {}; - if (changed.headers) headertable_changes.headers = ctx.headers; + const headertable_changes = {}; + if (dirty & /*headers*/ 2) headertable_changes.headers = /*headers*/ ctx[1]; headertable.$set(headertable_changes); - - var codepanel_changes = {}; - if (changed.contentType) codepanel_changes.contentType = ctx.contentType; - if (changed.example) codepanel_changes.example = ctx.example; - if (changed.schema) codepanel_changes.schema = ctx.schema; + const codepanel_changes = {}; + if (dirty & /*contentType*/ 4) codepanel_changes.contentType = /*contentType*/ ctx[2]; + if (dirty & /*example*/ 8) codepanel_changes.example = /*example*/ ctx[3]; + if (dirty & /*schema*/ 16) codepanel_changes.schema = /*schema*/ ctx[4]; codepanel.$set(codepanel_changes); - if (ctx.showRequest) { + if (/*showRequest*/ ctx[5]) { if (!if_block1) { if_block1 = create_if_block$5(ctx); if_block1.c(); if_block1.m(if_block1_anchor.parentNode, if_block1_anchor); + } else { + } } else if (if_block1) { if_block1.d(1); if_block1 = null; } }, - i(local) { if (current) return; transition_in(headertable.$$.fragment, local); - transition_in(codepanel.$$.fragment, local); - current = true; }, - o(local) { transition_out(headertable.$$.fragment, local); transition_out(codepanel.$$.fragment, local); current = false; }, - d(detaching) { if (if_block0) if_block0.d(detaching); - - if (detaching) { - detach(t0); - } - + if (detaching) detach(t0); destroy_component(headertable, detaching); - - if (detaching) { - detach(t1); - } - + if (detaching) detach(t1); destroy_component(codepanel, detaching); - - if (detaching) { - detach(t2); - } - + if (detaching) detach(t2); if (if_block1) if_block1.d(detaching); - - if (detaching) { - detach(if_block1_anchor); - } + if (detaching) detach(if_block1_anchor); } }; } function instance$5($$self, $$props, $$invalidate) { - - - let { description, headers, contentType, example, schema } = $$props; + let { description } = $$props; + let { headers } = $$props; + let { contentType } = $$props; + let { example } = $$props; + let { schema } = $$props; $$self.$set = $$props => { - if ('description' in $$props) $$invalidate('description', description = $$props.description); - if ('headers' in $$props) $$invalidate('headers', headers = $$props.headers); - if ('contentType' in $$props) $$invalidate('contentType', contentType = $$props.contentType); - if ('example' in $$props) $$invalidate('example', example = $$props.example); - if ('schema' in $$props) $$invalidate('schema', schema = $$props.schema); + if ("description" in $$props) $$invalidate(0, description = $$props.description); + if ("headers" in $$props) $$invalidate(1, headers = $$props.headers); + if ("contentType" in $$props) $$invalidate(2, contentType = $$props.contentType); + if ("example" in $$props) $$invalidate(3, example = $$props.example); + if ("schema" in $$props) $$invalidate(4, schema = $$props.schema); }; let showRequest; - $$self.$$.update = ($$dirty = { description: 1, headers: 1, example: 1 }) => { - if ($$dirty.description || $$dirty.headers || $$dirty.example) { $$invalidate('showRequest', showRequest = !!(description || headers.length !== 0 || example)); } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*description, headers, example*/ 11) { + $$invalidate(5, showRequest = !!(description || headers.length !== 0 || example)); + } }; - return { - description, - headers, - contentType, - example, - schema, - showRequest - }; + return [description, headers, contentType, example, schema, showRequest]; } class RequestPanel extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$5, create_fragment$5, safe_not_equal, ["description", "headers", "contentType", "example", "schema"]); + + init(this, options, instance$5, create_fragment$5, safe_not_equal, { + description: 0, + headers: 1, + contentType: 2, + example: 3, + schema: 4 + }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ResponsePanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ResponsePanel.svelte generated by Svelte v3.16.5 */ - // (20:6) {#if title} - function create_if_block_1$3(ctx) { - var t; + function create_else_block(ctx) { + let t_value = (/*contentType*/ ctx[4] || "Response") + ""; + let t; return { c() { - t = text(ctx.title); + t = text(t_value); }, - m(target, anchor) { insert(target, t, anchor); }, - - p(changed, ctx) { - if (changed.title) { - set_data(t, ctx.title); - } + p(ctx, dirty) { + if (dirty & /*contentType*/ 16 && t_value !== (t_value = (/*contentType*/ ctx[4] || "Response") + "")) set_data(t, t_value); }, - d(detaching) { - if (detaching) { - detach(t); - } + if (detaching) detach(t); } }; } - // (29:4) {#if description} + // (19:6) {#if title} + function create_if_block_2$1(ctx) { + let t0; + let t1; + + return { + c() { + t0 = text("Response "); + t1 = text(/*title*/ ctx[0]); + }, + m(target, anchor) { + insert(target, t0, anchor); + insert(target, t1, anchor); + }, + p(ctx, dirty) { + if (dirty & /*title*/ 1) set_data(t1, /*title*/ ctx[0]); + }, + d(detaching) { + if (detaching) detach(t0); + if (detaching) detach(t1); + } + }; + } + + // (23:6) {#if title !== ''} + function create_if_block_1$3(ctx) { + let span; + let t_value = (/*contentType*/ ctx[4] || "") + ""; + let t; + + return { + c() { + span = element("span"); + t = text(t_value); + attr(span, "class", "tag is-medium is-white"); + }, + m(target, anchor) { + insert(target, span, anchor); + append(span, t); + }, + p(ctx, dirty) { + if (dirty & /*contentType*/ 16 && t_value !== (t_value = (/*contentType*/ ctx[4] || "") + "")) set_data(t, t_value); + }, + d(detaching) { + if (detaching) detach(span); + } + }; + } + + // (30:4) {#if description} function create_if_block$6(ctx) { - var div, raw_value = markdown(ctx.description) + ""; + let div; + let raw_value = markdown(/*description*/ ctx[1]) + ""; return { c() { div = element("div"); attr(div, "class", "content"); }, - m(target, anchor) { insert(target, div, anchor); div.innerHTML = raw_value; }, - - p(changed, ctx) { - if ((changed.description) && raw_value !== (raw_value = markdown(ctx.description) + "")) { - div.innerHTML = raw_value; - } + p(ctx, dirty) { + if (dirty & /*description*/ 2 && raw_value !== (raw_value = markdown(/*description*/ ctx[1]) + "")) div.innerHTML = raw_value;; }, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } function create_fragment$6(ctx) { - var div1, header, p, t0, t1, a, span, t2_value = ctx.contentType || '' + "", t2, t3, code, t4, code_class_value, t5, div0, t6, t7, current; + let div1; + let header; + let p; + let t0; + let a; + let t1; + let code; + let t2; + let code_class_value; + let t3; + let div0; + let t4; + let t5; + let current; - var if_block0 = (ctx.title) && create_if_block_1$3(ctx); - - var if_block1 = (ctx.description) && create_if_block$6(ctx); - - var headertable = new HeaderTable({ props: { headers: ctx.headers } }); - - var codepanel = new CodePanel({ - props: { - contentType: ctx.contentType, - example: ctx.example, - schema: ctx.schema + function select_block_type(ctx, dirty) { + if (/*title*/ ctx[0]) return create_if_block_2$1; + return create_else_block; } - }); + + let current_block_type = select_block_type(ctx, -1); + let if_block0 = current_block_type(ctx); + let if_block1 = /*title*/ ctx[0] !== "" && create_if_block_1$3(ctx); + let if_block2 = /*description*/ ctx[1] && create_if_block$6(ctx); + const headertable = new HeaderTable({ props: { headers: /*headers*/ ctx[2] } }); + + const codepanel = new CodePanel({ + props: { + contentType: /*contentType*/ ctx[4], + example: /*example*/ ctx[5], + schema: /*schema*/ ctx[6] + } + }); return { c() { div1 = element("div"); header = element("header"); p = element("p"); - t0 = text("Response\n "); - if (if_block0) if_block0.c(); - t1 = space(); + if_block0.c(); + t0 = space(); a = element("a"); - span = element("span"); - t2 = text(t2_value); - t3 = space(); - code = element("code"); - t4 = text(ctx.statusCode); - t5 = space(); - div0 = element("div"); if (if_block1) if_block1.c(); - t6 = space(); - headertable.$$.fragment.c(); - t7 = space(); - codepanel.$$.fragment.c(); + t1 = space(); + code = element("code"); + t2 = text(/*statusCode*/ ctx[3]); + t3 = space(); + div0 = element("div"); + if (if_block2) if_block2.c(); + t4 = space(); + create_component(headertable.$$.fragment); + t5 = space(); + create_component(codepanel.$$.fragment); attr(p, "class", "card-header-title"); - attr(span, "class", "tag is-medium is-white"); - attr(code, "class", code_class_value = "tag is-medium " + colorize(ctx.statusCode)); + attr(code, "class", code_class_value = "tag is-medium " + colorize(/*statusCode*/ ctx[3])); attr(a, "href", "javascript:void(0)"); attr(a, "class", "card-header-icon is-family-code"); attr(header, "class", "card-header"); attr(div0, "class", "card-content"); attr(div1, "class", "card"); }, - m(target, anchor) { insert(target, div1, anchor); append(div1, header); append(header, p); - append(p, t0); - if (if_block0) if_block0.m(p, null); - append(header, t1); + if_block0.m(p, null); + append(header, t0); append(header, a); - append(a, span); - append(span, t2); - append(a, t3); + if (if_block1) if_block1.m(a, null); + append(a, t1); append(a, code); - append(code, t4); - append(div1, t5); + append(code, t2); + append(div1, t3); append(div1, div0); - if (if_block1) if_block1.m(div0, null); - append(div0, t6); + if (if_block2) if_block2.m(div0, null); + append(div0, t4); mount_component(headertable, div0, null); - append(div0, t7); + append(div0, t5); mount_component(codepanel, div0, null); current = true; }, + p(ctx, [dirty]) { + if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block0) { + if_block0.p(ctx, dirty); + } else { + if_block0.d(1); + if_block0 = current_block_type(ctx); - p(changed, ctx) { - if (ctx.title) { if (if_block0) { - if_block0.p(changed, ctx); - } else { - if_block0 = create_if_block_1$3(ctx); if_block0.c(); if_block0.m(p, null); } - } else if (if_block0) { - if_block0.d(1); - if_block0 = null; } - if ((!current || changed.contentType) && t2_value !== (t2_value = ctx.contentType || '' + "")) { - set_data(t2, t2_value); - } - - if (!current || changed.statusCode) { - set_data(t4, ctx.statusCode); - } - - if ((!current || changed.statusCode) && code_class_value !== (code_class_value = "tag is-medium " + colorize(ctx.statusCode))) { - attr(code, "class", code_class_value); - } - - if (ctx.description) { + if (/*title*/ ctx[0] !== "") { if (if_block1) { - if_block1.p(changed, ctx); + if_block1.p(ctx, dirty); } else { - if_block1 = create_if_block$6(ctx); + if_block1 = create_if_block_1$3(ctx); if_block1.c(); - if_block1.m(div0, t6); + if_block1.m(a, t1); } } else if (if_block1) { if_block1.d(1); if_block1 = null; } - var headertable_changes = {}; - if (changed.headers) headertable_changes.headers = ctx.headers; - headertable.$set(headertable_changes); + if (!current || dirty & /*statusCode*/ 8) set_data(t2, /*statusCode*/ ctx[3]); - var codepanel_changes = {}; - if (changed.contentType) codepanel_changes.contentType = ctx.contentType; - if (changed.example) codepanel_changes.example = ctx.example; - if (changed.schema) codepanel_changes.schema = ctx.schema; + if (!current || dirty & /*statusCode*/ 8 && code_class_value !== (code_class_value = "tag is-medium " + colorize(/*statusCode*/ ctx[3]))) { + attr(code, "class", code_class_value); + } + + if (/*description*/ ctx[1]) { + if (if_block2) { + if_block2.p(ctx, dirty); + } else { + if_block2 = create_if_block$6(ctx); + if_block2.c(); + if_block2.m(div0, t4); + } + } else if (if_block2) { + if_block2.d(1); + if_block2 = null; + } + + const headertable_changes = {}; + if (dirty & /*headers*/ 4) headertable_changes.headers = /*headers*/ ctx[2]; + headertable.$set(headertable_changes); + const codepanel_changes = {}; + if (dirty & /*contentType*/ 16) codepanel_changes.contentType = /*contentType*/ ctx[4]; + if (dirty & /*example*/ 32) codepanel_changes.example = /*example*/ ctx[5]; + if (dirty & /*schema*/ 64) codepanel_changes.schema = /*schema*/ ctx[6]; codepanel.$set(codepanel_changes); }, - i(local) { if (current) return; transition_in(headertable.$$.fragment, local); - transition_in(codepanel.$$.fragment, local); - current = true; }, - o(local) { transition_out(headertable.$$.fragment, local); transition_out(codepanel.$$.fragment, local); current = false; }, - d(detaching) { - if (detaching) { - detach(div1); - } - - if (if_block0) if_block0.d(); + if (detaching) detach(div1); + if_block0.d(); if (if_block1) if_block1.d(); - + if (if_block2) if_block2.d(); destroy_component(headertable); - destroy_component(codepanel); } }; } function instance$6($$self, $$props, $$invalidate) { - - - let { title, description, headers, statusCode, contentType, example, schema } = $$props; + let { title } = $$props; + let { description } = $$props; + let { headers } = $$props; + let { statusCode } = $$props; + let { contentType } = $$props; + let { example } = $$props; + let { schema } = $$props; $$self.$set = $$props => { - if ('title' in $$props) $$invalidate('title', title = $$props.title); - if ('description' in $$props) $$invalidate('description', description = $$props.description); - if ('headers' in $$props) $$invalidate('headers', headers = $$props.headers); - if ('statusCode' in $$props) $$invalidate('statusCode', statusCode = $$props.statusCode); - if ('contentType' in $$props) $$invalidate('contentType', contentType = $$props.contentType); - if ('example' in $$props) $$invalidate('example', example = $$props.example); - if ('schema' in $$props) $$invalidate('schema', schema = $$props.schema); + if ("title" in $$props) $$invalidate(0, title = $$props.title); + if ("description" in $$props) $$invalidate(1, description = $$props.description); + if ("headers" in $$props) $$invalidate(2, headers = $$props.headers); + if ("statusCode" in $$props) $$invalidate(3, statusCode = $$props.statusCode); + if ("contentType" in $$props) $$invalidate(4, contentType = $$props.contentType); + if ("example" in $$props) $$invalidate(5, example = $$props.example); + if ("schema" in $$props) $$invalidate(6, schema = $$props.schema); }; - return { - title, - description, - headers, - statusCode, - contentType, - example, - schema - }; + return [title, description, headers, statusCode, contentType, example, schema]; } class ResponsePanel extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$6, create_fragment$6, safe_not_equal, ["title", "description", "headers", "statusCode", "contentType", "example", "schema"]); + + init(this, options, instance$6, create_fragment$6, safe_not_equal, { + title: 0, + description: 1, + headers: 2, + statusCode: 3, + contentType: 4, + example: 5, + schema: 6 + }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/tables/ParameterTable.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/tables/ParameterTable.svelte generated by Svelte v3.16.5 */ function get_each_context$3(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.name = list[i].name; - child_ctx.example = list[i].example; - child_ctx.required = list[i].required; - child_ctx.description = list[i].description; - child_ctx.schema = list[i].schema; + const child_ctx = ctx.slice(); + child_ctx[2] = list[i].name; + child_ctx[3] = list[i].example; + child_ctx[4] = list[i].required; + child_ctx[5] = list[i].description; + child_ctx[6] = list[i].schema; return child_ctx; } // (36:10) {:else} - function create_else_block(ctx) { - var div; + function create_else_block$1(ctx) { + let div; return { c() { @@ -12477,53 +12668,47 @@ div.textContent = "-"; attr(div, "class", "content"); }, - m(target, anchor) { insert(target, div, anchor); }, - p: noop, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } // (32:10) {#if description} - function create_if_block_2$1(ctx) { - var div, raw_value = markdown(ctx.description) + ""; + function create_if_block_2$2(ctx) { + let div; + let raw_value = markdown(/*description*/ ctx[5]) + ""; return { c() { div = element("div"); attr(div, "class", "content"); }, - m(target, anchor) { insert(target, div, anchor); div.innerHTML = raw_value; }, - - p(changed, ctx) { - if ((changed.parameters) && raw_value !== (raw_value = markdown(ctx.description) + "")) { - div.innerHTML = raw_value; - } + p(ctx, dirty) { + if (dirty & /*parameters*/ 2 && raw_value !== (raw_value = markdown(/*description*/ ctx[5]) + "")) div.innerHTML = raw_value;; }, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } // (40:10) {#if example} function create_if_block_1$4(ctx) { - var div, span, t1, code, t2_value = ctx.example + "", t2; + let div; + let span; + let t1; + let code; + let t2_value = /*example*/ ctx[3] + ""; + let t2; return { c() { @@ -12535,7 +12720,6 @@ t2 = text(t2_value); attr(code, "class", "tag"); }, - m(target, anchor) { insert(target, div, anchor); append(div, span); @@ -12543,24 +12727,23 @@ append(div, code); append(code, t2); }, - - p(changed, ctx) { - if ((changed.parameters) && t2_value !== (t2_value = ctx.example + "")) { - set_data(t2, t2_value); - } + p(ctx, dirty) { + if (dirty & /*parameters*/ 2 && t2_value !== (t2_value = /*example*/ ctx[3] + "")) set_data(t2, t2_value); }, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } // (47:10) {#if schema.enum} function create_if_block$7(ctx) { - var div, span, t1, code, t2_value = ctx.schema.enum + "", t2; + let div; + let span; + let t1; + let code; + let t2_value = /*schema*/ ctx[6].enum + ""; + let t2; return { c() { @@ -12571,7 +12754,6 @@ code = element("code"); t2 = text(t2_value); }, - m(target, anchor) { insert(target, div, anchor); append(div, span); @@ -12579,36 +12761,47 @@ append(div, code); append(code, t2); }, - - p(changed, ctx) { - if ((changed.parameters) && t2_value !== (t2_value = ctx.schema.enum + "")) { - set_data(t2, t2_value); - } + p(ctx, dirty) { + if (dirty & /*parameters*/ 2 && t2_value !== (t2_value = /*schema*/ ctx[6].enum + "")) set_data(t2, t2_value); }, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } // (15:4) {#each parameters as { name, example, required, description, schema }} function create_each_block$3(ctx) { - var tr, td0, code, t0_value = ctx.name + "", t0, t1, td1, div, span0, t2_value = ctx.schema.type + "", t2, t3, span1, t4_value = ctx.required ? 'required' : 'optional' + "", t4, t5, td2, t6, t7, t8; + let tr; + let td0; + let code; + let t0_value = /*name*/ ctx[2] + ""; + let t0; + let t1; + let td1; + let div; + let span0; + let t2_value = /*schema*/ ctx[6].type + ""; + let t2; + let t3; + let span1; + let t4_value = (/*required*/ ctx[4] ? "required" : "optional") + ""; + let t4; + let t5; + let td2; + let t6; + let t7; + let t8; - function select_block_type(changed, ctx) { - if (ctx.description) return create_if_block_2$1; - return create_else_block; + function select_block_type(ctx, dirty) { + if (/*description*/ ctx[5]) return create_if_block_2$2; + return create_else_block$1; } - var current_block_type = select_block_type(null, ctx); - var if_block0 = current_block_type(ctx); - - var if_block1 = (ctx.example) && create_if_block_1$4(ctx); - - var if_block2 = (ctx.schema.enum) && create_if_block$7(ctx); + let current_block_type = select_block_type(ctx, -1); + let if_block0 = current_block_type(ctx); + let if_block1 = /*example*/ ctx[3] && create_if_block_1$4(ctx); + let if_block2 = /*schema*/ ctx[6].enum && create_if_block$7(ctx); return { c() { @@ -12634,11 +12827,10 @@ t8 = space(); attr(span0, "class", "tag"); attr(span1, "class", "tag"); - toggle_class(span1, "is-dark", ctx.required); - toggle_class(span1, "is-white", !ctx.required); + toggle_class(span1, "is-dark", /*required*/ ctx[4]); + toggle_class(span1, "is-white", !/*required*/ ctx[4]); attr(div, "class", "tags has-addons"); }, - m(target, anchor) { insert(target, tr, anchor); append(tr, td0); @@ -12661,39 +12853,34 @@ if (if_block2) if_block2.m(td2, null); append(tr, t8); }, + p(ctx, dirty) { + if (dirty & /*parameters*/ 2 && t0_value !== (t0_value = /*name*/ ctx[2] + "")) set_data(t0, t0_value); + if (dirty & /*parameters*/ 2 && t2_value !== (t2_value = /*schema*/ ctx[6].type + "")) set_data(t2, t2_value); + if (dirty & /*parameters*/ 2 && t4_value !== (t4_value = (/*required*/ ctx[4] ? "required" : "optional") + "")) set_data(t4, t4_value); - p(changed, ctx) { - if ((changed.parameters) && t0_value !== (t0_value = ctx.name + "")) { - set_data(t0, t0_value); + if (dirty & /*parameters*/ 2) { + toggle_class(span1, "is-dark", /*required*/ ctx[4]); } - if ((changed.parameters) && t2_value !== (t2_value = ctx.schema.type + "")) { - set_data(t2, t2_value); + if (dirty & /*parameters*/ 2) { + toggle_class(span1, "is-white", !/*required*/ ctx[4]); } - if ((changed.parameters) && t4_value !== (t4_value = ctx.required ? 'required' : 'optional' + "")) { - set_data(t4, t4_value); - } - - if (changed.parameters) { - toggle_class(span1, "is-dark", ctx.required); - toggle_class(span1, "is-white", !ctx.required); - } - - if (current_block_type === (current_block_type = select_block_type(changed, ctx)) && if_block0) { - if_block0.p(changed, ctx); + if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block0) { + if_block0.p(ctx, dirty); } else { if_block0.d(1); if_block0 = current_block_type(ctx); + if (if_block0) { if_block0.c(); if_block0.m(td2, t6); } } - if (ctx.example) { + if (/*example*/ ctx[3]) { if (if_block1) { - if_block1.p(changed, ctx); + if_block1.p(ctx, dirty); } else { if_block1 = create_if_block_1$4(ctx); if_block1.c(); @@ -12704,9 +12891,9 @@ if_block1 = null; } - if (ctx.schema.enum) { + if (/*schema*/ ctx[6].enum) { if (if_block2) { - if_block2.p(changed, ctx); + if_block2.p(ctx, dirty); } else { if_block2 = create_if_block$7(ctx); if_block2.c(); @@ -12717,12 +12904,8 @@ if_block2 = null; } }, - d(detaching) { - if (detaching) { - detach(tr); - } - + if (detaching) detach(tr); if_block0.d(); if (if_block1) if_block1.d(); if (if_block2) if_block2.d(); @@ -12731,10 +12914,14 @@ } function create_fragment$7(ctx) { - var table, thead, tr, th, t0, t1, tbody; - - let each_value = ctx.parameters; - + let table; + let thead; + let tr; + let th; + let t0; + let t1; + let tbody; + let each_value = /*parameters*/ ctx[1]; let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { @@ -12747,17 +12934,17 @@ thead = element("thead"); tr = element("tr"); th = element("th"); - t0 = text(ctx.title); + t0 = text(/*title*/ ctx[0]); t1 = space(); tbody = element("tbody"); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } + attr(th, "colspan", "3"); attr(table, "class", "table table-bordered is-bordered is-fullwidth"); }, - m(target, anchor) { insert(target, table, anchor); append(table, thead); @@ -12771,21 +12958,18 @@ each_blocks[i].m(tbody, null); } }, + p(ctx, [dirty]) { + if (dirty & /*title*/ 1) set_data(t0, /*title*/ ctx[0]); - p(changed, ctx) { - if (changed.title) { - set_data(t0, ctx.title); - } - - if (changed.parameters || changed.markdown) { - each_value = ctx.parameters; - + if (dirty & /*parameters, markdown*/ 2) { + each_value = /*parameters*/ ctx[1]; let i; + for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context$3(ctx, each_value, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); } else { each_blocks[i] = create_each_block$3(child_ctx); each_blocks[i].c(); @@ -12796,82 +12980,72 @@ for (; i < each_blocks.length; i += 1) { each_blocks[i].d(1); } + each_blocks.length = each_value.length; } }, - i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(table); - } - + if (detaching) detach(table); destroy_each(each_blocks, detaching); } }; } function instance$7($$self, $$props, $$invalidate) { - let { title, parameters } = $$props; + let { title } = $$props; + let { parameters } = $$props; $$self.$set = $$props => { - if ('title' in $$props) $$invalidate('title', title = $$props.title); - if ('parameters' in $$props) $$invalidate('parameters', parameters = $$props.parameters); + if ("title" in $$props) $$invalidate(0, title = $$props.title); + if ("parameters" in $$props) $$invalidate(1, parameters = $$props.parameters); }; - return { title, parameters }; + return [title, parameters]; } class ParameterTable extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$7, create_fragment$7, safe_not_equal, ["title", "parameters"]); + init(this, options, instance$7, create_fragment$7, safe_not_equal, { title: 0, parameters: 1 }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ParameterPanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ParameterPanel.svelte generated by Svelte v3.16.5 */ - // (10:0) {#if pathParameters.length > 0} function create_if_block_1$5(ctx) { - var current; + let current; - var parametertable = new ParameterTable({ - props: { - parameters: ctx.pathParameters, - title: "Path Parameters" - } - }); + const parametertable = new ParameterTable({ + props: { + parameters: /*pathParameters*/ ctx[0], + title: "Path Parameters" + } + }); return { c() { - parametertable.$$.fragment.c(); + create_component(parametertable.$$.fragment); }, - m(target, anchor) { mount_component(parametertable, target, anchor); current = true; }, - - p(changed, ctx) { - var parametertable_changes = {}; - if (changed.pathParameters) parametertable_changes.parameters = ctx.pathParameters; + p(ctx, dirty) { + const parametertable_changes = {}; + if (dirty & /*pathParameters*/ 1) parametertable_changes.parameters = /*pathParameters*/ ctx[0]; parametertable.$set(parametertable_changes); }, - i(local) { if (current) return; transition_in(parametertable.$$.fragment, local); - current = true; }, - o(local) { transition_out(parametertable.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(parametertable, detaching); } @@ -12880,43 +13054,37 @@ // (14:0) {#if queryParameters.length > 0} function create_if_block$8(ctx) { - var current; + let current; - var parametertable = new ParameterTable({ - props: { - parameters: ctx.queryParameters, - title: "Query Parameters" - } - }); + const parametertable = new ParameterTable({ + props: { + parameters: /*queryParameters*/ ctx[1], + title: "Query Parameters" + } + }); return { c() { - parametertable.$$.fragment.c(); + create_component(parametertable.$$.fragment); }, - m(target, anchor) { mount_component(parametertable, target, anchor); current = true; }, - - p(changed, ctx) { - var parametertable_changes = {}; - if (changed.queryParameters) parametertable_changes.parameters = ctx.queryParameters; + p(ctx, dirty) { + const parametertable_changes = {}; + if (dirty & /*queryParameters*/ 2) parametertable_changes.parameters = /*queryParameters*/ ctx[1]; parametertable.$set(parametertable_changes); }, - i(local) { if (current) return; transition_in(parametertable.$$.fragment, local); - current = true; }, - o(local) { transition_out(parametertable.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(parametertable, detaching); } @@ -12924,11 +13092,11 @@ } function create_fragment$8(ctx) { - var t, if_block1_anchor, current; - - var if_block0 = (ctx.pathParameters.length > 0) && create_if_block_1$5(ctx); - - var if_block1 = (ctx.queryParameters.length > 0) && create_if_block$8(ctx); + let t; + let if_block1_anchor; + let current; + let if_block0 = /*pathParameters*/ ctx[0].length > 0 && create_if_block_1$5(ctx); + let if_block1 = /*queryParameters*/ ctx[1].length > 0 && create_if_block$8(ctx); return { c() { @@ -12937,7 +13105,6 @@ if (if_block1) if_block1.c(); if_block1_anchor = empty(); }, - m(target, anchor) { if (if_block0) if_block0.m(target, anchor); insert(target, t, anchor); @@ -12945,11 +13112,10 @@ insert(target, if_block1_anchor, anchor); current = true; }, - - p(changed, ctx) { - if (ctx.pathParameters.length > 0) { + p(ctx, [dirty]) { + if (/*pathParameters*/ ctx[0].length > 0) { if (if_block0) { - if_block0.p(changed, ctx); + if_block0.p(ctx, dirty); transition_in(if_block0, 1); } else { if_block0 = create_if_block_1$5(ctx); @@ -12959,15 +13125,17 @@ } } else if (if_block0) { group_outros(); + transition_out(if_block0, 1, 1, () => { if_block0 = null; }); + check_outros(); } - if (ctx.queryParameters.length > 0) { + if (/*queryParameters*/ ctx[1].length > 0) { if (if_block1) { - if_block1.p(changed, ctx); + if_block1.p(ctx, dirty); transition_in(if_block1, 1); } else { if_block1 = create_if_block$8(ctx); @@ -12977,38 +13145,30 @@ } } else if (if_block1) { group_outros(); + transition_out(if_block1, 1, 1, () => { if_block1 = null; }); + check_outros(); } }, - i(local) { if (current) return; transition_in(if_block0); transition_in(if_block1); current = true; }, - o(local) { transition_out(if_block0); transition_out(if_block1); current = false; }, - d(detaching) { if (if_block0) if_block0.d(detaching); - - if (detaching) { - detach(t); - } - + if (detaching) detach(t); if (if_block1) if_block1.d(detaching); - - if (detaching) { - detach(if_block1_anchor); - } + if (detaching) detach(if_block1_anchor); } }; } @@ -13017,137 +13177,141 @@ let { parameters = [] } = $$props; $$self.$set = $$props => { - if ('parameters' in $$props) $$invalidate('parameters', parameters = $$props.parameters); + if ("parameters" in $$props) $$invalidate(2, parameters = $$props.parameters); }; - let pathParameters, queryParameters; + let pathParameters; + let queryParameters; - $$self.$$.update = ($$dirty = { parameters: 1 }) => { - if ($$dirty.parameters) { $$invalidate('pathParameters', pathParameters = parameters.filter(param => param.location === "path")); } - if ($$dirty.parameters) { $$invalidate('queryParameters', queryParameters = parameters.filter(param => param.location === "query")); } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*parameters*/ 4) { + $$invalidate(0, pathParameters = parameters.filter(param => param.location === "path")); + } + + if ($$self.$$.dirty & /*parameters*/ 4) { + $$invalidate(1, queryParameters = parameters.filter(param => param.location === "query")); + } }; - return { - parameters, - pathParameters, - queryParameters - }; + return [pathParameters, queryParameters, parameters]; } class ParameterPanel extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$8, create_fragment$8, safe_not_equal, ["parameters"]); + init(this, options, instance$8, create_fragment$8, safe_not_equal, { parameters: 2 }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/components/LoginButton.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/components/LoginButton.svelte generated by Svelte v3.16.5 */ function create_fragment$9(ctx) { - var a, span0, t, span1; + let a; + let span0; + let t0; + let span1; return { c() { a = element("a"); span0 = element("span"); span0.innerHTML = ``; - t = space(); + t0 = space(); span1 = element("span"); span1.textContent = "Login"; attr(span0, "class", "icon"); - attr(a, "href", ctx.authorizeUrl); + attr(a, "href", /*authorizeUrl*/ ctx[1]); attr(a, "class", "button is-dark is-rounded"); - toggle_class(a, "is-fullwidth", ctx.fullWidth); + toggle_class(a, "is-fullwidth", /*fullWidth*/ ctx[0]); }, - m(target, anchor) { insert(target, a, anchor); append(a, span0); - append(a, t); + append(a, t0); append(a, span1); }, - - p(changed, ctx) { - if (changed.authorizeUrl) { - attr(a, "href", ctx.authorizeUrl); + p(ctx, [dirty]) { + if (dirty & /*authorizeUrl*/ 2) { + attr(a, "href", /*authorizeUrl*/ ctx[1]); } - if (changed.fullWidth) { - toggle_class(a, "is-fullwidth", ctx.fullWidth); + if (dirty & /*fullWidth*/ 1) { + toggle_class(a, "is-fullwidth", /*fullWidth*/ ctx[0]); } }, - i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(a); - } + if (detaching) detach(a); } }; } function instance$9($$self, $$props, $$invalidate) { - let { authOptions, fullWidth } = $$props; + let { authOptions } = $$props; + let { fullWidth } = $$props; $$self.$set = $$props => { - if ('authOptions' in $$props) $$invalidate('authOptions', authOptions = $$props.authOptions); - if ('fullWidth' in $$props) $$invalidate('fullWidth', fullWidth = $$props.fullWidth); + if ("authOptions" in $$props) $$invalidate(2, authOptions = $$props.authOptions); + if ("fullWidth" in $$props) $$invalidate(0, fullWidth = $$props.fullWidth); }; - let authorizeParams, authorizeUrl; + let authorizeParams; + let authorizeUrl; - $$self.$$.update = ($$dirty = { authOptions: 1, authorizeParams: 1 }) => { - if ($$dirty.authOptions) { $$invalidate('authorizeParams', authorizeParams = querystringify_1.stringify( - { - client_id: authOptions.clientId, - redirect_uri: authOptions.callbackUrl, - response_type: "code", - scope: authOptions.scopes || "" - }, - true - )); } - if ($$dirty.authOptions || $$dirty.authorizeParams) { $$invalidate('authorizeUrl', authorizeUrl = `${authOptions.authorizeUrl}${authorizeParams}`); } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*authOptions*/ 4) { + $$invalidate(3, authorizeParams = querystringify_1.stringify( + { + client_id: authOptions.clientId, + redirect_uri: authOptions.callbackUrl, + response_type: "code", + scope: authOptions.scopes || "" + }, + true + )); + } + + if ($$self.$$.dirty & /*authOptions, authorizeParams*/ 12) { + $$invalidate(1, authorizeUrl = `${authOptions.authorizeUrl}${authorizeParams}`); + } }; - return { authOptions, fullWidth, authorizeUrl }; + return [fullWidth, authorizeUrl, authOptions]; } class LoginButton extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$9, create_fragment$9, safe_not_equal, ["authOptions", "fullWidth"]); + init(this, options, instance$9, create_fragment$9, safe_not_equal, { authOptions: 2, fullWidth: 0 }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/components/LogoutButton.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/components/LogoutButton.svelte generated by Svelte v3.16.5 */ function create_fragment$a(ctx) { - var a, dispose; + let a; + let dispose; return { c() { a = element("a"); - a.innerHTML = ` Logout`; + + a.innerHTML = ` + Logout`; + attr(a, "href", "javascript:void(0)"); attr(a, "class", "button is-light"); - dispose = listen(a, "click", ctx.handleClick); + dispose = listen(a, "click", /*handleClick*/ ctx[0]); }, - m(target, anchor) { insert(target, a, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(a); - } - + if (detaching) detach(a); dispose(); } }; @@ -13155,62 +13319,57 @@ function instance$a($$self, $$props, $$invalidate) { let $env; + component_subscribe($$self, env, $$value => $$invalidate(1, $env = $$value)); - component_subscribe($$self, env, $$value => { $env = $$value; $$invalidate('$env', $env); }); + function handleClick() { + auth.remove($env); + removeToken($env); + removeRefreshToken($env); + } - - - function handleClick() { - auth.remove($env); - removeToken($env); - removeRefreshToken($env); - } - - return { handleClick }; + return [handleClick]; } class LogoutButton extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$a, create_fragment$a, safe_not_equal, []); + init(this, options, instance$a, create_fragment$a, safe_not_equal, {}); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/SelectorPanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/SelectorPanel.svelte generated by Svelte v3.16.5 */ function add_css$3() { var style = element("style"); - style.id = 'svelte-cjzzpf-style'; + style.id = "svelte-cjzzpf-style"; style.textContent = ".icon-info.svelte-cjzzpf{cursor:pointer}.content.svelte-cjzzpf{padding:1rem 1.5rem}"; append(document.head, style); } function get_each_context$4(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.envName = list[i]; + const child_ctx = ctx.slice(); + child_ctx[8] = list[i]; return child_ctx; } // (44:0) {#if isAuth(environment, 'oauth2')} function create_if_block_1$6(ctx) { - var show_if, current_block_type_index, if_block, if_block_anchor, current; + let show_if; + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block_2$3, create_if_block_3$1, create_else_block_1]; + const if_blocks = []; - var if_block_creators = [ - create_if_block_2$2, - create_if_block_3, - create_else_block_1 - ]; - - var if_blocks = []; - - function select_block_type(changed, ctx) { - if (ctx.authenticating) return 0; - if ((show_if == null) || changed.$auth || changed.$env) show_if = !!(ctx.$auth.includes(ctx.$env)); + function select_block_type(ctx, dirty) { + if (/*authenticating*/ ctx[1]) return 0; + if (dirty & /*$auth, $env*/ 48) show_if = !!/*$auth*/ ctx[5].includes(/*$env*/ ctx[4]); if (show_if) return 1; return 2; } - current_block_type_index = select_block_type(null, ctx); + current_block_type_index = select_block_type(ctx, -1); if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); return { @@ -13218,73 +13377,75 @@ if_block.c(); if_block_anchor = empty(); }, - m(target, anchor) { if_blocks[current_block_type_index].m(target, anchor); insert(target, if_block_anchor, anchor); current = true; }, + p(ctx, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx, dirty); - p(changed, ctx) { - var previous_block_index = current_block_type_index; - current_block_type_index = select_block_type(changed, ctx); if (current_block_type_index === previous_block_index) { - if_blocks[current_block_type_index].p(changed, ctx); + if_blocks[current_block_type_index].p(ctx, dirty); } else { group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { if_blocks[previous_block_index] = null; }); - check_outros(); + check_outros(); if_block = if_blocks[current_block_type_index]; + if (!if_block) { if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); if_block.c(); } + transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); } }, - i(local) { if (current) return; transition_in(if_block); current = true; }, - o(local) { transition_out(if_block); current = false; }, - d(detaching) { if_blocks[current_block_type_index].d(detaching); - - if (detaching) { - detach(if_block_anchor); - } + if (detaching) detach(if_block_anchor); } }; } // (59:2) {:else} function create_else_block_1(ctx) { - var div1, div0, p, current; + let div1; + let div0; + let p; + let current; - var loginbutton = new LoginButton({ props: { authOptions: ctx.environment.auth.options } }); + const loginbutton = new LoginButton({ + props: { + authOptions: /*environment*/ ctx[3].auth.options + } + }); return { c() { div1 = element("div"); div0 = element("div"); p = element("p"); - loginbutton.$$.fragment.c(); + create_component(loginbutton.$$.fragment); attr(p, "class", "control"); attr(div0, "class", "field is-grouped"); attr(div1, "class", "navbar-item"); }, - m(target, anchor) { insert(target, div1, anchor); append(div1, div0); @@ -13292,52 +13453,45 @@ mount_component(loginbutton, p, null); current = true; }, - - p(changed, ctx) { - var loginbutton_changes = {}; - if (changed.environment) loginbutton_changes.authOptions = ctx.environment.auth.options; + p(ctx, dirty) { + const loginbutton_changes = {}; + if (dirty & /*environment*/ 8) loginbutton_changes.authOptions = /*environment*/ ctx[3].auth.options; loginbutton.$set(loginbutton_changes); }, - i(local) { if (current) return; transition_in(loginbutton.$$.fragment, local); - current = true; }, - o(local) { transition_out(loginbutton.$$.fragment, local); current = false; }, - d(detaching) { - if (detaching) { - detach(div1); - } - + if (detaching) detach(div1); destroy_component(loginbutton); } }; } // (51:33) - function create_if_block_3(ctx) { - var div1, div0, p, current; - - var logoutbutton = new LogoutButton({}); + function create_if_block_3$1(ctx) { + let div1; + let div0; + let p; + let current; + const logoutbutton = new LogoutButton({}); return { c() { div1 = element("div"); div0 = element("div"); p = element("p"); - logoutbutton.$$.fragment.c(); + create_component(logoutbutton.$$.fragment); attr(p, "class", "control"); attr(div0, "class", "field is-grouped"); attr(div1, "class", "navbar-item"); }, - m(target, anchor) { insert(target, div1, anchor); append(div1, div0); @@ -13345,34 +13499,26 @@ mount_component(logoutbutton, p, null); current = true; }, - p: noop, - i(local) { if (current) return; transition_in(logoutbutton.$$.fragment, local); - current = true; }, - o(local) { transition_out(logoutbutton.$$.fragment, local); current = false; }, - d(detaching) { - if (detaching) { - detach(div1); - } - + if (detaching) detach(div1); destroy_component(logoutbutton); } }; } // (45:2) {#if authenticating} - function create_if_block_2$2(ctx) { - var div; + function create_if_block_2$3(ctx) { + let div; return { c() { @@ -13380,67 +13526,59 @@ div.innerHTML = ``; attr(div, "class", "navbar-item"); }, - m(target, anchor) { insert(target, div, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } // (76:4) {#each Object.keys(environments) as envName} function create_each_block$4(ctx) { - var a, t0_value = ctx.envName + "", t0, t1, a_data_name_value, dispose; + let a; + let t0_value = /*envName*/ ctx[8] + ""; + let t0; + let t1; + let a_data_name_value; + let dispose; return { c() { a = element("a"); t0 = text(t0_value); t1 = space(); - attr(a, "data-name", a_data_name_value = ctx.envName); + attr(a, "data-name", a_data_name_value = /*envName*/ ctx[8]); attr(a, "href", "javascript:void(0)"); attr(a, "class", "navbar-item"); - dispose = listen(a, "click", ctx.handleClick); + dispose = listen(a, "click", /*handleClick*/ ctx[6]); }, - m(target, anchor) { insert(target, a, anchor); append(a, t0); append(a, t1); }, + p(ctx, dirty) { + if (dirty & /*environments*/ 1 && t0_value !== (t0_value = /*envName*/ ctx[8] + "")) set_data(t0, t0_value); - p(changed, ctx) { - if ((changed.environments) && t0_value !== (t0_value = ctx.envName + "")) { - set_data(t0, t0_value); - } - - if ((changed.environments) && a_data_name_value !== (a_data_name_value = ctx.envName)) { + if (dirty & /*environments*/ 1 && a_data_name_value !== (a_data_name_value = /*envName*/ ctx[8])) { attr(a, "data-name", a_data_name_value); } }, - d(detaching) { - if (detaching) { - detach(a); - } - + if (detaching) detach(a); dispose(); } }; } // (102:8) {:else} - function create_else_block$1(ctx) { - var span; + function create_else_block$2(ctx) { + let span; return { c() { @@ -13448,24 +13586,21 @@ span.textContent = "None"; attr(span, "class", "is-capitalized"); }, - m(target, anchor) { insert(target, span, anchor); }, - p: noop, - d(detaching) { - if (detaching) { - detach(span); - } + if (detaching) detach(span); } }; } // (100:8) {#if environment.auth} function create_if_block$9(ctx) { - var span, t_value = ctx.environment.auth.name + "", t; + let span; + let t_value = /*environment*/ ctx[3].auth.name + ""; + let t; return { c() { @@ -13473,46 +13608,57 @@ t = text(t_value); attr(span, "class", "is-capitalized"); }, - m(target, anchor) { insert(target, span, anchor); append(span, t); }, - - p(changed, ctx) { - if ((changed.environment) && t_value !== (t_value = ctx.environment.auth.name + "")) { - set_data(t, t_value); - } + p(ctx, dirty) { + if (dirty & /*environment*/ 8 && t_value !== (t_value = /*environment*/ ctx[3].auth.name + "")) set_data(t, t_value); }, - d(detaching) { - if (detaching) { - detach(span); - } + if (detaching) detach(span); } }; } function create_fragment$b(ctx) { - var show_if = isAuth(ctx.environment, 'oauth2'), t0, div1, a0, t1, t2, div0, t3, div4, a1, t4, div3, div2, p0, t5, t6_value = ctx.environment.url + "", t6, t7, p1, t8, current, dispose; - - var if_block0 = (show_if) && create_if_block_1$6(ctx); - - let each_value = Object.keys(ctx.environments); - + let show_if = isAuth(/*environment*/ ctx[3], "oauth2"); + let t0; + let div1; + let a0; + let t1; + let t2; + let div0; + let t3; + let div4; + let a1; + let t4; + let div3; + let div2; + let p0; + let t5; + let t6_value = /*environment*/ ctx[3].url + ""; + let t6; + let t7; + let p1; + let t8; + let current; + let dispose; + let if_block0 = show_if && create_if_block_1$6(ctx); + let each_value = Object.keys(/*environments*/ ctx[0]); let each_blocks = []; - for (let i_1 = 0; i_1 < each_value.length; i_1 += 1) { - each_blocks[i_1] = create_each_block$4(get_each_context$4(ctx, each_value, i_1)); + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i)); } - function select_block_type_1(changed, ctx) { - if (ctx.environment.auth) return create_if_block$9; - return create_else_block$1; + function select_block_type_1(ctx, dirty) { + if (/*environment*/ ctx[3].auth) return create_if_block$9; + return create_else_block$2; } - var current_block_type = select_block_type_1(null, ctx); - var if_block1 = current_block_type(ctx); + let current_block_type = select_block_type_1(ctx, -1); + let if_block1 = current_block_type(ctx); return { c() { @@ -13520,12 +13666,12 @@ t0 = space(); div1 = element("div"); a0 = element("a"); - t1 = text(ctx.$env); + t1 = text(/*$env*/ ctx[4]); t2 = space(); div0 = element("div"); - for (let i_1 = 0; i_1 < each_blocks.length; i_1 += 1) { - each_blocks[i_1].c(); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); } t3 = space(); @@ -13546,15 +13692,14 @@ attr(a0, "class", "navbar-link"); attr(div0, "class", "navbar-dropdown is-right"); attr(div1, "class", "navbar-item has-dropdown is-capitalized"); - toggle_class(div1, "is-active", ctx.show); + toggle_class(div1, "is-active", /*show*/ ctx[2]); attr(a1, "href", "javascript:void(0)"); attr(a1, "class", "navbar-link is-arrowless"); attr(div2, "class", "content svelte-cjzzpf"); attr(div3, "class", "navbar-dropdown is-right"); attr(div4, "class", "navbar-item has-dropdown is-hoverable"); - dispose = listen(a0, "click", ctx.toggleClick); + dispose = listen(a0, "click", /*toggleClick*/ ctx[7]); }, - m(target, anchor) { if (if_block0) if_block0.m(target, anchor); insert(target, t0, anchor); @@ -13564,8 +13709,8 @@ append(div1, t2); append(div1, div0); - for (let i_1 = 0; i_1 < each_blocks.length; i_1 += 1) { - each_blocks[i_1].m(div0, null); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].m(div0, null); } insert(target, t3, anchor); @@ -13583,13 +13728,12 @@ if_block1.m(p1, null); current = true; }, - - p(changed, ctx) { - if (changed.environment) show_if = isAuth(ctx.environment, 'oauth2'); + p(ctx, [dirty]) { + if (dirty & /*environment*/ 8) show_if = isAuth(/*environment*/ ctx[3], "oauth2"); if (show_if) { if (if_block0) { - if_block0.p(changed, ctx); + if_block0.p(ctx, dirty); transition_in(if_block0, 1); } else { if_block0 = create_if_block_1$6(ctx); @@ -13599,84 +13743,73 @@ } } else if (if_block0) { group_outros(); + transition_out(if_block0, 1, 1, () => { if_block0 = null; }); + check_outros(); } - if (!current || changed.$env) { - set_data(t1, ctx.$env); - } + if (!current || dirty & /*$env*/ 16) set_data(t1, /*$env*/ ctx[4]); - if (changed.environments) { - each_value = Object.keys(ctx.environments); + if (dirty & /*Object, environments, handleClick*/ 65) { + each_value = Object.keys(/*environments*/ ctx[0]); + let i; - let i_1; - for (i_1 = 0; i_1 < each_value.length; i_1 += 1) { - const child_ctx = get_each_context$4(ctx, each_value, i_1); + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context$4(ctx, each_value, i); - if (each_blocks[i_1]) { - each_blocks[i_1].p(changed, child_ctx); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); } else { - each_blocks[i_1] = create_each_block$4(child_ctx); - each_blocks[i_1].c(); - each_blocks[i_1].m(div0, null); + each_blocks[i] = create_each_block$4(child_ctx); + each_blocks[i].c(); + each_blocks[i].m(div0, null); } } - for (; i_1 < each_blocks.length; i_1 += 1) { - each_blocks[i_1].d(1); + for (; i < each_blocks.length; i += 1) { + each_blocks[i].d(1); } + each_blocks.length = each_value.length; } - if (changed.show) { - toggle_class(div1, "is-active", ctx.show); + if (dirty & /*show*/ 4) { + toggle_class(div1, "is-active", /*show*/ ctx[2]); } - if ((!current || changed.environment) && t6_value !== (t6_value = ctx.environment.url + "")) { - set_data(t6, t6_value); - } + if ((!current || dirty & /*environment*/ 8) && t6_value !== (t6_value = /*environment*/ ctx[3].url + "")) set_data(t6, t6_value); - if (current_block_type === (current_block_type = select_block_type_1(changed, ctx)) && if_block1) { - if_block1.p(changed, ctx); + if (current_block_type === (current_block_type = select_block_type_1(ctx, dirty)) && if_block1) { + if_block1.p(ctx, dirty); } else { if_block1.d(1); if_block1 = current_block_type(ctx); + if (if_block1) { if_block1.c(); if_block1.m(p1, null); } } }, - i(local) { if (current) return; transition_in(if_block0); current = true; }, - o(local) { transition_out(if_block0); current = false; }, - d(detaching) { if (if_block0) if_block0.d(detaching); - - if (detaching) { - detach(t0); - detach(div1); - } - + if (detaching) detach(t0); + if (detaching) detach(div1); destroy_each(each_blocks, detaching); - - if (detaching) { - detach(t3); - detach(div4); - } - + if (detaching) detach(t3); + if (detaching) detach(div4); if_block1.d(); dispose(); } @@ -13684,218 +13817,210 @@ } function instance$b($$self, $$props, $$invalidate) { - let $env, $auth; + let $env; + let $auth; + component_subscribe($$self, env, $$value => $$invalidate(4, $env = $$value)); + component_subscribe($$self, auth, $$value => $$invalidate(5, $auth = $$value)); + let { environments } = $$props; + let { authenticating } = $$props; + let show = false; - component_subscribe($$self, env, $$value => { $env = $$value; $$invalidate('$env', $env); }); - component_subscribe($$self, auth, $$value => { $auth = $$value; $$invalidate('$auth', $auth); }); + function handleClick(event) { + $$invalidate(2, show = false); + const envName = event.target.dataset["name"]; + env.set(envName); + const authToken = getToken($env); - + if (authToken) { + auth.add(envName); + token.set(authToken); + } + } - let { environments, authenticating } = $$props; - - let show = false; - - function handleClick(event) { - $$invalidate('show', show = false); - const envName = event.target.dataset["name"]; - - env.set(envName); - - const authToken = getToken($env); - - if (authToken) { - auth.add(envName); - token.set(authToken); - } - } - - function toggleClick() { - $$invalidate('show', show = !show); - } + function toggleClick() { + $$invalidate(2, show = !show); + } $$self.$set = $$props => { - if ('environments' in $$props) $$invalidate('environments', environments = $$props.environments); - if ('authenticating' in $$props) $$invalidate('authenticating', authenticating = $$props.authenticating); + if ("environments" in $$props) $$invalidate(0, environments = $$props.environments); + if ("authenticating" in $$props) $$invalidate(1, authenticating = $$props.authenticating); }; let environment; - $$self.$$.update = ($$dirty = { environments: 1, $env: 1 }) => { - if ($$dirty.environments || $$dirty.$env) { $$invalidate('environment', environment = environments[$env]); } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*environments, $env*/ 17) { + $$invalidate(3, environment = environments[$env]); + } }; - return { + return [ environments, authenticating, show, - handleClick, - toggleClick, environment, $env, - $auth - }; + $auth, + handleClick, + toggleClick + ]; } class SelectorPanel extends SvelteComponent { constructor(options) { super(); if (!document.getElementById("svelte-cjzzpf-style")) add_css$3(); - init(this, options, instance$b, create_fragment$b, safe_not_equal, ["environments", "authenticating"]); + init(this, options, instance$b, create_fragment$b, safe_not_equal, { environments: 0, authenticating: 1 }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/components/ToggleIcon.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/components/ToggleIcon.svelte generated by Svelte v3.16.5 */ function add_css$4() { var style = element("style"); - style.id = 'svelte-o7a14x-style'; + style.id = "svelte-o7a14x-style"; style.textContent = ".toggle-icon.svelte-o7a14x{cursor:pointer}"; append(document.head, style); } function create_fragment$c(ctx) { - var span, i, span_class_value, dispose; + let span; + let i; + let span_class_value; + let dispose; return { c() { span = element("span"); i = element("i"); attr(i, "class", "fas"); - toggle_class(i, "fa-chevron-up", !ctx.show); - toggle_class(i, "fa-chevron-down", ctx.show); - attr(span, "class", span_class_value = "toggle-icon icon " + ctx.additionalClass + " svelte-o7a14x"); - toggle_class(span, "has-text-grey", !ctx.dark); - dispose = listen(span, "click", ctx.toggle); + toggle_class(i, "fa-chevron-up", !/*show*/ ctx[0]); + toggle_class(i, "fa-chevron-down", /*show*/ ctx[0]); + attr(span, "class", span_class_value = "toggle-icon icon " + /*additionalClass*/ ctx[2] + " svelte-o7a14x"); + toggle_class(span, "has-text-grey", !/*dark*/ ctx[1]); + dispose = listen(span, "click", /*toggle*/ ctx[3]); }, - m(target, anchor) { insert(target, span, anchor); append(span, i); }, - - p(changed, ctx) { - if (changed.show) { - toggle_class(i, "fa-chevron-up", !ctx.show); - toggle_class(i, "fa-chevron-down", ctx.show); + p(ctx, [dirty]) { + if (dirty & /*show*/ 1) { + toggle_class(i, "fa-chevron-up", !/*show*/ ctx[0]); } - if ((changed.additionalClass) && span_class_value !== (span_class_value = "toggle-icon icon " + ctx.additionalClass + " svelte-o7a14x")) { + if (dirty & /*show*/ 1) { + toggle_class(i, "fa-chevron-down", /*show*/ ctx[0]); + } + + if (dirty & /*additionalClass*/ 4 && span_class_value !== (span_class_value = "toggle-icon icon " + /*additionalClass*/ ctx[2] + " svelte-o7a14x")) { attr(span, "class", span_class_value); } - if ((changed.additionalClass || changed.dark)) { - toggle_class(span, "has-text-grey", !ctx.dark); + if (dirty & /*additionalClass, dark*/ 6) { + toggle_class(span, "has-text-grey", !/*dark*/ ctx[1]); } }, - i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(span); - } - + if (detaching) detach(span); dispose(); } }; } function instance$c($$self, $$props, $$invalidate) { - let { dark = false, show = false, additionalClass = "", handleClick } = $$props; + let { dark = false } = $$props; + let { show = false } = $$props; + let { additionalClass = "" } = $$props; + let { handleClick } = $$props; - function toggle(event) { - $$invalidate('show', show = !show); - handleClick(event); - } + function toggle(event) { + $$invalidate(0, show = !show); + handleClick(event); + } $$self.$set = $$props => { - if ('dark' in $$props) $$invalidate('dark', dark = $$props.dark); - if ('show' in $$props) $$invalidate('show', show = $$props.show); - if ('additionalClass' in $$props) $$invalidate('additionalClass', additionalClass = $$props.additionalClass); - if ('handleClick' in $$props) $$invalidate('handleClick', handleClick = $$props.handleClick); + if ("dark" in $$props) $$invalidate(1, dark = $$props.dark); + if ("show" in $$props) $$invalidate(0, show = $$props.show); + if ("additionalClass" in $$props) $$invalidate(2, additionalClass = $$props.additionalClass); + if ("handleClick" in $$props) $$invalidate(4, handleClick = $$props.handleClick); }; - return { - dark, - show, - additionalClass, - handleClick, - toggle - }; + return [show, dark, additionalClass, toggle, handleClick]; } class ToggleIcon extends SvelteComponent { constructor(options) { super(); if (!document.getElementById("svelte-o7a14x-style")) add_css$4(); - init(this, options, instance$c, create_fragment$c, safe_not_equal, ["dark", "show", "additionalClass", "handleClick"]); + + init(this, options, instance$c, create_fragment$c, safe_not_equal, { + dark: 1, + show: 0, + additionalClass: 2, + handleClick: 4 + }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/CollapsiblePanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/CollapsiblePanel.svelte generated by Svelte v3.16.5 */ function add_css$5() { var style = element("style"); - style.id = 'svelte-ymjevm-style'; - style.textContent = ".panel-section.svelte-ymjevm{padding:1em;border:1px solid #dbdbdb;border-top:none}.panel-button.svelte-ymjevm{border-radius:4px}.panel-dark.svelte-ymjevm{border:1px solid #363636}"; + style.id = "svelte-1hkyt70-style"; + style.textContent = ".panel-section.svelte-1hkyt70{padding:1em;border:1px solid #dbdbdb;border-top:none}.panel-button.svelte-1hkyt70{border-radius:4px}.panel-dark.svelte-1hkyt70{border:1px solid #363636}.panel-section.is-darkmode.svelte-1hkyt70{background-color:#222 !important;border-color:#333}"; append(document.head, style); } - const get_body_slot_changes = () => ({}); - const get_body_slot_context = () => ({}); - - const get_heading_slot_changes = () => ({}); - const get_heading_slot_context = () => ({}); + const get_body_slot_changes = dirty => ({}); + const get_body_slot_context = ctx => ({}); + const get_heading_slot_changes = dirty => ({}); + const get_heading_slot_context = ctx => ({}); function create_fragment$d(ctx) { - var div2, div0, t0, t1, div1, current; + let div2; + let div0; + let t0; + let t1; + let div1; + let current; + const heading_slot_template = /*$$slots*/ ctx[4].heading; + const heading_slot = create_slot(heading_slot_template, ctx, /*$$scope*/ ctx[3], get_heading_slot_context); - const heading_slot_template = ctx.$$slots.heading; - const heading_slot = create_slot(heading_slot_template, ctx, get_heading_slot_context); + const toggleicon = new ToggleIcon({ + props: { + dark: /*dark*/ ctx[1], + show: /*show*/ ctx[0], + additionalClass: "is-pulled-right", + handleClick: /*func*/ ctx[5] + } + }); - var toggleicon = new ToggleIcon({ - props: { - dark: ctx.dark, - show: ctx.show, - additionalClass: "is-pulled-right", - handleClick: ctx.func - } - }); - - const body_slot_template = ctx.$$slots.body; - const body_slot = create_slot(body_slot_template, ctx, get_body_slot_context); + const body_slot_template = /*$$slots*/ ctx[4].body; + const body_slot = create_slot(body_slot_template, ctx, /*$$scope*/ ctx[3], get_body_slot_context); return { c() { div2 = element("div"); div0 = element("div"); - if (heading_slot) heading_slot.c(); t0 = space(); - toggleicon.$$.fragment.c(); + create_component(toggleicon.$$.fragment); t1 = space(); div1 = element("div"); - if (body_slot) body_slot.c(); - - attr(div0, "class", "panel-heading svelte-ymjevm"); - toggle_class(div0, "has-background-dark", ctx.dark); - toggle_class(div0, "has-text-white", ctx.dark); - toggle_class(div0, "panel-dark", ctx.dark); - toggle_class(div0, "panel-button", !ctx.show); - - attr(div1, "class", "panel-section has-background-white svelte-ymjevm"); - toggle_class(div1, "is-hidden", !ctx.show); + attr(div0, "class", "panel-heading svelte-1hkyt70"); + toggle_class(div0, "has-background-dark", /*dark*/ ctx[1]); + toggle_class(div0, "has-text-white", /*dark*/ ctx[1]); + toggle_class(div0, "panel-dark", /*dark*/ ctx[1]); + toggle_class(div0, "panel-button", !/*show*/ ctx[0]); + attr(div1, "class", "panel-section has-background-white svelte-1hkyt70"); + toggle_class(div1, "is-hidden", !/*show*/ ctx[0]); + toggle_class(div1, "is-darkmode", /*isDarkmode*/ ctx[2]); attr(div2, "class", "panel"); }, - - l(nodes) { - if (heading_slot) heading_slot.l(div0_nodes); - - if (body_slot) body_slot.l(div1_nodes); - }, - m(target, anchor) { insert(target, div2, anchor); append(div2, div0); @@ -13915,109 +14040,115 @@ current = true; }, - - p(changed, ctx) { - if (heading_slot && heading_slot.p && changed.$$scope) { - heading_slot.p( - get_slot_changes(heading_slot_template, ctx, changed, get_heading_slot_changes), - get_slot_context(heading_slot_template, ctx, get_heading_slot_context) - ); + p(ctx, [dirty]) { + if (heading_slot && heading_slot.p && dirty & /*$$scope*/ 8) { + heading_slot.p(get_slot_context(heading_slot_template, ctx, /*$$scope*/ ctx[3], get_heading_slot_context), get_slot_changes(heading_slot_template, /*$$scope*/ ctx[3], dirty, get_heading_slot_changes)); } - var toggleicon_changes = {}; - if (changed.dark) toggleicon_changes.dark = ctx.dark; - if (changed.show) toggleicon_changes.show = ctx.show; - if (changed.show) toggleicon_changes.handleClick = ctx.func; + const toggleicon_changes = {}; + if (dirty & /*dark*/ 2) toggleicon_changes.dark = /*dark*/ ctx[1]; + if (dirty & /*show*/ 1) toggleicon_changes.show = /*show*/ ctx[0]; + if (dirty & /*show*/ 1) toggleicon_changes.handleClick = /*func*/ ctx[5]; toggleicon.$set(toggleicon_changes); - if (changed.dark) { - toggle_class(div0, "has-background-dark", ctx.dark); - toggle_class(div0, "has-text-white", ctx.dark); - toggle_class(div0, "panel-dark", ctx.dark); + if (dirty & /*dark*/ 2) { + toggle_class(div0, "has-background-dark", /*dark*/ ctx[1]); } - if (changed.show) { - toggle_class(div0, "panel-button", !ctx.show); + if (dirty & /*dark*/ 2) { + toggle_class(div0, "has-text-white", /*dark*/ ctx[1]); } - if (body_slot && body_slot.p && changed.$$scope) { - body_slot.p( - get_slot_changes(body_slot_template, ctx, changed, get_body_slot_changes), - get_slot_context(body_slot_template, ctx, get_body_slot_context) - ); + if (dirty & /*dark*/ 2) { + toggle_class(div0, "panel-dark", /*dark*/ ctx[1]); } - if (changed.show) { - toggle_class(div1, "is-hidden", !ctx.show); + if (dirty & /*show*/ 1) { + toggle_class(div0, "panel-button", !/*show*/ ctx[0]); + } + + if (body_slot && body_slot.p && dirty & /*$$scope*/ 8) { + body_slot.p(get_slot_context(body_slot_template, ctx, /*$$scope*/ ctx[3], get_body_slot_context), get_slot_changes(body_slot_template, /*$$scope*/ ctx[3], dirty, get_body_slot_changes)); + } + + if (dirty & /*show*/ 1) { + toggle_class(div1, "is-hidden", !/*show*/ ctx[0]); + } + + if (dirty & /*isDarkmode*/ 4) { + toggle_class(div1, "is-darkmode", /*isDarkmode*/ ctx[2]); } }, - i(local) { if (current) return; transition_in(heading_slot, local); - transition_in(toggleicon.$$.fragment, local); - transition_in(body_slot, local); current = true; }, - o(local) { transition_out(heading_slot, local); transition_out(toggleicon.$$.fragment, local); transition_out(body_slot, local); current = false; }, - d(detaching) { - if (detaching) { - detach(div2); - } - + if (detaching) detach(div2); if (heading_slot) heading_slot.d(detaching); - destroy_component(toggleicon); - if (body_slot) body_slot.d(detaching); } }; } function instance$d($$self, $$props, $$invalidate) { - let { dark = false, show = false } = $$props; - + let { dark = false } = $$props; + let { show = false } = $$props; + let { isDarkmode } = $$props; let { $$slots = {}, $$scope } = $$props; - - const func = () => ($$invalidate('show', show = !show)); + const func = () => $$invalidate(0, show = !show); $$self.$set = $$props => { - if ('dark' in $$props) $$invalidate('dark', dark = $$props.dark); - if ('show' in $$props) $$invalidate('show', show = $$props.show); - if ('$$scope' in $$props) $$invalidate('$$scope', $$scope = $$props.$$scope); + if ("dark" in $$props) $$invalidate(1, dark = $$props.dark); + if ("show" in $$props) $$invalidate(0, show = $$props.show); + if ("isDarkmode" in $$props) $$invalidate(2, isDarkmode = $$props.isDarkmode); + if ("$$scope" in $$props) $$invalidate(3, $$scope = $$props.$$scope); }; - return { dark, show, func, $$slots, $$scope }; + return [show, dark, isDarkmode, $$scope, $$slots, func]; } class CollapsiblePanel extends SvelteComponent { constructor(options) { super(); - if (!document.getElementById("svelte-ymjevm-style")) add_css$5(); - init(this, options, instance$d, create_fragment$d, safe_not_equal, ["dark", "show"]); + if (!document.getElementById("svelte-1hkyt70-style")) add_css$5(); + init(this, options, instance$d, create_fragment$d, safe_not_equal, { dark: 1, show: 0, isDarkmode: 2 }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/components/FieldDisabled.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/components/FieldDisabled.svelte generated by Svelte v3.16.5 */ function add_css$6() { var style = element("style"); - style.id = 'svelte-a7ak6u-style'; + style.id = "svelte-a7ak6u-style"; style.textContent = ".control-switch.svelte-a7ak6u{padding-top:0.4rem}.has-border.svelte-a7ak6u{border-color:#dbdbdb}"; append(document.head, style); } function create_fragment$e(ctx) { - var div, p0, input0, input0_id_value, t0, label, label_for_value, t1, p1, input1, t2, p2, input2; + let div; + let p0; + let input0; + let input0_id_value; + let t0; + let label; + let label_for_value; + let t1; + let p1; + let input1; + let t2; + let p2; + let input2; return { c() { @@ -14033,25 +14164,24 @@ p2 = element("p"); input2 = element("input"); attr(input0, "class", "switch is-rounded is-success"); - attr(input0, "id", input0_id_value = "h-" + ctx.name); + attr(input0, "id", input0_id_value = "h-" + /*name*/ ctx[0]); attr(input0, "type", "checkbox"); input0.checked = true; input0.disabled = true; - attr(label, "for", label_for_value = "h-" + ctx.name); + attr(label, "for", label_for_value = "h-" + /*name*/ ctx[0]); attr(p0, "class", "control control-switch svelte-a7ak6u"); attr(input1, "class", "input is-rounded has-border svelte-a7ak6u"); attr(input1, "type", "text"); - attr(input1, "placeholder", ctx.placeholder); + attr(input1, "placeholder", /*placeholder*/ ctx[1]); input1.disabled = true; attr(p1, "class", "control"); attr(input2, "class", "input is-rounded has-border is-family-code svelte-a7ak6u"); attr(input2, "type", "text"); - input2.value = ctx.value; + input2.value = /*value*/ ctx[2]; input2.disabled = true; attr(p2, "class", "control is-expanded"); attr(div, "class", "field has-addons"); }, - m(target, anchor) { insert(target, div, anchor); append(div, p0); @@ -14065,67 +14195,77 @@ append(div, p2); append(p2, input2); }, - - p(changed, ctx) { - if ((changed.name) && input0_id_value !== (input0_id_value = "h-" + ctx.name)) { + p(ctx, [dirty]) { + if (dirty & /*name*/ 1 && input0_id_value !== (input0_id_value = "h-" + /*name*/ ctx[0])) { attr(input0, "id", input0_id_value); } - if ((changed.name) && label_for_value !== (label_for_value = "h-" + ctx.name)) { + if (dirty & /*name*/ 1 && label_for_value !== (label_for_value = "h-" + /*name*/ ctx[0])) { attr(label, "for", label_for_value); } - if (changed.placeholder) { - attr(input1, "placeholder", ctx.placeholder); + if (dirty & /*placeholder*/ 2) { + attr(input1, "placeholder", /*placeholder*/ ctx[1]); } - if (changed.value) { - input2.value = ctx.value; + if (dirty & /*value*/ 4) { + input2.value = /*value*/ ctx[2]; } }, - i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } function instance$e($$self, $$props, $$invalidate) { - let { name, placeholder, value } = $$props; + let { name } = $$props; + let { placeholder } = $$props; + let { value } = $$props; $$self.$set = $$props => { - if ('name' in $$props) $$invalidate('name', name = $$props.name); - if ('placeholder' in $$props) $$invalidate('placeholder', placeholder = $$props.placeholder); - if ('value' in $$props) $$invalidate('value', value = $$props.value); + if ("name" in $$props) $$invalidate(0, name = $$props.name); + if ("placeholder" in $$props) $$invalidate(1, placeholder = $$props.placeholder); + if ("value" in $$props) $$invalidate(2, value = $$props.value); }; - return { name, placeholder, value }; + return [name, placeholder, value]; } class FieldDisabled extends SvelteComponent { constructor(options) { super(); if (!document.getElementById("svelte-a7ak6u-style")) add_css$6(); - init(this, options, instance$e, create_fragment$e, safe_not_equal, ["name", "placeholder", "value"]); + init(this, options, instance$e, create_fragment$e, safe_not_equal, { name: 0, placeholder: 1, value: 2 }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/components/FieldSwitch.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/components/FieldSwitch.svelte generated by Svelte v3.16.5 */ function add_css$7() { var style = element("style"); - style.id = 'svelte-a7ak6u-style'; + style.id = "svelte-a7ak6u-style"; style.textContent = ".control-switch.svelte-a7ak6u{padding-top:0.4rem}.has-border.svelte-a7ak6u{border-color:#dbdbdb}"; append(document.head, style); } function create_fragment$f(ctx) { - var div, p0, input0, input0_id_value, t0, label, label_for_value, t1, p1, input1, t2, p2, input2, dispose; + let div; + let p0; + let input0; + let input0_id_value; + let t0; + let label; + let label_for_value; + let t1; + let p1; + let input1; + let t2; + let p2; + let input2; + let dispose; return { c() { @@ -14141,35 +14281,32 @@ p2 = element("p"); input2 = element("input"); attr(input0, "class", "switch is-rounded is-success"); - attr(input0, "id", input0_id_value = "p-" + ctx.name); + attr(input0, "id", input0_id_value = "p-" + /*name*/ ctx[3]); attr(input0, "type", "checkbox"); - input0.disabled = ctx.required; - attr(label, "for", label_for_value = "p-" + ctx.name); + input0.disabled = /*required*/ ctx[2]; + attr(label, "for", label_for_value = "p-" + /*name*/ ctx[3]); attr(p0, "class", "control control-switch svelte-a7ak6u"); attr(input1, "class", "input is-rounded has-border svelte-a7ak6u"); attr(input1, "type", "text"); - attr(input1, "placeholder", ctx.name); + attr(input1, "placeholder", /*name*/ ctx[3]); input1.disabled = true; attr(p1, "class", "control"); attr(input2, "class", "input has-border is-family-code svelte-a7ak6u"); attr(input2, "type", "text"); - toggle_class(input2, "is-rounded", ctx.rounded); + toggle_class(input2, "is-rounded", /*rounded*/ ctx[4]); attr(p2, "class", "control is-expanded"); attr(div, "class", "field has-addons"); dispose = [ - listen(input0, "change", ctx.input0_change_handler), - listen(input2, "input", ctx.input2_input_handler) + listen(input0, "change", /*input0_change_handler*/ ctx[5]), + listen(input2, "input", /*input2_input_handler*/ ctx[6]) ]; }, - m(target, anchor) { insert(target, div, anchor); append(div, p0); append(p0, input0); - - input0.checked = ctx.used; - + input0.checked = /*used*/ ctx[0]; append(p0, t0); append(p0, label); append(div, t1); @@ -14178,124 +14315,132 @@ append(div, t2); append(div, p2); append(p2, input2); - - set_input_value(input2, ctx.value); + set_input_value(input2, /*value*/ ctx[1]); }, - - p(changed, ctx) { - if (changed.used) input0.checked = ctx.used; - - if ((changed.name) && input0_id_value !== (input0_id_value = "p-" + ctx.name)) { + p(ctx, [dirty]) { + if (dirty & /*name*/ 8 && input0_id_value !== (input0_id_value = "p-" + /*name*/ ctx[3])) { attr(input0, "id", input0_id_value); } - if (changed.required) { - input0.disabled = ctx.required; + if (dirty & /*required*/ 4) { + input0.disabled = /*required*/ ctx[2]; } - if ((changed.name) && label_for_value !== (label_for_value = "p-" + ctx.name)) { + if (dirty & /*used*/ 1) { + input0.checked = /*used*/ ctx[0]; + } + + if (dirty & /*name*/ 8 && label_for_value !== (label_for_value = "p-" + /*name*/ ctx[3])) { attr(label, "for", label_for_value); } - if (changed.name) { - attr(input1, "placeholder", ctx.name); + if (dirty & /*name*/ 8) { + attr(input1, "placeholder", /*name*/ ctx[3]); } - if (changed.value && (input2.value !== ctx.value)) set_input_value(input2, ctx.value); + if (dirty & /*value*/ 2 && input2.value !== /*value*/ ctx[1]) { + set_input_value(input2, /*value*/ ctx[1]); + } - if (changed.rounded) { - toggle_class(input2, "is-rounded", ctx.rounded); + if (dirty & /*rounded*/ 16) { + toggle_class(input2, "is-rounded", /*rounded*/ ctx[4]); } }, - i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(div); - } - + if (detaching) detach(div); run_all(dispose); } }; } function instance$f($$self, $$props, $$invalidate) { - let { used, required, name, value, rounded } = $$props; + let { used } = $$props; + let { required } = $$props; + let { name } = $$props; + let { value } = $$props; + let { rounded } = $$props; function input0_change_handler() { used = this.checked; - $$invalidate('used', used); + $$invalidate(0, used); } function input2_input_handler() { value = this.value; - $$invalidate('value', value); + $$invalidate(1, value); } $$self.$set = $$props => { - if ('used' in $$props) $$invalidate('used', used = $$props.used); - if ('required' in $$props) $$invalidate('required', required = $$props.required); - if ('name' in $$props) $$invalidate('name', name = $$props.name); - if ('value' in $$props) $$invalidate('value', value = $$props.value); - if ('rounded' in $$props) $$invalidate('rounded', rounded = $$props.rounded); + if ("used" in $$props) $$invalidate(0, used = $$props.used); + if ("required" in $$props) $$invalidate(2, required = $$props.required); + if ("name" in $$props) $$invalidate(3, name = $$props.name); + if ("value" in $$props) $$invalidate(1, value = $$props.value); + if ("rounded" in $$props) $$invalidate(4, rounded = $$props.rounded); }; - return { + return [ used, + value, required, name, - value, rounded, input0_change_handler, input2_input_handler - }; + ]; } class FieldSwitch extends SvelteComponent { constructor(options) { super(); if (!document.getElementById("svelte-a7ak6u-style")) add_css$7(); - init(this, options, instance$f, create_fragment$f, safe_not_equal, ["used", "required", "name", "value", "rounded"]); + + init(this, options, instance$f, create_fragment$f, safe_not_equal, { + used: 0, + required: 2, + name: 3, + value: 1, + rounded: 4 + }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/PlaygroundPanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/PlaygroundPanel.svelte generated by Svelte v3.16.5 */ function add_css$8() { var style = element("style"); - style.id = 'svelte-c3oocm-style'; + style.id = "svelte-c3oocm-style"; style.textContent = ".small-section.svelte-c3oocm{padding-top:0.5rem}.button-left.svelte-c3oocm{justify-content:left}.control-switch.svelte-c3oocm{padding-top:0.4rem}.container-content.svelte-c3oocm{padding:0.5rem 1rem;border-radius:4px;margin-top:0.5rem;background-color:#2b2b2b}.content-header.svelte-c3oocm{color:#fff;border-bottom:dashed 1px #777;padding-top:0.5rem;padding-bottom:1rem}.hero-small.svelte-c3oocm{padding:1.5rem}.has-border.svelte-c3oocm{border-color:#dbdbdb}.hero-rounded.svelte-c3oocm{border-radius:4px}"; append(document.head, style); } function get_each_context$5(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.key = list[i][0]; - child_ctx.val = list[i][1]; + const child_ctx = ctx.slice(); + child_ctx[29] = list[i][0]; + child_ctx[30] = list[i][1]; return child_ctx; } function get_each_context_1$1(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.param = list[i]; - child_ctx.each_value_1 = list; - child_ctx.param_index = i; + const child_ctx = ctx.slice(); + child_ctx[33] = list[i]; + child_ctx[34] = list; + child_ctx[35] = i; return child_ctx; } function get_each_context_2$1(ctx, list, i) { - const child_ctx = Object.create(ctx); - child_ctx.header = list[i]; - child_ctx.each_value_2 = list; - child_ctx.header_index = i; + const child_ctx = ctx.slice(); + child_ctx[36] = list[i]; + child_ctx[37] = list; + child_ctx[38] = i; return child_ctx; } - // (125:2) + // (126:2) function create_heading_slot(ctx) { - var span; + let span; return { c() { @@ -14303,22 +14448,30 @@ span.textContent = "Playground"; attr(span, "slot", "heading"); }, - m(target, anchor) { insert(target, span, anchor); }, - d(detaching) { - if (detaching) { - detach(span); - } + if (detaching) detach(span); } }; } - // (134:8) {:else} + // (135:8) {:else} function create_else_block_4(ctx) { - var a, span0, t0_value = ctx.currentAction.method + "", t0, t1, span1, t2_value = ctx.currentUrl.origin + "", t2, t3, span2, t4_value = ctx.currentUrl.pathname + "", t4, dispose; + let a; + let span0; + let t0_value = /*currentAction*/ ctx[5].method + ""; + let t0; + let t1; + let span1; + let t2_value = /*currentUrl*/ ctx[12].origin + ""; + let t2; + let t3; + let span2; + let t4_value = /*currentUrl*/ ctx[12].pathname + ""; + let t4; + let dispose; return { c() { @@ -14335,9 +14488,8 @@ attr(span2, "class", "has-text-weight-bold"); attr(a, "href", "javascript:void(0)"); attr(a, "class", "button button-left is-warning is-family-code is-fullwidth svelte-c3oocm"); - dispose = listen(a, "click", ctx.handleCopy); + dispose = listen(a, "click", /*handleCopy*/ ctx[17]); }, - m(target, anchor) { insert(target, a, anchor); append(a, span0); @@ -14349,34 +14501,21 @@ append(a, span2); append(span2, t4); }, - - p(changed, ctx) { - if ((changed.currentAction) && t0_value !== (t0_value = ctx.currentAction.method + "")) { - set_data(t0, t0_value); - } - - if ((changed.currentUrl) && t2_value !== (t2_value = ctx.currentUrl.origin + "")) { - set_data(t2, t2_value); - } - - if ((changed.currentUrl) && t4_value !== (t4_value = ctx.currentUrl.pathname + "")) { - set_data(t4, t4_value); - } + p(ctx, dirty) { + if (dirty[0] & /*currentAction*/ 32 && t0_value !== (t0_value = /*currentAction*/ ctx[5].method + "")) set_data(t0, t0_value); + if (dirty[0] & /*currentUrl*/ 4096 && t2_value !== (t2_value = /*currentUrl*/ ctx[12].origin + "")) set_data(t2, t2_value); + if (dirty[0] & /*currentUrl*/ 4096 && t4_value !== (t4_value = /*currentUrl*/ ctx[12].pathname + "")) set_data(t4, t4_value); }, - d(detaching) { - if (detaching) { - detach(a); - } - + if (detaching) detach(a); dispose(); } }; } - // (129:8) {#if copying} + // (130:8) {#if copying} function create_if_block_11(ctx) { - var button; + let button; return { c() { @@ -14384,102 +14523,88 @@ button.innerHTML = `URL has been copied to clipboard.`; attr(button, "class", "button button-left is-warning is-family-code is-fullwidth svelte-c3oocm"); }, - m(target, anchor) { insert(target, button, anchor); }, - p: noop, - d(detaching) { - if (detaching) { - detach(button); - } + if (detaching) detach(button); } }; } - // (153:8) {:else} + // (154:8) {:else} function create_else_block_3(ctx) { - var button, dispose; + let button; + let dispose; return { c() { button = element("button"); - button.innerHTML = ` Send`; - attr(button, "class", "button is-success is-fullwidth"); - dispose = listen(button, "click", ctx.handleClick); - }, + button.innerHTML = ` + Send`; + + attr(button, "class", "button is-success is-fullwidth"); + dispose = listen(button, "click", /*handleClick*/ ctx[15]); + }, m(target, anchor) { insert(target, button, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(button); - } - + if (detaching) detach(button); dispose(); } }; } - // (149:8) {#if isAuth(environment, 'oauth2') && !$auth.includes($env)} + // (150:8) {#if isAuth(environment, 'oauth2') && !$auth.includes($env)} function create_if_block_10(ctx) { - var current; + let current; - var loginbutton = new LoginButton({ - props: { - authOptions: ctx.environment.auth.options, - fullWidth: true - } - }); + const loginbutton = new LoginButton({ + props: { + authOptions: /*environment*/ ctx[10].auth.options, + fullWidth: true + } + }); return { c() { - loginbutton.$$.fragment.c(); + create_component(loginbutton.$$.fragment); }, - m(target, anchor) { mount_component(loginbutton, target, anchor); current = true; }, - - p(changed, ctx) { - var loginbutton_changes = {}; - if (changed.environment) loginbutton_changes.authOptions = ctx.environment.auth.options; + p(ctx, dirty) { + const loginbutton_changes = {}; + if (dirty[0] & /*environment*/ 1024) loginbutton_changes.authOptions = /*environment*/ ctx[10].auth.options; loginbutton.$set(loginbutton_changes); }, - i(local) { if (current) return; transition_in(loginbutton.$$.fragment, local); - current = true; }, - o(local) { transition_out(loginbutton.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(loginbutton, detaching); } }; } - // (185:6) {:else} + // (186:6) {:else} function create_else_block_2(ctx) { - var each_1_anchor, current; - - let each_value_2 = ctx.requestHeaders; - + let each_1_anchor; + let current; + let each_value_2 = /*requestHeaders*/ ctx[0]; let each_blocks = []; for (let i = 0; i < each_value_2.length; i += 1) { @@ -14498,7 +14623,6 @@ each_1_anchor = empty(); }, - m(target, anchor) { for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].m(target, anchor); @@ -14507,17 +14631,16 @@ insert(target, each_1_anchor, anchor); current = true; }, - - p(changed, ctx) { - if (changed.requestHeaders) { - each_value_2 = ctx.requestHeaders; - + p(ctx, dirty) { + if (dirty[0] & /*requestHeaders*/ 1) { + each_value_2 = /*requestHeaders*/ ctx[0]; let i; + for (i = 0; i < each_value_2.length; i += 1) { const child_ctx = get_each_context_2$1(ctx, each_value_2, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); transition_in(each_blocks[i], 1); } else { each_blocks[i] = create_each_block_2$1(child_ctx); @@ -14528,258 +14651,239 @@ } group_outros(); + for (i = each_value_2.length; i < each_blocks.length; i += 1) { out(i); } + check_outros(); } }, - i(local) { if (current) return; + for (let i = 0; i < each_value_2.length; i += 1) { transition_in(each_blocks[i]); } current = true; }, - o(local) { each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { transition_out(each_blocks[i]); } current = false; }, - d(detaching) { destroy_each(each_blocks, detaching); - - if (detaching) { - detach(each_1_anchor); - } + if (detaching) detach(each_1_anchor); } }; } - // (181:6) {#if requestHeaders.length === 0 && !environment.auth} + // (182:6) {#if requestHeaders.length === 0 && !environment.auth} function create_if_block_9(ctx) { - var p; + let p; return { c() { p = element("p"); p.innerHTML = `No configurable headers.`; }, - m(target, anchor) { insert(target, p, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(p); - } + if (detaching) detach(p); } }; } - // (186:8) {#each requestHeaders as header} + // (187:8) {#each requestHeaders as header} function create_each_block_2$1(ctx) { - var updating_used, updating_value, current; + let updating_used; + let updating_value; + let current; function fieldswitch_used_binding(value) { - ctx.fieldswitch_used_binding.call(null, value, ctx); - updating_used = true; - add_flush_callback(() => updating_used = false); + /*fieldswitch_used_binding*/ ctx[23].call(null, value, /*header*/ ctx[36]); } function fieldswitch_value_binding(value_1) { - ctx.fieldswitch_value_binding.call(null, value_1, ctx); - updating_value = true; - add_flush_callback(() => updating_value = false); + /*fieldswitch_value_binding*/ ctx[24].call(null, value_1, /*header*/ ctx[36]); } let fieldswitch_props = { - name: ctx.header.name, - required: ctx.header.required, + name: /*header*/ ctx[36].name, + required: /*header*/ ctx[36].required, rounded: true }; - if (ctx.header.used !== void 0) { - fieldswitch_props.used = ctx.header.used; - } - if (ctx.header.value !== void 0) { - fieldswitch_props.value = ctx.header.value; - } - var fieldswitch = new FieldSwitch({ props: fieldswitch_props }); - binding_callbacks.push(() => bind(fieldswitch, 'used', fieldswitch_used_binding)); - binding_callbacks.push(() => bind(fieldswitch, 'value', fieldswitch_value_binding)); + if (/*header*/ ctx[36].used !== void 0) { + fieldswitch_props.used = /*header*/ ctx[36].used; + } + + if (/*header*/ ctx[36].value !== void 0) { + fieldswitch_props.value = /*header*/ ctx[36].value; + } + + const fieldswitch = new FieldSwitch({ props: fieldswitch_props }); + binding_callbacks.push(() => bind(fieldswitch, "used", fieldswitch_used_binding)); + binding_callbacks.push(() => bind(fieldswitch, "value", fieldswitch_value_binding)); return { c() { - fieldswitch.$$.fragment.c(); + create_component(fieldswitch.$$.fragment); }, - m(target, anchor) { mount_component(fieldswitch, target, anchor); current = true; }, - - p(changed, new_ctx) { + p(new_ctx, dirty) { ctx = new_ctx; - var fieldswitch_changes = {}; - if (changed.requestHeaders) fieldswitch_changes.name = ctx.header.name; - if (changed.requestHeaders) fieldswitch_changes.required = ctx.header.required; - if (!updating_used && changed.requestHeaders) { - fieldswitch_changes.used = ctx.header.used; + const fieldswitch_changes = {}; + if (dirty[0] & /*requestHeaders*/ 1) fieldswitch_changes.name = /*header*/ ctx[36].name; + if (dirty[0] & /*requestHeaders*/ 1) fieldswitch_changes.required = /*header*/ ctx[36].required; + + if (!updating_used && dirty[0] & /*requestHeaders*/ 1) { + updating_used = true; + fieldswitch_changes.used = /*header*/ ctx[36].used; + add_flush_callback(() => updating_used = false); } - if (!updating_value && changed.requestHeaders) { - fieldswitch_changes.value = ctx.header.value; + + if (!updating_value && dirty[0] & /*requestHeaders*/ 1) { + updating_value = true; + fieldswitch_changes.value = /*header*/ ctx[36].value; + add_flush_callback(() => updating_value = false); } + fieldswitch.$set(fieldswitch_changes); }, - i(local) { if (current) return; transition_in(fieldswitch.$$.fragment, local); - current = true; }, - o(local) { transition_out(fieldswitch.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(fieldswitch, detaching); } }; } - // (196:6) {#if isAuth(environment, 'basic')} + // (197:6) {#if isAuth(environment, 'basic')} function create_if_block_8(ctx) { - var current; + let current; - var fielddisabled = new FieldDisabled({ - props: { - name: "authorization", - placeholder: "Authorization", - value: "Basic " + basicAuth(ctx.environment.auth.options.username, ctx.environment.auth.options.password) - } - }); + const fielddisabled = new FieldDisabled({ + props: { + name: "authorization", + placeholder: "Authorization", + value: "Basic " + basicAuth(/*environment*/ ctx[10].auth.options.username, /*environment*/ ctx[10].auth.options.password) + } + }); return { c() { - fielddisabled.$$.fragment.c(); + create_component(fielddisabled.$$.fragment); }, - m(target, anchor) { mount_component(fielddisabled, target, anchor); current = true; }, - - p(changed, ctx) { - var fielddisabled_changes = {}; - if (changed.environment) fielddisabled_changes.value = "Basic " + basicAuth(ctx.environment.auth.options.username, ctx.environment.auth.options.password); + p(ctx, dirty) { + const fielddisabled_changes = {}; + if (dirty[0] & /*environment*/ 1024) fielddisabled_changes.value = "Basic " + basicAuth(/*environment*/ ctx[10].auth.options.username, /*environment*/ ctx[10].auth.options.password); fielddisabled.$set(fielddisabled_changes); }, - i(local) { if (current) return; transition_in(fielddisabled.$$.fragment, local); - current = true; }, - o(local) { transition_out(fielddisabled.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(fielddisabled, detaching); } }; } - // (203:6) {#if isAuth(environment, 'apikey')} + // (204:6) {#if isAuth(environment, 'apikey')} function create_if_block_7(ctx) { - var current; + let current; - var fielddisabled = new FieldDisabled({ - props: { - name: "authorization", - placeholder: ctx.environment.auth.options.header, - value: ctx.environment.auth.options.key - } - }); + const fielddisabled = new FieldDisabled({ + props: { + name: "authorization", + placeholder: /*environment*/ ctx[10].auth.options.header, + value: /*environment*/ ctx[10].auth.options.key + } + }); return { c() { - fielddisabled.$$.fragment.c(); + create_component(fielddisabled.$$.fragment); }, - m(target, anchor) { mount_component(fielddisabled, target, anchor); current = true; }, - - p(changed, ctx) { - var fielddisabled_changes = {}; - if (changed.environment) fielddisabled_changes.placeholder = ctx.environment.auth.options.header; - if (changed.environment) fielddisabled_changes.value = ctx.environment.auth.options.key; + p(ctx, dirty) { + const fielddisabled_changes = {}; + if (dirty[0] & /*environment*/ 1024) fielddisabled_changes.placeholder = /*environment*/ ctx[10].auth.options.header; + if (dirty[0] & /*environment*/ 1024) fielddisabled_changes.value = /*environment*/ ctx[10].auth.options.key; fielddisabled.$set(fielddisabled_changes); }, - i(local) { if (current) return; transition_in(fielddisabled.$$.fragment, local); - current = true; }, - o(local) { transition_out(fielddisabled.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(fielddisabled, detaching); } }; } - // (210:6) {#if isAuth(environment, 'oauth2')} + // (211:6) {#if isAuth(environment, 'oauth2')} function create_if_block_5(ctx) { - var show_if = ctx.$auth.includes(ctx.$env), if_block_anchor, current; - - var if_block = (show_if) && create_if_block_6(ctx); + let show_if = /*$auth*/ ctx[13].includes(/*$env*/ ctx[11]); + let if_block_anchor; + let current; + let if_block = show_if && create_if_block_6(ctx); return { c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, - m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); current = true; }, - - p(changed, ctx) { - if (changed.$auth || changed.$env) show_if = ctx.$auth.includes(ctx.$env); + p(ctx, dirty) { + if (dirty[0] & /*$auth, $env*/ 10240) show_if = /*$auth*/ ctx[13].includes(/*$env*/ ctx[11]); if (show_if) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); transition_in(if_block, 1); } else { if_block = create_if_block_6(ctx); @@ -14789,86 +14893,75 @@ } } else if (if_block) { group_outros(); + transition_out(if_block, 1, 1, () => { if_block = null; }); + check_outros(); } }, - i(local) { if (current) return; transition_in(if_block); current = true; }, - o(local) { transition_out(if_block); current = false; }, - d(detaching) { if (if_block) if_block.d(detaching); - - if (detaching) { - detach(if_block_anchor); - } + if (detaching) detach(if_block_anchor); } }; } - // (211:8) {#if $auth.includes($env)} + // (212:8) {#if $auth.includes($env)} function create_if_block_6(ctx) { - var current; + let current; - var fielddisabled = new FieldDisabled({ - props: { - name: "authorization", - placeholder: "Authorization", - value: "Bearer " + ctx.$token - } - }); + const fielddisabled = new FieldDisabled({ + props: { + name: "authorization", + placeholder: "Authorization", + value: "Bearer " + /*$token*/ ctx[14] + } + }); return { c() { - fielddisabled.$$.fragment.c(); + create_component(fielddisabled.$$.fragment); }, - m(target, anchor) { mount_component(fielddisabled, target, anchor); current = true; }, - - p(changed, ctx) { - var fielddisabled_changes = {}; - if (changed.$token) fielddisabled_changes.value = "Bearer " + ctx.$token; + p(ctx, dirty) { + const fielddisabled_changes = {}; + if (dirty[0] & /*$token*/ 16384) fielddisabled_changes.value = "Bearer " + /*$token*/ ctx[14]; fielddisabled.$set(fielddisabled_changes); }, - i(local) { if (current) return; transition_in(fielddisabled.$$.fragment, local); - current = true; }, - o(local) { transition_out(fielddisabled.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(fielddisabled, detaching); } }; } - // (225:6) {:else} + // (226:6) {:else} function create_else_block_1$1(ctx) { - var each_1_anchor, current; - - let each_value_1 = ctx.requestParameters; - + let each_1_anchor; + let current; + let each_value_1 = /*requestParameters*/ ctx[1]; let each_blocks = []; for (let i = 0; i < each_value_1.length; i += 1) { @@ -14887,7 +14980,6 @@ each_1_anchor = empty(); }, - m(target, anchor) { for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].m(target, anchor); @@ -14896,17 +14988,16 @@ insert(target, each_1_anchor, anchor); current = true; }, - - p(changed, ctx) { - if (changed.requestParameters) { - each_value_1 = ctx.requestParameters; - + p(ctx, dirty) { + if (dirty[0] & /*requestParameters*/ 2) { + each_value_1 = /*requestParameters*/ ctx[1]; let i; + for (i = 0; i < each_value_1.length; i += 1) { const child_ctx = get_each_context_1$1(ctx, each_value_1, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); transition_in(each_blocks[i], 1); } else { each_blocks[i] = create_each_block_1$1(child_ctx); @@ -14917,246 +15008,225 @@ } group_outros(); + for (i = each_value_1.length; i < each_blocks.length; i += 1) { out(i); } + check_outros(); } }, - i(local) { if (current) return; + for (let i = 0; i < each_value_1.length; i += 1) { transition_in(each_blocks[i]); } current = true; }, - o(local) { each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { transition_out(each_blocks[i]); } current = false; }, - d(detaching) { destroy_each(each_blocks, detaching); - - if (detaching) { - detach(each_1_anchor); - } + if (detaching) detach(each_1_anchor); } }; } - // (221:6) {#if requestParameters.length === 0} + // (222:6) {#if requestParameters.length === 0} function create_if_block_4(ctx) { - var p; + let p; return { c() { p = element("p"); p.innerHTML = `No configurable parameters.`; }, - m(target, anchor) { insert(target, p, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(p); - } + if (detaching) detach(p); } }; } - // (226:8) {#each requestParameters as param} + // (227:8) {#each requestParameters as param} function create_each_block_1$1(ctx) { - var updating_used, updating_value, current; + let updating_used; + let updating_value; + let current; function fieldswitch_used_binding_1(value) { - ctx.fieldswitch_used_binding_1.call(null, value, ctx); - updating_used = true; - add_flush_callback(() => updating_used = false); + /*fieldswitch_used_binding_1*/ ctx[25].call(null, value, /*param*/ ctx[33]); } function fieldswitch_value_binding_1(value_1) { - ctx.fieldswitch_value_binding_1.call(null, value_1, ctx); - updating_value = true; - add_flush_callback(() => updating_value = false); + /*fieldswitch_value_binding_1*/ ctx[26].call(null, value_1, /*param*/ ctx[33]); } let fieldswitch_props = { - name: ctx.param.name, - required: ctx.param.required + name: /*param*/ ctx[33].name, + required: /*param*/ ctx[33].required }; - if (ctx.param.used !== void 0) { - fieldswitch_props.used = ctx.param.used; - } - if (ctx.param.value !== void 0) { - fieldswitch_props.value = ctx.param.value; - } - var fieldswitch = new FieldSwitch({ props: fieldswitch_props }); - binding_callbacks.push(() => bind(fieldswitch, 'used', fieldswitch_used_binding_1)); - binding_callbacks.push(() => bind(fieldswitch, 'value', fieldswitch_value_binding_1)); + if (/*param*/ ctx[33].used !== void 0) { + fieldswitch_props.used = /*param*/ ctx[33].used; + } + + if (/*param*/ ctx[33].value !== void 0) { + fieldswitch_props.value = /*param*/ ctx[33].value; + } + + const fieldswitch = new FieldSwitch({ props: fieldswitch_props }); + binding_callbacks.push(() => bind(fieldswitch, "used", fieldswitch_used_binding_1)); + binding_callbacks.push(() => bind(fieldswitch, "value", fieldswitch_value_binding_1)); return { c() { - fieldswitch.$$.fragment.c(); + create_component(fieldswitch.$$.fragment); }, - m(target, anchor) { mount_component(fieldswitch, target, anchor); current = true; }, - - p(changed, new_ctx) { + p(new_ctx, dirty) { ctx = new_ctx; - var fieldswitch_changes = {}; - if (changed.requestParameters) fieldswitch_changes.name = ctx.param.name; - if (changed.requestParameters) fieldswitch_changes.required = ctx.param.required; - if (!updating_used && changed.requestParameters) { - fieldswitch_changes.used = ctx.param.used; + const fieldswitch_changes = {}; + if (dirty[0] & /*requestParameters*/ 2) fieldswitch_changes.name = /*param*/ ctx[33].name; + if (dirty[0] & /*requestParameters*/ 2) fieldswitch_changes.required = /*param*/ ctx[33].required; + + if (!updating_used && dirty[0] & /*requestParameters*/ 2) { + updating_used = true; + fieldswitch_changes.used = /*param*/ ctx[33].used; + add_flush_callback(() => updating_used = false); } - if (!updating_value && changed.requestParameters) { - fieldswitch_changes.value = ctx.param.value; + + if (!updating_value && dirty[0] & /*requestParameters*/ 2) { + updating_value = true; + fieldswitch_changes.value = /*param*/ ctx[33].value; + add_flush_callback(() => updating_value = false); } + fieldswitch.$set(fieldswitch_changes); }, - i(local) { if (current) return; transition_in(fieldswitch.$$.fragment, local); - current = true; }, - o(local) { transition_out(fieldswitch.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(fieldswitch, detaching); } }; } - // (242:6) {:else} - function create_else_block$2(ctx) { - var p; + // (243:6) {:else} + function create_else_block$3(ctx) { + let p; return { c() { p = element("p"); p.innerHTML = `Body is only available for POST, PUT and PATCH.`; }, - m(target, anchor) { insert(target, p, anchor); }, - p: noop, - d(detaching) { - if (detaching) { - detach(p); - } + if (detaching) detach(p); } }; } - // (237:6) {#if allowBody(currentAction)} - function create_if_block_3$1(ctx) { - var textarea, dispose; + // (238:6) {#if allowBody(currentAction)} + function create_if_block_3$2(ctx) { + let textarea; + let dispose; return { c() { textarea = element("textarea"); attr(textarea, "class", "textarea is-family-code"); attr(textarea, "rows", "8"); - dispose = listen(textarea, "input", ctx.textarea_input_handler); + dispose = listen(textarea, "input", /*textarea_input_handler*/ ctx[27]); }, - m(target, anchor) { insert(target, textarea, anchor); - - set_input_value(textarea, ctx.requestBody); + set_input_value(textarea, /*requestBody*/ ctx[2]); }, - - p(changed, ctx) { - if (changed.requestBody) set_input_value(textarea, ctx.requestBody); - }, - - d(detaching) { - if (detaching) { - detach(textarea); + p(ctx, dirty) { + if (dirty[0] & /*requestBody*/ 4) { + set_input_value(textarea, /*requestBody*/ ctx[2]); } - + }, + d(detaching) { + if (detaching) detach(textarea); dispose(); } }; } - // (282:4) {:catch} + // (283:4) {:catch} function create_catch_block(ctx) { - var div; + let div; return { c() { div = element("div"); div.textContent = " "; }, - m(target, anchor) { insert(target, div, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } - // (255:4) {:then value} + // (256:4) {:then value} function create_then_block(ctx) { - var show_if = Object.keys(ctx.value).length > 0, if_block_anchor, current; - - var if_block = (show_if) && create_if_block_1$7(ctx); + let show_if = Object.keys(/*value*/ ctx[28]).length > 0; + let if_block_anchor; + let current; + let if_block = show_if && create_if_block_1$7(ctx); return { c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, - m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); current = true; }, - - p(changed, ctx) { - if (changed.response) show_if = Object.keys(ctx.value).length > 0; + p(ctx, dirty) { + if (dirty[0] & /*response*/ 64) show_if = Object.keys(/*value*/ ctx[28]).length > 0; if (show_if) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); transition_in(if_block, 1); } else { if_block = create_if_block_1$7(ctx); @@ -15166,39 +15236,47 @@ } } else if (if_block) { group_outros(); + transition_out(if_block, 1, 1, () => { if_block = null; }); + check_outros(); } }, - i(local) { if (current) return; transition_in(if_block); current = true; }, - o(local) { transition_out(if_block); current = false; }, - d(detaching) { if (if_block) if_block.d(detaching); - - if (detaching) { - detach(if_block_anchor); - } + if (detaching) detach(if_block_anchor); } }; } - // (256:6) {#if Object.keys(value).length > 0} + // (257:6) {#if Object.keys(value).length > 0} function create_if_block_1$7(ctx) { - var div1, section1, section0, div0, h1, t0_value = ctx.value.status + "", t0, t1, t2_value = ctx.value.statusText + "", t2, section1_class_value, t3, show_if = Object.keys(ctx.value.headers).length > 0, current; - - var if_block = (show_if) && create_if_block_2$3(ctx); + let div1; + let section1; + let section0; + let div0; + let h1; + let t0_value = /*value*/ ctx[28].status + ""; + let t0; + let t1; + let t2_value = /*value*/ ctx[28].statusText + ""; + let t2; + let section1_class_value; + let t3; + let show_if = Object.keys(/*value*/ ctx[28].headers).length > 0; + let current; + let if_block = show_if && create_if_block_2$4(ctx); return { c() { @@ -15215,10 +15293,9 @@ attr(h1, "class", "title"); attr(div0, "class", "container has-text-centered"); attr(section0, "class", "hero-body hero-small svelte-c3oocm"); - attr(section1, "class", section1_class_value = "hero hero-rounded " + colorize(ctx.value.status) + " svelte-c3oocm"); + attr(section1, "class", section1_class_value = "hero hero-rounded " + colorize(/*value*/ ctx[28].status) + " svelte-c3oocm"); attr(div1, "class", "small-section svelte-c3oocm"); }, - m(target, anchor) { insert(target, div1, anchor); append(div1, section1); @@ -15232,77 +15309,71 @@ if (if_block) if_block.m(div1, null); current = true; }, + p(ctx, dirty) { + if ((!current || dirty[0] & /*response*/ 64) && t0_value !== (t0_value = /*value*/ ctx[28].status + "")) set_data(t0, t0_value); + if ((!current || dirty[0] & /*response*/ 64) && t2_value !== (t2_value = /*value*/ ctx[28].statusText + "")) set_data(t2, t2_value); - p(changed, ctx) { - if ((!current || changed.response) && t0_value !== (t0_value = ctx.value.status + "")) { - set_data(t0, t0_value); - } - - if ((!current || changed.response) && t2_value !== (t2_value = ctx.value.statusText + "")) { - set_data(t2, t2_value); - } - - if ((!current || changed.response) && section1_class_value !== (section1_class_value = "hero hero-rounded " + colorize(ctx.value.status) + " svelte-c3oocm")) { + if (!current || dirty[0] & /*response*/ 64 && section1_class_value !== (section1_class_value = "hero hero-rounded " + colorize(/*value*/ ctx[28].status) + " svelte-c3oocm")) { attr(section1, "class", section1_class_value); } - if (changed.response) show_if = Object.keys(ctx.value.headers).length > 0; + if (dirty[0] & /*response*/ 64) show_if = Object.keys(/*value*/ ctx[28].headers).length > 0; if (show_if) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); transition_in(if_block, 1); } else { - if_block = create_if_block_2$3(ctx); + if_block = create_if_block_2$4(ctx); if_block.c(); transition_in(if_block, 1); if_block.m(div1, null); } } else if (if_block) { group_outros(); + transition_out(if_block, 1, 1, () => { if_block = null; }); + check_outros(); } }, - i(local) { if (current) return; transition_in(if_block); current = true; }, - o(local) { transition_out(if_block); current = false; }, - d(detaching) { - if (detaching) { - detach(div1); - } - + if (detaching) detach(div1); if (if_block) if_block.d(); } }; } - // (266:10) {#if Object.keys(value.headers).length > 0} - function create_if_block_2$3(ctx) { - var div1, div0, t, current; - - let each_value = Object.entries(ctx.value.headers); - + // (267:10) {#if Object.keys(value.headers).length > 0} + function create_if_block_2$4(ctx) { + let div1; + let div0; + let t; + let current; + let each_value = Object.entries(/*value*/ ctx[28].headers); let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { each_blocks[i] = create_each_block$5(get_each_context$5(ctx, each_value, i)); } - var codeblock = new CodeBlock({ - props: { type: contentType(ctx.value.headers), body: ctx.value.data } - }); + const codeblock = new CodeBlock({ + props: { + type: contentType(/*value*/ ctx[28].headers), + body: /*value*/ ctx[28].data + } + }); return { c() { @@ -15314,11 +15385,10 @@ } t = space(); - codeblock.$$.fragment.c(); + create_component(codeblock.$$.fragment); attr(div0, "class", "content-header svelte-c3oocm"); attr(div1, "class", "container container-content svelte-c3oocm"); }, - m(target, anchor) { insert(target, div1, anchor); append(div1, div0); @@ -15331,17 +15401,16 @@ mount_component(codeblock, div1, null); current = true; }, - - p(changed, ctx) { - if (changed.response) { - each_value = Object.entries(ctx.value.headers); - + p(ctx, dirty) { + if (dirty[0] & /*response*/ 64) { + each_value = Object.entries(/*value*/ ctx[28].headers); let i; + for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context$5(ctx, each_value, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); } else { each_blocks[i] = create_each_block$5(child_ctx); each_blocks[i].c(); @@ -15352,42 +15421,42 @@ for (; i < each_blocks.length; i += 1) { each_blocks[i].d(1); } + each_blocks.length = each_value.length; } - var codeblock_changes = {}; - if (changed.response) codeblock_changes.type = contentType(ctx.value.headers); - if (changed.response) codeblock_changes.body = ctx.value.data; + const codeblock_changes = {}; + if (dirty[0] & /*response*/ 64) codeblock_changes.type = contentType(/*value*/ ctx[28].headers); + if (dirty[0] & /*response*/ 64) codeblock_changes.body = /*value*/ ctx[28].data; codeblock.$set(codeblock_changes); }, - i(local) { if (current) return; transition_in(codeblock.$$.fragment, local); - current = true; }, - o(local) { transition_out(codeblock.$$.fragment, local); current = false; }, - d(detaching) { - if (detaching) { - detach(div1); - } - + if (detaching) detach(div1); destroy_each(each_blocks, detaching); - destroy_component(codeblock); } }; } - // (269:16) {#each Object.entries(value.headers) as [key, val]} + // (270:16) {#each Object.entries(value.headers) as [key, val]} function create_each_block$5(ctx) { - var p, span, t0_value = ctx.key + "", t0, t1, t2_value = ctx.val + "", t2, t3; + let p; + let span; + let t0_value = /*key*/ ctx[29] + ""; + let t0; + let t1; + let t2_value = /*val*/ ctx[30] + ""; + let t2; + let t3; return { c() { @@ -15400,7 +15469,6 @@ attr(span, "class", "is-capitalized"); attr(p, "class", "is-family-code"); }, - m(target, anchor) { insert(target, p, anchor); append(p, span); @@ -15409,28 +15477,19 @@ append(p, t2); append(p, t3); }, - - p(changed, ctx) { - if ((changed.response) && t0_value !== (t0_value = ctx.key + "")) { - set_data(t0, t0_value); - } - - if ((changed.response) && t2_value !== (t2_value = ctx.val + "")) { - set_data(t2, t2_value); - } + p(ctx, dirty) { + if (dirty[0] & /*response*/ 64 && t0_value !== (t0_value = /*key*/ ctx[29] + "")) set_data(t0, t0_value); + if (dirty[0] & /*response*/ 64 && t2_value !== (t2_value = /*val*/ ctx[30] + "")) set_data(t2, t2_value); }, - d(detaching) { - if (detaching) { - detach(p); - } + if (detaching) detach(p); } }; } - // (249:21)
{:then value} + // (250:21)
{:then value} function create_pending_block(ctx) { - var div; + let div; return { c() { @@ -15438,26 +15497,26 @@ div.innerHTML = ``; attr(div, "class", "section has-text-centered"); }, - m(target, anchor) { insert(target, div, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } - // (286:4) {#if error} + // (287:4) {#if error} function create_if_block$a(ctx) { - var div1, section1, section0, div0, p, t; + let div1; + let section1; + let section0; + let div0; + let p; + let t; return { c() { @@ -15466,14 +15525,13 @@ section0 = element("section"); div0 = element("div"); p = element("p"); - t = text(ctx.error); + t = text(/*error*/ ctx[8]); attr(p, "class", "subtitle"); attr(div0, "class", "container"); attr(section0, "class", "hero-body"); attr(section1, "class", "hero is-danger"); attr(div1, "class", "small-section svelte-c3oocm"); }, - m(target, anchor) { insert(target, div1, anchor); append(div1, section1); @@ -15482,93 +15540,109 @@ append(div0, p); append(p, t); }, - - p(changed, ctx) { - if (changed.error) { - set_data(t, ctx.error); - } + p(ctx, dirty) { + if (dirty[0] & /*error*/ 256) set_data(t, /*error*/ ctx[8]); }, - d(detaching) { - if (detaching) { - detach(div1); - } + if (detaching) detach(div1); } }; } - // (126:2)
+ // (127:2)
function create_body_slot(ctx) { - var div0, div3, div1, t0, div2, show_if_4, current_block_type_index, if_block1, t1, div4, ul, li0, a0, t3, li1, a1, t5, li2, a2, t7, div5, current_block_type_index_1, if_block2, t8, show_if_3 = isAuth(ctx.environment, 'basic'), t9, show_if_2 = isAuth(ctx.environment, 'apikey'), t10, show_if_1 = isAuth(ctx.environment, 'oauth2'), t11, div6, current_block_type_index_2, if_block6, t12, div7, show_if, t13, promise, t14, current, dispose; + let div0; + let div3; + let div1; + let t0; + let div2; + let show_if_4; + let current_block_type_index; + let if_block1; + let t1; + let div4; + let ul; + let li0; + let a0; + let t3; + let li1; + let a1; + let t5; + let li2; + let a2; + let t7; + let div5; + let current_block_type_index_1; + let if_block2; + let t8; + let show_if_3 = isAuth(/*environment*/ ctx[10], "basic"); + let t9; + let show_if_2 = isAuth(/*environment*/ ctx[10], "apikey"); + let t10; + let show_if_1 = isAuth(/*environment*/ ctx[10], "oauth2"); + let t11; + let div6; + let current_block_type_index_2; + let if_block6; + let t12; + let div7; + let show_if; + let t13; + let promise; + let t14; + let current; + let dispose; - function select_block_type(changed, ctx) { - if (ctx.copying) return create_if_block_11; + function select_block_type(ctx, dirty) { + if (/*copying*/ ctx[9]) return create_if_block_11; return create_else_block_4; } - var current_block_type = select_block_type(null, ctx); - var if_block0 = current_block_type(ctx); + let current_block_type = select_block_type(ctx, -1); + let if_block0 = current_block_type(ctx); + const if_block_creators = [create_if_block_10, create_else_block_3]; + const if_blocks = []; - var if_block_creators = [ - create_if_block_10, - create_else_block_3 - ]; - - var if_blocks = []; - - function select_block_type_1(changed, ctx) { - if ((show_if_4 == null) || changed.environment || changed.$auth || changed.$env) show_if_4 = !!(isAuth(ctx.environment, 'oauth2') && !ctx.$auth.includes(ctx.$env)); + function select_block_type_1(ctx, dirty) { + if (dirty[0] & /*environment, $auth, $env*/ 11264) show_if_4 = !!(isAuth(/*environment*/ ctx[10], "oauth2") && !/*$auth*/ ctx[13].includes(/*$env*/ ctx[11])); if (show_if_4) return 0; return 1; } - current_block_type_index = select_block_type_1(null, ctx); + current_block_type_index = select_block_type_1(ctx, -1); if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + const if_block_creators_1 = [create_if_block_9, create_else_block_2]; + const if_blocks_1 = []; - var if_block_creators_1 = [ - create_if_block_9, - create_else_block_2 - ]; - - var if_blocks_1 = []; - - function select_block_type_2(changed, ctx) { - if (ctx.requestHeaders.length === 0 && !ctx.environment.auth) return 0; + function select_block_type_2(ctx, dirty) { + if (/*requestHeaders*/ ctx[0].length === 0 && !/*environment*/ ctx[10].auth) return 0; return 1; } - current_block_type_index_1 = select_block_type_2(null, ctx); + current_block_type_index_1 = select_block_type_2(ctx, -1); if_block2 = if_blocks_1[current_block_type_index_1] = if_block_creators_1[current_block_type_index_1](ctx); + let if_block3 = show_if_3 && create_if_block_8(ctx); + let if_block4 = show_if_2 && create_if_block_7(ctx); + let if_block5 = show_if_1 && create_if_block_5(ctx); + const if_block_creators_2 = [create_if_block_4, create_else_block_1$1]; + const if_blocks_2 = []; - var if_block3 = (show_if_3) && create_if_block_8(ctx); - - var if_block4 = (show_if_2) && create_if_block_7(ctx); - - var if_block5 = (show_if_1) && create_if_block_5(ctx); - - var if_block_creators_2 = [ - create_if_block_4, - create_else_block_1$1 - ]; - - var if_blocks_2 = []; - - function select_block_type_3(changed, ctx) { - if (ctx.requestParameters.length === 0) return 0; + function select_block_type_3(ctx, dirty) { + if (/*requestParameters*/ ctx[1].length === 0) return 0; return 1; } - current_block_type_index_2 = select_block_type_3(null, ctx); + current_block_type_index_2 = select_block_type_3(ctx, -1); if_block6 = if_blocks_2[current_block_type_index_2] = if_block_creators_2[current_block_type_index_2](ctx); - function select_block_type_4(changed, ctx) { - if ((show_if == null) || changed.currentAction) show_if = !!(allowBody(ctx.currentAction)); - if (show_if) return create_if_block_3$1; - return create_else_block$2; + function select_block_type_4(ctx, dirty) { + if (show_if == null || dirty[0] & /*currentAction*/ 32) show_if = !!allowBody(/*currentAction*/ ctx[5]); + if (show_if) return create_if_block_3$2; + return create_else_block$3; } - var current_block_type_1 = select_block_type_4(null, ctx); - var if_block7 = current_block_type_1(ctx); + let current_block_type_1 = select_block_type_4(ctx, -1); + let if_block7 = current_block_type_1(ctx); let info = { ctx, @@ -15577,14 +15651,12 @@ pending: create_pending_block, then: create_then_block, catch: create_catch_block, - value: 'value', - error: 'null', + value: 28, blocks: [,,,] }; - handle_promise(promise = ctx.response, info); - - var if_block8 = (ctx.error) && create_if_block$a(ctx); + handle_promise(promise = /*response*/ ctx[6], info); + let if_block8 = /*error*/ ctx[8] && create_if_block$a(ctx); return { c() { @@ -15625,36 +15697,33 @@ div7 = element("div"); if_block7.c(); t13 = space(); - info.block.c(); - t14 = space(); if (if_block8) if_block8.c(); attr(div1, "class", "column"); attr(div2, "class", "column is-one-fifth"); attr(div3, "class", "columns"); attr(a0, "href", "javascript:void(0)"); - toggle_class(li0, "is-active", ctx.requestTab === 0); + toggle_class(li0, "is-active", /*requestTab*/ ctx[7] === 0); attr(a1, "href", "javascript:void(0)"); - toggle_class(li1, "is-active", ctx.requestTab === 1); + toggle_class(li1, "is-active", /*requestTab*/ ctx[7] === 1); attr(a2, "href", "javascript:void(0)"); - toggle_class(li2, "is-active", ctx.requestTab === 2); + toggle_class(li2, "is-active", /*requestTab*/ ctx[7] === 2); attr(div4, "class", "tabs is-boxed"); attr(div5, "class", "section-headers"); - toggle_class(div5, "is-hidden", ctx.requestTab != 0); + toggle_class(div5, "is-hidden", /*requestTab*/ ctx[7] != 0); attr(div6, "class", "section-parameters"); - toggle_class(div6, "is-hidden", ctx.requestTab != 1); + toggle_class(div6, "is-hidden", /*requestTab*/ ctx[7] != 1); attr(div7, "class", "section-body"); - toggle_class(div7, "is-hidden", ctx.requestTab != 2); + toggle_class(div7, "is-hidden", /*requestTab*/ ctx[7] != 2); attr(div0, "slot", "body"); dispose = [ - listen(a0, "click", ctx.click_handler), - listen(a1, "click", ctx.click_handler_1), - listen(a2, "click", ctx.click_handler_2) + listen(a0, "click", /*click_handler*/ ctx[20]), + listen(a1, "click", /*click_handler_1*/ ctx[21]), + listen(a2, "click", /*click_handler_2*/ ctx[22]) ]; }, - m(target, anchor) { insert(target, div0, anchor); append(div0, div3); @@ -15690,80 +15759,93 @@ append(div0, div7); if_block7.m(div7, null); append(div0, t13); - info.block.m(div0, info.anchor = null); info.mount = () => div0; info.anchor = t14; - append(div0, t14); if (if_block8) if_block8.m(div0, null); current = true; }, - - p(changed, new_ctx) { + p(new_ctx, dirty) { ctx = new_ctx; - if (current_block_type === (current_block_type = select_block_type(changed, ctx)) && if_block0) { - if_block0.p(changed, ctx); + + if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block0) { + if_block0.p(ctx, dirty); } else { if_block0.d(1); if_block0 = current_block_type(ctx); + if (if_block0) { if_block0.c(); if_block0.m(div1, null); } } - var previous_block_index = current_block_type_index; - current_block_type_index = select_block_type_1(changed, ctx); + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type_1(ctx, dirty); + if (current_block_type_index === previous_block_index) { - if_blocks[current_block_type_index].p(changed, ctx); + if_blocks[current_block_type_index].p(ctx, dirty); } else { group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { if_blocks[previous_block_index] = null; }); - check_outros(); + check_outros(); if_block1 = if_blocks[current_block_type_index]; + if (!if_block1) { if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); if_block1.c(); } + transition_in(if_block1, 1); if_block1.m(div2, null); } - if (changed.requestTab) { - toggle_class(li0, "is-active", ctx.requestTab === 0); - toggle_class(li1, "is-active", ctx.requestTab === 1); - toggle_class(li2, "is-active", ctx.requestTab === 2); + if (dirty[0] & /*requestTab*/ 128) { + toggle_class(li0, "is-active", /*requestTab*/ ctx[7] === 0); } - var previous_block_index_1 = current_block_type_index_1; - current_block_type_index_1 = select_block_type_2(changed, ctx); + if (dirty[0] & /*requestTab*/ 128) { + toggle_class(li1, "is-active", /*requestTab*/ ctx[7] === 1); + } + + if (dirty[0] & /*requestTab*/ 128) { + toggle_class(li2, "is-active", /*requestTab*/ ctx[7] === 2); + } + + let previous_block_index_1 = current_block_type_index_1; + current_block_type_index_1 = select_block_type_2(ctx, dirty); + if (current_block_type_index_1 === previous_block_index_1) { - if_blocks_1[current_block_type_index_1].p(changed, ctx); + if_blocks_1[current_block_type_index_1].p(ctx, dirty); } else { group_outros(); + transition_out(if_blocks_1[previous_block_index_1], 1, 1, () => { if_blocks_1[previous_block_index_1] = null; }); - check_outros(); + check_outros(); if_block2 = if_blocks_1[current_block_type_index_1]; + if (!if_block2) { if_block2 = if_blocks_1[current_block_type_index_1] = if_block_creators_1[current_block_type_index_1](ctx); if_block2.c(); } + transition_in(if_block2, 1); if_block2.m(div5, t8); } - if (changed.environment) show_if_3 = isAuth(ctx.environment, 'basic'); + if (dirty[0] & /*environment*/ 1024) show_if_3 = isAuth(/*environment*/ ctx[10], "basic"); if (show_if_3) { if (if_block3) { - if_block3.p(changed, ctx); + if_block3.p(ctx, dirty); transition_in(if_block3, 1); } else { if_block3 = create_if_block_8(ctx); @@ -15773,17 +15855,19 @@ } } else if (if_block3) { group_outros(); + transition_out(if_block3, 1, 1, () => { if_block3 = null; }); + check_outros(); } - if (changed.environment) show_if_2 = isAuth(ctx.environment, 'apikey'); + if (dirty[0] & /*environment*/ 1024) show_if_2 = isAuth(/*environment*/ ctx[10], "apikey"); if (show_if_2) { if (if_block4) { - if_block4.p(changed, ctx); + if_block4.p(ctx, dirty); transition_in(if_block4, 1); } else { if_block4 = create_if_block_7(ctx); @@ -15793,17 +15877,19 @@ } } else if (if_block4) { group_outros(); + transition_out(if_block4, 1, 1, () => { if_block4 = null; }); + check_outros(); } - if (changed.environment) show_if_1 = isAuth(ctx.environment, 'oauth2'); + if (dirty[0] & /*environment*/ 1024) show_if_1 = isAuth(/*environment*/ ctx[10], "oauth2"); if (show_if_1) { if (if_block5) { - if_block5.p(changed, ctx); + if_block5.p(ctx, dirty); transition_in(if_block5, 1); } else { if_block5 = create_if_block_5(ctx); @@ -15813,66 +15899,75 @@ } } else if (if_block5) { group_outros(); + transition_out(if_block5, 1, 1, () => { if_block5 = null; }); + check_outros(); } - if (changed.requestTab) { - toggle_class(div5, "is-hidden", ctx.requestTab != 0); + if (dirty[0] & /*requestTab*/ 128) { + toggle_class(div5, "is-hidden", /*requestTab*/ ctx[7] != 0); } - var previous_block_index_2 = current_block_type_index_2; - current_block_type_index_2 = select_block_type_3(changed, ctx); + let previous_block_index_2 = current_block_type_index_2; + current_block_type_index_2 = select_block_type_3(ctx, dirty); + if (current_block_type_index_2 === previous_block_index_2) { - if_blocks_2[current_block_type_index_2].p(changed, ctx); + if_blocks_2[current_block_type_index_2].p(ctx, dirty); } else { group_outros(); + transition_out(if_blocks_2[previous_block_index_2], 1, 1, () => { if_blocks_2[previous_block_index_2] = null; }); - check_outros(); + check_outros(); if_block6 = if_blocks_2[current_block_type_index_2]; + if (!if_block6) { if_block6 = if_blocks_2[current_block_type_index_2] = if_block_creators_2[current_block_type_index_2](ctx); if_block6.c(); } + transition_in(if_block6, 1); if_block6.m(div6, null); } - if (changed.requestTab) { - toggle_class(div6, "is-hidden", ctx.requestTab != 1); + if (dirty[0] & /*requestTab*/ 128) { + toggle_class(div6, "is-hidden", /*requestTab*/ ctx[7] != 1); } - if (current_block_type_1 === (current_block_type_1 = select_block_type_4(changed, ctx)) && if_block7) { - if_block7.p(changed, ctx); + if (current_block_type_1 === (current_block_type_1 = select_block_type_4(ctx, dirty)) && if_block7) { + if_block7.p(ctx, dirty); } else { if_block7.d(1); if_block7 = current_block_type_1(ctx); + if (if_block7) { if_block7.c(); if_block7.m(div7, null); } } - if (changed.requestTab) { - toggle_class(div7, "is-hidden", ctx.requestTab != 2); + if (dirty[0] & /*requestTab*/ 128) { + toggle_class(div7, "is-hidden", /*requestTab*/ ctx[7] != 2); } info.ctx = ctx; - if (('response' in changed) && promise !== (promise = ctx.response) && handle_promise(promise, info)) { - // nothing + if (dirty[0] & /*response*/ 64 && promise !== (promise = /*response*/ ctx[6]) && handle_promise(promise, info)) { + } else { - info.block.p(changed, assign(assign({}, ctx), info.resolved)); + const child_ctx = ctx.slice(); + child_ctx[28] = info.resolved; + info.block.p(child_ctx, dirty); } - if (ctx.error) { + if (/*error*/ ctx[8]) { if (if_block8) { - if_block8.p(changed, ctx); + if_block8.p(ctx, dirty); } else { if_block8 = create_if_block$a(ctx); if_block8.c(); @@ -15883,7 +15978,6 @@ if_block8 = null; } }, - i(local) { if (current) return; transition_in(if_block1); @@ -15895,7 +15989,6 @@ transition_in(info.block); current = true; }, - o(local) { transition_out(if_block1); transition_out(if_block2); @@ -15911,12 +16004,8 @@ current = false; }, - d(detaching) { - if (detaching) { - detach(div0); - } - + if (detaching) detach(div0); if_block0.d(); if_blocks[current_block_type_index].d(); if_blocks_1[current_block_type_index_1].d(); @@ -15925,87 +16014,81 @@ if (if_block5) if_block5.d(); if_blocks_2[current_block_type_index_2].d(); if_block7.d(); - info.block.d(); info.token = null; info = null; - if (if_block8) if_block8.d(); run_all(dispose); } }; } - // (124:0) + // (125:0) function create_default_slot(ctx) { - var t, current; + let t; + let current; return { c() { t = space(); }, - m(target, anchor) { insert(target, t, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(t); - } + if (detaching) detach(t); } }; } function create_fragment$g(ctx) { - var current; + let current; - var collapsiblepanel = new CollapsiblePanel({ - props: { - dark: true, - show: ctx.show, - $$slots: { - default: [create_default_slot], - body: [create_body_slot], - heading: [create_heading_slot] - }, - $$scope: { ctx } - } - }); + const collapsiblepanel = new CollapsiblePanel({ + props: { + dark: true, + isDarkmode: /*isDarkmode*/ ctx[4], + show: /*show*/ ctx[3], + $$slots: { + default: [create_default_slot], + body: [create_body_slot], + heading: [create_heading_slot] + }, + $$scope: { ctx } + } + }); return { c() { - collapsiblepanel.$$.fragment.c(); + create_component(collapsiblepanel.$$.fragment); }, - m(target, anchor) { mount_component(collapsiblepanel, target, anchor); current = true; }, + p(ctx, dirty) { + const collapsiblepanel_changes = {}; + if (dirty[0] & /*isDarkmode*/ 16) collapsiblepanel_changes.isDarkmode = /*isDarkmode*/ ctx[4]; + if (dirty[0] & /*show*/ 8) collapsiblepanel_changes.show = /*show*/ ctx[3]; + + if (dirty[0] & /*error, response, requestTab, currentAction, requestBody, requestParameters, environment, $auth, $env, $token, requestHeaders, copying, currentUrl*/ 32743 | dirty[1] & /*$$scope*/ 256) { + collapsiblepanel_changes.$$scope = { dirty, ctx }; + } - p(changed, ctx) { - var collapsiblepanel_changes = {}; - if (changed.show) collapsiblepanel_changes.show = ctx.show; - if (changed.$$scope || changed.error || changed.response || changed.requestTab || changed.currentAction || changed.requestBody || changed.requestParameters || changed.environment || changed.$auth || changed.$env || changed.$token || changed.requestHeaders || changed.copying || changed.currentUrl) collapsiblepanel_changes.$$scope = { changed, ctx }; collapsiblepanel.$set(collapsiblepanel_changes); }, - i(local) { if (current) return; transition_in(collapsiblepanel.$$.fragment, local); - current = true; }, - o(local) { transition_out(collapsiblepanel.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(collapsiblepanel, detaching); } @@ -16013,131 +16096,148 @@ } function contentType(headers) { - return headers && headers["content-type"]; + return headers && headers["content-type"]; } function basicAuth(username, password) { - return btoa(`${username}:${password}`); + return btoa(`${username}:${password}`); } function instance$g($$self, $$props, $$invalidate) { - let $env, $auth, $token; + let $env; + let $auth; + let $token; + component_subscribe($$self, env, $$value => $$invalidate(11, $env = $$value)); + component_subscribe($$self, auth, $$value => $$invalidate(13, $auth = $$value)); + component_subscribe($$self, token, $$value => $$invalidate(14, $token = $$value)); + let { show = true } = $$props; + let { isDarkmode } = $$props; + let { environments } = $$props; + let { currentAction } = $$props; + let { currentSample } = $$props; + let { requestHeaders } = $$props; + let { requestParameters } = $$props; + let { requestBody } = $$props; + let response = {}; + let requestTab = 0; + let error; + let copying = false; - component_subscribe($$self, env, $$value => { $env = $$value; $$invalidate('$env', $env); }); - component_subscribe($$self, auth, $$value => { $auth = $$value; $$invalidate('$auth', $auth); }); - component_subscribe($$self, token, $$value => { $token = $$value; $$invalidate('$token', $token); }); + afterUpdate(() => { + $$invalidate(6, response = {}); + }); - + function handleClick() { + $$invalidate(8, error = undefined); - let { show = true, environments, currentAction, currentSample, requestHeaders, requestParameters, requestBody } = $$props; + $$invalidate(6, response = sendRequest($env, environment, currentAction, { + headers: requestHeaders, + parameters: requestParameters, + body: requestBody + }).catch(function (err) { + $$invalidate(8, error = err); + return Promise.reject(err); + })); + } - let response = {}; - let requestTab = 0; - let error; - let copying = false; + function handleTab(index) { + $$invalidate(8, error = undefined); + $$invalidate(7, requestTab = index); + } - afterUpdate(() => { - $$invalidate('response', response = {}); - }); + function handleCopy() { + $$invalidate(9, copying = true); - function handleClick() { - $$invalidate('error', error = undefined); - $$invalidate('response', response = sendRequest($env, environment, currentAction, { - headers: requestHeaders, - parameters: requestParameters, - body: requestBody - }).catch(function(err) { - $$invalidate('error', error = err); - return Promise.reject(err); - })); - } + setTimeout( + () => { + $$invalidate(9, copying = false); + }, + 2000 + ); - function handleTab(index) { - $$invalidate('error', error = undefined); - $$invalidate('requestTab', requestTab = index); - } - - function handleCopy() { - $$invalidate('copying', copying = true); - - setTimeout(() => { - $$invalidate('copying', copying = false); - }, 2000); - - copyUrl(currentUrl, requestParameters); - } + copyUrl(currentUrl, requestParameters); + } const click_handler = () => handleTab(0); - const click_handler_1 = () => handleTab(1); - const click_handler_2 = () => handleTab(2); - function fieldswitch_used_binding(value, { header }) { + function fieldswitch_used_binding(value, header) { header.used = value; - $$invalidate('requestHeaders', requestHeaders); + $$invalidate(0, requestHeaders); } - function fieldswitch_value_binding(value_1, { header }) { + function fieldswitch_value_binding(value_1, header) { header.value = value_1; - $$invalidate('requestHeaders', requestHeaders); + $$invalidate(0, requestHeaders); } - function fieldswitch_used_binding_1(value, { param }) { + function fieldswitch_used_binding_1(value, param) { param.used = value; - $$invalidate('requestParameters', requestParameters); + $$invalidate(1, requestParameters); } - function fieldswitch_value_binding_1(value_1, { param }) { + function fieldswitch_value_binding_1(value_1, param) { param.value = value_1; - $$invalidate('requestParameters', requestParameters); + $$invalidate(1, requestParameters); } function textarea_input_handler() { requestBody = this.value; - $$invalidate('requestBody', requestBody); + $$invalidate(2, requestBody); } $$self.$set = $$props => { - if ('show' in $$props) $$invalidate('show', show = $$props.show); - if ('environments' in $$props) $$invalidate('environments', environments = $$props.environments); - if ('currentAction' in $$props) $$invalidate('currentAction', currentAction = $$props.currentAction); - if ('currentSample' in $$props) $$invalidate('currentSample', currentSample = $$props.currentSample); - if ('requestHeaders' in $$props) $$invalidate('requestHeaders', requestHeaders = $$props.requestHeaders); - if ('requestParameters' in $$props) $$invalidate('requestParameters', requestParameters = $$props.requestParameters); - if ('requestBody' in $$props) $$invalidate('requestBody', requestBody = $$props.requestBody); + if ("show" in $$props) $$invalidate(3, show = $$props.show); + if ("isDarkmode" in $$props) $$invalidate(4, isDarkmode = $$props.isDarkmode); + if ("environments" in $$props) $$invalidate(18, environments = $$props.environments); + if ("currentAction" in $$props) $$invalidate(5, currentAction = $$props.currentAction); + if ("currentSample" in $$props) $$invalidate(19, currentSample = $$props.currentSample); + if ("requestHeaders" in $$props) $$invalidate(0, requestHeaders = $$props.requestHeaders); + if ("requestParameters" in $$props) $$invalidate(1, requestParameters = $$props.requestParameters); + if ("requestBody" in $$props) $$invalidate(2, requestBody = $$props.requestBody); }; - let environment, currentUrl; + let environment; + let currentUrl; - $$self.$$.update = ($$dirty = { environments: 1, $env: 1, environment: 1, currentAction: 1, currentUrl: 1 }) => { - if ($$dirty.environments || $$dirty.$env) { $$invalidate('environment', environment = environments[$env]); } - if ($$dirty.environment || $$dirty.currentAction) { $$invalidate('currentUrl', currentUrl = urlParse(urlJoin(environment.url, currentAction.path))); } - if ($$dirty.currentUrl) { { - $$invalidate('error', error = currentUrl && undefined); - } } + $$self.$$.update = () => { + if ($$self.$$.dirty[0] & /*environments, $env*/ 264192) { + $$invalidate(10, environment = environments[$env]); + } + + if ($$self.$$.dirty[0] & /*environment, currentAction*/ 1056) { + $$invalidate(12, currentUrl = urlParse(urlJoin(environment.url, currentAction.path))); + } + + if ($$self.$$.dirty[0] & /*currentUrl*/ 4096) { + { + $$invalidate(8, error = currentUrl && undefined); + } + } }; - return { - show, - environments, - currentAction, - currentSample, + return [ requestHeaders, requestParameters, requestBody, + show, + isDarkmode, + currentAction, response, requestTab, error, copying, - handleClick, - handleTab, - handleCopy, environment, $env, currentUrl, $auth, $token, + handleClick, + handleTab, + handleCopy, + environments, + currentSample, click_handler, click_handler_1, click_handler_2, @@ -16146,22 +16246,142 @@ fieldswitch_used_binding_1, fieldswitch_value_binding_1, textarea_input_handler - }; + ]; } class PlaygroundPanel extends SvelteComponent { constructor(options) { super(); if (!document.getElementById("svelte-c3oocm-style")) add_css$8(); - init(this, options, instance$g, create_fragment$g, safe_not_equal, ["show", "environments", "currentAction", "currentSample", "requestHeaders", "requestParameters", "requestBody"]); + + init( + this, + options, + instance$g, + create_fragment$g, + safe_not_equal, + { + show: 3, + isDarkmode: 4, + environments: 18, + currentAction: 5, + currentSample: 19, + requestHeaders: 0, + requestParameters: 1, + requestBody: 2 + }, + [-1, -1] + ); } } - /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ScenarioPanel.svelte generated by Svelte v3.12.1 */ + /* usr/local/lib/node_modules/snowboard/templates/winter/panels/ScenarioPanel.svelte generated by Svelte v3.16.5 */ - // (30:2) + function create_else_block$4(ctx) { + let current; + + const collapsiblepanel = new CollapsiblePanel({ + props: { + isDarkmode: /*isDarkmode*/ ctx[4], + show: /*show*/ ctx[0], + $$slots: { + default: [create_default_slot$1], + body: [create_body_slot$1], + heading: [create_heading_slot$1] + }, + $$scope: { ctx } + } + }); + + return { + c() { + create_component(collapsiblepanel.$$.fragment); + }, + m(target, anchor) { + mount_component(collapsiblepanel, target, anchor); + current = true; + }, + p(ctx, dirty) { + const collapsiblepanel_changes = {}; + if (dirty & /*isDarkmode*/ 16) collapsiblepanel_changes.isDarkmode = /*isDarkmode*/ ctx[4]; + if (dirty & /*show*/ 1) collapsiblepanel_changes.show = /*show*/ ctx[0]; + + if (dirty & /*$$scope, response, request, index*/ 142) { + collapsiblepanel_changes.$$scope = { dirty, ctx }; + } + + collapsiblepanel.$set(collapsiblepanel_changes); + }, + i(local) { + if (current) return; + transition_in(collapsiblepanel.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(collapsiblepanel.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(collapsiblepanel, detaching); + } + }; + } + + // (30:0) {#if request.title === ''} + function create_if_block$b(ctx) { + let current; + + const responsepanel = new ResponsePanel({ + props: { + title: /*response*/ ctx[3].title, + description: /*response*/ ctx[3].description, + statusCode: /*response*/ ctx[3].statusCode, + headers: /*response*/ ctx[3].headers, + contentType: /*response*/ ctx[3].contentType, + example: /*response*/ ctx[3].example, + schema: /*response*/ ctx[3].schema + } + }); + + return { + c() { + create_component(responsepanel.$$.fragment); + }, + m(target, anchor) { + mount_component(responsepanel, target, anchor); + current = true; + }, + p(ctx, dirty) { + const responsepanel_changes = {}; + if (dirty & /*response*/ 8) responsepanel_changes.title = /*response*/ ctx[3].title; + if (dirty & /*response*/ 8) responsepanel_changes.description = /*response*/ ctx[3].description; + if (dirty & /*response*/ 8) responsepanel_changes.statusCode = /*response*/ ctx[3].statusCode; + if (dirty & /*response*/ 8) responsepanel_changes.headers = /*response*/ ctx[3].headers; + if (dirty & /*response*/ 8) responsepanel_changes.contentType = /*response*/ ctx[3].contentType; + if (dirty & /*response*/ 8) responsepanel_changes.example = /*response*/ ctx[3].example; + if (dirty & /*response*/ 8) responsepanel_changes.schema = /*response*/ ctx[3].schema; + responsepanel.$set(responsepanel_changes); + }, + i(local) { + if (current) return; + transition_in(responsepanel.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(responsepanel.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(responsepanel, detaching); + } + }; + } + + // (41:4) function create_heading_slot$1(ctx) { - var span, t_value = ctx.title(ctx.index) + "", t; + let span; + let t_value = /*title*/ ctx[5](/*index*/ ctx[1]) + ""; + let t; return { c() { @@ -16169,61 +16389,55 @@ t = text(t_value); attr(span, "slot", "heading"); }, - m(target, anchor) { insert(target, span, anchor); append(span, t); }, - - p(changed, ctx) { - if ((changed.index) && t_value !== (t_value = ctx.title(ctx.index) + "")) { - set_data(t, t_value); - } + p(ctx, dirty) { + if (dirty & /*index*/ 2 && t_value !== (t_value = /*title*/ ctx[5](/*index*/ ctx[1]) + "")) set_data(t, t_value); }, - d(detaching) { - if (detaching) { - detach(span); - } + if (detaching) detach(span); } }; } - // (31:2)
+ // (42:4)
function create_body_slot$1(ctx) { - var div, t, current; + let div; + let t; + let current; - var requestpanel = new RequestPanel({ - props: { - description: ctx.request.description, - headers: ctx.request.headers, - contentType: ctx.request.contentType, - example: ctx.request.example, - schema: ctx.request.schema - } - }); + const requestpanel = new RequestPanel({ + props: { + description: /*request*/ ctx[2].description, + headers: /*request*/ ctx[2].headers, + contentType: /*request*/ ctx[2].contentType, + example: /*request*/ ctx[2].example, + schema: /*request*/ ctx[2].schema + } + }); - var responsepanel = new ResponsePanel({ - props: { - title: ctx.response.title, - description: ctx.response.description, - statusCode: ctx.response.statusCode, - headers: ctx.response.headers, - contentType: ctx.response.contentType, - example: ctx.response.example, - schema: ctx.response.schema - } - }); + const responsepanel = new ResponsePanel({ + props: { + title: /*response*/ ctx[3].title, + description: /*response*/ ctx[3].description, + statusCode: /*response*/ ctx[3].statusCode, + headers: /*response*/ ctx[3].headers, + contentType: /*response*/ ctx[3].contentType, + example: /*response*/ ctx[3].example, + schema: /*response*/ ctx[3].schema + } + }); return { c() { div = element("div"); - requestpanel.$$.fragment.c(); + create_component(requestpanel.$$.fragment); t = space(); - responsepanel.$$.fragment.c(); + create_component(responsepanel.$$.fragment); attr(div, "slot", "body"); }, - m(target, anchor) { insert(target, div, anchor); mount_component(requestpanel, div, null); @@ -16231,244 +16445,293 @@ mount_component(responsepanel, div, null); current = true; }, - - p(changed, ctx) { - var requestpanel_changes = {}; - if (changed.request) requestpanel_changes.description = ctx.request.description; - if (changed.request) requestpanel_changes.headers = ctx.request.headers; - if (changed.request) requestpanel_changes.contentType = ctx.request.contentType; - if (changed.request) requestpanel_changes.example = ctx.request.example; - if (changed.request) requestpanel_changes.schema = ctx.request.schema; + p(ctx, dirty) { + const requestpanel_changes = {}; + if (dirty & /*request*/ 4) requestpanel_changes.description = /*request*/ ctx[2].description; + if (dirty & /*request*/ 4) requestpanel_changes.headers = /*request*/ ctx[2].headers; + if (dirty & /*request*/ 4) requestpanel_changes.contentType = /*request*/ ctx[2].contentType; + if (dirty & /*request*/ 4) requestpanel_changes.example = /*request*/ ctx[2].example; + if (dirty & /*request*/ 4) requestpanel_changes.schema = /*request*/ ctx[2].schema; requestpanel.$set(requestpanel_changes); - - var responsepanel_changes = {}; - if (changed.response) responsepanel_changes.title = ctx.response.title; - if (changed.response) responsepanel_changes.description = ctx.response.description; - if (changed.response) responsepanel_changes.statusCode = ctx.response.statusCode; - if (changed.response) responsepanel_changes.headers = ctx.response.headers; - if (changed.response) responsepanel_changes.contentType = ctx.response.contentType; - if (changed.response) responsepanel_changes.example = ctx.response.example; - if (changed.response) responsepanel_changes.schema = ctx.response.schema; + const responsepanel_changes = {}; + if (dirty & /*response*/ 8) responsepanel_changes.title = /*response*/ ctx[3].title; + if (dirty & /*response*/ 8) responsepanel_changes.description = /*response*/ ctx[3].description; + if (dirty & /*response*/ 8) responsepanel_changes.statusCode = /*response*/ ctx[3].statusCode; + if (dirty & /*response*/ 8) responsepanel_changes.headers = /*response*/ ctx[3].headers; + if (dirty & /*response*/ 8) responsepanel_changes.contentType = /*response*/ ctx[3].contentType; + if (dirty & /*response*/ 8) responsepanel_changes.example = /*response*/ ctx[3].example; + if (dirty & /*response*/ 8) responsepanel_changes.schema = /*response*/ ctx[3].schema; responsepanel.$set(responsepanel_changes); }, - i(local) { if (current) return; transition_in(requestpanel.$$.fragment, local); - transition_in(responsepanel.$$.fragment, local); - current = true; }, - o(local) { transition_out(requestpanel.$$.fragment, local); transition_out(responsepanel.$$.fragment, local); current = false; }, - d(detaching) { - if (detaching) { - detach(div); - } - + if (detaching) detach(div); destroy_component(requestpanel); - destroy_component(responsepanel); } }; } - // (29:0) + // (40:2) function create_default_slot$1(ctx) { - var t, current; + let t; + let current; return { c() { t = space(); }, - m(target, anchor) { insert(target, t, anchor); }, - p: noop, i: noop, o: noop, - d(detaching) { - if (detaching) { - detach(t); - } + if (detaching) detach(t); } }; } function create_fragment$h(ctx) { - var current; + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block$b, create_else_block$4]; + const if_blocks = []; - var collapsiblepanel = new CollapsiblePanel({ - props: { - show: ctx.show, - $$slots: { - default: [create_default_slot$1], - body: [create_body_slot$1], - heading: [create_heading_slot$1] - }, - $$scope: { ctx } + function select_block_type(ctx, dirty) { + if (/*request*/ ctx[2].title === "") return 0; + return 1; } - }); + + current_block_type_index = select_block_type(ctx, -1); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); return { c() { - collapsiblepanel.$$.fragment.c(); + if_block.c(); + if_block_anchor = empty(); }, - m(target, anchor) { - mount_component(collapsiblepanel, target, anchor); + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); current = true; }, + p(ctx, [dirty]) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx, dirty); - p(changed, ctx) { - var collapsiblepanel_changes = {}; - if (changed.show) collapsiblepanel_changes.show = ctx.show; - if (changed.$$scope || changed.response || changed.request || changed.index) collapsiblepanel_changes.$$scope = { changed, ctx }; - collapsiblepanel.$set(collapsiblepanel_changes); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx, dirty); + } else { + group_outros(); + + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + + check_outros(); + if_block = if_blocks[current_block_type_index]; + + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + if_block.c(); + } + + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } }, - i(local) { if (current) return; - transition_in(collapsiblepanel.$$.fragment, local); - + transition_in(if_block); current = true; }, - o(local) { - transition_out(collapsiblepanel.$$.fragment, local); + transition_out(if_block); current = false; }, - d(detaching) { - destroy_component(collapsiblepanel, detaching); + if_blocks[current_block_type_index].d(detaching); + if (detaching) detach(if_block_anchor); } }; } function instance$h($$self, $$props, $$invalidate) { - + let { show } = $$props; + let { count } = $$props; + let { index } = $$props; + let { request } = $$props; + let { response } = $$props; + let { isDarkmode } = $$props; - let { show, count, index, request, response } = $$props; + function title(index) { + if (request.title) { + return `Request ${request.title}`; + } - function title(index) { - if (request.title) { - return `Request ${request.title}`; - } - - if (count === 1) { - return "Request"; - } else { - return `Request ${index + 1}`; - } - } + if (count === 1) { + return "Request"; + } else { + return `Request ${index + 1}`; + } + } $$self.$set = $$props => { - if ('show' in $$props) $$invalidate('show', show = $$props.show); - if ('count' in $$props) $$invalidate('count', count = $$props.count); - if ('index' in $$props) $$invalidate('index', index = $$props.index); - if ('request' in $$props) $$invalidate('request', request = $$props.request); - if ('response' in $$props) $$invalidate('response', response = $$props.response); + if ("show" in $$props) $$invalidate(0, show = $$props.show); + if ("count" in $$props) $$invalidate(6, count = $$props.count); + if ("index" in $$props) $$invalidate(1, index = $$props.index); + if ("request" in $$props) $$invalidate(2, request = $$props.request); + if ("response" in $$props) $$invalidate(3, response = $$props.response); + if ("isDarkmode" in $$props) $$invalidate(4, isDarkmode = $$props.isDarkmode); }; - return { - show, - count, - index, - request, - response, - title - }; + return [show, index, request, response, isDarkmode, title, count]; } class ScenarioPanel extends SvelteComponent { constructor(options) { super(); - init(this, options, instance$h, create_fragment$h, safe_not_equal, ["show", "count", "index", "request", "response"]); + + init(this, options, instance$h, create_fragment$h, safe_not_equal, { + show: 0, + count: 6, + index: 1, + request: 2, + response: 3, + isDarkmode: 4 + }); } } - /* usr/local/lib/node_modules/snowboard/templates/winter.svelte generated by Svelte v3.12.1 */ - const { Object: Object_1, document: document_1 } = globals; + /* usr/local/lib/node_modules/snowboard/templates/winter.svelte generated by Svelte v3.16.5 */ + + const { document: document_1 } = globals; function add_css$9() { var style = element("style"); - style.id = 'svelte-t5bxdu-style'; - style.textContent = ".sidenav.svelte-t5bxdu{padding:1rem 0 1rem 0.75rem}.main.svelte-t5bxdu{padding:3rem;background-color:#fff;box-shadow:0 2px 0 2px #f5f5f5}.breadcrumb-right.svelte-t5bxdu{margin-top:0.3em}.box-wrapper.svelte-t5bxdu{border-radius:0}body{background-color:#fafafa}code[class*=\"language-\"], pre[class*=\"language-\"]{font-family:monospace}.token.number, .token.tag{display:inline;padding:inherit;font-size:inherit;line-height:inherit;text-align:inherit;vertical-align:inherit;border-radius:inherit;font-weight:inherit;white-space:inherit;background:inherit;margin:inherit}.icon-brand.svelte-t5bxdu{margin-right:0.5rem}.menu-collapsible.svelte-t5bxdu{display:none}.footer.svelte-t5bxdu .content.svelte-t5bxdu{transition:margin 0.3s}@media screen and (min-width: 768px){.menu-collapsible.svelte-t5bxdu{display:block;position:fixed;border-top:1px solid #eee;width:calc(25% - 0.5rem);height:calc(2.5rem + 10px);left:0;bottom:0;font-size:1.33333em;line-height:calc(2.5rem + 5px);text-align:center;color:#b5b5b5;font-weight:300;box-shadow:2px 0 0 #f5f5f5;cursor:pointer}.menu-collapsible.svelte-t5bxdu:hover{background:rgba(0, 0, 0, 0.05);box-shadow:2px 0 0 #eee;border-color:#e8e8e8}.is-collapsed.svelte-t5bxdu .sidenav.svelte-t5bxdu{width:3.75rem}.is-collapsed.svelte-t5bxdu .main.svelte-t5bxdu{width:calc(100% - 4.5rem)}.is-collapsed.svelte-t5bxdu .menu-collapsible.svelte-t5bxdu{width:calc(3rem - 2px)}.menu-collapsible.svelte-t5bxdu,.sidenav.svelte-t5bxdu,.main.svelte-t5bxdu{transition:width 0.3s}}"; + style.id = "svelte-1jcck2f-style"; + style.textContent = "html{height:100%}body{min-height:100%}.sidenav.svelte-1jcck2f{padding:1rem 0 1rem 0.75rem}.main.svelte-1jcck2f{padding:3rem;background-color:#fff;box-shadow:0 2px 0 2px #f5f5f5}.main.is-darkmode.svelte-1jcck2f{background-color:#000;box-shadow:0 2px 0 2px #363636}.breadcrumb-right.svelte-1jcck2f{margin-top:0.3em}.box-wrapper.svelte-1jcck2f{border-radius:0}.body-inner.svelte-1jcck2f{min-height:100vh;background-color:#fafafa}.body-inner.is-darkmode.svelte-1jcck2f{background-color:#000}.is-darkmode .input, .is-darkmode .select select, .is-darkmode\n .textarea{background-color:#484848;border-color:#484848;color:#fff}.is-darkmode .input:hover, .is-darkmode\n .is-hovered.input, .is-darkmode .is-hovered.textarea, .is-darkmode\n .select\n select.is-hovered, .is-darkmode .select select:hover, .is-darkmode\n .textarea:hover{border-color:#666}.is-darkmode .select select.is-focused, .is-darkmode\n .select\n select:active, .is-darkmode .select select:focus, .is-darkmode\n .textarea:active, .is-darkmode .textarea:focus{border-color:#888}.is-darkmode .input::placeholder, .is-darkmode\n .select\n select::placeholder, .is-darkmode .textarea::placeholder{color:#ccc}code[class*=\"language-\"], pre[class*=\"language-\"]{font-family:monospace}.token.number, .token.tag{display:inline;padding:inherit;font-size:inherit;line-height:inherit;text-align:inherit;vertical-align:inherit;border-radius:inherit;font-weight:inherit;white-space:inherit;background:inherit;margin:inherit}.icon-brand.svelte-1jcck2f{margin-right:0.5rem}.menu-collapsible.svelte-1jcck2f{display:none;position:fixed;width:calc(25% - 0.5rem);height:calc(2.5rem + 10px);left:0;bottom:0;font-size:1.33333em;line-height:calc(2.5rem + 5px);text-align:center;color:#b5b5b5;font-weight:300;border-top:1px solid #eee;box-shadow:2px 0 0 #f5f5f5;cursor:pointer}.menu-collapsible.svelte-1jcck2f:hover{background:rgba(0, 0, 0, 0.05);box-shadow:2px 0 0 #eee;border-color:#e8e8e8}.menu-collapsible.is-darkmode.svelte-1jcck2f{border-color:#363636;box-shadow:2px 0 0 #363636}.menu-collapsible.is-darkmode.svelte-1jcck2f:hover{background:rgba(255, 255, 255, 0.2);border-color:#363636;box-shadow:2px 0 0 #363636}.footer.is-darkmode.svelte-1jcck2f{background-color:#000}.footer.svelte-1jcck2f .content.svelte-1jcck2f{transition:margin 0.3s}@media screen and (min-width: 768px){.menu-collapsible.svelte-1jcck2f{display:block}.is-collapsed.svelte-1jcck2f .sidenav.svelte-1jcck2f{width:3.75rem}.is-collapsed.svelte-1jcck2f .main.svelte-1jcck2f{width:calc(100% - 4.5rem)}.is-collapsed.svelte-1jcck2f .menu-collapsible.svelte-1jcck2f{width:calc(3rem - 2px)}.menu-collapsible.svelte-1jcck2f,.sidenav.svelte-1jcck2f,.main.svelte-1jcck2f{transition:width 0.3s}}"; append(document_1.head, style); } function get_each_context$6(ctx, list, i) { - const child_ctx = Object_1.create(ctx); - child_ctx.request = list[i].request; - child_ctx.response = list[i].response; - child_ctx.index = i; + const child_ctx = ctx.slice(); + child_ctx[22] = list[i].request; + child_ctx[23] = list[i].response; + child_ctx[12] = i; return child_ctx; } function get_each_context_1$2(ctx, list, i) { - const child_ctx = Object_1.create(ctx); - child_ctx.tag = list[i]; + const child_ctx = ctx.slice(); + child_ctx[25] = list[i]; + child_ctx[12] = i; return child_ctx; } - // (311:6) {#if config.playground.enabled} - function create_if_block_6$1(ctx) { - var current; + // (438:8) {#if config.playground.enabled} + function create_if_block_8$1(ctx) { + let current; - var selectorpanel = new SelectorPanel({ - props: { - environments: ctx.config.playground.environments, - authenticating: ctx.authenticating - } - }); + const selectorpanel = new SelectorPanel({ + props: { + environments: /*config*/ ctx[4].playground.environments, + authenticating: /*authenticating*/ ctx[7] + } + }); return { c() { - selectorpanel.$$.fragment.c(); + create_component(selectorpanel.$$.fragment); }, - m(target, anchor) { mount_component(selectorpanel, target, anchor); current = true; }, - - p(changed, ctx) { - var selectorpanel_changes = {}; - if (changed.config) selectorpanel_changes.environments = ctx.config.playground.environments; - if (changed.authenticating) selectorpanel_changes.authenticating = ctx.authenticating; + p(ctx, dirty) { + const selectorpanel_changes = {}; + if (dirty & /*config*/ 16) selectorpanel_changes.environments = /*config*/ ctx[4].playground.environments; + if (dirty & /*authenticating*/ 128) selectorpanel_changes.authenticating = /*authenticating*/ ctx[7]; selectorpanel.$set(selectorpanel_changes); }, - i(local) { if (current) return; transition_in(selectorpanel.$$.fragment, local); - current = true; }, - o(local) { transition_out(selectorpanel.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(selectorpanel, detaching); } }; } - // (336:6) {#if collapsed} - function create_if_block_5$1(ctx) { - var span; + // (443:8) {#if darkMode.enable} + function create_if_block_7$1(ctx) { + let div; + let a; + let span; + let i; + let dispose; + + return { + c() { + div = element("div"); + a = element("a"); + span = element("span"); + i = element("i"); + attr(i, "class", "fas fa-lg"); + toggle_class(i, "fa-moon", /*darkMode*/ ctx[9].active); + toggle_class(i, "fa-sun", !/*darkMode*/ ctx[9].active); + attr(span, "class", "icon is-medium has-text-grey-light"); + attr(a, "href", "javascript:void(0)"); + attr(a, "title", "Dark Mode"); + attr(a, "class", "navbar-link is-arrowless"); + attr(div, "class", "navbar-item has-dropdown is-hoverable"); + dispose = listen(a, "click", /*darkToggle*/ ctx[19]); + }, + m(target, anchor) { + insert(target, div, anchor); + append(div, a); + append(a, span); + append(span, i); + }, + p(ctx, dirty) { + if (dirty & /*darkMode*/ 512) { + toggle_class(i, "fa-moon", /*darkMode*/ ctx[9].active); + } + + if (dirty & /*darkMode*/ 512) { + toggle_class(i, "fa-sun", !/*darkMode*/ ctx[9].active); + } + }, + d(detaching) { + if (detaching) detach(div); + dispose(); + } + }; + } + + // (485:8) {#if collapsed} + function create_if_block_6$1(ctx) { + let span; return { c() { @@ -16477,97 +16740,114 @@ attr(span, "class", "icon"); attr(span, "title", "Expand ["); }, - m(target, anchor) { insert(target, span, anchor); }, - d(detaching) { - if (detaching) { - detach(span); - } + if (detaching) detach(span); } }; } - // (339:6) {#if !collapsed} - function create_if_block_4$1(ctx) { - var span0, t_1, span1; + // (488:8) {#if !collapsed} + function create_if_block_5$1(ctx) { + let span0; + let t1; + let span1; return { c() { span0 = element("span"); span0.textContent = "«"; - t_1 = space(); + t1 = space(); span1 = element("span"); span1.textContent = "Collapse sidebar"; attr(span0, "class", "icon"); attr(span1, "class", "fa-xs"); }, - m(target, anchor) { insert(target, span0, anchor); - insert(target, t_1, anchor); + insert(target, t1, anchor); insert(target, span1, anchor); }, - d(detaching) { - if (detaching) { - detach(span0); - detach(t_1); - detach(span1); - } + if (detaching) detach(span0); + if (detaching) detach(t1); + if (detaching) detach(span1); } }; } - // (347:4) {#if index === -1} - function create_if_block_3$2(ctx) { - var div, raw_value = markdown(ctx.description) + ""; + // (498:6) {#if index === -1} + function create_if_block_4$1(ctx) { + let div; + let raw_value = markdown(/*description*/ ctx[1]) + ""; return { c() { div = element("div"); attr(div, "class", "content"); }, - m(target, anchor) { insert(target, div, anchor); div.innerHTML = raw_value; }, - - p(changed, ctx) { - if ((changed.description) && raw_value !== (raw_value = markdown(ctx.description) + "")) { - div.innerHTML = raw_value; - } + p(ctx, dirty) { + if (dirty & /*description*/ 2 && raw_value !== (raw_value = markdown(/*description*/ ctx[1]) + "")) div.innerHTML = raw_value;; }, - d(detaching) { - if (detaching) { - detach(div); - } + if (detaching) detach(div); } }; } - // (353:4) {#if currentAction} - function create_if_block$b(ctx) { - var div2, div0, h1, t0_value = ctx.currentAction.title + "", t0, t1, div1, nav, ul, t2, hr, t3, div3, code0, t4_value = ctx.currentAction.method + "", t4, code0_class_value, t5, code1, t6_value = ctx.currentAction.pathTemplate + "", t6, t7, div4, raw_value = markdown(ctx.currentAction.description) + "", t8, t9, t10, each1_anchor, current; - - let each_value_1 = ctx.currentAction.tags; - + // (504:6) {#if currentAction} + function create_if_block$c(ctx) { + let div2; + let div0; + let h1; + let t0_value = /*currentAction*/ ctx[10].title + ""; + let t0; + let t1; + let div1; + let nav; + let ul; + let t2; + let hr; + let t3; + let div3; + let code0; + let t4_value = /*currentAction*/ ctx[10].method + ""; + let t4; + let code0_class_value; + let t5; + let code1; + let t6_value = /*currentAction*/ ctx[10].pathTemplate + ""; + let t6; + let t7; + let div4; + let raw_value = markdown(/*currentAction*/ ctx[10].description) + ""; + let t8; + let t9; + let t10; + let each1_anchor; + let current; + let each_value_1 = /*currentAction*/ ctx[10].tags; let each_blocks_1 = []; for (let i = 0; i < each_value_1.length; i += 1) { each_blocks_1[i] = create_each_block_1$2(get_each_context_1$2(ctx, each_value_1, i)); } - var if_block = (ctx.config.playground.enabled) && create_if_block_1$8(ctx); + let if_block = /*config*/ ctx[4].playground.enabled && create_if_block_1$8(ctx); - var parameterpanel = new ParameterPanel({ props: { parameters: ctx.currentAction.parameters } }); - - let each_value = ctx.currentAction.transactions; + const parameterpanel = new ParameterPanel({ + props: { + parameters: /*currentAction*/ ctx[10].parameters + } + }); + let each_value = /*currentAction*/ ctx[10].transactions; let each_blocks = []; for (let i = 0; i < each_value.length; i += 1) { @@ -16607,7 +16887,7 @@ t8 = space(); if (if_block) if_block.c(); t9 = space(); - parameterpanel.$$.fragment.c(); + create_component(parameterpanel.$$.fragment); t10 = space(); for (let i = 0; i < each_blocks.length; i += 1) { @@ -16617,16 +16897,15 @@ each1_anchor = empty(); attr(h1, "class", "title is-4"); attr(div0, "class", "column"); - attr(nav, "class", "breadcrumb breadcrumb-right is-pulled-right svelte-t5bxdu"); + attr(nav, "class", "breadcrumb breadcrumb-right is-pulled-right svelte-1jcck2f"); attr(nav, "aria-label", "breadcrumbs"); attr(div1, "class", "column"); attr(div2, "class", "columns"); - attr(code0, "class", code0_class_value = "tag is-uppercase " + colorize(ctx.currentAction.method) + " svelte-t5bxdu"); + attr(code0, "class", code0_class_value = "tag is-uppercase " + colorize(/*currentAction*/ ctx[10].method) + " svelte-1jcck2f"); attr(code1, "class", "tag "); attr(div3, "class", "tags has-addons are-large"); attr(div4, "class", "content"); }, - m(target, anchor) { insert(target, div2, anchor); append(div2, div0); @@ -16666,21 +16945,18 @@ insert(target, each1_anchor, anchor); current = true; }, + p(ctx, dirty) { + if ((!current || dirty & /*currentAction*/ 1024) && t0_value !== (t0_value = /*currentAction*/ ctx[10].title + "")) set_data(t0, t0_value); - p(changed, ctx) { - if ((!current || changed.currentAction) && t0_value !== (t0_value = ctx.currentAction.title + "")) { - set_data(t0, t0_value); - } - - if (changed.currentAction) { - each_value_1 = ctx.currentAction.tags; - + if (dirty & /*currentAction, slugify, handleGroupClick*/ 17408) { + each_value_1 = /*currentAction*/ ctx[10].tags; let i; + for (i = 0; i < each_value_1.length; i += 1) { const child_ctx = get_each_context_1$2(ctx, each_value_1, i); if (each_blocks_1[i]) { - each_blocks_1[i].p(changed, child_ctx); + each_blocks_1[i].p(child_ctx, dirty); } else { each_blocks_1[i] = create_each_block_1$2(child_ctx); each_blocks_1[i].c(); @@ -16691,28 +16967,22 @@ for (; i < each_blocks_1.length; i += 1) { each_blocks_1[i].d(1); } + each_blocks_1.length = each_value_1.length; } - if ((!current || changed.currentAction) && t4_value !== (t4_value = ctx.currentAction.method + "")) { - set_data(t4, t4_value); - } + if ((!current || dirty & /*currentAction*/ 1024) && t4_value !== (t4_value = /*currentAction*/ ctx[10].method + "")) set_data(t4, t4_value); - if ((!current || changed.currentAction) && code0_class_value !== (code0_class_value = "tag is-uppercase " + colorize(ctx.currentAction.method) + " svelte-t5bxdu")) { + if (!current || dirty & /*currentAction*/ 1024 && code0_class_value !== (code0_class_value = "tag is-uppercase " + colorize(/*currentAction*/ ctx[10].method) + " svelte-1jcck2f")) { attr(code0, "class", code0_class_value); } - if ((!current || changed.currentAction) && t6_value !== (t6_value = ctx.currentAction.pathTemplate + "")) { - set_data(t6, t6_value); - } + if ((!current || dirty & /*currentAction*/ 1024) && t6_value !== (t6_value = /*currentAction*/ ctx[10].pathTemplate + "")) set_data(t6, t6_value); + if ((!current || dirty & /*currentAction*/ 1024) && raw_value !== (raw_value = markdown(/*currentAction*/ ctx[10].description) + "")) div4.innerHTML = raw_value;; - if ((!current || changed.currentAction) && raw_value !== (raw_value = markdown(ctx.currentAction.description) + "")) { - div4.innerHTML = raw_value; - } - - if (ctx.config.playground.enabled) { + if (/*config*/ ctx[4].playground.enabled) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); transition_in(if_block, 1); } else { if_block = create_if_block_1$8(ctx); @@ -16722,25 +16992,27 @@ } } else if (if_block) { group_outros(); + transition_out(if_block, 1, 1, () => { if_block = null; }); + check_outros(); } - var parameterpanel_changes = {}; - if (changed.currentAction) parameterpanel_changes.parameters = ctx.currentAction.parameters; + const parameterpanel_changes = {}; + if (dirty & /*currentAction*/ 1024) parameterpanel_changes.parameters = /*currentAction*/ ctx[10].parameters; parameterpanel.$set(parameterpanel_changes); - if (changed.currentAction) { - each_value = ctx.currentAction.transactions; - + if (dirty & /*darkMode, currentAction*/ 1536) { + each_value = /*currentAction*/ ctx[10].transactions; let i; + for (i = 0; i < each_value.length; i += 1) { const child_ctx = get_each_context$6(ctx, each_value, i); if (each_blocks[i]) { - each_blocks[i].p(changed, child_ctx); + each_blocks[i].p(child_ctx, dirty); transition_in(each_blocks[i], 1); } else { each_blocks[i] = create_each_block$6(child_ctx); @@ -16751,17 +17023,17 @@ } group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { out(i); } + check_outros(); } }, - i(local) { if (current) return; transition_in(if_block); - transition_in(parameterpanel.$$.fragment, local); for (let i = 0; i < each_value.length; i += 1) { @@ -16770,248 +17042,278 @@ current = true; }, - o(local) { transition_out(if_block); transition_out(parameterpanel.$$.fragment, local); - each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { transition_out(each_blocks[i]); } current = false; }, - d(detaching) { - if (detaching) { - detach(div2); - } - + if (detaching) detach(div2); destroy_each(each_blocks_1, detaching); - - if (detaching) { - detach(t2); - detach(hr); - detach(t3); - detach(div3); - detach(t7); - detach(div4); - detach(t8); - } - + if (detaching) detach(t2); + if (detaching) detach(hr); + if (detaching) detach(t3); + if (detaching) detach(div3); + if (detaching) detach(t7); + if (detaching) detach(div4); + if (detaching) detach(t8); if (if_block) if_block.d(detaching); - - if (detaching) { - detach(t9); - } - + if (detaching) detach(t9); destroy_component(parameterpanel, detaching); - - if (detaching) { - detach(t10); - } - + if (detaching) detach(t10); destroy_each(each_blocks, detaching); - - if (detaching) { - detach(each1_anchor); - } + if (detaching) detach(each1_anchor); } }; } - // (363:14) {#each currentAction.tags as tag} + // (518:20) {:else} + function create_else_block$5(ctx) { + let a; + let t_value = /*tag*/ ctx[25] + ""; + let t; + let a_data_slug_value; + let a_href_value; + let dispose; + + return { + c() { + a = element("a"); + t = text(t_value); + attr(a, "data-slug", a_data_slug_value = slugify(/*tag*/ ctx[25])); + attr(a, "href", a_href_value = "#/g~" + slugify(/*tag*/ ctx[25])); + dispose = listen(a, "click", /*handleGroupClick*/ ctx[14]); + }, + m(target, anchor) { + insert(target, a, anchor); + append(a, t); + }, + p(ctx, dirty) { + if (dirty & /*currentAction*/ 1024 && t_value !== (t_value = /*tag*/ ctx[25] + "")) set_data(t, t_value); + + if (dirty & /*currentAction*/ 1024 && a_data_slug_value !== (a_data_slug_value = slugify(/*tag*/ ctx[25]))) { + attr(a, "data-slug", a_data_slug_value); + } + + if (dirty & /*currentAction*/ 1024 && a_href_value !== (a_href_value = "#/g~" + slugify(/*tag*/ ctx[25]))) { + attr(a, "href", a_href_value); + } + }, + d(detaching) { + if (detaching) detach(a); + dispose(); + } + }; + } + + // (516:20) {#if index === 0} + function create_if_block_3$3(ctx) { + let a; + let t_value = /*tag*/ ctx[25] + ""; + let t; + + return { + c() { + a = element("a"); + t = text(t_value); + attr(a, "href", "javascript:void(0)"); + }, + m(target, anchor) { + insert(target, a, anchor); + append(a, t); + }, + p(ctx, dirty) { + if (dirty & /*currentAction*/ 1024 && t_value !== (t_value = /*tag*/ ctx[25] + "")) set_data(t, t_value); + }, + d(detaching) { + if (detaching) detach(a); + } + }; + } + + // (514:16) {#each currentAction.tags as tag, index} function create_each_block_1$2(ctx) { - var li, a, t0_value = ctx.tag + "", t0, t1; + let li; + let t; + + function select_block_type(ctx, dirty) { + if (/*index*/ ctx[12] === 0) return create_if_block_3$3; + return create_else_block$5; + } + + let current_block_type = select_block_type(ctx, -1); + let if_block = current_block_type(ctx); return { c() { li = element("li"); - a = element("a"); - t0 = text(t0_value); - t1 = space(); - attr(a, "href", "javascript:void(0)"); + if_block.c(); + t = space(); }, - m(target, anchor) { insert(target, li, anchor); - append(li, a); - append(a, t0); - append(li, t1); + if_block.m(li, null); + append(li, t); }, - - p(changed, ctx) { - if ((changed.currentAction) && t0_value !== (t0_value = ctx.tag + "")) { - set_data(t0, t0_value); - } + p(ctx, dirty) { + if_block.p(ctx, dirty); }, - d(detaching) { - if (detaching) { - detach(li); - } + if (detaching) detach(li); + if_block.d(); } }; } - // (386:6) {#if config.playground.enabled} + // (546:8) {#if config.playground.enabled} function create_if_block_1$8(ctx) { - var if_block_anchor, current; - - var if_block = (ctx.environment.playground !== false) && create_if_block_2$4(ctx); + let if_block_anchor; + let current; + let if_block = /*environment*/ ctx[11].playground !== false && create_if_block_2$5(ctx); return { c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, - m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); current = true; }, - - p(changed, ctx) { - if (ctx.environment.playground !== false) { + p(ctx, dirty) { + if (/*environment*/ ctx[11].playground !== false) { if (if_block) { - if_block.p(changed, ctx); + if_block.p(ctx, dirty); transition_in(if_block, 1); } else { - if_block = create_if_block_2$4(ctx); + if_block = create_if_block_2$5(ctx); if_block.c(); transition_in(if_block, 1); if_block.m(if_block_anchor.parentNode, if_block_anchor); } } else if (if_block) { group_outros(); + transition_out(if_block, 1, 1, () => { if_block = null; }); + check_outros(); } }, - i(local) { if (current) return; transition_in(if_block); current = true; }, - o(local) { transition_out(if_block); current = false; }, - d(detaching) { if (if_block) if_block.d(detaching); - - if (detaching) { - detach(if_block_anchor); - } + if (detaching) detach(if_block_anchor); } }; } - // (387:8) {#if environment.playground !== false} - function create_if_block_2$4(ctx) { - var current; + // (547:10) {#if environment.playground !== false} + function create_if_block_2$5(ctx) { + let current; - var playgroundpanel = new PlaygroundPanel({ - props: { - currentAction: ctx.currentAction, - environments: ctx.config.playground.environments, - currentSample: sample(ctx.currentAction), - requestHeaders: headersMap(ctx.currentAction), - requestParameters: parametersMap(ctx.currentAction), - requestBody: bodyMap(ctx.currentAction) - } - }); + const playgroundpanel = new PlaygroundPanel({ + props: { + currentAction: /*currentAction*/ ctx[10], + environments: /*config*/ ctx[4].playground.environments, + currentSample: sample(/*currentAction*/ ctx[10]), + requestHeaders: headersMap(/*currentAction*/ ctx[10]), + requestParameters: parametersMap(/*currentAction*/ ctx[10]), + requestBody: bodyMap(/*currentAction*/ ctx[10]), + isDarkmode: /*darkMode*/ ctx[9].active + } + }); return { c() { - playgroundpanel.$$.fragment.c(); + create_component(playgroundpanel.$$.fragment); }, - m(target, anchor) { mount_component(playgroundpanel, target, anchor); current = true; }, - - p(changed, ctx) { - var playgroundpanel_changes = {}; - if (changed.currentAction) playgroundpanel_changes.currentAction = ctx.currentAction; - if (changed.config) playgroundpanel_changes.environments = ctx.config.playground.environments; - if (changed.currentAction) playgroundpanel_changes.currentSample = sample(ctx.currentAction); - if (changed.currentAction) playgroundpanel_changes.requestHeaders = headersMap(ctx.currentAction); - if (changed.currentAction) playgroundpanel_changes.requestParameters = parametersMap(ctx.currentAction); - if (changed.currentAction) playgroundpanel_changes.requestBody = bodyMap(ctx.currentAction); + p(ctx, dirty) { + const playgroundpanel_changes = {}; + if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.currentAction = /*currentAction*/ ctx[10]; + if (dirty & /*config*/ 16) playgroundpanel_changes.environments = /*config*/ ctx[4].playground.environments; + if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.currentSample = sample(/*currentAction*/ ctx[10]); + if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.requestHeaders = headersMap(/*currentAction*/ ctx[10]); + if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.requestParameters = parametersMap(/*currentAction*/ ctx[10]); + if (dirty & /*currentAction*/ 1024) playgroundpanel_changes.requestBody = bodyMap(/*currentAction*/ ctx[10]); + if (dirty & /*darkMode*/ 512) playgroundpanel_changes.isDarkmode = /*darkMode*/ ctx[9].active; playgroundpanel.$set(playgroundpanel_changes); }, - i(local) { if (current) return; transition_in(playgroundpanel.$$.fragment, local); - current = true; }, - o(local) { transition_out(playgroundpanel.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(playgroundpanel, detaching); } }; } - // (400:6) {#each currentAction.transactions as { request, response } + // (561:8) {#each currentAction.transactions as { request, response } function create_each_block$6(ctx) { - var current; + let current; - var scenariopanel = new ScenarioPanel({ - props: { - show: ctx.index === 0, - request: ctx.request, - response: ctx.response, - index: ctx.index, - count: ctx.currentAction.transactions.length - } - }); + const scenariopanel = new ScenarioPanel({ + props: { + show: /*index*/ ctx[12] === 0, + isDarkmode: /*darkMode*/ ctx[9].active, + request: /*request*/ ctx[22], + response: /*response*/ ctx[23], + index: /*index*/ ctx[12], + count: /*currentAction*/ ctx[10].transactions.length + } + }); return { c() { - scenariopanel.$$.fragment.c(); + create_component(scenariopanel.$$.fragment); }, - m(target, anchor) { mount_component(scenariopanel, target, anchor); current = true; }, - - p(changed, ctx) { - var scenariopanel_changes = {}; - if (changed.currentAction) scenariopanel_changes.request = ctx.request; - if (changed.currentAction) scenariopanel_changes.response = ctx.response; - if (changed.currentAction) scenariopanel_changes.count = ctx.currentAction.transactions.length; + p(ctx, dirty) { + const scenariopanel_changes = {}; + if (dirty & /*darkMode*/ 512) scenariopanel_changes.isDarkmode = /*darkMode*/ ctx[9].active; + if (dirty & /*currentAction*/ 1024) scenariopanel_changes.request = /*request*/ ctx[22]; + if (dirty & /*currentAction*/ 1024) scenariopanel_changes.response = /*response*/ ctx[23]; + if (dirty & /*currentAction*/ 1024) scenariopanel_changes.count = /*currentAction*/ ctx[10].transactions.length; scenariopanel.$set(scenariopanel_changes); }, - i(local) { if (current) return; transition_in(scenariopanel.$$.fragment, local); - current = true; }, - o(local) { transition_out(scenariopanel.$$.fragment, local); current = false; }, - d(detaching) { destroy_component(scenariopanel, detaching); } @@ -17019,34 +17321,67 @@ } function create_fragment$i(ctx) { - var nav, div0, a0, span0, t0, span1, t1, t2, a1, t5, div2, div1, t6, div6, div4, t7, div3, t8, t9, div5, t10, t11, footer, div7, p, strong, t12, t13, a2, current, dispose; + let div8; + let nav; + let div0; + let a0; + let span0; + let t0; + let span1; + let t1; + let t2; + let a1; + let t5; + let div2; + let div1; + let t6; + let t7; + let div6; + let div4; + let t8; + let div3; + let t9; + let t10; + let div5; + let t11; + let t12; + let footer; + let div7; + let p; + let strong0; + let t13; + let t14; + let a2; + let current; + let dispose; + let if_block0 = /*config*/ ctx[4].playground.enabled && create_if_block_8$1(ctx); + let if_block1 = /*darkMode*/ ctx[9].enable && create_if_block_7$1(ctx); - var if_block0 = (ctx.config.playground.enabled) && create_if_block_6$1(ctx); + const menupanel = new MenuPanel({ + props: { + tagActions: /*tagActions*/ ctx[3], + tagHeaders: toc(/*description*/ ctx[1]), + currentSlug: /*currentAction*/ ctx[10] && /*currentAction*/ ctx[10].slug, + actionsCount: /*actions*/ ctx[2].length, + isCollapsed: /*collapsed*/ ctx[6], + isDarkmode: /*darkMode*/ ctx[9].active, + query: /*query*/ ctx[8], + config: /*config*/ ctx[4], + handleClick: /*handleClick*/ ctx[13], + handleGroupClick: /*handleGroupClick*/ ctx[14], + tocClick: /*tocClick*/ ctx[15], + searchClick: /*searchClick*/ ctx[18] + } + }); - var menupanel = new MenuPanel({ - props: { - tagActions: ctx.tagActions, - tagHeaders: toc(ctx.description), - currentSlug: ctx.currentAction && ctx.currentAction.slug, - actionsCount: ctx.actions.length, - isCollapsed: ctx.collapsed, - config: ctx.config, - handleClick: ctx.handleClick, - tocClick: ctx.tocClick, - searchClick: ctx.searchClick - } - }); - - var if_block1 = (ctx.collapsed) && create_if_block_5$1(ctx); - - var if_block2 = (!ctx.collapsed) && create_if_block_4$1(ctx); - - var if_block3 = (ctx.index === -1) && create_if_block_3$2(ctx); - - var if_block4 = (ctx.currentAction) && create_if_block$b(ctx); + let if_block2 = /*collapsed*/ ctx[6] && create_if_block_6$1(ctx); + let if_block3 = !/*collapsed*/ ctx[6] && create_if_block_5$1(ctx); + let if_block4 = /*index*/ ctx[12] === -1 && create_if_block_4$1(ctx); + let if_block5 = /*currentAction*/ ctx[10] && create_if_block$c(ctx); return { c() { + div8 = element("div"); nav = element("nav"); div0 = element("div"); a0 = element("a"); @@ -17054,38 +17389,44 @@ span0.innerHTML = ``; t0 = space(); span1 = element("span"); - t1 = text(ctx.title); + t1 = text(/*title*/ ctx[0]); t2 = space(); a1 = element("a"); - a1.innerHTML = ` `; + + a1.innerHTML = ` + + `; + t5 = space(); div2 = element("div"); div1 = element("div"); if (if_block0) if_block0.c(); t6 = space(); + if (if_block1) if_block1.c(); + t7 = space(); div6 = element("div"); div4 = element("div"); - menupanel.$$.fragment.c(); - t7 = space(); - div3 = element("div"); - if (if_block1) if_block1.c(); + create_component(menupanel.$$.fragment); t8 = space(); + div3 = element("div"); if (if_block2) if_block2.c(); t9 = space(); - div5 = element("div"); if (if_block3) if_block3.c(); t10 = space(); + div5 = element("div"); if (if_block4) if_block4.c(); t11 = space(); + if (if_block5) if_block5.c(); + t12 = space(); footer = element("footer"); div7 = element("div"); p = element("p"); - strong = element("strong"); - t12 = text(ctx.title); - t13 = text("\n powered by\n "); + strong0 = element("strong"); + t13 = text(/*title*/ ctx[0]); + t14 = text("\n powered by\n "); a2 = element("a"); a2.innerHTML = `Snowboard.`; - attr(span0, "class", "icon icon-brand is-medium has-text-grey-light svelte-t5bxdu"); + attr(span0, "class", "icon icon-brand is-medium has-text-grey-light svelte-1jcck2f"); attr(span1, "class", "title is-4"); attr(a0, "href", "javascript:void(0)"); attr(a0, "class", "navbar-item"); @@ -17101,27 +17442,32 @@ attr(nav, "class", "navbar is-fixed-top has-shadow"); attr(nav, "role", "navigation"); attr(nav, "aria-label", "main navigation"); - attr(div3, "class", "menu-collapsible svelte-t5bxdu"); - attr(div4, "class", "column is-one-quarter sidenav svelte-t5bxdu"); + attr(div3, "class", "menu-collapsible svelte-1jcck2f"); + toggle_class(div3, "is-darkmode", /*darkMode*/ ctx[9].active); + attr(div4, "class", "column is-one-quarter sidenav svelte-1jcck2f"); attr(div4, "id", "mainnav"); - toggle_class(div4, "is-hidden-mobile", ctx.showMenu); - attr(div5, "class", "column is-three-quarters main svelte-t5bxdu"); - attr(div6, "class", "columns svelte-t5bxdu"); - toggle_class(div6, "is-collapsed", ctx.collapsed); + toggle_class(div4, "is-hidden-mobile", /*showMenu*/ ctx[5]); + attr(div5, "class", "column is-three-quarters main svelte-1jcck2f"); + toggle_class(div5, "is-darkmode", /*darkMode*/ ctx[9].active); + attr(div6, "class", "columns svelte-1jcck2f"); + toggle_class(div6, "is-collapsed", /*collapsed*/ ctx[6]); attr(a2, "href", "https://github.com/bukalapak/snowboard"); attr(a2, "target", "_blank"); - attr(div7, "class", "content column is-paddingless has-text-centered svelte-t5bxdu"); - toggle_class(div7, "is-offset-one-quarter", !ctx.collapsed); - attr(footer, "class", "footer svelte-t5bxdu"); + attr(div7, "class", "content column is-paddingless has-text-centered svelte-1jcck2f"); + toggle_class(div7, "is-offset-one-quarter", !/*collapsed*/ ctx[6]); + attr(footer, "class", "footer svelte-1jcck2f"); + toggle_class(footer, "is-darkmode", /*darkMode*/ ctx[9].active); + attr(div8, "class", "body-inner svelte-1jcck2f"); + toggle_class(div8, "is-darkmode", /*darkMode*/ ctx[9].active); dispose = [ - listen(a1, "click", ctx.burgerClick), - listen(div3, "click", ctx.collapseToggle) + listen(a1, "click", /*burgerClick*/ ctx[16]), + listen(div3, "click", /*collapseToggle*/ ctx[17]) ]; }, - m(target, anchor) { - insert(target, nav, anchor); + insert(target, div8, anchor); + append(div8, nav); append(nav, div0); append(div0, a0); append(a0, span0); @@ -17134,378 +17480,453 @@ append(nav, div2); append(div2, div1); if (if_block0) if_block0.m(div1, null); - insert(target, t6, anchor); - insert(target, div6, anchor); + append(div1, t6); + if (if_block1) if_block1.m(div1, null); + append(div8, t7); + append(div8, div6); append(div6, div4); mount_component(menupanel, div4, null); - append(div4, t7); + append(div4, t8); append(div4, div3); - if (if_block1) if_block1.m(div3, null); - append(div3, t8); if (if_block2) if_block2.m(div3, null); - append(div6, t9); + append(div3, t9); + if (if_block3) if_block3.m(div3, null); + append(div6, t10); append(div6, div5); - if (if_block3) if_block3.m(div5, null); - append(div5, t10); if (if_block4) if_block4.m(div5, null); - insert(target, t11, anchor); - insert(target, footer, anchor); + append(div5, t11); + if (if_block5) if_block5.m(div5, null); + append(div8, t12); + append(div8, footer); append(footer, div7); append(div7, p); - append(p, strong); - append(strong, t12); - append(p, t13); + append(p, strong0); + append(strong0, t13); + append(p, t14); append(p, a2); current = true; }, + p(ctx, [dirty]) { + if (!current || dirty & /*title*/ 1) set_data(t1, /*title*/ ctx[0]); - p(changed, ctx) { - if (!current || changed.title) { - set_data(t1, ctx.title); - } - - if (ctx.config.playground.enabled) { + if (/*config*/ ctx[4].playground.enabled) { if (if_block0) { - if_block0.p(changed, ctx); + if_block0.p(ctx, dirty); transition_in(if_block0, 1); } else { - if_block0 = create_if_block_6$1(ctx); + if_block0 = create_if_block_8$1(ctx); if_block0.c(); transition_in(if_block0, 1); - if_block0.m(div1, null); + if_block0.m(div1, t6); } } else if (if_block0) { group_outros(); + transition_out(if_block0, 1, 1, () => { if_block0 = null; }); + check_outros(); } - var menupanel_changes = {}; - if (changed.tagActions) menupanel_changes.tagActions = ctx.tagActions; - if (changed.description) menupanel_changes.tagHeaders = toc(ctx.description); - if (changed.currentAction) menupanel_changes.currentSlug = ctx.currentAction && ctx.currentAction.slug; - if (changed.actions) menupanel_changes.actionsCount = ctx.actions.length; - if (changed.collapsed) menupanel_changes.isCollapsed = ctx.collapsed; - if (changed.config) menupanel_changes.config = ctx.config; - menupanel.$set(menupanel_changes); - - if (ctx.collapsed) { - if (!if_block1) { - if_block1 = create_if_block_5$1(ctx); + if (/*darkMode*/ ctx[9].enable) { + if (if_block1) { + if_block1.p(ctx, dirty); + } else { + if_block1 = create_if_block_7$1(ctx); if_block1.c(); - if_block1.m(div3, t8); + if_block1.m(div1, null); } } else if (if_block1) { if_block1.d(1); if_block1 = null; } - if (!ctx.collapsed) { + const menupanel_changes = {}; + if (dirty & /*tagActions*/ 8) menupanel_changes.tagActions = /*tagActions*/ ctx[3]; + if (dirty & /*description*/ 2) menupanel_changes.tagHeaders = toc(/*description*/ ctx[1]); + if (dirty & /*currentAction*/ 1024) menupanel_changes.currentSlug = /*currentAction*/ ctx[10] && /*currentAction*/ ctx[10].slug; + if (dirty & /*actions*/ 4) menupanel_changes.actionsCount = /*actions*/ ctx[2].length; + if (dirty & /*collapsed*/ 64) menupanel_changes.isCollapsed = /*collapsed*/ ctx[6]; + if (dirty & /*darkMode*/ 512) menupanel_changes.isDarkmode = /*darkMode*/ ctx[9].active; + if (dirty & /*query*/ 256) menupanel_changes.query = /*query*/ ctx[8]; + if (dirty & /*config*/ 16) menupanel_changes.config = /*config*/ ctx[4]; + menupanel.$set(menupanel_changes); + + if (/*collapsed*/ ctx[6]) { if (!if_block2) { - if_block2 = create_if_block_4$1(ctx); + if_block2 = create_if_block_6$1(ctx); if_block2.c(); - if_block2.m(div3, null); + if_block2.m(div3, t9); + } else { + } } else if (if_block2) { if_block2.d(1); if_block2 = null; } - if (changed.showMenu) { - toggle_class(div4, "is-hidden-mobile", ctx.showMenu); - } - - if (ctx.index === -1) { - if (if_block3) { - if_block3.p(changed, ctx); - } else { - if_block3 = create_if_block_3$2(ctx); + if (!/*collapsed*/ ctx[6]) { + if (!if_block3) { + if_block3 = create_if_block_5$1(ctx); if_block3.c(); - if_block3.m(div5, t10); + if_block3.m(div3, null); + } else { + } } else if (if_block3) { if_block3.d(1); if_block3 = null; } - if (ctx.currentAction) { + if (dirty & /*darkMode*/ 512) { + toggle_class(div3, "is-darkmode", /*darkMode*/ ctx[9].active); + } + + if (dirty & /*showMenu*/ 32) { + toggle_class(div4, "is-hidden-mobile", /*showMenu*/ ctx[5]); + } + + if (/*index*/ ctx[12] === -1) { if (if_block4) { - if_block4.p(changed, ctx); - transition_in(if_block4, 1); + if_block4.p(ctx, dirty); } else { - if_block4 = create_if_block$b(ctx); + if_block4 = create_if_block_4$1(ctx); if_block4.c(); - transition_in(if_block4, 1); - if_block4.m(div5, null); + if_block4.m(div5, t11); } } else if (if_block4) { + if_block4.d(1); + if_block4 = null; + } + + if (/*currentAction*/ ctx[10]) { + if (if_block5) { + if_block5.p(ctx, dirty); + transition_in(if_block5, 1); + } else { + if_block5 = create_if_block$c(ctx); + if_block5.c(); + transition_in(if_block5, 1); + if_block5.m(div5, null); + } + } else if (if_block5) { group_outros(); - transition_out(if_block4, 1, 1, () => { - if_block4 = null; + + transition_out(if_block5, 1, 1, () => { + if_block5 = null; }); + check_outros(); } - if (changed.collapsed) { - toggle_class(div6, "is-collapsed", ctx.collapsed); + if (dirty & /*darkMode*/ 512) { + toggle_class(div5, "is-darkmode", /*darkMode*/ ctx[9].active); } - if (!current || changed.title) { - set_data(t12, ctx.title); + if (dirty & /*collapsed*/ 64) { + toggle_class(div6, "is-collapsed", /*collapsed*/ ctx[6]); } - if (changed.collapsed) { - toggle_class(div7, "is-offset-one-quarter", !ctx.collapsed); + if (!current || dirty & /*title*/ 1) set_data(t13, /*title*/ ctx[0]); + + if (dirty & /*collapsed*/ 64) { + toggle_class(div7, "is-offset-one-quarter", !/*collapsed*/ ctx[6]); + } + + if (dirty & /*darkMode*/ 512) { + toggle_class(footer, "is-darkmode", /*darkMode*/ ctx[9].active); + } + + if (dirty & /*darkMode*/ 512) { + toggle_class(div8, "is-darkmode", /*darkMode*/ ctx[9].active); } }, - i(local) { if (current) return; transition_in(if_block0); - transition_in(menupanel.$$.fragment, local); - - transition_in(if_block4); + transition_in(if_block5); current = true; }, - o(local) { transition_out(if_block0); transition_out(menupanel.$$.fragment, local); - transition_out(if_block4); + transition_out(if_block5); current = false; }, - d(detaching) { - if (detaching) { - detach(nav); - } - + if (detaching) detach(div8); if (if_block0) if_block0.d(); - - if (detaching) { - detach(t6); - detach(div6); - } - - destroy_component(menupanel); - if (if_block1) if_block1.d(); + destroy_component(menupanel); if (if_block2) if_block2.d(); if (if_block3) if_block3.d(); if (if_block4) if_block4.d(); - - if (detaching) { - detach(t11); - detach(footer); - } - + if (if_block5) if_block5.d(); run_all(dispose); } }; } function sample(action) { - return action.transactions[0].request; + return action.transactions[0].request; } function headersMap(action) { - return sample(action) - .headers.filter(header => header.name != "Authorization") - .map(header => { - return { - used: true, - required: false, - name: header.name, - value: header.example || "" - }; - }); + return sample(action).headers.filter(header => header.name != "Authorization").map(header => { + return { + used: true, + required: false, + name: header.name, + value: header.example || "" + }; + }); } function parametersMap(action) { - return action.parameters.map(param => { - return { - used: param.required, - required: param.required, - name: param.name, - value: param.example || "" - }; - }); + return action.parameters.map(param => { + return { + used: param.required, + required: param.required, + name: param.name, + value: param.example || "" + }; + }); } function bodyMap(action) { - const example = sample(action).example; - return stringify$2(example); + const example = sample(action).example; + return stringify$2(example); } function instance$i($$self, $$props, $$invalidate) { let $env; + component_subscribe($$self, env, $$value => $$invalidate(20, $env = $$value)); + let { title } = $$props; + let { description } = $$props; + let { actions } = $$props; + let { tagActions } = $$props; + let { config } = $$props; + let index = -1; - component_subscribe($$self, env, $$value => { $env = $$value; $$invalidate('$env', $env); }); + function handleClick(event) { + let target = event.target; - + if (target.nodeName == "SPAN") { + target = target.parentElement; + } - let { title, description, actions, tagActions, config } = $$props; + const slug = target.dataset["slug"]; + $$invalidate(12, index = actions.findIndex(el => el.slug === slug)); + document.body.scrollTop = document.documentElement.scrollTop = 0; + } - let index = -1; + function handleGroupClick(event) { + const groupSlug = event.target.dataset["slug"]; + const firstAction = firstGroupAction(groupSlug); - function handleClick(event) { - let target = event.target; + if (firstAction) { + const slug = firstAction.slug; + $$invalidate(12, index = actions.findIndex(el => el.slug === slug)); + $$invalidate(8, query = `g:${groupSlug}`); + document.body.scrollTop = document.documentElement.scrollTop = 0; + } + } - if (target.nodeName == "SPAN") { - target = target.parentElement; - } + function firstGroupAction(groupSlug) { + let matches = []; - const slug = target.dataset["slug"]; - $$invalidate('index', index = actions.findIndex(el => el.slug === slug)); + tagActions.forEach(tag => { + matches = matches.concat(tag.children.filter(child => slugify(child.title) === groupSlug)); + }); - document.body.scrollTop = document.documentElement.scrollTop = 0; - } + if (matches.length > 0) { + return matches[0].actions[0]; + } + } - function tocClick(event) { - $$invalidate('index', index = -1); - let href = event.target.getAttribute("href"); - pushHistory(href); - } + function tocClick(event) { + $$invalidate(12, index = -1); + let href = event.target.getAttribute("href"); + pushHistory(href); + } - if (config.playground.enabled) { - const savedEnv = getEnv(); + if (config.playground.enabled) { + const savedEnv = getEnv(); - if ( - savedEnv && - Object.keys(config.playground.environments).includes(savedEnv) - ) { - env.set(savedEnv); - } else { - env.set(config.playground.env); - } + if (savedEnv && Object.keys(config.playground.environments).includes(savedEnv)) { + env.set(savedEnv); + } else { + env.set(config.playground.env); + } - const authToken = getToken($env); + const authToken = getToken($env); - if (authToken) { - auth.add($env); - token.set(authToken); - } - } + if (authToken) { + auth.add($env); + token.set(authToken); + } + } - let showMenu = true; - let collapsed = false; - let authenticating = false; + let showMenu = true; + let collapsed = false; + let authenticating = false; + let query = ""; - function burgerClick() { - $$invalidate('showMenu', showMenu = !showMenu); - } + function burgerClick() { + $$invalidate(5, showMenu = !showMenu); + } - function collapseToggle() { - $$invalidate('collapsed', collapsed = !collapsed); - } + function collapseToggle() { + $$invalidate(6, collapsed = !collapsed); + } - function searchClick() { - collapseToggle(); + function searchClick() { + collapseToggle(); + const searchInput = document.getElementById("search-input-text"); - const searchInput = document.getElementById("search-input-text"); - if (searchInput) { - searchInput.focus(); - } - } + if (searchInput) { + searchInput.focus(); + } + } - onMount(async () => { - // handle oauth2 callback - if (isAuth(environment, "oauth2")) { - const authParam = querystringify_1.parse(location.search); + const darkMode = { + enable: true, + store: window.localStorage, + toggle: "darkmode-toggle", + mode: ["light", "dark"], + active: false + }; - if (authParam.code) { - $$invalidate('authenticating', authenticating = true); + function darkToggle() { + $$invalidate(9, darkMode.active = !darkMode.active, darkMode); + document.getElementById(`bulma-theme-${darkMode.mode[Number(!darkMode.active)]}`).media = "none"; + document.getElementById(`bulma-theme-${darkMode.mode[Number(darkMode.active)]}`).media = ""; + darkMode.store.setItem(darkMode.toggle, darkMode.mode[Number(darkMode.active)]); + } - pushHistory(basePath(config)); + if (darkMode.store.getItem(darkMode.toggle) === darkMode.mode[1]) { + darkToggle(); + } - const { accessToken, refreshToken } = await exchangeToken( - authParam.code, - environment.auth.options - ); + onMount(async () => { + if (isAuth(environment, "oauth2")) { + const authParam = querystringify_1.parse(location.search); - if (accessToken) { - setToken($env, accessToken); - auth.add($env); - token.set(accessToken); + if (authParam.code) { + $$invalidate(7, authenticating = true); + pushHistory(basePath(config)); + const { accessToken, refreshToken } = await exchangeToken(authParam.code, environment.auth.options); - if (refreshToken) { - setRefreshToken($env, refreshToken); - } - } + if (accessToken) { + setToken($env, accessToken); + auth.add($env); + token.set(accessToken); - $$invalidate('authenticating', authenticating = false); - } - } + if (refreshToken) { + setRefreshToken($env, refreshToken); + } + } - // handle permalink - const hash = location.hash; + $$invalidate(7, authenticating = false); + } + } - if (hash.match("#/")) { - const slug = hash.replace("#/", ""); - $$invalidate('index', index = actions.findIndex(el => el.slug === slug)); - } - }); + const hash = location.hash; - document.onkeyup = function(e) { - if ((e.which || e.keyCode) == 219) { - collapseToggle(); - } - }; + if (hash.match("#/")) { + let slug = hash.replace("#/", ""); + + if (slug.startsWith("g~")) { + const groupSlug = slug.substr(2); + const firstAction = firstGroupAction(groupSlug); + + if (firstAction) { + slug = firstAction.slug; + $$invalidate(8, query = `g:${groupSlug}`); + } + } + + $$invalidate(12, index = actions.findIndex(el => el.slug === slug)); + } + }); + + document.onkeyup = function (e) { + if ((e.which || e.keyCode) == 219) { + collapseToggle(); + } + }; $$self.$set = $$props => { - if ('title' in $$props) $$invalidate('title', title = $$props.title); - if ('description' in $$props) $$invalidate('description', description = $$props.description); - if ('actions' in $$props) $$invalidate('actions', actions = $$props.actions); - if ('tagActions' in $$props) $$invalidate('tagActions', tagActions = $$props.tagActions); - if ('config' in $$props) $$invalidate('config', config = $$props.config); + if ("title" in $$props) $$invalidate(0, title = $$props.title); + if ("description" in $$props) $$invalidate(1, description = $$props.description); + if ("actions" in $$props) $$invalidate(2, actions = $$props.actions); + if ("tagActions" in $$props) $$invalidate(3, tagActions = $$props.tagActions); + if ("config" in $$props) $$invalidate(4, config = $$props.config); }; - let currentAction, environment; + let currentAction; + let environment; - $$self.$$.update = ($$dirty = { actions: 1, index: 1, currentAction: 1, title: 1, config: 1, $env: 1 }) => { - if ($$dirty.actions || $$dirty.index) { $$invalidate('currentAction', currentAction = actions[index]); } - if ($$dirty.currentAction || $$dirty.title) { { - document.title = - (currentAction && `${currentAction.title} - ${title}`) || title; - } } - if ($$dirty.config || $$dirty.$env) { $$invalidate('environment', environment = - config.playground.enabled && config.playground.environments[$env]); } + $$self.$$.update = () => { + if ($$self.$$.dirty & /*actions, index*/ 4100) { + $$invalidate(10, currentAction = actions[index]); + } + + if ($$self.$$.dirty & /*currentAction, title*/ 1025) { + { + document.title = currentAction && `${currentAction.title} - ${title}` || title; + } + } + + if ($$self.$$.dirty & /*config, $env*/ 1048592) { + $$invalidate(11, environment = config.playground.enabled && config.playground.environments[$env]); + } }; - return { + return [ title, description, actions, tagActions, config, - index, - handleClick, - tocClick, showMenu, collapsed, authenticating, + query, + darkMode, + currentAction, + environment, + index, + handleClick, + handleGroupClick, + tocClick, burgerClick, collapseToggle, searchClick, - currentAction, - environment - }; + darkToggle + ]; } class Winter extends SvelteComponent { constructor(options) { super(); - if (!document_1.getElementById("svelte-t5bxdu-style")) add_css$9(); - init(this, options, instance$i, create_fragment$i, safe_not_equal, ["title", "description", "actions", "tagActions", "config"]); + if (!document_1.getElementById("svelte-1jcck2f-style")) add_css$9(); + + init(this, options, instance$i, create_fragment$i, safe_not_equal, { + title: 0, + description: 1, + actions: 2, + tagActions: 3, + config: 4 + }); } } const app = new Winter({ target: document.body, - props: {"title":"mailcow API","description":"mailcow is complete e-mailing solution with advanced antispam, antivirus, nice UI and API.\n\nIn order to use this API you have to create a API key and add your IP address to the whitelist of allowed IPs this can be done by logging into the Mailcow UI using your admin account, then go to Configuration > Access > Edit administrator details > API. There you will find a collapsed API menu.\n\n**This documentation is in Work In Progress status. It contains only few endpoints.**","version":"","servers":[{"url":"https://mailcow.host/"}],"tags":[{"title":"Domains","description":"","children":[{"title":"Get domains","description":"","children":[]},{"title":"Create domain","description":"","children":[]},{"title":"Update domain","description":"","children":[]},{"title":"Delete domain","description":"","children":[]}]},{"title":"Domain antispam policies","description":"You can create antispam whitelist and blacklist policies","children":[{"title":"List whitelist domain policy","description":"","children":[]},{"title":"List blacklist domain policy","description":"","children":[]},{"title":"Create domain policy","description":"","children":[]},{"title":"Delete domain policy","description":"","children":[]}]},{"title":"Mailboxes","description":"","children":[{"title":"Get mailboxes","description":"","children":[]},{"title":"Create mailbox","description":"","children":[]},{"title":"Update mailbox","description":"","children":[]},{"title":"Delete mailbox","description":"","children":[]},{"title":"Quarantine Notifications","description":"","children":[]}]},{"title":"Aliases","description":"","children":[{"title":"GET aliases","description":"","children":[]},{"title":"Create alias","description":"","children":[]},{"title":"Update alias","description":"","children":[]},{"title":"Delete alias","description":"","children":[]}]},{"title":"Sync jobs","description":"","children":[{"title":"Get sync jobs","description":"","children":[]},{"title":"Create sync job","description":"","children":[]},{"title":"Update sync job","description":"","children":[]},{"title":"Delete sync job","description":"","children":[]}]},{"title":"Fordwarding Hosts","description":"","children":[{"title":"Get Forwarding Hosts","description":"","children":[]},{"title":"Add Forward Host","description":"","children":[]}]},{"title":"Logs","description":"","children":[{"title":"Get Postfix logs","description":"","children":[]},{"title":"Get Rspamd logs","description":"","children":[]},{"title":"Get Dovecot logs","description":"","children":[]},{"title":"Get ACME logs","description":"","children":[]},{"title":"Get SOGo logs","description":"","children":[]},{"title":"Get Watchdog logs","description":"","children":[]},{"title":"Get Api logs","description":"","children":[]},{"title":"Get Ratelimit logs","description":"","children":[]},{"title":"Get Netfilter logs","description":"","children":[]},{"title":"Get Autodiscover logs","description":"","children":[]}]},{"title":"Queue Manager","description":"","children":[{"title":"Get Queue","description":"","children":[]},{"title":"Flush Queue","description":"","children":[]},{"title":"Delete Queue","description":"","children":[]}]},{"title":"Quarantine","description":"","children":[{"title":"Get mails in Quarantine","description":"","children":[]},{"title":"Delete mails in Quarantine","description":"","children":[]}]},{"title":"Fail2Ban","description":"","children":[{"title":"Get Fail2Ban Config","description":"","children":[]},{"title":"Edit Fail2Ban","description":"","children":[]}]},{"title":"DKIM","description":"","children":[{"title":"Generate DKIM Key","description":"","children":[]},{"title":"Duplicate DKIM Key","description":"","children":[]},{"title":"Delete DKIM Key","description":"","children":[]}]},{"title":"Domain admin","description":"","children":[{"title":"Get Domain Admins","description":"","children":[]},{"title":"Create Domain Admin user","description":"","children":[]},{"title":"Delete Domain Admin","description":"","children":[]}]},{"title":"Address Rewriting","description":"","children":[{"title":"Get BCC Map","description":"","children":[]},{"title":"Create BCC Map","description":"","children":[]},{"title":"Delete BCC Map","description":"","children":[]},{"title":"Get Recipient Map","description":"","children":[]},{"title":"Create Recipient Map","description":"","children":[]},{"title":"Delete Recipient Map","description":"","children":[]}]},{"title":"Outgoing TLS Policy Map Overrides","description":"","children":[{"title":"Get TLS Policy Map","description":"","children":[]},{"title":"Create TLS Policy Map","description":"","children":[]},{"title":"Delete TLS Policy Map","description":"","children":[]}]},{"title":"oAuth Clients","description":"","children":[{"title":"Get oAuth Clients","description":"","children":[]},{"title":"Create oAuth Client","description":"","children":[]},{"title":"Delete oAuth Client","description":"","children":[]}]},{"title":"Routing","description":"","children":[{"title":"Get Sender-Dependent Transports","description":"","children":[]},{"title":"Create Sender-Dependent Transports","description":"","children":[]},{"title":"Delete Sender-Dependent Transports","description":"","children":[]},{"title":"Get Transport Maps","description":"","children":[]},{"title":"Create Transport Maps","description":"","children":[]},{"title":"Delete Transport Maps","description":"","children":[]}]},{"title":"Resources","description":"","children":[{"title":"Get Resources","description":"","children":[]},{"title":"Create Resources","description":"","children":[]},{"title":"Delete Resources","description":"","children":[]}]}],"actions":[{"title":"Get domains","path":"/api/v1/get/domain/{id}","pathTemplate":"/api/v1/get/domain/{id}","slug":"get~api~v1~get~domain~id","method":"get","description":"\nYou can list all domains existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","mailcow.tld"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"max_new_mailbox_quota\": 10737418240,\n \"def_new_mailbox_quota\": 3221225472,\n \"quota_used_in_domain\": \"0\",\n \"mboxes_in_domain\": 0,\n \"mboxes_left\": 10,\n \"domain_name\": \"domain.tld\",\n \"description\": \"Some description\",\n \"max_num_aliases_for_domain\": 400,\n \"max_num_mboxes_for_domain\": 10,\n \"def_quota_for_mbox\": 3221225472,\n \"max_quota_for_mbox\": 10737418240,\n \"max_quota_for_domain\": 10737418240,\n \"relayhost\": \"0\",\n \"backupmx\": \"✘\",\n \"gal\": \"✘\",\n \"backupmx_int\": 0,\n \"gal_int\": 0,\n \"lang\": \"en\",\n \"rl\": false,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"relay_all_recipients\": \"✘\",\n \"relay_all_recipients_int\": 0,\n \"aliases_in_domain\": 0,\n \"aliases_left\": 400\n },\n {\n \"max_new_mailbox_quota\": 10737418240,\n \"def_new_mailbox_quota\": 3221225472,\n \"quota_used_in_domain\": \"0\",\n \"mboxes_in_domain\": 0,\n \"mboxes_left\": 10,\n \"domain_name\": \"domain2.tld\",\n \"description\": \"domain description\",\n \"max_num_aliases_for_domain\": 400,\n \"max_num_mboxes_for_domain\": 10,\n \"def_quota_for_mbox\": 3221225472,\n \"max_quota_for_mbox\": 10737418240,\n \"max_quota_for_domain\": 10737418240,\n \"relayhost\": \"0\",\n \"backupmx\": \"✔\",\n \"gal\": \"✘\",\n \"backupmx_int\": 1,\n \"gal_int\": 0,\n \"lang\": \"cs\",\n \"rl\": false,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"relay_all_recipients\": \"✘\",\n \"relay_all_recipients_int\": 0,\n \"aliases_in_domain\": 0,\n \"aliases_left\": 400\n }\n]\n","schema":""}}],"tags":["Domains","Get domains"]},{"title":"Create domain","path":"/api/v1/add/domain","pathTemplate":"/api/v1/add/domain","slug":"post~api~v1~add~domain","method":"post","description":"\nYou may create your own domain using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"","description":"You can also define rate limiting. If `rl_value` is not empty string, them ratelimit object is created and returned in response.","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"Fully qualified domain name","required":false,"members":[],"schema":{"type":"string"}},{"key":"description","description":"Description of domain","required":false,"members":[],"schema":{"type":"string"}},{"key":"aliases","description":"limit count of aliases associated with this domain","required":false,"members":[],"schema":{"type":"number"}},{"key":"mailboxes","description":"limit count of mailboxes associated with this domain","required":false,"members":[],"schema":{"type":"number"}},{"key":"defquota","description":"predefined mailbox quota in `add mailbox` form","required":false,"members":[],"schema":{"type":"number"}},{"key":"maxquota","description":"maximum quota per mailbox","required":false,"members":[],"schema":{"type":"number"}},{"key":"quota","description":"maximum quota for this domain (for all mailboxes in sum)","required":false,"members":[],"schema":{"type":"number"}},{"key":"active","description":"is domain active or not","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"rl_value","description":"rate limit value","required":false,"members":[],"schema":{"type":"number"}},{"key":"rl_frame","required":false,"members":[],"schema":{"type":"enum"}},{"key":"backupmx","description":"relay domain or not","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"relay_all_recipients","description":"if not, them you have to create \"dummy\" mailbox for each address to relay","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"lang","description":"language code","required":false,"members":[],"schema":{"type":"enum"}}]},"example":"{\n \"domain\":\"domain.tld\",\n \"description\":\"some decsription\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"rl_value\":\"10\",\n \"rl_frame\":\"s\",\n \"backupmx\":\"0\",\n \"relay_all_recipients\":\"0\",\n \"lang\":\"cs\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"aliases\": {\n \"type\": \"number\"\n },\n \"mailboxes\": {\n \"type\": \"number\"\n },\n \"defquota\": {\n \"type\": \"number\"\n },\n \"maxquota\": {\n \"type\": \"number\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"rl_value\": {\n \"type\": \"number\"\n },\n \"rl_frame\": {\n \"enum\": [\n \"s\",\n \"m\",\n \"h\"\n ]\n },\n \"backupmx\": {\n \"type\": \"boolean\"\n },\n \"relay_all_recipients\": {\n \"type\": \"boolean\"\n },\n \"lang\": {\n \"enum\": [\n \"sk\",\n \"cs\",\n \"de\",\n \"en\",\n \"es\",\n \"fr\",\n \"lv\",\n \"nl\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"it\",\n \"ca\"\n ]\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":" [\n {\n \"type\": \"success\",\n \"log\": [\n \"ratelimit\",\n \"edit\",\n \"domain\",\n {\n \"rl_value\": \"10\",\n \"rl_frame\": \"s\",\n \"object\": \"domain.tld\"\n }\n ],\n \"msg\": [\n \"rl_saved\",\n \"domain.tld\"\n ]\n },\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"add\",\n \"domain\",\n {\n \"domain\": \"domain.tld\",\n \"description\": \"some decsription\",\n \"aliases\": \"400\",\n \"mailboxes\": \"10\",\n \"defquota\": \"3072\",\n \"maxquota\": \"10240\",\n \"quota\": \"10240\",\n \"active\": \"1\",\n \"rl_value\": \"10\",\n \"rl_frame\": \"s\",\n \"backupmx\": \"0\",\n \"relay_all_recipients\": \"0\",\n \"lang\":\"cs\"\n },\n null\n ],\n \"msg\": [\n \"domain_added\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Create domain"]},{"title":"Update domain","path":"/api/v1/edit/domain","pathTemplate":"/api/v1/edit/domain","slug":"post~api~v1~edit~domain","method":"post","description":"\nYou can update one or more domains per request. You can also send just attributes you want to change. \nExample: You can add domain names to items list and in attr object just include `\"active\": \"0\"` to deactivate domains.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["domain_name"],"description":"contains list of domain names you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"domain.tld\"\n ],\n \"attr\":{\n \"description\":\"domain description\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"gal\":\"1\",\n \"relayhost\":\"2\",\n \"backupmx\":\"1\",\n \"relay_all_recipients\":\"0\",\n \"lang\":\"cs\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\"\n },\n \"aliases\": {\n \"type\": \"number\"\n },\n \"mailboxes\": {\n \"type\": \"number\"\n },\n \"defquota\": {\n \"type\": \"number\"\n },\n \"maxquota\": {\n \"type\": \"number\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"gal\": {\n \"type\": \"boolean\"\n },\n \"relayhost\": {\n \"type\": \"number\"\n },\n \"backupmx\": {\n \"type\": \"boolean\"\n },\n \"relay_all_recipients\": {\n \"type\": \"boolean\"\n },\n \"lang\": {\n \"enum\": [\n \"sk\",\n \"cs\",\n \"de\",\n \"en\",\n \"es\",\n \"fr\",\n \"lv\",\n \"nl\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"it\",\n \"ca\"\n ]\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\"\n ],\n \"description\":\"domain description\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"gal\":\"1\",\n \"relayhost\":\"2\",\n \"backupmx\":\"1\",\n \"relay_all_recipients\":\"0\",\n \"lang:\"cs\"\n },\n null\n ],\n \"msg\":[\n \"domain_modified\",\n \"domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Update domain"]},{"title":"Delete domain","path":"/api/v1/delete/domain","pathTemplate":"/api/v1/delete/domain","slug":"post~api~v1~delete~domain","method":"post","description":"\nYou can delete one or more domains.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["domain_name"],"description":"contains list of domains you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"domain.tld\",\n \"domain2.tld\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\",\n \"domain2.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"domain_removed\",\n \"domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\",\n \"domain2.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"domain_removed\",\n \"domain2.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Delete domain"]},{"title":"List whitelist domain policy","path":"/api/v1/get/policy_wl_domain/{domain}","pathTemplate":"/api/v1/get/policy_wl_domain/{domain}","slug":"get~api~v1~get~policy~wl~domain~domain","method":"get","description":"\nYou can list all whitelist policies per domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"object\": \"domain.tld\",\n \"value\": \"*@gooddomain.tld\",\n \"prefid\": 1\n }\n]\n","schema":""}}],"tags":["Domain antispam policies","List whitelist domain policy"]},{"title":"List blacklist domain policy","path":"/api/v1/get/policy_bl_domain/{domain}","pathTemplate":"/api/v1/get/policy_bl_domain/{domain}","slug":"get~api~v1~get~policy~bl~domain~domain","method":"get","description":"\nYou can list all blacklist policies per domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"object\": \"domain.tld\",\n \"value\": \"*@baddomain.tld\",\n \"prefid\": 2\n }\n]\n","schema":""}}],"tags":["Domain antispam policies","List blacklist domain policy"]},{"title":"Create domain policy","path":"/api/v1/add/domain-policy","pathTemplate":"/api/v1/add/domain-policy","slug":"post~api~v1~add~domain-policy","method":"post","description":"\nYou may create your own domain policy using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"domain name to which policy is associated to","required":false,"members":[],"schema":{"type":"string"}},{"key":"object_list","required":false,"members":[],"schema":{"type":"enum"}},{"key":"object_from","description":"exact address or use wildcard to match whole domain","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"domain\":\"domain.tld\",\n \"object_list\":\"bl\",\n \"object_from\":\"*@baddomain.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"object_list\": {\n \"enum\": [\n \"wl\",\n \"bl\"\n ]\n },\n \"object_from\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"add\",\n \"domain\",\n {\n \"domain\":\"domain.tld\",\n \"object_list\":\"bl\",\n \"object_from\":\"*@baddomain.tld\"\n }\n ],\n \"msg\":[\n \"domain_modified\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain antispam policies","Create domain policy"]},{"title":"Delete domain policy","path":"/api/v1/delete/domain-policy","pathTemplate":"/api/v1/delete/domain-policy","slug":"post~api~v1~delete~domain-policy","method":"post","description":"\nYou can delete one o more domain policies.","parameters":[],"transactions":[{"request":{"title":"","description":"Delete domain policy by ID","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of domain policys you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"1\",\n \"2\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":" [\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"delete\",\n \"domain\",\n {\n \"prefid\":[\n \"1\",\n \"2\"\n ]\n }\n ],\n \"msg\":[\n \"item_deleted\",\n \"1\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"delete\",\n \"domain\",\n {\n \"prefid\":[\n \"1\",\n \"2\"\n ]\n }\n ],\n \"msg\":[\n \"item_deleted\",\n \"2\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain antispam policies","Delete domain policy"]},{"title":"Get mailboxes","path":"/api/v1/get/mailbox/{id}","pathTemplate":"/api/v1/get/mailbox/{id}","slug":"get~api~v1~get~mailbox~id","method":"get","description":"\nYou can list all mailboxes existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","user@domain.tld"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"max_new_quota\":10737418240,\n \"username\":\"info@doman3.tld\",\n \"rl\":false,\n \"is_relayed\":0,\n \"name\":\"Full name\",\n \"active\":\"✔\",\n \"active_int\":1,\n \"domain\":\"doman3.tld\",\n \"local_part\":\"info\",\n \"quota\":3221225472,\n \"attributes\":{\n \"force_pw_update\":\"0\",\n \"tls_enforce_in\":\"0\",\n \"tls_enforce_out\":\"0\",\n \"sogo_access\":\"1\",\n \"mailbox_format\":\"maildir:\",\n \"quarantine_notification\":\"never\"\n },\n \"quota_used\":0,\n \"percent_in_use\":0,\n \"messages\":0,\n \"spam_aliases\":0,\n \"percent_class\":\"success\"\n }\n]\n","schema":""}}],"tags":["Mailboxes","Get mailboxes"]},{"title":"Create mailbox","path":"/api/v1/add/mailbox","pathTemplate":"/api/v1/add/mailbox","slug":"post~api~v1~add~mailbox","method":"post","description":"\nYou may create your own mailbox using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"local_part","description":"left part of email address","required":false,"members":[],"schema":{"type":"string"}},{"key":"domain","description":"domain name","required":false,"members":[],"schema":{"type":"string"}},{"key":"name","description":"Full name of the mailbox user","required":false,"members":[],"schema":{"type":"string"}},{"key":"quota","description":"mailbox quota","required":false,"members":[],"schema":{"type":"number"}},{"key":"pasword","description":"mailbox password","required":false,"members":[],"schema":{"type":"string"}},{"key":"password2","description":"mailbox password for confirmation","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"is mailbox active or not","required":false,"members":[],"schema":{"type":"boolean"}}]},"example":"{\n \"local_part\":\"info\",\n \"domain\":\"domain.tld\",\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"atedismonsin\",\n \"password2\":\"atedismonsin\",\n \"active\":\"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"local_part\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"pasword\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"mailbox\",\n {\n \"local_part\":\"info\",\n \"domain\":\"domain.tld\",\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"*\",\n \"password2\":\"*\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_added\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Create mailbox"]},{"title":"Update mailbox","path":"/api/v1/edit/mailbox","pathTemplate":"/api/v1/edit/mailbox","slug":"post~api~v1~edit~mailbox","method":"post","description":"\nYou can update one or more mailboxes per request. You can also send just attributes you want to change","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["mailbox_name"],"description":"contains list of mailboxes you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{"sender_acl":["default","info@domain2.tld","domain3.tld","asterix"]},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"info@domain.tld\"\n ],\n \"attr\":{\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"\",\n \"password2\":\"\",\n \"active\":\"1\",\n \"sender_acl\":[\n \"default\",\n \"info@domain2.tld\",\n \"domain3.tld\",\n \"*\"\n ],\n \"force_pw_update\":\"0\",\n \"sogo_access\":\"1\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"pasword\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"sender_acl\": {\n \"type\": \"array\"\n },\n \"force_pw_update\": {\n \"type\": \"boolean\"\n },\n \"sogo_access\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\"\n ],\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"*\",\n \"password2\":\"*\",\n \"active\":\"1\",\n \"sender_acl\":[\n \"default\",\n \"info@domain2.tld\",\n \"domain3.tld\",\n \"*\"\n ],\n \"force_pw_update\":\"0\",\n \"sogo_access\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_modified\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Update mailbox"]},{"title":"Delete mailbox","path":"/api/v1/delete/mailbox","pathTemplate":"/api/v1/delete/mailbox","slug":"post~api~v1~delete~mailbox","method":"post","description":"\nYou can delete one or more mailboxes.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["local_part@domain"],"description":"contains list of mailboxes you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"mailbox_removed\",\n \"info@domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"mailbox_removed\",\n \"sales@domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Delete mailbox"]},{"title":"Quarantine Notifications","path":"/api/v1/edit/quarantine_notification","pathTemplate":"/api/v1/edit/quarantine_notification","slug":"post~api~v1~edit~quarantine~notification","method":"post","description":"\nYou can update one or more mailboxes per request.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["mailbox_name"],"description":"contains list of mailboxes you want set qurantine notifications","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"mailbox1@domain.tld\",\n \"mailbox2@domain.tld\"\n ],\n \"attr\":{\n \"quarantine_notification\":\"hourly\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"quarantine_notification\": {\n \"enum\": [\n \"hourly\",\n \"daily\",\n \"weekly\",\n \"never\"\n ]\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"","schema":""}}],"tags":["Mailboxes","Quarantine Notifications"]},{"title":"GET aliases","path":"/api/v1/get/alias/{id}","pathTemplate":"/api/v1/get/alias/{id}","slug":"get~api~v1~get~alias~id","method":"get","description":"\nYou can list mailbox aliases existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"in_primary_domain\": \"\",\n \"id\": 6,\n \"domain\": \"domain.tld\",\n \"public_comment\": null,\n \"private_comment\": null,\n \"goto\": \"destination@domain.tld\",\n \"address\": \"alias@domain.tld\",\n \"is_catch_all\": 0,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"created\": \"2019-04-04 19:29:49\",\n \"modified\": null\n },\n {\n \"in_primary_domain\": \"\",\n \"id\": 10,\n \"domain\": \"domain.tld\",\n \"public_comment\": null,\n \"private_comment\": null,\n \"goto\": \"destination@domain.tld\",\n \"address\": \"@domain.tld\",\n \"is_catch_all\": 1,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"created\": \"2019-04-27 13:42:39\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Aliases","GET aliases"]},{"title":"Create alias","path":"/api/v1/add/alias","pathTemplate":"/api/v1/add/alias","slug":"post~api~v1~add~alias","method":"post","description":"\nYou may create your own mailbox alias using this action. It takes a JSON object containing a domain informations. \nOnly one `goto*` option can be used, for ex. if you want learn as spam, then send just `goto_spam = 1` in request body.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"address","description":"alias address, for catchall use \"@domain.tld\"","required":false,"members":[],"schema":{"type":"string"}},{"key":"goto","description":"destination address, comma separated","required":false,"members":[],"schema":{"type":"string"}},{"key":"goto_null","description":"silently ignore","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"goto_spam","description":"learn as spam","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"goto_ham","description":"learn as ham","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"active","description":"is alias active or not","required":false,"members":[],"schema":{"type":"boolean"}}]},"example":"{\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"active\":\"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": \"string\"\n },\n \"goto\": {\n \"type\": \"string\"\n },\n \"goto_null\": {\n \"type\": \"boolean\"\n },\n \"goto_spam\": {\n \"type\": \"boolean\"\n },\n \"goto_ham\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"alias\",\n {\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"alias_added\",\n \"alias@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Create alias"]},{"title":"Update alias","path":"/api/v1/edit/alias","pathTemplate":"/api/v1/edit/alias","slug":"post~api~v1~edit~alias","method":"post","description":"\nYou can update one or more aliases per request. You can also send just attributes you want to change","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"6\"\n ],\n \"attr\":{\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"private_comment\":\"private comment\",\n \"public_comment\":\"public comment\",\n \"active\":\"1\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": \"string\"\n },\n \"goto\": {\n \"type\": \"string\"\n },\n \"goto_null\": {\n \"type\": \"boolean\"\n },\n \"goto_spam\": {\n \"type\": \"boolean\"\n },\n \"goto_ham\": {\n \"type\": \"boolean\"\n },\n \"private_comment\": {\n \"type\": \"string\"\n },\n \"public_comment\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"alias\",\n {\n \"id\":[\n \"6\"\n ],\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"private_comment\":\"private comment\",\n \"public_comment\":\"public comment\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"alias_modified\",\n \"alias@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Update alias"]},{"title":"Delete alias","path":"/api/v1/delete/alias","pathTemplate":"/api/v1/delete/alias","slug":"post~api~v1~delete~alias","method":"post","description":"\nYou can delete one or more aliases.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"[\n \"6\",\n \"9\"\n]\n","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"alias\",\n {\n \"id\":[\n \"6\",\n \"9\"\n ]\n },\n null\n ],\n \"msg\":[\n \"alias_removed\",\n \"alias@domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"alias\",\n {\n \"id\":[\n \"6\",\n \"9\"\n ]\n },\n null\n ],\n \"msg\":[\n \"alias_removed\",\n \"alias2@domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Delete alias"]},{"title":"Get sync jobs","path":"/api/v1/get/syncjobs/all/no_log","pathTemplate":"/api/v1/get/syncjobs/all/no_log","slug":"get~api~v1~get~syncjobs~all~no~log","method":"get","description":"\nYou can list all syn jobs existing in system.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"user2\": \"mailbox@domain.tld\",\n \"host1\": \"imap.server.tld\",\n \"authmech1\": \"PLAIN\",\n \"regextrans2\": \"\",\n \"authmd51\": 0,\n \"domain2\": \"\",\n \"subfolder2\": \"External\",\n \"user1\": \"username\",\n \"exclude\": \"(?i)spam|(?i)junk\",\n \"maxage\": 0,\n \"mins_interval\": \"20\",\n \"maxbytespersecond\": \"0\",\n \"port1\": 993,\n \"enc1\": \"TLS\",\n \"delete2duplicates\": 1,\n \"delete1\": 0,\n \"delete2\": 0,\n \"automap\": 1,\n \"skipcrossduplicates\": 0,\n \"custom_params\": \"\",\n \"timeout1\": 600,\n \"timeout2\": 600,\n \"subscribeall\": 1,\n \"is_running\": 0,\n \"last_run\": \"2019-05-22 11:40:02\",\n \"created\": \"2019-05-22 11:37:25\",\n \"modified\": \"2019-05-22 11:40:02\",\n \"active\": \"✓\",\n \"active_int\": 1,\n \"log\": \"\"\n }\n]\n","schema":""}}],"tags":["Sync jobs","Get sync jobs"]},{"title":"Create sync job","path":"/api/v1/add/syncjob","pathTemplate":"/api/v1/add/syncjob","slug":"post~api~v1~add~syncjob","method":"post","description":"\nYou can create new sync job using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"The target mailbox","required":false,"members":[],"schema":{"type":"string"}},{"key":"delete2duplicates","description":"Delete duplicates on destination","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"delete1","description":"Delete from source when completed","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"delete2","description":"Delete messages on destination that are not on source","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"automap","description":"Try to automap folders (\"Sent items\", \"Sent\" => \"Sent\" etc.)","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"skipcrossduplicates","description":"Skip duplicate messages across folders (first come, first serve)","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"active","description":"Is sync job active","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"subscribeall","description":"Subscribe all folders","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"host1","description":"Hostname","required":false,"members":[],"schema":{"type":"string"}},{"key":"port1","description":"Port","required":false,"members":[],"schema":{"type":"string"}},{"key":"user1","description":"Username","required":false,"members":[],"schema":{"type":"string"}},{"key":"password1","description":"Password","required":false,"members":[],"schema":{"type":"string"}},{"key":"enc1","description":"Encryption","required":false,"members":[],"schema":{"type":"enum"}},{"key":"mins_interval","description":"Interval (min)","required":false,"members":[],"schema":{"type":"number"}},{"key":"subfolder2","description":"Sync into subfolder on destination (empty = do not use subfolder)","required":false,"members":[],"schema":{"type":"string"}},{"key":"maxage","description":"Maximum age of messages in days that will be polled from remote (0 = ignore age)","required":false,"members":[],"schema":{"type":"number"}},{"key":"maxbytespersecond","description":"Max. bytes per second (0 = unlimited)","required":false,"members":[],"schema":{"type":"number"}},{"key":"timeout1","description":"Timeout for connection to remote host","required":false,"members":[],"schema":{"type":"number"}},{"key":"timeout2","description":"Timeout for connection to local host","required":false,"members":[],"schema":{"type":"number"}},{"key":"exclude","description":"Exclude objects (regex)","required":false,"members":[],"schema":{"type":"string"}},{"key":"custom_params","description":"Custom parameters passed to imapsync command","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"username\":\"mailbox@domain.tld\",\n \"host1\":\"imap.server.tld\",\n \"port1\":\"993\",\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\",\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"subscribeall\":\"1\",\n \"active\":\"1\",\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"delete2duplicates\": {\n \"type\": \"boolean\"\n },\n \"delete1\": {\n \"type\": \"boolean\"\n },\n \"delete2\": {\n \"type\": \"boolean\"\n },\n \"automap\": {\n \"type\": \"boolean\"\n },\n \"skipcrossduplicates\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"subscribeall\": {\n \"type\": \"boolean\"\n },\n \"host1\": {\n \"type\": \"string\"\n },\n \"port1\": {\n \"type\": \"string\"\n },\n \"user1\": {\n \"type\": \"string\"\n },\n \"password1\": {\n \"type\": \"string\"\n },\n \"enc1\": {\n \"enum\": [\n \"TLS\",\n \"SSL\",\n \"PLAIN\"\n ]\n },\n \"mins_interval\": {\n \"type\": \"number\"\n },\n \"subfolder2\": {\n \"type\": \"string\"\n },\n \"maxage\": {\n \"type\": \"number\"\n },\n \"maxbytespersecond\": {\n \"type\": \"number\"\n },\n \"timeout1\": {\n \"type\": \"number\"\n },\n \"timeout2\": {\n \"type\": \"number\"\n },\n \"exclude\": {\n \"type\": \"string\"\n },\n \"custom_params\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"syncjob\",\n {\n \"username\":\"mailbox@domain.tld\",\n \"host1\":\"imap.server.tld\",\n \"port1\":993,\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\",\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"subscribeall\":\"1\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_modified\",\n \"mailbox@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Create sync job"]},{"title":"Update sync job","path":"/api/v1/edit/syncjob","pathTemplate":"/api/v1/edit/syncjob","slug":"post~api~v1~edit~syncjob","method":"post","description":"\nYou can update one or more sync jobs per request. You can also send just attributes you want to change.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"1\"\n ],\n \"attr\":{\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"active\":\"1\",\n \"subscribeall\":\"1\",\n \"host1\":\"imap.server.tld\",\n \"port1\":\"993\",\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"delete2duplicates\": {\n \"type\": \"boolean\"\n },\n \"delete1\": {\n \"type\": \"boolean\"\n },\n \"delete2\": {\n \"type\": \"boolean\"\n },\n \"automap\": {\n \"type\": \"boolean\"\n },\n \"skipcrossduplicates\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"subscribeall\": {\n \"type\": \"boolean\"\n },\n \"host1\": {\n \"type\": \"string\"\n },\n \"port1\": {\n \"type\": \"string\"\n },\n \"user1\": {\n \"type\": \"string\"\n },\n \"password1\": {\n \"type\": \"string\"\n },\n \"enc1\": {\n \"enum\": [\n \"TLS\",\n \"SSL\",\n \"PLAIN\"\n ]\n },\n \"mins_interval\": {\n \"type\": \"number\"\n },\n \"subfolder2\": {\n \"type\": \"string\"\n },\n \"maxage\": {\n \"type\": \"number\"\n },\n \"maxbytespersecond\": {\n \"type\": \"number\"\n },\n \"timeout1\": {\n \"type\": \"number\"\n },\n \"timeout2\": {\n \"type\": \"number\"\n },\n \"exclude\": {\n \"type\": \"string\"\n },\n \"custom_params\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"{\n \"type\": \"success\",\n \"log\": [\n \"entity\",\n \"action\",\n \"object\",\n {}\n ],\n \"msg\": [\n \"message\",\n \"entity name\"\n ]\n}","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Update sync job"]},{"title":"Delete sync job","path":"/api/v1/delete/syncjob","pathTemplate":"/api/v1/delete/syncjob","slug":"post~api~v1~delete~syncjob","method":"post","description":"\nYou can delete one or more sync jobs.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"6\",\n \"9\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"{\n \"type\": \"success\",\n \"log\": [\n \"entity\",\n \"action\",\n \"object\",\n {}\n ],\n \"msg\": [\n \"message\",\n \"entity name\"\n ]\n}","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Delete sync job"]},{"title":"Get Forwarding Hosts","path":"/api/v1/get/fwdhost/all","pathTemplate":"/api/v1/get/fwdhost/all","slug":"get~api~v1~get~fwdhost~all","method":"get","description":"\nYou can list all Forwarding Hosts in your system.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"host\": \"5.1.76.202\",\n \"source\": \"hosted.mailcow.de\",\n \"keep_spam\": \"yes\"\n },\n {\n \"host\": \"2a00:f820:417::202\",\n \"source\": \"hosted.mailcow.de\",\n \"keep_spam\": \"yes\"\n }\n]\n","schema":""}}],"tags":["Fordwarding Hosts","Get Forwarding Hosts"]},{"title":"Add Forward Host","path":"/api/v1/add/fwdhost","pathTemplate":"/api/v1/add/fwdhost","slug":"post~api~v1~add~fwdhost","method":"post","description":"\nAdd a new Forwarding host to mailcow. You can chose to enable or disable spam filtering of incoming emails by specifing `filter_spam` 0 = inactive, 1 = active.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"hostname","description":"contains the hostname you want to add","required":false,"members":[],"schema":{"type":"string"}},{"key":"filter_spam","description":"1 to enable spam filter, 0 to disable spam filter","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"hostname\": \"hosted.mailcow.de\",\n \"filter_spam\": \"0\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"filter_spam\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"fwdhost\",\n \"add\",\n {\n \"hostname\": \"hosted.mailcow.de\",\n \"filter_spam\": \"0\"\n }\n ],\n \"msg\": [\n \"forwarding_host_added\",\n \"5.1.76.202, 2a00:f820:417::202\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fordwarding Hosts","Add Forward Host"]},{"title":"Get Postfix logs","path":"/api/v1/get/logs/postfix/{count}","pathTemplate":"/api/v1/get/logs/postfix/{count}","slug":"get~api~v1~get~logs~postfix~count","method":"get","description":"\nThis Api endpoint lists all Postfix logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569937433\",\n \"program\": \"postfix/qmgr\",\n \"priority\": \"info\",\n \"message\": \"EF1711500458: removed\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Postfix logs"]},{"title":"Get Rspamd logs","path":"/api/v1/get/logs/rspamd-history/{count}","pathTemplate":"/api/v1/get/logs/rspamd-history/{count}","slug":"get~api~v1~get~logs~rspamd-history~count","method":"get","description":"\nThis Api endpoint lists all Rspamd logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n {\n \"time_virtual\": 0.235653,\n \"rcpt_mime\": [\n \"github@mailcow.tld\"\n ],\n \"message-id\": \"cm.0521259281087.phrkjuk.wdljulyl.i@cmail20.com\",\n \"ip\": \"1.1.1.1\",\n \"rcpt_smtp\": [\n \"github@mailcow.tld\"\n ],\n \"action\": \"soft reject\",\n \"time_real\": 2.856102,\n \"score\": 11.59,\n \"is_skipped\": false,\n \"size\": 35513,\n \"user\": \"unknown\",\n \"sender_mime\": \"noreply@github.com\",\n \"symbols\": {\n \"FROM_NEQ_ENVFROM\": {\n \"metric_score\": 0,\n \"options\": [\n \"noreply@github.com\",\n \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n ],\n \"score\": 0,\n \"name\": \"FROM_NEQ_ENVFROM\",\n \"description\": \"From address is different to the envelope\"\n },\n \"FORGED_SENDER\": {\n \"metric_score\": 0.3,\n \"options\": [\n \"noreply@github.com\",\n \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n ],\n \"score\": 0.3,\n \"name\": \"FORGED_SENDER\",\n \"description\": \"Sender is forged (different From: header and smtp MAIL FROM: addresses)\"\n },\n \"RWL_MAILSPIKE_NEUTRAL\": {\n \"metric_score\": 0,\n \"options\": [\n \"17.21.55.203.rep.mailspike.net : 127.0.0.13\"\n ],\n \"score\": 0,\n \"name\": \"RWL_MAILSPIKE_NEUTRAL\",\n \"description\": \"Neutral result from Mailspike\"\n },\n \"HAS_LIST_UNSUB\": {\n \"metric_score\": -0.01,\n \"score\": -0.01,\n \"name\": \"HAS_LIST_UNSUB\",\n \"description\": \"Has List-Unsubscribe header\"\n },\n \"URI_COUNT_ODD\": {\n \"metric_score\": 1,\n \"options\": [\n \"25\"\n ],\n \"score\": 1,\n \"name\": \"URI_COUNT_ODD\",\n \"description\": \"Odd number of URIs in multipart\\/alternative message\"\n },\n \"MIME_TRACE\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"MIME_TRACE\",\n \"options\": [\n \"0:+\",\n \"1:+\",\n \"2:~\"\n ]\n },\n \"R_DKIM_ALLOW\": {\n \"metric_score\": -0.2,\n \"options\": [\n \"github.com:s=cm\",\n \"cmail2.com:s=cs2013\"\n ],\n \"score\": 0,\n \"name\": \"R_DKIM_ALLOW\",\n \"description\": \"DKIM verification succeed\"\n },\n \"FROM_HAS_DN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"FROM_HAS_DN\",\n \"description\": \"From header has a display name\"\n },\n \"MIME_GOOD\": {\n \"metric_score\": -0.1,\n \"options\": [\n \"multipart\\/alternative\",\n \"text\\/plain\"\n ],\n \"score\": -0.1,\n \"name\": \"MIME_GOOD\",\n \"description\": \"Known content-type\"\n },\n \"REPLYTO_ADDR_EQ_FROM\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"REPLYTO_ADDR_EQ_FROM\",\n \"description\": \"Reply-To header is identical to SMTP From\"\n },\n \"TO_MATCH_ENVRCPT_ALL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"TO_MATCH_ENVRCPT_ALL\",\n \"description\": \"All of the recipients match the envelope\"\n },\n \"ASN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"ASN\",\n \"options\": [\n \"asn:55819, ipnet:203.55.21.0\\/24, country:AU\"\n ]\n },\n \"HTML_SHORT_LINK_IMG_1\": {\n \"metric_score\": 2,\n \"score\": 2,\n \"name\": \"HTML_SHORT_LINK_IMG_1\",\n \"description\": \"Short html part (0..1K) with a link to an image\"\n },\n \"SCHAALIT_URI_823\": {\n \"metric_score\": 5,\n \"score\": 5,\n \"name\": \"SCHAALIT_URI_823\",\n \"options\": [\n \"SCHAALIT_URI_823\"\n ]\n },\n \"DMARC_POLICY_ALLOW\": {\n \"metric_score\": -0.5,\n \"options\": [\n \"github.com\",\n \"none\"\n ],\n \"score\": 0,\n \"name\": \"DMARC_POLICY_ALLOW\",\n \"description\": \"DMARC permit policy\"\n },\n \"MANY_INVISIBLE_PARTS\": {\n \"metric_score\": 1,\n \"options\": [\n \"4\"\n ],\n \"score\": 0.3,\n \"name\": \"MANY_INVISIBLE_PARTS\",\n \"description\": \"Many parts are visually hidden\"\n },\n \"DKIM_TRACE\": {\n \"metric_score\": 0,\n \"options\": [\n \"github.com:+\",\n \"cmail2.com:+\"\n ],\n \"score\": 0,\n \"name\": \"DKIM_TRACE\",\n \"description\": \"DKIM trace symbol\"\n },\n \"MX_GOOD\": {\n \"metric_score\": -0.01,\n \"options\": [\n \"mx20.inbound.createsend.com\",\n \"mx21.inbound.createsend.com\"\n ],\n \"score\": -0.01,\n \"name\": \"MX_GOOD\",\n \"description\": \"MX was ok\"\n },\n \"TO_DN_ALL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"TO_DN_ALL\",\n \"description\": \"All the recipients have display names\"\n },\n \"RCPT_MAILCOW_DOMAIN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"RCPT_MAILCOW_DOMAIN\",\n \"options\": [\n \"gc-mc.de\"\n ]\n },\n \"XM_UA_NO_VERSION\": {\n \"metric_score\": 0.01,\n \"score\": 0.01,\n \"name\": \"XM_UA_NO_VERSION\",\n \"description\": \"X-Mailer\\/User-Agent has no version\"\n },\n \"HAS_REPLYTO\": {\n \"metric_score\": 0,\n \"options\": [\n \"noreply@github.com\"\n ],\n \"score\": 0,\n \"name\": \"HAS_REPLYTO\",\n \"description\": \"Has Reply-To header\"\n },\n \"R_SPF_ALLOW\": {\n \"metric_score\": -0.2,\n \"options\": [\n \"+ip4:203.55.21.0\\/24\"\n ],\n \"score\": 0,\n \"name\": \"R_SPF_ALLOW\",\n \"description\": \"SPF verification allows sending\"\n },\n \"URIBL_GREY\": {\n \"metric_score\": 1.5,\n \"options\": [\n \"cmail2.com.multi.uribl.com\",\n \"cmail20.com.multi.uribl.com\",\n \"updatemyprofile.com.multi.uribl.com\"\n ],\n \"score\": 1.5,\n \"name\": \"URIBL_GREY\",\n \"description\": \"uribl.com grey url\"\n },\n \"CLAM_VIRUS_FAIL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"CLAM_VIRUS_FAIL\",\n \"options\": [\n \"failed to scan and retransmits exceed\"\n ]\n },\n \"GREYLIST\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"GREYLIST\",\n \"options\": [\n \"greylisted\",\n \"Wed, 25 Sep 2019 19:27:10 GMT\",\n \"new record\"\n ]\n },\n \"ARC_NA\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"ARC_NA\",\n \"description\": \"ARC signature absent\"\n },\n \"RCVD_COUNT_ZERO\": {\n \"metric_score\": 0,\n \"options\": [\n \"0\"\n ],\n \"score\": 0,\n \"name\": \"RCVD_COUNT_ZERO\",\n \"description\": \"Message has no Received headers\"\n },\n \"BAD_REP_POLICIES\": {\n \"metric_score\": 0.1,\n \"score\": 0.1,\n \"name\": \"BAD_REP_POLICIES\",\n \"description\": \"Contains valid policies but are also marked by fuzzy\\/bayes\\/surbl\\/rbl\"\n },\n \"RCPT_COUNT_ONE\": {\n \"metric_score\": 0,\n \"options\": [\n \"1\"\n ],\n \"score\": 0,\n \"name\": \"RCPT_COUNT_ONE\",\n \"description\": \"One recipient\"\n },\n \"RBL_UCEPROTECT_LEVEL1\": {\n \"metric_score\": 3.5,\n \"score\": 3.5,\n \"name\": \"RBL_UCEPROTECT_LEVEL1\",\n \"options\": [\n \"17.21.55.203.dnsbl-1.uceprotect.net\"\n ]\n },\n \"DWL_DNSWL_HI\": {\n \"metric_score\": -3.5,\n \"options\": [\n \"github.com.dwl.dnswl.org : 127.0.9.3\"\n ],\n \"score\": -3.5,\n \"name\": \"DWL_DNSWL_HI\",\n \"description\": \"Message has a valid dkim signature originated from domain listed at https:\\/\\/www.dnswl.org, high trust\"\n },\n \"RCVD_IN_DNSWL_NONE\": {\n \"metric_score\": 0,\n \"options\": [\n \"17.21.55.203.list.dnswl.org : 127.0.15.0\"\n ],\n \"score\": 0,\n \"name\": \"RCVD_IN_DNSWL_NONE\",\n \"description\": \"Sender listed at https:\\/\\/www.dnswl.org, no trust\"\n },\n \"RBL_UCEPROTECT_LEVEL2\": {\n \"metric_score\": 1.5,\n \"score\": 1.5,\n \"name\": \"RBL_UCEPROTECT_LEVEL2\",\n \"options\": [\n \"17.21.55.203.dnsbl-2.uceprotect.net\"\n ]\n }\n },\n \"subject\": \"[mailcow/mailcow-dockerized] Unable to change name of alias email address (#2997)\",\n \"required_score\": 15,\n \"unix_time\": 1569439327,\n \"sender_smtp\": \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n }\n}\n","schema":""}}],"tags":["Logs","Get Rspamd logs"]},{"title":"Get Dovecot logs","path":"/api/v1/get/logs/dovecot/{count}","pathTemplate":"/api/v1/get/logs/dovecot/{count}","slug":"get~api~v1~get~logs~dovecot~count","method":"get","description":"\nThis Api endpoint lists all Dovecot logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938740\",\n \"program\": \"dovecot\",\n \"priority\": \"info\",\n \"message\": \"managesieve-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=172.22.1.3, lip=172.22.1.250\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Dovecot logs"]},{"title":"Get ACME logs","path":"/api/v1/get/logs/acme/{count}","pathTemplate":"/api/v1/get/logs/acme/{count}","slug":"get~api~v1~get~logs~acme~count","method":"get","description":"\nThis Api endpoint lists all ACME logs from issued Lets Enctypts certificates. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569927728\",\n \"message\": \"Certificate validation done, neither changed nor due for renewal, sleeping for another day.\"\n }\n]\n","schema":""}}],"tags":["Logs","Get ACME logs"]},{"title":"Get SOGo logs","path":"/api/v1/get/logs/sogo/{count}","pathTemplate":"/api/v1/get/logs/sogo/{count}","slug":"get~api~v1~get~logs~sogo~count","method":"get","description":"\nThis Api endpoint lists all SOGo logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938874\",\n \"program\": \"sogod\",\n \"priority\": \"notice\",\n \"message\": \"[109]: mailcowdockerized_watchdog-mailcow_1.mailcowdockerized_mailcow-network \\\"GET \\/SOGo.index\\/ HTTP\\/1.1\\\" 200 2531\\/0 0.005 - - 0\"\n }\n]\n","schema":""}}],"tags":["Logs","Get SOGo logs"]},{"title":"Get Watchdog logs","path":"/api/v1/get/logs/watchdog/{count}","pathTemplate":"/api/v1/get/logs/watchdog/{count}","slug":"get~api~v1~get~logs~watchdog~count","method":"get","description":"\nThis Api endpoint lists all Watchdog logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938958\",\n \"service\": \"Fail2ban\",\n \"lvl\": \"100\",\n \"hpnow\": \"1\",\n \"hptotal\": \"1\",\n \"hpdiff\": \"0\"\n },\n {\n \"time\": \"1569938956\",\n \"service\": \"Rspamd\",\n \"lvl\": \"100\",\n \"hpnow\": \"5\",\n \"hptotal\": \"5\",\n \"hpdiff\": \"0\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Watchdog logs"]},{"title":"Get Api logs","path":"/api/v1/get/logs/api/{count}","pathTemplate":"/api/v1/get/logs/api/{count}","slug":"get~api~v1~get~logs~api~count","method":"get","description":"\nThis Api endpoint lists all Api logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569939001,\n \"uri\": \"\\/api\\/v1\\/get\\/logs\\/api\\/2\",\n \"method\": \"GET\",\n \"remote\": \"1.1.1.1\",\n \"data\": \"\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Api logs"]},{"title":"Get Ratelimit logs","path":"/api/v1/get/logs/ratelimited/{count}","pathTemplate":"/api/v1/get/logs/ratelimited/{count}","slug":"get~api~v1~get~logs~ratelimited~count","method":"get","description":"\nThis Api endpoint lists all Ratelimit logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569269003,\n \"rcpt\": \"hello@mailcow.email\",\n \"from\": \"awesome@mailcow.email\",\n \"user\": \"awesome@mailcow.email\",\n \"rl_info\": \"mailcow(RLsdz3tuabozgd4oacbdh8kc78)\",\n \"rl_name\": \"mailcow\",\n \"rl_hash\": \"RLsdz3tuabozgd4oacbdh8kc78\",\n \"qid\": \"E3CF91500458\",\n \"ip\": \"172.22.1.248\",\n \"message_id\": \"6a-5d892500-7-240abd80@90879116\",\n \"header_subject\": \"Mailcow is amazing\",\n \"header_from\": \"\\\"Awesome\\\" \"\n }\n]\n","schema":""}}],"tags":["Logs","Get Ratelimit logs"]},{"title":"Get Netfilter logs","path":"/api/v1/get/logs/netfilter/{count}","pathTemplate":"/api/v1/get/logs/netfilter/{count}","slug":"get~api~v1~get~logs~netfilter~count","method":"get","description":"\nThis Api endpoint lists all Netfilter logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569754911,\n \"priority\": \"info\",\n \"message\": \"Whitelist was changed, it has 1 entries\"\n },\n {\n \"time\": 1569754911,\n \"priority\": \"crit\",\n \"message\": \"Add host\\/network 1.1.1.1\\/32 to blacklist\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Netfilter logs"]},{"title":"Get Autodiscover logs","path":"/api/v1/get/logs/autodiscover/{count}","pathTemplate":"/api/v1/get/logs/autodiscover/{count}","slug":"get~api~v1~get~logs~autodiscover~count","method":"get","description":"\nThis Api endpoint lists all Autodiscover logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569684212,\n \"ua\": \"Microsoft Office\\/16.0 (Windows NT 6.2; MAPICPL 16.0.11328; Pro)\",\n \"user\": \"awesome@mailcow.de\",\n \"service\": \"activesync\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Autodiscover logs"]},{"title":"Get Queue","path":"/api/v1/get/mailq/all","pathTemplate":"/api/v1/get/mailq/all","slug":"get~api~v1~get~mailq~all","method":"get","description":"\nGet the current mail queue and everything it contains.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"queue_name\": \"incoming\",\n \"queue_id\": \"B98C6260CA1\",\n \"arrival_time\": 1570091234,\n \"message_size\": 1848,\n \"sender\": \"sender@mailcow.tld\",\n \"recipients\": [\n \"recipient@awesomecow.tld\"\n ]\n }\n]\n","schema":""}}],"tags":["Queue Manager","Get Queue"]},{"title":"Flush Queue","path":"/api/v1/edit/mailq","pathTemplate":"/api/v1/edit/mailq","slug":"post~api~v1~edit~mailq","method":"post","description":"\nUsing this API you can flush the current mail queue. This will try to deliver all mails currently in it.\nThis API uses the command: `postqueue -f`","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"action","description":"use flush to flush the mail queue","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{ \n \"action\":\"flush\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"success\",\n \"msg\": \"Task completed\"\n}\n","schema":""}}],"tags":["Queue Manager","Flush Queue"]},{"title":"Delete Queue","path":"/api/v1/delete/mailq","pathTemplate":"/api/v1/delete/mailq","slug":"post~api~v1~delete~mailq","method":"post","description":"\nUsing this API you can delete the current mail queue. This will delete all mails in it.\nThis API uses the command: `postsuper -d`","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"action","description":"use super_delete to delete the mail queue","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"action\":\"super_delete\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"success\",\n \"msg\": \"Task completed\"\n}\n","schema":""}}],"tags":["Queue Manager","Delete Queue"]},{"title":"Get mails in Quarantine","path":"/api/v1/get/quarantine/all","pathTemplate":"/api/v1/get/quarantine/all","slug":"get~api~v1~get~quarantine~all","method":"get","description":"\nGet all mails that are currently in Quarantine.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"id\": 33,\n \"qid\": \"8224615004C1\",\n \"subject\": \"mailcow is awesome\",\n \"virus_flag\": 0,\n \"score\": 15.48,\n \"rcpt\": \"admin@domain.tld\",\n \"sender\": \"bounces@send.domain.tld\",\n \"created\": 1572688831\n}\n","schema":""}}],"tags":["Quarantine","Get mails in Quarantine"]},{"title":"Delete mails in Quarantine","path":"/api/v1/delete/qitem","pathTemplate":"/api/v1/delete/qitem","slug":"post~api~v1~delete~qitem","method":"post","description":"\nUsing this endpoint you can delete a email from quarantine, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of emails you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"33\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"quarantine\",\n \"delete\",\n {\n \"id\": [\n \"33\"\n ]\n }\n ],\n \"msg\": [\n \"item_deleted\",\n \"33\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Quarantine","Delete mails in Quarantine"]},{"title":"Get Fail2Ban Config","path":"/api/v1/get/fail2ban","pathTemplate":"/api/v1/get/fail2ban","slug":"get~api~v1~get~fail2ban","method":"get","description":"\nGets the current Fail2Ban configuration.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"ban_time\": 604800,\n \"netban_ipv4\": 32,\n \"netban_ipv6\": 128,\n \"max_attempts\": 1,\n \"retry_window\": 7200,\n \"whitelist\": \"1.1.1.1\",\n \"blacklist\": \"45.82.153.37\\/32\\n92.118.38.52\\/32\",\n \"perm_bans\": [\n \"45.82.153.37\\/32\",\n \"92.118.38.52\\/32\"\n ]\n}\n","schema":""}}],"tags":["Fail2Ban","Get Fail2Ban Config"]},{"title":"Edit Fail2Ban","path":"/api/v1/edit/fail2ban","pathTemplate":"/api/v1/edit/fail2ban","slug":"post~api~v1~edit~fail2ban","method":"post","description":"\nUsing this endpoint you can edit the Fail2Ban config and black or whitelist new ips.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":[],"description":"has to be none","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"description":"array containing the fail2ban settings","required":false,"members":[],"schema":{"type":"object"}}]},"example":"{ \n \"items\":[\n \"none\"\n ],\n \"attr\": {\n \"ban_time\": \"86400\",\n \"max_attempts\": \"5\",\n \"retry_window\": \"600\",\n \"netban_ipv4\": \"24\",\n \"netban_ipv6\": \"64\",\n \"whitelist\": \"mailcow.tld\",\n \"blacklist\": \"10.100.6.5/32,10.100.8.4/32\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"ban_time\": {\n \"type\": \"number\"\n },\n \"max_attempts\": {\n \"type\": \"number\"\n },\n \"retry_window\": {\n \"type\": \"number\"\n },\n \"netban_ipv4\": {\n \"type\": \"number\"\n },\n \"netban_ipv6\": {\n \"type\": \"number\"\n },\n \"whitelist\": {\n \"type\": \"string\"\n },\n \"backlist\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"type\": \"success\",\n \"log\": [\n \"fail2ban\",\n \"edit\",\n {\n \"network\": [\n \"none\"\n ],\n \"ban_time\": \"86400\",\n \"max_attempts\": \"5\",\n \"retry_window\": \"600\",\n \"netban_ipv4\": \"24\",\n \"netban_ipv6\": \"64\",\n \"whitelist\": \"mailcow.tld\",\n \"blacklist\": \"10.100.6.5/32,10.100.8.4/32\"\n }\n ],\n \"msg\": \"f2b_modified\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fail2Ban","Edit Fail2Ban"]},{"title":"Generate DKIM Key","path":"/api/v1/add/dkim","pathTemplate":"/api/v1/add/dkim","slug":"post~api~v1~add~dkim","method":"post","description":"\nUsing this endpoint you can generate new DKIM keys.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"the domain which a key should be generated for","required":false,"members":[],"schema":{"type":"string"}},{"key":"dkim_selector","description":"the DKIM selector default dkim","required":false,"members":[],"schema":{"type":"string"}},{"key":"key_size","description":"the key size (1024 or 2048)","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"domains\":\"mailcow.tld\",\n \"dkim_selector\":\"dkim\",\n \"key_size\":\"2048\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"dkim_selector\": {\n \"type\": \"string\"\n },\n \"key_size\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"add\",\n {\n \"domains\": \"hanspeterlol.de\",\n \"dkim_selector\": \"dkim\",\n \"key_size\": \"2048\"\n }\n ],\n \"msg\": [\n \"dkim_added\",\n \"hanspeterlol.de\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Generate DKIM Key"]},{"title":"Duplicate DKIM Key","path":"/api/v1/add/dkim_duplicate","pathTemplate":"/api/v1/add/dkim_duplicate","slug":"post~api~v1~add~dkim~duplicate","method":"post","description":"\nUsing this endpoint you can duplicate the DKIM Key of one domain.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"fron_domain","description":"the domain where the dkim key should be copied from","required":false,"members":[],"schema":{"type":"string"}},{"key":"to_domain","description":"the domain where the dkim key should be copied to","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"from_domain\":\"mailcow.tld\",\n \"to_domain\":\"awesomecow.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"fron_domain\": {\n \"type\": \"string\"\n },\n \"to_domain\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"duplicate\",\n {\n \"from_domain\": \"mailcow.tld\",\n \"to_domain\": \"awesomecow.tld\"\n }\n ],\n \"msg\": [\n \"dkim_duplicated\",\n \"mailcow.tld\",\n \"awesomecow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Duplicate DKIM Key"]},{"title":"Delete DKIM Key","path":"/api/v1/delete/dkim","pathTemplate":"/api/v1/delete/dkim","slug":"post~api~v1~delete~dkim","method":"post","description":"\nUsing this endpoint a existing DKIM Key can be deleted","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"[\"mailcow.tld\"]\n","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"delete\",\n {\n \"domains\": [\n \"mailcow.tld\"\n ]\n }\n ],\n \"msg\": [\n \"dkim_removed\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Delete DKIM Key"]},{"title":"Get Domain Admins","path":"/api/v1/get/domain-admin/all","pathTemplate":"/api/v1/get/domain-admin/all","slug":"get~api~v1~get~domain-admin~all","method":"get","description":"\n","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"username\": \"testadmin\",\n \"tfa_active\": \"✕\",\n \"active\": \"✓\",\n \"tfa_active_int\": null,\n \"active_int\": 1,\n \"created\": \"2019-10-02 10:29:41\",\n \"selected_domains\": [\n \"mailcow.tld\"\n ],\n \"unselected_domains\": [\n \"awesomemailcow.de\",\n \"mailcowisgreat.de\"\n ]\n }\n]\n","schema":""}}],"tags":["Domain admin","Get Domain Admins"]},{"title":"Create Domain Admin user","path":"/api/v1/add/domain-admin","pathTemplate":"/api/v1/add/domain-admin","slug":"post~api~v1~add~domain-admin","method":"post","description":"\nUsing this endpoint you can create a new Domain Admin user. This user has full control over a domain, and can create new mailboxes and aliases.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"the username for the admin user","required":false,"members":[],"schema":{"type":"string"}},{"key":"domains","description":"the domains the user should be a admin of","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"domain admin user password","required":false,"members":[],"schema":{"type":"string"}},{"key":"password2","description":"domain admin user password","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"username\": \"testadmin\",\n \"domains\": \"mailcow.tld\",\n \"password\": \"supersecurepw\",\n \"password2\": \"supersecurepw\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"domains\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"domain_admin\",\n \"add\",\n {\n \"username\": \"testadmin\",\n \"domains\": \"mailcow.tld\",\n \"password\": \"*\",\n \"password2\": \"*\",\n \"active\": \"1\"\n }\n ],\n \"msg\": [\n \"domain_admin_added\",\n \"testadmin\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain admin","Create Domain Admin user"]},{"title":"Delete Domain Admin","path":"/api/v1/delete/domain-admin","pathTemplate":"/api/v1/delete/domain-admin","slug":"post~api~v1~delete~domain-admin","method":"post","description":"\nUsing this endpoint a existing Domain Admin user can be deleted.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["username"],"description":"contains list of usernames of the users you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"testadmin\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"domain_admin\",\n \"delete\",\n {\n \"username\": [\n \"testadmin\"\n ]\n }\n ],\n \"msg\": [\n \"domain_admin_removed\",\n \"testadmin\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain admin","Delete Domain Admin"]},{"title":"Get BCC Map","path":"/api/v1/get/bcc/{id}","pathTemplate":"/api/v1/get/bcc/{id}","slug":"get~api~v1~get~bcc~id","method":"get","description":"\nUsing this endpoint you can get all BCC maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 3,\n \"local_dest\": \"@mailcow.tld\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"type\": \"sender\",\n \"created\": \"2019-10-02 21:44:34\",\n \"domain\": \"mailcow.tld\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Address Rewriting","Get BCC Map"]},{"title":"Create BCC Map","path":"/api/v1/add/bcc","pathTemplate":"/api/v1/add/bcc","slug":"post~api~v1~add~bcc","method":"post","description":"\nUsing this endpoint you can create a BCC map to forward all mails via a bcc for a given domain.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"local_dest","description":"the domain which emails should be forwarded","required":false,"members":[],"schema":{"type":"string"}},{"key":"type","description":"the type of bcc map can be `sender` or `recipient`","required":false,"members":[],"schema":{"type":"string"}},{"key":"bcc_dest","description":"the email address where all mails should be send to","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"local_dest\": \"mailcow.tld\",\n \"type\": \"sender\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"local_dest\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"bcc_dest\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"bcc\",\n \"add\",\n {\n \"local_dest\": \"mailcow.tld\",\n \"type\": \"sender\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": \"bcc_saved\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Create BCC Map"]},{"title":"Delete BCC Map","path":"/api/v1/delete/bcc","pathTemplate":"/api/v1/delete/bcc","slug":"post~api~v1~delete~bcc","method":"post","description":"\nUsing this endpoint you can delete a BCC map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of bcc maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"bcc\",\n \"delete\",\n {\n \"id\": [\n \"4\"\n ]\n },\n null\n ],\n \"msg\": [\n \"bcc_deleted\",\n \"4\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Delete BCC Map"]},{"title":"Get Recipient Map","path":"/api/v1/get/recipient_map/{id}","pathTemplate":"/api/v1/get/recipient_map/{id}","slug":"get~api~v1~get~recipient~map~id","method":"get","description":"\nUsing this endpoint you can get all recipient maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 3,\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"created\": \"2019-10-02 22:06:29\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Address Rewriting","Get Recipient Map"]},{"title":"Create Recipient Map","path":"/api/v1/add/recipient_map","pathTemplate":"/api/v1/add/recipient_map","slug":"post~api~v1~add~recipient~map","method":"post","description":"\nUsing this endpoint you can create a recipient map to forward all mails from one email address to another.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"recipient_map_old","description":"the email address which emails should be forwarded","required":false,"members":[],"schema":{"type":"string"}},{"key":"recipient_map_new","description":"the email address that should receive the forwarded emails","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"recipient_map_old\": {\n \"type\": \"string\"\n },\n \"recipient_map_new\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"recipient_map\",\n \"add\",\n {\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"recipient_map_entry_saved\",\n \"recipient@mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Create Recipient Map"]},{"title":"Delete Recipient Map","path":"/api/v1/delete/recipient_map","pathTemplate":"/api/v1/delete/recipient_map","slug":"post~api~v1~delete~recipient~map","method":"post","description":"\nUsing this endpoint you can delete a recipient map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of recipient maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"recipient_map\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n },\n null\n ],\n \"msg\": [\n \"recipient_map_entry_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Delete Recipient Map"]},{"title":"Get TLS Policy Map","path":"/api/v1/get/tls-policy-map/{id}","pathTemplate":"/api/v1/get/tls-policy-map/{id}","slug":"get~api~v1~get~tls-policy-map~id","method":"get","description":"\nUsing this endpoint you can get all TLS policy map override maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"created\": \"2019-10-03 08:42:12\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Outgoing TLS Policy Map Overrides","Get TLS Policy Map"]},{"title":"Create TLS Policy Map","path":"/api/v1/add/tls-policy-map","pathTemplate":"/api/v1/add/tls-policy-map","slug":"post~api~v1~add~tls-policy-map","method":"post","description":"\nUsing this endpoint you can create a TLS policy map override.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"dest","description":"the target domain or email address","required":false,"members":[],"schema":{"type":"string"}},{"key":"policy","description":"the policy","required":false,"members":[],"schema":{"type":"enum"}},{"key":"parameters","description":"custom parameters you find out more about them [here](http://www.postfix.org/postconf.5.html#smtp_tls_policy_maps)","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"dest\": {\n \"type\": \"string\"\n },\n \"policy\": {\n \"enum\": [\n \"none\",\n \"may\",\n \"encrypt\",\n \"dane\",\n \"fingerprint\",\n \"verify\",\n \"secure\"\n ]\n },\n \"parameters\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"tls_policy_maps\",\n \"add\",\n {\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"tls_policy_map_entry_saved\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Outgoing TLS Policy Map Overrides","Create TLS Policy Map"]},{"title":"Delete TLS Policy Map","path":"/api/v1/delete/tls-policy-map","pathTemplate":"/api/v1/delete/tls-policy-map","slug":"post~api~v1~delete~tls-policy-map","method":"post","description":"\nUsing this endpoint you can delete a TLS Policy Map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of tls policy maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"tls_policy_maps\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n },\n null\n ],\n \"msg\": [\n \"tls_policy_map_entry_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Outgoing TLS Policy Map Overrides","Delete TLS Policy Map"]},{"title":"Get oAuth Clients","path":"/api/v1/get/oauth2-client/{id}","pathTemplate":"/api/v1/get/oauth2-client/{id}","slug":"get~api~v1~get~oauth2-client~id","method":"get","description":"\nUsing this endpoint you can get all oAuth clients.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"client_id\": \"17c76aaa88c0\",\n \"client_secret\": \"73fc668a88147e32a31ff80c\",\n \"redirect_uri\": \"https:\\/\\/mailcow.tld\",\n \"grant_types\": null,\n \"scope\": \"profile\",\n \"user_id\": null\n }\n]\n","schema":""}}],"tags":["oAuth Clients","Get oAuth Clients"]},{"title":"Create oAuth Client","path":"/api/v1/add/oauth2-client","pathTemplate":"/api/v1/add/oauth2-client","slug":"post~api~v1~add~oauth2-client","method":"post","description":"\nUsing this endpoint you can create a oAuth clients.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"redirect_uri","description":"the uri where you should be redirected after oAuth","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"redirect_uri\":\"https://mailcow.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"redirect_uri\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"oauth2\",\n \"add\",\n \"client\",\n {\n \"redirect_uri\": \"https:\\/\\/mailcow.tld\"\n }\n ],\n \"msg\": \"Added client access\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["oAuth Clients","Create oAuth Client"]},{"title":"Delete oAuth Client","path":"/api/v1/delete/oauth2-client","pathTemplate":"/api/v1/delete/oauth2-client","slug":"post~api~v1~delete~oauth2-client","method":"post","description":"\nUsing this endpoint you can delete a oAuth client, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of oAuth clients you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"oauth2\",\n \"delete\",\n \"client\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"items_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["oAuth Clients","Delete oAuth Client"]},{"title":"Get Sender-Dependent Transports","path":"/api/v1/get/relayhost/{id}","pathTemplate":"/api/v1/get/relayhost/{id}","slug":"get~api~v1~get~relayhost~id","method":"get","description":"\nUsing this endpoint you can get all Sender-Dependent Transports.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\",\n \"active_int\": 1,\n \"password_short\": \"tes...\",\n \"active\": \"✓\",\n \"used_by_domains\": \"\"\n }\n]\n","schema":""}}],"tags":["Routing","Get Sender-Dependent Transports"]},{"title":"Create Sender-Dependent Transports","path":"/api/v1/add/relayhost","pathTemplate":"/api/v1/add/relayhost","slug":"post~api~v1~add~relayhost","method":"post","description":"\nUsing this endpoint you can create Sender-Dependent Transports.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"hostname","description":"the hostname of the smtp server with port","required":false,"members":[],"schema":{"type":"string"}},{"key":"username","description":"the username used to authenticate","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"the password for the smtp user","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"relayhost\",\n \"add\",\n {\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\"\n }\n ],\n \"msg\": [\n \"relayhost_added\",\n \"\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Create Sender-Dependent Transports"]},{"title":"Delete Sender-Dependent Transports","path":"/api/v1/delete/relayhost","pathTemplate":"/api/v1/delete/relayhost","slug":"post~api~v1~delete~relayhost","method":"post","description":"\nUsing this endpoint you can delete a Sender-Dependent Transport, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of Sender-Dependent Transport you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"relayhost\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"relayhost_removed\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Delete Sender-Dependent Transports"]},{"title":"Get Transport Maps","path":"/api/v1/get/transport/{id}","pathTemplate":"/api/v1/get/transport/{id}","slug":"get~api~v1~get~transport~id","method":"get","description":"\nUsing this endpoint you can get all Transport Maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"destination\": \"example.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active_int\": 1,\n \"lookup_mx_int\": 0,\n \"password_short\": \"sup...\",\n \"active\": \"✓\",\n \"lookup_mx\": \"✕\"\n }\n]\n","schema":""}}],"tags":["Routing","Get Transport Maps"]},{"title":"Create Transport Maps","path":"/api/v1/add/transport/all","pathTemplate":"/api/v1/add/transport/all","slug":"post~api~v1~add~transport~all","method":"post","description":"\nUsing this endpoint you can create Sender-Dependent Transports.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"destination","required":false,"members":[],"schema":{"type":"string"}},{"key":"nexthop","required":false,"members":[],"schema":{"type":"string"}},{"key":"username","description":"the username used to authenticate","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"the password for the smtp user","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"destination\": \"example.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\"\n },\n \"nexthop\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"transport\",\n \"add\",\n {\n \"destination\": \"example2.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active\": \"1\"\n }\n ],\n \"msg\": [\n \"relayhost_added\",\n \"\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Create Transport Maps"]},{"title":"Delete Transport Maps","path":"/api/v1/delete/transport","pathTemplate":"/api/v1/delete/transport","slug":"post~api~v1~delete~transport","method":"post","description":"\nUsing this endpoint you can delete a Transport Maps, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of transport maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"transport\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"relayhost_removed\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Delete Transport Maps"]},{"title":"Get Resources","path":"/api/v1/get/resource/all","pathTemplate":"/api/v1/get/resource/all","slug":"get~api~v1~get~resource~all","method":"get","description":"\nUsing this endpoint you can get all Resources.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"name\": \"test@mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings\": 0,\n \"description\": \"test\",\n \"active\": \"✓\",\n \"active_int\": 1,\n \"domain\": \"mailcow.tld\",\n \"local_part\": \"test\"\n }\n]\n","schema":""}}],"tags":["Resources","Get Resources"]},{"title":"Create Resources","path":"/api/v1/add/resource","pathTemplate":"/api/v1/add/resource","slug":"post~api~v1~add~resource","method":"post","description":"\nUsing this endpoint you can create Resources.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"description","description":"a description of the resource","required":false,"members":[],"schema":{"type":"string"}},{"key":"domain","description":"the domain for which the resource should be","required":false,"members":[],"schema":{"type":"string"}},{"key":"kind","description":"the kind of recouse","required":false,"members":[],"schema":{"type":"enum"}},{"key":"multiple_bookings_select","required":false,"members":[],"schema":{"type":"enum"}},{"key":"multiple_bookings_custom","description":"always empty","required":false,"members":[],"schema":{"type":"number"}},{"key":"multiple_bookings","required":false,"members":[],"schema":{"type":"enum"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"description\": \"test\",\n \"domain\": \"mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings_select\": \"0\",\n \"multiple_bookings_custom\": \"\",\n \"multiple_bookings\": \"0\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"kind\": {\n \"enum\": [\n \"location\",\n \"group\",\n \"thing\"\n ]\n },\n \"multiple_bookings_select\": {\n \"enum\": [\n \"-1\",\n \"1\",\n \"custom\"\n ]\n },\n \"multiple_bookings_custom\": {\n \"type\": \"number\"\n },\n \"multiple_bookings\": {\n \"enum\": [\n \"-1\",\n \"1\",\n \"custom\"\n ]\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"add\",\n \"resource\",\n {\n \"description\": \"test\",\n \"domain\": \"mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings_select\": \"0\",\n \"multiple_bookings_custom\": \"\",\n \"multiple_bookings\": \"0\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"resource_added\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Resources","Create Resources"]},{"title":"Delete Resources","path":"/api/v1/delete/resource","pathTemplate":"/api/v1/delete/resource","slug":"post~api~v1~delete~resource","method":"post","description":"\nUsing this endpoint you can delete a Resources, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["description@domain"],"description":"contains list of Resources you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"test@mailcow.tld\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"delete\",\n \"resource\",\n {\n \"name\": [\n \"test@mailcow.tld\"\n ]\n },\n null\n ],\n \"msg\": [\n \"resource_removed\",\n \"test@mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Resources","Delete Resources"]}],"tagActions":[{"title":"Address Rewriting","children":[{"title":"Create BCC Map","actions":[{"title":"Create BCC Map","method":"post","path":"/api/v1/add/bcc","slug":"post~api~v1~add~bcc"}]},{"title":"Create Recipient Map","actions":[{"title":"Create Recipient Map","method":"post","path":"/api/v1/add/recipient_map","slug":"post~api~v1~add~recipient~map"}]},{"title":"Delete BCC Map","actions":[{"title":"Delete BCC Map","method":"post","path":"/api/v1/delete/bcc","slug":"post~api~v1~delete~bcc"}]},{"title":"Delete Recipient Map","actions":[{"title":"Delete Recipient Map","method":"post","path":"/api/v1/delete/recipient_map","slug":"post~api~v1~delete~recipient~map"}]},{"title":"Get BCC Map","actions":[{"title":"Get BCC Map","method":"get","path":"/api/v1/get/bcc/{id}","slug":"get~api~v1~get~bcc~id"}]},{"title":"Get Recipient Map","actions":[{"title":"Get Recipient Map","method":"get","path":"/api/v1/get/recipient_map/{id}","slug":"get~api~v1~get~recipient~map~id"}]}]},{"title":"Aliases","children":[{"title":"Create alias","actions":[{"title":"Create alias","method":"post","path":"/api/v1/add/alias","slug":"post~api~v1~add~alias"}]},{"title":"Delete alias","actions":[{"title":"Delete alias","method":"post","path":"/api/v1/delete/alias","slug":"post~api~v1~delete~alias"}]},{"title":"GET aliases","actions":[{"title":"GET aliases","method":"get","path":"/api/v1/get/alias/{id}","slug":"get~api~v1~get~alias~id"}]},{"title":"Update alias","actions":[{"title":"Update alias","method":"post","path":"/api/v1/edit/alias","slug":"post~api~v1~edit~alias"}]}]},{"title":"DKIM","children":[{"title":"Delete DKIM Key","actions":[{"title":"Delete DKIM Key","method":"post","path":"/api/v1/delete/dkim","slug":"post~api~v1~delete~dkim"}]},{"title":"Duplicate DKIM Key","actions":[{"title":"Duplicate DKIM Key","method":"post","path":"/api/v1/add/dkim_duplicate","slug":"post~api~v1~add~dkim~duplicate"}]},{"title":"Generate DKIM Key","actions":[{"title":"Generate DKIM Key","method":"post","path":"/api/v1/add/dkim","slug":"post~api~v1~add~dkim"}]}]},{"title":"Domain admin","children":[{"title":"Create Domain Admin user","actions":[{"title":"Create Domain Admin user","method":"post","path":"/api/v1/add/domain-admin","slug":"post~api~v1~add~domain-admin"}]},{"title":"Delete Domain Admin","actions":[{"title":"Delete Domain Admin","method":"post","path":"/api/v1/delete/domain-admin","slug":"post~api~v1~delete~domain-admin"}]},{"title":"Get Domain Admins","actions":[{"title":"Get Domain Admins","method":"get","path":"/api/v1/get/domain-admin/all","slug":"get~api~v1~get~domain-admin~all"}]}]},{"title":"Domain antispam policies","children":[{"title":"Create domain policy","actions":[{"title":"Create domain policy","method":"post","path":"/api/v1/add/domain-policy","slug":"post~api~v1~add~domain-policy"}]},{"title":"Delete domain policy","actions":[{"title":"Delete domain policy","method":"post","path":"/api/v1/delete/domain-policy","slug":"post~api~v1~delete~domain-policy"}]},{"title":"List blacklist domain policy","actions":[{"title":"List blacklist domain policy","method":"get","path":"/api/v1/get/policy_bl_domain/{domain}","slug":"get~api~v1~get~policy~bl~domain~domain"}]},{"title":"List whitelist domain policy","actions":[{"title":"List whitelist domain policy","method":"get","path":"/api/v1/get/policy_wl_domain/{domain}","slug":"get~api~v1~get~policy~wl~domain~domain"}]}]},{"title":"Domains","children":[{"title":"Create domain","actions":[{"title":"Create domain","method":"post","path":"/api/v1/add/domain","slug":"post~api~v1~add~domain"}]},{"title":"Delete domain","actions":[{"title":"Delete domain","method":"post","path":"/api/v1/delete/domain","slug":"post~api~v1~delete~domain"}]},{"title":"Get domains","actions":[{"title":"Get domains","method":"get","path":"/api/v1/get/domain/{id}","slug":"get~api~v1~get~domain~id"}]},{"title":"Update domain","actions":[{"title":"Update domain","method":"post","path":"/api/v1/edit/domain","slug":"post~api~v1~edit~domain"}]}]},{"title":"Fail2Ban","children":[{"title":"Edit Fail2Ban","actions":[{"title":"Edit Fail2Ban","method":"post","path":"/api/v1/edit/fail2ban","slug":"post~api~v1~edit~fail2ban"}]},{"title":"Get Fail2Ban Config","actions":[{"title":"Get Fail2Ban Config","method":"get","path":"/api/v1/get/fail2ban","slug":"get~api~v1~get~fail2ban"}]}]},{"title":"Fordwarding Hosts","children":[{"title":"Add Forward Host","actions":[{"title":"Add Forward Host","method":"post","path":"/api/v1/add/fwdhost","slug":"post~api~v1~add~fwdhost"}]},{"title":"Get Forwarding Hosts","actions":[{"title":"Get Forwarding Hosts","method":"get","path":"/api/v1/get/fwdhost/all","slug":"get~api~v1~get~fwdhost~all"}]}]},{"title":"Logs","children":[{"title":"Get ACME logs","actions":[{"title":"Get ACME logs","method":"get","path":"/api/v1/get/logs/acme/{count}","slug":"get~api~v1~get~logs~acme~count"}]},{"title":"Get Api logs","actions":[{"title":"Get Api logs","method":"get","path":"/api/v1/get/logs/api/{count}","slug":"get~api~v1~get~logs~api~count"}]},{"title":"Get Autodiscover logs","actions":[{"title":"Get Autodiscover logs","method":"get","path":"/api/v1/get/logs/autodiscover/{count}","slug":"get~api~v1~get~logs~autodiscover~count"}]},{"title":"Get Dovecot logs","actions":[{"title":"Get Dovecot logs","method":"get","path":"/api/v1/get/logs/dovecot/{count}","slug":"get~api~v1~get~logs~dovecot~count"}]},{"title":"Get Netfilter logs","actions":[{"title":"Get Netfilter logs","method":"get","path":"/api/v1/get/logs/netfilter/{count}","slug":"get~api~v1~get~logs~netfilter~count"}]},{"title":"Get Postfix logs","actions":[{"title":"Get Postfix logs","method":"get","path":"/api/v1/get/logs/postfix/{count}","slug":"get~api~v1~get~logs~postfix~count"}]},{"title":"Get Ratelimit logs","actions":[{"title":"Get Ratelimit logs","method":"get","path":"/api/v1/get/logs/ratelimited/{count}","slug":"get~api~v1~get~logs~ratelimited~count"}]},{"title":"Get Rspamd logs","actions":[{"title":"Get Rspamd logs","method":"get","path":"/api/v1/get/logs/rspamd-history/{count}","slug":"get~api~v1~get~logs~rspamd-history~count"}]},{"title":"Get SOGo logs","actions":[{"title":"Get SOGo logs","method":"get","path":"/api/v1/get/logs/sogo/{count}","slug":"get~api~v1~get~logs~sogo~count"}]},{"title":"Get Watchdog logs","actions":[{"title":"Get Watchdog logs","method":"get","path":"/api/v1/get/logs/watchdog/{count}","slug":"get~api~v1~get~logs~watchdog~count"}]}]},{"title":"Mailboxes","children":[{"title":"Create mailbox","actions":[{"title":"Create mailbox","method":"post","path":"/api/v1/add/mailbox","slug":"post~api~v1~add~mailbox"}]},{"title":"Delete mailbox","actions":[{"title":"Delete mailbox","method":"post","path":"/api/v1/delete/mailbox","slug":"post~api~v1~delete~mailbox"}]},{"title":"Get mailboxes","actions":[{"title":"Get mailboxes","method":"get","path":"/api/v1/get/mailbox/{id}","slug":"get~api~v1~get~mailbox~id"}]},{"title":"Quarantine Notifications","actions":[{"title":"Quarantine Notifications","method":"post","path":"/api/v1/edit/quarantine_notification","slug":"post~api~v1~edit~quarantine~notification"}]},{"title":"Update mailbox","actions":[{"title":"Update mailbox","method":"post","path":"/api/v1/edit/mailbox","slug":"post~api~v1~edit~mailbox"}]}]},{"title":"Outgoing TLS Policy Map Overrides","children":[{"title":"Create TLS Policy Map","actions":[{"title":"Create TLS Policy Map","method":"post","path":"/api/v1/add/tls-policy-map","slug":"post~api~v1~add~tls-policy-map"}]},{"title":"Delete TLS Policy Map","actions":[{"title":"Delete TLS Policy Map","method":"post","path":"/api/v1/delete/tls-policy-map","slug":"post~api~v1~delete~tls-policy-map"}]},{"title":"Get TLS Policy Map","actions":[{"title":"Get TLS Policy Map","method":"get","path":"/api/v1/get/tls-policy-map/{id}","slug":"get~api~v1~get~tls-policy-map~id"}]}]},{"title":"Quarantine","children":[{"title":"Delete mails in Quarantine","actions":[{"title":"Delete mails in Quarantine","method":"post","path":"/api/v1/delete/qitem","slug":"post~api~v1~delete~qitem"}]},{"title":"Get mails in Quarantine","actions":[{"title":"Get mails in Quarantine","method":"get","path":"/api/v1/get/quarantine/all","slug":"get~api~v1~get~quarantine~all"}]}]},{"title":"Queue Manager","children":[{"title":"Delete Queue","actions":[{"title":"Delete Queue","method":"post","path":"/api/v1/delete/mailq","slug":"post~api~v1~delete~mailq"}]},{"title":"Flush Queue","actions":[{"title":"Flush Queue","method":"post","path":"/api/v1/edit/mailq","slug":"post~api~v1~edit~mailq"}]},{"title":"Get Queue","actions":[{"title":"Get Queue","method":"get","path":"/api/v1/get/mailq/all","slug":"get~api~v1~get~mailq~all"}]}]},{"title":"Resources","children":[{"title":"Create Resources","actions":[{"title":"Create Resources","method":"post","path":"/api/v1/add/resource","slug":"post~api~v1~add~resource"}]},{"title":"Delete Resources","actions":[{"title":"Delete Resources","method":"post","path":"/api/v1/delete/resource","slug":"post~api~v1~delete~resource"}]},{"title":"Get Resources","actions":[{"title":"Get Resources","method":"get","path":"/api/v1/get/resource/all","slug":"get~api~v1~get~resource~all"}]}]},{"title":"Routing","children":[{"title":"Create Sender-Dependent Transports","actions":[{"title":"Create Sender-Dependent Transports","method":"post","path":"/api/v1/add/relayhost","slug":"post~api~v1~add~relayhost"}]},{"title":"Create Transport Maps","actions":[{"title":"Create Transport Maps","method":"post","path":"/api/v1/add/transport/all","slug":"post~api~v1~add~transport~all"}]},{"title":"Delete Sender-Dependent Transports","actions":[{"title":"Delete Sender-Dependent Transports","method":"post","path":"/api/v1/delete/relayhost","slug":"post~api~v1~delete~relayhost"}]},{"title":"Delete Transport Maps","actions":[{"title":"Delete Transport Maps","method":"post","path":"/api/v1/delete/transport","slug":"post~api~v1~delete~transport"}]},{"title":"Get Sender-Dependent Transports","actions":[{"title":"Get Sender-Dependent Transports","method":"get","path":"/api/v1/get/relayhost/{id}","slug":"get~api~v1~get~relayhost~id"}]},{"title":"Get Transport Maps","actions":[{"title":"Get Transport Maps","method":"get","path":"/api/v1/get/transport/{id}","slug":"get~api~v1~get~transport~id"}]}]},{"title":"Sync jobs","children":[{"title":"Create sync job","actions":[{"title":"Create sync job","method":"post","path":"/api/v1/add/syncjob","slug":"post~api~v1~add~syncjob"}]},{"title":"Delete sync job","actions":[{"title":"Delete sync job","method":"post","path":"/api/v1/delete/syncjob","slug":"post~api~v1~delete~syncjob"}]},{"title":"Get sync jobs","actions":[{"title":"Get sync jobs","method":"get","path":"/api/v1/get/syncjobs/all/no_log","slug":"get~api~v1~get~syncjobs~all~no~log"}]},{"title":"Update sync job","actions":[{"title":"Update sync job","method":"post","path":"/api/v1/edit/syncjob","slug":"post~api~v1~edit~syncjob"}]}]},{"title":"oAuth Clients","children":[{"title":"Create oAuth Client","actions":[{"title":"Create oAuth Client","method":"post","path":"/api/v1/add/oauth2-client","slug":"post~api~v1~add~oauth2-client"}]},{"title":"Delete oAuth Client","actions":[{"title":"Delete oAuth Client","method":"post","path":"/api/v1/delete/oauth2-client","slug":"post~api~v1~delete~oauth2-client"}]},{"title":"Get oAuth Clients","actions":[{"title":"Get oAuth Clients","method":"get","path":"/api/v1/get/oauth2-client/{id}","slug":"get~api~v1~get~oauth2-client~id"}]}]}],"config":{"playground":{"enabled":true,"env":"easy","environments":{"easy":{"playground":false,"url":"/"},"advanced":{"url":"/"}}},"basePath":"/","stylesheets":[]}} + props: {"title":"mailcow API","description":"mailcow is complete e-mailing solution with advanced antispam, antivirus, nice UI and API.\n\nIn order to use this API you have to create a API key and add your IP address to the whitelist of allowed IPs this can be done by logging into the Mailcow UI using your admin account, then go to Configuration > Access > Edit administrator details > API. There you will find a collapsed API menu.\n\n**This documentation is in Work In Progress status. It contains only few endpoints.**","version":"","servers":[{"url":"https://mailcow.host/"}],"tags":[{"title":"Domains","description":"","children":[{"title":"Get domains","description":"","children":[]},{"title":"Create domain","description":"","children":[]},{"title":"Update domain","description":"","children":[]},{"title":"Delete domain","description":"","children":[]}]},{"title":"Domain antispam policies","description":"You can create antispam whitelist and blacklist policies","children":[{"title":"List whitelist domain policy","description":"","children":[]},{"title":"List blacklist domain policy","description":"","children":[]},{"title":"Create domain policy","description":"","children":[]},{"title":"Delete domain policy","description":"","children":[]}]},{"title":"Mailboxes","description":"","children":[{"title":"Get mailboxes","description":"","children":[]},{"title":"Create mailbox","description":"","children":[]},{"title":"Update mailbox","description":"","children":[]},{"title":"Delete mailbox","description":"","children":[]},{"title":"Quarantine Notifications","description":"","children":[]}]},{"title":"Aliases","description":"","children":[{"title":"GET aliases","description":"","children":[]},{"title":"Create alias","description":"","children":[]},{"title":"Update alias","description":"","children":[]},{"title":"Delete alias","description":"","children":[]}]},{"title":"Sync jobs","description":"","children":[{"title":"Get sync jobs","description":"","children":[]},{"title":"Create sync job","description":"","children":[]},{"title":"Update sync job","description":"","children":[]},{"title":"Delete sync job","description":"","children":[]}]},{"title":"Fordwarding Hosts","description":"","children":[{"title":"Get Forwarding Hosts","description":"","children":[]},{"title":"Add Forward Host","description":"","children":[]}]},{"title":"Logs","description":"","children":[{"title":"Get Postfix logs","description":"","children":[]},{"title":"Get Rspamd logs","description":"","children":[]},{"title":"Get Dovecot logs","description":"","children":[]},{"title":"Get ACME logs","description":"","children":[]},{"title":"Get SOGo logs","description":"","children":[]},{"title":"Get Watchdog logs","description":"","children":[]},{"title":"Get Api logs","description":"","children":[]},{"title":"Get Ratelimit logs","description":"","children":[]},{"title":"Get Netfilter logs","description":"","children":[]},{"title":"Get Autodiscover logs","description":"","children":[]}]},{"title":"Queue Manager","description":"","children":[{"title":"Get Queue","description":"","children":[]},{"title":"Flush Queue","description":"","children":[]},{"title":"Delete Queue","description":"","children":[]}]},{"title":"Quarantine","description":"","children":[{"title":"Get mails in Quarantine","description":"","children":[]},{"title":"Delete mails in Quarantine","description":"","children":[]}]},{"title":"Fail2Ban","description":"","children":[{"title":"Get Fail2Ban Config","description":"","children":[]},{"title":"Edit Fail2Ban","description":"","children":[]}]},{"title":"DKIM","description":"","children":[{"title":"Generate DKIM Key","description":"","children":[]},{"title":"Duplicate DKIM Key","description":"","children":[]},{"title":"Delete DKIM Key","description":"","children":[]}]},{"title":"Domain admin","description":"","children":[{"title":"Get Domain Admins","description":"","children":[]},{"title":"Create Domain Admin user","description":"","children":[]},{"title":"Delete Domain Admin","description":"","children":[]}]},{"title":"Address Rewriting","description":"","children":[{"title":"Get BCC Map","description":"","children":[]},{"title":"Create BCC Map","description":"","children":[]},{"title":"Delete BCC Map","description":"","children":[]},{"title":"Get Recipient Map","description":"","children":[]},{"title":"Create Recipient Map","description":"","children":[]},{"title":"Delete Recipient Map","description":"","children":[]}]},{"title":"Outgoing TLS Policy Map Overrides","description":"","children":[{"title":"Get TLS Policy Map","description":"","children":[]},{"title":"Create TLS Policy Map","description":"","children":[]},{"title":"Delete TLS Policy Map","description":"","children":[]}]},{"title":"oAuth Clients","description":"","children":[{"title":"Get oAuth Clients","description":"","children":[]},{"title":"Create oAuth Client","description":"","children":[]},{"title":"Delete oAuth Client","description":"","children":[]}]},{"title":"Routing","description":"","children":[{"title":"Get Sender-Dependent Transports","description":"","children":[]},{"title":"Create Sender-Dependent Transports","description":"","children":[]},{"title":"Delete Sender-Dependent Transports","description":"","children":[]},{"title":"Get Transport Maps","description":"","children":[]},{"title":"Create Transport Maps","description":"","children":[]},{"title":"Delete Transport Maps","description":"","children":[]}]},{"title":"Resources","description":"","children":[{"title":"Get Resources","description":"","children":[]},{"title":"Create Resources","description":"","children":[]},{"title":"Delete Resources","description":"","children":[]}]},{"title":"App Passwords","description":"","children":[{"title":"Get App Password","description":"","children":[]},{"title":"Create App Password","description":"","children":[]},{"title":"Delete App Password","description":"","children":[]}]}],"actions":[{"title":"Get domains","path":"/api/v1/get/domain/{id}","pathTemplate":"/api/v1/get/domain/{id}","slug":"get~api~v1~get~domain~id","method":"get","description":"\nYou can list all domains existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","mailcow.tld"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"max_new_mailbox_quota\": 10737418240,\n \"def_new_mailbox_quota\": 3221225472,\n \"quota_used_in_domain\": \"0\",\n \"mboxes_in_domain\": 0,\n \"mboxes_left\": 10,\n \"domain_name\": \"domain.tld\",\n \"description\": \"Some description\",\n \"max_num_aliases_for_domain\": 400,\n \"max_num_mboxes_for_domain\": 10,\n \"def_quota_for_mbox\": 3221225472,\n \"max_quota_for_mbox\": 10737418240,\n \"max_quota_for_domain\": 10737418240,\n \"relayhost\": \"0\",\n \"backupmx\": \"✘\",\n \"gal\": \"✘\",\n \"backupmx_int\": 0,\n \"gal_int\": 0,\n \"lang\": \"en\",\n \"rl\": false,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"relay_all_recipients\": \"✘\",\n \"relay_all_recipients_int\": 0,\n \"aliases_in_domain\": 0,\n \"aliases_left\": 400\n },\n {\n \"max_new_mailbox_quota\": 10737418240,\n \"def_new_mailbox_quota\": 3221225472,\n \"quota_used_in_domain\": \"0\",\n \"mboxes_in_domain\": 0,\n \"mboxes_left\": 10,\n \"domain_name\": \"domain2.tld\",\n \"description\": \"domain description\",\n \"max_num_aliases_for_domain\": 400,\n \"max_num_mboxes_for_domain\": 10,\n \"def_quota_for_mbox\": 3221225472,\n \"max_quota_for_mbox\": 10737418240,\n \"max_quota_for_domain\": 10737418240,\n \"relayhost\": \"0\",\n \"backupmx\": \"✔\",\n \"gal\": \"✘\",\n \"backupmx_int\": 1,\n \"gal_int\": 0,\n \"lang\": \"cs\",\n \"rl\": false,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"relay_all_recipients\": \"✘\",\n \"relay_all_recipients_int\": 0,\n \"aliases_in_domain\": 0,\n \"aliases_left\": 400\n }\n]\n","schema":""}}],"tags":["Domains","Get domains"]},{"title":"Create domain","path":"/api/v1/add/domain","pathTemplate":"/api/v1/add/domain","slug":"post~api~v1~add~domain","method":"post","description":"\nYou may create your own domain using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"","description":"You can also define rate limiting. If `rl_value` is not empty string, them ratelimit object is created and returned in response.","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"Fully qualified domain name","required":false,"members":[],"schema":{"type":"string"}},{"key":"description","description":"Description of domain","required":false,"members":[],"schema":{"type":"string"}},{"key":"aliases","description":"limit count of aliases associated with this domain","required":false,"members":[],"schema":{"type":"number"}},{"key":"mailboxes","description":"limit count of mailboxes associated with this domain","required":false,"members":[],"schema":{"type":"number"}},{"key":"defquota","description":"predefined mailbox quota in `add mailbox` form","required":false,"members":[],"schema":{"type":"number"}},{"key":"maxquota","description":"maximum quota per mailbox","required":false,"members":[],"schema":{"type":"number"}},{"key":"quota","description":"maximum quota for this domain (for all mailboxes in sum)","required":false,"members":[],"schema":{"type":"number"}},{"key":"active","description":"is domain active or not","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"rl_value","description":"rate limit value","required":false,"members":[],"schema":{"type":"number"}},{"key":"rl_frame","required":false,"members":[],"schema":{"type":"enum"}},{"key":"backupmx","description":"relay domain or not","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"relay_all_recipients","description":"if not, them you have to create \"dummy\" mailbox for each address to relay","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"lang","description":"language code","required":false,"members":[],"schema":{"type":"enum"}}]},"example":"{\n \"domain\":\"domain.tld\",\n \"description\":\"some decsription\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"rl_value\":\"10\",\n \"rl_frame\":\"s\",\n \"backupmx\":\"0\",\n \"relay_all_recipients\":\"0\",\n \"lang\":\"cs\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"aliases\": {\n \"type\": \"number\"\n },\n \"mailboxes\": {\n \"type\": \"number\"\n },\n \"defquota\": {\n \"type\": \"number\"\n },\n \"maxquota\": {\n \"type\": \"number\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"rl_value\": {\n \"type\": \"number\"\n },\n \"rl_frame\": {\n \"enum\": [\n \"s\",\n \"m\",\n \"h\"\n ]\n },\n \"backupmx\": {\n \"type\": \"boolean\"\n },\n \"relay_all_recipients\": {\n \"type\": \"boolean\"\n },\n \"lang\": {\n \"enum\": [\n \"sk\",\n \"cs\",\n \"de\",\n \"en\",\n \"es\",\n \"fr\",\n \"lv\",\n \"nl\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"it\",\n \"ca\"\n ]\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":" [\n {\n \"type\": \"success\",\n \"log\": [\n \"ratelimit\",\n \"edit\",\n \"domain\",\n {\n \"rl_value\": \"10\",\n \"rl_frame\": \"s\",\n \"object\": \"domain.tld\"\n }\n ],\n \"msg\": [\n \"rl_saved\",\n \"domain.tld\"\n ]\n },\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"add\",\n \"domain\",\n {\n \"domain\": \"domain.tld\",\n \"description\": \"some decsription\",\n \"aliases\": \"400\",\n \"mailboxes\": \"10\",\n \"defquota\": \"3072\",\n \"maxquota\": \"10240\",\n \"quota\": \"10240\",\n \"active\": \"1\",\n \"rl_value\": \"10\",\n \"rl_frame\": \"s\",\n \"backupmx\": \"0\",\n \"relay_all_recipients\": \"0\",\n \"lang\":\"cs\"\n },\n null\n ],\n \"msg\": [\n \"domain_added\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Create domain"]},{"title":"Update domain","path":"/api/v1/edit/domain","pathTemplate":"/api/v1/edit/domain","slug":"post~api~v1~edit~domain","method":"post","description":"\nYou can update one or more domains per request. You can also send just attributes you want to change. \nExample: You can add domain names to items list and in attr object just include `\"active\": \"0\"` to deactivate domains.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["domain_name"],"description":"contains list of domain names you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"domain.tld\"\n ],\n \"attr\":{\n \"description\":\"domain description\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"gal\":\"1\",\n \"relayhost\":\"2\",\n \"backupmx\":\"1\",\n \"relay_all_recipients\":\"0\",\n \"lang\":\"cs\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\"\n },\n \"aliases\": {\n \"type\": \"number\"\n },\n \"mailboxes\": {\n \"type\": \"number\"\n },\n \"defquota\": {\n \"type\": \"number\"\n },\n \"maxquota\": {\n \"type\": \"number\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"gal\": {\n \"type\": \"boolean\"\n },\n \"relayhost\": {\n \"type\": \"number\"\n },\n \"backupmx\": {\n \"type\": \"boolean\"\n },\n \"relay_all_recipients\": {\n \"type\": \"boolean\"\n },\n \"lang\": {\n \"enum\": [\n \"sk\",\n \"cs\",\n \"de\",\n \"en\",\n \"es\",\n \"fr\",\n \"lv\",\n \"nl\",\n \"pl\",\n \"pt\",\n \"ru\",\n \"it\",\n \"ca\"\n ]\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\"\n ],\n \"description\":\"domain description\",\n \"aliases\":\"400\",\n \"mailboxes\":\"10\",\n \"defquota\":\"3072\",\n \"maxquota\":\"10240\",\n \"quota\":\"10240\",\n \"active\":\"1\",\n \"gal\":\"1\",\n \"relayhost\":\"2\",\n \"backupmx\":\"1\",\n \"relay_all_recipients\":\"0\",\n \"lang:\"cs\"\n },\n null\n ],\n \"msg\":[\n \"domain_modified\",\n \"domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Update domain"]},{"title":"Delete domain","path":"/api/v1/delete/domain","pathTemplate":"/api/v1/delete/domain","slug":"post~api~v1~delete~domain","method":"post","description":"\nYou can delete one or more domains.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["domain_name"],"description":"contains list of domains you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"domain.tld\",\n \"domain2.tld\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\",\n \"domain2.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"domain_removed\",\n \"domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"domain\",\n {\n \"domain\":[\n \"domain.tld\",\n \"domain2.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"domain_removed\",\n \"domain2.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domains","Delete domain"]},{"title":"List whitelist domain policy","path":"/api/v1/get/policy_wl_domain/{domain}","pathTemplate":"/api/v1/get/policy_wl_domain/{domain}","slug":"get~api~v1~get~policy~wl~domain~domain","method":"get","description":"\nYou can list all whitelist policies per domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"object\": \"domain.tld\",\n \"value\": \"*@gooddomain.tld\",\n \"prefid\": 1\n }\n]\n","schema":""}}],"tags":["Domain antispam policies","List whitelist domain policy"]},{"title":"List blacklist domain policy","path":"/api/v1/get/policy_bl_domain/{domain}","pathTemplate":"/api/v1/get/policy_bl_domain/{domain}","slug":"get~api~v1~get~policy~bl~domain~domain","method":"get","description":"\nYou can list all blacklist policies per domain.","parameters":[{"location":"path","name":"domain","description":"name of domain","required":true,"schema":{"type":"string"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"object\": \"domain.tld\",\n \"value\": \"*@baddomain.tld\",\n \"prefid\": 2\n }\n]\n","schema":""}}],"tags":["Domain antispam policies","List blacklist domain policy"]},{"title":"Create domain policy","path":"/api/v1/add/domain-policy","pathTemplate":"/api/v1/add/domain-policy","slug":"post~api~v1~add~domain-policy","method":"post","description":"\nYou may create your own domain policy using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"domain name to which policy is associated to","required":false,"members":[],"schema":{"type":"string"}},{"key":"object_list","required":false,"members":[],"schema":{"type":"enum"}},{"key":"object_from","description":"exact address or use wildcard to match whole domain","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"domain\":\"domain.tld\",\n \"object_list\":\"bl\",\n \"object_from\":\"*@baddomain.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"object_list\": {\n \"enum\": [\n \"wl\",\n \"bl\"\n ]\n },\n \"object_from\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"add\",\n \"domain\",\n {\n \"domain\":\"domain.tld\",\n \"object_list\":\"bl\",\n \"object_from\":\"*@baddomain.tld\"\n }\n ],\n \"msg\":[\n \"domain_modified\",\n \"domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain antispam policies","Create domain policy"]},{"title":"Delete domain policy","path":"/api/v1/delete/domain-policy","pathTemplate":"/api/v1/delete/domain-policy","slug":"post~api~v1~delete~domain-policy","method":"post","description":"\nYou can delete one o more domain policies.","parameters":[],"transactions":[{"request":{"title":"","description":"Delete domain policy by ID","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of domain policys you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"1\",\n \"2\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":" [\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"delete\",\n \"domain\",\n {\n \"prefid\":[\n \"1\",\n \"2\"\n ]\n }\n ],\n \"msg\":[\n \"item_deleted\",\n \"1\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"policy\",\n \"delete\",\n \"domain\",\n {\n \"prefid\":[\n \"1\",\n \"2\"\n ]\n }\n ],\n \"msg\":[\n \"item_deleted\",\n \"2\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain antispam policies","Delete domain policy"]},{"title":"Get mailboxes","path":"/api/v1/get/mailbox/{id}","pathTemplate":"/api/v1/get/mailbox/{id}","slug":"get~api~v1~get~mailbox~id","method":"get","description":"\nYou can list all mailboxes existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","user@domain.tld"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"max_new_quota\":10737418240,\n \"username\":\"info@doman3.tld\",\n \"rl\":false,\n \"is_relayed\":0,\n \"name\":\"Full name\",\n \"active\":\"✔\",\n \"active_int\":1,\n \"domain\":\"doman3.tld\",\n \"local_part\":\"info\",\n \"quota\":3221225472,\n \"attributes\":{\n \"force_pw_update\":\"0\",\n \"tls_enforce_in\":\"0\",\n \"tls_enforce_out\":\"0\",\n \"sogo_access\":\"1\",\n \"mailbox_format\":\"maildir:\",\n \"quarantine_notification\":\"never\"\n },\n \"quota_used\":0,\n \"percent_in_use\":0,\n \"messages\":0,\n \"spam_aliases\":0,\n \"percent_class\":\"success\"\n }\n]\n","schema":""}}],"tags":["Mailboxes","Get mailboxes"]},{"title":"Create mailbox","path":"/api/v1/add/mailbox","pathTemplate":"/api/v1/add/mailbox","slug":"post~api~v1~add~mailbox","method":"post","description":"\nYou may create your own mailbox using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"local_part","description":"left part of email address","required":false,"members":[],"schema":{"type":"string"}},{"key":"domain","description":"domain name","required":false,"members":[],"schema":{"type":"string"}},{"key":"name","description":"Full name of the mailbox user","required":false,"members":[],"schema":{"type":"string"}},{"key":"quota","description":"mailbox quota","required":false,"members":[],"schema":{"type":"number"}},{"key":"pasword","description":"mailbox password","required":false,"members":[],"schema":{"type":"string"}},{"key":"password2","description":"mailbox password for confirmation","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"is mailbox active or not","required":false,"members":[],"schema":{"type":"boolean"}}]},"example":"{\n \"local_part\":\"info\",\n \"domain\":\"domain.tld\",\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"atedismonsin\",\n \"password2\":\"atedismonsin\",\n \"active\":\"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"local_part\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"pasword\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"mailbox\",\n {\n \"local_part\":\"info\",\n \"domain\":\"domain.tld\",\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"*\",\n \"password2\":\"*\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_added\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Create mailbox"]},{"title":"Update mailbox","path":"/api/v1/edit/mailbox","pathTemplate":"/api/v1/edit/mailbox","slug":"post~api~v1~edit~mailbox","method":"post","description":"\nYou can update one or more mailboxes per request. You can also send just attributes you want to change","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["mailbox_name"],"description":"contains list of mailboxes you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{"sender_acl":["default","info@domain2.tld","domain3.tld","asterix"]},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"info@domain.tld\"\n ],\n \"attr\":{\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"\",\n \"password2\":\"\",\n \"active\":\"1\",\n \"sender_acl\":[\n \"default\",\n \"info@domain2.tld\",\n \"domain3.tld\",\n \"*\"\n ],\n \"force_pw_update\":\"0\",\n \"sogo_access\":\"1\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"quota\": {\n \"type\": \"number\"\n },\n \"pasword\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"sender_acl\": {\n \"type\": \"array\"\n },\n \"force_pw_update\": {\n \"type\": \"boolean\"\n },\n \"sogo_access\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\"\n ],\n \"name\":\"Full name\",\n \"quota\":\"3072\",\n \"password\":\"*\",\n \"password2\":\"*\",\n \"active\":\"1\",\n \"sender_acl\":[\n \"default\",\n \"info@domain2.tld\",\n \"domain3.tld\",\n \"*\"\n ],\n \"force_pw_update\":\"0\",\n \"sogo_access\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_modified\",\n \"info@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Update mailbox"]},{"title":"Delete mailbox","path":"/api/v1/delete/mailbox","pathTemplate":"/api/v1/delete/mailbox","slug":"post~api~v1~delete~mailbox","method":"post","description":"\nYou can delete one or more mailboxes.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["local_part@domain"],"description":"contains list of mailboxes you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"mailbox_removed\",\n \"info@domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"mailbox\",\n {\n \"username\":[\n \"info@domain.tld\",\n \"sales@domain.tld\"\n ]\n },\n null\n ],\n \"msg\":[\n \"mailbox_removed\",\n \"sales@domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Mailboxes","Delete mailbox"]},{"title":"Quarantine Notifications","path":"/api/v1/edit/quarantine_notification","pathTemplate":"/api/v1/edit/quarantine_notification","slug":"post~api~v1~edit~quarantine~notification","method":"post","description":"\nYou can update one or more mailboxes per request.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["mailbox_name"],"description":"contains list of mailboxes you want set qurantine notifications","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"mailbox1@domain.tld\",\n \"mailbox2@domain.tld\"\n ],\n \"attr\":{\n \"quarantine_notification\":\"hourly\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"quarantine_notification\": {\n \"enum\": [\n \"hourly\",\n \"daily\",\n \"weekly\",\n \"never\"\n ]\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"","schema":""}}],"tags":["Mailboxes","Quarantine Notifications"]},{"title":"GET aliases","path":"/api/v1/get/alias/{id}","pathTemplate":"/api/v1/get/alias/{id}","slug":"get~api~v1~get~alias~id","method":"get","description":"\nYou can list mailbox aliases existing in system.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"in_primary_domain\": \"\",\n \"id\": 6,\n \"domain\": \"domain.tld\",\n \"public_comment\": null,\n \"private_comment\": null,\n \"goto\": \"destination@domain.tld\",\n \"address\": \"alias@domain.tld\",\n \"is_catch_all\": 0,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"created\": \"2019-04-04 19:29:49\",\n \"modified\": null\n },\n {\n \"in_primary_domain\": \"\",\n \"id\": 10,\n \"domain\": \"domain.tld\",\n \"public_comment\": null,\n \"private_comment\": null,\n \"goto\": \"destination@domain.tld\",\n \"address\": \"@domain.tld\",\n \"is_catch_all\": 1,\n \"active\": \"✔\",\n \"active_int\": 1,\n \"created\": \"2019-04-27 13:42:39\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Aliases","GET aliases"]},{"title":"Create alias","path":"/api/v1/add/alias","pathTemplate":"/api/v1/add/alias","slug":"post~api~v1~add~alias","method":"post","description":"\nYou may create your own mailbox alias using this action. It takes a JSON object containing a domain informations. \nOnly one `goto*` option can be used, for ex. if you want learn as spam, then send just `goto_spam = 1` in request body.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"address","description":"alias address, for catchall use \"@domain.tld\"","required":false,"members":[],"schema":{"type":"string"}},{"key":"goto","description":"destination address, comma separated","required":false,"members":[],"schema":{"type":"string"}},{"key":"goto_null","description":"silently ignore","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"goto_spam","description":"learn as spam","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"goto_ham","description":"learn as ham","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"active","description":"is alias active or not","required":false,"members":[],"schema":{"type":"boolean"}}]},"example":"{\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"active\":\"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": \"string\"\n },\n \"goto\": {\n \"type\": \"string\"\n },\n \"goto_null\": {\n \"type\": \"boolean\"\n },\n \"goto_spam\": {\n \"type\": \"boolean\"\n },\n \"goto_ham\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"alias\",\n {\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"alias_added\",\n \"alias@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Create alias"]},{"title":"Update alias","path":"/api/v1/edit/alias","pathTemplate":"/api/v1/edit/alias","slug":"post~api~v1~edit~alias","method":"post","description":"\nYou can update one or more aliases per request. You can also send just attributes you want to change","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"6\"\n ],\n \"attr\":{\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"private_comment\":\"private comment\",\n \"public_comment\":\"public comment\",\n \"active\":\"1\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"address\": {\n \"type\": \"string\"\n },\n \"goto\": {\n \"type\": \"string\"\n },\n \"goto_null\": {\n \"type\": \"boolean\"\n },\n \"goto_spam\": {\n \"type\": \"boolean\"\n },\n \"goto_ham\": {\n \"type\": \"boolean\"\n },\n \"private_comment\": {\n \"type\": \"string\"\n },\n \"public_comment\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"edit\",\n \"alias\",\n {\n \"id\":[\n \"6\"\n ],\n \"address\":\"alias@domain.tld\",\n \"goto\":\"destination@domain.tld\",\n \"private_comment\":\"private comment\",\n \"public_comment\":\"public comment\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"alias_modified\",\n \"alias@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Update alias"]},{"title":"Delete alias","path":"/api/v1/delete/alias","pathTemplate":"/api/v1/delete/alias","slug":"post~api~v1~delete~alias","method":"post","description":"\nYou can delete one or more aliases.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"[\n \"6\",\n \"9\"\n]\n","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"alias\",\n {\n \"id\":[\n \"6\",\n \"9\"\n ]\n },\n null\n ],\n \"msg\":[\n \"alias_removed\",\n \"alias@domain.tld\"\n ]\n },\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"delete\",\n \"alias\",\n {\n \"id\":[\n \"6\",\n \"9\"\n ]\n },\n null\n ],\n \"msg\":[\n \"alias_removed\",\n \"alias2@domain.tld\"\n ]\n }\n] \n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Aliases","Delete alias"]},{"title":"Get sync jobs","path":"/api/v1/get/syncjobs/all/no_log","pathTemplate":"/api/v1/get/syncjobs/all/no_log","slug":"get~api~v1~get~syncjobs~all~no~log","method":"get","description":"\nYou can list all syn jobs existing in system.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"user2\": \"mailbox@domain.tld\",\n \"host1\": \"imap.server.tld\",\n \"authmech1\": \"PLAIN\",\n \"regextrans2\": \"\",\n \"authmd51\": 0,\n \"domain2\": \"\",\n \"subfolder2\": \"External\",\n \"user1\": \"username\",\n \"exclude\": \"(?i)spam|(?i)junk\",\n \"maxage\": 0,\n \"mins_interval\": \"20\",\n \"maxbytespersecond\": \"0\",\n \"port1\": 993,\n \"enc1\": \"TLS\",\n \"delete2duplicates\": 1,\n \"delete1\": 0,\n \"delete2\": 0,\n \"automap\": 1,\n \"skipcrossduplicates\": 0,\n \"custom_params\": \"\",\n \"timeout1\": 600,\n \"timeout2\": 600,\n \"subscribeall\": 1,\n \"is_running\": 0,\n \"last_run\": \"2019-05-22 11:40:02\",\n \"created\": \"2019-05-22 11:37:25\",\n \"modified\": \"2019-05-22 11:40:02\",\n \"active\": \"✓\",\n \"active_int\": 1,\n \"log\": \"\"\n }\n]\n","schema":""}}],"tags":["Sync jobs","Get sync jobs"]},{"title":"Create sync job","path":"/api/v1/add/syncjob","pathTemplate":"/api/v1/add/syncjob","slug":"post~api~v1~add~syncjob","method":"post","description":"\nYou can create new sync job using this action. It takes a JSON object containing a domain informations.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"The target mailbox","required":false,"members":[],"schema":{"type":"string"}},{"key":"delete2duplicates","description":"Delete duplicates on destination","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"delete1","description":"Delete from source when completed","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"delete2","description":"Delete messages on destination that are not on source","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"automap","description":"Try to automap folders (\"Sent items\", \"Sent\" => \"Sent\" etc.)","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"skipcrossduplicates","description":"Skip duplicate messages across folders (first come, first serve)","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"active","description":"Is sync job active","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"subscribeall","description":"Subscribe all folders","required":false,"members":[],"schema":{"type":"boolean"}},{"key":"host1","description":"Hostname","required":false,"members":[],"schema":{"type":"string"}},{"key":"port1","description":"Port","required":false,"members":[],"schema":{"type":"string"}},{"key":"user1","description":"Username","required":false,"members":[],"schema":{"type":"string"}},{"key":"password1","description":"Password","required":false,"members":[],"schema":{"type":"string"}},{"key":"enc1","description":"Encryption","required":false,"members":[],"schema":{"type":"enum"}},{"key":"mins_interval","description":"Interval (min)","required":false,"members":[],"schema":{"type":"number"}},{"key":"subfolder2","description":"Sync into subfolder on destination (empty = do not use subfolder)","required":false,"members":[],"schema":{"type":"string"}},{"key":"maxage","description":"Maximum age of messages in days that will be polled from remote (0 = ignore age)","required":false,"members":[],"schema":{"type":"number"}},{"key":"maxbytespersecond","description":"Max. bytes per second (0 = unlimited)","required":false,"members":[],"schema":{"type":"number"}},{"key":"timeout1","description":"Timeout for connection to remote host","required":false,"members":[],"schema":{"type":"number"}},{"key":"timeout2","description":"Timeout for connection to local host","required":false,"members":[],"schema":{"type":"number"}},{"key":"exclude","description":"Exclude objects (regex)","required":false,"members":[],"schema":{"type":"string"}},{"key":"custom_params","description":"Custom parameters passed to imapsync command","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"username\":\"mailbox@domain.tld\",\n \"host1\":\"imap.server.tld\",\n \"port1\":\"993\",\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\",\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"subscribeall\":\"1\",\n \"active\":\"1\",\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"delete2duplicates\": {\n \"type\": \"boolean\"\n },\n \"delete1\": {\n \"type\": \"boolean\"\n },\n \"delete2\": {\n \"type\": \"boolean\"\n },\n \"automap\": {\n \"type\": \"boolean\"\n },\n \"skipcrossduplicates\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"subscribeall\": {\n \"type\": \"boolean\"\n },\n \"host1\": {\n \"type\": \"string\"\n },\n \"port1\": {\n \"type\": \"string\"\n },\n \"user1\": {\n \"type\": \"string\"\n },\n \"password1\": {\n \"type\": \"string\"\n },\n \"enc1\": {\n \"enum\": [\n \"TLS\",\n \"SSL\",\n \"PLAIN\"\n ]\n },\n \"mins_interval\": {\n \"type\": \"number\"\n },\n \"subfolder2\": {\n \"type\": \"string\"\n },\n \"maxage\": {\n \"type\": \"number\"\n },\n \"maxbytespersecond\": {\n \"type\": \"number\"\n },\n \"timeout1\": {\n \"type\": \"number\"\n },\n \"timeout2\": {\n \"type\": \"number\"\n },\n \"exclude\": {\n \"type\": \"string\"\n },\n \"custom_params\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\":\"success\",\n \"log\":[\n \"mailbox\",\n \"add\",\n \"syncjob\",\n {\n \"username\":\"mailbox@domain.tld\",\n \"host1\":\"imap.server.tld\",\n \"port1\":993,\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\",\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"subscribeall\":\"1\",\n \"active\":\"1\"\n },\n null\n ],\n \"msg\":[\n \"mailbox_modified\",\n \"mailbox@domain.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Create sync job"]},{"title":"Update sync job","path":"/api/v1/edit/syncjob","pathTemplate":"/api/v1/edit/syncjob","slug":"post~api~v1~edit~syncjob","method":"post","description":"\nYou can update one or more sync jobs per request. You can also send just attributes you want to change.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want update","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"required":false,"members":[],"schema":{"type":"object"}}]},"example":"{\n \"items\":[\n \"1\"\n ],\n \"attr\":{\n \"delete2duplicates\":\"1\",\n \"delete1\":\"0\",\n \"delete2\":\"0\",\n \"automap\":\"1\",\n \"skipcrossduplicates\":\"0\",\n \"active\":\"1\",\n \"subscribeall\":\"1\",\n \"host1\":\"imap.server.tld\",\n \"port1\":\"993\",\n \"user1\":\"username\",\n \"password1\":\"supersecret\",\n \"enc1\":\"SSL\",\n \"mins_interval\":\"20\",\n \"subfolder2\":\"External\",\n \"maxage\":\"0\",\n \"maxbytespersecond\":\"0\",\n \"timeout1\":\"600\",\n \"timeout2\":\"600\",\n \"exclude\":\"(?i)spam|(?i)junk\",\n \"custom_params\":\"\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"delete2duplicates\": {\n \"type\": \"boolean\"\n },\n \"delete1\": {\n \"type\": \"boolean\"\n },\n \"delete2\": {\n \"type\": \"boolean\"\n },\n \"automap\": {\n \"type\": \"boolean\"\n },\n \"skipcrossduplicates\": {\n \"type\": \"boolean\"\n },\n \"active\": {\n \"type\": \"boolean\"\n },\n \"subscribeall\": {\n \"type\": \"boolean\"\n },\n \"host1\": {\n \"type\": \"string\"\n },\n \"port1\": {\n \"type\": \"string\"\n },\n \"user1\": {\n \"type\": \"string\"\n },\n \"password1\": {\n \"type\": \"string\"\n },\n \"enc1\": {\n \"enum\": [\n \"TLS\",\n \"SSL\",\n \"PLAIN\"\n ]\n },\n \"mins_interval\": {\n \"type\": \"number\"\n },\n \"subfolder2\": {\n \"type\": \"string\"\n },\n \"maxage\": {\n \"type\": \"number\"\n },\n \"maxbytespersecond\": {\n \"type\": \"number\"\n },\n \"timeout1\": {\n \"type\": \"number\"\n },\n \"timeout2\": {\n \"type\": \"number\"\n },\n \"exclude\": {\n \"type\": \"string\"\n },\n \"custom_params\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"{\n \"type\": \"success\",\n \"log\": [\n \"entity\",\n \"action\",\n \"object\",\n {}\n ],\n \"msg\": [\n \"message\",\n \"entity name\"\n ]\n}","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Update sync job"]},{"title":"Delete sync job","path":"/api/v1/delete/syncjob","pathTemplate":"/api/v1/delete/syncjob","slug":"post~api~v1~delete~syncjob","method":"post","description":"\nYou can delete one or more sync jobs.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of aliases you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"6\",\n \"9\"\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"{\n \"type\": \"success\",\n \"log\": [\n \"entity\",\n \"action\",\n \"object\",\n {}\n ],\n \"msg\": [\n \"message\",\n \"entity name\"\n ]\n}","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Sync jobs","Delete sync job"]},{"title":"Get Forwarding Hosts","path":"/api/v1/get/fwdhost/all","pathTemplate":"/api/v1/get/fwdhost/all","slug":"get~api~v1~get~fwdhost~all","method":"get","description":"\nYou can list all Forwarding Hosts in your system.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"host\": \"5.1.76.202\",\n \"source\": \"hosted.mailcow.de\",\n \"keep_spam\": \"yes\"\n },\n {\n \"host\": \"2a00:f820:417::202\",\n \"source\": \"hosted.mailcow.de\",\n \"keep_spam\": \"yes\"\n }\n]\n","schema":""}}],"tags":["Fordwarding Hosts","Get Forwarding Hosts"]},{"title":"Add Forward Host","path":"/api/v1/add/fwdhost","pathTemplate":"/api/v1/add/fwdhost","slug":"post~api~v1~add~fwdhost","method":"post","description":"\nAdd a new Forwarding host to mailcow. You can chose to enable or disable spam filtering of incoming emails by specifing `filter_spam` 0 = inactive, 1 = active.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"hostname","description":"contains the hostname you want to add","required":false,"members":[],"schema":{"type":"string"}},{"key":"filter_spam","description":"1 to enable spam filter, 0 to disable spam filter","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"hostname\": \"hosted.mailcow.de\",\n \"filter_spam\": \"0\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"filter_spam\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"fwdhost\",\n \"add\",\n {\n \"hostname\": \"hosted.mailcow.de\",\n \"filter_spam\": \"0\"\n }\n ],\n \"msg\": [\n \"forwarding_host_added\",\n \"5.1.76.202, 2a00:f820:417::202\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fordwarding Hosts","Add Forward Host"]},{"title":"Get Postfix logs","path":"/api/v1/get/logs/postfix/{count}","pathTemplate":"/api/v1/get/logs/postfix/{count}","slug":"get~api~v1~get~logs~postfix~count","method":"get","description":"\nThis Api endpoint lists all Postfix logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569937433\",\n \"program\": \"postfix/qmgr\",\n \"priority\": \"info\",\n \"message\": \"EF1711500458: removed\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Postfix logs"]},{"title":"Get Rspamd logs","path":"/api/v1/get/logs/rspamd-history/{count}","pathTemplate":"/api/v1/get/logs/rspamd-history/{count}","slug":"get~api~v1~get~logs~rspamd-history~count","method":"get","description":"\nThis Api endpoint lists all Rspamd logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n {\n \"time_virtual\": 0.235653,\n \"rcpt_mime\": [\n \"github@mailcow.tld\"\n ],\n \"message-id\": \"cm.0521259281087.phrkjuk.wdljulyl.i@cmail20.com\",\n \"ip\": \"1.1.1.1\",\n \"rcpt_smtp\": [\n \"github@mailcow.tld\"\n ],\n \"action\": \"soft reject\",\n \"time_real\": 2.856102,\n \"score\": 11.59,\n \"is_skipped\": false,\n \"size\": 35513,\n \"user\": \"unknown\",\n \"sender_mime\": \"noreply@github.com\",\n \"symbols\": {\n \"FROM_NEQ_ENVFROM\": {\n \"metric_score\": 0,\n \"options\": [\n \"noreply@github.com\",\n \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n ],\n \"score\": 0,\n \"name\": \"FROM_NEQ_ENVFROM\",\n \"description\": \"From address is different to the envelope\"\n },\n \"FORGED_SENDER\": {\n \"metric_score\": 0.3,\n \"options\": [\n \"noreply@github.com\",\n \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n ],\n \"score\": 0.3,\n \"name\": \"FORGED_SENDER\",\n \"description\": \"Sender is forged (different From: header and smtp MAIL FROM: addresses)\"\n },\n \"RWL_MAILSPIKE_NEUTRAL\": {\n \"metric_score\": 0,\n \"options\": [\n \"17.21.55.203.rep.mailspike.net : 127.0.0.13\"\n ],\n \"score\": 0,\n \"name\": \"RWL_MAILSPIKE_NEUTRAL\",\n \"description\": \"Neutral result from Mailspike\"\n },\n \"HAS_LIST_UNSUB\": {\n \"metric_score\": -0.01,\n \"score\": -0.01,\n \"name\": \"HAS_LIST_UNSUB\",\n \"description\": \"Has List-Unsubscribe header\"\n },\n \"URI_COUNT_ODD\": {\n \"metric_score\": 1,\n \"options\": [\n \"25\"\n ],\n \"score\": 1,\n \"name\": \"URI_COUNT_ODD\",\n \"description\": \"Odd number of URIs in multipart\\/alternative message\"\n },\n \"MIME_TRACE\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"MIME_TRACE\",\n \"options\": [\n \"0:+\",\n \"1:+\",\n \"2:~\"\n ]\n },\n \"R_DKIM_ALLOW\": {\n \"metric_score\": -0.2,\n \"options\": [\n \"github.com:s=cm\",\n \"cmail2.com:s=cs2013\"\n ],\n \"score\": 0,\n \"name\": \"R_DKIM_ALLOW\",\n \"description\": \"DKIM verification succeed\"\n },\n \"FROM_HAS_DN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"FROM_HAS_DN\",\n \"description\": \"From header has a display name\"\n },\n \"MIME_GOOD\": {\n \"metric_score\": -0.1,\n \"options\": [\n \"multipart\\/alternative\",\n \"text\\/plain\"\n ],\n \"score\": -0.1,\n \"name\": \"MIME_GOOD\",\n \"description\": \"Known content-type\"\n },\n \"REPLYTO_ADDR_EQ_FROM\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"REPLYTO_ADDR_EQ_FROM\",\n \"description\": \"Reply-To header is identical to SMTP From\"\n },\n \"TO_MATCH_ENVRCPT_ALL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"TO_MATCH_ENVRCPT_ALL\",\n \"description\": \"All of the recipients match the envelope\"\n },\n \"ASN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"ASN\",\n \"options\": [\n \"asn:55819, ipnet:203.55.21.0\\/24, country:AU\"\n ]\n },\n \"HTML_SHORT_LINK_IMG_1\": {\n \"metric_score\": 2,\n \"score\": 2,\n \"name\": \"HTML_SHORT_LINK_IMG_1\",\n \"description\": \"Short html part (0..1K) with a link to an image\"\n },\n \"SCHAALIT_URI_823\": {\n \"metric_score\": 5,\n \"score\": 5,\n \"name\": \"SCHAALIT_URI_823\",\n \"options\": [\n \"SCHAALIT_URI_823\"\n ]\n },\n \"DMARC_POLICY_ALLOW\": {\n \"metric_score\": -0.5,\n \"options\": [\n \"github.com\",\n \"none\"\n ],\n \"score\": 0,\n \"name\": \"DMARC_POLICY_ALLOW\",\n \"description\": \"DMARC permit policy\"\n },\n \"MANY_INVISIBLE_PARTS\": {\n \"metric_score\": 1,\n \"options\": [\n \"4\"\n ],\n \"score\": 0.3,\n \"name\": \"MANY_INVISIBLE_PARTS\",\n \"description\": \"Many parts are visually hidden\"\n },\n \"DKIM_TRACE\": {\n \"metric_score\": 0,\n \"options\": [\n \"github.com:+\",\n \"cmail2.com:+\"\n ],\n \"score\": 0,\n \"name\": \"DKIM_TRACE\",\n \"description\": \"DKIM trace symbol\"\n },\n \"MX_GOOD\": {\n \"metric_score\": -0.01,\n \"options\": [\n \"mx20.inbound.createsend.com\",\n \"mx21.inbound.createsend.com\"\n ],\n \"score\": -0.01,\n \"name\": \"MX_GOOD\",\n \"description\": \"MX was ok\"\n },\n \"TO_DN_ALL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"TO_DN_ALL\",\n \"description\": \"All the recipients have display names\"\n },\n \"RCPT_MAILCOW_DOMAIN\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"RCPT_MAILCOW_DOMAIN\",\n \"options\": [\n \"gc-mc.de\"\n ]\n },\n \"XM_UA_NO_VERSION\": {\n \"metric_score\": 0.01,\n \"score\": 0.01,\n \"name\": \"XM_UA_NO_VERSION\",\n \"description\": \"X-Mailer\\/User-Agent has no version\"\n },\n \"HAS_REPLYTO\": {\n \"metric_score\": 0,\n \"options\": [\n \"noreply@github.com\"\n ],\n \"score\": 0,\n \"name\": \"HAS_REPLYTO\",\n \"description\": \"Has Reply-To header\"\n },\n \"R_SPF_ALLOW\": {\n \"metric_score\": -0.2,\n \"options\": [\n \"+ip4:203.55.21.0\\/24\"\n ],\n \"score\": 0,\n \"name\": \"R_SPF_ALLOW\",\n \"description\": \"SPF verification allows sending\"\n },\n \"URIBL_GREY\": {\n \"metric_score\": 1.5,\n \"options\": [\n \"cmail2.com.multi.uribl.com\",\n \"cmail20.com.multi.uribl.com\",\n \"updatemyprofile.com.multi.uribl.com\"\n ],\n \"score\": 1.5,\n \"name\": \"URIBL_GREY\",\n \"description\": \"uribl.com grey url\"\n },\n \"CLAM_VIRUS_FAIL\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"CLAM_VIRUS_FAIL\",\n \"options\": [\n \"failed to scan and retransmits exceed\"\n ]\n },\n \"GREYLIST\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"GREYLIST\",\n \"options\": [\n \"greylisted\",\n \"Wed, 25 Sep 2019 19:27:10 GMT\",\n \"new record\"\n ]\n },\n \"ARC_NA\": {\n \"metric_score\": 0,\n \"score\": 0,\n \"name\": \"ARC_NA\",\n \"description\": \"ARC signature absent\"\n },\n \"RCVD_COUNT_ZERO\": {\n \"metric_score\": 0,\n \"options\": [\n \"0\"\n ],\n \"score\": 0,\n \"name\": \"RCVD_COUNT_ZERO\",\n \"description\": \"Message has no Received headers\"\n },\n \"BAD_REP_POLICIES\": {\n \"metric_score\": 0.1,\n \"score\": 0.1,\n \"name\": \"BAD_REP_POLICIES\",\n \"description\": \"Contains valid policies but are also marked by fuzzy\\/bayes\\/surbl\\/rbl\"\n },\n \"RCPT_COUNT_ONE\": {\n \"metric_score\": 0,\n \"options\": [\n \"1\"\n ],\n \"score\": 0,\n \"name\": \"RCPT_COUNT_ONE\",\n \"description\": \"One recipient\"\n },\n \"RBL_UCEPROTECT_LEVEL1\": {\n \"metric_score\": 3.5,\n \"score\": 3.5,\n \"name\": \"RBL_UCEPROTECT_LEVEL1\",\n \"options\": [\n \"17.21.55.203.dnsbl-1.uceprotect.net\"\n ]\n },\n \"DWL_DNSWL_HI\": {\n \"metric_score\": -3.5,\n \"options\": [\n \"github.com.dwl.dnswl.org : 127.0.9.3\"\n ],\n \"score\": -3.5,\n \"name\": \"DWL_DNSWL_HI\",\n \"description\": \"Message has a valid dkim signature originated from domain listed at https:\\/\\/www.dnswl.org, high trust\"\n },\n \"RCVD_IN_DNSWL_NONE\": {\n \"metric_score\": 0,\n \"options\": [\n \"17.21.55.203.list.dnswl.org : 127.0.15.0\"\n ],\n \"score\": 0,\n \"name\": \"RCVD_IN_DNSWL_NONE\",\n \"description\": \"Sender listed at https:\\/\\/www.dnswl.org, no trust\"\n },\n \"RBL_UCEPROTECT_LEVEL2\": {\n \"metric_score\": 1.5,\n \"score\": 1.5,\n \"name\": \"RBL_UCEPROTECT_LEVEL2\",\n \"options\": [\n \"17.21.55.203.dnsbl-2.uceprotect.net\"\n ]\n }\n },\n \"subject\": \"[mailcow/mailcow-dockerized] Unable to change name of alias email address (#2997)\",\n \"required_score\": 15,\n \"unix_time\": 1569439327,\n \"sender_smtp\": \"GitHub-phrkjuk1wdljulyl1i@cmail20.com\"\n }\n}\n","schema":""}}],"tags":["Logs","Get Rspamd logs"]},{"title":"Get Dovecot logs","path":"/api/v1/get/logs/dovecot/{count}","pathTemplate":"/api/v1/get/logs/dovecot/{count}","slug":"get~api~v1~get~logs~dovecot~count","method":"get","description":"\nThis Api endpoint lists all Dovecot logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938740\",\n \"program\": \"dovecot\",\n \"priority\": \"info\",\n \"message\": \"managesieve-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=172.22.1.3, lip=172.22.1.250\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Dovecot logs"]},{"title":"Get ACME logs","path":"/api/v1/get/logs/acme/{count}","pathTemplate":"/api/v1/get/logs/acme/{count}","slug":"get~api~v1~get~logs~acme~count","method":"get","description":"\nThis Api endpoint lists all ACME logs from issued Lets Enctypts certificates. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569927728\",\n \"message\": \"Certificate validation done, neither changed nor due for renewal, sleeping for another day.\"\n }\n]\n","schema":""}}],"tags":["Logs","Get ACME logs"]},{"title":"Get SOGo logs","path":"/api/v1/get/logs/sogo/{count}","pathTemplate":"/api/v1/get/logs/sogo/{count}","slug":"get~api~v1~get~logs~sogo~count","method":"get","description":"\nThis Api endpoint lists all SOGo logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938874\",\n \"program\": \"sogod\",\n \"priority\": \"notice\",\n \"message\": \"[109]: mailcowdockerized_watchdog-mailcow_1.mailcowdockerized_mailcow-network \\\"GET \\/SOGo.index\\/ HTTP\\/1.1\\\" 200 2531\\/0 0.005 - - 0\"\n }\n]\n","schema":""}}],"tags":["Logs","Get SOGo logs"]},{"title":"Get Watchdog logs","path":"/api/v1/get/logs/watchdog/{count}","pathTemplate":"/api/v1/get/logs/watchdog/{count}","slug":"get~api~v1~get~logs~watchdog~count","method":"get","description":"\nThis Api endpoint lists all Watchdog logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": \"1569938958\",\n \"service\": \"Fail2ban\",\n \"lvl\": \"100\",\n \"hpnow\": \"1\",\n \"hptotal\": \"1\",\n \"hpdiff\": \"0\"\n },\n {\n \"time\": \"1569938956\",\n \"service\": \"Rspamd\",\n \"lvl\": \"100\",\n \"hpnow\": \"5\",\n \"hptotal\": \"5\",\n \"hpdiff\": \"0\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Watchdog logs"]},{"title":"Get Api logs","path":"/api/v1/get/logs/api/{count}","pathTemplate":"/api/v1/get/logs/api/{count}","slug":"get~api~v1~get~logs~api~count","method":"get","description":"\nThis Api endpoint lists all Api logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569939001,\n \"uri\": \"\\/api\\/v1\\/get\\/logs\\/api\\/2\",\n \"method\": \"GET\",\n \"remote\": \"1.1.1.1\",\n \"data\": \"\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Api logs"]},{"title":"Get Ratelimit logs","path":"/api/v1/get/logs/ratelimited/{count}","pathTemplate":"/api/v1/get/logs/ratelimited/{count}","slug":"get~api~v1~get~logs~ratelimited~count","method":"get","description":"\nThis Api endpoint lists all Ratelimit logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569269003,\n \"rcpt\": \"hello@mailcow.email\",\n \"from\": \"awesome@mailcow.email\",\n \"user\": \"awesome@mailcow.email\",\n \"rl_info\": \"mailcow(RLsdz3tuabozgd4oacbdh8kc78)\",\n \"rl_name\": \"mailcow\",\n \"rl_hash\": \"RLsdz3tuabozgd4oacbdh8kc78\",\n \"qid\": \"E3CF91500458\",\n \"ip\": \"172.22.1.248\",\n \"message_id\": \"6a-5d892500-7-240abd80@90879116\",\n \"header_subject\": \"Mailcow is amazing\",\n \"header_from\": \"\\\"Awesome\\\" \"\n }\n]\n","schema":""}}],"tags":["Logs","Get Ratelimit logs"]},{"title":"Get Netfilter logs","path":"/api/v1/get/logs/netfilter/{count}","pathTemplate":"/api/v1/get/logs/netfilter/{count}","slug":"get~api~v1~get~logs~netfilter~count","method":"get","description":"\nThis Api endpoint lists all Netfilter logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569754911,\n \"priority\": \"info\",\n \"message\": \"Whitelist was changed, it has 1 entries\"\n },\n {\n \"time\": 1569754911,\n \"priority\": \"crit\",\n \"message\": \"Add host\\/network 1.1.1.1\\/32 to blacklist\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Netfilter logs"]},{"title":"Get Autodiscover logs","path":"/api/v1/get/logs/autodiscover/{count}","pathTemplate":"/api/v1/get/logs/autodiscover/{count}","slug":"get~api~v1~get~logs~autodiscover~count","method":"get","description":"\nThis Api endpoint lists all Autodiscover logs. \nTip: You can limit how many logs you want to get by using `/` at the end of the api url.","parameters":[{"location":"path","name":"count","description":"Number of logs to return","required":false,"schema":{"type":"number"}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"time\": 1569684212,\n \"ua\": \"Microsoft Office\\/16.0 (Windows NT 6.2; MAPICPL 16.0.11328; Pro)\",\n \"user\": \"awesome@mailcow.de\",\n \"service\": \"activesync\"\n }\n]\n","schema":""}}],"tags":["Logs","Get Autodiscover logs"]},{"title":"Get Queue","path":"/api/v1/get/mailq/all","pathTemplate":"/api/v1/get/mailq/all","slug":"get~api~v1~get~mailq~all","method":"get","description":"\nGet the current mail queue and everything it contains.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"queue_name\": \"incoming\",\n \"queue_id\": \"B98C6260CA1\",\n \"arrival_time\": 1570091234,\n \"message_size\": 1848,\n \"sender\": \"sender@mailcow.tld\",\n \"recipients\": [\n \"recipient@awesomecow.tld\"\n ]\n }\n]\n","schema":""}}],"tags":["Queue Manager","Get Queue"]},{"title":"Flush Queue","path":"/api/v1/edit/mailq","pathTemplate":"/api/v1/edit/mailq","slug":"post~api~v1~edit~mailq","method":"post","description":"\nUsing this API you can flush the current mail queue. This will try to deliver all mails currently in it.\nThis API uses the command: `postqueue -f`","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"action","description":"use flush to flush the mail queue","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{ \n \"action\":\"flush\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"success\",\n \"msg\": \"Task completed\"\n}\n","schema":""}}],"tags":["Queue Manager","Flush Queue"]},{"title":"Delete Queue","path":"/api/v1/delete/mailq","pathTemplate":"/api/v1/delete/mailq","slug":"post~api~v1~delete~mailq","method":"post","description":"\nUsing this API you can delete the current mail queue. This will delete all mails in it.\nThis API uses the command: `postsuper -d`","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"action","description":"use super_delete to delete the mail queue","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"action\":\"super_delete\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"action\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"type\": \"success\",\n \"msg\": \"Task completed\"\n}\n","schema":""}}],"tags":["Queue Manager","Delete Queue"]},{"title":"Get mails in Quarantine","path":"/api/v1/get/quarantine/all","pathTemplate":"/api/v1/get/quarantine/all","slug":"get~api~v1~get~quarantine~all","method":"get","description":"\nGet all mails that are currently in Quarantine.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"id\": 33,\n \"qid\": \"8224615004C1\",\n \"subject\": \"mailcow is awesome\",\n \"virus_flag\": 0,\n \"score\": 15.48,\n \"rcpt\": \"admin@domain.tld\",\n \"sender\": \"bounces@send.domain.tld\",\n \"created\": 1572688831,\n \"notified\": 1\n}\n","schema":""}}],"tags":["Quarantine","Get mails in Quarantine"]},{"title":"Delete mails in Quarantine","path":"/api/v1/delete/qitem","pathTemplate":"/api/v1/delete/qitem","slug":"post~api~v1~delete~qitem","method":"post","description":"\nUsing this endpoint you can delete a email from quarantine, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of emails you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"33\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"quarantine\",\n \"delete\",\n {\n \"id\": [\n \"33\"\n ]\n }\n ],\n \"msg\": [\n \"item_deleted\",\n \"33\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Quarantine","Delete mails in Quarantine"]},{"title":"Get Fail2Ban Config","path":"/api/v1/get/fail2ban","pathTemplate":"/api/v1/get/fail2ban","slug":"get~api~v1~get~fail2ban","method":"get","description":"\nGets the current Fail2Ban configuration.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"{\n \"ban_time\": 604800,\n \"netban_ipv4\": 32,\n \"netban_ipv6\": 128,\n \"max_attempts\": 1,\n \"retry_window\": 7200,\n \"whitelist\": \"1.1.1.1\",\n \"blacklist\": \"45.82.153.37\\/32\\n92.118.38.52\\/32\",\n \"perm_bans\": [\n \"45.82.153.37\\/32\",\n \"92.118.38.52\\/32\"\n ]\n}\n","schema":""}}],"tags":["Fail2Ban","Get Fail2Ban Config"]},{"title":"Edit Fail2Ban","path":"/api/v1/edit/fail2ban","pathTemplate":"/api/v1/edit/fail2ban","slug":"post~api~v1~edit~fail2ban","method":"post","description":"\nUsing this endpoint you can edit the Fail2Ban config and black or whitelist new ips.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":[],"description":"has to be none","required":false,"members":[],"schema":{"type":"array"}},{"key":"attr","value":{},"description":"array containing the fail2ban settings","required":false,"members":[],"schema":{"type":"object"}}]},"example":"{ \n \"items\":[\n \"none\"\n ],\n \"attr\": {\n \"ban_time\": \"86400\",\n \"max_attempts\": \"5\",\n \"retry_window\": \"600\",\n \"netban_ipv4\": \"24\",\n \"netban_ipv6\": \"64\",\n \"whitelist\": \"mailcow.tld\",\n \"blacklist\": \"10.100.6.5/32,10.100.8.4/32\"\n }\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n },\n \"attr\": {\n \"type\": \"object\",\n \"properties\": {\n \"ban_time\": {\n \"type\": \"number\"\n },\n \"max_attempts\": {\n \"type\": \"number\"\n },\n \"retry_window\": {\n \"type\": \"number\"\n },\n \"netban_ipv4\": {\n \"type\": \"number\"\n },\n \"netban_ipv6\": {\n \"type\": \"number\"\n },\n \"whitelist\": {\n \"type\": \"string\"\n },\n \"backlist\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n \"type\": \"success\",\n \"log\": [\n \"fail2ban\",\n \"edit\",\n {\n \"network\": [\n \"none\"\n ],\n \"ban_time\": \"86400\",\n \"max_attempts\": \"5\",\n \"retry_window\": \"600\",\n \"netban_ipv4\": \"24\",\n \"netban_ipv6\": \"64\",\n \"whitelist\": \"mailcow.tld\",\n \"blacklist\": \"10.100.6.5/32,10.100.8.4/32\"\n }\n ],\n \"msg\": \"f2b_modified\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Fail2Ban","Edit Fail2Ban"]},{"title":"Generate DKIM Key","path":"/api/v1/add/dkim","pathTemplate":"/api/v1/add/dkim","slug":"post~api~v1~add~dkim","method":"post","description":"\nUsing this endpoint you can generate new DKIM keys.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"domain","description":"the domain which a key should be generated for","required":false,"members":[],"schema":{"type":"string"}},{"key":"dkim_selector","description":"the DKIM selector default dkim","required":false,"members":[],"schema":{"type":"string"}},{"key":"key_size","description":"the key size (1024 or 2048)","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"domains\":\"mailcow.tld\",\n \"dkim_selector\":\"dkim\",\n \"key_size\":\"2048\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"domain\": {\n \"type\": \"string\"\n },\n \"dkim_selector\": {\n \"type\": \"string\"\n },\n \"key_size\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"add\",\n {\n \"domains\": \"hanspeterlol.de\",\n \"dkim_selector\": \"dkim\",\n \"key_size\": \"2048\"\n }\n ],\n \"msg\": [\n \"dkim_added\",\n \"hanspeterlol.de\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Generate DKIM Key"]},{"title":"Duplicate DKIM Key","path":"/api/v1/add/dkim_duplicate","pathTemplate":"/api/v1/add/dkim_duplicate","slug":"post~api~v1~add~dkim~duplicate","method":"post","description":"\nUsing this endpoint you can duplicate the DKIM Key of one domain.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"fron_domain","description":"the domain where the dkim key should be copied from","required":false,"members":[],"schema":{"type":"string"}},{"key":"to_domain","description":"the domain where the dkim key should be copied to","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"from_domain\":\"mailcow.tld\",\n \"to_domain\":\"awesomecow.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"fron_domain\": {\n \"type\": \"string\"\n },\n \"to_domain\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"duplicate\",\n {\n \"from_domain\": \"mailcow.tld\",\n \"to_domain\": \"awesomecow.tld\"\n }\n ],\n \"msg\": [\n \"dkim_duplicated\",\n \"mailcow.tld\",\n \"awesomecow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Duplicate DKIM Key"]},{"title":"Delete DKIM Key","path":"/api/v1/delete/dkim","pathTemplate":"/api/v1/delete/dkim","slug":"post~api~v1~delete~dkim","method":"post","description":"\nUsing this endpoint a existing DKIM Key can be deleted","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"[\"mailcow.tld\"]\n","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"dkim\",\n \"delete\",\n {\n \"domains\": [\n \"mailcow.tld\"\n ]\n }\n ],\n \"msg\": [\n \"dkim_removed\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["DKIM","Delete DKIM Key"]},{"title":"Get Domain Admins","path":"/api/v1/get/domain-admin/all","pathTemplate":"/api/v1/get/domain-admin/all","slug":"get~api~v1~get~domain-admin~all","method":"get","description":"\n","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"username\": \"testadmin\",\n \"tfa_active\": \"✕\",\n \"active\": \"✓\",\n \"tfa_active_int\": null,\n \"active_int\": 1,\n \"created\": \"2019-10-02 10:29:41\",\n \"selected_domains\": [\n \"mailcow.tld\"\n ],\n \"unselected_domains\": [\n \"awesomemailcow.de\",\n \"mailcowisgreat.de\"\n ]\n }\n]\n","schema":""}}],"tags":["Domain admin","Get Domain Admins"]},{"title":"Create Domain Admin user","path":"/api/v1/add/domain-admin","pathTemplate":"/api/v1/add/domain-admin","slug":"post~api~v1~add~domain-admin","method":"post","description":"\nUsing this endpoint you can create a new Domain Admin user. This user has full control over a domain, and can create new mailboxes and aliases.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"the username for the admin user","required":false,"members":[],"schema":{"type":"string"}},{"key":"domains","description":"the domains the user should be a admin of","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"domain admin user password","required":false,"members":[],"schema":{"type":"string"}},{"key":"password2","description":"domain admin user password","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"username\": \"testadmin\",\n \"domains\": \"mailcow.tld\",\n \"password\": \"supersecurepw\",\n \"password2\": \"supersecurepw\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"domains\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"password2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"domain_admin\",\n \"add\",\n {\n \"username\": \"testadmin\",\n \"domains\": \"mailcow.tld\",\n \"password\": \"*\",\n \"password2\": \"*\",\n \"active\": \"1\"\n }\n ],\n \"msg\": [\n \"domain_admin_added\",\n \"testadmin\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain admin","Create Domain Admin user"]},{"title":"Delete Domain Admin","path":"/api/v1/delete/domain-admin","pathTemplate":"/api/v1/delete/domain-admin","slug":"post~api~v1~delete~domain-admin","method":"post","description":"\nUsing this endpoint a existing Domain Admin user can be deleted.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["username"],"description":"contains list of usernames of the users you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"testadmin\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"domain_admin\",\n \"delete\",\n {\n \"username\": [\n \"testadmin\"\n ]\n }\n ],\n \"msg\": [\n \"domain_admin_removed\",\n \"testadmin\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Domain admin","Delete Domain Admin"]},{"title":"Get BCC Map","path":"/api/v1/get/bcc/{id}","pathTemplate":"/api/v1/get/bcc/{id}","slug":"get~api~v1~get~bcc~id","method":"get","description":"\nUsing this endpoint you can get all BCC maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 3,\n \"local_dest\": \"@mailcow.tld\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"type\": \"sender\",\n \"created\": \"2019-10-02 21:44:34\",\n \"domain\": \"mailcow.tld\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Address Rewriting","Get BCC Map"]},{"title":"Create BCC Map","path":"/api/v1/add/bcc","pathTemplate":"/api/v1/add/bcc","slug":"post~api~v1~add~bcc","method":"post","description":"\nUsing this endpoint you can create a BCC map to forward all mails via a bcc for a given domain.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"local_dest","description":"the domain which emails should be forwarded","required":false,"members":[],"schema":{"type":"string"}},{"key":"type","description":"the type of bcc map can be `sender` or `recipient`","required":false,"members":[],"schema":{"type":"string"}},{"key":"bcc_dest","description":"the email address where all mails should be send to","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"local_dest\": \"mailcow.tld\",\n \"type\": \"sender\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"local_dest\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"bcc_dest\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"bcc\",\n \"add\",\n {\n \"local_dest\": \"mailcow.tld\",\n \"type\": \"sender\",\n \"bcc_dest\": \"bcc@awesomecow.tld\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": \"bcc_saved\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Create BCC Map"]},{"title":"Delete BCC Map","path":"/api/v1/delete/bcc","pathTemplate":"/api/v1/delete/bcc","slug":"post~api~v1~delete~bcc","method":"post","description":"\nUsing this endpoint you can delete a BCC map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of bcc maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"bcc\",\n \"delete\",\n {\n \"id\": [\n \"4\"\n ]\n },\n null\n ],\n \"msg\": [\n \"bcc_deleted\",\n \"4\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Delete BCC Map"]},{"title":"Get Recipient Map","path":"/api/v1/get/recipient_map/{id}","pathTemplate":"/api/v1/get/recipient_map/{id}","slug":"get~api~v1~get~recipient~map~id","method":"get","description":"\nUsing this endpoint you can get all recipient maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 3,\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"created\": \"2019-10-02 22:06:29\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Address Rewriting","Get Recipient Map"]},{"title":"Create Recipient Map","path":"/api/v1/add/recipient_map","pathTemplate":"/api/v1/add/recipient_map","slug":"post~api~v1~add~recipient~map","method":"post","description":"\nUsing this endpoint you can create a recipient map to forward all mails from one email address to another.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"recipient_map_old","description":"the email address which emails should be forwarded","required":false,"members":[],"schema":{"type":"string"}},{"key":"recipient_map_new","description":"the email address that should receive the forwarded emails","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"recipient_map_old\": {\n \"type\": \"string\"\n },\n \"recipient_map_new\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"recipient_map\",\n \"add\",\n {\n \"recipient_map_old\": \"recipient@mailcow.tld\",\n \"recipient_map_new\": \"target@mailcow.tld\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"recipient_map_entry_saved\",\n \"recipient@mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Create Recipient Map"]},{"title":"Delete Recipient Map","path":"/api/v1/delete/recipient_map","pathTemplate":"/api/v1/delete/recipient_map","slug":"post~api~v1~delete~recipient~map","method":"post","description":"\nUsing this endpoint you can delete a recipient map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of recipient maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"recipient_map\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n },\n null\n ],\n \"msg\": [\n \"recipient_map_entry_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Address Rewriting","Delete Recipient Map"]},{"title":"Get TLS Policy Map","path":"/api/v1/get/tls-policy-map/{id}","pathTemplate":"/api/v1/get/tls-policy-map/{id}","slug":"get~api~v1~get~tls-policy-map~id","method":"get","description":"\nUsing this endpoint you can get all TLS policy map override maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active_int\": 1,\n \"active\": \"✓\",\n \"created\": \"2019-10-03 08:42:12\",\n \"modified\": null\n }\n]\n","schema":""}}],"tags":["Outgoing TLS Policy Map Overrides","Get TLS Policy Map"]},{"title":"Create TLS Policy Map","path":"/api/v1/add/tls-policy-map","pathTemplate":"/api/v1/add/tls-policy-map","slug":"post~api~v1~add~tls-policy-map","method":"post","description":"\nUsing this endpoint you can create a TLS policy map override.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"dest","description":"the target domain or email address","required":false,"members":[],"schema":{"type":"string"}},{"key":"policy","description":"the policy","required":false,"members":[],"schema":{"type":"enum"}},{"key":"parameters","description":"custom parameters you find out more about them [here](http://www.postfix.org/postconf.5.html#smtp_tls_policy_maps)","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active user account 0 for a disabled user account","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"dest\": {\n \"type\": \"string\"\n },\n \"policy\": {\n \"enum\": [\n \"none\",\n \"may\",\n \"encrypt\",\n \"dane\",\n \"fingerprint\",\n \"verify\",\n \"secure\"\n ]\n },\n \"parameters\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"tls_policy_maps\",\n \"add\",\n {\n \"dest\": \"mailcow.tld\",\n \"policy\": \"encrypt\",\n \"parameters\": \"\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"tls_policy_map_entry_saved\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Outgoing TLS Policy Map Overrides","Create TLS Policy Map"]},{"title":"Delete TLS Policy Map","path":"/api/v1/delete/tls-policy-map","pathTemplate":"/api/v1/delete/tls-policy-map","slug":"post~api~v1~delete~tls-policy-map","method":"post","description":"\nUsing this endpoint you can delete a TLS Policy Map, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of tls policy maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"tls_policy_maps\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n },\n null\n ],\n \"msg\": [\n \"tls_policy_map_entry_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Outgoing TLS Policy Map Overrides","Delete TLS Policy Map"]},{"title":"Get oAuth Clients","path":"/api/v1/get/oauth2-client/{id}","pathTemplate":"/api/v1/get/oauth2-client/{id}","slug":"get~api~v1~get~oauth2-client~id","method":"get","description":"\nUsing this endpoint you can get all oAuth clients.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"client_id\": \"17c76aaa88c0\",\n \"client_secret\": \"73fc668a88147e32a31ff80c\",\n \"redirect_uri\": \"https:\\/\\/mailcow.tld\",\n \"grant_types\": null,\n \"scope\": \"profile\",\n \"user_id\": null\n }\n]\n","schema":""}}],"tags":["oAuth Clients","Get oAuth Clients"]},{"title":"Create oAuth Client","path":"/api/v1/add/oauth2-client","pathTemplate":"/api/v1/add/oauth2-client","slug":"post~api~v1~add~oauth2-client","method":"post","description":"\nUsing this endpoint you can create a oAuth clients.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"redirect_uri","description":"the uri where you should be redirected after oAuth","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"redirect_uri\":\"https://mailcow.tld\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"redirect_uri\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"oauth2\",\n \"add\",\n \"client\",\n {\n \"redirect_uri\": \"https:\\/\\/mailcow.tld\"\n }\n ],\n \"msg\": \"Added client access\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["oAuth Clients","Create oAuth Client"]},{"title":"Delete oAuth Client","path":"/api/v1/delete/oauth2-client","pathTemplate":"/api/v1/delete/oauth2-client","slug":"post~api~v1~delete~oauth2-client","method":"post","description":"\nUsing this endpoint you can delete a oAuth client, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of oAuth clients you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"3\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"oauth2\",\n \"delete\",\n \"client\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"items_deleted\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["oAuth Clients","Delete oAuth Client"]},{"title":"Get Sender-Dependent Transports","path":"/api/v1/get/relayhost/{id}","pathTemplate":"/api/v1/get/relayhost/{id}","slug":"get~api~v1~get~relayhost~id","method":"get","description":"\nUsing this endpoint you can get all Sender-Dependent Transports.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\",\n \"active_int\": 1,\n \"password_short\": \"tes...\",\n \"active\": \"✓\",\n \"used_by_domains\": \"\"\n }\n]\n","schema":""}}],"tags":["Routing","Get Sender-Dependent Transports"]},{"title":"Create Sender-Dependent Transports","path":"/api/v1/add/relayhost","pathTemplate":"/api/v1/add/relayhost","slug":"post~api~v1~add~relayhost","method":"post","description":"\nUsing this endpoint you can create Sender-Dependent Transports.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"hostname","description":"the hostname of the smtp server with port","required":false,"members":[],"schema":{"type":"string"}},{"key":"username","description":"the username used to authenticate","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"the password for the smtp user","required":false,"members":[],"schema":{"type":"string"}}]},"example":"{\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"hostname\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"relayhost\",\n \"add\",\n {\n \"hostname\": \"mailcow.tld:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepassword\"\n }\n ],\n \"msg\": [\n \"relayhost_added\",\n \"\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Create Sender-Dependent Transports"]},{"title":"Delete Sender-Dependent Transports","path":"/api/v1/delete/relayhost","pathTemplate":"/api/v1/delete/relayhost","slug":"post~api~v1~delete~relayhost","method":"post","description":"\nUsing this endpoint you can delete a Sender-Dependent Transport, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of Sender-Dependent Transport you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"relayhost\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"relayhost_removed\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Delete Sender-Dependent Transports"]},{"title":"Get Transport Maps","path":"/api/v1/get/transport/{id}","pathTemplate":"/api/v1/get/transport/{id}","slug":"get~api~v1~get~transport~id","method":"get","description":"\nUsing this endpoint you can get all Transport Maps.","parameters":[{"location":"path","name":"id","description":"id of entry you want to get","required":true,"example":"all","schema":{"type":"string","enum":["all","1","2","5","10"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 1,\n \"destination\": \"example.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active_int\": 1,\n \"lookup_mx_int\": 0,\n \"password_short\": \"sup...\",\n \"active\": \"✓\",\n \"lookup_mx\": \"✕\"\n }\n]\n","schema":""}}],"tags":["Routing","Get Transport Maps"]},{"title":"Create Transport Maps","path":"/api/v1/add/transport/all","pathTemplate":"/api/v1/add/transport/all","slug":"post~api~v1~add~transport~all","method":"post","description":"\nUsing this endpoint you can create Sender-Dependent Transports.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"destination","required":false,"members":[],"schema":{"type":"string"}},{"key":"nexthop","required":false,"members":[],"schema":{"type":"string"}},{"key":"username","description":"the username used to authenticate","required":false,"members":[],"schema":{"type":"string"}},{"key":"password","description":"the password for the smtp user","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"destination\": \"example.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"destination\": {\n \"type\": \"string\"\n },\n \"nexthop\": {\n \"type\": \"string\"\n },\n \"username\": {\n \"type\": \"string\"\n },\n \"password\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"transport\",\n \"add\",\n {\n \"destination\": \"example2.org\",\n \"nexthop\": \"host:25\",\n \"username\": \"testuser\",\n \"password\": \"supersecurepw\",\n \"active\": \"1\"\n }\n ],\n \"msg\": [\n \"relayhost_added\",\n \"\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Create Transport Maps"]},{"title":"Delete Transport Maps","path":"/api/v1/delete/transport","pathTemplate":"/api/v1/delete/transport","slug":"post~api~v1~delete~transport","method":"post","description":"\nUsing this endpoint you can delete a Transport Maps, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of transport maps you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"transport\",\n \"delete\",\n {\n \"id\": [\n \"1\"\n ]\n }\n ],\n \"msg\": [\n \"relayhost_removed\",\n \"1\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Routing","Delete Transport Maps"]},{"title":"Get Resources","path":"/api/v1/get/resource/all","pathTemplate":"/api/v1/get/resource/all","slug":"get~api~v1~get~resource~all","method":"get","description":"\nUsing this endpoint you can get all Resources.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"name\": \"test@mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings\": 0,\n \"description\": \"test\",\n \"active\": \"✓\",\n \"active_int\": 1,\n \"domain\": \"mailcow.tld\",\n \"local_part\": \"test\"\n }\n]\n","schema":""}}],"tags":["Resources","Get Resources"]},{"title":"Create Resources","path":"/api/v1/add/resource","pathTemplate":"/api/v1/add/resource","slug":"post~api~v1~add~resource","method":"post","description":"\nUsing this endpoint you can create Resources.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"description","description":"a description of the resource","required":false,"members":[],"schema":{"type":"string"}},{"key":"domain","description":"the domain for which the resource should be","required":false,"members":[],"schema":{"type":"string"}},{"key":"kind","description":"the kind of recouse","required":false,"members":[],"schema":{"type":"enum"}},{"key":"multiple_bookings_select","required":false,"members":[],"schema":{"type":"enum"}},{"key":"multiple_bookings_custom","description":"always empty","required":false,"members":[],"schema":{"type":"number"}},{"key":"multiple_bookings","required":false,"members":[],"schema":{"type":"enum"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"description\": \"test\",\n \"domain\": \"mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings_select\": \"0\",\n \"multiple_bookings_custom\": \"\",\n \"multiple_bookings\": \"0\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"description\": {\n \"type\": \"string\"\n },\n \"domain\": {\n \"type\": \"string\"\n },\n \"kind\": {\n \"enum\": [\n \"location\",\n \"group\",\n \"thing\"\n ]\n },\n \"multiple_bookings_select\": {\n \"enum\": [\n \"-1\",\n \"1\",\n \"custom\"\n ]\n },\n \"multiple_bookings_custom\": {\n \"type\": \"number\"\n },\n \"multiple_bookings\": {\n \"enum\": [\n \"-1\",\n \"1\",\n \"custom\"\n ]\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"add\",\n \"resource\",\n {\n \"description\": \"test\",\n \"domain\": \"mailcow.tld\",\n \"kind\": \"location\",\n \"multiple_bookings_select\": \"0\",\n \"multiple_bookings_custom\": \"\",\n \"multiple_bookings\": \"0\",\n \"active\": \"1\"\n },\n null\n ],\n \"msg\": [\n \"resource_added\",\n \"mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Resources","Create Resources"]},{"title":"Delete Resources","path":"/api/v1/delete/resource","pathTemplate":"/api/v1/delete/resource","slug":"post~api~v1~delete~resource","method":"post","description":"\nUsing this endpoint you can delete a Resources, for this you have to know its ID. You can get the ID using the GET method.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["description@domain"],"description":"contains list of Resources you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"test@mailcow.tld\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"mailbox\",\n \"delete\",\n \"resource\",\n {\n \"name\": [\n \"test@mailcow.tld\"\n ]\n },\n null\n ],\n \"msg\": [\n \"resource_removed\",\n \"test@mailcow.tld\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["Resources","Delete Resources"]},{"title":"Get App Password","path":"/api/v1/get/app-passwd/all/{mailbox}","pathTemplate":"/api/v1/get/app-passwd/all/{mailbox}","slug":"get~api~v1~get~app-passwd~all~mailbox","method":"get","description":"\nUsing this endpoint you can get all app passwords from a specific mailbox.","parameters":[{"location":"path","name":"mailbox","description":"mailbox of entry you want to get","required":true,"example":"hello@mailcow.email","schema":{"type":"string","enum":["hello@mailcow.email"]}}],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"example":"","schema":""},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"example":"[\n {\n \"id\": 2,\n \"name\": \"emclient\",\n \"mailbox\": \"hello@mailcow.email\",\n \"domain\": \"mailcow.email\",\n \"created\": \"2019-12-21 16:04:55\",\n \"modified\": null,\n \"active_int\": 1,\n \"active\": \"✓\"\n }\n]\n","schema":""}}],"tags":["App Passwords","Get App Password"]},{"title":"Create App Password","path":"/api/v1/add/app-passwd","pathTemplate":"/api/v1/add/app-passwd","slug":"post~api~v1~add~app-passwd","method":"post","description":"\nUsing this endpoint you can create a new app password for a specific mailbox.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"username","description":"the username user@domain.tld","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_name","description":"name of the app password","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_passwd","description":"the password","required":false,"members":[],"schema":{"type":"string"}},{"key":"app_passwd2","description":"the password for confirmation","required":false,"members":[],"schema":{"type":"string"}},{"key":"active","description":"1 for a active transport map 0 for a disabled transport map","required":false,"members":[],"schema":{"type":"number"}}]},"example":"{\n \"username\": \"hello@mailcow.email\"\n \"app_name\": \"emclient\",\n \"app_passwd\": \"keyleudecticidechothistishownsan31\",\n \"app_passwd2\": \"keyleudecticidechothistishownsan31\",\n \"active\": \"1\"\n}\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"username\": {\n \"type\": \"string\"\n },\n \"app_name\": {\n \"type\": \"string\"\n },\n \"app_passwd\": {\n \"type\": \"string\"\n },\n \"app_passwd2\": {\n \"type\": \"string\"\n },\n \"active\": {\n \"type\": \"number\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"app_passwd\",\n \"add\",\n {\n \"username\": \"hello@mailcow.email\",\n \"app_name\": \"emclient\",\n \"app_passwd\": \"keyleudecticidechothistishownsan31\",\n \"app_passwd2\": \"keyleudecticidechothistishownsan31\",\n \"active\": \"1\"\n }\n ],\n \"msg\": \"app_passwd_added\"\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["App Passwords","Create App Password"]},{"title":"Delete App Password","path":"/api/v1/delete/app-passwd","pathTemplate":"/api/v1/delete/app-passwd","slug":"post~api~v1~delete~app-passwd","method":"post","description":"\nUsing this endpoint you can delete a single app password.","parameters":[],"transactions":[{"request":{"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}},{"name":"X-API-Key","example":"api-key-string","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"items","value":["id"],"description":"contains list of app passwords you want to delete","required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\"1\"]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\"\n }\n }\n}"},"response":{"statusCode":200,"title":"","description":"","contentType":"application/json","headers":[{"name":"Content-Type","example":"application/json","required":false,"schema":{"type":"string"}}],"structure":{"schema":{"type":"object"},"members":[{"key":"type","required":false,"members":[],"schema":{"type":"enum"}},{"key":"log","value":["entity","action","object",{}],"description":"contains request object","required":false,"members":[[]],"schema":{"type":"array"}},{"key":"msg","value":["message","entity name"],"required":false,"members":[],"schema":{"type":"array"}}]},"example":"[\n {\n \"type\": \"success\",\n \"log\": [\n \"app_passwd\",\n \"delete\",\n {\n \"id\": [\n \"2\"\n ]\n }\n ],\n \"msg\": [\n \"app_passwd_removed\",\n \"2\"\n ]\n }\n]\n","schema":"{\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"enum\": [\n \"success\",\n \"danger\",\n \"error\"\n ]\n },\n \"log\": {\n \"type\": \"array\"\n },\n \"msg\": {\n \"type\": \"array\"\n }\n }\n}"}}],"tags":["App Passwords","Delete App Password"]}],"tagActions":[{"title":"Domains","children":[{"title":"Get domains","actions":[{"title":"Get domains","method":"get","path":"/api/v1/get/domain/{id}","slug":"get~api~v1~get~domain~id"}]},{"title":"Create domain","actions":[{"title":"Create domain","method":"post","path":"/api/v1/add/domain","slug":"post~api~v1~add~domain"}]},{"title":"Update domain","actions":[{"title":"Update domain","method":"post","path":"/api/v1/edit/domain","slug":"post~api~v1~edit~domain"}]},{"title":"Delete domain","actions":[{"title":"Delete domain","method":"post","path":"/api/v1/delete/domain","slug":"post~api~v1~delete~domain"}]}]},{"title":"Domain antispam policies","children":[{"title":"List whitelist domain policy","actions":[{"title":"List whitelist domain policy","method":"get","path":"/api/v1/get/policy_wl_domain/{domain}","slug":"get~api~v1~get~policy~wl~domain~domain"}]},{"title":"List blacklist domain policy","actions":[{"title":"List blacklist domain policy","method":"get","path":"/api/v1/get/policy_bl_domain/{domain}","slug":"get~api~v1~get~policy~bl~domain~domain"}]},{"title":"Create domain policy","actions":[{"title":"Create domain policy","method":"post","path":"/api/v1/add/domain-policy","slug":"post~api~v1~add~domain-policy"}]},{"title":"Delete domain policy","actions":[{"title":"Delete domain policy","method":"post","path":"/api/v1/delete/domain-policy","slug":"post~api~v1~delete~domain-policy"}]}]},{"title":"Mailboxes","children":[{"title":"Get mailboxes","actions":[{"title":"Get mailboxes","method":"get","path":"/api/v1/get/mailbox/{id}","slug":"get~api~v1~get~mailbox~id"}]},{"title":"Create mailbox","actions":[{"title":"Create mailbox","method":"post","path":"/api/v1/add/mailbox","slug":"post~api~v1~add~mailbox"}]},{"title":"Update mailbox","actions":[{"title":"Update mailbox","method":"post","path":"/api/v1/edit/mailbox","slug":"post~api~v1~edit~mailbox"}]},{"title":"Delete mailbox","actions":[{"title":"Delete mailbox","method":"post","path":"/api/v1/delete/mailbox","slug":"post~api~v1~delete~mailbox"}]},{"title":"Quarantine Notifications","actions":[{"title":"Quarantine Notifications","method":"post","path":"/api/v1/edit/quarantine_notification","slug":"post~api~v1~edit~quarantine~notification"}]}]},{"title":"Aliases","children":[{"title":"GET aliases","actions":[{"title":"GET aliases","method":"get","path":"/api/v1/get/alias/{id}","slug":"get~api~v1~get~alias~id"}]},{"title":"Create alias","actions":[{"title":"Create alias","method":"post","path":"/api/v1/add/alias","slug":"post~api~v1~add~alias"}]},{"title":"Update alias","actions":[{"title":"Update alias","method":"post","path":"/api/v1/edit/alias","slug":"post~api~v1~edit~alias"}]},{"title":"Delete alias","actions":[{"title":"Delete alias","method":"post","path":"/api/v1/delete/alias","slug":"post~api~v1~delete~alias"}]}]},{"title":"Sync jobs","children":[{"title":"Get sync jobs","actions":[{"title":"Get sync jobs","method":"get","path":"/api/v1/get/syncjobs/all/no_log","slug":"get~api~v1~get~syncjobs~all~no~log"}]},{"title":"Create sync job","actions":[{"title":"Create sync job","method":"post","path":"/api/v1/add/syncjob","slug":"post~api~v1~add~syncjob"}]},{"title":"Update sync job","actions":[{"title":"Update sync job","method":"post","path":"/api/v1/edit/syncjob","slug":"post~api~v1~edit~syncjob"}]},{"title":"Delete sync job","actions":[{"title":"Delete sync job","method":"post","path":"/api/v1/delete/syncjob","slug":"post~api~v1~delete~syncjob"}]}]},{"title":"Fordwarding Hosts","children":[{"title":"Get Forwarding Hosts","actions":[{"title":"Get Forwarding Hosts","method":"get","path":"/api/v1/get/fwdhost/all","slug":"get~api~v1~get~fwdhost~all"}]},{"title":"Add Forward Host","actions":[{"title":"Add Forward Host","method":"post","path":"/api/v1/add/fwdhost","slug":"post~api~v1~add~fwdhost"}]}]},{"title":"Logs","children":[{"title":"Get Postfix logs","actions":[{"title":"Get Postfix logs","method":"get","path":"/api/v1/get/logs/postfix/{count}","slug":"get~api~v1~get~logs~postfix~count"}]},{"title":"Get Rspamd logs","actions":[{"title":"Get Rspamd logs","method":"get","path":"/api/v1/get/logs/rspamd-history/{count}","slug":"get~api~v1~get~logs~rspamd-history~count"}]},{"title":"Get Dovecot logs","actions":[{"title":"Get Dovecot logs","method":"get","path":"/api/v1/get/logs/dovecot/{count}","slug":"get~api~v1~get~logs~dovecot~count"}]},{"title":"Get ACME logs","actions":[{"title":"Get ACME logs","method":"get","path":"/api/v1/get/logs/acme/{count}","slug":"get~api~v1~get~logs~acme~count"}]},{"title":"Get SOGo logs","actions":[{"title":"Get SOGo logs","method":"get","path":"/api/v1/get/logs/sogo/{count}","slug":"get~api~v1~get~logs~sogo~count"}]},{"title":"Get Watchdog logs","actions":[{"title":"Get Watchdog logs","method":"get","path":"/api/v1/get/logs/watchdog/{count}","slug":"get~api~v1~get~logs~watchdog~count"}]},{"title":"Get Api logs","actions":[{"title":"Get Api logs","method":"get","path":"/api/v1/get/logs/api/{count}","slug":"get~api~v1~get~logs~api~count"}]},{"title":"Get Ratelimit logs","actions":[{"title":"Get Ratelimit logs","method":"get","path":"/api/v1/get/logs/ratelimited/{count}","slug":"get~api~v1~get~logs~ratelimited~count"}]},{"title":"Get Netfilter logs","actions":[{"title":"Get Netfilter logs","method":"get","path":"/api/v1/get/logs/netfilter/{count}","slug":"get~api~v1~get~logs~netfilter~count"}]},{"title":"Get Autodiscover logs","actions":[{"title":"Get Autodiscover logs","method":"get","path":"/api/v1/get/logs/autodiscover/{count}","slug":"get~api~v1~get~logs~autodiscover~count"}]}]},{"title":"Queue Manager","children":[{"title":"Get Queue","actions":[{"title":"Get Queue","method":"get","path":"/api/v1/get/mailq/all","slug":"get~api~v1~get~mailq~all"}]},{"title":"Flush Queue","actions":[{"title":"Flush Queue","method":"post","path":"/api/v1/edit/mailq","slug":"post~api~v1~edit~mailq"}]},{"title":"Delete Queue","actions":[{"title":"Delete Queue","method":"post","path":"/api/v1/delete/mailq","slug":"post~api~v1~delete~mailq"}]}]},{"title":"Quarantine","children":[{"title":"Get mails in Quarantine","actions":[{"title":"Get mails in Quarantine","method":"get","path":"/api/v1/get/quarantine/all","slug":"get~api~v1~get~quarantine~all"}]},{"title":"Delete mails in Quarantine","actions":[{"title":"Delete mails in Quarantine","method":"post","path":"/api/v1/delete/qitem","slug":"post~api~v1~delete~qitem"}]}]},{"title":"Fail2Ban","children":[{"title":"Get Fail2Ban Config","actions":[{"title":"Get Fail2Ban Config","method":"get","path":"/api/v1/get/fail2ban","slug":"get~api~v1~get~fail2ban"}]},{"title":"Edit Fail2Ban","actions":[{"title":"Edit Fail2Ban","method":"post","path":"/api/v1/edit/fail2ban","slug":"post~api~v1~edit~fail2ban"}]}]},{"title":"DKIM","children":[{"title":"Generate DKIM Key","actions":[{"title":"Generate DKIM Key","method":"post","path":"/api/v1/add/dkim","slug":"post~api~v1~add~dkim"}]},{"title":"Duplicate DKIM Key","actions":[{"title":"Duplicate DKIM Key","method":"post","path":"/api/v1/add/dkim_duplicate","slug":"post~api~v1~add~dkim~duplicate"}]},{"title":"Delete DKIM Key","actions":[{"title":"Delete DKIM Key","method":"post","path":"/api/v1/delete/dkim","slug":"post~api~v1~delete~dkim"}]}]},{"title":"Domain admin","children":[{"title":"Get Domain Admins","actions":[{"title":"Get Domain Admins","method":"get","path":"/api/v1/get/domain-admin/all","slug":"get~api~v1~get~domain-admin~all"}]},{"title":"Create Domain Admin user","actions":[{"title":"Create Domain Admin user","method":"post","path":"/api/v1/add/domain-admin","slug":"post~api~v1~add~domain-admin"}]},{"title":"Delete Domain Admin","actions":[{"title":"Delete Domain Admin","method":"post","path":"/api/v1/delete/domain-admin","slug":"post~api~v1~delete~domain-admin"}]}]},{"title":"Address Rewriting","children":[{"title":"Get BCC Map","actions":[{"title":"Get BCC Map","method":"get","path":"/api/v1/get/bcc/{id}","slug":"get~api~v1~get~bcc~id"}]},{"title":"Create BCC Map","actions":[{"title":"Create BCC Map","method":"post","path":"/api/v1/add/bcc","slug":"post~api~v1~add~bcc"}]},{"title":"Delete BCC Map","actions":[{"title":"Delete BCC Map","method":"post","path":"/api/v1/delete/bcc","slug":"post~api~v1~delete~bcc"}]},{"title":"Get Recipient Map","actions":[{"title":"Get Recipient Map","method":"get","path":"/api/v1/get/recipient_map/{id}","slug":"get~api~v1~get~recipient~map~id"}]},{"title":"Create Recipient Map","actions":[{"title":"Create Recipient Map","method":"post","path":"/api/v1/add/recipient_map","slug":"post~api~v1~add~recipient~map"}]},{"title":"Delete Recipient Map","actions":[{"title":"Delete Recipient Map","method":"post","path":"/api/v1/delete/recipient_map","slug":"post~api~v1~delete~recipient~map"}]}]},{"title":"Outgoing TLS Policy Map Overrides","children":[{"title":"Get TLS Policy Map","actions":[{"title":"Get TLS Policy Map","method":"get","path":"/api/v1/get/tls-policy-map/{id}","slug":"get~api~v1~get~tls-policy-map~id"}]},{"title":"Create TLS Policy Map","actions":[{"title":"Create TLS Policy Map","method":"post","path":"/api/v1/add/tls-policy-map","slug":"post~api~v1~add~tls-policy-map"}]},{"title":"Delete TLS Policy Map","actions":[{"title":"Delete TLS Policy Map","method":"post","path":"/api/v1/delete/tls-policy-map","slug":"post~api~v1~delete~tls-policy-map"}]}]},{"title":"oAuth Clients","children":[{"title":"Get oAuth Clients","actions":[{"title":"Get oAuth Clients","method":"get","path":"/api/v1/get/oauth2-client/{id}","slug":"get~api~v1~get~oauth2-client~id"}]},{"title":"Create oAuth Client","actions":[{"title":"Create oAuth Client","method":"post","path":"/api/v1/add/oauth2-client","slug":"post~api~v1~add~oauth2-client"}]},{"title":"Delete oAuth Client","actions":[{"title":"Delete oAuth Client","method":"post","path":"/api/v1/delete/oauth2-client","slug":"post~api~v1~delete~oauth2-client"}]}]},{"title":"Routing","children":[{"title":"Get Sender-Dependent Transports","actions":[{"title":"Get Sender-Dependent Transports","method":"get","path":"/api/v1/get/relayhost/{id}","slug":"get~api~v1~get~relayhost~id"}]},{"title":"Create Sender-Dependent Transports","actions":[{"title":"Create Sender-Dependent Transports","method":"post","path":"/api/v1/add/relayhost","slug":"post~api~v1~add~relayhost"}]},{"title":"Delete Sender-Dependent Transports","actions":[{"title":"Delete Sender-Dependent Transports","method":"post","path":"/api/v1/delete/relayhost","slug":"post~api~v1~delete~relayhost"}]},{"title":"Get Transport Maps","actions":[{"title":"Get Transport Maps","method":"get","path":"/api/v1/get/transport/{id}","slug":"get~api~v1~get~transport~id"}]},{"title":"Create Transport Maps","actions":[{"title":"Create Transport Maps","method":"post","path":"/api/v1/add/transport/all","slug":"post~api~v1~add~transport~all"}]},{"title":"Delete Transport Maps","actions":[{"title":"Delete Transport Maps","method":"post","path":"/api/v1/delete/transport","slug":"post~api~v1~delete~transport"}]}]},{"title":"Resources","children":[{"title":"Get Resources","actions":[{"title":"Get Resources","method":"get","path":"/api/v1/get/resource/all","slug":"get~api~v1~get~resource~all"}]},{"title":"Create Resources","actions":[{"title":"Create Resources","method":"post","path":"/api/v1/add/resource","slug":"post~api~v1~add~resource"}]},{"title":"Delete Resources","actions":[{"title":"Delete Resources","method":"post","path":"/api/v1/delete/resource","slug":"post~api~v1~delete~resource"}]}]},{"title":"App Passwords","children":[{"title":"Get App Password","actions":[{"title":"Get App Password","method":"get","path":"/api/v1/get/app-passwd/all/{mailbox}","slug":"get~api~v1~get~app-passwd~all~mailbox"}]},{"title":"Create App Password","actions":[{"title":"Create App Password","method":"post","path":"/api/v1/add/app-passwd","slug":"post~api~v1~add~app-passwd"}]},{"title":"Delete App Password","actions":[{"title":"Delete App Password","method":"post","path":"/api/v1/delete/app-passwd","slug":"post~api~v1~delete~app-passwd"}]}]}],"config":{"playground":{"enabled":true,"env":"easy","environments":{"easy":{"playground":false,"url":"/"},"advanced":{"url":"/"}}},"sidebar":{"groupOrder":"auto"},"basePath":"/","stylesheets":[]}} }); return app;