@esri/solution-form 4.1.2 → 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.
Files changed (41) hide show
  1. package/dist/cjs/convert-item-to-template.d.ts +32 -32
  2. package/dist/cjs/convert-item-to-template.js +34 -34
  3. package/dist/cjs/create-item-from-template.d.ts +31 -31
  4. package/dist/cjs/create-item-from-template.js +39 -39
  5. package/dist/cjs/helpers/build-create-params.d.ts +30 -30
  6. package/dist/cjs/helpers/build-create-params.js +77 -77
  7. package/dist/cjs/helpers/create-item-from-hub-template.d.ts +32 -32
  8. package/dist/cjs/helpers/create-item-from-hub-template.js +79 -79
  9. package/dist/cjs/helpers/create-survey.d.ts +30 -30
  10. package/dist/cjs/helpers/create-survey.js +59 -59
  11. package/dist/cjs/helpers/encode-survey-form.d.ts +28 -28
  12. package/dist/cjs/helpers/encode-survey-form.js +58 -58
  13. package/dist/cjs/helpers/is-hub-form-template.d.ts +24 -24
  14. package/dist/cjs/helpers/is-hub-form-template.js +32 -32
  15. package/dist/cjs/helpers/post-process-survey.d.ts +33 -33
  16. package/dist/cjs/helpers/post-process-survey.js +81 -81
  17. package/dist/cjs/index.d.ts +23 -23
  18. package/dist/cjs/index.js +26 -26
  19. package/dist/cjs/post-process.d.ts +32 -32
  20. package/dist/cjs/post-process.js +43 -43
  21. package/dist/esm/convert-item-to-template.d.ts +32 -32
  22. package/dist/esm/convert-item-to-template.js +30 -30
  23. package/dist/esm/create-item-from-template.d.ts +31 -31
  24. package/dist/esm/create-item-from-template.js +35 -35
  25. package/dist/esm/helpers/build-create-params.d.ts +30 -30
  26. package/dist/esm/helpers/build-create-params.js +73 -73
  27. package/dist/esm/helpers/create-item-from-hub-template.d.ts +32 -32
  28. package/dist/esm/helpers/create-item-from-hub-template.js +75 -75
  29. package/dist/esm/helpers/create-survey.d.ts +30 -30
  30. package/dist/esm/helpers/create-survey.js +55 -55
  31. package/dist/esm/helpers/encode-survey-form.d.ts +28 -28
  32. package/dist/esm/helpers/encode-survey-form.js +54 -54
  33. package/dist/esm/helpers/is-hub-form-template.d.ts +24 -24
  34. package/dist/esm/helpers/is-hub-form-template.js +27 -27
  35. package/dist/esm/helpers/post-process-survey.d.ts +33 -33
  36. package/dist/esm/helpers/post-process-survey.js +77 -77
  37. package/dist/esm/index.d.ts +23 -23
  38. package/dist/esm/index.js +23 -23
  39. package/dist/esm/post-process.d.ts +32 -32
  40. package/dist/esm/post-process.js +39 -39
  41. package/package.json +8 -8
