@esri/solution-simple-types 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 (69) hide show
  1. package/dist/cjs/dashboard.d.ts +93 -93
  2. package/dist/cjs/dashboard.js +352 -352
  3. package/dist/cjs/helpers/convert-item-to-template.d.ts +46 -46
  4. package/dist/cjs/helpers/convert-item-to-template.js +235 -209
  5. package/dist/cjs/helpers/convert-item-to-template.js.map +1 -1
  6. package/dist/cjs/helpers/create-item-from-template.d.ts +17 -17
  7. package/dist/cjs/helpers/create-item-from-template.js +153 -138
  8. package/dist/cjs/helpers/create-item-from-template.js.map +1 -1
  9. package/dist/cjs/helpers/notebook-helpers.d.ts +19 -19
  10. package/dist/cjs/helpers/notebook-helpers.js +24 -24
  11. package/dist/cjs/helpers/quickcapture-helpers.d.ts +18 -18
  12. package/dist/cjs/helpers/quickcapture-helpers.js +22 -22
  13. package/dist/cjs/helpers/simple-type-helpers.d.ts +18 -18
  14. package/dist/cjs/helpers/simple-type-helpers.js +22 -22
  15. package/dist/cjs/helpers/update-notebook-data.d.ts +17 -17
  16. package/dist/cjs/helpers/update-notebook-data.js +27 -27
  17. package/dist/cjs/index.d.ts +27 -27
  18. package/dist/cjs/index.js +36 -36
  19. package/dist/cjs/notebook.d.ts +66 -66
  20. package/dist/cjs/notebook.js +133 -133
  21. package/dist/cjs/oic.d.ts +53 -53
  22. package/dist/cjs/oic.js +170 -170
  23. package/dist/cjs/quickcapture.d.ts +76 -87
  24. package/dist/cjs/quickcapture.js +143 -192
  25. package/dist/cjs/quickcapture.js.map +1 -1
  26. package/dist/cjs/simple-types.d.ts +57 -57
  27. package/dist/cjs/simple-types.js +94 -94
  28. package/dist/cjs/webmap.d.ts +102 -102
  29. package/dist/cjs/webmap.js +325 -325
  30. package/dist/cjs/webmappingapplication.d.ts +176 -176
  31. package/dist/cjs/webmappingapplication.js +674 -674
  32. package/dist/cjs/webmappingapplication.js.map +1 -1
  33. package/dist/cjs/workforce.d.ts +34 -34
  34. package/dist/cjs/workforce.js +44 -44
  35. package/dist/esm/dashboard.d.ts +93 -93
  36. package/dist/esm/dashboard.js +339 -339
  37. package/dist/esm/helpers/convert-item-to-template.d.ts +46 -46
  38. package/dist/esm/helpers/convert-item-to-template.js +228 -202
  39. package/dist/esm/helpers/convert-item-to-template.js.map +1 -1
  40. package/dist/esm/helpers/create-item-from-template.d.ts +17 -17
  41. package/dist/esm/helpers/create-item-from-template.js +148 -133
  42. package/dist/esm/helpers/create-item-from-template.js.map +1 -1
  43. package/dist/esm/helpers/notebook-helpers.d.ts +19 -19
  44. package/dist/esm/helpers/notebook-helpers.js +20 -20
  45. package/dist/esm/helpers/quickcapture-helpers.d.ts +18 -18
  46. package/dist/esm/helpers/quickcapture-helpers.js +19 -19
  47. package/dist/esm/helpers/simple-type-helpers.d.ts +18 -18
  48. package/dist/esm/helpers/simple-type-helpers.js +19 -19
  49. package/dist/esm/helpers/update-notebook-data.d.ts +17 -17
  50. package/dist/esm/helpers/update-notebook-data.js +23 -23
  51. package/dist/esm/index.d.ts +27 -27
  52. package/dist/esm/index.js +27 -27
  53. package/dist/esm/notebook.d.ts +66 -66
  54. package/dist/esm/notebook.js +123 -123
  55. package/dist/esm/oic.d.ts +53 -53
  56. package/dist/esm/oic.js +162 -162
  57. package/dist/esm/quickcapture.d.ts +76 -87
  58. package/dist/esm/quickcapture.js +131 -179
  59. package/dist/esm/quickcapture.js.map +1 -1
  60. package/dist/esm/simple-types.d.ts +57 -57
  61. package/dist/esm/simple-types.js +86 -86
  62. package/dist/esm/webmap.d.ts +102 -102
  63. package/dist/esm/webmap.js +312 -312
  64. package/dist/esm/webmappingapplication.d.ts +176 -176
  65. package/dist/esm/webmappingapplication.js +648 -648
  66. package/dist/esm/webmappingapplication.js.map +1 -1
  67. package/dist/esm/workforce.d.ts +34 -34
  68. package/dist/esm/workforce.js +38 -38
  69. package/package.json +6 -6
