1 | import { __decorate } from "tslib";
|
2 | import { body, TextParse, BlobParse, BufferParse, JSONParse } from "@pnp/queryable";
|
3 | import { getGUID, isFunc, stringIsNullOrEmpty, isUrlAbsolute } from "@pnp/core";
|
4 | import { _SPCollection, spInvokableFactory, _SPInstance, SPInstance, deleteableWithETag, } from "../spqueryable.js";
|
5 | import { Item } from "../items/index.js";
|
6 | import { odataUrlFrom } from "../utils/odata-url-from.js";
|
7 | import { defaultPath } from "../decorators.js";
|
8 | import { spPost, spGet } from "../operations.js";
|
9 | import { escapeQueryStrValue } from "../utils/escape-query-str.js";
|
10 | import { extractWebUrl } from "../utils/extract-web-url.js";
|
11 | import { toResourcePath } from "../utils/to-resource-path.js";
|
12 | /**
|
13 | * Describes a collection of File objects
|
14 | *
|
15 | */
|
16 | let _Files = class _Files extends _SPCollection {
|
17 | /**
|
18 | * Gets a File by filename
|
19 | *
|
20 | * @param name The name of the file, including extension.
|
21 | */
|
22 | getByUrl(name) {
|
23 | if (/%#/.test(name)) {
|
24 | throw Error("For file names containing % or # please use web.getFileByServerRelativePath");
|
25 | }
|
26 | return File(this).concat(`('${escapeQueryStrValue(name)}')`);
|
27 | }
|
28 | /**
|
29 | * Adds a file using the pound percent safe methods
|
30 | *
|
31 | * @param url Encoded url of the file
|
32 | * @param content The file content
|
33 | * @param parameters Additional parameters to control method behavior
|
34 | */
|
35 | async addUsingPath(url, content, parameters = { Overwrite: false }) {
|
36 | const path = [`AddUsingPath(decodedurl='${escapeQueryStrValue(url)}'`];
|
37 | if (parameters) {
|
38 | if (parameters.Overwrite) {
|
39 | path.push(",Overwrite=true");
|
40 | }
|
41 | if (parameters.AutoCheckoutOnInvalidData) {
|
42 | path.push(",AutoCheckoutOnInvalidData=true");
|
43 | }
|
44 | if (!stringIsNullOrEmpty(parameters.XorHash)) {
|
45 | path.push(`,XorHash=${escapeQueryStrValue(parameters.XorHash)}`);
|
46 | }
|
47 | }
|
48 | path.push(")");
|
49 | const resp = await spPost(Files(this, path.join("")), { body: content });
|
50 | return {
|
51 | data: resp,
|
52 | file: fileFromServerRelativePath(this, resp.ServerRelativeUrl),
|
53 | };
|
54 | }
|
55 | /**
|
56 | * Uploads a file. Not supported for batching
|
57 | *
|
58 | * @param url The folder-relative url of the file.
|
59 | * @param content The Blob file content to add
|
60 | * @param progress A callback function which can be used to track the progress of the upload
|
61 | * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)
|
62 | * @param chunkSize The size of each file slice, in bytes (default: 10485760)
|
63 | * @returns The new File and the raw response.
|
64 | */
|
65 | async addChunked(url, content, progress, shouldOverWrite = true, chunkSize = 10485760) {
|
66 | const response = await spPost(Files(this, `add(overwrite=${shouldOverWrite},url='${escapeQueryStrValue(url)}')`));
|
67 | const file = fileFromServerRelativePath(this, response.ServerRelativeUrl);
|
68 | return await file.setContentChunked(content, progress, chunkSize);
|
69 | }
|
70 | /**
|
71 | * Adds a ghosted file to an existing list or document library. Not supported for batching.
|
72 | *
|
73 | * @param fileUrl The server-relative url where you want to save the file.
|
74 | * @param templateFileType The type of use to create the file.
|
75 | * @returns The template file that was added and the raw response.
|
76 | */
|
77 | async addTemplateFile(fileUrl, templateFileType) {
|
78 | const response = await spPost(Files(this, `addTemplateFile(urloffile='${escapeQueryStrValue(fileUrl)}',templatefiletype=${templateFileType})`));
|
79 | return {
|
80 | data: response,
|
81 | file: fileFromServerRelativePath(this, response.ServerRelativeUrl),
|
82 | };
|
83 | }
|
84 | };
|
85 | _Files = __decorate([
|
86 | defaultPath("files")
|
87 | ], _Files);
|
88 | export { _Files };
|
89 | export const Files = spInvokableFactory(_Files);
|
90 | /**
|
91 | * Describes a single File instance
|
92 | *
|
93 | */
|
94 | export class _File extends _SPInstance {
|
95 | constructor() {
|
96 | super(...arguments);
|
97 | this.delete = deleteableWithETag();
|
98 | }
|
99 | /**
|
100 | * Gets a value that specifies the list item field values for the list item corresponding to the file.
|
101 | *
|
102 | */
|
103 | get listItemAllFields() {
|
104 | return SPInstance(this, "listItemAllFields");
|
105 | }
|
106 | /**
|
107 | * Gets a collection of versions
|
108 | *
|
109 | */
|
110 | get versions() {
|
111 | return Versions(this);
|
112 | }
|
113 | /**
|
114 | * Gets the current locked by user
|
115 | *
|
116 | */
|
117 | async getLockedByUser() {
|
118 | const u = await spGet(File(this, "lockedByUser"));
|
119 | if (u["odata.null"] === true) {
|
120 | return null;
|
121 | }
|
122 | else {
|
123 | return u;
|
124 | }
|
125 | }
|
126 | /**
|
127 | * Approves the file submitted for content approval with the specified comment.
|
128 | * Only documents in lists that are enabled for content approval can be approved.
|
129 | *
|
130 | * @param comment The comment for the approval.
|
131 | */
|
132 | approve(comment = "") {
|
133 | return spPost(File(this, `approve(comment='${escapeQueryStrValue(comment)}')`));
|
134 | }
|
135 | /**
|
136 | * Stops the chunk upload session without saving the uploaded data. Does not support batching.
|
137 | * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.
|
138 | * Use this in response to user action (as in a request to cancel an upload) or an error or exception.
|
139 | * Use the uploadId value that was passed to the StartUpload method that started the upload session.
|
140 | * This method is currently available only on Office 365.
|
141 | *
|
142 | * @param uploadId The unique identifier of the upload session.
|
143 | */
|
144 | cancelUpload(uploadId) {
|
145 | return spPost(File(this, `cancelUpload(uploadId=guid'${uploadId}')`));
|
146 | }
|
147 | /**
|
148 | * Checks the file in to a document library based on the check-in type.
|
149 | *
|
150 | * @param comment A comment for the check-in. Its length must be <= 1023.
|
151 | * @param checkinType The check-in type for the file.
|
152 | */
|
153 | checkin(comment = "", checkinType = CheckinType.Major) {
|
154 | if (comment.length > 1023) {
|
155 | throw Error("The maximum comment length is 1023 characters.");
|
156 | }
|
157 | return spPost(File(this, `checkin(comment='${escapeQueryStrValue(comment)}',checkintype=${checkinType})`));
|
158 | }
|
159 | /**
|
160 | * Checks out the file from a document library.
|
161 | */
|
162 | checkout() {
|
163 | return spPost(File(this, "checkout"));
|
164 | }
|
165 | /**
|
166 | * Copies the file to the destination url.
|
167 | *
|
168 | * @param url The absolute url or server relative url of the destination file path to copy to.
|
169 | * @param shouldOverWrite Should a file with the same name in the same location be overwritten?
|
170 | */
|
171 | copyTo(url, shouldOverWrite = true) {
|
172 | return spPost(File(this, `copyTo(strnewurl='${escapeQueryStrValue(url)}',boverwrite=${shouldOverWrite})`));
|
173 | }
|
174 | /**
|
175 | * Copies the file by path to destination path.
|
176 | * Also works with different site collections.
|
177 | *
|
178 | * @param destUrl The absolute url or server relative url of the destination file path to copy to.
|
179 | * @param shouldOverWrite Should a file with the same name in the same location be overwritten?
|
180 | * @param keepBoth Keep both if file with the same name in the same location already exists? Only relevant when shouldOverWrite is set to false.
|
181 | */
|
182 | async copyByPath(destUrl, shouldOverWrite, KeepBoth = false) {
|
183 | const { ServerRelativeUrl: srcUrl, ["odata.id"]: absoluteUrl } = await this.select("ServerRelativeUrl")();
|
184 | const webBaseUrl = new URL(extractWebUrl(absoluteUrl));
|
185 | return spPost(File([this, webBaseUrl.toString()], `/_api/SP.MoveCopyUtil.CopyFileByPath(overwrite=@a1)?@a1=${shouldOverWrite}`), body({
|
186 | destPath: toResourcePath(isUrlAbsolute(destUrl) ? destUrl : `${webBaseUrl.protocol}//${webBaseUrl.host}${destUrl}`),
|
187 | options: {
|
188 | KeepBoth,
|
189 | ResetAuthorAndCreatedOnCopy: true,
|
190 | ShouldBypassSharedLocks: true,
|
191 | },
|
192 | srcPath: toResourcePath(isUrlAbsolute(srcUrl) ? srcUrl : `${webBaseUrl.protocol}//${webBaseUrl.host}${srcUrl}`),
|
193 | }));
|
194 | }
|
195 | /**
|
196 | * Denies approval for a file that was submitted for content approval.
|
197 | * Only documents in lists that are enabled for content approval can be denied.
|
198 | *
|
199 | * @param comment The comment for the denial.
|
200 | */
|
201 | deny(comment = "") {
|
202 | if (comment.length > 1023) {
|
203 | throw Error("The maximum comment length is 1023 characters.");
|
204 | }
|
205 | return spPost(File(this, `deny(comment='${escapeQueryStrValue(comment)}')`));
|
206 | }
|
207 | /**
|
208 | * Moves the file by path to the specified destination url.
|
209 | * Also works with different site collections.
|
210 | *
|
211 | * @param destUrl The absolute url or server relative url of the destination file path to move to.
|
212 | * @param shouldOverWrite Should a file with the same name in the same location be overwritten?
|
213 | * @param keepBoth Keep both if file with the same name in the same location already exists? Only relevant when shouldOverWrite is set to false.
|
214 | */
|
215 | async moveByPath(destUrl, shouldOverWrite, KeepBoth = false) {
|
216 | const { ServerRelativeUrl: srcUrl, ["odata.id"]: absoluteUrl } = await this.select("ServerRelativeUrl")();
|
217 | const webBaseUrl = new URL(extractWebUrl(absoluteUrl));
|
218 | return spPost(File([this, webBaseUrl.toString()], `/_api/SP.MoveCopyUtil.MoveFileByPath(overwrite=@a1)?@a1=${shouldOverWrite}`), body({
|
219 | destPath: toResourcePath(isUrlAbsolute(destUrl) ? destUrl : `${webBaseUrl.protocol}//${webBaseUrl.host}${destUrl}`),
|
220 | options: {
|
221 | KeepBoth,
|
222 | ResetAuthorAndCreatedOnCopy: false,
|
223 | ShouldBypassSharedLocks: true,
|
224 | },
|
225 | srcPath: toResourcePath(isUrlAbsolute(srcUrl) ? srcUrl : `${webBaseUrl.protocol}//${webBaseUrl.host}${srcUrl}`),
|
226 | }));
|
227 | }
|
228 | /**
|
229 | * Submits the file for content approval with the specified comment.
|
230 | *
|
231 | * @param comment The comment for the published file. Its length must be <= 1023.
|
232 | */
|
233 | publish(comment = "") {
|
234 | if (comment.length > 1023) {
|
235 | throw Error("The maximum comment length is 1023 characters.");
|
236 | }
|
237 | return spPost(File(this, `publish(comment='${escapeQueryStrValue(comment)}')`));
|
238 | }
|
239 | /**
|
240 | * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.
|
241 | *
|
242 | * @returns The GUID of the recycled file.
|
243 | */
|
244 | recycle() {
|
245 | return spPost(File(this, "recycle"));
|
246 | }
|
247 | /**
|
248 | * Deletes the file object with options.
|
249 | *
|
250 | * @param parameters Specifies the options to use when deleting a file.
|
251 | */
|
252 | async deleteWithParams(parameters) {
|
253 | return spPost(File(this, "DeleteWithParameters"), body({ parameters }));
|
254 | }
|
255 | /**
|
256 | * Reverts an existing checkout for the file.
|
257 | *
|
258 | */
|
259 | undoCheckout() {
|
260 | return spPost(File(this, "undoCheckout"));
|
261 | }
|
262 | /**
|
263 | * Removes the file from content approval or unpublish a major version.
|
264 | *
|
265 | * @param comment The comment for the unpublish operation. Its length must be <= 1023.
|
266 | */
|
267 | unpublish(comment = "") {
|
268 | if (comment.length > 1023) {
|
269 | throw Error("The maximum comment length is 1023 characters.");
|
270 | }
|
271 | return spPost(File(this, `unpublish(comment='${escapeQueryStrValue(comment)}')`));
|
272 | }
|
273 | /**
|
274 | * Checks to see if the file represented by this object exists
|
275 | *
|
276 | */
|
277 | async exists() {
|
278 | try {
|
279 | const r = await File(this).select("Exists")();
|
280 | return r.Exists;
|
281 | }
|
282 | catch (e) {
|
283 | // this treats any error here as the file not existing, which
|
284 | // might not be true, but is good enough.
|
285 | return false;
|
286 | }
|
287 | }
|
288 | /**
|
289 | * Gets the contents of the file as text. Not supported in batching.
|
290 | *
|
291 | */
|
292 | getText() {
|
293 | return File(this, "$value").using(TextParse())();
|
294 | }
|
295 | /**
|
296 | * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching.
|
297 | *
|
298 | */
|
299 | getBlob() {
|
300 | return File(this, "$value").using(BlobParse())();
|
301 | }
|
302 | /**
|
303 | * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.
|
304 | */
|
305 | getBuffer() {
|
306 | return File(this, "$value").using(BufferParse())();
|
307 | }
|
308 | // (headers({ "binaryStringResponseBody": "true" })
|
309 | /**
|
310 | * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.
|
311 | */
|
312 | getJSON() {
|
313 | return File(this, "$value").using(JSONParse())();
|
314 | }
|
315 | /**
|
316 | * Sets the content of a file, for large files use setContentChunked. Not supported in batching.
|
317 | *
|
318 | * @param content The file content
|
319 | *
|
320 | */
|
321 | async setContent(content) {
|
322 | await spPost(File(this, "$value"), {
|
323 | body: content,
|
324 | headers: {
|
325 | "X-HTTP-Method": "PUT",
|
326 | },
|
327 | });
|
328 | return File(this);
|
329 | }
|
330 | /**
|
331 | * Gets the associated list item for this folder, loading the default properties
|
332 | */
|
333 | async getItem(...selects) {
|
334 | const q = this.listItemAllFields;
|
335 | const d = await q.select(...selects)();
|
336 | return Object.assign(Item([this, odataUrlFrom(d)]), d);
|
337 | }
|
338 | /**
|
339 | * Sets the contents of a file using a chunked upload approach. Not supported in batching.
|
340 | *
|
341 | * @param file The file to upload
|
342 | * @param progress A callback function which can be used to track the progress of the upload
|
343 | * @param chunkSize The size of each file slice, in bytes (default: 10485760)
|
344 | */
|
345 | async setContentChunked(file, progress, chunkSize = 10485760) {
|
346 | if (!isFunc(progress)) {
|
347 | progress = () => null;
|
348 | }
|
349 | const fileSize = (file === null || file === void 0 ? void 0 : file.size) || file.length;
|
350 | const totalBlocks = parseInt((fileSize / chunkSize).toString(), 10) + ((fileSize % chunkSize === 0) ? 1 : 0);
|
351 | const uploadId = getGUID();
|
352 | // report that we are starting
|
353 | progress({ uploadId, blockNumber: 1, chunkSize, currentPointer: 0, fileSize, stage: "starting", totalBlocks });
|
354 | let currentPointer = await File(this).startUpload(uploadId, file.slice(0, chunkSize));
|
355 | // skip the first and last blocks
|
356 | for (let i = 2; i < totalBlocks; i++) {
|
357 | progress({ uploadId, blockNumber: i, chunkSize, currentPointer, fileSize, stage: "continue", totalBlocks });
|
358 | currentPointer = await File(this).continueUpload(uploadId, currentPointer, file.slice(currentPointer, currentPointer + chunkSize));
|
359 | }
|
360 | progress({ uploadId, blockNumber: totalBlocks, chunkSize, currentPointer, fileSize, stage: "finishing", totalBlocks });
|
361 | return File(this).finishUpload(uploadId, currentPointer, file.slice(currentPointer));
|
362 | }
|
363 | /**
|
364 | * Starts a new chunk upload session and uploads the first fragment.
|
365 | * The current file content is not changed when this method completes.
|
366 | * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.
|
367 | * The upload session ends either when you use the CancelUpload method or when you successfully
|
368 | * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.
|
369 | * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,
|
370 | * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.
|
371 | * This method is currently available only on Office 365.
|
372 | *
|
373 | * @param uploadId The unique identifier of the upload session.
|
374 | * @param fragment The file contents.
|
375 | * @returns The size of the total uploaded data in bytes.
|
376 | */
|
377 | async startUpload(uploadId, fragment) {
|
378 | let n = await spPost(File(this, `startUpload(uploadId=guid'${uploadId}')`), { body: fragment });
|
379 | if (typeof n === "object") {
|
380 | // When OData=verbose the payload has the following shape:
|
381 | // { StartUpload: "10485760" }
|
382 | n = n.StartUpload;
|
383 | }
|
384 | return parseFloat(n);
|
385 | }
|
386 | /**
|
387 | * Continues the chunk upload session with an additional fragment.
|
388 | * The current file content is not changed.
|
389 | * Use the uploadId value that was passed to the StartUpload method that started the upload session.
|
390 | * This method is currently available only on Office 365.
|
391 | *
|
392 | * @param uploadId The unique identifier of the upload session.
|
393 | * @param fileOffset The size of the offset into the file where the fragment starts.
|
394 | * @param fragment The file contents.
|
395 | * @returns The size of the total uploaded data in bytes.
|
396 | */
|
397 | async continueUpload(uploadId, fileOffset, fragment) {
|
398 | let n = await spPost(File(this, `continueUpload(uploadId=guid'${uploadId}',fileOffset=${fileOffset})`), { body: fragment });
|
399 | if (typeof n === "object") {
|
400 | // When OData=verbose the payload has the following shape:
|
401 | // { ContinueUpload: "20971520" }
|
402 | n = n.ContinueUpload;
|
403 | }
|
404 | return parseFloat(n);
|
405 | }
|
406 | /**
|
407 | * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.
|
408 | * Use the uploadId value that was passed to the StartUpload method that started the upload session.
|
409 | * This method is currently available only on Office 365.
|
410 | *
|
411 | * @param uploadId The unique identifier of the upload session.
|
412 | * @param fileOffset The size of the offset into the file where the fragment starts.
|
413 | * @param fragment The file contents.
|
414 | * @returns The newly uploaded file.
|
415 | */
|
416 | async finishUpload(uploadId, fileOffset, fragment) {
|
417 | const response = await spPost(File(this, `finishUpload(uploadId=guid'${uploadId}',fileOffset=${fileOffset})`), { body: fragment });
|
418 | return {
|
419 | data: response,
|
420 | file: fileFromServerRelativePath(this, response.ServerRelativeUrl),
|
421 | };
|
422 | }
|
423 | }
|
424 | export const File = spInvokableFactory(_File);
|
425 | /**
|
426 | * Creates an IFile instance given a base object and a server relative path
|
427 | *
|
428 | * @param base Valid SPQueryable from which the observers will be used and the web url extracted
|
429 | * @param serverRelativePath The server relative url to the file (ex: '/sites/dev/documents/file.txt')
|
430 | * @returns IFile instance referencing the file described by the supplied parameters
|
431 | */
|
432 | export function fileFromServerRelativePath(base, serverRelativePath) {
|
433 | return File([base, extractWebUrl(base.toUrl())], `_api/web/getFileByServerRelativePath(decodedUrl='${escapeQueryStrValue(serverRelativePath)}')`);
|
434 | }
|
435 | /**
|
436 | * Describes a collection of Version objects
|
437 | *
|
438 | */
|
439 | let _Versions = class _Versions extends _SPCollection {
|
440 | /**
|
441 | * Gets a version by id
|
442 | *
|
443 | * @param versionId The id of the version to retrieve
|
444 | */
|
445 | getById(versionId) {
|
446 | return Version(this).concat(`(${versionId})`);
|
447 | }
|
448 | /**
|
449 | * Deletes all the file version objects in the collection.
|
450 | *
|
451 | */
|
452 | deleteAll() {
|
453 | return spPost(Versions(this, "deleteAll"));
|
454 | }
|
455 | /**
|
456 | * Deletes the specified version of the file.
|
457 | *
|
458 | * @param versionId The ID of the file version to delete.
|
459 | */
|
460 | deleteById(versionId) {
|
461 | return spPost(Versions(this, `deleteById(vid=${versionId})`));
|
462 | }
|
463 | /**
|
464 | * Recycles the specified version of the file.
|
465 | *
|
466 | * @param versionId The ID of the file version to delete.
|
467 | */
|
468 | recycleByID(versionId) {
|
469 | return spPost(Versions(this, `recycleByID(vid=${versionId})`));
|
470 | }
|
471 | /**
|
472 | * Deletes the file version object with the specified version label.
|
473 | *
|
474 | * @param label The version label of the file version to delete, for example: 1.2
|
475 | */
|
476 | deleteByLabel(label) {
|
477 | return spPost(Versions(this, `deleteByLabel(versionlabel='${escapeQueryStrValue(label)}')`));
|
478 | }
|
479 | /**
|
480 | * Recycles the file version object with the specified version label.
|
481 | *
|
482 | * @param label The version label of the file version to delete, for example: 1.2
|
483 | */
|
484 | recycleByLabel(label) {
|
485 | return spPost(Versions(this, `recycleByLabel(versionlabel='${escapeQueryStrValue(label)}')`));
|
486 | }
|
487 | /**
|
488 | * Creates a new file version from the file specified by the version label.
|
489 | *
|
490 | * @param label The version label of the file version to restore, for example: 1.2
|
491 | */
|
492 | restoreByLabel(label) {
|
493 | return spPost(Versions(this, `restoreByLabel(versionlabel='${escapeQueryStrValue(label)}')`));
|
494 | }
|
495 | };
|
496 | _Versions = __decorate([
|
497 | defaultPath("versions")
|
498 | ], _Versions);
|
499 | export { _Versions };
|
500 | export const Versions = spInvokableFactory(_Versions);
|
501 | /**
|
502 | * Describes a single Version instance
|
503 | *
|
504 | */
|
505 | export class _Version extends _SPInstance {
|
506 | }
|
507 | export const Version = spInvokableFactory(_Version);
|
508 | /**
|
509 | * Types for document check in.
|
510 | * Minor = 0
|
511 | * Major = 1
|
512 | * Overwrite = 2
|
513 | */
|
514 | export var CheckinType;
|
515 | (function (CheckinType) {
|
516 | CheckinType[CheckinType["Minor"] = 0] = "Minor";
|
517 | CheckinType[CheckinType["Major"] = 1] = "Major";
|
518 | CheckinType[CheckinType["Overwrite"] = 2] = "Overwrite";
|
519 | })(CheckinType || (CheckinType = {}));
|
520 | /**
|
521 | * File move opertions
|
522 | */
|
523 | export var MoveOperations;
|
524 | (function (MoveOperations) {
|
525 | /**
|
526 | * Produce an error if a file with the same name exists in the destination
|
527 | */
|
528 | MoveOperations[MoveOperations["None"] = 0] = "None";
|
529 | /**
|
530 | * Overwrite a file with the same name if it exists. Value is 1.
|
531 | */
|
532 | MoveOperations[MoveOperations["Overwrite"] = 1] = "Overwrite";
|
533 | /**
|
534 | * Complete the move operation even if supporting files are separated from the file. Value is 8.
|
535 | */
|
536 | MoveOperations[MoveOperations["AllowBrokenThickets"] = 8] = "AllowBrokenThickets";
|
537 | /**
|
538 | * Boolean specifying whether to retain the source of the move's editor and modified by datetime.
|
539 | */
|
540 | MoveOperations[MoveOperations["RetainEditorAndModifiedOnMove"] = 2048] = "RetainEditorAndModifiedOnMove";
|
541 | })(MoveOperations || (MoveOperations = {}));
|
542 | export var TemplateFileType;
|
543 | (function (TemplateFileType) {
|
544 | TemplateFileType[TemplateFileType["StandardPage"] = 0] = "StandardPage";
|
545 | TemplateFileType[TemplateFileType["WikiPage"] = 1] = "WikiPage";
|
546 | TemplateFileType[TemplateFileType["FormPage"] = 2] = "FormPage";
|
547 | TemplateFileType[TemplateFileType["ClientSidePage"] = 3] = "ClientSidePage";
|
548 | })(TemplateFileType || (TemplateFileType = {}));
|
549 | //# sourceMappingURL=types.js.map |
\ | No newline at end of file |