@remkoj/optimizely-cms-api 5.2.0 → 5.3.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 (141) hide show
  1. package/dist/api-client.js +11 -7
  2. package/dist/client/CmsIntegrationApiClient.d.ts +2 -2
  3. package/dist/client/CmsIntegrationApiClient.js +4 -4
  4. package/dist/client/core/OpenAPI.js +2 -2
  5. package/dist/client/index.d.ts +14 -45
  6. package/dist/client/index.js +13 -19
  7. package/dist/client/models/ArrayItem.d.ts +70 -0
  8. package/dist/client/models/ArrayItem.js +25 -0
  9. package/dist/client/models/Blueprint.d.ts +24 -0
  10. package/dist/client/models/BlueprintData.d.ts +11 -0
  11. package/dist/client/models/BlueprintPage.d.ts +19 -0
  12. package/dist/client/models/Changeset.d.ts +3 -3
  13. package/dist/client/models/ChangesetItemPage.d.ts +1 -1
  14. package/dist/client/models/ChangesetPage.d.ts +1 -1
  15. package/dist/client/models/CompositionDisplaySettings.d.ts +13 -0
  16. package/dist/client/models/CompositionNode.d.ts +41 -0
  17. package/dist/client/models/ContentComponent.d.ts +8 -8
  18. package/dist/client/models/ContentItem.d.ts +28 -5
  19. package/dist/client/models/ContentItem.js +17 -0
  20. package/dist/client/models/ContentItemPage.d.ts +1 -1
  21. package/dist/client/models/ContentLocaleInfo.d.ts +13 -2
  22. package/dist/client/models/ContentLocaleInfo.js +12 -0
  23. package/dist/client/models/ContentMetadataPage.d.ts +1 -1
  24. package/dist/client/models/ContentType.d.ts +11 -36
  25. package/dist/client/models/ContentTypePage.d.ts +1 -1
  26. package/dist/client/models/ContentTypeProperty.d.ts +84 -8
  27. package/dist/client/models/ContentTypeProperty.js +34 -0
  28. package/dist/client/models/DisplayTemplate.d.ts +6 -5
  29. package/dist/client/models/DisplayTemplatePage.d.ts +1 -1
  30. package/dist/client/models/EnumerationValue.d.ts +13 -0
  31. package/dist/client/models/ImageDescriptor.d.ts +1 -1
  32. package/dist/client/models/Link.d.ts +21 -0
  33. package/dist/client/models/Preview.d.ts +13 -0
  34. package/dist/client/models/PropertyFormat.d.ts +60 -16
  35. package/dist/client/models/PropertyFormat.js +44 -0
  36. package/dist/client/models/PropertyFormatPage.d.ts +1 -1
  37. package/dist/client/models/PropertyGroup.d.ts +14 -1
  38. package/dist/client/models/PropertyGroupPage.d.ts +1 -1
  39. package/dist/client/services/BlueprintsService.d.ts +56 -0
  40. package/dist/client/services/BlueprintsService.js +135 -0
  41. package/dist/client/services/ChangesetsService.d.ts +32 -30
  42. package/dist/client/services/ChangesetsService.js +73 -60
  43. package/dist/client/services/ContentService.d.ts +46 -35
  44. package/dist/client/services/ContentService.js +100 -55
  45. package/dist/client/services/ContentTypesService.d.ts +17 -23
  46. package/dist/client/services/ContentTypesService.js +34 -41
  47. package/dist/client/services/DisplayTemplatesService.d.ts +14 -18
  48. package/dist/client/services/DisplayTemplatesService.js +31 -31
  49. package/dist/client/services/PropertyFormatsService.d.ts +3 -1
  50. package/dist/client/services/PropertyFormatsService.js +9 -1
  51. package/dist/client/services/PropertyGroupsService.d.ts +15 -20
  52. package/dist/client/services/PropertyGroupsService.js +32 -33
  53. package/dist/enums.d.ts +35 -0
  54. package/dist/enums.js +40 -0
  55. package/dist/getaccesstoken.js +4 -3
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +1 -0
  58. package/dist/version.json +3 -3
  59. package/package.json +2 -2
  60. package/dist/client/models/BinaryProperty.d.ts +0 -8
  61. package/dist/client/models/BooleanProperty.d.ts +0 -5
  62. package/dist/client/models/ComponentListItem.d.ts +0 -10
  63. package/dist/client/models/ComponentProperty.d.ts +0 -10
  64. package/dist/client/models/CompositionBehavior.d.ts +0 -7
  65. package/dist/client/models/CompositionBehavior.js +0 -15
  66. package/dist/client/models/ContentBaseType.d.ts +0 -14
  67. package/dist/client/models/ContentBaseType.js +0 -22
  68. package/dist/client/models/ContentItemListWithContentTypes.d.ts +0 -27
  69. package/dist/client/models/ContentItemWithContentTypes.d.ts +0 -12
  70. package/dist/client/models/ContentListItem.d.ts +0 -14
  71. package/dist/client/models/ContentProperty.d.ts +0 -14
  72. package/dist/client/models/ContentReferenceListItem.d.ts +0 -14
  73. package/dist/client/models/ContentReferenceListItem.js +0 -2
  74. package/dist/client/models/ContentReferenceProperty.d.ts +0 -14
  75. package/dist/client/models/ContentReferenceProperty.js +0 -2
  76. package/dist/client/models/ContentTypeFeature.d.ts +0 -10
  77. package/dist/client/models/ContentTypeFeature.js +0 -18
  78. package/dist/client/models/ContentTypeUsage.d.ts +0 -7
  79. package/dist/client/models/ContentTypeUsage.js +0 -15
  80. package/dist/client/models/DateTimeListItem.d.ts +0 -14
  81. package/dist/client/models/DateTimeListItem.js +0 -2
  82. package/dist/client/models/DateTimeProperty.d.ts +0 -14
  83. package/dist/client/models/DateTimeProperty.js +0 -2
  84. package/dist/client/models/DoubleEnumerationSettings.d.ts +0 -10
  85. package/dist/client/models/DoubleEnumerationSettings.js +0 -2
  86. package/dist/client/models/DoubleEnumerationValue.d.ts +0 -13
  87. package/dist/client/models/DoubleEnumerationValue.js +0 -2
  88. package/dist/client/models/FloatListItem.d.ts +0 -16
  89. package/dist/client/models/FloatListItem.js +0 -2
  90. package/dist/client/models/FloatProperty.d.ts +0 -16
  91. package/dist/client/models/FloatProperty.js +0 -2
  92. package/dist/client/models/IndexingType.d.ts +0 -8
  93. package/dist/client/models/IndexingType.js +0 -16
  94. package/dist/client/models/Int32EnumerationSettings.d.ts +0 -10
  95. package/dist/client/models/Int32EnumerationSettings.js +0 -2
  96. package/dist/client/models/Int32EnumerationValue.d.ts +0 -13
  97. package/dist/client/models/Int32EnumerationValue.js +0 -2
  98. package/dist/client/models/IntegerListItem.d.ts +0 -16
  99. package/dist/client/models/IntegerListItem.js +0 -2
  100. package/dist/client/models/IntegerProperty.d.ts +0 -16
  101. package/dist/client/models/IntegerProperty.js +0 -2
  102. package/dist/client/models/JsonStringProperty.d.ts +0 -5
  103. package/dist/client/models/JsonStringProperty.js +0 -2
  104. package/dist/client/models/ListProperty.d.ts +0 -26
  105. package/dist/client/models/ListProperty.js +0 -2
  106. package/dist/client/models/ListPropertyItem.d.ts +0 -11
  107. package/dist/client/models/ListPropertyItem.js +0 -2
  108. package/dist/client/models/LocaleStatus.d.ts +0 -7
  109. package/dist/client/models/LocaleStatus.js +0 -15
  110. package/dist/client/models/OauthToken.d.ts +0 -18
  111. package/dist/client/models/OauthToken.js +0 -2
  112. package/dist/client/models/OauthTokenError.d.ts +0 -13
  113. package/dist/client/models/OauthTokenError.js +0 -2
  114. package/dist/client/models/OauthTokenRequest.d.ts +0 -21
  115. package/dist/client/models/OauthTokenRequest.js +0 -2
  116. package/dist/client/models/PropertyDataType.d.ts +0 -18
  117. package/dist/client/models/PropertyDataType.js +0 -26
  118. package/dist/client/models/StringEnumerationSettings.d.ts +0 -10
  119. package/dist/client/models/StringEnumerationSettings.js +0 -2
  120. package/dist/client/models/StringEnumerationValue.d.ts +0 -13
  121. package/dist/client/models/StringEnumerationValue.js +0 -2
  122. package/dist/client/models/StringListItem.d.ts +0 -20
  123. package/dist/client/models/StringListItem.js +0 -2
  124. package/dist/client/models/StringProperty.d.ts +0 -20
  125. package/dist/client/models/StringProperty.js +0 -2
  126. package/dist/client/models/UrlListItem.d.ts +0 -5
  127. package/dist/client/models/UrlListItem.js +0 -2
  128. package/dist/client/models/UrlProperty.d.ts +0 -5
  129. package/dist/client/models/UrlProperty.js +0 -2
  130. package/dist/client/models/VersionStatus.d.ts +0 -12
  131. package/dist/client/models/VersionStatus.js +0 -20
  132. package/dist/client/services/OauthService.d.ts +0 -17
  133. package/dist/client/services/OauthService.js +0 -28
  134. /package/dist/client/models/{BinaryProperty.js → Blueprint.js} +0 -0
  135. /package/dist/client/models/{BooleanProperty.js → BlueprintData.js} +0 -0
  136. /package/dist/client/models/{ComponentListItem.js → BlueprintPage.js} +0 -0
  137. /package/dist/client/models/{ComponentProperty.js → CompositionDisplaySettings.js} +0 -0
  138. /package/dist/client/models/{ContentItemListWithContentTypes.js → CompositionNode.js} +0 -0
  139. /package/dist/client/models/{ContentItemWithContentTypes.js → EnumerationValue.js} +0 -0
  140. /package/dist/client/models/{ContentListItem.js → Link.js} +0 -0
  141. /package/dist/client/models/{ContentProperty.js → Preview.js} +0 -0
