@loopback/cli 4.0.0-alpha.9 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/.yo-rc.json +1719 -0
  2. package/{generators/project/templates/LICENSE → LICENSE} +2 -1
  3. package/README.md +44 -43
  4. package/bin/cli-main.js +61 -0
  5. package/generators/app/index.js +109 -15
  6. package/generators/app/templates/.dockerignore +5 -0
  7. package/generators/app/templates/Dockerfile +28 -0
  8. package/generators/app/templates/README.md.ejs +130 -0
  9. package/generators/app/templates/public/index.html.ejs +88 -0
  10. package/generators/app/templates/{test → src/__tests__}/README.md +0 -1
  11. package/generators/app/templates/src/__tests__/acceptance/home-page.acceptance.ts.ejs +31 -0
  12. package/generators/app/templates/src/__tests__/acceptance/ping.controller.acceptance.ts.ejs +21 -0
  13. package/generators/app/templates/src/__tests__/acceptance/test-helper.ts.ejs +32 -0
  14. package/generators/app/templates/src/application.ts.ejs +70 -0
  15. package/generators/app/templates/src/controllers/README.md +6 -0
  16. package/generators/app/templates/src/controllers/index.ts.ejs +1 -0
  17. package/generators/app/templates/src/controllers/ping.controller.ts.ejs +55 -0
  18. package/generators/app/templates/src/datasources/README.md +3 -0
  19. package/generators/app/templates/src/index.ts.ejs +39 -0
  20. package/generators/app/templates/src/migrate.ts.ejs +20 -0
  21. package/generators/app/templates/src/models/README.md +3 -0
  22. package/generators/app/templates/src/openapi-spec.ts.ejs +23 -0
  23. package/generators/app/templates/src/sequence.ts.ejs +3 -0
  24. package/generators/controller/index.js +240 -23
  25. package/generators/controller/templates/src/controllers/controller-rest-template.ts.ejs +150 -0
  26. package/generators/controller/templates/src/controllers/{controller-template.ts → controller-template.ts.ejs} +2 -2
  27. package/generators/copyright/fs.js +46 -0
  28. package/generators/copyright/git.js +78 -0
  29. package/generators/copyright/header.js +306 -0
  30. package/generators/copyright/index.js +230 -0
  31. package/generators/copyright/license.js +105 -0
  32. package/generators/datasource/index.js +341 -0
  33. package/generators/datasource/templates/datasource.ts.ejs +22 -0
  34. package/generators/discover/import-discovered-model.js +70 -0
  35. package/generators/discover/index.js +411 -0
  36. package/generators/example/downloader.js +16 -0
  37. package/generators/example/index.js +176 -0
  38. package/generators/extension/index.js +34 -5
  39. package/generators/extension/templates/README.md.ejs +32 -0
  40. package/generators/extension/templates/{test → src/__tests__}/acceptance/README.md +0 -0
  41. package/generators/extension/templates/{test → src/__tests__}/integration/README.md +0 -0
  42. package/generators/extension/templates/{test → src/__tests__}/unit/README.md +0 -0
  43. package/generators/extension/templates/src/component.ts.ejs +22 -0
  44. package/generators/extension/templates/src/controllers/README.md +3 -2
  45. package/generators/extension/templates/src/decorators/README.md +10 -4
  46. package/generators/extension/templates/src/index.ts.ejs +3 -0
  47. package/generators/extension/templates/src/keys.ts.ejs +11 -0
  48. package/generators/extension/templates/src/mixins/README.md +77 -21
  49. package/generators/extension/templates/src/providers/README.md +51 -25
  50. package/generators/extension/templates/src/repositories/README.md +1 -1
  51. package/generators/extension/templates/src/types.ts.ejs +15 -0
  52. package/generators/import-lb3-models/index.js +197 -0
  53. package/generators/import-lb3-models/lb3app-loader.js +31 -0
  54. package/generators/import-lb3-models/migrate-model.js +249 -0
  55. package/generators/import-lb3-models/model-names.js +32 -0
  56. package/generators/interceptor/index.js +178 -0
  57. package/generators/interceptor/templates/interceptor-template.ts.ejs +62 -0
  58. package/generators/model/index.js +536 -0
  59. package/generators/model/property-definition.js +85 -0
  60. package/generators/model/templates/model.ts.ejs +49 -0
  61. package/generators/observer/index.js +132 -0
  62. package/generators/observer/templates/observer-template.ts.ejs +40 -0
  63. package/generators/openapi/README.md +211 -0
  64. package/generators/openapi/index.js +535 -0
  65. package/generators/openapi/schema-helper.js +447 -0
  66. package/generators/openapi/spec-helper.js +484 -0
  67. package/generators/openapi/spec-loader.js +75 -0
  68. package/generators/openapi/templates/src/controllers/controller-template.ts.ejs +43 -0
  69. package/generators/openapi/templates/src/datasources/datasource.ts.ejs +42 -0
  70. package/generators/openapi/templates/src/models/model-template.ts.ejs +71 -0
  71. package/generators/openapi/templates/src/models/type-template.ts.ejs +13 -0
  72. package/generators/openapi/templates/src/services/service-proxy-template.ts.ejs +55 -0
  73. package/generators/openapi/utils.js +322 -0
  74. package/generators/project/templates/.eslintignore +4 -0
  75. package/generators/project/templates/.eslintrc.js.ejs +3 -0
  76. package/generators/project/templates/.mocharc.json +5 -0
  77. package/generators/project/templates/.prettierignore +0 -2
  78. package/generators/project/templates/.prettierrc +2 -1
  79. package/generators/project/templates/.vscode/launch.json +38 -0
  80. package/generators/project/templates/.vscode/settings.json +32 -0
  81. package/generators/project/templates/.vscode/tasks.json +29 -0
  82. package/generators/project/templates/DEVELOPING.md +36 -0
  83. package/generators/project/templates/_.gitignore +3 -5
  84. package/generators/project/templates/package.json.ejs +175 -0
  85. package/generators/project/templates/package.plain.json.ejs +176 -0
  86. package/generators/project/templates/tsconfig.json.ejs +39 -0
  87. package/generators/relation/base-relation.generator.js +220 -0
  88. package/generators/relation/belongs-to-relation.generator.js +196 -0
  89. package/generators/relation/has-many-relation.generator.js +200 -0
  90. package/generators/relation/has-many-through-relation.generator.js +331 -0
  91. package/generators/relation/has-one-relation.generator.js +200 -0
  92. package/generators/relation/index.js +795 -0
  93. package/generators/relation/references-many-relation.generator.js +142 -0
  94. package/generators/relation/templates/controller-relation-template-belongs-to.ts.ejs +38 -0
  95. package/generators/relation/templates/controller-relation-template-has-many-through.ts.ejs +110 -0
  96. package/generators/relation/templates/controller-relation-template-has-many.ts.ejs +110 -0
  97. package/generators/relation/templates/controller-relation-template-has-one.ts.ejs +110 -0
  98. package/generators/relation/utils.generator.js +260 -0
  99. package/generators/repository/index.js +576 -0
  100. package/generators/repository/templates/src/repositories/repository-crud-default-template.ts.ejs +21 -0
  101. package/generators/repository/templates/src/repositories/repository-kv-template.ts.ejs +19 -0
  102. package/generators/rest-crud/crud-rest-component.js +63 -0
  103. package/generators/rest-crud/index.js +423 -0
  104. package/generators/rest-crud/templates/src/model-endpoints/model.rest-config-template.ts.ejs +11 -0
  105. package/generators/service/index.js +351 -0
  106. package/generators/service/templates/local-service-class-template.ts.ejs +10 -0
  107. package/generators/service/templates/local-service-provider-template.ts.ejs +19 -0
  108. package/generators/service/templates/remote-service-proxy-template.ts.ejs +21 -0
  109. package/generators/update/index.js +55 -0
  110. package/intl/cs/messages.json +204 -0
  111. package/intl/de/messages.json +204 -0
  112. package/intl/en/messages.json +204 -0
  113. package/intl/es/messages.json +204 -0
  114. package/intl/fr/messages.json +204 -0
  115. package/intl/it/messages.json +204 -0
  116. package/intl/ja/messages.json +204 -0
  117. package/intl/ko/messages.json +204 -0
  118. package/intl/nl/messages.json +204 -0
  119. package/intl/pl/messages.json +204 -0
  120. package/intl/pt/messages.json +204 -0
  121. package/intl/ru/messages.json +204 -0
  122. package/intl/tr/messages.json +204 -0
  123. package/intl/zh-Hans/messages.json +204 -0
  124. package/intl/zh-Hant/messages.json +204 -0
  125. package/lib/artifact-generator.js +138 -39
  126. package/lib/ast-helper.js +214 -0
  127. package/lib/base-generator.js +509 -0
  128. package/lib/cli.js +233 -0
  129. package/lib/connectors.json +894 -0
  130. package/lib/debug.js +16 -0
  131. package/lib/globalize.js +12 -0
  132. package/lib/model-discoverer.js +118 -0
  133. package/lib/project-generator.js +154 -57
  134. package/lib/tab-completion.js +127 -0
  135. package/lib/update-index.js +44 -0
  136. package/lib/utils.js +689 -20
  137. package/lib/version-helper.js +299 -0
  138. package/package.json +183 -39
  139. package/CHANGELOG.md +0 -86
  140. package/bin/cli.js +0 -66
  141. package/generators/app/templates/index.js +0 -14
  142. package/generators/app/templates/src/application.ts +0 -27
  143. package/generators/app/templates/src/controllers/ping-controller.ts +0 -25
  144. package/generators/app/templates/src/index.ts +0 -25
  145. package/generators/app/templates/test/ping-controller.test.ts +0 -46
  146. package/generators/extension/templates/index.js +0 -8
  147. package/generators/extension/templates/src/component.ts +0 -14
  148. package/generators/extension/templates/src/index.ts +0 -6
  149. package/generators/project/templates/.npmrc +0 -1
  150. package/generators/project/templates/.yo-rc.json +0 -1
  151. package/generators/project/templates/README.md +0 -4
  152. package/generators/project/templates/index.d.ts +0 -6
  153. package/generators/project/templates/index.ts +0 -11
  154. package/generators/project/templates/package.json +0 -79
  155. package/generators/project/templates/package.plain.json +0 -82
  156. package/generators/project/templates/test/mocha.opts +0 -1
  157. package/generators/project/templates/tsconfig.json +0 -29
  158. package/generators/project/templates/tslint.build.json +0 -17
  159. package/generators/project/templates/tslint.json +0 -33
