Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintrc.js

This file was deleted.

7 changes: 0 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
coverage/
test/
demo/
gen-tsd.json
CONTRIBUTING.md
.travis.yml
index.html
polymer.json
karma.*
husky.*
commitlint.*
.*
*.config.*
prettier.config.js
dist/
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js: stable
sudo: required
addons:
chrome: stable
script:
Expand Down
247 changes: 2 additions & 245 deletions api-body-document.d.ts
Original file line number Diff line number Diff line change
@@ -1,250 +1,7 @@
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/tools/tree/master/packages/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* api-body-document.js
*/


// tslint:disable:variable-name Describing an API that's defined elsewhere.
// tslint:disable:no-any describes the API as best we are able today

import {LitElement, html, css} from 'lit-element';

import {AmfHelperMixin} from '@api-components/amf-helper-mixin/amf-helper-mixin.js';

declare namespace ApiElements {

/**
* `api-body-document`
*
* A component to render HTTP method body documentation based on AMF model.
*/
class ApiBodyDocument extends
AmfHelperMixin(
Object) {

/**
* List of discovered media types in the `body`.
*/
_mediaTypes: Array<object|null>|null;

/**
* A body model for selected media type.
* Computed automatically when selection change.
*/
_selectedBody: object|null|undefined;

/**
* Computed AMF schema object for the body.
*/
_selectedSchema: object|null|undefined;

/**
* Currently selected media type.
* It is an index of a media type in `mediaTypes` array.
* It is set to `0` each time the body changes.
*/
selected: number|null|undefined;

/**
* AMF model for body as a `http://raml.org/vocabularies/http#payload`
* type.
*/
body: Array<object|null>|null;

/**
* `raml-aware` scope property to use.
*/
aware: string|null|undefined;

/**
* Set to true to open the body view.
* Autormatically updated when the view is toggled from the UI.
*/
opened: boolean|null|undefined;

/**
* Computed value. True when mediaTypes has more than one item.
*/
_renderMediaSelector: boolean|null|undefined;

/**
* Selected body ID.
* It is computed here and passed to the type document to render
* examples.
*/
_selectedBodyId: string|null|undefined;

/**
* Name of the selected media type.
*/
_selectedMediaType: string|null|undefined;

/**
* True if selected body is a structured object
*/
_isObject: boolean|null|undefined;

/**
* True if selected body is a schema (JSON, XML, ...) data
*/
_isSchema: boolean|null|undefined;

/**
* Computed value, true if the body is of "any" type.
*/
_isAnyType: boolean|null|undefined;

/**
* Name of the resource type if any.
*/
_typeName: string|null|undefined;

/**
* Computed value, true if `typeName` is set.
*/
_hasTypeName: boolean|null|undefined;

/**
* Body name, if defined
*/
_bodyName: string|null|undefined;

/**
* Name of the resource type if any.
*/
_description: string|null|undefined;

/**
* Set to render a mobile friendly view.
*/
narrow: boolean|null|undefined;

/**
* Enables compatibility with Anypoint components.
*/
compatibility: boolean|null|undefined;

/**
* Type of the header in the documentation section.
* Should be in range of 1 to 6.
*/
headerLevel: number|null|undefined;

/**
* When enabled it renders external types as links and dispatches
* `api-navigation-selection-changed` when clicked.
*/
graph: boolean|null|undefined;
_hasObjectExamples: boolean|null|undefined;

/**
* Sets observable property that causes render action.
*
* @param prop Property name
* @param value Value to set
* @returns True when the property has been updated.
*/
_sop(prop: String|null, value: any|null): Boolean|null;
_bodyChanged(): void;
_selectedBodyChanged(value: any): void;

/**
* Computes list of media types in the `body`
*
* @param body Current value of the body.
*/
_computeMediaTypes(body: any[]|null): Array<object|null>|null;

/**
* Computes value for `renderMediaSelector` properety.
*
* @param types `mediaTypes` change record.
*/
_computeRenderMediaSelector(types: object|null): Boolean|null;

/**
* Computes if `selected` equals current item index.
*/
_mediaTypeActive(selected: Number|null, index: Number|null): Boolean|null;

/**
* Handler for media type type button click.
* Sets `selected` property.
*/
_selectMediaType(e: ClickEvent|null): void;

/**
* Computes value of `http://raml.org/vocabularies/http#schema` for body.
*
* @param selected Index of currently selected media type in
* `mediaTypes` array
* @param body List of body in request.
*/
_computeSelectedBody(selected: Number|null, body: Array<object|null>|null): object|null|undefined;
_computeSelectedSchema(selectedBody: any): any;

/**
* Computes value for `selectedMediaType` property.
*
* @param selected Currently selected media type index in the selector.
* @param body List of bodies.
* @returns Content type value.
*/
_computeSelectedMediaName(selected: Number|null, body: Array<object|null>|null): String|null;

/**
* Handler for body value change. Computes basic view control properties.
*
* @param body Currently computed body.
*/
_selectedSchemaChanged(body: object|null): void;

/**
* Computes a label for the section toggle buttons.
*/
_computeToggleActionLabel(opened: any): any;

/**
* Computes class for the toggle's button icon.
*/
_computeToggleIconClass(opened: any): any;

/**
* Toggles URI parameters view.
* Use `pathOpened` property instead.
*/
toggle(): void;

/**
* Computes `typeName` as a name of body in the AMF model.
*
* @param body Currently selected body.
*/
_computeTypeName(body: object|null): String|null|undefined;
_apiChangedHandler(e: any): void;

/**
* A template to render for "Any" AMF model.
*/
_anyTypeTemplate(): TemplateResult|null;

/**
* A template to render for any AMF model\ that is different than "any".
*/
_typedTemplate(): TemplateResult|null;
_mediaTypesTemplate(): any;
render(): any;
}
}
import { ApiBodyDocumentElement } from './src/ApiBodyDocumentElement';

declare global {

interface HTMLElementTagNameMap {
"api-body-document": ApiElements.ApiBodyDocument;
"api-body-document": ApiBodyDocumentElement;
}
}
Loading