@remkoj/optimizely-cms-api 2.0.0-pre2 → 2.0.0-pre3
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/dist/client/CmsIntegrationApiClient.d.ts +22 -22
- package/dist/client/core/ApiError.d.ts +10 -10
- package/dist/client/core/ApiRequestOptions.d.ts +13 -13
- package/dist/client/core/ApiResult.d.ts +7 -7
- package/dist/client/core/BaseHttpRequest.d.ts +8 -8
- package/dist/client/core/CancelablePromise.d.ts +20 -20
- package/dist/client/core/FetchHttpRequest.d.ts +14 -14
- package/dist/client/core/OpenAPI.d.ts +16 -16
- package/dist/client/core/request.d.ts +30 -30
- package/dist/client/index.d.ts +76 -76
- package/dist/client/models/BinaryProperty.d.ts +8 -8
- package/dist/client/models/BooleanProperty.d.ts +5 -5
- package/dist/client/models/Changeset.d.ts +26 -26
- package/dist/client/models/ChangesetItem.d.ts +11 -11
- package/dist/client/models/ChangesetItemPage.d.ts +19 -19
- package/dist/client/models/ChangesetPage.d.ts +19 -19
- package/dist/client/models/ComponentListItem.d.ts +10 -10
- package/dist/client/models/ComponentProperty.d.ts +10 -10
- package/dist/client/models/ContentBaseType.d.ts +11 -11
- package/dist/client/models/ContentComponent.d.ts +34 -34
- package/dist/client/models/ContentItem.d.ts +60 -60
- package/dist/client/models/ContentItemListWithContentTypes.d.ts +27 -27
- package/dist/client/models/ContentItemPage.d.ts +19 -19
- package/dist/client/models/ContentItemWithContentTypes.d.ts +12 -12
- package/dist/client/models/ContentListItem.d.ts +14 -14
- package/dist/client/models/ContentLocaleInfo.d.ts +11 -11
- package/dist/client/models/ContentMetadata.d.ts +46 -46
- package/dist/client/models/ContentMetadataPage.d.ts +19 -19
- package/dist/client/models/ContentProperty.d.ts +14 -14
- package/dist/client/models/ContentReference.d.ts +17 -17
- package/dist/client/models/ContentReferenceListItem.d.ts +14 -14
- package/dist/client/models/ContentReferenceProperty.d.ts +14 -14
- package/dist/client/models/ContentType.d.ts +79 -79
- package/dist/client/models/ContentTypeFeature.d.ts +10 -10
- package/dist/client/models/ContentTypePage.d.ts +19 -19
- package/dist/client/models/ContentTypeProperty.d.ts +47 -47
- package/dist/client/models/ContentTypeUsage.d.ts +7 -7
- package/dist/client/models/CopyContentOptions.d.ts +21 -21
- package/dist/client/models/DateTimeListItem.d.ts +14 -14
- package/dist/client/models/DateTimeProperty.d.ts +14 -14
- package/dist/client/models/DoubleEnumerationSettings.d.ts +9 -9
- package/dist/client/models/FloatListItem.d.ts +16 -16
- package/dist/client/models/FloatProperty.d.ts +16 -16
- package/dist/client/models/ImageDescriptor.d.ts +17 -17
- package/dist/client/models/ImportPackageMessage.d.ts +17 -17
- package/dist/client/models/ImportPackageResult.d.ts +22 -22
- package/dist/client/models/IndexingType.d.ts +8 -8
- package/dist/client/models/Int32EnumerationSettings.d.ts +9 -9
- package/dist/client/models/IntegerListItem.d.ts +16 -16
- package/dist/client/models/IntegerProperty.d.ts +16 -16
- package/dist/client/models/JsonStringProperty.d.ts +5 -5
- package/dist/client/models/ListProperty.d.ts +26 -26
- package/dist/client/models/ListPropertyItem.d.ts +11 -11
- package/dist/client/models/LocaleStatus.d.ts +7 -7
- package/dist/client/models/Manifest.d.ts +19 -19
- package/dist/client/models/OauthToken.d.ts +18 -18
- package/dist/client/models/OauthTokenError.d.ts +13 -13
- package/dist/client/models/OauthTokenRequest.d.ts +21 -21
- package/dist/client/models/PackageJob.d.ts +28 -28
- package/dist/client/models/PackageJobMessage.d.ts +17 -17
- package/dist/client/models/PackageJobStatus.d.ts +4 -4
- package/dist/client/models/ProblemDetails.d.ts +1 -1
- package/dist/client/models/PropertyDataType.d.ts +18 -18
- package/dist/client/models/PropertyFormat.d.ts +34 -34
- package/dist/client/models/PropertyFormatPage.d.ts +19 -19
- package/dist/client/models/PropertyGroup.d.ts +21 -21
- package/dist/client/models/PropertyGroupPage.d.ts +19 -19
- package/dist/client/models/StringEnumerationSettings.d.ts +9 -9
- package/dist/client/models/StringListItem.d.ts +14 -14
- package/dist/client/models/StringProperty.d.ts +14 -14
- package/dist/client/models/UrlListItem.d.ts +5 -5
- package/dist/client/models/UrlProperty.d.ts +5 -5
- package/dist/client/models/VersionStatus.d.ts +12 -12
- package/dist/client/services/ChangesetsService.d.ts +105 -105
- package/dist/client/services/ContentService.d.ts +172 -172
- package/dist/client/services/ContentTypesService.d.ts +66 -66
- package/dist/client/services/OauthService.d.ts +17 -17
- package/dist/client/services/PackagesService.d.ts +41 -41
- package/dist/client/services/PropertyFormatsService.d.ts +26 -26
- package/dist/client/services/PropertyGroupsService.d.ts +61 -61
- package/dist/config.d.ts +7 -8
- package/dist/config.js +6 -3
- package/dist/index.d.ts +15 -15
- package/package.json +4 -3
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import type { PropertyFormat } from '../models/PropertyFormat';
|
|
2
|
-
import type { PropertyFormatPage } from '../models/PropertyFormatPage';
|
|
3
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
|
-
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
5
|
-
export declare class PropertyFormatsService {
|
|
6
|
-
readonly httpRequest: BaseHttpRequest;
|
|
7
|
-
constructor(httpRequest: BaseHttpRequest);
|
|
8
|
-
/**
|
|
9
|
-
* List property formats
|
|
10
|
-
* List all property formats using the provided options.
|
|
11
|
-
* @param pageIndex
|
|
12
|
-
* @param pageSize
|
|
13
|
-
* @returns PropertyFormatPage Success
|
|
14
|
-
* @throws ApiError
|
|
15
|
-
*/
|
|
16
|
-
propertyFormatsList(pageIndex?: number, pageSize?: number): CancelablePromise<PropertyFormatPage>;
|
|
17
|
-
/**
|
|
18
|
-
* Get property format
|
|
19
|
-
* Get the property format with the provided key.
|
|
20
|
-
* @param key The key of the property format to retrieve.
|
|
21
|
-
* @param allowDeleted Indicates that a deleted property format may be returned.
|
|
22
|
-
* @returns PropertyFormat Success
|
|
23
|
-
* @throws ApiError
|
|
24
|
-
*/
|
|
25
|
-
propertyFormatsGet(key: string, allowDeleted?: boolean): CancelablePromise<PropertyFormat>;
|
|
26
|
-
}
|
|
1
|
+
import type { PropertyFormat } from '../models/PropertyFormat';
|
|
2
|
+
import type { PropertyFormatPage } from '../models/PropertyFormatPage';
|
|
3
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
5
|
+
export declare class PropertyFormatsService {
|
|
6
|
+
readonly httpRequest: BaseHttpRequest;
|
|
7
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
8
|
+
/**
|
|
9
|
+
* List property formats
|
|
10
|
+
* List all property formats using the provided options.
|
|
11
|
+
* @param pageIndex
|
|
12
|
+
* @param pageSize
|
|
13
|
+
* @returns PropertyFormatPage Success
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
propertyFormatsList(pageIndex?: number, pageSize?: number): CancelablePromise<PropertyFormatPage>;
|
|
17
|
+
/**
|
|
18
|
+
* Get property format
|
|
19
|
+
* Get the property format with the provided key.
|
|
20
|
+
* @param key The key of the property format to retrieve.
|
|
21
|
+
* @param allowDeleted Indicates that a deleted property format may be returned.
|
|
22
|
+
* @returns PropertyFormat Success
|
|
23
|
+
* @throws ApiError
|
|
24
|
+
*/
|
|
25
|
+
propertyFormatsGet(key: string, allowDeleted?: boolean): CancelablePromise<PropertyFormat>;
|
|
26
|
+
}
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import type { PropertyGroup } from '../models/PropertyGroup';
|
|
2
|
-
import type { PropertyGroupPage } from '../models/PropertyGroupPage';
|
|
3
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
|
-
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
5
|
-
export declare class PropertyGroupsService {
|
|
6
|
-
readonly httpRequest: BaseHttpRequest;
|
|
7
|
-
constructor(httpRequest: BaseHttpRequest);
|
|
8
|
-
/**
|
|
9
|
-
* List property groups
|
|
10
|
-
* List property groups using the provided options.
|
|
11
|
-
* @param sources Indicates which property groups sources that should be listed.
|
|
12
|
-
* Use All to include groups from all sources or
|
|
13
|
-
* Default to include groups without a specific sources.
|
|
14
|
-
* @returns PropertyGroupPage Success
|
|
15
|
-
* @throws ApiError
|
|
16
|
-
*/
|
|
17
|
-
propertyGroupsList(sources?: Array<string>): CancelablePromise<PropertyGroupPage>;
|
|
18
|
-
/**
|
|
19
|
-
* Create property group
|
|
20
|
-
* Create a new property group.
|
|
21
|
-
* @param requestBody The property group that should be created.
|
|
22
|
-
* @returns PropertyGroup Success
|
|
23
|
-
* @throws ApiError
|
|
24
|
-
*/
|
|
25
|
-
propertyGroupsCreate(requestBody: PropertyGroup): CancelablePromise<PropertyGroup>;
|
|
26
|
-
/**
|
|
27
|
-
* Get property group
|
|
28
|
-
* Get the property group with the provided key.
|
|
29
|
-
* @param key The key of the property group to retrieve.
|
|
30
|
-
* @returns PropertyGroup Success
|
|
31
|
-
* @throws ApiError
|
|
32
|
-
*/
|
|
33
|
-
propertyGroupsGet(key: string): CancelablePromise<PropertyGroup>;
|
|
34
|
-
/**
|
|
35
|
-
* Create or replace property group
|
|
36
|
-
* Create or replace a property group. If a property group with the provided key exist it is replaced.
|
|
37
|
-
* Otherwise a new property group is created.
|
|
38
|
-
* @param key The key of the property group to update or create.
|
|
39
|
-
* @param requestBody The values of the created or replaced property group.
|
|
40
|
-
* @returns PropertyGroup Success
|
|
41
|
-
* @throws ApiError
|
|
42
|
-
*/
|
|
43
|
-
propertyGroupsPut(key: string, requestBody: PropertyGroup): CancelablePromise<PropertyGroup>;
|
|
44
|
-
/**
|
|
45
|
-
* Update property group
|
|
46
|
-
* Update an existing property group.
|
|
47
|
-
* @param key The key of the property group to patch.
|
|
48
|
-
* @param requestBody The values of the property group that should be updated.
|
|
49
|
-
* @returns PropertyGroup Success
|
|
50
|
-
* @throws ApiError
|
|
51
|
-
*/
|
|
52
|
-
propertyGroupsPatch(key: string, requestBody: PropertyGroup): CancelablePromise<PropertyGroup>;
|
|
53
|
-
/**
|
|
54
|
-
* Delete property group
|
|
55
|
-
* Deletes the property group with the provided key.
|
|
56
|
-
* @param key The key of the property group to delete.
|
|
57
|
-
* @returns PropertyGroup Success
|
|
58
|
-
* @throws ApiError
|
|
59
|
-
*/
|
|
60
|
-
propertyGroupsDelete(key: string): CancelablePromise<PropertyGroup>;
|
|
61
|
-
}
|
|
1
|
+
import type { PropertyGroup } from '../models/PropertyGroup';
|
|
2
|
+
import type { PropertyGroupPage } from '../models/PropertyGroupPage';
|
|
3
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
5
|
+
export declare class PropertyGroupsService {
|
|
6
|
+
readonly httpRequest: BaseHttpRequest;
|
|
7
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
8
|
+
/**
|
|
9
|
+
* List property groups
|
|
10
|
+
* List property groups using the provided options.
|
|
11
|
+
* @param sources Indicates which property groups sources that should be listed.
|
|
12
|
+
* Use All to include groups from all sources or
|
|
13
|
+
* Default to include groups without a specific sources.
|
|
14
|
+
* @returns PropertyGroupPage Success
|
|
15
|
+
* @throws ApiError
|
|
16
|
+
*/
|
|
17
|
+
propertyGroupsList(sources?: Array<string>): CancelablePromise<PropertyGroupPage>;
|
|
18
|
+
/**
|
|
19
|
+
* Create property group
|
|
20
|
+
* Create a new property group.
|
|
21
|
+
* @param requestBody The property group that should be created.
|
|
22
|
+
* @returns PropertyGroup Success
|
|
23
|
+
* @throws ApiError
|
|
24
|
+
*/
|
|
25
|
+
propertyGroupsCreate(requestBody: PropertyGroup): CancelablePromise<PropertyGroup>;
|
|
26
|
+
/**
|
|
27
|
+
* Get property group
|
|
28
|
+
* Get the property group with the provided key.
|
|
29
|
+
* @param key The key of the property group to retrieve.
|
|
30
|
+
* @returns PropertyGroup Success
|
|
31
|
+
* @throws ApiError
|
|
32
|
+
*/
|
|
33
|
+
propertyGroupsGet(key: string): CancelablePromise<PropertyGroup>;
|
|
34
|
+
/**
|
|
35
|
+
* Create or replace property group
|
|
36
|
+
* Create or replace a property group. If a property group with the provided key exist it is replaced.
|
|
37
|
+
* Otherwise a new property group is created.
|
|
38
|
+
* @param key The key of the property group to update or create.
|
|
39
|
+
* @param requestBody The values of the created or replaced property group.
|
|
40
|
+
* @returns PropertyGroup Success
|
|
41
|
+
* @throws ApiError
|
|
42
|
+
*/
|
|
43
|
+
propertyGroupsPut(key: string, requestBody: PropertyGroup): CancelablePromise<PropertyGroup>;
|
|
44
|
+
/**
|
|
45
|
+
* Update property group
|
|
46
|
+
* Update an existing property group.
|
|
47
|
+
* @param key The key of the property group to patch.
|
|
48
|
+
* @param requestBody The values of the property group that should be updated.
|
|
49
|
+
* @returns PropertyGroup Success
|
|
50
|
+
* @throws ApiError
|
|
51
|
+
*/
|
|
52
|
+
propertyGroupsPatch(key: string, requestBody: PropertyGroup): CancelablePromise<PropertyGroup>;
|
|
53
|
+
/**
|
|
54
|
+
* Delete property group
|
|
55
|
+
* Deletes the property group with the provided key.
|
|
56
|
+
* @param key The key of the property group to delete.
|
|
57
|
+
* @returns PropertyGroup Success
|
|
58
|
+
* @throws ApiError
|
|
59
|
+
*/
|
|
60
|
+
propertyGroupsDelete(key: string): CancelablePromise<PropertyGroup>;
|
|
61
|
+
}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export type CmsIntegrationApiOptions = {
|
|
2
|
-
base: URL;
|
|
3
|
-
clientId?: string;
|
|
4
|
-
clientSecret?: string;
|
|
5
|
-
actAs?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare
|
|
8
|
-
export declare function getCmsIntegrationApiConfigFromEnvironment(): CmsIntegrationApiOptions;
|
|
1
|
+
export type CmsIntegrationApiOptions = {
|
|
2
|
+
base: URL;
|
|
3
|
+
clientId?: string;
|
|
4
|
+
clientSecret?: string;
|
|
5
|
+
actAs?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function getCmsIntegrationApiConfigFromEnvironment(): CmsIntegrationApiOptions;
|
package/dist/config.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCmsIntegrationApiConfigFromEnvironment =
|
|
4
|
-
|
|
3
|
+
exports.getCmsIntegrationApiConfigFromEnvironment = void 0;
|
|
4
|
+
const OpenAPI_1 = require("./client/core/OpenAPI");
|
|
5
5
|
function getCmsIntegrationApiConfigFromEnvironment() {
|
|
6
6
|
const cmsUrl = getMandatory('OPTIMIZELY_CMS_URL');
|
|
7
7
|
const clientId = getMandatory('OPTIMIZELY_CMS_CLIENT_ID');
|
|
8
8
|
const clientSecret = getMandatory('OPTIMIZELY_CMS_CLIENT_SECRET');
|
|
9
9
|
const actAs = getOptional('OPTIMIZELY_CMS_USER_ID');
|
|
10
|
+
const debug = getOptional('OPTIMIZELY_DEBUG', "0") == "1";
|
|
10
11
|
let baseUrl;
|
|
11
12
|
try {
|
|
12
|
-
baseUrl = new URL(
|
|
13
|
+
baseUrl = new URL(OpenAPI_1.OpenAPI.BASE, cmsUrl);
|
|
13
14
|
}
|
|
14
15
|
catch {
|
|
15
16
|
throw new Error("Invalid URL provided");
|
|
16
17
|
}
|
|
18
|
+
if (debug)
|
|
19
|
+
console.log(`[Optimizely CMS API] Connecting to ${baseUrl} as ${clientId}`);
|
|
17
20
|
return {
|
|
18
21
|
base: baseUrl,
|
|
19
22
|
clientId,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from './config';
|
|
2
|
-
export * as IntegrationApi from './client';
|
|
3
|
-
export { CmsIntegrationApiClient } from './client';
|
|
4
|
-
import { type CmsIntegrationApiOptions } from './config';
|
|
5
|
-
import { CmsIntegrationApiClient } from './client';
|
|
6
|
-
export declare function getAccessToken(config?: CmsIntegrationApiOptions): Promise<string>;
|
|
7
|
-
export declare function createClient(config?: CmsIntegrationApiOptions): CmsIntegrationApiClient;
|
|
8
|
-
export declare enum ContentRoots {
|
|
9
|
-
SystemRoot = "43f936c99b234ea397b261c538ad07c9",
|
|
10
|
-
MultiChannelContent = "41118A415C8C4BE08E73520FF3DE8244"
|
|
11
|
-
}
|
|
12
|
-
export declare enum ContentTypeKeys {
|
|
13
|
-
Folder = "SysContentFolder"
|
|
14
|
-
}
|
|
15
|
-
export default createClient;
|
|
1
|
+
export * from './config';
|
|
2
|
+
export * as IntegrationApi from './client';
|
|
3
|
+
export { CmsIntegrationApiClient } from './client';
|
|
4
|
+
import { type CmsIntegrationApiOptions } from './config';
|
|
5
|
+
import { CmsIntegrationApiClient } from './client';
|
|
6
|
+
export declare function getAccessToken(config?: CmsIntegrationApiOptions): Promise<string>;
|
|
7
|
+
export declare function createClient(config?: CmsIntegrationApiOptions): CmsIntegrationApiClient;
|
|
8
|
+
export declare enum ContentRoots {
|
|
9
|
+
SystemRoot = "43f936c99b234ea397b261c538ad07c9",
|
|
10
|
+
MultiChannelContent = "41118A415C8C4BE08E73520FF3DE8244"
|
|
11
|
+
}
|
|
12
|
+
export declare enum ContentTypeKeys {
|
|
13
|
+
Folder = "SysContentFolder"
|
|
14
|
+
}
|
|
15
|
+
export default createClient;
|
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": "2.0.0-
|
|
5
|
+
"version": "2.0.0-pre3",
|
|
6
6
|
"packageManager": "yarn@4.1.1",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"license": "Apache-2.0",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"./dist"
|
|
13
13
|
],
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@types/node": "^20.12.
|
|
15
|
+
"@types/node": "^20.12.12",
|
|
16
16
|
"openapi-typescript-codegen": "^0.29.0",
|
|
17
17
|
"tslib": "^2.6.2",
|
|
18
18
|
"typescript": "^5.4.5"
|
|
@@ -23,5 +23,6 @@
|
|
|
23
23
|
"watch": "tsc --watch",
|
|
24
24
|
"rebuild": "tsc --build --clean && yarn generate-client && tsc --build --force",
|
|
25
25
|
"generate-client": "yarn openapi --input ./integrationapi.spec.json --output ./src/client --name CmsIntegrationApiClient"
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"stableVersion": "2.0.0-pre2"
|
|
27
28
|
}
|