@@ -1,33 +1,33 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { UserSession, IItemTemplate } from "@esri/solution-common";
17
- /**
18
- * Provides utility method to post process Hub surveys
19
- *
20
- * @module post-process-survey
21
- */
22
- /**
23
- * Performs Survey post processing actions
24
- *
25
- * @param {string} itemId The item ID
26
- * @param {string} type The template/item type
27
- * @param {any[]} itemInfos An Array of item details
28
- * @param {IItemTemplate} template The template
29
- * @param {any} templateDictionary The template dictionary
30
- * @param {UserSession} authentication The destination session info
31
- * @returns {Promise<any>}
32
- */
33
- export declare function postProcessHubSurvey(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<any>;
1
+ /** @license
2
+ * Copyright 2020 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { UserSession, IItemTemplate } from "@esri/solution-common";
17
+ /**
18
+ * Provides utility method to post process Hub surveys
19
+ *
20
+ * @module post-process-survey
21
+ */
22
+ /**
23
+ * Performs Survey post processing actions
24
+ *
25
+ * @param {string} itemId The item ID
26
+ * @param {string} type The template/item type
27
+ * @param {any[]} itemInfos An Array of item details
28
+ * @param {IItemTemplate} template The template
29
+ * @param {any} templateDictionary The template dictionary
30
+ * @param {UserSession} authentication The destination session info
31
+ * @returns {Promise<any>}
32
+ */
33
+ export declare function postProcessHubSurvey(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<any>;
@@ -1,82 +1,82 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2020 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.postProcessHubSurvey = void 0;
19
- const solution_common_1 = require("@esri/solution-common");
20
- const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
21
- /**
22
- * Provides utility method to post process Hub surveys
23
- *
24
- * @module post-process-survey
25
- */
26
- /**
27
- * Performs Survey post processing actions
28
- *
29
- * @param {string} itemId The item ID
30
- * @param {string} type The template/item type
31
- * @param {any[]} itemInfos An Array of item details
32
- * @param {IItemTemplate} template The template
33
- * @param {any} templateDictionary The template dictionary
34
- * @param {UserSession} authentication The destination session info
35
- * @returns {Promise<any>}
36
- */
37
- function postProcessHubSurvey(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
38
- const featureServiceSourceId = template.properties.info.serviceInfo.itemId;
39
- const { itemId: featureServiceResultId } = templateDictionary[featureServiceSourceId];
40
- const interpolated = (0, solution_common_1.replaceInTemplate)(template, templateDictionary);
41
- return (0, solution_common_1.getItemBase)(featureServiceResultId, authentication).then(featureServiceResultBase => {
42
- const itemUpdates = [
43
- // fix/update form properties we couldn't control via the API
44
- {
45
- id: itemId,
46
- title: interpolated.item.title,
47
- snippet: interpolated.item.snippet,
48
- extent: interpolated.item.extent,
49
- culture: interpolated.item.culture
50
- },
51
- // fix/update feature service properties we couldn't control via the API
52
- {
53
- id: featureServiceResultId,
54
- extent: interpolated.item.extent,
55
- typeKeywords: [`source-${featureServiceSourceId}`].concat(featureServiceResultBase.typeKeywords)
56
- }
57
- ];
58
- const toUpdatePromise = (updatedItem) => (0, solution_common_1.updateItem)(updatedItem, authentication);
59
- const updatePromises = itemUpdates.map(toUpdatePromise);
60
- return Promise.all(updatePromises)
61
- .then(() => {
62
- const itemIdsToMove = [itemId, featureServiceResultId];
63
- const toMovePromise = (id) => (0, arcgis_rest_portal_1.moveItem)({
64
- itemId: id,
65
- folderId: templateDictionary.folderId,
66
- authentication: authentication
67
- });
68
- const movePromises = itemIdsToMove.map(toMovePromise);
69
- return Promise.all(movePromises);
70
- })
71
- .then(() => (0, solution_common_1.removeFolder)(featureServiceResultBase.ownerFolder, authentication))
72
- .then(() => {
73
- // Create a template item for the Feature Service that was created by the API
74
- const featureServiceTemplate = (0, solution_common_1.createInitializedItemTemplate)(featureServiceResultBase);
75
- templates.push(featureServiceTemplate);
76
- template.dependencies.push(featureServiceResultBase.id);
77
- return true;
78
- });
79
- });
80
- }
81
- exports.postProcessHubSurvey = postProcessHubSurvey;
1
+ "use strict";
2
+ /** @license
3
+ * Copyright 2020 Esri
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.postProcessHubSurvey = void 0;
19
+ const solution_common_1 = require("@esri/solution-common");
20
+ const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
21
+ /**
22
+ * Provides utility method to post process Hub surveys
23
+ *
24
+ * @module post-process-survey
25
+ */
26
+ /**
27
+ * Performs Survey post processing actions
28
+ *
29
+ * @param {string} itemId The item ID
30
+ * @param {string} type The template/item type
31
+ * @param {any[]} itemInfos An Array of item details
32
+ * @param {IItemTemplate} template The template
33
+ * @param {any} templateDictionary The template dictionary
34
+ * @param {UserSession} authentication The destination session info
35
+ * @returns {Promise<any>}
36
+ */
37
+ function postProcessHubSurvey(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
38
+ const featureServiceSourceId = template.properties.info.serviceInfo.itemId;
39
+ const { itemId: featureServiceResultId } = templateDictionary[featureServiceSourceId];
40
+ const interpolated = (0, solution_common_1.replaceInTemplate)(template, templateDictionary);
41
+ return (0, solution_common_1.getItemBase)(featureServiceResultId, authentication).then(featureServiceResultBase => {
42
+ const itemUpdates = [
43
+ // fix/update form properties we couldn't control via the API
44
+ {
45
+ id: itemId,
46
+ title: interpolated.item.title,
47
+ snippet: interpolated.item.snippet,
48
+ extent: interpolated.item.extent,
49
+ culture: interpolated.item.culture
50
+ },
51
+ // fix/update feature service properties we couldn't control via the API
52
+ {
53
+ id: featureServiceResultId,
54
+ extent: interpolated.item.extent,
55
+ typeKeywords: [`source-${featureServiceSourceId}`].concat(featureServiceResultBase.typeKeywords)
56
+ }
57
+ ];
58
+ const toUpdatePromise = (updatedItem) => (0, solution_common_1.updateItem)(updatedItem, authentication);
59
+ const updatePromises = itemUpdates.map(toUpdatePromise);
60
+ return Promise.all(updatePromises)
61
+ .then(() => {
62
+ const itemIdsToMove = [itemId, featureServiceResultId];
63
+ const toMovePromise = (id) => (0, arcgis_rest_portal_1.moveItem)({
64
+ itemId: id,
65
+ folderId: templateDictionary.folderId,
66
+ authentication: authentication
67
+ });
68
+ const movePromises = itemIdsToMove.map(toMovePromise);
69
+ return Promise.all(movePromises);
70
+ })
71
+ .then(() => (0, solution_common_1.removeFolder)(featureServiceResultBase.ownerFolder, authentication))
72
+ .then(() => {
73
+ // Create a template item for the Feature Service that was created by the API
74
+ const featureServiceTemplate = (0, solution_common_1.createInitializedItemTemplate)(featureServiceResultBase);
75
+ templates.push(featureServiceTemplate);
76
+ template.dependencies.push(featureServiceResultBase.id);
77
+ return true;
78
+ });
79
+ });
80
+ }
81
+ exports.postProcessHubSurvey = postProcessHubSurvey;
82
82
  //# sourceMappingURL=post-process-survey.js.map
@@ -1,23 +1,23 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the creation and deployment of form item types.
18
- *
19
- * @module solution-form
20
- */
21
- export * from "./convert-item-to-template";
22
- export * from "./create-item-from-template";
23
- export * from "./post-process";
1
+ /** @license
2
+ * Copyright 2018 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Manages the creation and deployment of form item types.
18
+ *
19
+ * @module solution-form
20
+ */
21
+ export * from "./convert-item-to-template";
22
+ export * from "./create-item-from-template";
23
+ export * from "./post-process";
package/dist/cjs/index.js CHANGED
@@ -1,27 +1,27 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2018 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const tslib_1 = require("tslib");
19
- /**
20
- * Manages the creation and deployment of form item types.
21
- *
22
- * @module solution-form
23
- */
24
- tslib_1.__exportStar(require("./convert-item-to-template"), exports);
25
- tslib_1.__exportStar(require("./create-item-from-template"), exports);
26
- tslib_1.__exportStar(require("./post-process"), exports);
1
+ "use strict";
2
+ /** @license
3
+ * Copyright 2018 Esri
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const tslib_1 = require("tslib");
19
+ /**
20
+ * Manages the creation and deployment of form item types.
21
+ *
22
+ * @module solution-form
23
+ */
24
+ tslib_1.__exportStar(require("./convert-item-to-template"), exports);
25
+ tslib_1.__exportStar(require("./create-item-from-template"), exports);
26
+ tslib_1.__exportStar(require("./post-process"), exports);
27
27
  //# sourceMappingURL=index.js.map
@@ -1,32 +1,32 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the creation and deployment of form item types.
18
- *
19
- * @module post-process
20
- */
21
- import { UserSession, IItemTemplate } from "@esri/solution-common";
22
- /**
23
- * Form post-processing actions
24
- *
25
- * @param {string} itemId The item ID
26
- * @param {string} type The template type
27
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
28
- * @param {any} templateDictionary The template dictionary
29
- * @param {UserSession} authentication The destination session info
30
- * @returns Promise resolving to successfulness of update
31
- */
32
- export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<any>;
1
+ /** @license
2
+ * Copyright 2018 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Manages the creation and deployment of form item types.
18
+ *
19
+ * @module post-process
20
+ */
21
+ import { UserSession, IItemTemplate } from "@esri/solution-common";
22
+ /**
23
+ * Form post-processing actions
24
+ *
25
+ * @param {string} itemId The item ID
26
+ * @param {string} type The template type
27
+ * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
28
+ * @param {any} templateDictionary The template dictionary
29
+ * @param {UserSession} authentication The destination session info
30
+ * @returns Promise resolving to successfulness of update
31
+ */
32
+ export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<any>;
@@ -1,44 +1,44 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2018 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.postProcess = void 0;
19
- /**
20
- * Manages the creation and deployment of form item types.
21
- *
22
- * @module post-process
23
- */
24
- const solution_common_1 = require("@esri/solution-common");
25
- const is_hub_form_template_1 = require("./helpers/is-hub-form-template");
26
- const post_process_survey_1 = require("./helpers/post-process-survey");
27
- /**
28
- * Form post-processing actions
29
- *
30
- * @param {string} itemId The item ID
31
- * @param {string} type The template type
32
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
33
- * @param {any} templateDictionary The template dictionary
34
- * @param {UserSession} authentication The destination session info
35
- * @returns Promise resolving to successfulness of update
36
- */
37
- function postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
38
- if ((0, is_hub_form_template_1.isHubFormTemplate)(template)) {
39
- return (0, post_process_survey_1.postProcessHubSurvey)(itemId, type, itemInfos, template, templates, templateDictionary, authentication);
40
- }
41
- return (0, solution_common_1.updateItemTemplateFromDictionary)(itemId, templateDictionary, authentication);
42
- }
43
- exports.postProcess = postProcess;
1
+ "use strict";
2
+ /** @license
3
+ * Copyright 2018 Esri
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.postProcess = void 0;
19
+ /**
20
+ * Manages the creation and deployment of form item types.
21
+ *
22
+ * @module post-process
23
+ */
24
+ const solution_common_1 = require("@esri/solution-common");
25
+ const is_hub_form_template_1 = require("./helpers/is-hub-form-template");
26
+ const post_process_survey_1 = require("./helpers/post-process-survey");
27
+ /**
28
+ * Form post-processing actions
29
+ *
30
+ * @param {string} itemId The item ID
31
+ * @param {string} type The template type
32
+ * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
33
+ * @param {any} templateDictionary The template dictionary
34
+ * @param {UserSession} authentication The destination session info
35
+ * @returns Promise resolving to successfulness of update
36
+ */
37
+ function postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
38
+ if ((0, is_hub_form_template_1.isHubFormTemplate)(template)) {
39
+ return (0, post_process_survey_1.postProcessHubSurvey)(itemId, type, itemInfos, template, templates, templateDictionary, authentication);
40
+ }
41
+ return (0, solution_common_1.updateItemTemplateFromDictionary)(itemId, templateDictionary, authentication);
42
+ }
43
+ exports.postProcess = postProcess;
44
44
  //# sourceMappingURL=post-process.js.map