@@ -1,193 +1,144 @@
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 = exports.createItemFromTemplate = exports._templatizeId = exports._templatizeUrl = exports._updateDependencies = exports._templatizeAdminEmail = exports._templatizeApplication = exports.convertQuickCaptureToTemplate = exports.convertItemToTemplate = void 0;
19
- const tslib_1 = require("tslib");
20
- const common = tslib_1.__importStar(require("@esri/solution-common"));
21
- const quickcaptureHelpers = tslib_1.__importStar(require("./helpers/quickcapture-helpers"));
22
- //#region Publish Process ---------------------------------------------------------------------------------------//
23
- /**
24
- * Converts a Quick Capture item into a template.
25
- *
26
- * @param solutionItemId The solution to contain the template
27
- * @param itemInfo Info about the item
28
- * @param destAuthentication Credentials for requests to the destination organization
29
- * @param srcAuthentication Credentials for requests to source items
30
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
31
- * @returns A promise that will resolve when the template has been created
32
- */
33
- function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
34
- // Delegate back to simple-types, which will in-turn delegate
35
- // to convertNotebookToTemplate at the correct point in the process
36
- // This is a temporary refactor step
37
- return quickcaptureHelpers.convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary);
38
- }
39
- exports.convertItemToTemplate = convertItemToTemplate;
40
- /**
41
- * Converts an quick capture item to a template.
42
- *
43
- * @param itemTemplate template for the quick capture project item
44
- * @returns templatized itemTemplate
45
- */
46
- function convertQuickCaptureToTemplate(itemTemplate) {
47
- return new Promise((resolve, reject) => {
48
- // The templates data to process
49
- const data = itemTemplate.data;
50
- if (data && Array.isArray(data)) {
51
- let applicationRequest = Promise.resolve(null);
52
- let applicationName = "";
53
- data.some((item) => {
54
- if (item.type === "application/json") {
55
- applicationName = item.name;
56
- applicationRequest = common.getBlobText(item);
57
- return true;
58
- }
59
- });
60
- applicationRequest.then(result => {
61
- // replace the template data array with the templatized application JSON
62
- itemTemplate.data = result
63
- ? {
64
- application: _templatizeApplication(JSON.parse(result), itemTemplate),
65
- name: applicationName
66
- }
67
- : {};
68
- resolve(itemTemplate);
69
- }, reject);
70
- }
71
- else {
72
- resolve(itemTemplate);
73
- }
74
- });
75
- }
76
- exports.convertQuickCaptureToTemplate = convertQuickCaptureToTemplate;
77
- /**
78
- * Templatizes key properties for a quick capture project and gathers item dependencies
79
- *
80
- * @param data the projects json
81
- * @param itemTemplate template for the quick capture project item
82
- * @returns templatized itemTemplate
83
- * @private
84
- */
85
- function _templatizeApplication(data, itemTemplate) {
86
- // Quick Project item id
87
- _templatizeId(data, "itemId");
88
- // Set the admin email
89
- _templatizeAdminEmail(data);
90
- // datasource item id and url
91
- const dataSources = data.dataSources;
92
- if (dataSources && Array.isArray(dataSources)) {
93
- dataSources.forEach(ds => {
94
- const id = ds.featureServiceItemId;
95
- if (id) {
96
- _updateDependencies(id, itemTemplate);
97
- _templatizeUrl(ds, "featureServiceItemId", "url");
98
- _templatizeId(ds, "featureServiceItemId");
99
- }
100
- });
101
- }
102
- return data;
103
- }
104
- exports._templatizeApplication = _templatizeApplication;
105
- /**
106
- * Templatize the email property
107
- *
108
- * @param data the quick capture application
109
- * @private
110
- */
111
- function _templatizeAdminEmail(data) {
112
- if (common.getProp(data, "preferences.adminEmail")) {
113
- common.setProp(data, "preferences.adminEmail", "{{user.email}}");
114
- }
115
- }
116
- exports._templatizeAdminEmail = _templatizeAdminEmail;
117
- /**
118
- * Updates the templates dependencies list with unique item ids
119
- *
120
- * @param id the item id of the dependency
121
- * @param itemTemplate template for the quick capture project item
122
- * @returns templatized itemTemplate
123
- */
124
- function _updateDependencies(id, itemTemplate) {
125
- if (itemTemplate.dependencies.indexOf(id) === -1) {
126
- itemTemplate.dependencies.push(id);
127
- }
128
- }
129
- exports._updateDependencies = _updateDependencies;
130
- /**
131
- * Templatize a url property
132
- *
133
- * @param obj the datasource object
134
- * @param idPath the path to the id property
135
- * @param urlPath the path to the url property
136
- * @private
137
- */
138
- function _templatizeUrl(obj, idPath, urlPath) {
139
- const id = common.getProp(obj, idPath);
140
- const url = common.getProp(obj, urlPath);
141
- if (url) {
142
- const layerId = url.substr(url.lastIndexOf("/") + 1);
143
- common.setProp(obj, urlPath, common.templatizeTerm(id, id, ".layer" + layerId + ".url"));
144
- }
145
- }
146
- exports._templatizeUrl = _templatizeUrl;
147
- /**
148
- * Templatize the item id property
149
- *
150
- * @param obj the datasource or object that contains the item id property
151
- * @param path the path to the id property
152
- * @private
153
- */
154
- function _templatizeId(obj, path) {
155
- const id = common.getProp(obj, path);
156
- if (id) {
157
- common.setProp(obj, path, common.templatizeTerm(id, id, ".itemId"));
158
- }
159
- }
160
- exports._templatizeId = _templatizeId;
161
- //#endregion
162
- //#region Deploy Process ---------------------------------------------------------------------------------------//
163
- // Delegate back to simple-types
164
- // This is a temporary refactor step
165
- function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
166
- return quickcaptureHelpers.createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback);
167
- }
168
- exports.createItemFromTemplate = createItemFromTemplate;
169
- /**
170
- * QuickCapture post-processing actions
171
- *
172
- * @param {string} itemId The item ID
173
- * @param {string} type The template type
174
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
175
- * @param {any} templateDictionary The template dictionary
176
- * @param {UserSession} authentication The destination session info
177
- * @returns Promise resolving to successfulness of update
178
- */
179
- function postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
180
- return new Promise((resolve, reject) => {
181
- template.data = common.replaceInTemplate(template.data, templateDictionary);
182
- common
183
- .updateItemTemplateFromDictionary(itemId, templateDictionary, authentication)
184
- .then(() => {
185
- common
186
- .updateItemResourceText(itemId, template.data.name, JSON.stringify(template.data.application), authentication)
187
- .then(resolve, reject);
188
- }, reject);
189
- });
190
- }
191
- exports.postProcess = postProcess;
192
- //#endregion
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.createItemFromTemplate = exports._templatizeId = exports._templatizeUrl = exports._updateDependencies = exports._templatizeAdminEmail = exports._templatizeApplication = exports.convertQuickCaptureToTemplate = exports.convertItemToTemplate = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const common = tslib_1.__importStar(require("@esri/solution-common"));
21
+ const quickcaptureHelpers = tslib_1.__importStar(require("./helpers/quickcapture-helpers"));
22
+ //#region Publish Process ---------------------------------------------------------------------------------------//
23
+ /**
24
+ * Converts a Quick Capture item into a template.
25
+ *
26
+ * @param solutionItemId The solution to contain the template
27
+ * @param itemInfo Info about the item
28
+ * @param destAuthentication Credentials for requests to the destination organization
29
+ * @param srcAuthentication Credentials for requests to source items
30
+ * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
31
+ * @returns A promise that will resolve when the template has been created
32
+ */
33
+ function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
34
+ // Delegate back to simple-types, which will in-turn delegate
35
+ // to convertNotebookToTemplate at the correct point in the process
36
+ // This is a temporary refactor step
37
+ return quickcaptureHelpers.convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary);
38
+ }
39
+ exports.convertItemToTemplate = convertItemToTemplate;
40
+ /**
41
+ * Converts an quick capture item to a template.
42
+ *
43
+ * @param itemTemplate template for the quick capture project item
44
+ * @returns templatized itemTemplate
45
+ */
46
+ function convertQuickCaptureToTemplate(itemTemplate) {
47
+ common.setProp(itemTemplate, "data.application", _templatizeApplication(itemTemplate.data.application, itemTemplate));
48
+ return itemTemplate;
49
+ }
50
+ exports.convertQuickCaptureToTemplate = convertQuickCaptureToTemplate;
51
+ /**
52
+ * Templatizes key properties for a quick capture project and gathers item dependencies
53
+ *
54
+ * @param data the projects json
55
+ * @param itemTemplate template for the quick capture project item
56
+ * @returns templatized itemTemplate
57
+ * @private
58
+ */
59
+ function _templatizeApplication(data, itemTemplate) {
60
+ // Quick Project item id
61
+ _templatizeId(data, "itemId");
62
+ // Set the admin email
63
+ _templatizeAdminEmail(data);
64
+ // datasource item id and url
65
+ const dataSources = data?.dataSources;
66
+ if (dataSources && Array.isArray(dataSources)) {
67
+ dataSources.forEach(ds => {
68
+ const id = ds.featureServiceItemId;
69
+ if (id) {
70
+ _updateDependencies(id, itemTemplate);
71
+ _templatizeUrl(ds, "featureServiceItemId", "url");
72
+ _templatizeId(ds, "featureServiceItemId");
73
+ }
74
+ });
75
+ }
76
+ return data;
77
+ }
78
+ exports._templatizeApplication = _templatizeApplication;
79
+ /**
80
+ * Templatize the email property
81
+ *
82
+ * @param data the quick capture application
83
+ * @private
84
+ */
85
+ function _templatizeAdminEmail(data) {
86
+ if (common.getProp(data, "preferences.adminEmail")) {
87
+ common.setProp(data, "preferences.adminEmail", "{{user.email}}");
88
+ }
89
+ }
90
+ exports._templatizeAdminEmail = _templatizeAdminEmail;
91
+ /**
92
+ * Updates the templates dependencies list with unique item ids
93
+ *
94
+ * @param id the item id of the dependency
95
+ * @param itemTemplate template for the quick capture project item
96
+ * @returns templatized itemTemplate
97
+ */
98
+ function _updateDependencies(id, itemTemplate) {
99
+ if (itemTemplate.dependencies.indexOf(id) === -1) {
100
+ itemTemplate.dependencies.push(id);
101
+ }
102
+ }
103
+ exports._updateDependencies = _updateDependencies;
104
+ /**
105
+ * Templatize a url property
106
+ *
107
+ * @param obj the datasource object
108
+ * @param idPath the path to the id property
109
+ * @param urlPath the path to the url property
110
+ * @private
111
+ */
112
+ function _templatizeUrl(obj, idPath, urlPath) {
113
+ const id = common.getProp(obj, idPath);
114
+ const url = common.getProp(obj, urlPath);
115
+ if (url) {
116
+ const layerId = url.substr(url.lastIndexOf("/") + 1);
117
+ common.setProp(obj, urlPath, common.templatizeTerm(id, id, ".layer" + layerId + ".url"));
118
+ }
119
+ }
120
+ exports._templatizeUrl = _templatizeUrl;
121
+ /**
122
+ * Templatize the item id property
123
+ *
124
+ * @param obj the datasource or object that contains the item id property
125
+ * @param path the path to the id property
126
+ * @private
127
+ */
128
+ function _templatizeId(obj, path) {
129
+ const id = common.getProp(obj, path);
130
+ if (id) {
131
+ common.setProp(obj, path, common.templatizeTerm(id, id, ".itemId"));
132
+ }
133
+ }
134
+ exports._templatizeId = _templatizeId;
135
+ //#endregion
136
+ //#region Deploy Process ---------------------------------------------------------------------------------------//
137
+ // Delegate back to simple-types
138
+ // This is a temporary refactor step
139
+ function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
140
+ return quickcaptureHelpers.createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback);
141
+ }
142
+ exports.createItemFromTemplate = createItemFromTemplate;
143
+ //#endregion
193
144
  //# sourceMappingURL=quickcapture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"quickcapture.js","sourceRoot":"","sources":["../../src/quickcapture.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,sEAAgD;AAChD,4FAAsE;AAEtE,mHAAmH;AAEnH;;;;;;;;;GASG;AACH,SAAgB,qBAAq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AgB,cAAc,CAC5B,GAAQ,EACR,MAAc,EACd,OAAe;IAEf,MAAM,EAAE,GAAQ,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5C,MAAM,GAAG,GAAW,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,GAAG,EAAE;QACP,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CACZ,GAAG,EACH,OAAO,EACP,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC,CAC3D,CAAC;KACH;AACH,CAAC;AAfD,wCAeC;AAED;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,GAAQ,EAAE,IAAY;IAClD,MAAM,EAAE,GAAQ,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC1C,IAAI,EAAE,EAAE;QACN,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;KACrE;AACH,CAAC;AALD,sCAKC;AAED,YAAY;AAEZ,kHAAkH;AAElH,gCAAgC;AAChC,oCAAoC;AACpC,SAAgB,sBAAsB,CACpC,QAA8B,EAC9B,kBAAuB,EACvB,yBAA6C,EAC7C,oBAAkD;IAElD,OAAO,mBAAmB,CAAC,sBAAsB,CAC/C,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,CACrB,CAAC;AACJ,CAAC;AAZD,wDAYC;AAED,YAAY"}
