@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.
- package/dist/cjs/dashboard.d.ts +93 -93
- package/dist/cjs/dashboard.js +352 -352
- package/dist/cjs/helpers/convert-item-to-template.d.ts +46 -46
- package/dist/cjs/helpers/convert-item-to-template.js +235 -209
- package/dist/cjs/helpers/convert-item-to-template.js.map +1 -1
- package/dist/cjs/helpers/create-item-from-template.d.ts +17 -17
- package/dist/cjs/helpers/create-item-from-template.js +153 -138
- package/dist/cjs/helpers/create-item-from-template.js.map +1 -1
- package/dist/cjs/helpers/notebook-helpers.d.ts +19 -19
- package/dist/cjs/helpers/notebook-helpers.js +24 -24
- package/dist/cjs/helpers/quickcapture-helpers.d.ts +18 -18
- package/dist/cjs/helpers/quickcapture-helpers.js +22 -22
- package/dist/cjs/helpers/simple-type-helpers.d.ts +18 -18
- package/dist/cjs/helpers/simple-type-helpers.js +22 -22
- package/dist/cjs/helpers/update-notebook-data.d.ts +17 -17
- package/dist/cjs/helpers/update-notebook-data.js +27 -27
- package/dist/cjs/index.d.ts +27 -27
- package/dist/cjs/index.js +36 -36
- package/dist/cjs/notebook.d.ts +66 -66
- package/dist/cjs/notebook.js +133 -133
- package/dist/cjs/oic.d.ts +53 -53
- package/dist/cjs/oic.js +170 -170
- package/dist/cjs/quickcapture.d.ts +76 -87
- package/dist/cjs/quickcapture.js +143 -192
- package/dist/cjs/quickcapture.js.map +1 -1
- package/dist/cjs/simple-types.d.ts +57 -57
- package/dist/cjs/simple-types.js +94 -94
- package/dist/cjs/webmap.d.ts +102 -102
- package/dist/cjs/webmap.js +325 -325
- package/dist/cjs/webmappingapplication.d.ts +176 -176
- package/dist/cjs/webmappingapplication.js +674 -674
- package/dist/cjs/webmappingapplication.js.map +1 -1
- package/dist/cjs/workforce.d.ts +34 -34
- package/dist/cjs/workforce.js +44 -44
- package/dist/esm/dashboard.d.ts +93 -93
- package/dist/esm/dashboard.js +339 -339
- package/dist/esm/helpers/convert-item-to-template.d.ts +46 -46
- package/dist/esm/helpers/convert-item-to-template.js +228 -202
- package/dist/esm/helpers/convert-item-to-template.js.map +1 -1
- package/dist/esm/helpers/create-item-from-template.d.ts +17 -17
- package/dist/esm/helpers/create-item-from-template.js +148 -133
- package/dist/esm/helpers/create-item-from-template.js.map +1 -1
- package/dist/esm/helpers/notebook-helpers.d.ts +19 -19
- package/dist/esm/helpers/notebook-helpers.js +20 -20
- package/dist/esm/helpers/quickcapture-helpers.d.ts +18 -18
- package/dist/esm/helpers/quickcapture-helpers.js +19 -19
- package/dist/esm/helpers/simple-type-helpers.d.ts +18 -18
- package/dist/esm/helpers/simple-type-helpers.js +19 -19
- package/dist/esm/helpers/update-notebook-data.d.ts +17 -17
- package/dist/esm/helpers/update-notebook-data.js +23 -23
- package/dist/esm/index.d.ts +27 -27
- package/dist/esm/index.js +27 -27
- package/dist/esm/notebook.d.ts +66 -66
- package/dist/esm/notebook.js +123 -123
- package/dist/esm/oic.d.ts +53 -53
- package/dist/esm/oic.js +162 -162
- package/dist/esm/quickcapture.d.ts +76 -87
- package/dist/esm/quickcapture.js +131 -179
- package/dist/esm/quickcapture.js.map +1 -1
- package/dist/esm/simple-types.d.ts +57 -57
- package/dist/esm/simple-types.js +86 -86
- package/dist/esm/webmap.d.ts +102 -102
- package/dist/esm/webmap.js +312 -312
- package/dist/esm/webmappingapplication.d.ts +176 -176
- package/dist/esm/webmappingapplication.js +648 -648
- package/dist/esm/webmappingapplication.js.map +1 -1
- package/dist/esm/workforce.d.ts +34 -34
- package/dist/esm/workforce.js +38 -38
- package/package.json +6 -6
package/dist/cjs/quickcapture.js
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* @
|
|
83
|
-
* @private
|
|
84
|
-
*/
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* @param
|
|
109
|
-
* @
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
*
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAuB;IAEvB,6DAA6D;IAC7D,mEAAmE;IACnE,oCAAoC;IACp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AC,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>;
|