@api-client/core 0.8.0 → 0.8.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.
- package/build/browser.d.ts +2 -1
- package/build/browser.js +1 -0
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +2 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/src/amf/AmfMixin.d.ts +2 -1
- package/build/src/amf/AmfMixin.js.map +1 -1
- package/build/src/lib/timers/Timers.d.ts +9 -0
- package/build/src/lib/timers/Timers.js +13 -0
- package/build/src/lib/timers/Timers.js.map +1 -1
- package/data/apis/amf-helper-api/amf-helper-api.raml +1024 -0
- package/data/apis/amf-helper-api/examples/comment-example.json +42 -0
- package/data/apis/amf-helper-api/examples/commentCreateRequest-example.json +7 -0
- package/data/apis/amf-helper-api/examples/commentList-example.json +48 -0
- package/data/apis/amf-helper-api/examples/person.json +14 -0
- package/data/apis/amf-helper-api/examples/person.raml +13 -0
- package/data/apis/amf-helper-api/examples/person.xml +14 -0
- package/data/apis/amf-helper-api/libraries/comment-lib.raml +143 -0
- package/data/apis/amf-helper-api/library.raml +7 -0
- package/data/apis/amf-helper-api/schemas/person.json +104 -0
- package/data/apis/amf-helper-api/schemas/person.xsd +26 -0
- package/data/apis/amf-helper-api/traits/file.raml +33 -0
- package/data/apis/amf-helper-api/traits/pagination.raml +80 -0
- package/data/apis/amf-helper-api/traits/results.raml +19 -0
- package/data/apis/amf-helper-api/traits/visibility.raml +14 -0
- package/data/apis/amf-helper-api/types/app-person.raml +101 -0
- package/data/apis/amf-helper-api/types/dimensions.raml +24 -0
- package/data/apis/amf-helper-api/types/external-type.raml +7 -0
- package/data/apis/amf-helper-api/types/image.raml +23 -0
- package/data/apis/amf-helper-api/types/product.raml +52 -0
- package/data/apis/amf-helper-api/types/resource.raml +11 -0
- package/data/apis/amf-helper-api/types/standard-request.raml +50 -0
- package/data/apis/amf-helper-api/types/user.raml +37 -0
- package/data/apis/async-api/async-api.yaml +96 -0
- package/data/apis/expanded-api/expanded-api.raml +8 -0
- package/data/apis/flattened-api/flattened-api.raml +8 -0
- package/data/apis/multiple-servers/multiple-servers.yaml +112 -0
- package/data/model.js +5 -0
- package/data/models/amf-helper-api.json +85908 -0
- package/data/models/async-api.json +3108 -0
- package/data/models/expanded-api.json +251 -0
- package/data/models/flattened-api.json +251 -0
- package/data/models/multiple-servers.json +2753 -0
- package/package.json +1 -1
- package/src/amf/AmfMixin.ts +3 -2
- package/src/lib/timers/Timers.ts +14 -0
package/package.json
CHANGED
package/src/amf/AmfMixin.ts
CHANGED
|
@@ -57,6 +57,7 @@ type Constructor<T = {}> = new (...args: any[]) => T;
|
|
|
57
57
|
|
|
58
58
|
export declare class AmfMixinInterface {
|
|
59
59
|
amf?: IAmfDocument;
|
|
60
|
+
_amf?: IAmfDocument;
|
|
60
61
|
/**
|
|
61
62
|
* This is an abstract method to be implemented by the components.
|
|
62
63
|
* If, instead, the component uses `amf` setter you must use `super.amf` to
|
|
@@ -254,7 +255,7 @@ export declare class AmfMixinInterface {
|
|
|
254
255
|
* to read servers
|
|
255
256
|
* @private
|
|
256
257
|
*/
|
|
257
|
-
_isValidServerPartial(model: IAmfDomainElement, context?: Record<string, string>): boolean;
|
|
258
|
+
_isValidServerPartial(model: IAmfDomainElement | IAmfDomainElement[], context?: Record<string, string>): boolean;
|
|
258
259
|
|
|
259
260
|
/**
|
|
260
261
|
* @param options Server query options
|
|
@@ -957,7 +958,7 @@ export const AmfMixin = <T extends Constructor<any>>(superClass: T): Constructor
|
|
|
957
958
|
* to read servers
|
|
958
959
|
* @private
|
|
959
960
|
*/
|
|
960
|
-
_isValidServerPartial(model: IAmfDomainElement, context?: Record<string, string>): boolean {
|
|
961
|
+
_isValidServerPartial(model: IAmfDomainElement | IAmfDomainElement[], context?: Record<string, string>): boolean {
|
|
961
962
|
if (Array.isArray(model)) {
|
|
962
963
|
[model] = model;
|
|
963
964
|
}
|
package/src/lib/timers/Timers.ts
CHANGED
|
@@ -7,3 +7,17 @@ export function sleep(timeout = 0): Promise<void> {
|
|
|
7
7
|
setTimeout(() => resolve(), timeout);
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Resolves after requestAnimationFrame.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* await nextFrame();
|
|
16
|
+
*
|
|
17
|
+
* @returns Promise that resolved after requestAnimationFrame
|
|
18
|
+
*/
|
|
19
|
+
export function nextFrame(): Promise<void> {
|
|
20
|
+
return new Promise(resolve => {
|
|
21
|
+
requestAnimationFrame(() => resolve());
|
|
22
|
+
});
|
|
23
|
+
}
|