@dotcms/client 0.0.1-alpha.1 → 0.0.1-alpha.3

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/README.md CHANGED
@@ -6,9 +6,9 @@ This client library provides a streamlined, promise-based interface to fetch pag
6
6
 
7
7
  ## Features
8
8
 
9
- - Easy-to-use methods to interact with the [DotCMS Page](https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas) and [Navigation APIs](https://www.dotcms.com/docs/latest/navigation-rest-api).
10
- - Support for custom actions to communicate with the DotCMS page editor.
11
- - Comprehensive TypeScript typings for better development experience.
9
+ - Easy-to-use methods to interact with the [DotCMS Page](https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas) and [Navigation APIs](https://www.dotcms.com/docs/latest/navigation-rest-api).
10
+ - Support for custom actions to communicate with the DotCMS page editor.
11
+ - Comprehensive TypeScript typings for better development experience.
12
12
 
13
13
  ## Installation
14
14
 
@@ -43,7 +43,7 @@ const client = dotcmsClient.init({
43
43
  Retrieve the elements of any page in your DotCMS system in JSON format.
44
44
 
45
45
  ```javascript
46
- const pageData = await client.getPage({
46
+ const pageData = await client.page.get({
47
47
  path: '/your-page-path',
48
48
  language_id: 1,
49
49
  personaId: 'optional-persona-id'
@@ -57,7 +57,7 @@ console.log(pageData);
57
57
  Retrieve information about the DotCMS file and folder tree.
58
58
 
59
59
  ```javascript
60
- const navData = await client.getNav({
60
+ const navData = await client.nav.get({
61
61
  path: '/',
62
62
  depth: 2,
63
63
  languageId: 1
@@ -74,20 +74,18 @@ Detailed documentation of the `@dotcms/client` methods, parameters, and types ca
74
74
 
75
75
  Initializes the DotCMS client with the specified configuration.
76
76
 
77
- ### `DotCmsClient.getPage(options: PageApiOptions): Promise<unknown>`
77
+ ### `DotCmsClient.page.get(options: PageApiOptions): Promise<unknown>`
78
78
 
79
79
  Retrieves the specified page's elements from your DotCMS system in JSON format.
80
80
 
81
- ### `DotCmsClient.getNav(options: NavApiOptions): Promise<unknown>`
81
+ ### `DotCmsClient.nav.get(options: NavApiOptions): Promise<unknown>`
82
82
 
83
83
  Retrieves information about the DotCMS file and folder tree.
84
84
 
85
-
86
85
  ## Contributing
87
86
 
88
87
  GitHub pull requests are the preferred method to contribute code to dotCMS. Before any pull requests can be accepted, an automated tool will ask you to agree to the [dotCMS Contributor's Agreement](https://gist.github.com/wezell/85ef45298c48494b90d92755b583acb3).
89
88
 
90
-
91
89
  ## Licensing
92
90
 
93
91
  dotCMS comes in multiple editions and as such is dual licensed. The dotCMS Community Edition is licensed under the GPL 3.0 and is freely available for download, customization and deployment for use within organizations of all stripes. dotCMS Enterprise Editions (EE) adds a number of enterprise features and is available via a supported, indemnified commercial license from dotCMS. For the differences between the editions, see [the feature page](http://dotcms.com/cms-platform/features).
@@ -110,4 +108,4 @@ Always refer to the official [DotCMS documentation](https://www.dotcms.com/docs/
110
108
  | Code Examples | [Codeshare](https://dotcms.com/codeshare/) |
111
109
  | Forums/Listserv | [via Google Groups](https://groups.google.com/forum/#!forum/dotCMS) |
112
110
  | Twitter | @dotCMS |
113
- | Main Site | [dotCMS.com](https://dotcms.com/) |
111
+ | Main Site | [dotCMS.com](https://dotcms.com/) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/client",
3
- "version": "0.0.1-alpha.1",
3
+ "version": "0.0.1-alpha.3",
4
4
  "type": "module",
5
5
  "description": "Official JavaScript library for interacting with DotCMS REST APIs.",
6
6
  "repository": {
@@ -20,9 +20,6 @@
20
20
  "url": "https://github.com/dotCMS/core/issues"
21
21
  },
22
22
  "homepage": "https://github.com/dotCMS/core/tree/master/core-web/libs/sdk/client/README.md",
23
- "peerDependencies": {
24
- "tslib": "^2.3.0"
25
- },
26
- "main": "./src/index.js",
27
- "types": "./src/index.d.ts"
23
+ "module": "./src/index.js",
24
+ "main": "./src/index.js"
28
25
  }
@@ -21,6 +21,10 @@ export declare enum CUSTOMER_ACTIONS {
21
21
  * Tell the editor that the page is being scrolled
22
22
  */
23
23
  IFRAME_SCROLL = "scroll",
24
+ /**
25
+ * Ping the editor to see if the page is inside the editor
26
+ */
27
+ PING_EDITOR = "ping-editor",
24
28
  NOOP = "noop"
25
29
  }
26
30
  /**
@@ -22,6 +22,10 @@ export var CUSTOMER_ACTIONS;
22
22
  * Tell the editor that the page is being scrolled
23
23
  */
24
24
  CUSTOMER_ACTIONS["IFRAME_SCROLL"] = "scroll";
25
+ /**
26
+ * Ping the editor to see if the page is inside the editor
27
+ */
28
+ CUSTOMER_ACTIONS["PING_EDITOR"] = "ping-editor";
25
29
  CUSTOMER_ACTIONS["NOOP"] = "noop";
26
30
  })(CUSTOMER_ACTIONS || (CUSTOMER_ACTIONS = {}));
27
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"postMessageToEditor.js","sourceRoot":"","sources":["../../../../../../libs/sdk/client/src/lib/postMessageToEditor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAkBX;AAlBD,WAAY,gBAAgB;IACxB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,6CAAyB,CAAA;IACzB;;OAEG;IACH,qDAAiC,CAAA;IACjC;;OAEG;IACH,4CAAwB,CAAA;IACxB,iCAAa,CAAA;AACjB,CAAC,EAlBW,gBAAgB,KAAhB,gBAAgB,QAkB3B;AAcD;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAc,OAA4B;IACzE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC"}
1
+ {"version":3,"file":"postMessageToEditor.js","sourceRoot":"","sources":["../../../../../../libs/sdk/client/src/lib/postMessageToEditor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAsBX;AAtBD,WAAY,gBAAgB;IACxB;;OAEG;IACH,uCAAmB,CAAA;IACnB;;OAEG;IACH,6CAAyB,CAAA;IACzB;;OAEG;IACH,qDAAiC,CAAA;IACjC;;OAEG;IACH,4CAAwB,CAAA;IACxB;;OAEG;IACH,+CAA2B,CAAA;IAC3B,iCAAa,CAAA;AACjB,CAAC,EAtBW,gBAAgB,KAAhB,gBAAgB,QAsB3B;AAcD;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAc,OAA4B;IACzE,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC"}
@@ -26,6 +26,15 @@ export interface ClientConfig {
26
26
  * @required
27
27
  */
28
28
  authToken: string;
29
+ /**
30
+ * Additional options to pass to the fetch request.
31
+ *
32
+ * @description These options will be used in the fetch request. Any option can be specified except for 'body' and 'method' which are omitted.
33
+ * @example `{ headers: { 'Content-Type': 'application/json' } }`
34
+ * @type {Omit<RequestInit, 'body' | 'method'>}
35
+ * @optional
36
+ */
37
+ requestOptions?: Omit<RequestInit, 'body' | 'method'>;
29
38
  }
30
39
  type PageApiOptions = {
31
40
  /**
@@ -110,42 +119,45 @@ type NavApiOptions = {
110
119
  *
111
120
  * @method constructor(config: ClientConfig) - Constructs a new instance of the DotCmsClient class.
112
121
  *
113
- * @method getPage(options: PageApiOptions): Promise<unknown> - Retrieves all the elements of any Page in your dotCMS system in JSON format.
122
+ * @method page.get(options: PageApiOptions): Promise<unknown> - Retrieves all the elements of any Page in your dotCMS system in JSON format.
114
123
  *
115
- * @method getNav(options: NavApiOptions = { depth: 0, path: '/', languageId: 1 }): Promise<unknown> - Retrieves information about the dotCMS file and folder tree.
124
+ * @method nav.get(options: NavApiOptions = { depth: 0, path: '/', languageId: 1 }): Promise<unknown> - Retrieves information about the dotCMS file and folder tree.
116
125
  *
117
126
  */
118
127
  export declare class DotCmsClient {
119
128
  private config;
120
- constructor(config: ClientConfig);
121
- /**
122
- * `getPage` is an asynchronous method of the `DotCmsClient` class that retrieves all the elements of any Page in your dotCMS system in JSON format.
123
- * It takes a `PageApiOptions` object as a parameter and returns a Promise that resolves to the response from the DotCMS API.
124
- *
125
- * The Page API enables you to retrieve all the elements of any Page in your dotCMS system.
126
- * The elements may be retrieved in JSON format.
127
- *
128
- * @link https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas
129
- * @method getPage
130
- * @async
131
- * @param {PageApiOptions} options - The options for the Page API call.
132
- * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
133
- * @throws {Error} - Throws an error if the options are not valid.
134
- */
135
- getPage(options: PageApiOptions): Promise<unknown>;
136
- /**
137
- * `getNav` is an asynchronous method of the `DotCmsClient` class that retrieves information about the dotCMS file and folder tree.
138
- * It takes a `NavApiOptions` object as a parameter (with default values) and returns a Promise that resolves to the response from the DotCMS API.
139
- *
140
- * The navigation REST API enables you to retrieve information about the dotCMS file and folder tree through REST API calls.
141
- * @link https://www.dotcms.com/docs/latest/navigation-rest-api
142
- * @method getNav
143
- * @async
144
- * @param {NavApiOptions} options - The options for the Nav API call. Defaults to `{ depth: 0, path: '/', languageId: 1 }`.
145
- * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
146
- * @throws {Error} - Throws an error if the options are not valid.
147
- */
148
- getNav(options?: NavApiOptions): Promise<unknown>;
129
+ private requestOptions;
130
+ constructor(config?: ClientConfig);
131
+ page: {
132
+ /**
133
+ * `page.get` is an asynchronous method of the `DotCmsClient` class that retrieves all the elements of any Page in your dotCMS system in JSON format.
134
+ * It takes a `PageApiOptions` object as a parameter and returns a Promise that resolves to the response from the DotCMS API.
135
+ *
136
+ * The Page API enables you to retrieve all the elements of any Page in your dotCMS system.
137
+ * The elements may be retrieved in JSON format.
138
+ *
139
+ * @link https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas
140
+ * @async
141
+ * @param {PageApiOptions} options - The options for the Page API call.
142
+ * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
143
+ * @throws {Error} - Throws an error if the options are not valid.
144
+ */
145
+ get: (options: PageApiOptions) => Promise<unknown>;
146
+ };
147
+ nav: {
148
+ /**
149
+ * `nav.get` is an asynchronous method of the `DotCmsClient` class that retrieves information about the dotCMS file and folder tree.
150
+ * It takes a `NavApiOptions` object as a parameter (with default values) and returns a Promise that resolves to the response from the DotCMS API.
151
+ *
152
+ * The navigation REST API enables you to retrieve information about the dotCMS file and folder tree through REST API calls.
153
+ * @link https://www.dotcms.com/docs/latest/navigation-rest-api
154
+ * @async
155
+ * @param {NavApiOptions} options - The options for the Nav API call. Defaults to `{ depth: 0, path: '/', languageId: 1 }`.
156
+ * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
157
+ * @throws {Error} - Throws an error if the options are not valid.
158
+ */
159
+ get: (options?: NavApiOptions) => Promise<unknown>;
160
+ };
149
161
  private validatePageOptions;
150
162
  private validateNavOptions;
151
163
  }
@@ -1,4 +1,3 @@
1
- import { __awaiter, __rest } from "tslib";
2
1
  function isValidUrl(url) {
3
2
  try {
4
3
  new URL(url);
@@ -18,13 +17,81 @@ function isValidUrl(url) {
18
17
  *
19
18
  * @method constructor(config: ClientConfig) - Constructs a new instance of the DotCmsClient class.
20
19
  *
21
- * @method getPage(options: PageApiOptions): Promise<unknown> - Retrieves all the elements of any Page in your dotCMS system in JSON format.
20
+ * @method page.get(options: PageApiOptions): Promise<unknown> - Retrieves all the elements of any Page in your dotCMS system in JSON format.
22
21
  *
23
- * @method getNav(options: NavApiOptions = { depth: 0, path: '/', languageId: 1 }): Promise<unknown> - Retrieves information about the dotCMS file and folder tree.
22
+ * @method nav.get(options: NavApiOptions = { depth: 0, path: '/', languageId: 1 }): Promise<unknown> - Retrieves information about the dotCMS file and folder tree.
24
23
  *
25
24
  */
26
25
  export class DotCmsClient {
27
- constructor(config) {
26
+ constructor(config = { dotcmsUrl: '', authToken: '', requestOptions: {}, siteId: '' }) {
27
+ this.page = {
28
+ /**
29
+ * `page.get` is an asynchronous method of the `DotCmsClient` class that retrieves all the elements of any Page in your dotCMS system in JSON format.
30
+ * It takes a `PageApiOptions` object as a parameter and returns a Promise that resolves to the response from the DotCMS API.
31
+ *
32
+ * The Page API enables you to retrieve all the elements of any Page in your dotCMS system.
33
+ * The elements may be retrieved in JSON format.
34
+ *
35
+ * @link https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas
36
+ * @async
37
+ * @param {PageApiOptions} options - The options for the Page API call.
38
+ * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
39
+ * @throws {Error} - Throws an error if the options are not valid.
40
+ */
41
+ get: async (options) => {
42
+ this.validatePageOptions(options);
43
+ const queryParamsObj = {};
44
+ for (const [key, value] of Object.entries(options)) {
45
+ if (value === undefined || key === 'path' || key === 'siteId')
46
+ continue;
47
+ if (key === 'personaId') {
48
+ queryParamsObj['com.dotmarketing.persona.id'] = String(value);
49
+ }
50
+ else {
51
+ queryParamsObj[key] = String(value);
52
+ }
53
+ }
54
+ const queryHostId = options.siteId ?? this.config.siteId ?? '';
55
+ if (queryHostId) {
56
+ queryParamsObj['host_id'] = queryHostId;
57
+ }
58
+ const queryParams = new URLSearchParams(queryParamsObj).toString();
59
+ const formattedPath = options.path.startsWith('/') ? options.path : `/${options.path}`;
60
+ const url = `${this.config.dotcmsUrl}/api/v1/page/json${formattedPath}${queryParams ? `?${queryParams}` : ''}`;
61
+ const response = await fetch(url, this.requestOptions);
62
+ return response.json();
63
+ }
64
+ };
65
+ this.nav = {
66
+ /**
67
+ * `nav.get` is an asynchronous method of the `DotCmsClient` class that retrieves information about the dotCMS file and folder tree.
68
+ * It takes a `NavApiOptions` object as a parameter (with default values) and returns a Promise that resolves to the response from the DotCMS API.
69
+ *
70
+ * The navigation REST API enables you to retrieve information about the dotCMS file and folder tree through REST API calls.
71
+ * @link https://www.dotcms.com/docs/latest/navigation-rest-api
72
+ * @async
73
+ * @param {NavApiOptions} options - The options for the Nav API call. Defaults to `{ depth: 0, path: '/', languageId: 1 }`.
74
+ * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
75
+ * @throws {Error} - Throws an error if the options are not valid.
76
+ */
77
+ get: async (options = { depth: 0, path: '/', languageId: 1 }) => {
78
+ this.validateNavOptions(options);
79
+ // Extract the 'path' from the options and prepare the rest as query parameters
80
+ const { path, ...queryParamsOptions } = options;
81
+ const queryParamsObj = {};
82
+ Object.entries(queryParamsOptions).forEach(([key, value]) => {
83
+ if (value !== undefined) {
84
+ queryParamsObj[key] = String(value);
85
+ }
86
+ });
87
+ const queryParams = new URLSearchParams(queryParamsObj).toString();
88
+ // Format the URL correctly depending on the 'path' value
89
+ const formattedPath = path === '/' ? '/' : `/${path}`;
90
+ const url = `${this.config.dotcmsUrl}/api/v1/nav${formattedPath}${queryParams ? `?${queryParams}` : ''}`;
91
+ const response = await fetch(url, this.requestOptions);
92
+ return response.json();
93
+ }
94
+ };
28
95
  if (!config.dotcmsUrl) {
29
96
  throw new Error("Invalid configuration - 'dotcmsUrl' is required");
30
97
  }
@@ -35,85 +102,13 @@ export class DotCmsClient {
35
102
  throw new Error("Invalid configuration - 'authToken' is required");
36
103
  }
37
104
  this.config = config;
38
- }
39
- /**
40
- * `getPage` is an asynchronous method of the `DotCmsClient` class that retrieves all the elements of any Page in your dotCMS system in JSON format.
41
- * It takes a `PageApiOptions` object as a parameter and returns a Promise that resolves to the response from the DotCMS API.
42
- *
43
- * The Page API enables you to retrieve all the elements of any Page in your dotCMS system.
44
- * The elements may be retrieved in JSON format.
45
- *
46
- * @link https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas
47
- * @method getPage
48
- * @async
49
- * @param {PageApiOptions} options - The options for the Page API call.
50
- * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
51
- * @throws {Error} - Throws an error if the options are not valid.
52
- */
53
- getPage(options) {
54
- var _a, _b;
55
- return __awaiter(this, void 0, void 0, function* () {
56
- this.validatePageOptions(options);
57
- const queryParamsObj = {};
58
- for (const [key, value] of Object.entries(options)) {
59
- if (value === undefined || key === 'path' || key === 'siteId')
60
- continue;
61
- if (key === 'personaId') {
62
- queryParamsObj['com.dotmarketing.persona.id'] = String(value);
63
- }
64
- else {
65
- queryParamsObj[key] = String(value);
66
- }
67
- }
68
- const queryHostId = (_b = (_a = options.siteId) !== null && _a !== void 0 ? _a : this.config.siteId) !== null && _b !== void 0 ? _b : '';
69
- if (queryHostId) {
70
- queryParamsObj['host_id'] = queryHostId;
105
+ this.requestOptions = {
106
+ ...this.config.requestOptions,
107
+ headers: {
108
+ Authorization: `Bearer ${this.config.authToken}`,
109
+ ...this.config.requestOptions?.headers
71
110
  }
72
- const queryParams = new URLSearchParams(queryParamsObj).toString();
73
- const formattedPath = options.path.startsWith('/') ? options.path : `/${options.path}`;
74
- const url = `${this.config.dotcmsUrl}/api/v1/page/json${formattedPath}${queryParams ? `?${queryParams}` : ''}`;
75
- const response = yield fetch(url, {
76
- headers: {
77
- Authorization: `Bearer ${this.config.authToken}`
78
- }
79
- });
80
- return response.json();
81
- });
82
- }
83
- /**
84
- * `getNav` is an asynchronous method of the `DotCmsClient` class that retrieves information about the dotCMS file and folder tree.
85
- * It takes a `NavApiOptions` object as a parameter (with default values) and returns a Promise that resolves to the response from the DotCMS API.
86
- *
87
- * The navigation REST API enables you to retrieve information about the dotCMS file and folder tree through REST API calls.
88
- * @link https://www.dotcms.com/docs/latest/navigation-rest-api
89
- * @method getNav
90
- * @async
91
- * @param {NavApiOptions} options - The options for the Nav API call. Defaults to `{ depth: 0, path: '/', languageId: 1 }`.
92
- * @returns {Promise<unknown>} - A Promise that resolves to the response from the DotCMS API.
93
- * @throws {Error} - Throws an error if the options are not valid.
94
- */
95
- getNav(options = { depth: 0, path: '/', languageId: 1 }) {
96
- return __awaiter(this, void 0, void 0, function* () {
97
- this.validateNavOptions(options);
98
- // Extract the 'path' from the options and prepare the rest as query parameters
99
- const { path } = options, queryParamsOptions = __rest(options, ["path"]);
100
- const queryParamsObj = {};
101
- Object.entries(queryParamsOptions).forEach(([key, value]) => {
102
- if (value !== undefined) {
103
- queryParamsObj[key] = String(value);
104
- }
105
- });
106
- const queryParams = new URLSearchParams(queryParamsObj).toString();
107
- // Format the URL correctly depending on the 'path' value
108
- const formattedPath = path === '/' ? '/' : `/${path}`;
109
- const url = `${this.config.dotcmsUrl}/api/v1/nav${formattedPath}${queryParams ? `?${queryParams}` : ''}`;
110
- const response = yield fetch(url, {
111
- headers: {
112
- Authorization: `Bearer ${this.config.authToken}`
113
- }
114
- });
115
- return response.json();
116
- });
111
+ };
117
112
  }
118
113
  validatePageOptions(options) {
119
114
  if (!options.path) {
@@ -1 +1 @@
1
- {"version":3,"file":"sdk-js-client.js","sourceRoot":"","sources":["../../../../../../libs/sdk/client/src/lib/sdk-js-client.ts"],"names":[],"mappings":";AAyGA,SAAS,UAAU,CAAC,GAAW;IAC3B,IAAI;QACA,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAEb,OAAO,IAAI,CAAC;KACf;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,KAAK,CAAC;KAChB;AACL,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,YAAY;IAGrB,YAAY,MAAoB;QAC5B,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC9E;QAED,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,OAAuB;;;YACjC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAElC,MAAM,cAAc,GAA2B,EAAE,CAAC;YAClD,KAAK,MAAM,CAAC,GAAG,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