|
| 1 | +# Table of contents |
| 2 | + |
| 3 | +* [contracts][SourceFile-0] |
| 4 | + * Interfaces |
| 5 | + * [ApiItemReference][InterfaceDeclaration-0] |
| 6 | + * [PluginHeading][InterfaceDeclaration-1] |
| 7 | + * [PluginMember][InterfaceDeclaration-2] |
| 8 | + * [PluginOptions][InterfaceDeclaration-5] |
| 9 | + * [PluginResultData][InterfaceDeclaration-4] |
| 10 | + * [PluginResult][InterfaceDeclaration-3] |
| 11 | + * [Plugin][InterfaceDeclaration-6] |
| 12 | + * Types |
| 13 | + * [SupportedApiItemKindType][TypeAliasDeclaration-0] |
| 14 | + * [GetItemPluginResultHandler][TypeAliasDeclaration-1] |
| 15 | + * [IsPluginResultExistsHandler][TypeAliasDeclaration-2] |
| 16 | + * [MappedType][TypeAliasDeclaration-3] |
| 17 | + * Enums |
| 18 | + * [ApiItemKindsAdditional][EnumDeclaration-0] |
| 19 | + |
| 20 | +# contracts |
| 21 | + |
| 22 | +## Interfaces |
| 23 | + |
| 24 | +### ApiItemReference |
| 25 | + |
| 26 | +```typescript |
| 27 | +interface ApiItemReference { |
| 28 | + Id: string; |
| 29 | + Alias: string; |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | +**Properties** |
| 34 | + |
| 35 | +| Name | Type | |
| 36 | +| ----- | ------ | |
| 37 | +| Id | string | |
| 38 | +| Alias | string | |
| 39 | + |
| 40 | +---------- |
| 41 | + |
| 42 | +### PluginHeading |
| 43 | + |
| 44 | +```typescript |
| 45 | +interface PluginHeading { |
| 46 | + Heading: string; |
| 47 | + ApiItemId: string; |
| 48 | +} |
| 49 | +``` |
| 50 | + |
| 51 | +**Properties** |
| 52 | + |
| 53 | +| Name | Type | |
| 54 | +| --------- | ------ | |
| 55 | +| Heading | string | |
| 56 | +| ApiItemId | string | |
| 57 | + |
| 58 | +---------- |
| 59 | + |
| 60 | +### PluginMember |
| 61 | + |
| 62 | +```typescript |
| 63 | +interface PluginMember { |
| 64 | + Reference: ApiItemReference; |
| 65 | + PluginResult: PluginResult<ApiItemDto>; |
| 66 | +} |
| 67 | +``` |
| 68 | + |
| 69 | +**Properties** |
| 70 | + |
| 71 | +| Name | Type | |
| 72 | +| ------------ | ------------------------ | |
| 73 | +| Reference | ApiItemReference | |
| 74 | +| PluginResult | PluginResult<ApiItemDto> | |
| 75 | + |
| 76 | +---------- |
| 77 | + |
| 78 | +### PluginOptions |
| 79 | + |
| 80 | +```typescript |
| 81 | +interface PluginOptions<TKind = ApiItemDto> { |
| 82 | + Reference: ApiItemReference; |
| 83 | + ApiItem: TKind; |
| 84 | + ExtractedData: ExtractDto; |
| 85 | + GetItemPluginResult: GetItemPluginResultHandler; |
| 86 | + IsPluginResultExists: IsPluginResultExistsHandler; |
| 87 | +} |
| 88 | +``` |
| 89 | + |
| 90 | +**Type parameters** |
| 91 | + |
| 92 | +| Name | Default type | |
| 93 | +| ----- | ------------ | |
| 94 | +| TKind | ApiItemDto | |
| 95 | + |
| 96 | +**Properties** |
| 97 | + |
| 98 | +| Name | Type | |
| 99 | +| -------------------- | --------------------------- | |
| 100 | +| Reference | ApiItemReference | |
| 101 | +| ApiItem | TKind | |
| 102 | +| ExtractedData | ExtractDto | |
| 103 | +| GetItemPluginResult | GetItemPluginResultHandler | |
| 104 | +| IsPluginResultExists | IsPluginResultExistsHandler | |
| 105 | + |
| 106 | +---------- |
| 107 | + |
| 108 | +### PluginResultData |
| 109 | + |
| 110 | +```typescript |
| 111 | +interface PluginResultData { |
| 112 | + Headings: PluginHeading[]; |
| 113 | + UsedReferences: string[]; |
| 114 | + Result: string[]; |
| 115 | + Members: PluginMember[]; |
| 116 | +} |
| 117 | +``` |
| 118 | + |
| 119 | +**Properties** |
| 120 | + |
| 121 | +| Name | Type | |
| 122 | +| -------------- | --------------- | |
| 123 | +| Headings | PluginHeading[] | |
| 124 | +| UsedReferences | string[] | |
| 125 | +| Result | string[] | |
| 126 | +| Members | PluginMember[] | |
| 127 | + |
| 128 | +---------- |
| 129 | + |
| 130 | +### PluginResult |
| 131 | + |
| 132 | +```typescript |
| 133 | +interface PluginResult<TKind = ApiItemDto> extends PluginResultData { |
| 134 | + Reference: ApiItemReference; |
| 135 | + ApiItem: TKind; |
| 136 | +} |
| 137 | +``` |
| 138 | + |
| 139 | +**Type parameters** |
| 140 | + |
| 141 | +| Name | Default type | |
| 142 | +| ----- | ------------ | |
| 143 | +| TKind | ApiItemDto | |
| 144 | + |
| 145 | +**Extends** |
| 146 | + |
| 147 | +PluginResultData |
| 148 | + |
| 149 | +**Properties** |
| 150 | + |
| 151 | +| Name | Type | |
| 152 | +| --------- | ---------------- | |
| 153 | +| Reference | ApiItemReference | |
| 154 | +| ApiItem | TKind | |
| 155 | + |
| 156 | +---------- |
| 157 | + |
| 158 | +### Plugin |
| 159 | + |
| 160 | +```typescript |
| 161 | +interface Plugin<TKind = ApiItemDto> { |
| 162 | + SupportedApiItemKinds(): SupportedApiItemKindType[]; |
| 163 | + CheckApiItem(item: TKind): boolean; |
| 164 | + Render(options: PluginOptions<TKind>): PluginResult<ApiItemDto>; |
| 165 | +} |
| 166 | +``` |
| 167 | + |
| 168 | +**Type parameters** |
| 169 | + |
| 170 | +| Name | Default type | |
| 171 | +| ----- | ------------ | |
| 172 | +| TKind | ApiItemDto | |
| 173 | + |
| 174 | +#### Methods |
| 175 | + |
| 176 | +```typescript |
| 177 | +SupportedApiItemKinds(): SupportedApiItemKindType[] |
| 178 | +``` |
| 179 | + |
| 180 | +**Return type** |
| 181 | + |
| 182 | +SupportedApiItemKindType[] |
| 183 | + |
| 184 | +```typescript |
| 185 | +CheckApiItem(item: TKind): boolean |
| 186 | +``` |
| 187 | + |
| 188 | +**Parameters** |
| 189 | + |
| 190 | +| Name | Type | |
| 191 | +| ---- | ----- | |
| 192 | +| item | TKind | |
| 193 | + |
| 194 | +**Return type** |
| 195 | + |
| 196 | +boolean |
| 197 | + |
| 198 | +```typescript |
| 199 | +Render(options: PluginOptions<TKind>): PluginResult<ApiItemDto> |
| 200 | +``` |
| 201 | + |
| 202 | +**Parameters** |
| 203 | + |
| 204 | +| Name | Type | |
| 205 | +| ------- | -------------------- | |
| 206 | +| options | PluginOptions<TKind> | |
| 207 | + |
| 208 | +**Return type** |
| 209 | + |
| 210 | +PluginResult<ApiItemDto> |
| 211 | + |
| 212 | +## Types |
| 213 | + |
| 214 | +### SupportedApiItemKindType |
| 215 | + |
| 216 | +```typescript |
| 217 | +type SupportedApiItemKindType = ApiItemKinds | Any; |
| 218 | +``` |
| 219 | + |
| 220 | +ApiItemKinds | Any |
| 221 | + |
| 222 | +---------- |
| 223 | + |
| 224 | +### GetItemPluginResultHandler |
| 225 | + |
| 226 | +```typescript |
| 227 | +type GetItemPluginResultHandler = (reference: ApiItemReference) => PluginResult<ApiItemDto>; |
| 228 | +``` |
| 229 | + |
| 230 | +(reference: ApiItemReference) => PluginResult<ApiItemDto> |
| 231 | + |
| 232 | +---------- |
| 233 | + |
| 234 | +### IsPluginResultExistsHandler |
| 235 | + |
| 236 | +```typescript |
| 237 | +type IsPluginResultExistsHandler = (reference: ApiItemReference) => boolean; |
| 238 | +``` |
| 239 | + |
| 240 | +(reference: ApiItemReference) => boolean |
| 241 | + |
| 242 | +---------- |
| 243 | + |
| 244 | +### MappedType |
| 245 | + |
| 246 | +```typescript |
| 247 | +type MappedType = {[K in "a-b-c"]: number}; |
| 248 | +``` |
| 249 | + |
| 250 | +{[K in "a-b-c"]: number} |
| 251 | + |
| 252 | +## Enums |
| 253 | + |
| 254 | +### ApiItemKindsAdditional |
| 255 | + |
| 256 | + |
| 257 | +```typescript |
| 258 | +enum ApiItemKindsAdditional { |
| 259 | + Any = "any" |
| 260 | +} |
| 261 | +``` |
| 262 | + |
| 263 | +**Members** |
| 264 | + |
| 265 | +| Name | Value | |
| 266 | +| ---- | ----- | |
| 267 | +| Any | "any" | |
| 268 | + |
| 269 | +[SourceFile-0]: contracts.md#contracts |
| 270 | +[InterfaceDeclaration-0]: contracts.md#apiitemreference |
| 271 | +[InterfaceDeclaration-1]: contracts.md#pluginheading |
| 272 | +[InterfaceDeclaration-2]: contracts.md#pluginmember |
| 273 | +[InterfaceDeclaration-5]: contracts.md#pluginoptions |
| 274 | +[InterfaceDeclaration-4]: contracts.md#pluginresultdata |
| 275 | +[InterfaceDeclaration-3]: contracts.md#pluginresult |
| 276 | +[InterfaceDeclaration-6]: contracts.md#plugin |
| 277 | +[TypeAliasDeclaration-0]: contracts.md#supportedapiitemkindtype |
| 278 | +[TypeAliasDeclaration-1]: contracts.md#getitempluginresulthandler |
| 279 | +[TypeAliasDeclaration-2]: contracts.md#ispluginresultexistshandler |
| 280 | +[TypeAliasDeclaration-3]: contracts.md#mappedtype |
| 281 | +[EnumDeclaration-0]: contracts.md#apiitemkindsadditional |
0 commit comments