@@ -1,32 +1,32 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Manages the creation of Form templates
18
- *
19
- * @module convert-item-to-template
20
- */
21
- import { UserSession, IItemTemplate } from "@esri/solution-common";
22
- /**
23
- * Creates a template from a Form item
24
- *
25
- * @param {string} solutionItemId The solution item ID
26
- * @param {any} itemInfo: The base item info
27
- * @param {UserSession} destAuthentication Credentials for requests to the destination organization
28
- * @param {UserSession} srcAuthentication Credentials for requests to source items
29
- * @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
30
- * @returns {Promise<IItemTemplate>}
31
- */
32
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
1
+ /** @license
2
+ * Copyright 2018 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * Manages the creation of Form templates
18
+ *
19
+ * @module convert-item-to-template
20
+ */
21
+ import { UserSession, IItemTemplate } from "@esri/solution-common";
22
+ /**
23
+ * Creates a template from a Form item
24
+ *
25
+ * @param {string} solutionItemId The solution item ID
26
+ * @param {any} itemInfo: The base item info
27
+ * @param {UserSession} destAuthentication Credentials for requests to the destination organization
28
+ * @param {UserSession} srcAuthentication Credentials for requests to source items
29
+ * @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
30
+ * @returns {Promise<IItemTemplate>}
31
+ */
32
+ export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
@@ -1,31 +1,31 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { simpleTypes } from "@esri/solution-simple-types";
17
- /**
18
- * Creates a template from a Form item
19
- *
20
- * @param {string} solutionItemId The solution item ID
21
- * @param {any} itemInfo: The base item info
22
- * @param {UserSession} destAuthentication Credentials for requests to the destination organization
23
- * @param {UserSession} srcAuthentication Credentials for requests to source items
24
- * @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
25
- * @returns {Promise<IItemTemplate>}
26
- */
27
- export function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
28
- // Delegate to simple types
29
- return simpleTypes.convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary);
30
- }
1
+ /** @license
2
+ * Copyright 2018 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { simpleTypes } from "@esri/solution-simple-types";
17
+ /**
18
+ * Creates a template from a Form item
19
+ *
20
+ * @param {string} solutionItemId The solution item ID
21
+ * @param {any} itemInfo: The base item info
22
+ * @param {UserSession} destAuthentication Credentials for requests to the destination organization
23
+ * @param {UserSession} srcAuthentication Credentials for requests to source items
24
+ * @param {any} templateDictionary Hash of facts: folder id, org URL, adlib replacements
25
+ * @returns {Promise<IItemTemplate>}
26
+ */
27
+ export function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
28
+ // Delegate to simple types
29
+ return simpleTypes.convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary);
30
+ }
31
31
  //# sourceMappingURL=convert-item-to-template.js.map