@remkoj/optimizely-cms-api 4.3.1 → 5.0.0
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 +0 -2
- package/dist/client/CmsIntegrationApiClient.js +0 -2
- package/dist/client/index.d.ts +0 -7
- package/dist/client/index.js +1 -3
- package/dist/client/models/ContentType.d.ts +1 -1
- package/dist/version.json +2 -2
- package/package.json +4 -4
- package/dist/client/models/ImportPackageMessage.d.ts +0 -17
- package/dist/client/models/ImportPackageMessage.js +0 -2
- package/dist/client/models/ImportPackageResult.d.ts +0 -22
- package/dist/client/models/ImportPackageResult.js +0 -2
- package/dist/client/models/Manifest.d.ts +0 -24
- package/dist/client/models/Manifest.js +0 -2
- package/dist/client/models/PackageJob.d.ts +0 -28
- package/dist/client/models/PackageJob.js +0 -2
- package/dist/client/models/PackageJobMessage.d.ts +0 -17
- package/dist/client/models/PackageJobMessage.js +0 -2
- package/dist/client/models/PackageJobStatus.d.ts +0 -4
- package/dist/client/models/PackageJobStatus.js +0 -2
- package/dist/client/services/PackagesService.d.ts +0 -41
- package/dist/client/services/PackagesService.js +0 -80
|
@@ -5,7 +5,6 @@ import { ContentService } from './services/ContentService';
|
|
|
5
5
|
import { ContentTypesService } from './services/ContentTypesService';
|
|
6
6
|
import { DisplayTemplatesService } from './services/DisplayTemplatesService';
|
|
7
7
|
import { OauthService } from './services/OauthService';
|
|
8
|
-
import { PackagesService } from './services/PackagesService';
|
|
9
8
|
import { PropertyFormatsService } from './services/PropertyFormatsService';
|
|
10
9
|
import { PropertyGroupsService } from './services/PropertyGroupsService';
|
|
11
10
|
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
|
|
@@ -15,7 +14,6 @@ export declare class CmsIntegrationApiClient {
|
|
|
15
14
|
readonly contentTypes: ContentTypesService;
|
|
16
15
|
readonly displayTemplates: DisplayTemplatesService;
|
|
17
16
|
readonly oauth: OauthService;
|
|
18
|
-
readonly packages: PackagesService;
|
|
19
17
|
readonly propertyFormats: PropertyFormatsService;
|
|
20
18
|
readonly propertyGroups: PropertyGroupsService;
|
|
21
19
|
readonly request: BaseHttpRequest;
|
|
@@ -7,7 +7,6 @@ const ContentService_1 = require("./services/ContentService");
|
|
|
7
7
|
const ContentTypesService_1 = require("./services/ContentTypesService");
|
|
8
8
|
const DisplayTemplatesService_1 = require("./services/DisplayTemplatesService");
|
|
9
9
|
const OauthService_1 = require("./services/OauthService");
|
|
10
|
-
const PackagesService_1 = require("./services/PackagesService");
|
|
11
10
|
const PropertyFormatsService_1 = require("./services/PropertyFormatsService");
|
|
12
11
|
const PropertyGroupsService_1 = require("./services/PropertyGroupsService");
|
|
13
12
|
class CmsIntegrationApiClient {
|
|
@@ -28,7 +27,6 @@ class CmsIntegrationApiClient {
|
|
|
28
27
|
this.contentTypes = new ContentTypesService_1.ContentTypesService(this.request);
|
|
29
28
|
this.displayTemplates = new DisplayTemplatesService_1.DisplayTemplatesService(this.request);
|
|
30
29
|
this.oauth = new OauthService_1.OauthService(this.request);
|
|
31
|
-
this.packages = new PackagesService_1.PackagesService(this.request);
|
|
32
30
|
this.propertyFormats = new PropertyFormatsService_1.PropertyFormatsService(this.request);
|
|
33
31
|
this.propertyGroups = new PropertyGroupsService_1.PropertyGroupsService(this.request);
|
|
34
32
|
}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -44,8 +44,6 @@ export type { DoubleEnumerationValue } from './models/DoubleEnumerationValue';
|
|
|
44
44
|
export type { FloatListItem } from './models/FloatListItem';
|
|
45
45
|
export type { FloatProperty } from './models/FloatProperty';
|
|
46
46
|
export type { ImageDescriptor } from './models/ImageDescriptor';
|
|
47
|
-
export type { ImportPackageMessage } from './models/ImportPackageMessage';
|
|
48
|
-
export type { ImportPackageResult } from './models/ImportPackageResult';
|
|
49
47
|
export { IndexingType } from './models/IndexingType';
|
|
50
48
|
export type { Int32EnumerationSettings } from './models/Int32EnumerationSettings';
|
|
51
49
|
export type { Int32EnumerationValue } from './models/Int32EnumerationValue';
|
|
@@ -55,13 +53,9 @@ export type { JsonStringProperty } from './models/JsonStringProperty';
|
|
|
55
53
|
export type { ListProperty } from './models/ListProperty';
|
|
56
54
|
export type { ListPropertyItem } from './models/ListPropertyItem';
|
|
57
55
|
export { LocaleStatus } from './models/LocaleStatus';
|
|
58
|
-
export type { Manifest } from './models/Manifest';
|
|
59
56
|
export type { OauthToken } from './models/OauthToken';
|
|
60
57
|
export type { OauthTokenError } from './models/OauthTokenError';
|
|
61
58
|
export type { OauthTokenRequest } from './models/OauthTokenRequest';
|
|
62
|
-
export type { PackageJob } from './models/PackageJob';
|
|
63
|
-
export type { PackageJobMessage } from './models/PackageJobMessage';
|
|
64
|
-
export type { PackageJobStatus } from './models/PackageJobStatus';
|
|
65
59
|
export type { ProblemDetails } from './models/ProblemDetails';
|
|
66
60
|
export { PropertyDataType } from './models/PropertyDataType';
|
|
67
61
|
export type { PropertyFormat } from './models/PropertyFormat';
|
|
@@ -80,6 +74,5 @@ export { ContentService } from './services/ContentService';
|
|
|
80
74
|
export { ContentTypesService } from './services/ContentTypesService';
|
|
81
75
|
export { DisplayTemplatesService } from './services/DisplayTemplatesService';
|
|
82
76
|
export { OauthService } from './services/OauthService';
|
|
83
|
-
export { PackagesService } from './services/PackagesService';
|
|
84
77
|
export { PropertyFormatsService } from './services/PropertyFormatsService';
|
|
85
78
|
export { PropertyGroupsService } from './services/PropertyGroupsService';
|
package/dist/client/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PropertyGroupsService = exports.PropertyFormatsService = exports.
|
|
3
|
+
exports.PropertyGroupsService = exports.PropertyFormatsService = exports.OauthService = exports.DisplayTemplatesService = exports.ContentTypesService = exports.ContentService = exports.ChangesetsService = exports.VersionStatus = exports.PropertyDataType = exports.LocaleStatus = exports.IndexingType = exports.ContentTypeUsage = exports.ContentTypeFeature = exports.ContentBaseType = exports.CompositionBehavior = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.CmsIntegrationApiClient = void 0;
|
|
4
4
|
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
5
|
/* istanbul ignore file */
|
|
6
6
|
/* tslint:disable */
|
|
@@ -42,8 +42,6 @@ var DisplayTemplatesService_1 = require("./services/DisplayTemplatesService");
|
|
|
42
42
|
Object.defineProperty(exports, "DisplayTemplatesService", { enumerable: true, get: function () { return DisplayTemplatesService_1.DisplayTemplatesService; } });
|
|
43
43
|
var OauthService_1 = require("./services/OauthService");
|
|
44
44
|
Object.defineProperty(exports, "OauthService", { enumerable: true, get: function () { return OauthService_1.OauthService; } });
|
|
45
|
-
var PackagesService_1 = require("./services/PackagesService");
|
|
46
|
-
Object.defineProperty(exports, "PackagesService", { enumerable: true, get: function () { return PackagesService_1.PackagesService; } });
|
|
47
45
|
var PropertyFormatsService_1 = require("./services/PropertyFormatsService");
|
|
48
46
|
Object.defineProperty(exports, "PropertyFormatsService", { enumerable: true, get: function () { return PropertyFormatsService_1.PropertyFormatsService; } });
|
|
49
47
|
var PropertyGroupsService_1 = require("./services/PropertyGroupsService");
|
package/dist/version.json
CHANGED
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": "
|
|
5
|
+
"version": "5.0.0",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"main": "./dist/index.js",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"./dist"
|
|
12
12
|
],
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@types/node": "^22.
|
|
15
|
-
"dotenv": "^16.
|
|
14
|
+
"@types/node": "^22.14.1",
|
|
15
|
+
"dotenv": "^16.5.0",
|
|
16
16
|
"glob": "^11.0.1",
|
|
17
17
|
"openapi-typescript-codegen": "^0.29.0",
|
|
18
18
|
"tslib": "^2.8.1",
|
|
19
|
-
"typescript": "^5.
|
|
19
|
+
"typescript": "^5.8.3"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"clean": "tsc --build --clean",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Describes a message from a package importing operation.
|
|
3
|
-
*/
|
|
4
|
-
export type ImportPackageMessage = {
|
|
5
|
-
/**
|
|
6
|
-
* The section where the message originated from.
|
|
7
|
-
*/
|
|
8
|
-
readonly section?: string | null;
|
|
9
|
-
/**
|
|
10
|
-
* The message describing an outcome.
|
|
11
|
-
*/
|
|
12
|
-
readonly message?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The identifier of the resource that was the reason for this message to be created.
|
|
15
|
-
*/
|
|
16
|
-
readonly identifier?: string | null;
|
|
17
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ImportPackageMessage } from './ImportPackageMessage';
|
|
2
|
-
/**
|
|
3
|
-
* Describes the result of a data package import.
|
|
4
|
-
*/
|
|
5
|
-
export type ImportPackageResult = {
|
|
6
|
-
/**
|
|
7
|
-
* Indication if the import succeeded.
|
|
8
|
-
*/
|
|
9
|
-
readonly success?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* List of messages describing the outcome from the package import.
|
|
12
|
-
*/
|
|
13
|
-
outcomes?: Array<ImportPackageMessage>;
|
|
14
|
-
/**
|
|
15
|
-
* List of error messages from the package import.
|
|
16
|
-
*/
|
|
17
|
-
errors?: Array<ImportPackageMessage>;
|
|
18
|
-
/**
|
|
19
|
-
* List of warning messages from the package import.
|
|
20
|
-
*/
|
|
21
|
-
warnings?: Array<ImportPackageMessage>;
|
|
22
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ContentType } from './ContentType';
|
|
2
|
-
import type { DisplayTemplate } from './DisplayTemplate';
|
|
3
|
-
import type { PropertyGroup } from './PropertyGroup';
|
|
4
|
-
/**
|
|
5
|
-
* Manifest that describe CMS definitions.
|
|
6
|
-
*/
|
|
7
|
-
export type Manifest = {
|
|
8
|
-
/**
|
|
9
|
-
* List of content type property groups that are part of this manifest.
|
|
10
|
-
*/
|
|
11
|
-
propertyGroups?: Array<PropertyGroup>;
|
|
12
|
-
/**
|
|
13
|
-
* List of content types that are part of this manifest.
|
|
14
|
-
*/
|
|
15
|
-
contentTypes?: Array<ContentType>;
|
|
16
|
-
/**
|
|
17
|
-
* List of display templates that are part of this manifest.
|
|
18
|
-
*/
|
|
19
|
-
displayTemplates?: Array<DisplayTemplate>;
|
|
20
|
-
/**
|
|
21
|
-
* A timestamp indicated when any item in this manifest was last modified.
|
|
22
|
-
*/
|
|
23
|
-
readonly lastModified?: string;
|
|
24
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { PackageJobMessage } from './PackageJobMessage';
|
|
2
|
-
import type { PackageJobStatus } from './PackageJobStatus';
|
|
3
|
-
/**
|
|
4
|
-
* Describes the status of a package job.
|
|
5
|
-
*/
|
|
6
|
-
export type PackageJob = {
|
|
7
|
-
/**
|
|
8
|
-
* An unique key that can be used to track the staus of a package job.
|
|
9
|
-
*/
|
|
10
|
-
readonly key?: string;
|
|
11
|
-
status?: PackageJobStatus;
|
|
12
|
-
/**
|
|
13
|
-
* List of messages describing the outcome from the package job.
|
|
14
|
-
*/
|
|
15
|
-
outcomes?: Array<PackageJobMessage>;
|
|
16
|
-
/**
|
|
17
|
-
* List of error messages from the package job.
|
|
18
|
-
*/
|
|
19
|
-
errors?: Array<PackageJobMessage>;
|
|
20
|
-
/**
|
|
21
|
-
* List of warning messages from the package job.
|
|
22
|
-
*/
|
|
23
|
-
warnings?: Array<PackageJobMessage>;
|
|
24
|
-
/**
|
|
25
|
-
* A timestamp indicates when this task was first created.
|
|
26
|
-
*/
|
|
27
|
-
readonly created?: string;
|
|
28
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Describes a status message from a package job.
|
|
3
|
-
*/
|
|
4
|
-
export type PackageJobMessage = {
|
|
5
|
-
/**
|
|
6
|
-
* The section where the message originated from.
|
|
7
|
-
*/
|
|
8
|
-
readonly section?: string;
|
|
9
|
-
/**
|
|
10
|
-
* The message describing an outcome.
|
|
11
|
-
*/
|
|
12
|
-
readonly message?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The identifier of the resource that was the reason for this message to be created.
|
|
15
|
-
*/
|
|
16
|
-
readonly identifier?: string | null;
|
|
17
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ImportPackageResult } from '../models/ImportPackageResult';
|
|
2
|
-
import type { Manifest } from '../models/Manifest';
|
|
3
|
-
import type { PackageJob } from '../models/PackageJob';
|
|
4
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
|
-
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
6
|
-
export declare class PackagesService {
|
|
7
|
-
readonly httpRequest: BaseHttpRequest;
|
|
8
|
-
constructor(httpRequest: BaseHttpRequest);
|
|
9
|
-
/**
|
|
10
|
-
* Get job status
|
|
11
|
-
* Get a package job status.
|
|
12
|
-
* @param key The key of the package job.
|
|
13
|
-
* @returns PackageJob OK
|
|
14
|
-
* @throws ApiError
|
|
15
|
-
*/
|
|
16
|
-
packagesGet(key: string): CancelablePromise<PackageJob>;
|
|
17
|
-
/**
|
|
18
|
-
* Export package
|
|
19
|
-
* Export a data package.
|
|
20
|
-
* @param includeReadOnly Indicates if read-only resources should be included in the export data.
|
|
21
|
-
* @returns Manifest OK
|
|
22
|
-
* @throws ApiError
|
|
23
|
-
*/
|
|
24
|
-
packagesExport(includeReadOnly?: boolean): CancelablePromise<Manifest>;
|
|
25
|
-
/**
|
|
26
|
-
* Import package
|
|
27
|
-
* Import a data package.
|
|
28
|
-
* @param container The key of the container content where new content items should be created under.
|
|
29
|
-
* @param overwriteExistingContentItems Indicates if the existing content item in CMS could be overwritten when the importing package contains
|
|
30
|
-
* content item with the same key.
|
|
31
|
-
* If set to `false`, always create new content item under the specified container regardless of the content key.
|
|
32
|
-
* @param ignoreDataLossWarnings Updates the content type even though the changes might result in data loss.
|
|
33
|
-
* @param locale Specifies the locale in which content item in that locale will be imported. If no locale is defined
|
|
34
|
-
* then content in all locales are imported.
|
|
35
|
-
* @param requestBody
|
|
36
|
-
* @returns ImportPackageResult OK
|
|
37
|
-
* @returns PackageJob Accepted
|
|
38
|
-
* @throws ApiError
|
|
39
|
-
*/
|
|
40
|
-
packagesImport(container?: string, overwriteExistingContentItems?: boolean, ignoreDataLossWarnings?: boolean, locale?: string, requestBody?: Blob): CancelablePromise<ImportPackageResult | PackageJob>;
|
|
41
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PackagesService = void 0;
|
|
4
|
-
class PackagesService {
|
|
5
|
-
constructor(httpRequest) {
|
|
6
|
-
this.httpRequest = httpRequest;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Get job status
|
|
10
|
-
* Get a package job status.
|
|
11
|
-
* @param key The key of the package job.
|
|
12
|
-
* @returns PackageJob OK
|
|
13
|
-
* @throws ApiError
|
|
14
|
-
*/
|
|
15
|
-
packagesGet(key) {
|
|
16
|
-
return this.httpRequest.request({
|
|
17
|
-
method: 'GET',
|
|
18
|
-
url: '/packages/{key}',
|
|
19
|
-
path: {
|
|
20
|
-
'key': key,
|
|
21
|
-
},
|
|
22
|
-
errors: {
|
|
23
|
-
403: `Forbidden`,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Export package
|
|
29
|
-
* Export a data package.
|
|
30
|
-
* @param includeReadOnly Indicates if read-only resources should be included in the export data.
|
|
31
|
-
* @returns Manifest OK
|
|
32
|
-
* @throws ApiError
|
|
33
|
-
*/
|
|
34
|
-
packagesExport(includeReadOnly) {
|
|
35
|
-
return this.httpRequest.request({
|
|
36
|
-
method: 'GET',
|
|
37
|
-
url: '/packages',
|
|
38
|
-
query: {
|
|
39
|
-
'includeReadOnly': includeReadOnly,
|
|
40
|
-
},
|
|
41
|
-
errors: {
|
|
42
|
-
403: `Forbidden`,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Import package
|
|
48
|
-
* Import a data package.
|
|
49
|
-
* @param container The key of the container content where new content items should be created under.
|
|
50
|
-
* @param overwriteExistingContentItems Indicates if the existing content item in CMS could be overwritten when the importing package contains
|
|
51
|
-
* content item with the same key.
|
|
52
|
-
* If set to `false`, always create new content item under the specified container regardless of the content key.
|
|
53
|
-
* @param ignoreDataLossWarnings Updates the content type even though the changes might result in data loss.
|
|
54
|
-
* @param locale Specifies the locale in which content item in that locale will be imported. If no locale is defined
|
|
55
|
-
* then content in all locales are imported.
|
|
56
|
-
* @param requestBody
|
|
57
|
-
* @returns ImportPackageResult OK
|
|
58
|
-
* @returns PackageJob Accepted
|
|
59
|
-
* @throws ApiError
|
|
60
|
-
*/
|
|
61
|
-
packagesImport(container, overwriteExistingContentItems = false, ignoreDataLossWarnings = false, locale, requestBody) {
|
|
62
|
-
return this.httpRequest.request({
|
|
63
|
-
method: 'POST',
|
|
64
|
-
url: '/packages',
|
|
65
|
-
query: {
|
|
66
|
-
'container': container,
|
|
67
|
-
'overwriteExistingContentItems': overwriteExistingContentItems,
|
|
68
|
-
'ignoreDataLossWarnings': ignoreDataLossWarnings,
|
|
69
|
-
'locale': locale,
|
|
70
|
-
},
|
|
71
|
-
body: requestBody,
|
|
72
|
-
mediaType: 'application/vnd.episerver.cms.data',
|
|
73
|
-
errors: {
|
|
74
|
-
400: `Bad Request`,
|
|
75
|
-
403: `Forbidden`,
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.PackagesService = PackagesService;
|