@salesforce/lds-adapters-analytics-unifiedanalytics 1.299.0 → 1.301.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/es/es2018/analytics-unifiedanalytics.js +1818 -57
- package/dist/es/es2018/types/src/generated/adapters/createAnnotation.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/adapters/getAnnotations.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/adapters/queryAssets.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/resources/getUnifiedAnalyticsAnnotations.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsAnnotations.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsAssetsQuery.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/AnalyticsAssetsQueryInputRepresentation.d.ts +11 -11
- package/dist/es/es2018/types/src/generated/types/AnnotationAssetRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/AnnotationCollectionRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/AnnotationConversationInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/AnnotationConversationRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/AnnotationInputRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/AnnotationRepresentation.d.ts +55 -0
- package/dist/es/es2018/types/src/generated/types/ContentDocumentOutputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/ContentVersionOutputRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/DashboardAnchorInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/DashboardAnnotationAnchorRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/FileTypeOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SlackEmojiOutputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/SlackFileOutputRepresentation.d.ts +59 -0
- package/dist/es/es2018/types/src/generated/types/SlackMessageOutputRepresentation.d.ts +102 -0
- package/dist/es/es2018/types/src/generated/types/SlackReactionOutputRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/SlackUserInfoOutputRepresentation.d.ts +77 -0
- package/package.json +3 -3
- package/sfdc/index.js +2095 -323
- package/src/raml/api.raml +464 -5
- package/src/raml/luvio.raml +13 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze,
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a, typeCheckConfig as typeCheckConfig$n, StoreKeyMap, createResourceParams as createResourceParams$n } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -93,6 +93,1767 @@ function createLink(ref) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
function validate$v(obj, path = 'DashboardAnnotationAnchorRepresentation') {
|
|
97
|
+
const v_error = (() => {
|
|
98
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
99
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
100
|
+
}
|
|
101
|
+
const obj_widgetId = obj.widgetId;
|
|
102
|
+
const path_widgetId = path + '.widgetId';
|
|
103
|
+
if (typeof obj_widgetId !== 'string') {
|
|
104
|
+
return new TypeError('Expected "string" but received "' + typeof obj_widgetId + '" (at "' + path_widgetId + '")');
|
|
105
|
+
}
|
|
106
|
+
})();
|
|
107
|
+
return v_error === undefined ? null : v_error;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function validate$u(obj, path = 'AnnotationAssetRepresentation') {
|
|
111
|
+
const v_error = (() => {
|
|
112
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
113
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
114
|
+
}
|
|
115
|
+
const obj_assetId = obj.assetId;
|
|
116
|
+
const path_assetId = path + '.assetId';
|
|
117
|
+
if (typeof obj_assetId !== 'string') {
|
|
118
|
+
return new TypeError('Expected "string" but received "' + typeof obj_assetId + '" (at "' + path_assetId + '")');
|
|
119
|
+
}
|
|
120
|
+
const obj_assetType = obj.assetType;
|
|
121
|
+
const path_assetType = path + '.assetType';
|
|
122
|
+
if (typeof obj_assetType !== 'string') {
|
|
123
|
+
return new TypeError('Expected "string" but received "' + typeof obj_assetType + '" (at "' + path_assetType + '")');
|
|
124
|
+
}
|
|
125
|
+
})();
|
|
126
|
+
return v_error === undefined ? null : v_error;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function validate$t(obj, path = 'FileTypeOutputRepresentation') {
|
|
130
|
+
const v_error = (() => {
|
|
131
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
132
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
133
|
+
}
|
|
134
|
+
const obj_extension = obj.extension;
|
|
135
|
+
const path_extension = path + '.extension';
|
|
136
|
+
if (typeof obj_extension !== 'string') {
|
|
137
|
+
return new TypeError('Expected "string" but received "' + typeof obj_extension + '" (at "' + path_extension + '")');
|
|
138
|
+
}
|
|
139
|
+
const obj_iconName = obj.iconName;
|
|
140
|
+
const path_iconName = path + '.iconName';
|
|
141
|
+
if (typeof obj_iconName !== 'string') {
|
|
142
|
+
return new TypeError('Expected "string" but received "' + typeof obj_iconName + '" (at "' + path_iconName + '")');
|
|
143
|
+
}
|
|
144
|
+
})();
|
|
145
|
+
return v_error === undefined ? null : v_error;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function validate$s(obj, path = 'ContentVersionOutputRepresentation') {
|
|
149
|
+
const v_error = (() => {
|
|
150
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
151
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
152
|
+
}
|
|
153
|
+
const obj_attachmentUrl = obj.attachmentUrl;
|
|
154
|
+
const path_attachmentUrl = path + '.attachmentUrl';
|
|
155
|
+
if (typeof obj_attachmentUrl !== 'string') {
|
|
156
|
+
return new TypeError('Expected "string" but received "' + typeof obj_attachmentUrl + '" (at "' + path_attachmentUrl + '")');
|
|
157
|
+
}
|
|
158
|
+
const obj_filetype = obj.filetype;
|
|
159
|
+
const path_filetype = path + '.filetype';
|
|
160
|
+
let obj_filetype_union0 = null;
|
|
161
|
+
const obj_filetype_union0_error = (() => {
|
|
162
|
+
const referencepath_filetypeValidationError = validate$t(obj_filetype, path_filetype);
|
|
163
|
+
if (referencepath_filetypeValidationError !== null) {
|
|
164
|
+
let message = 'Object doesn\'t match FileTypeOutputRepresentation (at "' + path_filetype + '")\n';
|
|
165
|
+
message += referencepath_filetypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
166
|
+
return new TypeError(message);
|
|
167
|
+
}
|
|
168
|
+
})();
|
|
169
|
+
if (obj_filetype_union0_error != null) {
|
|
170
|
+
obj_filetype_union0 = obj_filetype_union0_error.message;
|
|
171
|
+
}
|
|
172
|
+
let obj_filetype_union1 = null;
|
|
173
|
+
const obj_filetype_union1_error = (() => {
|
|
174
|
+
if (obj_filetype !== null) {
|
|
175
|
+
return new TypeError('Expected "null" but received "' + typeof obj_filetype + '" (at "' + path_filetype + '")');
|
|
176
|
+
}
|
|
177
|
+
})();
|
|
178
|
+
if (obj_filetype_union1_error != null) {
|
|
179
|
+
obj_filetype_union1 = obj_filetype_union1_error.message;
|
|
180
|
+
}
|
|
181
|
+
if (obj_filetype_union0 && obj_filetype_union1) {
|
|
182
|
+
let message = 'Object doesn\'t match union (at "' + path_filetype + '")';
|
|
183
|
+
message += '\n' + obj_filetype_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
184
|
+
message += '\n' + obj_filetype_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
185
|
+
return new TypeError(message);
|
|
186
|
+
}
|
|
187
|
+
const obj_id = obj.id;
|
|
188
|
+
const path_id = path + '.id';
|
|
189
|
+
if (typeof obj_id !== 'string') {
|
|
190
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
191
|
+
}
|
|
192
|
+
const obj_size = obj.size;
|
|
193
|
+
const path_size = path + '.size';
|
|
194
|
+
if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
|
|
195
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
|
|
196
|
+
}
|
|
197
|
+
const obj_title = obj.title;
|
|
198
|
+
const path_title = path + '.title';
|
|
199
|
+
if (typeof obj_title !== 'string') {
|
|
200
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
201
|
+
}
|
|
202
|
+
const obj_versionUrl = obj.versionUrl;
|
|
203
|
+
const path_versionUrl = path + '.versionUrl';
|
|
204
|
+
let obj_versionUrl_union0 = null;
|
|
205
|
+
const obj_versionUrl_union0_error = (() => {
|
|
206
|
+
if (typeof obj_versionUrl !== 'string') {
|
|
207
|
+
return new TypeError('Expected "string" but received "' + typeof obj_versionUrl + '" (at "' + path_versionUrl + '")');
|
|
208
|
+
}
|
|
209
|
+
})();
|
|
210
|
+
if (obj_versionUrl_union0_error != null) {
|
|
211
|
+
obj_versionUrl_union0 = obj_versionUrl_union0_error.message;
|
|
212
|
+
}
|
|
213
|
+
let obj_versionUrl_union1 = null;
|
|
214
|
+
const obj_versionUrl_union1_error = (() => {
|
|
215
|
+
if (obj_versionUrl !== null) {
|
|
216
|
+
return new TypeError('Expected "null" but received "' + typeof obj_versionUrl + '" (at "' + path_versionUrl + '")');
|
|
217
|
+
}
|
|
218
|
+
})();
|
|
219
|
+
if (obj_versionUrl_union1_error != null) {
|
|
220
|
+
obj_versionUrl_union1 = obj_versionUrl_union1_error.message;
|
|
221
|
+
}
|
|
222
|
+
if (obj_versionUrl_union0 && obj_versionUrl_union1) {
|
|
223
|
+
let message = 'Object doesn\'t match union (at "' + path_versionUrl + '")';
|
|
224
|
+
message += '\n' + obj_versionUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
225
|
+
message += '\n' + obj_versionUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
226
|
+
return new TypeError(message);
|
|
227
|
+
}
|
|
228
|
+
})();
|
|
229
|
+
return v_error === undefined ? null : v_error;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function validate$r(obj, path = 'ContentDocumentOutputRepresentation') {
|
|
233
|
+
const v_error = (() => {
|
|
234
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
235
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
236
|
+
}
|
|
237
|
+
const obj_filetype = obj.filetype;
|
|
238
|
+
const path_filetype = path + '.filetype';
|
|
239
|
+
const referencepath_filetypeValidationError = validate$t(obj_filetype, path_filetype);
|
|
240
|
+
if (referencepath_filetypeValidationError !== null) {
|
|
241
|
+
let message = 'Object doesn\'t match FileTypeOutputRepresentation (at "' + path_filetype + '")\n';
|
|
242
|
+
message += referencepath_filetypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
243
|
+
return new TypeError(message);
|
|
244
|
+
}
|
|
245
|
+
const obj_id = obj.id;
|
|
246
|
+
const path_id = path + '.id';
|
|
247
|
+
if (typeof obj_id !== 'string') {
|
|
248
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
249
|
+
}
|
|
250
|
+
const obj_latestPublishedVersion = obj.latestPublishedVersion;
|
|
251
|
+
const path_latestPublishedVersion = path + '.latestPublishedVersion';
|
|
252
|
+
const referencepath_latestPublishedVersionValidationError = validate$s(obj_latestPublishedVersion, path_latestPublishedVersion);
|
|
253
|
+
if (referencepath_latestPublishedVersionValidationError !== null) {
|
|
254
|
+
let message = 'Object doesn\'t match ContentVersionOutputRepresentation (at "' + path_latestPublishedVersion + '")\n';
|
|
255
|
+
message += referencepath_latestPublishedVersionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
256
|
+
return new TypeError(message);
|
|
257
|
+
}
|
|
258
|
+
const obj_size = obj.size;
|
|
259
|
+
const path_size = path + '.size';
|
|
260
|
+
if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
|
|
261
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
|
|
262
|
+
}
|
|
263
|
+
const obj_title = obj.title;
|
|
264
|
+
const path_title = path + '.title';
|
|
265
|
+
if (typeof obj_title !== 'string') {
|
|
266
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
267
|
+
}
|
|
268
|
+
})();
|
|
269
|
+
return v_error === undefined ? null : v_error;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function validate$q(obj, path = 'SlackFileOutputRepresentation') {
|
|
273
|
+
const v_error = (() => {
|
|
274
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
275
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
276
|
+
}
|
|
277
|
+
const obj_contentDocument = obj.contentDocument;
|
|
278
|
+
const path_contentDocument = path + '.contentDocument';
|
|
279
|
+
let obj_contentDocument_union0 = null;
|
|
280
|
+
const obj_contentDocument_union0_error = (() => {
|
|
281
|
+
const referencepath_contentDocumentValidationError = validate$r(obj_contentDocument, path_contentDocument);
|
|
282
|
+
if (referencepath_contentDocumentValidationError !== null) {
|
|
283
|
+
let message = 'Object doesn\'t match ContentDocumentOutputRepresentation (at "' + path_contentDocument + '")\n';
|
|
284
|
+
message += referencepath_contentDocumentValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
285
|
+
return new TypeError(message);
|
|
286
|
+
}
|
|
287
|
+
})();
|
|
288
|
+
if (obj_contentDocument_union0_error != null) {
|
|
289
|
+
obj_contentDocument_union0 = obj_contentDocument_union0_error.message;
|
|
290
|
+
}
|
|
291
|
+
let obj_contentDocument_union1 = null;
|
|
292
|
+
const obj_contentDocument_union1_error = (() => {
|
|
293
|
+
if (obj_contentDocument !== null) {
|
|
294
|
+
return new TypeError('Expected "null" but received "' + typeof obj_contentDocument + '" (at "' + path_contentDocument + '")');
|
|
295
|
+
}
|
|
296
|
+
})();
|
|
297
|
+
if (obj_contentDocument_union1_error != null) {
|
|
298
|
+
obj_contentDocument_union1 = obj_contentDocument_union1_error.message;
|
|
299
|
+
}
|
|
300
|
+
if (obj_contentDocument_union0 && obj_contentDocument_union1) {
|
|
301
|
+
let message = 'Object doesn\'t match union (at "' + path_contentDocument + '")';
|
|
302
|
+
message += '\n' + obj_contentDocument_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
303
|
+
message += '\n' + obj_contentDocument_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
304
|
+
return new TypeError(message);
|
|
305
|
+
}
|
|
306
|
+
const obj_filetype = obj.filetype;
|
|
307
|
+
const path_filetype = path + '.filetype';
|
|
308
|
+
if (typeof obj_filetype !== 'string') {
|
|
309
|
+
return new TypeError('Expected "string" but received "' + typeof obj_filetype + '" (at "' + path_filetype + '")');
|
|
310
|
+
}
|
|
311
|
+
const obj_id = obj.id;
|
|
312
|
+
const path_id = path + '.id';
|
|
313
|
+
if (typeof obj_id !== 'string') {
|
|
314
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
315
|
+
}
|
|
316
|
+
const obj_mimetype = obj.mimetype;
|
|
317
|
+
const path_mimetype = path + '.mimetype';
|
|
318
|
+
if (typeof obj_mimetype !== 'string') {
|
|
319
|
+
return new TypeError('Expected "string" but received "' + typeof obj_mimetype + '" (at "' + path_mimetype + '")');
|
|
320
|
+
}
|
|
321
|
+
const obj_name = obj.name;
|
|
322
|
+
const path_name = path + '.name';
|
|
323
|
+
if (typeof obj_name !== 'string') {
|
|
324
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
325
|
+
}
|
|
326
|
+
const obj_size = obj.size;
|
|
327
|
+
const path_size = path + '.size';
|
|
328
|
+
if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
|
|
329
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
|
|
330
|
+
}
|
|
331
|
+
const obj_slackPermalink = obj.slackPermalink;
|
|
332
|
+
const path_slackPermalink = path + '.slackPermalink';
|
|
333
|
+
if (typeof obj_slackPermalink !== 'string') {
|
|
334
|
+
return new TypeError('Expected "string" but received "' + typeof obj_slackPermalink + '" (at "' + path_slackPermalink + '")');
|
|
335
|
+
}
|
|
336
|
+
const obj_title = obj.title;
|
|
337
|
+
const path_title = path + '.title';
|
|
338
|
+
if (typeof obj_title !== 'string') {
|
|
339
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
340
|
+
}
|
|
341
|
+
const obj_token = obj.token;
|
|
342
|
+
const path_token = path + '.token';
|
|
343
|
+
let obj_token_union0 = null;
|
|
344
|
+
const obj_token_union0_error = (() => {
|
|
345
|
+
if (typeof obj_token !== 'string') {
|
|
346
|
+
return new TypeError('Expected "string" but received "' + typeof obj_token + '" (at "' + path_token + '")');
|
|
347
|
+
}
|
|
348
|
+
})();
|
|
349
|
+
if (obj_token_union0_error != null) {
|
|
350
|
+
obj_token_union0 = obj_token_union0_error.message;
|
|
351
|
+
}
|
|
352
|
+
let obj_token_union1 = null;
|
|
353
|
+
const obj_token_union1_error = (() => {
|
|
354
|
+
if (obj_token !== null) {
|
|
355
|
+
return new TypeError('Expected "null" but received "' + typeof obj_token + '" (at "' + path_token + '")');
|
|
356
|
+
}
|
|
357
|
+
})();
|
|
358
|
+
if (obj_token_union1_error != null) {
|
|
359
|
+
obj_token_union1 = obj_token_union1_error.message;
|
|
360
|
+
}
|
|
361
|
+
if (obj_token_union0 && obj_token_union1) {
|
|
362
|
+
let message = 'Object doesn\'t match union (at "' + path_token + '")';
|
|
363
|
+
message += '\n' + obj_token_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
364
|
+
message += '\n' + obj_token_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
365
|
+
return new TypeError(message);
|
|
366
|
+
}
|
|
367
|
+
const obj_uniqueKey = obj.uniqueKey;
|
|
368
|
+
const path_uniqueKey = path + '.uniqueKey';
|
|
369
|
+
if (typeof obj_uniqueKey !== 'string') {
|
|
370
|
+
return new TypeError('Expected "string" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
|
|
371
|
+
}
|
|
372
|
+
const obj_url = obj.url;
|
|
373
|
+
const path_url = path + '.url';
|
|
374
|
+
if (typeof obj_url !== 'string') {
|
|
375
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
376
|
+
}
|
|
377
|
+
})();
|
|
378
|
+
return v_error === undefined ? null : v_error;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
function validate$p(obj, path = 'SlackEmojiOutputRepresentation') {
|
|
382
|
+
const v_error = (() => {
|
|
383
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
384
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
385
|
+
}
|
|
386
|
+
if (obj.altText !== undefined) {
|
|
387
|
+
const obj_altText = obj.altText;
|
|
388
|
+
const path_altText = path + '.altText';
|
|
389
|
+
let obj_altText_union0 = null;
|
|
390
|
+
const obj_altText_union0_error = (() => {
|
|
391
|
+
if (typeof obj_altText !== 'string') {
|
|
392
|
+
return new TypeError('Expected "string" but received "' + typeof obj_altText + '" (at "' + path_altText + '")');
|
|
393
|
+
}
|
|
394
|
+
})();
|
|
395
|
+
if (obj_altText_union0_error != null) {
|
|
396
|
+
obj_altText_union0 = obj_altText_union0_error.message;
|
|
397
|
+
}
|
|
398
|
+
let obj_altText_union1 = null;
|
|
399
|
+
const obj_altText_union1_error = (() => {
|
|
400
|
+
if (obj_altText !== null) {
|
|
401
|
+
return new TypeError('Expected "null" but received "' + typeof obj_altText + '" (at "' + path_altText + '")');
|
|
402
|
+
}
|
|
403
|
+
})();
|
|
404
|
+
if (obj_altText_union1_error != null) {
|
|
405
|
+
obj_altText_union1 = obj_altText_union1_error.message;
|
|
406
|
+
}
|
|
407
|
+
if (obj_altText_union0 && obj_altText_union1) {
|
|
408
|
+
let message = 'Object doesn\'t match union (at "' + path_altText + '")';
|
|
409
|
+
message += '\n' + obj_altText_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
410
|
+
message += '\n' + obj_altText_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
411
|
+
return new TypeError(message);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
const obj_isCustom = obj.isCustom;
|
|
415
|
+
const path_isCustom = path + '.isCustom';
|
|
416
|
+
let obj_isCustom_union0 = null;
|
|
417
|
+
const obj_isCustom_union0_error = (() => {
|
|
418
|
+
if (typeof obj_isCustom !== 'boolean') {
|
|
419
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isCustom + '" (at "' + path_isCustom + '")');
|
|
420
|
+
}
|
|
421
|
+
})();
|
|
422
|
+
if (obj_isCustom_union0_error != null) {
|
|
423
|
+
obj_isCustom_union0 = obj_isCustom_union0_error.message;
|
|
424
|
+
}
|
|
425
|
+
let obj_isCustom_union1 = null;
|
|
426
|
+
const obj_isCustom_union1_error = (() => {
|
|
427
|
+
if (obj_isCustom !== null) {
|
|
428
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isCustom + '" (at "' + path_isCustom + '")');
|
|
429
|
+
}
|
|
430
|
+
})();
|
|
431
|
+
if (obj_isCustom_union1_error != null) {
|
|
432
|
+
obj_isCustom_union1 = obj_isCustom_union1_error.message;
|
|
433
|
+
}
|
|
434
|
+
if (obj_isCustom_union0 && obj_isCustom_union1) {
|
|
435
|
+
let message = 'Object doesn\'t match union (at "' + path_isCustom + '")';
|
|
436
|
+
message += '\n' + obj_isCustom_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
437
|
+
message += '\n' + obj_isCustom_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
438
|
+
return new TypeError(message);
|
|
439
|
+
}
|
|
440
|
+
const obj_name = obj.name;
|
|
441
|
+
const path_name = path + '.name';
|
|
442
|
+
if (typeof obj_name !== 'string') {
|
|
443
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
444
|
+
}
|
|
445
|
+
if (obj.unicode !== undefined) {
|
|
446
|
+
const obj_unicode = obj.unicode;
|
|
447
|
+
const path_unicode = path + '.unicode';
|
|
448
|
+
let obj_unicode_union0 = null;
|
|
449
|
+
const obj_unicode_union0_error = (() => {
|
|
450
|
+
if (typeof obj_unicode !== 'string') {
|
|
451
|
+
return new TypeError('Expected "string" but received "' + typeof obj_unicode + '" (at "' + path_unicode + '")');
|
|
452
|
+
}
|
|
453
|
+
})();
|
|
454
|
+
if (obj_unicode_union0_error != null) {
|
|
455
|
+
obj_unicode_union0 = obj_unicode_union0_error.message;
|
|
456
|
+
}
|
|
457
|
+
let obj_unicode_union1 = null;
|
|
458
|
+
const obj_unicode_union1_error = (() => {
|
|
459
|
+
if (obj_unicode !== null) {
|
|
460
|
+
return new TypeError('Expected "null" but received "' + typeof obj_unicode + '" (at "' + path_unicode + '")');
|
|
461
|
+
}
|
|
462
|
+
})();
|
|
463
|
+
if (obj_unicode_union1_error != null) {
|
|
464
|
+
obj_unicode_union1 = obj_unicode_union1_error.message;
|
|
465
|
+
}
|
|
466
|
+
if (obj_unicode_union0 && obj_unicode_union1) {
|
|
467
|
+
let message = 'Object doesn\'t match union (at "' + path_unicode + '")';
|
|
468
|
+
message += '\n' + obj_unicode_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
469
|
+
message += '\n' + obj_unicode_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
470
|
+
return new TypeError(message);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
if (obj.url !== undefined) {
|
|
474
|
+
const obj_url = obj.url;
|
|
475
|
+
const path_url = path + '.url';
|
|
476
|
+
let obj_url_union0 = null;
|
|
477
|
+
const obj_url_union0_error = (() => {
|
|
478
|
+
if (typeof obj_url !== 'string') {
|
|
479
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
480
|
+
}
|
|
481
|
+
})();
|
|
482
|
+
if (obj_url_union0_error != null) {
|
|
483
|
+
obj_url_union0 = obj_url_union0_error.message;
|
|
484
|
+
}
|
|
485
|
+
let obj_url_union1 = null;
|
|
486
|
+
const obj_url_union1_error = (() => {
|
|
487
|
+
if (obj_url !== null) {
|
|
488
|
+
return new TypeError('Expected "null" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
489
|
+
}
|
|
490
|
+
})();
|
|
491
|
+
if (obj_url_union1_error != null) {
|
|
492
|
+
obj_url_union1 = obj_url_union1_error.message;
|
|
493
|
+
}
|
|
494
|
+
if (obj_url_union0 && obj_url_union1) {
|
|
495
|
+
let message = 'Object doesn\'t match union (at "' + path_url + '")';
|
|
496
|
+
message += '\n' + obj_url_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
497
|
+
message += '\n' + obj_url_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
498
|
+
return new TypeError(message);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
})();
|
|
502
|
+
return v_error === undefined ? null : v_error;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
function validate$o(obj, path = 'SlackUserInfoOutputRepresentation') {
|
|
506
|
+
const v_error = (() => {
|
|
507
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
508
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
509
|
+
}
|
|
510
|
+
const obj_bot = obj.bot;
|
|
511
|
+
const path_bot = path + '.bot';
|
|
512
|
+
if (typeof obj_bot !== 'boolean') {
|
|
513
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_bot + '" (at "' + path_bot + '")');
|
|
514
|
+
}
|
|
515
|
+
if (obj.displayName !== undefined) {
|
|
516
|
+
const obj_displayName = obj.displayName;
|
|
517
|
+
const path_displayName = path + '.displayName';
|
|
518
|
+
let obj_displayName_union0 = null;
|
|
519
|
+
const obj_displayName_union0_error = (() => {
|
|
520
|
+
if (typeof obj_displayName !== 'string') {
|
|
521
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
|
|
522
|
+
}
|
|
523
|
+
})();
|
|
524
|
+
if (obj_displayName_union0_error != null) {
|
|
525
|
+
obj_displayName_union0 = obj_displayName_union0_error.message;
|
|
526
|
+
}
|
|
527
|
+
let obj_displayName_union1 = null;
|
|
528
|
+
const obj_displayName_union1_error = (() => {
|
|
529
|
+
if (obj_displayName !== null) {
|
|
530
|
+
return new TypeError('Expected "null" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
|
|
531
|
+
}
|
|
532
|
+
})();
|
|
533
|
+
if (obj_displayName_union1_error != null) {
|
|
534
|
+
obj_displayName_union1 = obj_displayName_union1_error.message;
|
|
535
|
+
}
|
|
536
|
+
if (obj_displayName_union0 && obj_displayName_union1) {
|
|
537
|
+
let message = 'Object doesn\'t match union (at "' + path_displayName + '")';
|
|
538
|
+
message += '\n' + obj_displayName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
539
|
+
message += '\n' + obj_displayName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
540
|
+
return new TypeError(message);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
if (obj.id !== undefined) {
|
|
544
|
+
const obj_id = obj.id;
|
|
545
|
+
const path_id = path + '.id';
|
|
546
|
+
let obj_id_union0 = null;
|
|
547
|
+
const obj_id_union0_error = (() => {
|
|
548
|
+
if (typeof obj_id !== 'string') {
|
|
549
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
550
|
+
}
|
|
551
|
+
})();
|
|
552
|
+
if (obj_id_union0_error != null) {
|
|
553
|
+
obj_id_union0 = obj_id_union0_error.message;
|
|
554
|
+
}
|
|
555
|
+
let obj_id_union1 = null;
|
|
556
|
+
const obj_id_union1_error = (() => {
|
|
557
|
+
if (obj_id !== null) {
|
|
558
|
+
return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
559
|
+
}
|
|
560
|
+
})();
|
|
561
|
+
if (obj_id_union1_error != null) {
|
|
562
|
+
obj_id_union1 = obj_id_union1_error.message;
|
|
563
|
+
}
|
|
564
|
+
if (obj_id_union0 && obj_id_union1) {
|
|
565
|
+
let message = 'Object doesn\'t match union (at "' + path_id + '")';
|
|
566
|
+
message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
567
|
+
message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
568
|
+
return new TypeError(message);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
if (obj.image24 !== undefined) {
|
|
572
|
+
const obj_image24 = obj.image24;
|
|
573
|
+
const path_image24 = path + '.image24';
|
|
574
|
+
let obj_image24_union0 = null;
|
|
575
|
+
const obj_image24_union0_error = (() => {
|
|
576
|
+
if (typeof obj_image24 !== 'string') {
|
|
577
|
+
return new TypeError('Expected "string" but received "' + typeof obj_image24 + '" (at "' + path_image24 + '")');
|
|
578
|
+
}
|
|
579
|
+
})();
|
|
580
|
+
if (obj_image24_union0_error != null) {
|
|
581
|
+
obj_image24_union0 = obj_image24_union0_error.message;
|
|
582
|
+
}
|
|
583
|
+
let obj_image24_union1 = null;
|
|
584
|
+
const obj_image24_union1_error = (() => {
|
|
585
|
+
if (obj_image24 !== null) {
|
|
586
|
+
return new TypeError('Expected "null" but received "' + typeof obj_image24 + '" (at "' + path_image24 + '")');
|
|
587
|
+
}
|
|
588
|
+
})();
|
|
589
|
+
if (obj_image24_union1_error != null) {
|
|
590
|
+
obj_image24_union1 = obj_image24_union1_error.message;
|
|
591
|
+
}
|
|
592
|
+
if (obj_image24_union0 && obj_image24_union1) {
|
|
593
|
+
let message = 'Object doesn\'t match union (at "' + path_image24 + '")';
|
|
594
|
+
message += '\n' + obj_image24_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
595
|
+
message += '\n' + obj_image24_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
596
|
+
return new TypeError(message);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
if (obj.imageOriginal !== undefined) {
|
|
600
|
+
const obj_imageOriginal = obj.imageOriginal;
|
|
601
|
+
const path_imageOriginal = path + '.imageOriginal';
|
|
602
|
+
let obj_imageOriginal_union0 = null;
|
|
603
|
+
const obj_imageOriginal_union0_error = (() => {
|
|
604
|
+
if (typeof obj_imageOriginal !== 'string') {
|
|
605
|
+
return new TypeError('Expected "string" but received "' + typeof obj_imageOriginal + '" (at "' + path_imageOriginal + '")');
|
|
606
|
+
}
|
|
607
|
+
})();
|
|
608
|
+
if (obj_imageOriginal_union0_error != null) {
|
|
609
|
+
obj_imageOriginal_union0 = obj_imageOriginal_union0_error.message;
|
|
610
|
+
}
|
|
611
|
+
let obj_imageOriginal_union1 = null;
|
|
612
|
+
const obj_imageOriginal_union1_error = (() => {
|
|
613
|
+
if (obj_imageOriginal !== null) {
|
|
614
|
+
return new TypeError('Expected "null" but received "' + typeof obj_imageOriginal + '" (at "' + path_imageOriginal + '")');
|
|
615
|
+
}
|
|
616
|
+
})();
|
|
617
|
+
if (obj_imageOriginal_union1_error != null) {
|
|
618
|
+
obj_imageOriginal_union1 = obj_imageOriginal_union1_error.message;
|
|
619
|
+
}
|
|
620
|
+
if (obj_imageOriginal_union0 && obj_imageOriginal_union1) {
|
|
621
|
+
let message = 'Object doesn\'t match union (at "' + path_imageOriginal + '")';
|
|
622
|
+
message += '\n' + obj_imageOriginal_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
623
|
+
message += '\n' + obj_imageOriginal_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
624
|
+
return new TypeError(message);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
if (obj.inHuddle !== undefined) {
|
|
628
|
+
const obj_inHuddle = obj.inHuddle;
|
|
629
|
+
const path_inHuddle = path + '.inHuddle';
|
|
630
|
+
let obj_inHuddle_union0 = null;
|
|
631
|
+
const obj_inHuddle_union0_error = (() => {
|
|
632
|
+
if (typeof obj_inHuddle !== 'boolean') {
|
|
633
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_inHuddle + '" (at "' + path_inHuddle + '")');
|
|
634
|
+
}
|
|
635
|
+
})();
|
|
636
|
+
if (obj_inHuddle_union0_error != null) {
|
|
637
|
+
obj_inHuddle_union0 = obj_inHuddle_union0_error.message;
|
|
638
|
+
}
|
|
639
|
+
let obj_inHuddle_union1 = null;
|
|
640
|
+
const obj_inHuddle_union1_error = (() => {
|
|
641
|
+
if (obj_inHuddle !== null) {
|
|
642
|
+
return new TypeError('Expected "null" but received "' + typeof obj_inHuddle + '" (at "' + path_inHuddle + '")');
|
|
643
|
+
}
|
|
644
|
+
})();
|
|
645
|
+
if (obj_inHuddle_union1_error != null) {
|
|
646
|
+
obj_inHuddle_union1 = obj_inHuddle_union1_error.message;
|
|
647
|
+
}
|
|
648
|
+
if (obj_inHuddle_union0 && obj_inHuddle_union1) {
|
|
649
|
+
let message = 'Object doesn\'t match union (at "' + path_inHuddle + '")';
|
|
650
|
+
message += '\n' + obj_inHuddle_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
651
|
+
message += '\n' + obj_inHuddle_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
652
|
+
return new TypeError(message);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
if (obj.isActive !== undefined) {
|
|
656
|
+
const obj_isActive = obj.isActive;
|
|
657
|
+
const path_isActive = path + '.isActive';
|
|
658
|
+
let obj_isActive_union0 = null;
|
|
659
|
+
const obj_isActive_union0_error = (() => {
|
|
660
|
+
if (typeof obj_isActive !== 'boolean') {
|
|
661
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
662
|
+
}
|
|
663
|
+
})();
|
|
664
|
+
if (obj_isActive_union0_error != null) {
|
|
665
|
+
obj_isActive_union0 = obj_isActive_union0_error.message;
|
|
666
|
+
}
|
|
667
|
+
let obj_isActive_union1 = null;
|
|
668
|
+
const obj_isActive_union1_error = (() => {
|
|
669
|
+
if (obj_isActive !== null) {
|
|
670
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
671
|
+
}
|
|
672
|
+
})();
|
|
673
|
+
if (obj_isActive_union1_error != null) {
|
|
674
|
+
obj_isActive_union1 = obj_isActive_union1_error.message;
|
|
675
|
+
}
|
|
676
|
+
if (obj_isActive_union0 && obj_isActive_union1) {
|
|
677
|
+
let message = 'Object doesn\'t match union (at "' + path_isActive + '")';
|
|
678
|
+
message += '\n' + obj_isActive_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
679
|
+
message += '\n' + obj_isActive_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
680
|
+
return new TypeError(message);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
if (obj.isExternal !== undefined) {
|
|
684
|
+
const obj_isExternal = obj.isExternal;
|
|
685
|
+
const path_isExternal = path + '.isExternal';
|
|
686
|
+
let obj_isExternal_union0 = null;
|
|
687
|
+
const obj_isExternal_union0_error = (() => {
|
|
688
|
+
if (typeof obj_isExternal !== 'boolean') {
|
|
689
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isExternal + '" (at "' + path_isExternal + '")');
|
|
690
|
+
}
|
|
691
|
+
})();
|
|
692
|
+
if (obj_isExternal_union0_error != null) {
|
|
693
|
+
obj_isExternal_union0 = obj_isExternal_union0_error.message;
|
|
694
|
+
}
|
|
695
|
+
let obj_isExternal_union1 = null;
|
|
696
|
+
const obj_isExternal_union1_error = (() => {
|
|
697
|
+
if (obj_isExternal !== null) {
|
|
698
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isExternal + '" (at "' + path_isExternal + '")');
|
|
699
|
+
}
|
|
700
|
+
})();
|
|
701
|
+
if (obj_isExternal_union1_error != null) {
|
|
702
|
+
obj_isExternal_union1 = obj_isExternal_union1_error.message;
|
|
703
|
+
}
|
|
704
|
+
if (obj_isExternal_union0 && obj_isExternal_union1) {
|
|
705
|
+
let message = 'Object doesn\'t match union (at "' + path_isExternal + '")';
|
|
706
|
+
message += '\n' + obj_isExternal_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
707
|
+
message += '\n' + obj_isExternal_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
708
|
+
return new TypeError(message);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
const obj_profileUrl = obj.profileUrl;
|
|
712
|
+
const path_profileUrl = path + '.profileUrl';
|
|
713
|
+
let obj_profileUrl_union0 = null;
|
|
714
|
+
const obj_profileUrl_union0_error = (() => {
|
|
715
|
+
if (typeof obj_profileUrl !== 'string') {
|
|
716
|
+
return new TypeError('Expected "string" but received "' + typeof obj_profileUrl + '" (at "' + path_profileUrl + '")');
|
|
717
|
+
}
|
|
718
|
+
})();
|
|
719
|
+
if (obj_profileUrl_union0_error != null) {
|
|
720
|
+
obj_profileUrl_union0 = obj_profileUrl_union0_error.message;
|
|
721
|
+
}
|
|
722
|
+
let obj_profileUrl_union1 = null;
|
|
723
|
+
const obj_profileUrl_union1_error = (() => {
|
|
724
|
+
if (obj_profileUrl !== null) {
|
|
725
|
+
return new TypeError('Expected "null" but received "' + typeof obj_profileUrl + '" (at "' + path_profileUrl + '")');
|
|
726
|
+
}
|
|
727
|
+
})();
|
|
728
|
+
if (obj_profileUrl_union1_error != null) {
|
|
729
|
+
obj_profileUrl_union1 = obj_profileUrl_union1_error.message;
|
|
730
|
+
}
|
|
731
|
+
if (obj_profileUrl_union0 && obj_profileUrl_union1) {
|
|
732
|
+
let message = 'Object doesn\'t match union (at "' + path_profileUrl + '")';
|
|
733
|
+
message += '\n' + obj_profileUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
734
|
+
message += '\n' + obj_profileUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
735
|
+
return new TypeError(message);
|
|
736
|
+
}
|
|
737
|
+
if (obj.realName !== undefined) {
|
|
738
|
+
const obj_realName = obj.realName;
|
|
739
|
+
const path_realName = path + '.realName';
|
|
740
|
+
let obj_realName_union0 = null;
|
|
741
|
+
const obj_realName_union0_error = (() => {
|
|
742
|
+
if (typeof obj_realName !== 'string') {
|
|
743
|
+
return new TypeError('Expected "string" but received "' + typeof obj_realName + '" (at "' + path_realName + '")');
|
|
744
|
+
}
|
|
745
|
+
})();
|
|
746
|
+
if (obj_realName_union0_error != null) {
|
|
747
|
+
obj_realName_union0 = obj_realName_union0_error.message;
|
|
748
|
+
}
|
|
749
|
+
let obj_realName_union1 = null;
|
|
750
|
+
const obj_realName_union1_error = (() => {
|
|
751
|
+
if (obj_realName !== null) {
|
|
752
|
+
return new TypeError('Expected "null" but received "' + typeof obj_realName + '" (at "' + path_realName + '")');
|
|
753
|
+
}
|
|
754
|
+
})();
|
|
755
|
+
if (obj_realName_union1_error != null) {
|
|
756
|
+
obj_realName_union1 = obj_realName_union1_error.message;
|
|
757
|
+
}
|
|
758
|
+
if (obj_realName_union0 && obj_realName_union1) {
|
|
759
|
+
let message = 'Object doesn\'t match union (at "' + path_realName + '")';
|
|
760
|
+
message += '\n' + obj_realName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
761
|
+
message += '\n' + obj_realName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
762
|
+
return new TypeError(message);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
const obj_salesforceUserId = obj.salesforceUserId;
|
|
766
|
+
const path_salesforceUserId = path + '.salesforceUserId';
|
|
767
|
+
let obj_salesforceUserId_union0 = null;
|
|
768
|
+
const obj_salesforceUserId_union0_error = (() => {
|
|
769
|
+
if (typeof obj_salesforceUserId !== 'string') {
|
|
770
|
+
return new TypeError('Expected "string" but received "' + typeof obj_salesforceUserId + '" (at "' + path_salesforceUserId + '")');
|
|
771
|
+
}
|
|
772
|
+
})();
|
|
773
|
+
if (obj_salesforceUserId_union0_error != null) {
|
|
774
|
+
obj_salesforceUserId_union0 = obj_salesforceUserId_union0_error.message;
|
|
775
|
+
}
|
|
776
|
+
let obj_salesforceUserId_union1 = null;
|
|
777
|
+
const obj_salesforceUserId_union1_error = (() => {
|
|
778
|
+
if (obj_salesforceUserId !== null) {
|
|
779
|
+
return new TypeError('Expected "null" but received "' + typeof obj_salesforceUserId + '" (at "' + path_salesforceUserId + '")');
|
|
780
|
+
}
|
|
781
|
+
})();
|
|
782
|
+
if (obj_salesforceUserId_union1_error != null) {
|
|
783
|
+
obj_salesforceUserId_union1 = obj_salesforceUserId_union1_error.message;
|
|
784
|
+
}
|
|
785
|
+
if (obj_salesforceUserId_union0 && obj_salesforceUserId_union1) {
|
|
786
|
+
let message = 'Object doesn\'t match union (at "' + path_salesforceUserId + '")';
|
|
787
|
+
message += '\n' + obj_salesforceUserId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
788
|
+
message += '\n' + obj_salesforceUserId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
789
|
+
return new TypeError(message);
|
|
790
|
+
}
|
|
791
|
+
const obj_slackUserId = obj.slackUserId;
|
|
792
|
+
const path_slackUserId = path + '.slackUserId';
|
|
793
|
+
if (typeof obj_slackUserId !== 'string') {
|
|
794
|
+
return new TypeError('Expected "string" but received "' + typeof obj_slackUserId + '" (at "' + path_slackUserId + '")');
|
|
795
|
+
}
|
|
796
|
+
const obj_slackUserImageUrl = obj.slackUserImageUrl;
|
|
797
|
+
const path_slackUserImageUrl = path + '.slackUserImageUrl';
|
|
798
|
+
let obj_slackUserImageUrl_union0 = null;
|
|
799
|
+
const obj_slackUserImageUrl_union0_error = (() => {
|
|
800
|
+
if (typeof obj_slackUserImageUrl !== 'string') {
|
|
801
|
+
return new TypeError('Expected "string" but received "' + typeof obj_slackUserImageUrl + '" (at "' + path_slackUserImageUrl + '")');
|
|
802
|
+
}
|
|
803
|
+
})();
|
|
804
|
+
if (obj_slackUserImageUrl_union0_error != null) {
|
|
805
|
+
obj_slackUserImageUrl_union0 = obj_slackUserImageUrl_union0_error.message;
|
|
806
|
+
}
|
|
807
|
+
let obj_slackUserImageUrl_union1 = null;
|
|
808
|
+
const obj_slackUserImageUrl_union1_error = (() => {
|
|
809
|
+
if (obj_slackUserImageUrl !== null) {
|
|
810
|
+
return new TypeError('Expected "null" but received "' + typeof obj_slackUserImageUrl + '" (at "' + path_slackUserImageUrl + '")');
|
|
811
|
+
}
|
|
812
|
+
})();
|
|
813
|
+
if (obj_slackUserImageUrl_union1_error != null) {
|
|
814
|
+
obj_slackUserImageUrl_union1 = obj_slackUserImageUrl_union1_error.message;
|
|
815
|
+
}
|
|
816
|
+
if (obj_slackUserImageUrl_union0 && obj_slackUserImageUrl_union1) {
|
|
817
|
+
let message = 'Object doesn\'t match union (at "' + path_slackUserImageUrl + '")';
|
|
818
|
+
message += '\n' + obj_slackUserImageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
819
|
+
message += '\n' + obj_slackUserImageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
820
|
+
return new TypeError(message);
|
|
821
|
+
}
|
|
822
|
+
const obj_slackUsername = obj.slackUsername;
|
|
823
|
+
const path_slackUsername = path + '.slackUsername';
|
|
824
|
+
if (typeof obj_slackUsername !== 'string') {
|
|
825
|
+
return new TypeError('Expected "string" but received "' + typeof obj_slackUsername + '" (at "' + path_slackUsername + '")');
|
|
826
|
+
}
|
|
827
|
+
if (obj.statusEmoji !== undefined) {
|
|
828
|
+
const obj_statusEmoji = obj.statusEmoji;
|
|
829
|
+
const path_statusEmoji = path + '.statusEmoji';
|
|
830
|
+
let obj_statusEmoji_union0 = null;
|
|
831
|
+
const obj_statusEmoji_union0_error = (() => {
|
|
832
|
+
const referencepath_statusEmojiValidationError = validate$p(obj_statusEmoji, path_statusEmoji);
|
|
833
|
+
if (referencepath_statusEmojiValidationError !== null) {
|
|
834
|
+
let message = 'Object doesn\'t match SlackEmojiOutputRepresentation (at "' + path_statusEmoji + '")\n';
|
|
835
|
+
message += referencepath_statusEmojiValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
836
|
+
return new TypeError(message);
|
|
837
|
+
}
|
|
838
|
+
})();
|
|
839
|
+
if (obj_statusEmoji_union0_error != null) {
|
|
840
|
+
obj_statusEmoji_union0 = obj_statusEmoji_union0_error.message;
|
|
841
|
+
}
|
|
842
|
+
let obj_statusEmoji_union1 = null;
|
|
843
|
+
const obj_statusEmoji_union1_error = (() => {
|
|
844
|
+
if (obj_statusEmoji !== null) {
|
|
845
|
+
return new TypeError('Expected "null" but received "' + typeof obj_statusEmoji + '" (at "' + path_statusEmoji + '")');
|
|
846
|
+
}
|
|
847
|
+
})();
|
|
848
|
+
if (obj_statusEmoji_union1_error != null) {
|
|
849
|
+
obj_statusEmoji_union1 = obj_statusEmoji_union1_error.message;
|
|
850
|
+
}
|
|
851
|
+
if (obj_statusEmoji_union0 && obj_statusEmoji_union1) {
|
|
852
|
+
let message = 'Object doesn\'t match union (at "' + path_statusEmoji + '")';
|
|
853
|
+
message += '\n' + obj_statusEmoji_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
854
|
+
message += '\n' + obj_statusEmoji_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
855
|
+
return new TypeError(message);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
if (obj.statusMessage !== undefined) {
|
|
859
|
+
const obj_statusMessage = obj.statusMessage;
|
|
860
|
+
const path_statusMessage = path + '.statusMessage';
|
|
861
|
+
let obj_statusMessage_union0 = null;
|
|
862
|
+
const obj_statusMessage_union0_error = (() => {
|
|
863
|
+
if (typeof obj_statusMessage !== 'string') {
|
|
864
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusMessage + '" (at "' + path_statusMessage + '")');
|
|
865
|
+
}
|
|
866
|
+
})();
|
|
867
|
+
if (obj_statusMessage_union0_error != null) {
|
|
868
|
+
obj_statusMessage_union0 = obj_statusMessage_union0_error.message;
|
|
869
|
+
}
|
|
870
|
+
let obj_statusMessage_union1 = null;
|
|
871
|
+
const obj_statusMessage_union1_error = (() => {
|
|
872
|
+
if (obj_statusMessage !== null) {
|
|
873
|
+
return new TypeError('Expected "null" but received "' + typeof obj_statusMessage + '" (at "' + path_statusMessage + '")');
|
|
874
|
+
}
|
|
875
|
+
})();
|
|
876
|
+
if (obj_statusMessage_union1_error != null) {
|
|
877
|
+
obj_statusMessage_union1 = obj_statusMessage_union1_error.message;
|
|
878
|
+
}
|
|
879
|
+
if (obj_statusMessage_union0 && obj_statusMessage_union1) {
|
|
880
|
+
let message = 'Object doesn\'t match union (at "' + path_statusMessage + '")';
|
|
881
|
+
message += '\n' + obj_statusMessage_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
882
|
+
message += '\n' + obj_statusMessage_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
883
|
+
return new TypeError(message);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
const obj_teamId = obj.teamId;
|
|
887
|
+
const path_teamId = path + '.teamId';
|
|
888
|
+
if (typeof obj_teamId !== 'string') {
|
|
889
|
+
return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
|
|
890
|
+
}
|
|
891
|
+
})();
|
|
892
|
+
return v_error === undefined ? null : v_error;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
function validate$n(obj, path = 'SlackReactionOutputRepresentation') {
|
|
896
|
+
const v_error = (() => {
|
|
897
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
898
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
899
|
+
}
|
|
900
|
+
const obj_count = obj.count;
|
|
901
|
+
const path_count = path + '.count';
|
|
902
|
+
let obj_count_union0 = null;
|
|
903
|
+
const obj_count_union0_error = (() => {
|
|
904
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
905
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
906
|
+
}
|
|
907
|
+
})();
|
|
908
|
+
if (obj_count_union0_error != null) {
|
|
909
|
+
obj_count_union0 = obj_count_union0_error.message;
|
|
910
|
+
}
|
|
911
|
+
let obj_count_union1 = null;
|
|
912
|
+
const obj_count_union1_error = (() => {
|
|
913
|
+
if (obj_count !== null) {
|
|
914
|
+
return new TypeError('Expected "null" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
915
|
+
}
|
|
916
|
+
})();
|
|
917
|
+
if (obj_count_union1_error != null) {
|
|
918
|
+
obj_count_union1 = obj_count_union1_error.message;
|
|
919
|
+
}
|
|
920
|
+
if (obj_count_union0 && obj_count_union1) {
|
|
921
|
+
let message = 'Object doesn\'t match union (at "' + path_count + '")';
|
|
922
|
+
message += '\n' + obj_count_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
923
|
+
message += '\n' + obj_count_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
924
|
+
return new TypeError(message);
|
|
925
|
+
}
|
|
926
|
+
const obj_hasUserReacted = obj.hasUserReacted;
|
|
927
|
+
const path_hasUserReacted = path + '.hasUserReacted';
|
|
928
|
+
if (typeof obj_hasUserReacted !== 'boolean') {
|
|
929
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_hasUserReacted + '" (at "' + path_hasUserReacted + '")');
|
|
930
|
+
}
|
|
931
|
+
const obj_isCustomEmoji = obj.isCustomEmoji;
|
|
932
|
+
const path_isCustomEmoji = path + '.isCustomEmoji';
|
|
933
|
+
let obj_isCustomEmoji_union0 = null;
|
|
934
|
+
const obj_isCustomEmoji_union0_error = (() => {
|
|
935
|
+
if (typeof obj_isCustomEmoji !== 'boolean') {
|
|
936
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isCustomEmoji + '" (at "' + path_isCustomEmoji + '")');
|
|
937
|
+
}
|
|
938
|
+
})();
|
|
939
|
+
if (obj_isCustomEmoji_union0_error != null) {
|
|
940
|
+
obj_isCustomEmoji_union0 = obj_isCustomEmoji_union0_error.message;
|
|
941
|
+
}
|
|
942
|
+
let obj_isCustomEmoji_union1 = null;
|
|
943
|
+
const obj_isCustomEmoji_union1_error = (() => {
|
|
944
|
+
if (obj_isCustomEmoji !== null) {
|
|
945
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isCustomEmoji + '" (at "' + path_isCustomEmoji + '")');
|
|
946
|
+
}
|
|
947
|
+
})();
|
|
948
|
+
if (obj_isCustomEmoji_union1_error != null) {
|
|
949
|
+
obj_isCustomEmoji_union1 = obj_isCustomEmoji_union1_error.message;
|
|
950
|
+
}
|
|
951
|
+
if (obj_isCustomEmoji_union0 && obj_isCustomEmoji_union1) {
|
|
952
|
+
let message = 'Object doesn\'t match union (at "' + path_isCustomEmoji + '")';
|
|
953
|
+
message += '\n' + obj_isCustomEmoji_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
954
|
+
message += '\n' + obj_isCustomEmoji_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
955
|
+
return new TypeError(message);
|
|
956
|
+
}
|
|
957
|
+
const obj_messageTs = obj.messageTs;
|
|
958
|
+
const path_messageTs = path + '.messageTs';
|
|
959
|
+
if (typeof obj_messageTs !== 'string') {
|
|
960
|
+
return new TypeError('Expected "string" but received "' + typeof obj_messageTs + '" (at "' + path_messageTs + '")');
|
|
961
|
+
}
|
|
962
|
+
const obj_name = obj.name;
|
|
963
|
+
const path_name = path + '.name';
|
|
964
|
+
if (typeof obj_name !== 'string') {
|
|
965
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
966
|
+
}
|
|
967
|
+
const obj_reactedUsers = obj.reactedUsers;
|
|
968
|
+
const path_reactedUsers = path + '.reactedUsers';
|
|
969
|
+
if (!ArrayIsArray(obj_reactedUsers)) {
|
|
970
|
+
return new TypeError('Expected "array" but received "' + typeof obj_reactedUsers + '" (at "' + path_reactedUsers + '")');
|
|
971
|
+
}
|
|
972
|
+
for (let i = 0; i < obj_reactedUsers.length; i++) {
|
|
973
|
+
const obj_reactedUsers_item = obj_reactedUsers[i];
|
|
974
|
+
const path_reactedUsers_item = path_reactedUsers + '[' + i + ']';
|
|
975
|
+
const referencepath_reactedUsers_itemValidationError = validate$o(obj_reactedUsers_item, path_reactedUsers_item);
|
|
976
|
+
if (referencepath_reactedUsers_itemValidationError !== null) {
|
|
977
|
+
let message = 'Object doesn\'t match SlackUserInfoOutputRepresentation (at "' + path_reactedUsers_item + '")\n';
|
|
978
|
+
message += referencepath_reactedUsers_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
979
|
+
return new TypeError(message);
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
const obj_unicode = obj.unicode;
|
|
983
|
+
const path_unicode = path + '.unicode';
|
|
984
|
+
let obj_unicode_union0 = null;
|
|
985
|
+
const obj_unicode_union0_error = (() => {
|
|
986
|
+
if (typeof obj_unicode !== 'string') {
|
|
987
|
+
return new TypeError('Expected "string" but received "' + typeof obj_unicode + '" (at "' + path_unicode + '")');
|
|
988
|
+
}
|
|
989
|
+
})();
|
|
990
|
+
if (obj_unicode_union0_error != null) {
|
|
991
|
+
obj_unicode_union0 = obj_unicode_union0_error.message;
|
|
992
|
+
}
|
|
993
|
+
let obj_unicode_union1 = null;
|
|
994
|
+
const obj_unicode_union1_error = (() => {
|
|
995
|
+
if (obj_unicode !== null) {
|
|
996
|
+
return new TypeError('Expected "null" but received "' + typeof obj_unicode + '" (at "' + path_unicode + '")');
|
|
997
|
+
}
|
|
998
|
+
})();
|
|
999
|
+
if (obj_unicode_union1_error != null) {
|
|
1000
|
+
obj_unicode_union1 = obj_unicode_union1_error.message;
|
|
1001
|
+
}
|
|
1002
|
+
if (obj_unicode_union0 && obj_unicode_union1) {
|
|
1003
|
+
let message = 'Object doesn\'t match union (at "' + path_unicode + '")';
|
|
1004
|
+
message += '\n' + obj_unicode_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1005
|
+
message += '\n' + obj_unicode_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1006
|
+
return new TypeError(message);
|
|
1007
|
+
}
|
|
1008
|
+
const obj_uniqueKey = obj.uniqueKey;
|
|
1009
|
+
const path_uniqueKey = path + '.uniqueKey';
|
|
1010
|
+
let obj_uniqueKey_union0 = null;
|
|
1011
|
+
const obj_uniqueKey_union0_error = (() => {
|
|
1012
|
+
if (typeof obj_uniqueKey !== 'string') {
|
|
1013
|
+
return new TypeError('Expected "string" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
|
|
1014
|
+
}
|
|
1015
|
+
})();
|
|
1016
|
+
if (obj_uniqueKey_union0_error != null) {
|
|
1017
|
+
obj_uniqueKey_union0 = obj_uniqueKey_union0_error.message;
|
|
1018
|
+
}
|
|
1019
|
+
let obj_uniqueKey_union1 = null;
|
|
1020
|
+
const obj_uniqueKey_union1_error = (() => {
|
|
1021
|
+
if (obj_uniqueKey !== null) {
|
|
1022
|
+
return new TypeError('Expected "null" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
|
|
1023
|
+
}
|
|
1024
|
+
})();
|
|
1025
|
+
if (obj_uniqueKey_union1_error != null) {
|
|
1026
|
+
obj_uniqueKey_union1 = obj_uniqueKey_union1_error.message;
|
|
1027
|
+
}
|
|
1028
|
+
if (obj_uniqueKey_union0 && obj_uniqueKey_union1) {
|
|
1029
|
+
let message = 'Object doesn\'t match union (at "' + path_uniqueKey + '")';
|
|
1030
|
+
message += '\n' + obj_uniqueKey_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1031
|
+
message += '\n' + obj_uniqueKey_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1032
|
+
return new TypeError(message);
|
|
1033
|
+
}
|
|
1034
|
+
const obj_url = obj.url;
|
|
1035
|
+
const path_url = path + '.url';
|
|
1036
|
+
let obj_url_union0 = null;
|
|
1037
|
+
const obj_url_union0_error = (() => {
|
|
1038
|
+
if (typeof obj_url !== 'string') {
|
|
1039
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1040
|
+
}
|
|
1041
|
+
})();
|
|
1042
|
+
if (obj_url_union0_error != null) {
|
|
1043
|
+
obj_url_union0 = obj_url_union0_error.message;
|
|
1044
|
+
}
|
|
1045
|
+
let obj_url_union1 = null;
|
|
1046
|
+
const obj_url_union1_error = (() => {
|
|
1047
|
+
if (obj_url !== null) {
|
|
1048
|
+
return new TypeError('Expected "null" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1049
|
+
}
|
|
1050
|
+
})();
|
|
1051
|
+
if (obj_url_union1_error != null) {
|
|
1052
|
+
obj_url_union1 = obj_url_union1_error.message;
|
|
1053
|
+
}
|
|
1054
|
+
if (obj_url_union0 && obj_url_union1) {
|
|
1055
|
+
let message = 'Object doesn\'t match union (at "' + path_url + '")';
|
|
1056
|
+
message += '\n' + obj_url_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1057
|
+
message += '\n' + obj_url_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1058
|
+
return new TypeError(message);
|
|
1059
|
+
}
|
|
1060
|
+
})();
|
|
1061
|
+
return v_error === undefined ? null : v_error;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
function validate$m(obj, path = 'SlackMessageOutputRepresentation') {
|
|
1065
|
+
const v_error = (() => {
|
|
1066
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1067
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1068
|
+
}
|
|
1069
|
+
const obj_appId = obj.appId;
|
|
1070
|
+
const path_appId = path + '.appId';
|
|
1071
|
+
if (typeof obj_appId !== 'string') {
|
|
1072
|
+
return new TypeError('Expected "string" but received "' + typeof obj_appId + '" (at "' + path_appId + '")');
|
|
1073
|
+
}
|
|
1074
|
+
const obj_broadcastThreadTs = obj.broadcastThreadTs;
|
|
1075
|
+
const path_broadcastThreadTs = path + '.broadcastThreadTs';
|
|
1076
|
+
let obj_broadcastThreadTs_union0 = null;
|
|
1077
|
+
const obj_broadcastThreadTs_union0_error = (() => {
|
|
1078
|
+
if (typeof obj_broadcastThreadTs !== 'string') {
|
|
1079
|
+
return new TypeError('Expected "string" but received "' + typeof obj_broadcastThreadTs + '" (at "' + path_broadcastThreadTs + '")');
|
|
1080
|
+
}
|
|
1081
|
+
})();
|
|
1082
|
+
if (obj_broadcastThreadTs_union0_error != null) {
|
|
1083
|
+
obj_broadcastThreadTs_union0 = obj_broadcastThreadTs_union0_error.message;
|
|
1084
|
+
}
|
|
1085
|
+
let obj_broadcastThreadTs_union1 = null;
|
|
1086
|
+
const obj_broadcastThreadTs_union1_error = (() => {
|
|
1087
|
+
if (obj_broadcastThreadTs !== null) {
|
|
1088
|
+
return new TypeError('Expected "null" but received "' + typeof obj_broadcastThreadTs + '" (at "' + path_broadcastThreadTs + '")');
|
|
1089
|
+
}
|
|
1090
|
+
})();
|
|
1091
|
+
if (obj_broadcastThreadTs_union1_error != null) {
|
|
1092
|
+
obj_broadcastThreadTs_union1 = obj_broadcastThreadTs_union1_error.message;
|
|
1093
|
+
}
|
|
1094
|
+
if (obj_broadcastThreadTs_union0 && obj_broadcastThreadTs_union1) {
|
|
1095
|
+
let message = 'Object doesn\'t match union (at "' + path_broadcastThreadTs + '")';
|
|
1096
|
+
message += '\n' + obj_broadcastThreadTs_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1097
|
+
message += '\n' + obj_broadcastThreadTs_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1098
|
+
return new TypeError(message);
|
|
1099
|
+
}
|
|
1100
|
+
const obj_channelId = obj.channelId;
|
|
1101
|
+
const path_channelId = path + '.channelId';
|
|
1102
|
+
if (typeof obj_channelId !== 'string') {
|
|
1103
|
+
return new TypeError('Expected "string" but received "' + typeof obj_channelId + '" (at "' + path_channelId + '")');
|
|
1104
|
+
}
|
|
1105
|
+
const obj_files = obj.files;
|
|
1106
|
+
const path_files = path + '.files';
|
|
1107
|
+
if (!ArrayIsArray(obj_files)) {
|
|
1108
|
+
return new TypeError('Expected "array" but received "' + typeof obj_files + '" (at "' + path_files + '")');
|
|
1109
|
+
}
|
|
1110
|
+
for (let i = 0; i < obj_files.length; i++) {
|
|
1111
|
+
const obj_files_item = obj_files[i];
|
|
1112
|
+
const path_files_item = path_files + '[' + i + ']';
|
|
1113
|
+
const referencepath_files_itemValidationError = validate$q(obj_files_item, path_files_item);
|
|
1114
|
+
if (referencepath_files_itemValidationError !== null) {
|
|
1115
|
+
let message = 'Object doesn\'t match SlackFileOutputRepresentation (at "' + path_files_item + '")\n';
|
|
1116
|
+
message += referencepath_files_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1117
|
+
return new TypeError(message);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
const obj_includesCustomEmoji = obj.includesCustomEmoji;
|
|
1121
|
+
const path_includesCustomEmoji = path + '.includesCustomEmoji';
|
|
1122
|
+
let obj_includesCustomEmoji_union0 = null;
|
|
1123
|
+
const obj_includesCustomEmoji_union0_error = (() => {
|
|
1124
|
+
if (typeof obj_includesCustomEmoji !== 'boolean') {
|
|
1125
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_includesCustomEmoji + '" (at "' + path_includesCustomEmoji + '")');
|
|
1126
|
+
}
|
|
1127
|
+
})();
|
|
1128
|
+
if (obj_includesCustomEmoji_union0_error != null) {
|
|
1129
|
+
obj_includesCustomEmoji_union0 = obj_includesCustomEmoji_union0_error.message;
|
|
1130
|
+
}
|
|
1131
|
+
let obj_includesCustomEmoji_union1 = null;
|
|
1132
|
+
const obj_includesCustomEmoji_union1_error = (() => {
|
|
1133
|
+
if (obj_includesCustomEmoji !== null) {
|
|
1134
|
+
return new TypeError('Expected "null" but received "' + typeof obj_includesCustomEmoji + '" (at "' + path_includesCustomEmoji + '")');
|
|
1135
|
+
}
|
|
1136
|
+
})();
|
|
1137
|
+
if (obj_includesCustomEmoji_union1_error != null) {
|
|
1138
|
+
obj_includesCustomEmoji_union1 = obj_includesCustomEmoji_union1_error.message;
|
|
1139
|
+
}
|
|
1140
|
+
if (obj_includesCustomEmoji_union0 && obj_includesCustomEmoji_union1) {
|
|
1141
|
+
let message = 'Object doesn\'t match union (at "' + path_includesCustomEmoji + '")';
|
|
1142
|
+
message += '\n' + obj_includesCustomEmoji_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1143
|
+
message += '\n' + obj_includesCustomEmoji_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1144
|
+
return new TypeError(message);
|
|
1145
|
+
}
|
|
1146
|
+
const obj_isBroadcast = obj.isBroadcast;
|
|
1147
|
+
const path_isBroadcast = path + '.isBroadcast';
|
|
1148
|
+
if (typeof obj_isBroadcast !== 'boolean') {
|
|
1149
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isBroadcast + '" (at "' + path_isBroadcast + '")');
|
|
1150
|
+
}
|
|
1151
|
+
const obj_isEditable = obj.isEditable;
|
|
1152
|
+
const path_isEditable = path + '.isEditable';
|
|
1153
|
+
if (typeof obj_isEditable !== 'boolean') {
|
|
1154
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isEditable + '" (at "' + path_isEditable + '")');
|
|
1155
|
+
}
|
|
1156
|
+
const obj_isEdited = obj.isEdited;
|
|
1157
|
+
const path_isEdited = path + '.isEdited';
|
|
1158
|
+
if (typeof obj_isEdited !== 'boolean') {
|
|
1159
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isEdited + '" (at "' + path_isEdited + '")');
|
|
1160
|
+
}
|
|
1161
|
+
const obj_isFileReadAllowed = obj.isFileReadAllowed;
|
|
1162
|
+
const path_isFileReadAllowed = path + '.isFileReadAllowed';
|
|
1163
|
+
if (typeof obj_isFileReadAllowed !== 'boolean') {
|
|
1164
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isFileReadAllowed + '" (at "' + path_isFileReadAllowed + '")');
|
|
1165
|
+
}
|
|
1166
|
+
const obj_latestReplyTimestamp = obj.latestReplyTimestamp;
|
|
1167
|
+
const path_latestReplyTimestamp = path + '.latestReplyTimestamp';
|
|
1168
|
+
let obj_latestReplyTimestamp_union0 = null;
|
|
1169
|
+
const obj_latestReplyTimestamp_union0_error = (() => {
|
|
1170
|
+
if (typeof obj_latestReplyTimestamp !== 'string') {
|
|
1171
|
+
return new TypeError('Expected "string" but received "' + typeof obj_latestReplyTimestamp + '" (at "' + path_latestReplyTimestamp + '")');
|
|
1172
|
+
}
|
|
1173
|
+
})();
|
|
1174
|
+
if (obj_latestReplyTimestamp_union0_error != null) {
|
|
1175
|
+
obj_latestReplyTimestamp_union0 = obj_latestReplyTimestamp_union0_error.message;
|
|
1176
|
+
}
|
|
1177
|
+
let obj_latestReplyTimestamp_union1 = null;
|
|
1178
|
+
const obj_latestReplyTimestamp_union1_error = (() => {
|
|
1179
|
+
if (obj_latestReplyTimestamp !== null) {
|
|
1180
|
+
return new TypeError('Expected "null" but received "' + typeof obj_latestReplyTimestamp + '" (at "' + path_latestReplyTimestamp + '")');
|
|
1181
|
+
}
|
|
1182
|
+
})();
|
|
1183
|
+
if (obj_latestReplyTimestamp_union1_error != null) {
|
|
1184
|
+
obj_latestReplyTimestamp_union1 = obj_latestReplyTimestamp_union1_error.message;
|
|
1185
|
+
}
|
|
1186
|
+
if (obj_latestReplyTimestamp_union0 && obj_latestReplyTimestamp_union1) {
|
|
1187
|
+
let message = 'Object doesn\'t match union (at "' + path_latestReplyTimestamp + '")';
|
|
1188
|
+
message += '\n' + obj_latestReplyTimestamp_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1189
|
+
message += '\n' + obj_latestReplyTimestamp_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1190
|
+
return new TypeError(message);
|
|
1191
|
+
}
|
|
1192
|
+
const obj_message = obj.message;
|
|
1193
|
+
const path_message = path + '.message';
|
|
1194
|
+
if (typeof obj_message !== 'string') {
|
|
1195
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1196
|
+
}
|
|
1197
|
+
obj.messageEpochMillisecond;
|
|
1198
|
+
const obj_outbound = obj.outbound;
|
|
1199
|
+
const path_outbound = path + '.outbound';
|
|
1200
|
+
if (typeof obj_outbound !== 'boolean') {
|
|
1201
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_outbound + '" (at "' + path_outbound + '")');
|
|
1202
|
+
}
|
|
1203
|
+
const obj_reactions = obj.reactions;
|
|
1204
|
+
const path_reactions = path + '.reactions';
|
|
1205
|
+
if (!ArrayIsArray(obj_reactions)) {
|
|
1206
|
+
return new TypeError('Expected "array" but received "' + typeof obj_reactions + '" (at "' + path_reactions + '")');
|
|
1207
|
+
}
|
|
1208
|
+
for (let i = 0; i < obj_reactions.length; i++) {
|
|
1209
|
+
const obj_reactions_item = obj_reactions[i];
|
|
1210
|
+
const path_reactions_item = path_reactions + '[' + i + ']';
|
|
1211
|
+
const referencepath_reactions_itemValidationError = validate$n(obj_reactions_item, path_reactions_item);
|
|
1212
|
+
if (referencepath_reactions_itemValidationError !== null) {
|
|
1213
|
+
let message = 'Object doesn\'t match SlackReactionOutputRepresentation (at "' + path_reactions_item + '")\n';
|
|
1214
|
+
message += referencepath_reactions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1215
|
+
return new TypeError(message);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
const obj_replyCount = obj.replyCount;
|
|
1219
|
+
const path_replyCount = path + '.replyCount';
|
|
1220
|
+
let obj_replyCount_union0 = null;
|
|
1221
|
+
const obj_replyCount_union0_error = (() => {
|
|
1222
|
+
if (typeof obj_replyCount !== 'number' || (typeof obj_replyCount === 'number' && Math.floor(obj_replyCount) !== obj_replyCount)) {
|
|
1223
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_replyCount + '" (at "' + path_replyCount + '")');
|
|
1224
|
+
}
|
|
1225
|
+
})();
|
|
1226
|
+
if (obj_replyCount_union0_error != null) {
|
|
1227
|
+
obj_replyCount_union0 = obj_replyCount_union0_error.message;
|
|
1228
|
+
}
|
|
1229
|
+
let obj_replyCount_union1 = null;
|
|
1230
|
+
const obj_replyCount_union1_error = (() => {
|
|
1231
|
+
if (obj_replyCount !== null) {
|
|
1232
|
+
return new TypeError('Expected "null" but received "' + typeof obj_replyCount + '" (at "' + path_replyCount + '")');
|
|
1233
|
+
}
|
|
1234
|
+
})();
|
|
1235
|
+
if (obj_replyCount_union1_error != null) {
|
|
1236
|
+
obj_replyCount_union1 = obj_replyCount_union1_error.message;
|
|
1237
|
+
}
|
|
1238
|
+
if (obj_replyCount_union0 && obj_replyCount_union1) {
|
|
1239
|
+
let message = 'Object doesn\'t match union (at "' + path_replyCount + '")';
|
|
1240
|
+
message += '\n' + obj_replyCount_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1241
|
+
message += '\n' + obj_replyCount_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1242
|
+
return new TypeError(message);
|
|
1243
|
+
}
|
|
1244
|
+
const obj_replyUsers = obj.replyUsers;
|
|
1245
|
+
const path_replyUsers = path + '.replyUsers';
|
|
1246
|
+
if (!ArrayIsArray(obj_replyUsers)) {
|
|
1247
|
+
return new TypeError('Expected "array" but received "' + typeof obj_replyUsers + '" (at "' + path_replyUsers + '")');
|
|
1248
|
+
}
|
|
1249
|
+
for (let i = 0; i < obj_replyUsers.length; i++) {
|
|
1250
|
+
const obj_replyUsers_item = obj_replyUsers[i];
|
|
1251
|
+
const path_replyUsers_item = path_replyUsers + '[' + i + ']';
|
|
1252
|
+
const referencepath_replyUsers_itemValidationError = validate$o(obj_replyUsers_item, path_replyUsers_item);
|
|
1253
|
+
if (referencepath_replyUsers_itemValidationError !== null) {
|
|
1254
|
+
let message = 'Object doesn\'t match SlackUserInfoOutputRepresentation (at "' + path_replyUsers_item + '")\n';
|
|
1255
|
+
message += referencepath_replyUsers_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1256
|
+
return new TypeError(message);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
const obj_replyUsersCount = obj.replyUsersCount;
|
|
1260
|
+
const path_replyUsersCount = path + '.replyUsersCount';
|
|
1261
|
+
let obj_replyUsersCount_union0 = null;
|
|
1262
|
+
const obj_replyUsersCount_union0_error = (() => {
|
|
1263
|
+
if (typeof obj_replyUsersCount !== 'number' || (typeof obj_replyUsersCount === 'number' && Math.floor(obj_replyUsersCount) !== obj_replyUsersCount)) {
|
|
1264
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_replyUsersCount + '" (at "' + path_replyUsersCount + '")');
|
|
1265
|
+
}
|
|
1266
|
+
})();
|
|
1267
|
+
if (obj_replyUsersCount_union0_error != null) {
|
|
1268
|
+
obj_replyUsersCount_union0 = obj_replyUsersCount_union0_error.message;
|
|
1269
|
+
}
|
|
1270
|
+
let obj_replyUsersCount_union1 = null;
|
|
1271
|
+
const obj_replyUsersCount_union1_error = (() => {
|
|
1272
|
+
if (obj_replyUsersCount !== null) {
|
|
1273
|
+
return new TypeError('Expected "null" but received "' + typeof obj_replyUsersCount + '" (at "' + path_replyUsersCount + '")');
|
|
1274
|
+
}
|
|
1275
|
+
})();
|
|
1276
|
+
if (obj_replyUsersCount_union1_error != null) {
|
|
1277
|
+
obj_replyUsersCount_union1 = obj_replyUsersCount_union1_error.message;
|
|
1278
|
+
}
|
|
1279
|
+
if (obj_replyUsersCount_union0 && obj_replyUsersCount_union1) {
|
|
1280
|
+
let message = 'Object doesn\'t match union (at "' + path_replyUsersCount + '")';
|
|
1281
|
+
message += '\n' + obj_replyUsersCount_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1282
|
+
message += '\n' + obj_replyUsersCount_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1283
|
+
return new TypeError(message);
|
|
1284
|
+
}
|
|
1285
|
+
const obj_slackMessageTs = obj.slackMessageTs;
|
|
1286
|
+
const path_slackMessageTs = path + '.slackMessageTs';
|
|
1287
|
+
if (typeof obj_slackMessageTs !== 'string') {
|
|
1288
|
+
return new TypeError('Expected "string" but received "' + typeof obj_slackMessageTs + '" (at "' + path_slackMessageTs + '")');
|
|
1289
|
+
}
|
|
1290
|
+
const obj_subtype = obj.subtype;
|
|
1291
|
+
const path_subtype = path + '.subtype';
|
|
1292
|
+
let obj_subtype_union0 = null;
|
|
1293
|
+
const obj_subtype_union0_error = (() => {
|
|
1294
|
+
if (typeof obj_subtype !== 'string') {
|
|
1295
|
+
return new TypeError('Expected "string" but received "' + typeof obj_subtype + '" (at "' + path_subtype + '")');
|
|
1296
|
+
}
|
|
1297
|
+
})();
|
|
1298
|
+
if (obj_subtype_union0_error != null) {
|
|
1299
|
+
obj_subtype_union0 = obj_subtype_union0_error.message;
|
|
1300
|
+
}
|
|
1301
|
+
let obj_subtype_union1 = null;
|
|
1302
|
+
const obj_subtype_union1_error = (() => {
|
|
1303
|
+
if (obj_subtype !== null) {
|
|
1304
|
+
return new TypeError('Expected "null" but received "' + typeof obj_subtype + '" (at "' + path_subtype + '")');
|
|
1305
|
+
}
|
|
1306
|
+
})();
|
|
1307
|
+
if (obj_subtype_union1_error != null) {
|
|
1308
|
+
obj_subtype_union1 = obj_subtype_union1_error.message;
|
|
1309
|
+
}
|
|
1310
|
+
if (obj_subtype_union0 && obj_subtype_union1) {
|
|
1311
|
+
let message = 'Object doesn\'t match union (at "' + path_subtype + '")';
|
|
1312
|
+
message += '\n' + obj_subtype_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1313
|
+
message += '\n' + obj_subtype_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1314
|
+
return new TypeError(message);
|
|
1315
|
+
}
|
|
1316
|
+
const obj_teamId = obj.teamId;
|
|
1317
|
+
const path_teamId = path + '.teamId';
|
|
1318
|
+
if (typeof obj_teamId !== 'string') {
|
|
1319
|
+
return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
|
|
1320
|
+
}
|
|
1321
|
+
const obj_threadTs = obj.threadTs;
|
|
1322
|
+
const path_threadTs = path + '.threadTs';
|
|
1323
|
+
let obj_threadTs_union0 = null;
|
|
1324
|
+
const obj_threadTs_union0_error = (() => {
|
|
1325
|
+
if (typeof obj_threadTs !== 'string') {
|
|
1326
|
+
return new TypeError('Expected "string" but received "' + typeof obj_threadTs + '" (at "' + path_threadTs + '")');
|
|
1327
|
+
}
|
|
1328
|
+
})();
|
|
1329
|
+
if (obj_threadTs_union0_error != null) {
|
|
1330
|
+
obj_threadTs_union0 = obj_threadTs_union0_error.message;
|
|
1331
|
+
}
|
|
1332
|
+
let obj_threadTs_union1 = null;
|
|
1333
|
+
const obj_threadTs_union1_error = (() => {
|
|
1334
|
+
if (obj_threadTs !== null) {
|
|
1335
|
+
return new TypeError('Expected "null" but received "' + typeof obj_threadTs + '" (at "' + path_threadTs + '")');
|
|
1336
|
+
}
|
|
1337
|
+
})();
|
|
1338
|
+
if (obj_threadTs_union1_error != null) {
|
|
1339
|
+
obj_threadTs_union1 = obj_threadTs_union1_error.message;
|
|
1340
|
+
}
|
|
1341
|
+
if (obj_threadTs_union0 && obj_threadTs_union1) {
|
|
1342
|
+
let message = 'Object doesn\'t match union (at "' + path_threadTs + '")';
|
|
1343
|
+
message += '\n' + obj_threadTs_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1344
|
+
message += '\n' + obj_threadTs_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1345
|
+
return new TypeError(message);
|
|
1346
|
+
}
|
|
1347
|
+
const obj_type = obj.type;
|
|
1348
|
+
const path_type = path + '.type';
|
|
1349
|
+
if (typeof obj_type !== 'string') {
|
|
1350
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1351
|
+
}
|
|
1352
|
+
const obj_uniqueKey = obj.uniqueKey;
|
|
1353
|
+
const path_uniqueKey = path + '.uniqueKey';
|
|
1354
|
+
if (typeof obj_uniqueKey !== 'string') {
|
|
1355
|
+
return new TypeError('Expected "string" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
|
|
1356
|
+
}
|
|
1357
|
+
const obj_url = obj.url;
|
|
1358
|
+
const path_url = path + '.url';
|
|
1359
|
+
if (typeof obj_url !== 'string') {
|
|
1360
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1361
|
+
}
|
|
1362
|
+
const obj_userInfo = obj.userInfo;
|
|
1363
|
+
const path_userInfo = path + '.userInfo';
|
|
1364
|
+
const referencepath_userInfoValidationError = validate$o(obj_userInfo, path_userInfo);
|
|
1365
|
+
if (referencepath_userInfoValidationError !== null) {
|
|
1366
|
+
let message = 'Object doesn\'t match SlackUserInfoOutputRepresentation (at "' + path_userInfo + '")\n';
|
|
1367
|
+
message += referencepath_userInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1368
|
+
return new TypeError(message);
|
|
1369
|
+
}
|
|
1370
|
+
})();
|
|
1371
|
+
return v_error === undefined ? null : v_error;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
function validate$l(obj, path = 'AnnotationConversationRepresentation') {
|
|
1375
|
+
const v_error = (() => {
|
|
1376
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1377
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1378
|
+
}
|
|
1379
|
+
const obj_channelId = obj.channelId;
|
|
1380
|
+
const path_channelId = path + '.channelId';
|
|
1381
|
+
if (typeof obj_channelId !== 'string') {
|
|
1382
|
+
return new TypeError('Expected "string" but received "' + typeof obj_channelId + '" (at "' + path_channelId + '")');
|
|
1383
|
+
}
|
|
1384
|
+
const obj_channelName = obj.channelName;
|
|
1385
|
+
const path_channelName = path + '.channelName';
|
|
1386
|
+
if (typeof obj_channelName !== 'string') {
|
|
1387
|
+
return new TypeError('Expected "string" but received "' + typeof obj_channelName + '" (at "' + path_channelName + '")');
|
|
1388
|
+
}
|
|
1389
|
+
const obj_conversationId = obj.conversationId;
|
|
1390
|
+
const path_conversationId = path + '.conversationId';
|
|
1391
|
+
if (typeof obj_conversationId !== 'string') {
|
|
1392
|
+
return new TypeError('Expected "string" but received "' + typeof obj_conversationId + '" (at "' + path_conversationId + '")');
|
|
1393
|
+
}
|
|
1394
|
+
if (obj.message !== undefined) {
|
|
1395
|
+
const obj_message = obj.message;
|
|
1396
|
+
const path_message = path + '.message';
|
|
1397
|
+
const referencepath_messageValidationError = validate$m(obj_message, path_message);
|
|
1398
|
+
if (referencepath_messageValidationError !== null) {
|
|
1399
|
+
let message = 'Object doesn\'t match SlackMessageOutputRepresentation (at "' + path_message + '")\n';
|
|
1400
|
+
message += referencepath_messageValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1401
|
+
return new TypeError(message);
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
const obj_teamId = obj.teamId;
|
|
1405
|
+
const path_teamId = path + '.teamId';
|
|
1406
|
+
if (typeof obj_teamId !== 'string') {
|
|
1407
|
+
return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
|
|
1408
|
+
}
|
|
1409
|
+
})();
|
|
1410
|
+
return v_error === undefined ? null : v_error;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
const TTL$3 = 1000;
|
|
1414
|
+
const VERSION$d = "bacc25da56cffff8126d9bdafc471a37";
|
|
1415
|
+
function validate$k(obj, path = 'AnnotationRepresentation') {
|
|
1416
|
+
const v_error = (() => {
|
|
1417
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1418
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1419
|
+
}
|
|
1420
|
+
if (obj.anchor !== undefined) {
|
|
1421
|
+
const obj_anchor = obj.anchor;
|
|
1422
|
+
const path_anchor = path + '.anchor';
|
|
1423
|
+
const referencepath_anchorValidationError = validate$v(obj_anchor, path_anchor);
|
|
1424
|
+
if (referencepath_anchorValidationError !== null) {
|
|
1425
|
+
let message = 'Object doesn\'t match DashboardAnnotationAnchorRepresentation (at "' + path_anchor + '")\n';
|
|
1426
|
+
message += referencepath_anchorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1427
|
+
return new TypeError(message);
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
const obj_annotationTool = obj.annotationTool;
|
|
1431
|
+
const path_annotationTool = path + '.annotationTool';
|
|
1432
|
+
if (typeof obj_annotationTool !== 'string') {
|
|
1433
|
+
return new TypeError('Expected "string" but received "' + typeof obj_annotationTool + '" (at "' + path_annotationTool + '")');
|
|
1434
|
+
}
|
|
1435
|
+
const obj_asset = obj.asset;
|
|
1436
|
+
const path_asset = path + '.asset';
|
|
1437
|
+
const referencepath_assetValidationError = validate$u(obj_asset, path_asset);
|
|
1438
|
+
if (referencepath_assetValidationError !== null) {
|
|
1439
|
+
let message = 'Object doesn\'t match AnnotationAssetRepresentation (at "' + path_asset + '")\n';
|
|
1440
|
+
message += referencepath_assetValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1441
|
+
return new TypeError(message);
|
|
1442
|
+
}
|
|
1443
|
+
const obj_collaborationObject = obj.collaborationObject;
|
|
1444
|
+
const path_collaborationObject = path + '.collaborationObject';
|
|
1445
|
+
const referencepath_collaborationObjectValidationError = validate$l(obj_collaborationObject, path_collaborationObject);
|
|
1446
|
+
if (referencepath_collaborationObjectValidationError !== null) {
|
|
1447
|
+
let message = 'Object doesn\'t match AnnotationConversationRepresentation (at "' + path_collaborationObject + '")\n';
|
|
1448
|
+
message += referencepath_collaborationObjectValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1449
|
+
return new TypeError(message);
|
|
1450
|
+
}
|
|
1451
|
+
const obj_id = obj.id;
|
|
1452
|
+
const path_id = path + '.id';
|
|
1453
|
+
if (typeof obj_id !== 'string') {
|
|
1454
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1455
|
+
}
|
|
1456
|
+
const obj_status = obj.status;
|
|
1457
|
+
const path_status = path + '.status';
|
|
1458
|
+
if (typeof obj_status !== 'string') {
|
|
1459
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1460
|
+
}
|
|
1461
|
+
})();
|
|
1462
|
+
return v_error === undefined ? null : v_error;
|
|
1463
|
+
}
|
|
1464
|
+
const RepresentationType$d = 'AnnotationRepresentation';
|
|
1465
|
+
function keyBuilder$v(luvio, config) {
|
|
1466
|
+
return keyPrefix + '::' + RepresentationType$d + ':' + config.id;
|
|
1467
|
+
}
|
|
1468
|
+
function keyBuilderFromType$7(luvio, object) {
|
|
1469
|
+
const keyParams = {
|
|
1470
|
+
id: object.id
|
|
1471
|
+
};
|
|
1472
|
+
return keyBuilder$v(luvio, keyParams);
|
|
1473
|
+
}
|
|
1474
|
+
function normalize$d(input, existing, path, luvio, store, timestamp) {
|
|
1475
|
+
return input;
|
|
1476
|
+
}
|
|
1477
|
+
const select$w = function AnnotationRepresentationSelect() {
|
|
1478
|
+
return {
|
|
1479
|
+
kind: 'Fragment',
|
|
1480
|
+
version: VERSION$d,
|
|
1481
|
+
private: [],
|
|
1482
|
+
opaque: true
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
function equals$d(existing, incoming) {
|
|
1486
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1487
|
+
return false;
|
|
1488
|
+
}
|
|
1489
|
+
return true;
|
|
1490
|
+
}
|
|
1491
|
+
const ingest$d = function AnnotationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1492
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1493
|
+
const validateError = validate$k(input);
|
|
1494
|
+
if (validateError !== null) {
|
|
1495
|
+
throw validateError;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
const key = keyBuilderFromType$7(luvio, input);
|
|
1499
|
+
const ttlToUse = TTL$3;
|
|
1500
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$d, "UnifiedAnalytics", VERSION$d, RepresentationType$d, equals$d);
|
|
1501
|
+
return createLink(key);
|
|
1502
|
+
};
|
|
1503
|
+
function getTypeCacheKeys$d(rootKeySet, luvio, input, fullPathFactory) {
|
|
1504
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1505
|
+
const rootKey = keyBuilderFromType$7(luvio, input);
|
|
1506
|
+
rootKeySet.set(rootKey, {
|
|
1507
|
+
namespace: keyPrefix,
|
|
1508
|
+
representationName: RepresentationType$d,
|
|
1509
|
+
mergeable: false
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
const VERSION$c = "a80c8e970184cc7789e13f69392d6203";
|
|
1514
|
+
function validate$j(obj, path = 'AnnotationCollectionRepresentation') {
|
|
1515
|
+
const v_error = (() => {
|
|
1516
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1517
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1518
|
+
}
|
|
1519
|
+
const obj_annotations = obj.annotations;
|
|
1520
|
+
const path_annotations = path + '.annotations';
|
|
1521
|
+
if (!ArrayIsArray(obj_annotations)) {
|
|
1522
|
+
return new TypeError('Expected "array" but received "' + typeof obj_annotations + '" (at "' + path_annotations + '")');
|
|
1523
|
+
}
|
|
1524
|
+
for (let i = 0; i < obj_annotations.length; i++) {
|
|
1525
|
+
const obj_annotations_item = obj_annotations[i];
|
|
1526
|
+
const path_annotations_item = path_annotations + '[' + i + ']';
|
|
1527
|
+
if (typeof obj_annotations_item !== 'object') {
|
|
1528
|
+
return new TypeError('Expected "object" but received "' + typeof obj_annotations_item + '" (at "' + path_annotations_item + '")');
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
const obj_total = obj.total;
|
|
1532
|
+
const path_total = path + '.total';
|
|
1533
|
+
if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
|
|
1534
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
|
|
1535
|
+
}
|
|
1536
|
+
})();
|
|
1537
|
+
return v_error === undefined ? null : v_error;
|
|
1538
|
+
}
|
|
1539
|
+
const RepresentationType$c = 'AnnotationCollectionRepresentation';
|
|
1540
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
1541
|
+
const input_annotations = input.annotations;
|
|
1542
|
+
const input_annotations_id = path.fullPath + '__annotations';
|
|
1543
|
+
for (let i = 0; i < input_annotations.length; i++) {
|
|
1544
|
+
const input_annotations_item = input_annotations[i];
|
|
1545
|
+
let input_annotations_item_id = input_annotations_id + '__' + i;
|
|
1546
|
+
input_annotations[i] = ingest$d(input_annotations_item, {
|
|
1547
|
+
fullPath: input_annotations_item_id,
|
|
1548
|
+
propertyName: i,
|
|
1549
|
+
parent: {
|
|
1550
|
+
data: input,
|
|
1551
|
+
key: path.fullPath,
|
|
1552
|
+
existing: existing,
|
|
1553
|
+
},
|
|
1554
|
+
ttl: path.ttl
|
|
1555
|
+
}, luvio, store, timestamp);
|
|
1556
|
+
}
|
|
1557
|
+
return input;
|
|
1558
|
+
}
|
|
1559
|
+
const select$v = function AnnotationCollectionRepresentationSelect() {
|
|
1560
|
+
return {
|
|
1561
|
+
kind: 'Fragment',
|
|
1562
|
+
version: VERSION$c,
|
|
1563
|
+
private: [],
|
|
1564
|
+
selections: [
|
|
1565
|
+
{
|
|
1566
|
+
name: 'annotations',
|
|
1567
|
+
kind: 'Link',
|
|
1568
|
+
plural: true,
|
|
1569
|
+
fragment: select$w()
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
name: 'total',
|
|
1573
|
+
kind: 'Scalar'
|
|
1574
|
+
}
|
|
1575
|
+
]
|
|
1576
|
+
};
|
|
1577
|
+
};
|
|
1578
|
+
function equals$c(existing, incoming) {
|
|
1579
|
+
const existing_total = existing.total;
|
|
1580
|
+
const incoming_total = incoming.total;
|
|
1581
|
+
if (!(existing_total === incoming_total)) {
|
|
1582
|
+
return false;
|
|
1583
|
+
}
|
|
1584
|
+
const existing_annotations = existing.annotations;
|
|
1585
|
+
const incoming_annotations = incoming.annotations;
|
|
1586
|
+
const equals_annotations_items = equalsArray(existing_annotations, incoming_annotations, (existing_annotations_item, incoming_annotations_item) => {
|
|
1587
|
+
if (!(existing_annotations_item.__ref === incoming_annotations_item.__ref)) {
|
|
1588
|
+
return false;
|
|
1589
|
+
}
|
|
1590
|
+
});
|
|
1591
|
+
if (equals_annotations_items === false) {
|
|
1592
|
+
return false;
|
|
1593
|
+
}
|
|
1594
|
+
return true;
|
|
1595
|
+
}
|
|
1596
|
+
const ingest$c = function AnnotationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1597
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1598
|
+
const validateError = validate$j(input);
|
|
1599
|
+
if (validateError !== null) {
|
|
1600
|
+
throw validateError;
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
const key = path.fullPath;
|
|
1604
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1605
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "UnifiedAnalytics", VERSION$c, RepresentationType$c, equals$c);
|
|
1606
|
+
return createLink(key);
|
|
1607
|
+
};
|
|
1608
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
1609
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1610
|
+
const rootKey = fullPathFactory();
|
|
1611
|
+
rootKeySet.set(rootKey, {
|
|
1612
|
+
namespace: keyPrefix,
|
|
1613
|
+
representationName: RepresentationType$c,
|
|
1614
|
+
mergeable: false
|
|
1615
|
+
});
|
|
1616
|
+
const input_annotations_length = input.annotations.length;
|
|
1617
|
+
for (let i = 0; i < input_annotations_length; i++) {
|
|
1618
|
+
getTypeCacheKeys$d(rootKeySet, luvio, input.annotations[i]);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
function select$u(luvio, params) {
|
|
1623
|
+
return select$v();
|
|
1624
|
+
}
|
|
1625
|
+
function keyBuilder$u(luvio, params) {
|
|
1626
|
+
return keyPrefix + '::AnnotationCollectionRepresentation:(' + 'assetIds:' + params.queryParams.assetIds + ',' + 'includeTopMessage:' + params.queryParams.includeTopMessage + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'slackAppId:' + params.queryParams.slackAppId + ')';
|
|
1627
|
+
}
|
|
1628
|
+
function getResponseCacheKeys$m(storeKeyMap, luvio, resourceParams, response) {
|
|
1629
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response, () => keyBuilder$u(luvio, resourceParams));
|
|
1630
|
+
}
|
|
1631
|
+
function ingestSuccess$i(luvio, resourceParams, response, snapshotRefresh) {
|
|
1632
|
+
const { body } = response;
|
|
1633
|
+
const key = keyBuilder$u(luvio, resourceParams);
|
|
1634
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
1635
|
+
const snapshot = luvio.storeLookup({
|
|
1636
|
+
recordId: key,
|
|
1637
|
+
node: select$u(),
|
|
1638
|
+
variables: {},
|
|
1639
|
+
}, snapshotRefresh);
|
|
1640
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1641
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1642
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
deepFreeze(snapshot.data);
|
|
1646
|
+
return snapshot;
|
|
1647
|
+
}
|
|
1648
|
+
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
1649
|
+
const key = keyBuilder$u(luvio, params);
|
|
1650
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1651
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1652
|
+
return errorSnapshot;
|
|
1653
|
+
}
|
|
1654
|
+
function createResourceRequest$m(config) {
|
|
1655
|
+
const headers = {};
|
|
1656
|
+
return {
|
|
1657
|
+
baseUri: '/services/data/v62.0',
|
|
1658
|
+
basePath: '/unified-analytics/annotations',
|
|
1659
|
+
method: 'get',
|
|
1660
|
+
body: null,
|
|
1661
|
+
urlParams: {},
|
|
1662
|
+
queryParams: config.queryParams,
|
|
1663
|
+
headers,
|
|
1664
|
+
priority: 'normal',
|
|
1665
|
+
};
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
const adapterName$m = 'getAnnotations';
|
|
1669
|
+
const getAnnotations_ConfigPropertyMetadata = [
|
|
1670
|
+
generateParamConfigMetadata('assetIds', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
1671
|
+
generateParamConfigMetadata('includeTopMessage', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1672
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1673
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1674
|
+
generateParamConfigMetadata('slackAppId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1675
|
+
];
|
|
1676
|
+
const getAnnotations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$m, getAnnotations_ConfigPropertyMetadata);
|
|
1677
|
+
const createResourceParams$m = /*#__PURE__*/ createResourceParams$n(getAnnotations_ConfigPropertyMetadata);
|
|
1678
|
+
function keyBuilder$t(luvio, config) {
|
|
1679
|
+
const resourceParams = createResourceParams$m(config);
|
|
1680
|
+
return keyBuilder$u(luvio, resourceParams);
|
|
1681
|
+
}
|
|
1682
|
+
function typeCheckConfig$m(untrustedConfig) {
|
|
1683
|
+
const config = {};
|
|
1684
|
+
typeCheckConfig$n(untrustedConfig, config, getAnnotations_ConfigPropertyMetadata);
|
|
1685
|
+
return config;
|
|
1686
|
+
}
|
|
1687
|
+
function validateAdapterConfig$m(untrustedConfig, configPropertyNames) {
|
|
1688
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1689
|
+
return null;
|
|
1690
|
+
}
|
|
1691
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1692
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1693
|
+
}
|
|
1694
|
+
const config = typeCheckConfig$m(untrustedConfig);
|
|
1695
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1696
|
+
return null;
|
|
1697
|
+
}
|
|
1698
|
+
return config;
|
|
1699
|
+
}
|
|
1700
|
+
function adapterFragment$9(luvio, config) {
|
|
1701
|
+
createResourceParams$m(config);
|
|
1702
|
+
return select$u();
|
|
1703
|
+
}
|
|
1704
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
1705
|
+
const snapshot = ingestSuccess$i(luvio, resourceParams, response, {
|
|
1706
|
+
config,
|
|
1707
|
+
resolve: () => buildNetworkSnapshot$m(luvio, config, snapshotRefreshOptions)
|
|
1708
|
+
});
|
|
1709
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1710
|
+
}
|
|
1711
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
1712
|
+
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
1713
|
+
config,
|
|
1714
|
+
resolve: () => buildNetworkSnapshot$m(luvio, config, snapshotRefreshOptions)
|
|
1715
|
+
});
|
|
1716
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1717
|
+
}
|
|
1718
|
+
function buildNetworkSnapshot$m(luvio, config, options) {
|
|
1719
|
+
const resourceParams = createResourceParams$m(config);
|
|
1720
|
+
const request = createResourceRequest$m(resourceParams);
|
|
1721
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1722
|
+
.then((response) => {
|
|
1723
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
1724
|
+
const cache = new StoreKeyMap();
|
|
1725
|
+
getResponseCacheKeys$m(cache, luvio, resourceParams, response.body);
|
|
1726
|
+
return cache;
|
|
1727
|
+
});
|
|
1728
|
+
}, (response) => {
|
|
1729
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
1733
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$m, undefined, false);
|
|
1734
|
+
}
|
|
1735
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
1736
|
+
const { luvio, config } = context;
|
|
1737
|
+
const selector = {
|
|
1738
|
+
recordId: keyBuilder$t(luvio, config),
|
|
1739
|
+
node: adapterFragment$9(luvio, config),
|
|
1740
|
+
variables: {},
|
|
1741
|
+
};
|
|
1742
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1743
|
+
config,
|
|
1744
|
+
resolve: () => buildNetworkSnapshot$m(luvio, config, snapshotRefreshOptions)
|
|
1745
|
+
});
|
|
1746
|
+
return cacheSnapshot;
|
|
1747
|
+
}
|
|
1748
|
+
const getAnnotationsAdapterFactory = (luvio) => function UnifiedAnalytics__getAnnotations(untrustedConfig, requestContext) {
|
|
1749
|
+
const config = validateAdapterConfig$m(untrustedConfig, getAnnotations_ConfigPropertyNames);
|
|
1750
|
+
// Invalid or incomplete config
|
|
1751
|
+
if (config === null) {
|
|
1752
|
+
return null;
|
|
1753
|
+
}
|
|
1754
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1755
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
1756
|
+
};
|
|
1757
|
+
|
|
1758
|
+
function select$t(luvio, params) {
|
|
1759
|
+
return select$w();
|
|
1760
|
+
}
|
|
1761
|
+
function getResponseCacheKeys$l(storeKeyMap, luvio, resourceParams, response) {
|
|
1762
|
+
getTypeCacheKeys$d(storeKeyMap, luvio, response);
|
|
1763
|
+
}
|
|
1764
|
+
function ingestSuccess$h(luvio, resourceParams, response) {
|
|
1765
|
+
const { body } = response;
|
|
1766
|
+
const key = keyBuilderFromType$7(luvio, body);
|
|
1767
|
+
luvio.storeIngest(key, ingest$d, body);
|
|
1768
|
+
const snapshot = luvio.storeLookup({
|
|
1769
|
+
recordId: key,
|
|
1770
|
+
node: select$t(),
|
|
1771
|
+
variables: {},
|
|
1772
|
+
});
|
|
1773
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1774
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1775
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
deepFreeze(snapshot.data);
|
|
1779
|
+
return snapshot;
|
|
1780
|
+
}
|
|
1781
|
+
function createResourceRequest$l(config) {
|
|
1782
|
+
const headers = {};
|
|
1783
|
+
return {
|
|
1784
|
+
baseUri: '/services/data/v62.0',
|
|
1785
|
+
basePath: '/unified-analytics/annotations',
|
|
1786
|
+
method: 'post',
|
|
1787
|
+
body: config.body,
|
|
1788
|
+
urlParams: {},
|
|
1789
|
+
queryParams: {},
|
|
1790
|
+
headers,
|
|
1791
|
+
priority: 'normal',
|
|
1792
|
+
};
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
const adapterName$l = 'createAnnotation';
|
|
1796
|
+
const createAnnotation_ConfigPropertyMetadata = [
|
|
1797
|
+
generateParamConfigMetadata('anchor', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1798
|
+
generateParamConfigMetadata('annotationTool', true, 2 /* Body */, 0 /* String */),
|
|
1799
|
+
generateParamConfigMetadata('assetId', true, 2 /* Body */, 0 /* String */),
|
|
1800
|
+
generateParamConfigMetadata('assetType', true, 2 /* Body */, 0 /* String */),
|
|
1801
|
+
generateParamConfigMetadata('collaborationObject', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1802
|
+
generateParamConfigMetadata('status', true, 2 /* Body */, 0 /* String */),
|
|
1803
|
+
];
|
|
1804
|
+
const createAnnotation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$l, createAnnotation_ConfigPropertyMetadata);
|
|
1805
|
+
const createResourceParams$l = /*#__PURE__*/ createResourceParams$n(createAnnotation_ConfigPropertyMetadata);
|
|
1806
|
+
function typeCheckConfig$l(untrustedConfig) {
|
|
1807
|
+
const config = {};
|
|
1808
|
+
typeCheckConfig$n(untrustedConfig, config, createAnnotation_ConfigPropertyMetadata);
|
|
1809
|
+
const untrustedConfig_anchor = untrustedConfig.anchor;
|
|
1810
|
+
config.anchor = untrustedConfig_anchor;
|
|
1811
|
+
const untrustedConfig_collaborationObject = untrustedConfig.collaborationObject;
|
|
1812
|
+
config.collaborationObject = untrustedConfig_collaborationObject;
|
|
1813
|
+
return config;
|
|
1814
|
+
}
|
|
1815
|
+
function validateAdapterConfig$l(untrustedConfig, configPropertyNames) {
|
|
1816
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1817
|
+
return null;
|
|
1818
|
+
}
|
|
1819
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1820
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1821
|
+
}
|
|
1822
|
+
const config = typeCheckConfig$l(untrustedConfig);
|
|
1823
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1824
|
+
return null;
|
|
1825
|
+
}
|
|
1826
|
+
return config;
|
|
1827
|
+
}
|
|
1828
|
+
function buildNetworkSnapshot$l(luvio, config, options) {
|
|
1829
|
+
const resourceParams = createResourceParams$l(config);
|
|
1830
|
+
const request = createResourceRequest$l(resourceParams);
|
|
1831
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1832
|
+
.then((response) => {
|
|
1833
|
+
return luvio.handleSuccessResponse(() => {
|
|
1834
|
+
const snapshot = ingestSuccess$h(luvio, resourceParams, response);
|
|
1835
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1836
|
+
}, () => {
|
|
1837
|
+
const cache = new StoreKeyMap();
|
|
1838
|
+
getResponseCacheKeys$l(cache, luvio, resourceParams, response.body);
|
|
1839
|
+
return cache;
|
|
1840
|
+
});
|
|
1841
|
+
}, (response) => {
|
|
1842
|
+
deepFreeze(response);
|
|
1843
|
+
throw response;
|
|
1844
|
+
});
|
|
1845
|
+
}
|
|
1846
|
+
const createAnnotationAdapterFactory = (luvio) => {
|
|
1847
|
+
return function createAnnotation(untrustedConfig) {
|
|
1848
|
+
const config = validateAdapterConfig$l(untrustedConfig, createAnnotation_ConfigPropertyNames);
|
|
1849
|
+
// Invalid or incomplete config
|
|
1850
|
+
if (config === null) {
|
|
1851
|
+
throw new Error('Invalid config for "createAnnotation"');
|
|
1852
|
+
}
|
|
1853
|
+
return buildNetworkSnapshot$l(luvio, config);
|
|
1854
|
+
};
|
|
1855
|
+
};
|
|
1856
|
+
|
|
96
1857
|
function validate$i(obj, path = 'BaseAnalyticsRepresentation') {
|
|
97
1858
|
const v_error = (() => {
|
|
98
1859
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -531,18 +2292,18 @@ function createResourceRequest$k(config) {
|
|
|
531
2292
|
|
|
532
2293
|
const adapterName$k = 'queryAssets';
|
|
533
2294
|
const queryAssets_ConfigPropertyMetadata = [
|
|
534
|
-
generateParamConfigMetadata('filters',
|
|
535
|
-
generateParamConfigMetadata('limit',
|
|
536
|
-
generateParamConfigMetadata('offset',
|
|
537
|
-
generateParamConfigMetadata('orderBy',
|
|
2295
|
+
generateParamConfigMetadata('filters', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2296
|
+
generateParamConfigMetadata('limit', false, 2 /* Body */, 3 /* Integer */),
|
|
2297
|
+
generateParamConfigMetadata('offset', false, 2 /* Body */, 3 /* Integer */),
|
|
2298
|
+
generateParamConfigMetadata('orderBy', false, 2 /* Body */, 0 /* String */),
|
|
538
2299
|
generateParamConfigMetadata('searchTerm', true, 2 /* Body */, 0 /* String */),
|
|
539
|
-
generateParamConfigMetadata('sortDirection',
|
|
2300
|
+
generateParamConfigMetadata('sortDirection', false, 2 /* Body */, 0 /* String */),
|
|
540
2301
|
];
|
|
541
2302
|
const queryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$k, queryAssets_ConfigPropertyMetadata);
|
|
542
|
-
const createResourceParams$k = /*#__PURE__*/ createResourceParams$
|
|
2303
|
+
const createResourceParams$k = /*#__PURE__*/ createResourceParams$n(queryAssets_ConfigPropertyMetadata);
|
|
543
2304
|
function typeCheckConfig$k(untrustedConfig) {
|
|
544
2305
|
const config = {};
|
|
545
|
-
typeCheckConfig$
|
|
2306
|
+
typeCheckConfig$n(untrustedConfig, config, queryAssets_ConfigPropertyMetadata);
|
|
546
2307
|
const untrustedConfig_filters = untrustedConfig.filters;
|
|
547
2308
|
if (untrustedIsObject(untrustedConfig_filters)) {
|
|
548
2309
|
const untrustedConfig_filters_object = {};
|
|
@@ -896,14 +2657,14 @@ const getDashboards_ConfigPropertyMetadata = [
|
|
|
896
2657
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
897
2658
|
];
|
|
898
2659
|
const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$j, getDashboards_ConfigPropertyMetadata);
|
|
899
|
-
const createResourceParams$j = /*#__PURE__*/ createResourceParams$
|
|
2660
|
+
const createResourceParams$j = /*#__PURE__*/ createResourceParams$n(getDashboards_ConfigPropertyMetadata);
|
|
900
2661
|
function keyBuilder$p(luvio, config) {
|
|
901
2662
|
const resourceParams = createResourceParams$j(config);
|
|
902
2663
|
return keyBuilder$q(luvio, resourceParams);
|
|
903
2664
|
}
|
|
904
2665
|
function typeCheckConfig$j(untrustedConfig) {
|
|
905
2666
|
const config = {};
|
|
906
|
-
typeCheckConfig$
|
|
2667
|
+
typeCheckConfig$n(untrustedConfig, config, getDashboards_ConfigPropertyMetadata);
|
|
907
2668
|
return config;
|
|
908
2669
|
}
|
|
909
2670
|
function validateAdapterConfig$j(untrustedConfig, configPropertyNames) {
|
|
@@ -952,7 +2713,7 @@ function buildNetworkSnapshot$j(luvio, config, options) {
|
|
|
952
2713
|
});
|
|
953
2714
|
}
|
|
954
2715
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
955
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2716
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$j, undefined, false);
|
|
956
2717
|
}
|
|
957
2718
|
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
958
2719
|
const { luvio, config } = context;
|
|
@@ -1025,10 +2786,10 @@ const createDashboard_ConfigPropertyMetadata = [
|
|
|
1025
2786
|
generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1026
2787
|
];
|
|
1027
2788
|
const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$i, createDashboard_ConfigPropertyMetadata);
|
|
1028
|
-
const createResourceParams$i = /*#__PURE__*/ createResourceParams$
|
|
2789
|
+
const createResourceParams$i = /*#__PURE__*/ createResourceParams$n(createDashboard_ConfigPropertyMetadata);
|
|
1029
2790
|
function typeCheckConfig$i(untrustedConfig) {
|
|
1030
2791
|
const config = {};
|
|
1031
|
-
typeCheckConfig$
|
|
2792
|
+
typeCheckConfig$n(untrustedConfig, config, createDashboard_ConfigPropertyMetadata);
|
|
1032
2793
|
const untrustedConfig_layouts = untrustedConfig.layouts;
|
|
1033
2794
|
if (ArrayIsArray$1(untrustedConfig_layouts)) {
|
|
1034
2795
|
const untrustedConfig_layouts_array = [];
|
|
@@ -1133,10 +2894,10 @@ const deleteDashboard_ConfigPropertyMetadata = [
|
|
|
1133
2894
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1134
2895
|
];
|
|
1135
2896
|
const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$h, deleteDashboard_ConfigPropertyMetadata);
|
|
1136
|
-
const createResourceParams$h = /*#__PURE__*/ createResourceParams$
|
|
2897
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$n(deleteDashboard_ConfigPropertyMetadata);
|
|
1137
2898
|
function typeCheckConfig$h(untrustedConfig) {
|
|
1138
2899
|
const config = {};
|
|
1139
|
-
typeCheckConfig$
|
|
2900
|
+
typeCheckConfig$n(untrustedConfig, config, deleteDashboard_ConfigPropertyMetadata);
|
|
1140
2901
|
return config;
|
|
1141
2902
|
}
|
|
1142
2903
|
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
@@ -1234,14 +2995,14 @@ const getDashboardByName_ConfigPropertyMetadata = [
|
|
|
1234
2995
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1235
2996
|
];
|
|
1236
2997
|
const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$g, getDashboardByName_ConfigPropertyMetadata);
|
|
1237
|
-
const createResourceParams$g = /*#__PURE__*/ createResourceParams$
|
|
2998
|
+
const createResourceParams$g = /*#__PURE__*/ createResourceParams$n(getDashboardByName_ConfigPropertyMetadata);
|
|
1238
2999
|
function keyBuilder$m(luvio, config) {
|
|
1239
3000
|
const resourceParams = createResourceParams$g(config);
|
|
1240
3001
|
return keyBuilder$n(luvio, resourceParams);
|
|
1241
3002
|
}
|
|
1242
3003
|
function typeCheckConfig$g(untrustedConfig) {
|
|
1243
3004
|
const config = {};
|
|
1244
|
-
typeCheckConfig$
|
|
3005
|
+
typeCheckConfig$n(untrustedConfig, config, getDashboardByName_ConfigPropertyMetadata);
|
|
1245
3006
|
return config;
|
|
1246
3007
|
}
|
|
1247
3008
|
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
@@ -1290,7 +3051,7 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
1290
3051
|
});
|
|
1291
3052
|
}
|
|
1292
3053
|
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
1293
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3054
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$g, undefined, false);
|
|
1294
3055
|
}
|
|
1295
3056
|
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
1296
3057
|
const { luvio, config } = context;
|
|
@@ -1364,10 +3125,10 @@ const updateDashboard_ConfigPropertyMetadata = [
|
|
|
1364
3125
|
generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1365
3126
|
];
|
|
1366
3127
|
const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, updateDashboard_ConfigPropertyMetadata);
|
|
1367
|
-
const createResourceParams$f = /*#__PURE__*/ createResourceParams$
|
|
3128
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$n(updateDashboard_ConfigPropertyMetadata);
|
|
1368
3129
|
function typeCheckConfig$f(untrustedConfig) {
|
|
1369
3130
|
const config = {};
|
|
1370
|
-
typeCheckConfig$
|
|
3131
|
+
typeCheckConfig$n(untrustedConfig, config, updateDashboard_ConfigPropertyMetadata);
|
|
1371
3132
|
const untrustedConfig_layouts = untrustedConfig.layouts;
|
|
1372
3133
|
if (ArrayIsArray$1(untrustedConfig_layouts)) {
|
|
1373
3134
|
const untrustedConfig_layouts_array = [];
|
|
@@ -1698,14 +3459,14 @@ const getVisualizations_ConfigPropertyMetadata = [
|
|
|
1698
3459
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1699
3460
|
];
|
|
1700
3461
|
const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, getVisualizations_ConfigPropertyMetadata);
|
|
1701
|
-
const createResourceParams$e = /*#__PURE__*/ createResourceParams$
|
|
3462
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$n(getVisualizations_ConfigPropertyMetadata);
|
|
1702
3463
|
function keyBuilder$j(luvio, config) {
|
|
1703
3464
|
const resourceParams = createResourceParams$e(config);
|
|
1704
3465
|
return keyBuilder$k(luvio, resourceParams);
|
|
1705
3466
|
}
|
|
1706
3467
|
function typeCheckConfig$e(untrustedConfig) {
|
|
1707
3468
|
const config = {};
|
|
1708
|
-
typeCheckConfig$
|
|
3469
|
+
typeCheckConfig$n(untrustedConfig, config, getVisualizations_ConfigPropertyMetadata);
|
|
1709
3470
|
return config;
|
|
1710
3471
|
}
|
|
1711
3472
|
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
@@ -1754,7 +3515,7 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
1754
3515
|
});
|
|
1755
3516
|
}
|
|
1756
3517
|
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
1757
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3518
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$e, undefined, false);
|
|
1758
3519
|
}
|
|
1759
3520
|
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
1760
3521
|
const { luvio, config } = context;
|
|
@@ -1815,10 +3576,10 @@ const deleteVisualization_ConfigPropertyMetadata = [
|
|
|
1815
3576
|
generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1816
3577
|
];
|
|
1817
3578
|
const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, deleteVisualization_ConfigPropertyMetadata);
|
|
1818
|
-
const createResourceParams$d = /*#__PURE__*/ createResourceParams$
|
|
3579
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$n(deleteVisualization_ConfigPropertyMetadata);
|
|
1819
3580
|
function typeCheckConfig$d(untrustedConfig) {
|
|
1820
3581
|
const config = {};
|
|
1821
|
-
typeCheckConfig$
|
|
3582
|
+
typeCheckConfig$n(untrustedConfig, config, deleteVisualization_ConfigPropertyMetadata);
|
|
1822
3583
|
return config;
|
|
1823
3584
|
}
|
|
1824
3585
|
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
@@ -1916,14 +3677,14 @@ const getVisualization_ConfigPropertyMetadata = [
|
|
|
1916
3677
|
generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1917
3678
|
];
|
|
1918
3679
|
const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getVisualization_ConfigPropertyMetadata);
|
|
1919
|
-
const createResourceParams$c = /*#__PURE__*/ createResourceParams$
|
|
3680
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$n(getVisualization_ConfigPropertyMetadata);
|
|
1920
3681
|
function keyBuilder$g(luvio, config) {
|
|
1921
3682
|
const resourceParams = createResourceParams$c(config);
|
|
1922
3683
|
return keyBuilder$h(luvio, resourceParams);
|
|
1923
3684
|
}
|
|
1924
3685
|
function typeCheckConfig$c(untrustedConfig) {
|
|
1925
3686
|
const config = {};
|
|
1926
|
-
typeCheckConfig$
|
|
3687
|
+
typeCheckConfig$n(untrustedConfig, config, getVisualization_ConfigPropertyMetadata);
|
|
1927
3688
|
return config;
|
|
1928
3689
|
}
|
|
1929
3690
|
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
@@ -1972,7 +3733,7 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
1972
3733
|
});
|
|
1973
3734
|
}
|
|
1974
3735
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
1975
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3736
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
1976
3737
|
}
|
|
1977
3738
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
1978
3739
|
const { luvio, config } = context;
|
|
@@ -2259,14 +4020,14 @@ const getWorkspaces_ConfigPropertyMetadata = [
|
|
|
2259
4020
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2260
4021
|
];
|
|
2261
4022
|
const getWorkspaces_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getWorkspaces_ConfigPropertyMetadata);
|
|
2262
|
-
const createResourceParams$b = /*#__PURE__*/ createResourceParams$
|
|
4023
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$n(getWorkspaces_ConfigPropertyMetadata);
|
|
2263
4024
|
function keyBuilder$d(luvio, config) {
|
|
2264
4025
|
const resourceParams = createResourceParams$b(config);
|
|
2265
4026
|
return keyBuilder$e(luvio, resourceParams);
|
|
2266
4027
|
}
|
|
2267
4028
|
function typeCheckConfig$b(untrustedConfig) {
|
|
2268
4029
|
const config = {};
|
|
2269
|
-
typeCheckConfig$
|
|
4030
|
+
typeCheckConfig$n(untrustedConfig, config, getWorkspaces_ConfigPropertyMetadata);
|
|
2270
4031
|
return config;
|
|
2271
4032
|
}
|
|
2272
4033
|
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
@@ -2315,7 +4076,7 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
2315
4076
|
});
|
|
2316
4077
|
}
|
|
2317
4078
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2318
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4079
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
|
|
2319
4080
|
}
|
|
2320
4081
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
2321
4082
|
const { luvio, config } = context;
|
|
@@ -2385,10 +4146,10 @@ const createWorkspace_ConfigPropertyMetadata = [
|
|
|
2385
4146
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
2386
4147
|
];
|
|
2387
4148
|
const createWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, createWorkspace_ConfigPropertyMetadata);
|
|
2388
|
-
const createResourceParams$a = /*#__PURE__*/ createResourceParams$
|
|
4149
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$n(createWorkspace_ConfigPropertyMetadata);
|
|
2389
4150
|
function typeCheckConfig$a(untrustedConfig) {
|
|
2390
4151
|
const config = {};
|
|
2391
|
-
typeCheckConfig$
|
|
4152
|
+
typeCheckConfig$n(untrustedConfig, config, createWorkspace_ConfigPropertyMetadata);
|
|
2392
4153
|
return config;
|
|
2393
4154
|
}
|
|
2394
4155
|
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
@@ -2469,10 +4230,10 @@ const deleteWorkspace_ConfigPropertyMetadata = [
|
|
|
2469
4230
|
generateParamConfigMetadata('workspaceIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2470
4231
|
];
|
|
2471
4232
|
const deleteWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, deleteWorkspace_ConfigPropertyMetadata);
|
|
2472
|
-
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$
|
|
4233
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$n(deleteWorkspace_ConfigPropertyMetadata);
|
|
2473
4234
|
function typeCheckConfig$9(untrustedConfig) {
|
|
2474
4235
|
const config = {};
|
|
2475
|
-
typeCheckConfig$
|
|
4236
|
+
typeCheckConfig$n(untrustedConfig, config, deleteWorkspace_ConfigPropertyMetadata);
|
|
2476
4237
|
return config;
|
|
2477
4238
|
}
|
|
2478
4239
|
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
@@ -2570,14 +4331,14 @@ const getWorkspaceByIdOrName_ConfigPropertyMetadata = [
|
|
|
2570
4331
|
generateParamConfigMetadata('workspaceIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2571
4332
|
];
|
|
2572
4333
|
const getWorkspaceByIdOrName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getWorkspaceByIdOrName_ConfigPropertyMetadata);
|
|
2573
|
-
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$
|
|
4334
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$n(getWorkspaceByIdOrName_ConfigPropertyMetadata);
|
|
2574
4335
|
function keyBuilder$a(luvio, config) {
|
|
2575
4336
|
const resourceParams = createResourceParams$8(config);
|
|
2576
4337
|
return keyBuilder$b(luvio, resourceParams);
|
|
2577
4338
|
}
|
|
2578
4339
|
function typeCheckConfig$8(untrustedConfig) {
|
|
2579
4340
|
const config = {};
|
|
2580
|
-
typeCheckConfig$
|
|
4341
|
+
typeCheckConfig$n(untrustedConfig, config, getWorkspaceByIdOrName_ConfigPropertyMetadata);
|
|
2581
4342
|
return config;
|
|
2582
4343
|
}
|
|
2583
4344
|
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
@@ -2626,7 +4387,7 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
2626
4387
|
});
|
|
2627
4388
|
}
|
|
2628
4389
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
2629
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4390
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
2630
4391
|
}
|
|
2631
4392
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
2632
4393
|
const { luvio, config } = context;
|
|
@@ -2697,10 +4458,10 @@ const updateWorkspace_ConfigPropertyMetadata = [
|
|
|
2697
4458
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
2698
4459
|
];
|
|
2699
4460
|
const updateWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, updateWorkspace_ConfigPropertyMetadata);
|
|
2700
|
-
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$
|
|
4461
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$n(updateWorkspace_ConfigPropertyMetadata);
|
|
2701
4462
|
function typeCheckConfig$7(untrustedConfig) {
|
|
2702
4463
|
const config = {};
|
|
2703
|
-
typeCheckConfig$
|
|
4464
|
+
typeCheckConfig$n(untrustedConfig, config, updateWorkspace_ConfigPropertyMetadata);
|
|
2704
4465
|
return config;
|
|
2705
4466
|
}
|
|
2706
4467
|
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
@@ -2881,10 +4642,10 @@ const createWorkspaceAsset_ConfigPropertyMetadata = [
|
|
|
2881
4642
|
generateParamConfigMetadata('assetUsageType', true, 2 /* Body */, 0 /* String */),
|
|
2882
4643
|
];
|
|
2883
4644
|
const createWorkspaceAsset_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createWorkspaceAsset_ConfigPropertyMetadata);
|
|
2884
|
-
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$
|
|
4645
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$n(createWorkspaceAsset_ConfigPropertyMetadata);
|
|
2885
4646
|
function typeCheckConfig$6(untrustedConfig) {
|
|
2886
4647
|
const config = {};
|
|
2887
|
-
typeCheckConfig$
|
|
4648
|
+
typeCheckConfig$n(untrustedConfig, config, createWorkspaceAsset_ConfigPropertyMetadata);
|
|
2888
4649
|
return config;
|
|
2889
4650
|
}
|
|
2890
4651
|
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
@@ -2966,10 +4727,10 @@ const deleteWorkspaceAsset_ConfigPropertyMetadata = [
|
|
|
2966
4727
|
generateParamConfigMetadata('workspaceIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2967
4728
|
];
|
|
2968
4729
|
const deleteWorkspaceAsset_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, deleteWorkspaceAsset_ConfigPropertyMetadata);
|
|
2969
|
-
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$
|
|
4730
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$n(deleteWorkspaceAsset_ConfigPropertyMetadata);
|
|
2970
4731
|
function typeCheckConfig$5(untrustedConfig) {
|
|
2971
4732
|
const config = {};
|
|
2972
|
-
typeCheckConfig$
|
|
4733
|
+
typeCheckConfig$n(untrustedConfig, config, deleteWorkspaceAsset_ConfigPropertyMetadata);
|
|
2973
4734
|
return config;
|
|
2974
4735
|
}
|
|
2975
4736
|
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
@@ -3353,14 +5114,14 @@ const getFlows_ConfigPropertyMetadata = [
|
|
|
3353
5114
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
3354
5115
|
];
|
|
3355
5116
|
const getFlows_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getFlows_ConfigPropertyMetadata);
|
|
3356
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
5117
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$n(getFlows_ConfigPropertyMetadata);
|
|
3357
5118
|
function keyBuilder$6(luvio, config) {
|
|
3358
5119
|
const resourceParams = createResourceParams$4(config);
|
|
3359
5120
|
return keyBuilder$7(luvio, resourceParams);
|
|
3360
5121
|
}
|
|
3361
5122
|
function typeCheckConfig$4(untrustedConfig) {
|
|
3362
5123
|
const config = {};
|
|
3363
|
-
typeCheckConfig$
|
|
5124
|
+
typeCheckConfig$n(untrustedConfig, config, getFlows_ConfigPropertyMetadata);
|
|
3364
5125
|
return config;
|
|
3365
5126
|
}
|
|
3366
5127
|
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
@@ -3409,7 +5170,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
3409
5170
|
});
|
|
3410
5171
|
}
|
|
3411
5172
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3412
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5173
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
3413
5174
|
}
|
|
3414
5175
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3415
5176
|
const { luvio, config } = context;
|
|
@@ -3485,14 +5246,14 @@ const getFlowByName_ConfigPropertyMetadata = [
|
|
|
3485
5246
|
generateParamConfigMetadata('flowApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3486
5247
|
];
|
|
3487
5248
|
const getFlowByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getFlowByName_ConfigPropertyMetadata);
|
|
3488
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
5249
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$n(getFlowByName_ConfigPropertyMetadata);
|
|
3489
5250
|
function keyBuilder$4(luvio, config) {
|
|
3490
5251
|
const resourceParams = createResourceParams$3(config);
|
|
3491
5252
|
return keyBuilder$5(luvio, resourceParams);
|
|
3492
5253
|
}
|
|
3493
5254
|
function typeCheckConfig$3(untrustedConfig) {
|
|
3494
5255
|
const config = {};
|
|
3495
|
-
typeCheckConfig$
|
|
5256
|
+
typeCheckConfig$n(untrustedConfig, config, getFlowByName_ConfigPropertyMetadata);
|
|
3496
5257
|
return config;
|
|
3497
5258
|
}
|
|
3498
5259
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -3541,7 +5302,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
3541
5302
|
});
|
|
3542
5303
|
}
|
|
3543
5304
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
3544
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5305
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
3545
5306
|
}
|
|
3546
5307
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
3547
5308
|
const { luvio, config } = context;
|
|
@@ -3699,14 +5460,14 @@ const getSubscriptionDigestConfig_ConfigPropertyMetadata = [
|
|
|
3699
5460
|
generateParamConfigMetadata('digestConfigOwner', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3700
5461
|
];
|
|
3701
5462
|
const getSubscriptionDigestConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3702
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
5463
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$n(getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3703
5464
|
function keyBuilder$1(luvio, config) {
|
|
3704
5465
|
const resourceParams = createResourceParams$2(config);
|
|
3705
5466
|
return keyBuilder$2(luvio, resourceParams);
|
|
3706
5467
|
}
|
|
3707
5468
|
function typeCheckConfig$2(untrustedConfig) {
|
|
3708
5469
|
const config = {};
|
|
3709
|
-
typeCheckConfig$
|
|
5470
|
+
typeCheckConfig$n(untrustedConfig, config, getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3710
5471
|
return config;
|
|
3711
5472
|
}
|
|
3712
5473
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -3755,7 +5516,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
3755
5516
|
});
|
|
3756
5517
|
}
|
|
3757
5518
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3758
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5519
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
3759
5520
|
}
|
|
3760
5521
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3761
5522
|
const { luvio, config } = context;
|
|
@@ -3824,10 +5585,10 @@ const updateSubscriptionDigestConfig_ConfigPropertyMetadata = [
|
|
|
3824
5585
|
generateParamConfigMetadata('scheduleType', true, 2 /* Body */, 0 /* String */),
|
|
3825
5586
|
];
|
|
3826
5587
|
const updateSubscriptionDigestConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3827
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
5588
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$n(updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3828
5589
|
function typeCheckConfig$1(untrustedConfig) {
|
|
3829
5590
|
const config = {};
|
|
3830
|
-
typeCheckConfig$
|
|
5591
|
+
typeCheckConfig$n(untrustedConfig, config, updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3831
5592
|
return config;
|
|
3832
5593
|
}
|
|
3833
5594
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -4057,7 +5818,7 @@ const getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata = [
|
|
|
4057
5818
|
generateParamConfigMetadata('searchToken', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4058
5819
|
];
|
|
4059
5820
|
const getUnifiedAnalyticsLibraryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata);
|
|
4060
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
5821
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$n(getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata);
|
|
4061
5822
|
function typeCheckConfig(untrustedConfig) {
|
|
4062
5823
|
const config = {};
|
|
4063
5824
|
const untrustedConfig_assetTypes = untrustedConfig.assetTypes;
|
|
@@ -4166,4 +5927,4 @@ const getUnifiedAnalyticsLibraryAssetsAdapterFactory = (luvio) => {
|
|
|
4166
5927
|
};
|
|
4167
5928
|
};
|
|
4168
5929
|
|
|
4169
|
-
export { createDashboardAdapterFactory, createWorkspaceAdapterFactory, createWorkspaceAssetAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, deleteWorkspaceAdapterFactory, deleteWorkspaceAssetAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getFlowByNameAdapterFactory, getFlowsAdapterFactory, getSubscriptionDigestConfigAdapterFactory, getUnifiedAnalyticsLibraryAssetsAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspaceByIdOrNameAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory, updateSubscriptionDigestConfigAdapterFactory, updateWorkspaceAdapterFactory };
|
|
5930
|
+
export { createAnnotationAdapterFactory, createDashboardAdapterFactory, createWorkspaceAdapterFactory, createWorkspaceAssetAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, deleteWorkspaceAdapterFactory, deleteWorkspaceAssetAdapterFactory, getAnnotationsAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getFlowByNameAdapterFactory, getFlowsAdapterFactory, getSubscriptionDigestConfigAdapterFactory, getUnifiedAnalyticsLibraryAssetsAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspaceByIdOrNameAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory, updateSubscriptionDigestConfigAdapterFactory, updateWorkspaceAdapterFactory };
|