@@ -1,57 +1,57 @@
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 { ICreateItemFromTemplateResponse, IDatasourceInfo, IItemProgressCallback, IItemTemplate, IUpdateItemResponse, UserSession } from "@esri/solution-common";
17
- /**
18
- * Converts an item into a template.
19
- *
20
- * @param solutionItemId The solution to contain the template
21
- * @param itemInfo Info about the item
22
- * @param destAuthentication Credentials for requests to the destination organization
23
- * @param srcAuthentication Credentials for requests to source items
24
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
25
- * @returns A promise that will resolve when the template has been created
26
- */
27
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
28
- /**
29
- * Delegate to simpleType creator
30
- *
31
- * @param template
32
- * @param templateDictionary
33
- * @param destinationAuthentication
34
- * @param itemProgressCallback
35
- */
36
- export declare function createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
37
- /**
38
- * Templatizes field references within specific template types.
39
- * Currently only handles web mapping applications
40
- *
41
- * @param template A solution template
42
- * @param datasourceInfos A list of objects that store key datasource info used to templatizing field references
43
- * @param type The item type
44
- * @returns The updated solution template
45
- */
46
- export declare function postProcessFieldReferences(solutionTemplate: IItemTemplate, datasourceInfos: IDatasourceInfo[], type: string): IItemTemplate;
47
- /**
48
- * Simple Type post-processing actions
49
- *
50
- * @param {string} itemId The item ID
51
- * @param {string} type The template type
52
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
53
- * @param {any} templateDictionary The template dictionary
54
- * @param {UserSession} authentication The destination session info
55
- * @returns Promise resolving to successfulness of update
56
- */
57
- export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<IUpdateItemResponse>;
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 { ICreateItemFromTemplateResponse, IDatasourceInfo, IItemProgressCallback, IItemTemplate, IUpdateItemResponse, UserSession } from "@esri/solution-common";
17
+ /**
18
+ * Converts an item into a template.
19
+ *
20
+ * @param solutionItemId The solution to contain the template
21
+ * @param itemInfo Info about the item
22
+ * @param destAuthentication Credentials for requests to the destination organization
23
+ * @param srcAuthentication Credentials for requests to source items
24
+ * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
25
+ * @returns A promise that will resolve when the template has been created
26
+ */
27
+ export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
28
+ /**
29
+ * Delegate to simpleType creator
30
+ *
31
+ * @param template
32
+ * @param templateDictionary
33
+ * @param destinationAuthentication
34
+ * @param itemProgressCallback
35
+ */
36
+ export declare function createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
37
+ /**
38
+ * Templatizes field references within specific template types.
39
+ * Currently only handles web mapping applications
40
+ *
41
+ * @param template A solution template
42
+ * @param datasourceInfos A list of objects that store key datasource info used to templatizing field references
43
+ * @param type The item type
44
+ * @returns The updated solution template
45
+ */
46
+ export declare function postProcessFieldReferences(solutionTemplate: IItemTemplate, datasourceInfos: IDatasourceInfo[], type: string): IItemTemplate;
47
+ /**
48
+ * Simple Type post-processing actions
49
+ *
50
+ * @param {string} itemId The item ID
51
+ * @param {string} type The template type
52
+ * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
53
+ * @param {any} templateDictionary The template dictionary
54
+ * @param {UserSession} authentication The destination session info
55
+ * @returns Promise resolving to successfulness of update
56
+ */
57
+ export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<IUpdateItemResponse>;