@@ -18,13 +18,18 @@ class ApiClient extends client_1.CmsIntegrationApiClient {
18
18
  */
19
19
  constructor(config) {
20
20
  const options = config ?? (0, config_1.getCmsIntegrationApiConfigFromEnvironment)();
21
- options.base = new URL(OpenAPI_1.OpenAPI.BASE, options.base);
22
- if (options.cmsVersion == types_1.OptiCmsVersion.CMS12)
23
- options.base.pathname = options.base.pathname.replace('preview2', 'preview1');
24
- const apiVersion = options.cmsVersion == types_1.OptiCmsVersion.CMS12 ? 'preview1' : OpenAPI_1.OpenAPI.VERSION;
21
+ let base = OpenAPI_1.OpenAPI.BASE;
22
+ let version = OpenAPI_1.OpenAPI.VERSION;
23
+ if (options.cmsVersion == types_1.OptiCmsVersion.CMS12) {
24
+ base = options.base.toString();
25
+ version = 'preview1';
26
+ if (options.debug)
27
+ console.info(`🚧 Switched to CMS 12 compatibility mode. Overridden Base URL ${base}, version: ${version}`);
28
+ }
25
29
  let access_token = undefined;
26
30
  super({
27
- BASE: options.base.href,
31
+ BASE: base,
32
+ VERSION: version,
28
33
  TOKEN: async () => {
29
34
  if (!access_token)
30
35
  access_token = await (0, getaccesstoken_1.getAccessToken)(options).catch(e => {
@@ -40,8 +45,7 @@ class ApiClient extends client_1.CmsIntegrationApiClient {
40
45
  Connection: "Close"
41
46
  },
42
47
  WITH_CREDENTIALS: true,
43
- CREDENTIALS: "include",
44
- VERSION: apiVersion
48
+ CREDENTIALS: "include"
45
49
  });
46
50
  this._config = options;
47
51
  }
@@ -1,19 +1,19 @@
1
1
  import type { BaseHttpRequest } from './core/BaseHttpRequest';
2
2
  import type { OpenAPIConfig } from './core/OpenAPI';
3
+ import { BlueprintsService } from './services/BlueprintsService';
3
4
  import { ChangesetsService } from './services/ChangesetsService';
4
5
  import { ContentService } from './services/ContentService';
5
6
  import { ContentTypesService } from './services/ContentTypesService';
6
7
  import { DisplayTemplatesService } from './services/DisplayTemplatesService';
7
- import { OauthService } from './services/OauthService';
8
8
  import { PropertyFormatsService } from './services/PropertyFormatsService';
9
9
  import { PropertyGroupsService } from './services/PropertyGroupsService';
10
10
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
11
11
  export declare class CmsIntegrationApiClient {
12
+ readonly blueprints: BlueprintsService;
12
13
  readonly changesets: ChangesetsService;
13
14
  readonly content: ContentService;
14
15
  readonly contentTypes: ContentTypesService;
15
16
  readonly displayTemplates: DisplayTemplatesService;
16
- readonly oauth: OauthService;
17
17
  readonly propertyFormats: PropertyFormatsService;
18
18
  readonly propertyGroups: PropertyGroupsService;
19
19
  readonly request: BaseHttpRequest;
@@ -2,18 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CmsIntegrationApiClient = void 0;
4
4
  const FetchHttpRequest_1 = require("./core/FetchHttpRequest");
5
+ const BlueprintsService_1 = require("./services/BlueprintsService");
5
6
  const ChangesetsService_1 = require("./services/ChangesetsService");
6
7
  const ContentService_1 = require("./services/ContentService");
7
8
  const ContentTypesService_1 = require("./services/ContentTypesService");
8
9
  const DisplayTemplatesService_1 = require("./services/DisplayTemplatesService");
9
- const OauthService_1 = require("./services/OauthService");
10
10
  const PropertyFormatsService_1 = require("./services/PropertyFormatsService");
11
11
  const PropertyGroupsService_1 = require("./services/PropertyGroupsService");
12
12
  class CmsIntegrationApiClient {
13
13
  constructor(config, HttpRequest = FetchHttpRequest_1.FetchHttpRequest) {
14
14
  this.request = new HttpRequest({
15
- BASE: config?.BASE ?? '/_cms/preview2',
16
- VERSION: config?.VERSION ?? 'preview2',
15
+ BASE: config?.BASE ?? 'https://api.cms.optimizely.com/preview3',
16
+ VERSION: config?.VERSION ?? 'preview3',
17
17
  WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
18
18
  CREDENTIALS: config?.CREDENTIALS ?? 'include',
19
19
  TOKEN: config?.TOKEN,
@@ -22,11 +22,11 @@ class CmsIntegrationApiClient {
22
22
  HEADERS: config?.HEADERS,
23
23
  ENCODE_PATH: config?.ENCODE_PATH,
24
24
  });
25
+ this.blueprints = new BlueprintsService_1.BlueprintsService(this.request);
25
26
  this.changesets = new ChangesetsService_1.ChangesetsService(this.request);
26
27
  this.content = new ContentService_1.ContentService(this.request);
27
28
  this.contentTypes = new ContentTypesService_1.ContentTypesService(this.request);
28
29
  this.displayTemplates = new DisplayTemplatesService_1.DisplayTemplatesService(this.request);
29
- this.oauth = new OauthService_1.OauthService(this.request);
30
30
  this.propertyFormats = new PropertyFormatsService_1.PropertyFormatsService(this.request);
31
31
  this.propertyGroups = new PropertyGroupsService_1.PropertyGroupsService(this.request);
32
32
  }
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpenAPI = void 0;
4
4
  exports.OpenAPI = {
5
- BASE: '/_cms/preview2',
6
- VERSION: 'preview2',
5
+ BASE: 'https://api.cms.optimizely.com/preview3',
6
+ VERSION: 'preview3',
7
7
  WITH_CREDENTIALS: false,
8
8
  CREDENTIALS: 'include',
9
9
  TOKEN: undefined,
@@ -4,75 +4,44 @@ export { BaseHttpRequest } from './core/BaseHttpRequest';
4
4
  export { CancelablePromise, CancelError } from './core/CancelablePromise';
5
5
  export { OpenAPI } from './core/OpenAPI';
6
6
  export type { OpenAPIConfig } from './core/OpenAPI';
7
- export type { BinaryProperty } from './models/BinaryProperty';
8
- export type { BooleanProperty } from './models/BooleanProperty';
7
+ export { ArrayItem } from './models/ArrayItem';
8
+ export type { Blueprint } from './models/Blueprint';
9
+ export type { BlueprintData } from './models/BlueprintData';
10
+ export type { BlueprintPage } from './models/BlueprintPage';
9
11
  export type { Changeset } from './models/Changeset';
10
12
  export type { ChangesetItem } from './models/ChangesetItem';
11
13
  export type { ChangesetItemPage } from './models/ChangesetItemPage';
12
14
  export type { ChangesetPage } from './models/ChangesetPage';
13
- export type { ComponentListItem } from './models/ComponentListItem';
14
- export type { ComponentProperty } from './models/ComponentProperty';
15
- export { CompositionBehavior } from './models/CompositionBehavior';
16
- export { ContentBaseType } from './models/ContentBaseType';
15
+ export type { CompositionDisplaySettings } from './models/CompositionDisplaySettings';
16
+ export type { CompositionNode } from './models/CompositionNode';
17
17
  export type { ContentComponent } from './models/ContentComponent';
18
- export type { ContentItem } from './models/ContentItem';
19
- export type { ContentItemListWithContentTypes } from './models/ContentItemListWithContentTypes';
18
+ export { ContentItem } from './models/ContentItem';
20
19
  export type { ContentItemPage } from './models/ContentItemPage';
21
- export type { ContentItemWithContentTypes } from './models/ContentItemWithContentTypes';
22
- export type { ContentListItem } from './models/ContentListItem';
23
- export type { ContentLocaleInfo } from './models/ContentLocaleInfo';
20
+ export { ContentLocaleInfo } from './models/ContentLocaleInfo';
24
21
  export type { ContentMetadata } from './models/ContentMetadata';
25
22
  export type { ContentMetadataPage } from './models/ContentMetadataPage';
26
- export type { ContentProperty } from './models/ContentProperty';
27
23
  export type { ContentReference } from './models/ContentReference';
28
- export type { ContentReferenceListItem } from './models/ContentReferenceListItem';
29
- export type { ContentReferenceProperty } from './models/ContentReferenceProperty';
30
24
  export type { ContentType } from './models/ContentType';
31
- export { ContentTypeFeature } from './models/ContentTypeFeature';
32
25
  export type { ContentTypePage } from './models/ContentTypePage';
33
- export type { ContentTypeProperty } from './models/ContentTypeProperty';
34
- export { ContentTypeUsage } from './models/ContentTypeUsage';
26
+ export { ContentTypeProperty } from './models/ContentTypeProperty';
35
27
  export type { CopyContentOptions } from './models/CopyContentOptions';
36
- export type { DateTimeListItem } from './models/DateTimeListItem';
37
- export type { DateTimeProperty } from './models/DateTimeProperty';
38
28
  export type { DisplaySetting } from './models/DisplaySetting';
39
29
  export type { DisplaySettingChoice } from './models/DisplaySettingChoice';
40
30
  export type { DisplayTemplate } from './models/DisplayTemplate';
41
31
  export type { DisplayTemplatePage } from './models/DisplayTemplatePage';
42
- export type { DoubleEnumerationSettings } from './models/DoubleEnumerationSettings';
43
- export type { DoubleEnumerationValue } from './models/DoubleEnumerationValue';
44
- export type { FloatListItem } from './models/FloatListItem';
45
- export type { FloatProperty } from './models/FloatProperty';
32
+ export type { EnumerationValue } from './models/EnumerationValue';
46
33
  export type { ImageDescriptor } from './models/ImageDescriptor';
47
- export { IndexingType } from './models/IndexingType';
48
- export type { Int32EnumerationSettings } from './models/Int32EnumerationSettings';
49
- export type { Int32EnumerationValue } from './models/Int32EnumerationValue';
50
- export type { IntegerListItem } from './models/IntegerListItem';
51
- export type { IntegerProperty } from './models/IntegerProperty';
52
- export type { JsonStringProperty } from './models/JsonStringProperty';
53
- export type { ListProperty } from './models/ListProperty';
54
- export type { ListPropertyItem } from './models/ListPropertyItem';
55
- export { LocaleStatus } from './models/LocaleStatus';
56
- export type { OauthToken } from './models/OauthToken';
57
- export type { OauthTokenError } from './models/OauthTokenError';
58
- export type { OauthTokenRequest } from './models/OauthTokenRequest';
34
+ export type { Link } from './models/Link';
35
+ export type { Preview } from './models/Preview';
59
36
  export type { ProblemDetails } from './models/ProblemDetails';
60
- export { PropertyDataType } from './models/PropertyDataType';
61
- export type { PropertyFormat } from './models/PropertyFormat';
37
+ export { PropertyFormat } from './models/PropertyFormat';
62
38
  export type { PropertyFormatPage } from './models/PropertyFormatPage';
63
39
  export type { PropertyGroup } from './models/PropertyGroup';
64
40
  export type { PropertyGroupPage } from './models/PropertyGroupPage';
65
- export type { StringEnumerationSettings } from './models/StringEnumerationSettings';
66
- export type { StringEnumerationValue } from './models/StringEnumerationValue';
67
- export type { StringListItem } from './models/StringListItem';
68
- export type { StringProperty } from './models/StringProperty';
69
- export type { UrlListItem } from './models/UrlListItem';
70
- export type { UrlProperty } from './models/UrlProperty';
71
- export { VersionStatus } from './models/VersionStatus';
41
+ export { BlueprintsService } from './services/BlueprintsService';
72
42
  export { ChangesetsService } from './services/ChangesetsService';
73
43
  export { ContentService } from './services/ContentService';
74
44
  export { ContentTypesService } from './services/ContentTypesService';
75
45
  export { DisplayTemplatesService } from './services/DisplayTemplatesService';
76
- export { OauthService } from './services/OauthService';
77
46
  export { PropertyFormatsService } from './services/PropertyFormatsService';
78
47
  export { PropertyGroupsService } from './services/PropertyGroupsService';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.PropertyGroupsService = exports.PropertyFormatsService = exports.DisplayTemplatesService = exports.ContentTypesService = exports.ContentService = exports.ChangesetsService = exports.BlueprintsService = exports.PropertyFormat = exports.ContentTypeProperty = exports.ContentLocaleInfo = exports.ContentItem = exports.ArrayItem = 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 */
@@ -16,22 +16,18 @@ Object.defineProperty(exports, "CancelablePromise", { enumerable: true, get: fun
16
16
  Object.defineProperty(exports, "CancelError", { enumerable: true, get: function () { return CancelablePromise_1.CancelError; } });
17
17
  var OpenAPI_1 = require("./core/OpenAPI");
18
18
  Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return OpenAPI_1.OpenAPI; } });
19
- var CompositionBehavior_1 = require("./models/CompositionBehavior");
20
- Object.defineProperty(exports, "CompositionBehavior", { enumerable: true, get: function () { return CompositionBehavior_1.CompositionBehavior; } });
21
- var ContentBaseType_1 = require("./models/ContentBaseType");
22
- Object.defineProperty(exports, "ContentBaseType", { enumerable: true, get: function () { return ContentBaseType_1.ContentBaseType; } });
23
- var ContentTypeFeature_1 = require("./models/ContentTypeFeature");
24
- Object.defineProperty(exports, "ContentTypeFeature", { enumerable: true, get: function () { return ContentTypeFeature_1.ContentTypeFeature; } });
25
- var ContentTypeUsage_1 = require("./models/ContentTypeUsage");
26
- Object.defineProperty(exports, "ContentTypeUsage", { enumerable: true, get: function () { return ContentTypeUsage_1.ContentTypeUsage; } });
27
- var IndexingType_1 = require("./models/IndexingType");
28
- Object.defineProperty(exports, "IndexingType", { enumerable: true, get: function () { return IndexingType_1.IndexingType; } });
29
- var LocaleStatus_1 = require("./models/LocaleStatus");
30
- Object.defineProperty(exports, "LocaleStatus", { enumerable: true, get: function () { return LocaleStatus_1.LocaleStatus; } });
31
- var PropertyDataType_1 = require("./models/PropertyDataType");
32
- Object.defineProperty(exports, "PropertyDataType", { enumerable: true, get: function () { return PropertyDataType_1.PropertyDataType; } });
33
- var VersionStatus_1 = require("./models/VersionStatus");
34
- Object.defineProperty(exports, "VersionStatus", { enumerable: true, get: function () { return VersionStatus_1.VersionStatus; } });
19
+ var ArrayItem_1 = require("./models/ArrayItem");
20
+ Object.defineProperty(exports, "ArrayItem", { enumerable: true, get: function () { return ArrayItem_1.ArrayItem; } });
21
+ var ContentItem_1 = require("./models/ContentItem");
22
+ Object.defineProperty(exports, "ContentItem", { enumerable: true, get: function () { return ContentItem_1.ContentItem; } });
23
+ var ContentLocaleInfo_1 = require("./models/ContentLocaleInfo");
24
+ Object.defineProperty(exports, "ContentLocaleInfo", { enumerable: true, get: function () { return ContentLocaleInfo_1.ContentLocaleInfo; } });
25
+ var ContentTypeProperty_1 = require("./models/ContentTypeProperty");
26
+ Object.defineProperty(exports, "ContentTypeProperty", { enumerable: true, get: function () { return ContentTypeProperty_1.ContentTypeProperty; } });
27
+ var PropertyFormat_1 = require("./models/PropertyFormat");
28
+ Object.defineProperty(exports, "PropertyFormat", { enumerable: true, get: function () { return PropertyFormat_1.PropertyFormat; } });
29
+ var BlueprintsService_1 = require("./services/BlueprintsService");
30
+ Object.defineProperty(exports, "BlueprintsService", { enumerable: true, get: function () { return BlueprintsService_1.BlueprintsService; } });
35
31
  var ChangesetsService_1 = require("./services/ChangesetsService");
36
32
  Object.defineProperty(exports, "ChangesetsService", { enumerable: true, get: function () { return ChangesetsService_1.ChangesetsService; } });
37
33
  var ContentService_1 = require("./services/ContentService");
@@ -40,8 +36,6 @@ var ContentTypesService_1 = require("./services/ContentTypesService");
40
36
  Object.defineProperty(exports, "ContentTypesService", { enumerable: true, get: function () { return ContentTypesService_1.ContentTypesService; } });
41
37
  var DisplayTemplatesService_1 = require("./services/DisplayTemplatesService");
42
38
  Object.defineProperty(exports, "DisplayTemplatesService", { enumerable: true, get: function () { return DisplayTemplatesService_1.DisplayTemplatesService; } });
43
- var OauthService_1 = require("./services/OauthService");
44
- Object.defineProperty(exports, "OauthService", { enumerable: true, get: function () { return OauthService_1.OauthService; } });
45
39
  var PropertyFormatsService_1 = require("./services/PropertyFormatsService");
46
40
  Object.defineProperty(exports, "PropertyFormatsService", { enumerable: true, get: function () { return PropertyFormatsService_1.PropertyFormatsService; } });
47
41
  var PropertyGroupsService_1 = require("./services/PropertyGroupsService");
@@ -0,0 +1,70 @@
1
+ import type { EnumerationValue } from './EnumerationValue';
2
+ /**
3
+ * Describes the list item of a content type property of type 'array'.
4
+ */
5
+ export type ArrayItem = {
6
+ /**
7
+ * Gets the data type for the list item property.
8
+ */
9
+ type?: ArrayItem.type;
10
+ /**
11
+ * The key of the PropertyFormat that this property item is an instance of.
12
+ */
13
+ format?: string | null;
14
+ /**
15
+ * The key of the content type that a property with 'type': 'component' may contain.
16
+ */
17
+ contentType?: string | null;
18
+ /**
19
+ * The minimum value that properties of this type should be able to contain. Value type must match the type of the array item.
20
+ */
21
+ minimum?: (number | null | string | null) | null;
22
+ /**
23
+ * The maximum value that properties of this type should be able to contain. Value type must match the type of the array item.
24
+ */
25
+ maximum?: (number | null | string | null) | null;
26
+ /**
27
+ * The minimum string length that list items of this type should be able to contain.
28
+ */
29
+ minLength?: number | null;
30
+ /**
31
+ * The maximum string length that list items of this type should be able to contain.
32
+ */
33
+ maxLength?: number | null;
34
+ /**
35
+ * Regular expression pattern that limits what strings that list items of this type should be able to contain.
36
+ */
37
+ pattern?: string | null;
38
+ /**
39
+ * A list of possible values that properties of this type should be able to contain.
40
+ */
41
+ enum?: Array<EnumerationValue> | null;
42
+ /**
43
+ * Specifies which content types and base types this property is allowed to contain.
44
+ */
45
+ allowedTypes?: Array<string>;
46
+ /**
47
+ * Specifies which content types and base types this property cannot contain.
48
+ */
49
+ restrictedTypes?: Array<string>;
50
+ };
51
+ export declare namespace ArrayItem {
52
+ /**
53
+ * Gets the data type for the list item property.
54
+ */
55
+ enum type {
56
+ STRING = "string",
57
+ URL = "url",
58
+ BOOLEAN = "boolean",
59
+ INTEGER = "integer",
60
+ FLOAT = "float",
61
+ DATE_TIME = "dateTime",
62
+ CONTENT_REFERENCE = "contentReference",
63
+ CONTENT = "content",
64
+ BINARY = "binary",
65
+ LINK = "link",
66
+ RICH_TEXT = "richText",
67
+ JSON = "json",
68
+ COMPONENT = "component"
69
+ }
70
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArrayItem = void 0;
4
+ var ArrayItem;
5
+ (function (ArrayItem) {
6
+ /**
7
+ * Gets the data type for the list item property.
8
+ */
9
+ let type;
10
+ (function (type) {
11
+ type["STRING"] = "string";
12
+ type["URL"] = "url";
13
+ type["BOOLEAN"] = "boolean";
14
+ type["INTEGER"] = "integer";
15
+ type["FLOAT"] = "float";
16
+ type["DATE_TIME"] = "dateTime";
17
+ type["CONTENT_REFERENCE"] = "contentReference";
18
+ type["CONTENT"] = "content";
19
+ type["BINARY"] = "binary";
20
+ type["LINK"] = "link";
21
+ type["RICH_TEXT"] = "richText";
22
+ type["JSON"] = "json";
23
+ type["COMPONENT"] = "component";
24
+ })(type = ArrayItem.type || (ArrayItem.type = {}));
25
+ })(ArrayItem || (exports.ArrayItem = ArrayItem = {}));
@@ -0,0 +1,24 @@
1
+ import type { BlueprintData } from './BlueprintData';
2
+ /**
3
+ * Represents a blueprint of a content item.
4
+ */
5
+ export type Blueprint = {
6
+ /**
7
+ * The key that identifies this blueprint.
8
+ */
9
+ readonly key?: string;
10
+ /**
11
+ * The display name of this blueprint.
12
+ */
13
+ displayName: string;
14
+ /**
15
+ * The content type of this blueprint.
16
+ */
17
+ readonly contentType?: string;
18
+ lastModified?: string;
19
+ /**
20
+ * The username of the user that made the latest modification to this blueprint.
21
+ */
22
+ readonly lastModifiedBy?: string;
23
+ content?: BlueprintData;
24
+ };
@@ -0,0 +1,11 @@
1
+ import type { CompositionNode } from './CompositionNode';
2
+ /**
3
+ * Represents the data part of a Blueprint.
4
+ */
5
+ export type BlueprintData = {
6
+ /**
7
+ * Properties as they are defined by corresponding component or content type.
8
+ */
9
+ properties?: Record<string, any>;
10
+ composition?: CompositionNode;
11
+ };
@@ -0,0 +1,19 @@
1
+ import type { Blueprint } from './Blueprint';
2
+ export type BlueprintPage = {
3
+ /**
4
+ * The items in this paged collection.
5
+ */
6
+ readonly items?: Array<Blueprint>;
7
+ /**
8
+ * The zero-based index of the current page.
9
+ */
10
+ readonly pageIndex?: number;
11
+ /**
12
+ * The number of items in each page. Not necessarily the same as the number of items in this page.
13
+ */
14
+ readonly pageSize?: number;
15
+ /**
16
+ * The estimated total number of items in the collection. May be omitted if the total item count is unknown.
17
+ */
18
+ readonly totalItemCount?: number;
19
+ };
@@ -5,11 +5,11 @@ export type Changeset = {
5
5
  /**
6
6
  * The unique key of this Changeset.
7
7
  */
8
- key: string;
8
+ key?: string;
9
9
  /**
10
- * The source of this Changeset
10
+ * The source of this Changeset.
11
11
  */
12
- source?: string;
12
+ readonly source?: string;
13
13
  /**
14
14
  * The name of this Changeset.
15
15
  */
@@ -9,7 +9,7 @@ export type ChangesetItemPage = {
9
9
  */
10
10
  readonly pageIndex?: number;
11
11
  /**
12
- * The number of item in each page. Not necessarily the same as the number of items in this page.
12
+ * The number of items in each page. Not necessarily the same as the number of items in this page.
13
13
  */
14
14
  readonly pageSize?: number;
15
15
  /**
@@ -9,7 +9,7 @@ export type ChangesetPage = {
9
9
  */
10
10
  readonly pageIndex?: number;
11
11
  /**
12
- * The number of item in each page. Not necessarily the same as the number of items in this page.
12
+ * The number of items in each page. Not necessarily the same as the number of items in this page.
13
13
  */
14
14
  readonly pageSize?: number;
15
15
  /**
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Defines display settings for a CompositionNode."/>
3
+ */
4
+ export type CompositionDisplaySettings = {
5
+ /**
6
+ * The key for the display template that these settings apply to.
7
+ */
8
+ readonly displayTemplate: string;
9
+ /**
10
+ * Gets/sets the display settings for this CompositionNode.
11
+ */
12
+ settings?: Record<string, string> | null;
13
+ };
@@ -0,0 +1,41 @@
1
+ import type { CompositionDisplaySettings } from './CompositionDisplaySettings';
2
+ /**
3
+ * Specifies a node in a content composition.
4
+ */
5
+ export type CompositionNode = {
6
+ /**
7
+ * Specifies the id of this CompositionNode.
8
+ */
9
+ id?: string | null;
10
+ /**
11
+ * The display name of this ContentType.
12
+ */
13
+ displayName?: string | null;
14
+ /**
15
+ * Gets the node type of this CompositionNode.
16
+ */
17
+ readonly nodeType?: string;
18
+ /**
19
+ * Gets the node layout type of this CompositionNode
20
+ */
21
+ readonly layoutType?: string | null;
22
+ displaySettings?: CompositionDisplaySettings;
23
+ /**
24
+ * Represents a content component.
25
+ */
26
+ component?: {
27
+ /**
28
+ * Dictionary with all custom properties as specified by associated ContentType
29
+ */
30
+ properties?: any;
31
+ reference?: string;
32
+ /**
33
+ * The key of the content type that this is an embedded instance of.
34
+ */
35
+ contentType?: string | null;
36
+ };
37
+ /**
38
+ * Gets the available child nodes for this CompositionNode.
39
+ */
40
+ nodes?: Array<CompositionNode> | null;
41
+ };
@@ -2,27 +2,27 @@
2
2
  * Represents a content component.
3
3
  */
4
4
  export type ContentComponent = {
5
- /**
6
- * The name of the content component. If Reference is set, the name is automatically set to the name of the referenced content.
7
- */
8
- name?: string;
9
5
  /**
10
6
  * An optional display option for the content component.
11
7
  */
12
- displayOption?: string;
8
+ displayOption?: string | null;
13
9
  /**
14
10
  * An optional group for the personalizable component.
15
11
  */
16
- segmentationGroup?: string;
12
+ segmentationGroup?: string | null;
17
13
  /**
18
14
  * Specifies the settings for the content component.
19
15
  */
20
- segments?: Array<string>;
16
+ segments?: Array<string> | null;
17
+ /**
18
+ * The display name of the content component. If Reference is set, the name is automatically set to the name of the referenced content.
19
+ */
20
+ name?: string | null;
21
21
  reference?: string;
22
22
  /**
23
23
  * The key of the content type that this is an embedded instance of.
24
24
  */
25
- contentType?: string;
25
+ contentType?: string | null;
26
26
  /**
27
27
  * Dictionary with all custom properties as specified by associated ContentType
28
28
  */
@@ -1,4 +1,4 @@
1
- import type { VersionStatus } from './VersionStatus';
1
+ import type { CompositionNode } from './CompositionNode';
2
2
  /**
3
3
  * Represents a version of a content item.
4
4
  */
@@ -10,19 +10,24 @@ export type ContentItem = {
10
10
  /**
11
11
  * The key that identifies this content item.
12
12
  */
13
- readonly key: string;
13
+ readonly key?: string;
14
14
  /**
15
15
  * The locale of this content instance.
16
16
  */
17
- readonly locale?: string;
17
+ locale?: string;
18
18
  /**
19
19
  * The version identifier of this content instance.
20
20
  */
21
21
  readonly version?: string;
22
+ /**
23
+ * The variation of this content item, if any. Variations are used to represent different states or forms of the same content item.
24
+ * A variation has it's own publish lifecycle. A variation can though not be published before the default version of same local is published.
25
+ */
26
+ variation?: string | null;
22
27
  /**
23
28
  * The content type of this content item.
24
29
  */
25
- readonly contentType?: string;
30
+ contentType?: string;
26
31
  /**
27
32
  * The display name of this content item.
28
33
  */
@@ -35,7 +40,10 @@ export type ContentItem = {
35
40
  * Indicates a time when this content expired or should expire.
36
41
  */
37
42
  expired?: string | null;
38
- status?: VersionStatus;
43
+ /**
44
+ * The status of this version of the content item.
45
+ */
46
+ status?: ContentItem.status;
39
47
  /**
40
48
  * Indicates a time when this content version should transition to published status. Must only be assigned when Status is set to Scheduled.
41
49
  */
@@ -57,4 +65,19 @@ export type ContentItem = {
57
65
  * The username of the user that made the latest modification to this content instance.
58
66
  */
59
67
  readonly lastModifiedBy?: string;
68
+ composition?: CompositionNode;
60
69
  };
70
+ export declare namespace ContentItem {
71
+ /**
72
+ * The status of this version of the content item.
73
+ */
74
+ enum status {
75
+ DRAFT = "draft",
76
+ READY = "ready",
77
+ PUBLISHED = "published",
78
+ PREVIOUS = "previous",
79
+ SCHEDULED = "scheduled",
80
+ REJECTED = "rejected",
81
+ IN_REVIEW = "inReview"
82
+ }
83
+ }
@@ -1,2 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContentItem = void 0;
4
+ var ContentItem;
5
+ (function (ContentItem) {
6
+ /**
7
+ * The status of this version of the content item.
8
+ */
9
+ let status;
10
+ (function (status) {
11
+ status["DRAFT"] = "draft";
12
+ status["READY"] = "ready";
13
+ status["PUBLISHED"] = "published";
14
+ status["PREVIOUS"] = "previous";
15
+ status["SCHEDULED"] = "scheduled";
16
+ status["REJECTED"] = "rejected";
17
+ status["IN_REVIEW"] = "inReview";
18
+ })(status = ContentItem.status || (ContentItem.status = {}));
19
+ })(ContentItem || (exports.ContentItem = ContentItem = {}));
@@ -9,7 +9,7 @@ export type ContentItemPage = {
9
9
  */
10
10
  readonly pageIndex?: number;
11
11
  /**
12
- * The number of item in each page. Not necessarily the same as the number of items in this page.
12
+ * The number of items in each page. Not necessarily the same as the number of items in this page.
13
13
  */
14
14
  readonly pageSize?: number;
15
15
  /**