@remkoj/optimizely-cms-api 6.0.0-pre4 → 6.0.0-pre5

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.
@@ -57,6 +57,7 @@ declare class BaseApiClient {
57
57
  * @returns The version information from the running instance
58
58
  */
59
59
  getInstanceInfo(): Promise<InstanceApiVersionInfo>;
60
+ getOpenApiSpec(): Promise<any>;
60
61
  protected createClientConfig: CreateClientConfig;
61
62
  }
62
63
  export declare class ApiError extends Error {
@@ -156,6 +156,14 @@ class BaseApiClient {
156
156
  return result.data;
157
157
  throw new ApiError(result);
158
158
  }
159
+ async getOpenApiSpec() {
160
+ const result = await this._client.get({
161
+ url: '/docs/content-openapi.json'
162
+ });
163
+ if (result.data)
164
+ return result.data;
165
+ throw new ApiError(result);
166
+ }
159
167
  createClientConfig = (override) => {
160
168
  return {
161
169
  ...override,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@remkoj/optimizely-cms-api",
3
3
  "displayName": "Optimizely CMS - Integration API Client",
4
4
  "description": "A Javascript client for the Integration API provided by the Optimizely CMS.",
5
- "version": "6.0.0-pre4",
5
+ "version": "6.0.0-pre5",
6
6
  "type": "commonjs",
7
7
  "license": "Apache-2.0",
8
8
  "main": "./dist/index.js",