@@ -0,0 +1,49 @@
1
+ <% if (isModelBaseBuiltin) { -%>
2
+ import {<%= modelBaseClass %>, model, property<%if (locals.relationImports) {%><% relationImports.forEach((relation) => {-%>, <%= relation %> <%_})-%><%}%>} from '@loopback/repository';
3
+ <% } else { -%>
4
+ import {model, property<%if (locals.relationImports) {%><% relationImports.forEach((relation) => {-%> , <%= relation %> <%_})-%><%}%>} from '@loopback/repository';
5
+ import {<%= modelBaseClass %>} from '.';
6
+ <% } -%>
7
+ <%_ if (locals.relationDestinationImports && locals.relationDestinationImports.length > 0) { -%>
8
+ import {<% relationDestinationImports.forEach((model, index) => {-%><%= model %><%if (index!==relationDestinationImports.length-1) {%>,<% } %> <%_}) -%>} from '.';
9
+ <%_ } -%>
10
+
11
+ <% if (modelSettings) { -%>
12
+ @model(<%- modelSettings %>)
13
+ <% } else { -%>
14
+ @model()
15
+ <% } -%>
16
+ export class <%= className %> extends <%= modelBaseClass %> {
17
+ <% Object.entries(properties).forEach(([key, val]) => { -%>
18
+ <% if (val.relation) { -%>
19
+ @<%= val.relation.type %>(() => <%= val.relation.model %>)
20
+ <% } else { -%>
21
+ @property({
22
+ <%_ Object.entries(val).forEach(([propKey, propVal]) => { -%>
23
+ <%_ if (!['tsType', 'relation'].includes(propKey)) { -%>
24
+ <%= propKey %>: <%- propVal %>,
25
+ <%_ } -%>
26
+ <%_ }) -%>
27
+ })
28
+ <% } -%>
29
+ <%= key %><%if (!val.required) {%>?<% } %>: <%= val.tsType %>;
30
+
31
+ <% }) -%>
32
+ <% if(allowAdditionalProperties) { -%>
33
+ // Define well-known properties here
34
+
35
+ // Indexer property to allow additional data
36
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
+ [prop: string]: any;
38
+ <% } -%>
39
+
40
+ constructor(data?: Partial<<%= className %>>) {
41
+ super(data);
42
+ }
43
+ }
44
+
45
+ export interface <%= className %>Relations {
46
+ // describe navigational properties here
47
+ }
48
+
49
+ export type <%= className %>WithRelations = <%= className %> & <%= className %>Relations;
@@ -0,0 +1,132 @@
1
+ // Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
2
+ // Node module: @loopback/cli
3
+ // This file is licensed under the MIT License.
4
+ // License text available at https://opensource.org/licenses/MIT
5
+
6
+ 'use strict';
7
+ const ArtifactGenerator = require('../../lib/artifact-generator');
8
+ const debug = require('../../lib/debug')('observer-generator');
9
+ const inspect = require('util').inspect;
10
+ const path = require('path');
11
+ const utils = require('../../lib/utils');
12
+
13
+ const SCRIPT_TEMPLATE = 'observer-template.ts.ejs';
14
+ const g = require('../../lib/globalize');
15
+
16
+ module.exports = class ObserverGenerator extends ArtifactGenerator {
17
+ // Note: arguments and options should be defined in the constructor.
18
+ constructor(args, opts) {
19
+ super(args, opts);
20
+ }
21
+
22
+ _setupGenerator() {
23
+ this.option('group', {
24
+ description: g.f('Name of the observer group for ordering'),
25
+ required: false,
26
+ type: String,
27
+ });
28
+
29
+ this.artifactInfo = {
30
+ type: 'observer',
31
+ rootDir: utils.sourceRootDir,
32
+ };
33
+
34
+ this.artifactInfo.outDir = path.resolve(
35
+ this.artifactInfo.rootDir,
36
+ utils.observersDir,
37
+ );
38
+
39
+ this.artifactInfo.defaultTemplate = SCRIPT_TEMPLATE;
40
+
41
+ return super._setupGenerator();
42
+ }
43
+
44
+ setOptions() {
45
+ return super.setOptions();
46
+ }
47
+
48
+ checkLoopBackProject() {
49
+ if (this.shouldExit()) return;
50
+ return super.checkLoopBackProject();
51
+ }
52
+
53
+ /**
54
+ * Ask for Service Name
55
+ */
56
+ async promptArtifactName() {
57
+ debug('Prompting for observer name');
58
+ if (this.shouldExit()) return;
59
+
60
+ if (this.options.name) {
61
+ Object.assign(this.artifactInfo, {name: this.options.name});
62
+ }
63
+
64
+ const prompts = [
65
+ {
66
+ type: 'input',
67
+ name: 'name',
68
+ // capitalization
69
+ message: g.f('%s name:', utils.toClassName(this.artifactInfo.type)),
70
+ when: !this.artifactInfo.name,
71
+ validate: utils.validateClassName,
72
+ },
73
+ ];
74
+ return this.prompt(prompts).then(props => {
75
+ Object.assign(this.artifactInfo, props);
76
+ return props;
77
+ });
78
+ }
79
+
80
+ async promptObserverGroup() {
81
+ debug('Prompting for observer group');
82
+ if (this.shouldExit()) return;
83
+
84
+ if (this.options.group) {
85
+ Object.assign(this.artifactInfo, {group: this.options.group});
86
+ }
87
+
88
+ const prompts = [
89
+ {
90
+ type: 'input',
91
+ name: 'group',
92
+ // capitalization
93
+ message: g.f('%s group:', utils.toClassName(this.artifactInfo.type)),
94
+ default: '',
95
+ when: !this.artifactInfo.group,
96
+ },
97
+ ];
98
+ return this.prompt(prompts).then(props => {
99
+ Object.assign(this.artifactInfo, props);
100
+ return props;
101
+ });
102
+ }
103
+
104
+ scaffold() {
105
+ if (this.shouldExit()) return false;
106
+
107
+ // Setting up data for templates
108
+ this.artifactInfo.className =
109
+ utils.toClassName(this.artifactInfo.name) + 'Observer';
110
+ this.artifactInfo.fileName = utils.toFileName(this.artifactInfo.name);
111
+
112
+ Object.assign(this.artifactInfo, {
113
+ outFile: utils.getObserverFileName(this.artifactInfo.name),
114
+ });
115
+
116
+ const source = this.templatePath(this.artifactInfo.defaultTemplate);
117
+
118
+ const dest = this.destinationPath(
119
+ path.join(this.artifactInfo.outDir, this.artifactInfo.outFile),
120
+ );
121
+
122
+ debug(`artifactInfo: ${inspect(this.artifactInfo)}`);
123
+ debug(`Copying artifact to: ${dest}`);
124
+
125
+ this.copyTemplatedFiles(source, dest, this.artifactInfo);
126
+ return;
127
+ }
128
+
129
+ async end() {
130
+ await super.end();
131
+ }
132
+ };
@@ -0,0 +1,40 @@
1
+ import {
2
+ /* inject, Application, CoreBindings, */
3
+ lifeCycleObserver, // The decorator
4
+ LifeCycleObserver, // The interface
5
+ } from '@loopback/core';
6
+
7
+ /**
8
+ * This class will be bound to the application as a `LifeCycleObserver` during
9
+ * `boot`
10
+ */
11
+ @lifeCycleObserver('<%= group %>')
12
+ export class <%= className %> implements LifeCycleObserver {
13
+ /*
14
+ constructor(
15
+ @inject(CoreBindings.APPLICATION_INSTANCE) private app: Application,
16
+ ) {}
17
+ */
18
+
19
+ /**
20
+ * This method will be invoked when the application initializes. It will be
21
+ * called at most once for a given application instance.
22
+ */
23
+ async init(): Promise<void> {
24
+ // Add your logic for init
25
+ }
26
+
27
+ /**
28
+ * This method will be invoked when the application starts.
29
+ */
30
+ async start(): Promise<void> {
31
+ // Add your logic for start
32
+ }
33
+
34
+ /**
35
+ * This method will be invoked when the application stops.
36
+ */
37
+ async stop(): Promise<void> {
38
+ // Add your logic for stop
39
+ }
40
+ }
@@ -0,0 +1,211 @@
1
+ # lb4 openapi
2
+
3
+ The `openapi` command generates LoopBack 4 artifacts from an
4
+ [OpenAPI specification](https://github.com/OAI/OpenAPI-Specification), including
5
+ version 2.0 and 3.0.
6
+
7
+ ## Basic use
8
+
9
+ ```sh
10
+ Usage:
11
+ lb4 openapi [<url>] [options]
12
+
13
+ Options:
14
+ -h, --help # Print the generator's options and usage
15
+ --url # URL or file path of the OpenAPI spec
16
+ --validate # Validate the OpenAPI spec Default: false
17
+
18
+ Arguments:
19
+ url # URL or file path of the OpenAPI spec Type: String Required: false
20
+ ```
21
+
22
+ For example,
23
+
24
+ ```sh
25
+ lb4 openapi https://api.apis.guru/v2/specs/api2cart.com/1.0.0/swagger.json
26
+ ```
27
+
28
+ ## Mappings
29
+
30
+ We map OpenAPI operations by tag into `controllers` and schemas into `models` as
31
+ TypeScript classes or types.
32
+
33
+ ### Schemas
34
+
35
+ The generator first iterates through the `components.schemas` of the
36
+ specification document and maps them into TypeScript classes or types:
37
+
38
+ - Primitive types --> TypeScript type declaration
39
+
40
+ ```ts
41
+ export type Message = string;
42
+ ```
43
+
44
+ ```ts
45
+ export type OrderEnum = 'ascending' | 'descending';
46
+ ```
47
+
48
+ - Array types --> TypeScript type declaration
49
+
50
+ ```ts
51
+ import {Comment} from './comment.model';
52
+ export type Comments = Comment[];
53
+ ```
54
+
55
+ - Object type --> TypeScript class definition
56
+
57
+ ```ts
58
+ import {model, property} from '@loopback/repository';
59
+ import {CartShippingZone} from './cart-shipping-zone.model';
60
+ import {CartStoreInfo} from './cart-store-info.model';
61
+ import {CartWarehouse} from './cart-warehouse.model';
62
+
63
+ /**
64
+ * The model class is generated from OpenAPI schema - Cart
65
+ * Cart
66
+ */
67
+ @model({name: 'Cart'})
68
+ export class Cart {
69
+ constructor(data?: Partial<Cart>) {
70
+ if (data != null && typeof data === 'object') {
71
+ Object.assign(this, data);
72
+ }
73
+ }
74
+
75
+ @property({name: 'additional_fields'})
76
+ additional_fields?: {};
77
+
78
+ @property({name: 'custom_fields'})
79
+ custom_fields?: {};
80
+
81
+ @property({name: 'db_prefix'})
82
+ db_prefix?: string;
83
+
84
+ @property({name: 'name'})
85
+ name?: string;
86
+
87
+ @property({name: 'shipping_zones'})
88
+ shipping_zones?: CartShippingZone[];
89
+
90
+ @property({name: 'stores_info'})
91
+ stores_info?: CartStoreInfo[];
92
+
93
+ @property({name: 'url'})
94
+ url?: string;
95
+
96
+ @property({name: 'version'})
97
+ version?: string;
98
+
99
+ @property({name: 'warehouses'})
100
+ warehouses?: CartWarehouse[];
101
+ }
102
+ ```
103
+
104
+ - Composite type (anyOf|oneOf|allOf) --> TypeScript union/intersection types
105
+
106
+ ```ts
107
+ export type IdType = string | number;
108
+ ```
109
+
110
+ ```ts
111
+ import {NewPet} from './new-pet.model.ts';
112
+ export type Pet = NewPet & {id: number};
113
+ ```
114
+
115
+ Embedded schemas are mapped to TypeScript type literals.
116
+
117
+ ### Operations
118
+
119
+ The generator groups operations (`paths.<path>.<verb>`) by tags. If no tag is
120
+ present, it defaults to `OpenApi`. For each tag, a controller class is generated
121
+ to hold all operations with the same tag.
122
+
123
+ ```ts
124
+ import {operation, param} from '@loopback/rest';
125
+ import {DateTime} from '../models/date-time.model';
126
+
127
+ /**
128
+ * The controller class is generated from OpenAPI spec with operations tagged
129
+ * by account
130
+ *
131
+ */
132
+ export class AccountController {
133
+ constructor() {}
134
+
135
+ /**
136
+ * Get list of carts.
137
+ */
138
+ @operation('get', '/account.cart.list.json')
139
+ async accountCartList(
140
+ @param({name: 'params', in: 'query'}) params: string,
141
+ @param({name: 'exclude', in: 'query'}) exclude: string,
142
+ @param({name: 'request_from_date', in: 'query'}) request_from_date: string,
143
+ @param({name: 'request_to_date', in: 'query'}) request_to_date: string,
144
+ ): Promise<{
145
+ result?: {
146
+ carts?: {
147
+ cart_id?: string;
148
+ id?: string;
149
+ store_key?: string;
150
+ total_calls?: string;
151
+ url?: string;
152
+ }[];
153
+ carts_count?: number;
154
+ };
155
+ return_code?: number;
156
+ return_message?: string;
157
+ }> {
158
+ throw new Error('Not implemented');
159
+ }
160
+
161
+ /**
162
+ * Update configs in the API2Cart database.
163
+ */
164
+ @operation('put', '/account.config.update.json')
165
+ async accountConfigUpdate(
166
+ @param({name: 'db_tables_prefix', in: 'query'}) db_tables_prefix: string,
167
+ @param({name: 'client_id', in: 'query'}) client_id: string,
168
+ @param({name: 'bridge_url', in: 'query'}) bridge_url: string,
169
+ @param({name: 'store_root', in: 'query'}) store_root: string,
170
+ @param({name: 'shared_secret', in: 'query'}) shared_secret: string,
171
+ ): Promise<{
172
+ result?: {
173
+ updated_items?: number;
174
+ };
175
+ return_code?: number;
176
+ return_message?: string;
177
+ }> {
178
+ throw new Error('Not implemented');
179
+ }
180
+
181
+ /**
182
+ * List webhooks that was not delivered to the callback.
183
+ */
184
+ @operation('get', '/account.failed_webhooks.json')
185
+ async accountFailedWebhooks(
186
+ @param({name: 'count', in: 'query'}) count: number,
187
+ @param({name: 'start', in: 'query'}) start: number,
188
+ @param({name: 'ids', in: 'query'}) ids: string,
189
+ ): Promise<{
190
+ result?: {
191
+ all_failed_webhook?: string;
192
+ webhook?: {
193
+ entity_id?: string;
194
+ time?: DateTime;
195
+ webhook_id?: number;
196
+ }[];
197
+ };
198
+ return_code?: number;
199
+ return_message?: string;
200
+ }> {
201
+ throw new Error('Not implemented');
202
+ }
203
+ }
204
+ ```
205
+
206
+ ## OpenAPI Examples
207
+
208
+ - https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore-expanded.yaml
209
+ - https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/uspto.yaml
210
+ - https://api.apis.guru/v2/specs/api2cart.com/1.0.0/swagger.json
211
+ - https://api.apis.guru/v2/specs/amazonaws.com/codecommit/2015-04-13/swagger.json