@salesforce/lds-adapters-platform-files 1.305.0 → 1.306.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/platform-files.js +4511 -54
- package/dist/es/es2018/types/src/generated/adapters/createContentDocFromContentBody.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postConnectFilesUsersByUserId.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ContentHubPermissionTypeRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ContentHubProviderTypeRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ContentHubRepositoryAuthenticationRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/ContentHubRepositoryFeaturesRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ContentHubRepositoryRepresentation.d.ts +76 -0
- package/dist/es/es2018/types/src/generated/types/ExternalFilePermissionInformationRepresentation.d.ts +42 -0
- package/dist/es/es2018/types/src/generated/types/FileAssetRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/FileDetailRepresentation.d.ts +190 -0
- package/dist/es/es2018/types/src/generated/types/FileInputRepresentation.d.ts +76 -0
- package/dist/es/es2018/types/src/generated/types/ModerationFlagItemRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/ModerationFlagsCollectionRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/ModerationFlagsRepresentation.d.ts +42 -0
- package/dist/es/es2018/types/src/generated/types/MotifRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/OutOfOfficeRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/PhotoRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/ReferenceRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/RepositoryGroupSummaryRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/ReputationLevelRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/ReputationRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/TopicCollectionRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/TopicImagesRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/TopicRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/UserSummaryRepresentation.d.ts +87 -0
- package/package.json +3 -3
- package/sfdc/index.js +4475 -12
- package/src/raml/api.raml +831 -0
- package/src/raml/luvio.raml +9 -0
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, StoreKeyMap, createResourceParams as createResourceParams$2, typeCheckConfig as typeCheckConfig$2 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
-
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
10
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
11
11
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
12
|
/**
|
|
13
13
|
* Validates an adapter config is well-formed.
|
|
@@ -31,7 +31,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
31
31
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
32
|
}
|
|
33
33
|
const supported = required.concat(optional);
|
|
34
|
-
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
34
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
35
35
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -48,6 +48,16 @@ const snapshotRefreshOptions = {
|
|
|
48
48
|
},
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
52
|
+
return {
|
|
53
|
+
name,
|
|
54
|
+
required,
|
|
55
|
+
resourceType,
|
|
56
|
+
typeCheckShape,
|
|
57
|
+
isArrayShape,
|
|
58
|
+
coerceFn,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
51
61
|
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
52
62
|
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
53
63
|
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
@@ -61,16 +71,49 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
61
71
|
}
|
|
62
72
|
const keyPrefix = 'files';
|
|
63
73
|
|
|
74
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
64
75
|
const { isArray: ArrayIsArray } = Array;
|
|
76
|
+
function equalsArray(a, b, equalsItem) {
|
|
77
|
+
const aLength = a.length;
|
|
78
|
+
const bLength = b.length;
|
|
79
|
+
if (aLength !== bLength) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
for (let i = 0; i < aLength; i++) {
|
|
83
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
function equalsObject(a, b, equalsProp) {
|
|
90
|
+
const aKeys = ObjectKeys(a).sort();
|
|
91
|
+
const bKeys = ObjectKeys(b).sort();
|
|
92
|
+
const aKeysLength = aKeys.length;
|
|
93
|
+
const bKeysLength = bKeys.length;
|
|
94
|
+
if (aKeysLength !== bKeysLength) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
98
|
+
const key = aKeys[i];
|
|
99
|
+
if (key !== bKeys[i]) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
if (equalsProp(a[key], b[key]) === false) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
65
108
|
function createLink(ref) {
|
|
66
109
|
return {
|
|
67
110
|
__ref: serializeStructuredKey(ref),
|
|
68
111
|
};
|
|
69
112
|
}
|
|
70
113
|
|
|
71
|
-
const TTL = 100;
|
|
72
|
-
const VERSION = "0ebfcb4004619c58d2d8352ba253d6c1";
|
|
73
|
-
function validate(obj, path = 'FileUploadConfigRepresentation') {
|
|
114
|
+
const TTL$1 = 100;
|
|
115
|
+
const VERSION$m = "0ebfcb4004619c58d2d8352ba253d6c1";
|
|
116
|
+
function validate$m(obj, path = 'FileUploadConfigRepresentation') {
|
|
74
117
|
const v_error = (() => {
|
|
75
118
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
76
119
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -98,14 +141,14 @@ function validate(obj, path = 'FileUploadConfigRepresentation') {
|
|
|
98
141
|
})();
|
|
99
142
|
return v_error === undefined ? null : v_error;
|
|
100
143
|
}
|
|
101
|
-
const RepresentationType = 'FileUploadConfigRepresentation';
|
|
102
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
144
|
+
const RepresentationType$1 = 'FileUploadConfigRepresentation';
|
|
145
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
103
146
|
return input;
|
|
104
147
|
}
|
|
105
|
-
const select$
|
|
148
|
+
const select$o = function FileUploadConfigRepresentationSelect() {
|
|
106
149
|
return {
|
|
107
150
|
kind: 'Fragment',
|
|
108
|
-
version: VERSION,
|
|
151
|
+
version: VERSION$m,
|
|
109
152
|
private: [],
|
|
110
153
|
selections: [
|
|
111
154
|
{
|
|
@@ -127,7 +170,7 @@ const select$1 = function FileUploadConfigRepresentationSelect() {
|
|
|
127
170
|
]
|
|
128
171
|
};
|
|
129
172
|
};
|
|
130
|
-
function equals(existing, incoming) {
|
|
173
|
+
function equals$m(existing, incoming) {
|
|
131
174
|
const existing_hasCustomRecordTypes = existing.hasCustomRecordTypes;
|
|
132
175
|
const incoming_hasCustomRecordTypes = incoming.hasCustomRecordTypes;
|
|
133
176
|
if (!(existing_hasCustomRecordTypes === incoming_hasCustomRecordTypes)) {
|
|
@@ -150,44 +193,44 @@ function equals(existing, incoming) {
|
|
|
150
193
|
}
|
|
151
194
|
return true;
|
|
152
195
|
}
|
|
153
|
-
const ingest = function FileUploadConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
196
|
+
const ingest$1 = function FileUploadConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
154
197
|
if (process.env.NODE_ENV !== 'production') {
|
|
155
|
-
const validateError = validate(input);
|
|
198
|
+
const validateError = validate$m(input);
|
|
156
199
|
if (validateError !== null) {
|
|
157
200
|
throw validateError;
|
|
158
201
|
}
|
|
159
202
|
}
|
|
160
203
|
const key = path.fullPath;
|
|
161
|
-
const ttlToUse = TTL;
|
|
162
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "files", VERSION, RepresentationType, equals);
|
|
204
|
+
const ttlToUse = TTL$1;
|
|
205
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "files", VERSION$m, RepresentationType$1, equals$m);
|
|
163
206
|
return createLink(key);
|
|
164
207
|
};
|
|
165
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
208
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
166
209
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
167
210
|
const rootKey = fullPathFactory();
|
|
168
211
|
rootKeySet.set(rootKey, {
|
|
169
212
|
namespace: keyPrefix,
|
|
170
|
-
representationName: RepresentationType,
|
|
213
|
+
representationName: RepresentationType$1,
|
|
171
214
|
mergeable: false
|
|
172
215
|
});
|
|
173
216
|
}
|
|
174
217
|
|
|
175
|
-
function select(luvio, params) {
|
|
176
|
-
return select$
|
|
218
|
+
function select$n(luvio, params) {
|
|
219
|
+
return select$o();
|
|
177
220
|
}
|
|
178
|
-
function keyBuilder$
|
|
221
|
+
function keyBuilder$2(luvio, params) {
|
|
179
222
|
return keyPrefix + '::FileUploadConfigRepresentation:(' + ')';
|
|
180
223
|
}
|
|
181
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
182
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
224
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
225
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2());
|
|
183
226
|
}
|
|
184
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
227
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
185
228
|
const { body } = response;
|
|
186
|
-
const key = keyBuilder$
|
|
187
|
-
luvio.storeIngest(key, ingest, body);
|
|
229
|
+
const key = keyBuilder$2();
|
|
230
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
188
231
|
const snapshot = luvio.storeLookup({
|
|
189
232
|
recordId: key,
|
|
190
|
-
node: select(),
|
|
233
|
+
node: select$n(),
|
|
191
234
|
variables: {},
|
|
192
235
|
}, snapshotRefresh);
|
|
193
236
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -199,18 +242,18 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
199
242
|
return snapshot;
|
|
200
243
|
}
|
|
201
244
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
202
|
-
const key = keyBuilder$
|
|
245
|
+
const key = keyBuilder$2();
|
|
203
246
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
204
247
|
const storeMetadataParams = {
|
|
205
|
-
ttl: TTL,
|
|
248
|
+
ttl: TTL$1,
|
|
206
249
|
namespace: keyPrefix,
|
|
207
|
-
version: VERSION,
|
|
208
|
-
representationName: RepresentationType
|
|
250
|
+
version: VERSION$m,
|
|
251
|
+
representationName: RepresentationType$1
|
|
209
252
|
};
|
|
210
253
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
211
254
|
return errorSnapshot;
|
|
212
255
|
}
|
|
213
|
-
function createResourceRequest(config) {
|
|
256
|
+
function createResourceRequest$1(config) {
|
|
214
257
|
const headers = {};
|
|
215
258
|
return {
|
|
216
259
|
baseUri: '/services/data/v62.0',
|
|
@@ -224,57 +267,57 @@ function createResourceRequest(config) {
|
|
|
224
267
|
};
|
|
225
268
|
}
|
|
226
269
|
|
|
227
|
-
const adapterName = 'getFileUploadConfig';
|
|
270
|
+
const adapterName$1 = 'getFileUploadConfig';
|
|
228
271
|
const getFileUploadConfig_ConfigPropertyMetadata = [];
|
|
229
|
-
const getFileUploadConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getFileUploadConfig_ConfigPropertyMetadata);
|
|
230
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
231
|
-
function keyBuilder(luvio, config) {
|
|
232
|
-
createResourceParams(config);
|
|
233
|
-
return keyBuilder$
|
|
272
|
+
const getFileUploadConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getFileUploadConfig_ConfigPropertyMetadata);
|
|
273
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getFileUploadConfig_ConfigPropertyMetadata);
|
|
274
|
+
function keyBuilder$1(luvio, config) {
|
|
275
|
+
createResourceParams$1(config);
|
|
276
|
+
return keyBuilder$2();
|
|
234
277
|
}
|
|
235
|
-
function typeCheckConfig(untrustedConfig) {
|
|
278
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
236
279
|
const config = {};
|
|
237
280
|
return config;
|
|
238
281
|
}
|
|
239
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
282
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
240
283
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
241
284
|
return null;
|
|
242
285
|
}
|
|
243
286
|
if (process.env.NODE_ENV !== 'production') {
|
|
244
287
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
245
288
|
}
|
|
246
|
-
const config = typeCheckConfig();
|
|
289
|
+
const config = typeCheckConfig$1();
|
|
247
290
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
248
291
|
return null;
|
|
249
292
|
}
|
|
250
293
|
return config;
|
|
251
294
|
}
|
|
252
295
|
function adapterFragment(luvio, config) {
|
|
253
|
-
createResourceParams(config);
|
|
254
|
-
return select();
|
|
296
|
+
createResourceParams$1(config);
|
|
297
|
+
return select$n();
|
|
255
298
|
}
|
|
256
299
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
257
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
300
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
258
301
|
config,
|
|
259
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
302
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
260
303
|
});
|
|
261
304
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
262
305
|
}
|
|
263
306
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
264
307
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
265
308
|
config,
|
|
266
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
309
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
267
310
|
});
|
|
268
311
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
269
312
|
}
|
|
270
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
271
|
-
const resourceParams = createResourceParams(config);
|
|
272
|
-
const request = createResourceRequest();
|
|
313
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
314
|
+
const resourceParams = createResourceParams$1(config);
|
|
315
|
+
const request = createResourceRequest$1();
|
|
273
316
|
return luvio.dispatchResourceRequest(request, options)
|
|
274
317
|
.then((response) => {
|
|
275
318
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
276
319
|
const cache = new StoreKeyMap();
|
|
277
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
320
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
278
321
|
return cache;
|
|
279
322
|
});
|
|
280
323
|
}, (response) => {
|
|
@@ -282,23 +325,23 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
282
325
|
});
|
|
283
326
|
}
|
|
284
327
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
285
|
-
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
328
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
286
329
|
}
|
|
287
330
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
288
331
|
const { luvio, config } = context;
|
|
289
332
|
const selector = {
|
|
290
|
-
recordId: keyBuilder(luvio, config),
|
|
333
|
+
recordId: keyBuilder$1(luvio, config),
|
|
291
334
|
node: adapterFragment(luvio, config),
|
|
292
335
|
variables: {},
|
|
293
336
|
};
|
|
294
337
|
const cacheSnapshot = storeLookup(selector, {
|
|
295
338
|
config,
|
|
296
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
339
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
297
340
|
});
|
|
298
341
|
return cacheSnapshot;
|
|
299
342
|
}
|
|
300
343
|
const getFileUploadConfigAdapterFactory = (luvio) => function files__getFileUploadConfig(untrustedConfig, requestContext) {
|
|
301
|
-
const config = validateAdapterConfig(untrustedConfig, getFileUploadConfig_ConfigPropertyNames);
|
|
344
|
+
const config = validateAdapterConfig$1(untrustedConfig, getFileUploadConfig_ConfigPropertyNames);
|
|
302
345
|
// Invalid or incomplete config
|
|
303
346
|
if (config === null) {
|
|
304
347
|
return null;
|
|
@@ -307,4 +350,4418 @@ const getFileUploadConfigAdapterFactory = (luvio) => function files__getFileUplo
|
|
|
307
350
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
308
351
|
};
|
|
309
352
|
|
|
310
|
-
|
|
353
|
+
const VERSION$l = "1544350e7c5b999113ef125ff9c46f64";
|
|
354
|
+
function validate$l(obj, path = 'ContentHubRepositoryAuthenticationRepresentation') {
|
|
355
|
+
const v_error = (() => {
|
|
356
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
357
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
358
|
+
}
|
|
359
|
+
const obj_authFlowUrl = obj.authFlowUrl;
|
|
360
|
+
const path_authFlowUrl = path + '.authFlowUrl';
|
|
361
|
+
if (typeof obj_authFlowUrl !== 'string') {
|
|
362
|
+
return new TypeError('Expected "string" but received "' + typeof obj_authFlowUrl + '" (at "' + path_authFlowUrl + '")');
|
|
363
|
+
}
|
|
364
|
+
const obj_authProtocol = obj.authProtocol;
|
|
365
|
+
const path_authProtocol = path + '.authProtocol';
|
|
366
|
+
if (typeof obj_authProtocol !== 'string') {
|
|
367
|
+
return new TypeError('Expected "string" but received "' + typeof obj_authProtocol + '" (at "' + path_authProtocol + '")');
|
|
368
|
+
}
|
|
369
|
+
const obj_userHasAuthSettings = obj.userHasAuthSettings;
|
|
370
|
+
const path_userHasAuthSettings = path + '.userHasAuthSettings';
|
|
371
|
+
if (typeof obj_userHasAuthSettings !== 'boolean') {
|
|
372
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_userHasAuthSettings + '" (at "' + path_userHasAuthSettings + '")');
|
|
373
|
+
}
|
|
374
|
+
})();
|
|
375
|
+
return v_error === undefined ? null : v_error;
|
|
376
|
+
}
|
|
377
|
+
const select$m = function ContentHubRepositoryAuthenticationRepresentationSelect() {
|
|
378
|
+
return {
|
|
379
|
+
kind: 'Fragment',
|
|
380
|
+
version: VERSION$l,
|
|
381
|
+
private: [],
|
|
382
|
+
selections: [
|
|
383
|
+
{
|
|
384
|
+
name: 'authFlowUrl',
|
|
385
|
+
kind: 'Scalar'
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: 'authProtocol',
|
|
389
|
+
kind: 'Scalar'
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
name: 'userHasAuthSettings',
|
|
393
|
+
kind: 'Scalar'
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
function equals$l(existing, incoming) {
|
|
399
|
+
const existing_userHasAuthSettings = existing.userHasAuthSettings;
|
|
400
|
+
const incoming_userHasAuthSettings = incoming.userHasAuthSettings;
|
|
401
|
+
if (!(existing_userHasAuthSettings === incoming_userHasAuthSettings)) {
|
|
402
|
+
return false;
|
|
403
|
+
}
|
|
404
|
+
const existing_authFlowUrl = existing.authFlowUrl;
|
|
405
|
+
const incoming_authFlowUrl = incoming.authFlowUrl;
|
|
406
|
+
if (!(existing_authFlowUrl === incoming_authFlowUrl)) {
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
const existing_authProtocol = existing.authProtocol;
|
|
410
|
+
const incoming_authProtocol = incoming.authProtocol;
|
|
411
|
+
if (!(existing_authProtocol === incoming_authProtocol)) {
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
return true;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
const VERSION$k = "fa4f55b364524f360d9f3b8b10aaf137";
|
|
418
|
+
function validate$k(obj, path = 'ContentHubRepositoryFeaturesRepresentation') {
|
|
419
|
+
const v_error = (() => {
|
|
420
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
421
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
422
|
+
}
|
|
423
|
+
const obj_canBrowse = obj.canBrowse;
|
|
424
|
+
const path_canBrowse = path + '.canBrowse';
|
|
425
|
+
if (typeof obj_canBrowse !== 'boolean') {
|
|
426
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_canBrowse + '" (at "' + path_canBrowse + '")');
|
|
427
|
+
}
|
|
428
|
+
const obj_canSearch = obj.canSearch;
|
|
429
|
+
const path_canSearch = path + '.canSearch';
|
|
430
|
+
if (typeof obj_canSearch !== 'boolean') {
|
|
431
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_canSearch + '" (at "' + path_canSearch + '")');
|
|
432
|
+
}
|
|
433
|
+
})();
|
|
434
|
+
return v_error === undefined ? null : v_error;
|
|
435
|
+
}
|
|
436
|
+
const select$l = function ContentHubRepositoryFeaturesRepresentationSelect() {
|
|
437
|
+
return {
|
|
438
|
+
kind: 'Fragment',
|
|
439
|
+
version: VERSION$k,
|
|
440
|
+
private: [],
|
|
441
|
+
selections: [
|
|
442
|
+
{
|
|
443
|
+
name: 'canBrowse',
|
|
444
|
+
kind: 'Scalar'
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
name: 'canSearch',
|
|
448
|
+
kind: 'Scalar'
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
function equals$k(existing, incoming) {
|
|
454
|
+
const existing_canBrowse = existing.canBrowse;
|
|
455
|
+
const incoming_canBrowse = incoming.canBrowse;
|
|
456
|
+
if (!(existing_canBrowse === incoming_canBrowse)) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
const existing_canSearch = existing.canSearch;
|
|
460
|
+
const incoming_canSearch = incoming.canSearch;
|
|
461
|
+
if (!(existing_canSearch === incoming_canSearch)) {
|
|
462
|
+
return false;
|
|
463
|
+
}
|
|
464
|
+
return true;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
const VERSION$j = "0c0c85c97f540c4a8883d7fa795e7e0e";
|
|
468
|
+
function validate$j(obj, path = 'ReferenceRepresentation') {
|
|
469
|
+
const v_error = (() => {
|
|
470
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
471
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
472
|
+
}
|
|
473
|
+
const obj_id = obj.id;
|
|
474
|
+
const path_id = path + '.id';
|
|
475
|
+
if (typeof obj_id !== 'string') {
|
|
476
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
477
|
+
}
|
|
478
|
+
const obj_url = obj.url;
|
|
479
|
+
const path_url = path + '.url';
|
|
480
|
+
if (typeof obj_url !== 'string') {
|
|
481
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
482
|
+
}
|
|
483
|
+
})();
|
|
484
|
+
return v_error === undefined ? null : v_error;
|
|
485
|
+
}
|
|
486
|
+
const select$k = function ReferenceRepresentationSelect() {
|
|
487
|
+
return {
|
|
488
|
+
kind: 'Fragment',
|
|
489
|
+
version: VERSION$j,
|
|
490
|
+
private: [],
|
|
491
|
+
selections: [
|
|
492
|
+
{
|
|
493
|
+
name: 'id',
|
|
494
|
+
kind: 'Scalar'
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
name: 'url',
|
|
498
|
+
kind: 'Scalar'
|
|
499
|
+
}
|
|
500
|
+
]
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
function equals$j(existing, incoming) {
|
|
504
|
+
const existing_id = existing.id;
|
|
505
|
+
const incoming_id = incoming.id;
|
|
506
|
+
if (!(existing_id === incoming_id)) {
|
|
507
|
+
return false;
|
|
508
|
+
}
|
|
509
|
+
const existing_url = existing.url;
|
|
510
|
+
const incoming_url = incoming.url;
|
|
511
|
+
if (!(existing_url === incoming_url)) {
|
|
512
|
+
return false;
|
|
513
|
+
}
|
|
514
|
+
return true;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
const VERSION$i = "646fd171ffd555ff1aa0bca29f4112d0";
|
|
518
|
+
function validate$i(obj, path = 'ContentHubProviderTypeRepresentation') {
|
|
519
|
+
const v_error = (() => {
|
|
520
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
521
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
522
|
+
}
|
|
523
|
+
const obj_label = obj.label;
|
|
524
|
+
const path_label = path + '.label';
|
|
525
|
+
if (typeof obj_label !== 'string') {
|
|
526
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
527
|
+
}
|
|
528
|
+
const obj_type = obj.type;
|
|
529
|
+
const path_type = path + '.type';
|
|
530
|
+
if (typeof obj_type !== 'string') {
|
|
531
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
532
|
+
}
|
|
533
|
+
})();
|
|
534
|
+
return v_error === undefined ? null : v_error;
|
|
535
|
+
}
|
|
536
|
+
const select$j = function ContentHubProviderTypeRepresentationSelect() {
|
|
537
|
+
return {
|
|
538
|
+
kind: 'Fragment',
|
|
539
|
+
version: VERSION$i,
|
|
540
|
+
private: [],
|
|
541
|
+
selections: [
|
|
542
|
+
{
|
|
543
|
+
name: 'label',
|
|
544
|
+
kind: 'Scalar'
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: 'type',
|
|
548
|
+
kind: 'Scalar'
|
|
549
|
+
}
|
|
550
|
+
]
|
|
551
|
+
};
|
|
552
|
+
};
|
|
553
|
+
function equals$i(existing, incoming) {
|
|
554
|
+
const existing_label = existing.label;
|
|
555
|
+
const incoming_label = incoming.label;
|
|
556
|
+
if (!(existing_label === incoming_label)) {
|
|
557
|
+
return false;
|
|
558
|
+
}
|
|
559
|
+
const existing_type = existing.type;
|
|
560
|
+
const incoming_type = incoming.type;
|
|
561
|
+
if (!(existing_type === incoming_type)) {
|
|
562
|
+
return false;
|
|
563
|
+
}
|
|
564
|
+
return true;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
const VERSION$h = "23ecddf405537e254437ac17ca260211";
|
|
568
|
+
function validate$h(obj, path = 'ContentHubRepositoryRepresentation') {
|
|
569
|
+
const v_error = (() => {
|
|
570
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
571
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
572
|
+
}
|
|
573
|
+
const obj_additionalLabel = obj.additionalLabel;
|
|
574
|
+
const path_additionalLabel = path + '.additionalLabel';
|
|
575
|
+
let obj_additionalLabel_union0 = null;
|
|
576
|
+
const obj_additionalLabel_union0_error = (() => {
|
|
577
|
+
if (typeof obj_additionalLabel !== 'string') {
|
|
578
|
+
return new TypeError('Expected "string" but received "' + typeof obj_additionalLabel + '" (at "' + path_additionalLabel + '")');
|
|
579
|
+
}
|
|
580
|
+
})();
|
|
581
|
+
if (obj_additionalLabel_union0_error != null) {
|
|
582
|
+
obj_additionalLabel_union0 = obj_additionalLabel_union0_error.message;
|
|
583
|
+
}
|
|
584
|
+
let obj_additionalLabel_union1 = null;
|
|
585
|
+
const obj_additionalLabel_union1_error = (() => {
|
|
586
|
+
if (obj_additionalLabel !== null) {
|
|
587
|
+
return new TypeError('Expected "null" but received "' + typeof obj_additionalLabel + '" (at "' + path_additionalLabel + '")');
|
|
588
|
+
}
|
|
589
|
+
})();
|
|
590
|
+
if (obj_additionalLabel_union1_error != null) {
|
|
591
|
+
obj_additionalLabel_union1 = obj_additionalLabel_union1_error.message;
|
|
592
|
+
}
|
|
593
|
+
if (obj_additionalLabel_union0 && obj_additionalLabel_union1) {
|
|
594
|
+
let message = 'Object doesn\'t match union (at "' + path_additionalLabel + '")';
|
|
595
|
+
message += '\n' + obj_additionalLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
596
|
+
message += '\n' + obj_additionalLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
597
|
+
return new TypeError(message);
|
|
598
|
+
}
|
|
599
|
+
const obj_authentication = obj.authentication;
|
|
600
|
+
const path_authentication = path + '.authentication';
|
|
601
|
+
const referencepath_authenticationValidationError = validate$l(obj_authentication, path_authentication);
|
|
602
|
+
if (referencepath_authenticationValidationError !== null) {
|
|
603
|
+
let message = 'Object doesn\'t match ContentHubRepositoryAuthenticationRepresentation (at "' + path_authentication + '")\n';
|
|
604
|
+
message += referencepath_authenticationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
605
|
+
return new TypeError(message);
|
|
606
|
+
}
|
|
607
|
+
const obj_communityNickname = obj.communityNickname;
|
|
608
|
+
const path_communityNickname = path + '.communityNickname';
|
|
609
|
+
if (typeof obj_communityNickname !== 'string') {
|
|
610
|
+
return new TypeError('Expected "string" but received "' + typeof obj_communityNickname + '" (at "' + path_communityNickname + '")');
|
|
611
|
+
}
|
|
612
|
+
const obj_companyName = obj.companyName;
|
|
613
|
+
const path_companyName = path + '.companyName';
|
|
614
|
+
if (typeof obj_companyName !== 'string') {
|
|
615
|
+
return new TypeError('Expected "string" but received "' + typeof obj_companyName + '" (at "' + path_companyName + '")');
|
|
616
|
+
}
|
|
617
|
+
const obj_displayName = obj.displayName;
|
|
618
|
+
const path_displayName = path + '.displayName';
|
|
619
|
+
if (typeof obj_displayName !== 'string') {
|
|
620
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
|
|
621
|
+
}
|
|
622
|
+
const obj_features = obj.features;
|
|
623
|
+
const path_features = path + '.features';
|
|
624
|
+
const referencepath_featuresValidationError = validate$k(obj_features, path_features);
|
|
625
|
+
if (referencepath_featuresValidationError !== null) {
|
|
626
|
+
let message = 'Object doesn\'t match ContentHubRepositoryFeaturesRepresentation (at "' + path_features + '")\n';
|
|
627
|
+
message += referencepath_featuresValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
628
|
+
return new TypeError(message);
|
|
629
|
+
}
|
|
630
|
+
const obj_firstName = obj.firstName;
|
|
631
|
+
const path_firstName = path + '.firstName';
|
|
632
|
+
if (typeof obj_firstName !== 'string') {
|
|
633
|
+
return new TypeError('Expected "string" but received "' + typeof obj_firstName + '" (at "' + path_firstName + '")');
|
|
634
|
+
}
|
|
635
|
+
const obj_isInThisCommunity = obj.isInThisCommunity;
|
|
636
|
+
const path_isInThisCommunity = path + '.isInThisCommunity';
|
|
637
|
+
if (typeof obj_isInThisCommunity !== 'boolean') {
|
|
638
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isInThisCommunity + '" (at "' + path_isInThisCommunity + '")');
|
|
639
|
+
}
|
|
640
|
+
const obj_label = obj.label;
|
|
641
|
+
const path_label = path + '.label';
|
|
642
|
+
if (typeof obj_label !== 'string') {
|
|
643
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
644
|
+
}
|
|
645
|
+
const obj_lastName = obj.lastName;
|
|
646
|
+
const path_lastName = path + '.lastName';
|
|
647
|
+
if (typeof obj_lastName !== 'string') {
|
|
648
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastName + '" (at "' + path_lastName + '")');
|
|
649
|
+
}
|
|
650
|
+
const obj_mySubscription = obj.mySubscription;
|
|
651
|
+
const path_mySubscription = path + '.mySubscription';
|
|
652
|
+
const referencepath_mySubscriptionValidationError = validate$j(obj_mySubscription, path_mySubscription);
|
|
653
|
+
if (referencepath_mySubscriptionValidationError !== null) {
|
|
654
|
+
let message = 'Object doesn\'t match ReferenceRepresentation (at "' + path_mySubscription + '")\n';
|
|
655
|
+
message += referencepath_mySubscriptionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
656
|
+
return new TypeError(message);
|
|
657
|
+
}
|
|
658
|
+
const obj_name = obj.name;
|
|
659
|
+
const path_name = path + '.name';
|
|
660
|
+
if (typeof obj_name !== 'string') {
|
|
661
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
662
|
+
}
|
|
663
|
+
const obj_providerType = obj.providerType;
|
|
664
|
+
const path_providerType = path + '.providerType';
|
|
665
|
+
const referencepath_providerTypeValidationError = validate$i(obj_providerType, path_providerType);
|
|
666
|
+
if (referencepath_providerTypeValidationError !== null) {
|
|
667
|
+
let message = 'Object doesn\'t match ContentHubProviderTypeRepresentation (at "' + path_providerType + '")\n';
|
|
668
|
+
message += referencepath_providerTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
669
|
+
return new TypeError(message);
|
|
670
|
+
}
|
|
671
|
+
const obj_rootFolderItemsUrl = obj.rootFolderItemsUrl;
|
|
672
|
+
const path_rootFolderItemsUrl = path + '.rootFolderItemsUrl';
|
|
673
|
+
if (typeof obj_rootFolderItemsUrl !== 'string') {
|
|
674
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rootFolderItemsUrl + '" (at "' + path_rootFolderItemsUrl + '")');
|
|
675
|
+
}
|
|
676
|
+
const obj_title = obj.title;
|
|
677
|
+
const path_title = path + '.title';
|
|
678
|
+
if (typeof obj_title !== 'string') {
|
|
679
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
680
|
+
}
|
|
681
|
+
const obj_userType = obj.userType;
|
|
682
|
+
const path_userType = path + '.userType';
|
|
683
|
+
if (typeof obj_userType !== 'string') {
|
|
684
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userType + '" (at "' + path_userType + '")');
|
|
685
|
+
}
|
|
686
|
+
})();
|
|
687
|
+
return v_error === undefined ? null : v_error;
|
|
688
|
+
}
|
|
689
|
+
const select$i = function ContentHubRepositoryRepresentationSelect() {
|
|
690
|
+
const { selections: ContentHubRepositoryAuthenticationRepresentation__selections, opaque: ContentHubRepositoryAuthenticationRepresentation__opaque, } = select$m();
|
|
691
|
+
const { selections: ContentHubRepositoryFeaturesRepresentation__selections, opaque: ContentHubRepositoryFeaturesRepresentation__opaque, } = select$l();
|
|
692
|
+
const { selections: ReferenceRepresentation__selections, opaque: ReferenceRepresentation__opaque, } = select$k();
|
|
693
|
+
const { selections: ContentHubProviderTypeRepresentation__selections, opaque: ContentHubProviderTypeRepresentation__opaque, } = select$j();
|
|
694
|
+
return {
|
|
695
|
+
kind: 'Fragment',
|
|
696
|
+
version: VERSION$h,
|
|
697
|
+
private: [],
|
|
698
|
+
selections: [
|
|
699
|
+
{
|
|
700
|
+
name: 'additionalLabel',
|
|
701
|
+
kind: 'Scalar'
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
name: 'authentication',
|
|
705
|
+
kind: 'Object',
|
|
706
|
+
selections: ContentHubRepositoryAuthenticationRepresentation__selections
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
name: 'communityNickname',
|
|
710
|
+
kind: 'Scalar'
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
name: 'companyName',
|
|
714
|
+
kind: 'Scalar'
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: 'displayName',
|
|
718
|
+
kind: 'Scalar'
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
name: 'features',
|
|
722
|
+
kind: 'Object',
|
|
723
|
+
selections: ContentHubRepositoryFeaturesRepresentation__selections
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
name: 'firstName',
|
|
727
|
+
kind: 'Scalar'
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: 'isInThisCommunity',
|
|
731
|
+
kind: 'Scalar'
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
name: 'label',
|
|
735
|
+
kind: 'Scalar'
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
name: 'lastName',
|
|
739
|
+
kind: 'Scalar'
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: 'mySubscription',
|
|
743
|
+
kind: 'Object',
|
|
744
|
+
selections: ReferenceRepresentation__selections
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
name: 'name',
|
|
748
|
+
kind: 'Scalar'
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
name: 'providerType',
|
|
752
|
+
kind: 'Object',
|
|
753
|
+
selections: ContentHubProviderTypeRepresentation__selections
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
name: 'rootFolderItemsUrl',
|
|
757
|
+
kind: 'Scalar'
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
name: 'title',
|
|
761
|
+
kind: 'Scalar'
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
name: 'userType',
|
|
765
|
+
kind: 'Scalar'
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
function equals$h(existing, incoming) {
|
|
771
|
+
const existing_isInThisCommunity = existing.isInThisCommunity;
|
|
772
|
+
const incoming_isInThisCommunity = incoming.isInThisCommunity;
|
|
773
|
+
if (!(existing_isInThisCommunity === incoming_isInThisCommunity)) {
|
|
774
|
+
return false;
|
|
775
|
+
}
|
|
776
|
+
const existing_communityNickname = existing.communityNickname;
|
|
777
|
+
const incoming_communityNickname = incoming.communityNickname;
|
|
778
|
+
if (!(existing_communityNickname === incoming_communityNickname)) {
|
|
779
|
+
return false;
|
|
780
|
+
}
|
|
781
|
+
const existing_companyName = existing.companyName;
|
|
782
|
+
const incoming_companyName = incoming.companyName;
|
|
783
|
+
if (!(existing_companyName === incoming_companyName)) {
|
|
784
|
+
return false;
|
|
785
|
+
}
|
|
786
|
+
const existing_displayName = existing.displayName;
|
|
787
|
+
const incoming_displayName = incoming.displayName;
|
|
788
|
+
if (!(existing_displayName === incoming_displayName)) {
|
|
789
|
+
return false;
|
|
790
|
+
}
|
|
791
|
+
const existing_firstName = existing.firstName;
|
|
792
|
+
const incoming_firstName = incoming.firstName;
|
|
793
|
+
if (!(existing_firstName === incoming_firstName)) {
|
|
794
|
+
return false;
|
|
795
|
+
}
|
|
796
|
+
const existing_label = existing.label;
|
|
797
|
+
const incoming_label = incoming.label;
|
|
798
|
+
if (!(existing_label === incoming_label)) {
|
|
799
|
+
return false;
|
|
800
|
+
}
|
|
801
|
+
const existing_lastName = existing.lastName;
|
|
802
|
+
const incoming_lastName = incoming.lastName;
|
|
803
|
+
if (!(existing_lastName === incoming_lastName)) {
|
|
804
|
+
return false;
|
|
805
|
+
}
|
|
806
|
+
const existing_name = existing.name;
|
|
807
|
+
const incoming_name = incoming.name;
|
|
808
|
+
if (!(existing_name === incoming_name)) {
|
|
809
|
+
return false;
|
|
810
|
+
}
|
|
811
|
+
const existing_rootFolderItemsUrl = existing.rootFolderItemsUrl;
|
|
812
|
+
const incoming_rootFolderItemsUrl = incoming.rootFolderItemsUrl;
|
|
813
|
+
if (!(existing_rootFolderItemsUrl === incoming_rootFolderItemsUrl)) {
|
|
814
|
+
return false;
|
|
815
|
+
}
|
|
816
|
+
const existing_title = existing.title;
|
|
817
|
+
const incoming_title = incoming.title;
|
|
818
|
+
if (!(existing_title === incoming_title)) {
|
|
819
|
+
return false;
|
|
820
|
+
}
|
|
821
|
+
const existing_userType = existing.userType;
|
|
822
|
+
const incoming_userType = incoming.userType;
|
|
823
|
+
if (!(existing_userType === incoming_userType)) {
|
|
824
|
+
return false;
|
|
825
|
+
}
|
|
826
|
+
const existing_additionalLabel = existing.additionalLabel;
|
|
827
|
+
const incoming_additionalLabel = incoming.additionalLabel;
|
|
828
|
+
if (!(existing_additionalLabel === incoming_additionalLabel)) {
|
|
829
|
+
return false;
|
|
830
|
+
}
|
|
831
|
+
const existing_authentication = existing.authentication;
|
|
832
|
+
const incoming_authentication = incoming.authentication;
|
|
833
|
+
if (!(equals$l(existing_authentication, incoming_authentication))) {
|
|
834
|
+
return false;
|
|
835
|
+
}
|
|
836
|
+
const existing_features = existing.features;
|
|
837
|
+
const incoming_features = incoming.features;
|
|
838
|
+
if (!(equals$k(existing_features, incoming_features))) {
|
|
839
|
+
return false;
|
|
840
|
+
}
|
|
841
|
+
const existing_mySubscription = existing.mySubscription;
|
|
842
|
+
const incoming_mySubscription = incoming.mySubscription;
|
|
843
|
+
if (!(equals$j(existing_mySubscription, incoming_mySubscription))) {
|
|
844
|
+
return false;
|
|
845
|
+
}
|
|
846
|
+
const existing_providerType = existing.providerType;
|
|
847
|
+
const incoming_providerType = incoming.providerType;
|
|
848
|
+
if (!(equals$i(existing_providerType, incoming_providerType))) {
|
|
849
|
+
return false;
|
|
850
|
+
}
|
|
851
|
+
return true;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
const VERSION$g = "24b4f4dd2754010fe3991590a16b4503";
|
|
855
|
+
function validate$g(obj, path = 'ContentHubPermissionTypeRepresentation') {
|
|
856
|
+
const v_error = (() => {
|
|
857
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
858
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
859
|
+
}
|
|
860
|
+
const obj_id = obj.id;
|
|
861
|
+
const path_id = path + '.id';
|
|
862
|
+
if (typeof obj_id !== 'string') {
|
|
863
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
864
|
+
}
|
|
865
|
+
const obj_label = obj.label;
|
|
866
|
+
const path_label = path + '.label';
|
|
867
|
+
if (typeof obj_label !== 'string') {
|
|
868
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
869
|
+
}
|
|
870
|
+
})();
|
|
871
|
+
return v_error === undefined ? null : v_error;
|
|
872
|
+
}
|
|
873
|
+
const select$h = function ContentHubPermissionTypeRepresentationSelect() {
|
|
874
|
+
return {
|
|
875
|
+
kind: 'Fragment',
|
|
876
|
+
version: VERSION$g,
|
|
877
|
+
private: [],
|
|
878
|
+
selections: [
|
|
879
|
+
{
|
|
880
|
+
name: 'id',
|
|
881
|
+
kind: 'Scalar'
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
name: 'label',
|
|
885
|
+
kind: 'Scalar'
|
|
886
|
+
}
|
|
887
|
+
]
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
function equals$g(existing, incoming) {
|
|
891
|
+
const existing_id = existing.id;
|
|
892
|
+
const incoming_id = incoming.id;
|
|
893
|
+
if (!(existing_id === incoming_id)) {
|
|
894
|
+
return false;
|
|
895
|
+
}
|
|
896
|
+
const existing_label = existing.label;
|
|
897
|
+
const incoming_label = incoming.label;
|
|
898
|
+
if (!(existing_label === incoming_label)) {
|
|
899
|
+
return false;
|
|
900
|
+
}
|
|
901
|
+
return true;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
const VERSION$f = "6258b354c4a672a25f319b56e2444396";
|
|
905
|
+
function validate$f(obj, path = 'RepositoryGroupSummaryRepresentation') {
|
|
906
|
+
const v_error = (() => {
|
|
907
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
908
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
909
|
+
}
|
|
910
|
+
const obj_domain = obj.domain;
|
|
911
|
+
const path_domain = path + '.domain';
|
|
912
|
+
if (typeof obj_domain !== 'string') {
|
|
913
|
+
return new TypeError('Expected "string" but received "' + typeof obj_domain + '" (at "' + path_domain + '")');
|
|
914
|
+
}
|
|
915
|
+
const obj_email = obj.email;
|
|
916
|
+
const path_email = path + '.email';
|
|
917
|
+
if (typeof obj_email !== 'string') {
|
|
918
|
+
return new TypeError('Expected "string" but received "' + typeof obj_email + '" (at "' + path_email + '")');
|
|
919
|
+
}
|
|
920
|
+
const obj_groupType = obj.groupType;
|
|
921
|
+
const path_groupType = path + '.groupType';
|
|
922
|
+
if (typeof obj_groupType !== 'string') {
|
|
923
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupType + '" (at "' + path_groupType + '")');
|
|
924
|
+
}
|
|
925
|
+
const obj_id = obj.id;
|
|
926
|
+
const path_id = path + '.id';
|
|
927
|
+
if (typeof obj_id !== 'string') {
|
|
928
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
929
|
+
}
|
|
930
|
+
const obj_name = obj.name;
|
|
931
|
+
const path_name = path + '.name';
|
|
932
|
+
if (typeof obj_name !== 'string') {
|
|
933
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
934
|
+
}
|
|
935
|
+
const obj_type = obj.type;
|
|
936
|
+
const path_type = path + '.type';
|
|
937
|
+
if (typeof obj_type !== 'string') {
|
|
938
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
939
|
+
}
|
|
940
|
+
})();
|
|
941
|
+
return v_error === undefined ? null : v_error;
|
|
942
|
+
}
|
|
943
|
+
const select$g = function RepositoryGroupSummaryRepresentationSelect() {
|
|
944
|
+
return {
|
|
945
|
+
kind: 'Fragment',
|
|
946
|
+
version: VERSION$f,
|
|
947
|
+
private: [],
|
|
948
|
+
selections: [
|
|
949
|
+
{
|
|
950
|
+
name: 'domain',
|
|
951
|
+
kind: 'Scalar'
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
name: 'email',
|
|
955
|
+
kind: 'Scalar'
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
name: 'groupType',
|
|
959
|
+
kind: 'Scalar'
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
name: 'id',
|
|
963
|
+
kind: 'Scalar'
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
name: 'name',
|
|
967
|
+
kind: 'Scalar'
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
name: 'type',
|
|
971
|
+
kind: 'Scalar'
|
|
972
|
+
}
|
|
973
|
+
]
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
function equals$f(existing, incoming) {
|
|
977
|
+
const existing_domain = existing.domain;
|
|
978
|
+
const incoming_domain = incoming.domain;
|
|
979
|
+
if (!(existing_domain === incoming_domain)) {
|
|
980
|
+
return false;
|
|
981
|
+
}
|
|
982
|
+
const existing_email = existing.email;
|
|
983
|
+
const incoming_email = incoming.email;
|
|
984
|
+
if (!(existing_email === incoming_email)) {
|
|
985
|
+
return false;
|
|
986
|
+
}
|
|
987
|
+
const existing_groupType = existing.groupType;
|
|
988
|
+
const incoming_groupType = incoming.groupType;
|
|
989
|
+
if (!(existing_groupType === incoming_groupType)) {
|
|
990
|
+
return false;
|
|
991
|
+
}
|
|
992
|
+
const existing_id = existing.id;
|
|
993
|
+
const incoming_id = incoming.id;
|
|
994
|
+
if (!(existing_id === incoming_id)) {
|
|
995
|
+
return false;
|
|
996
|
+
}
|
|
997
|
+
const existing_name = existing.name;
|
|
998
|
+
const incoming_name = incoming.name;
|
|
999
|
+
if (!(existing_name === incoming_name)) {
|
|
1000
|
+
return false;
|
|
1001
|
+
}
|
|
1002
|
+
const existing_type = existing.type;
|
|
1003
|
+
const incoming_type = incoming.type;
|
|
1004
|
+
if (!(existing_type === incoming_type)) {
|
|
1005
|
+
return false;
|
|
1006
|
+
}
|
|
1007
|
+
return true;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
const VERSION$e = "7bd621fa4165317ed863d0da2921b955";
|
|
1011
|
+
function validate$e(obj, path = 'ExternalFilePermissionInformationRepresentation') {
|
|
1012
|
+
const v_error = (() => {
|
|
1013
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1014
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1015
|
+
}
|
|
1016
|
+
const obj_externalFilePermissionTypes = obj.externalFilePermissionTypes;
|
|
1017
|
+
const path_externalFilePermissionTypes = path + '.externalFilePermissionTypes';
|
|
1018
|
+
if (!ArrayIsArray(obj_externalFilePermissionTypes)) {
|
|
1019
|
+
return new TypeError('Expected "array" but received "' + typeof obj_externalFilePermissionTypes + '" (at "' + path_externalFilePermissionTypes + '")');
|
|
1020
|
+
}
|
|
1021
|
+
for (let i = 0; i < obj_externalFilePermissionTypes.length; i++) {
|
|
1022
|
+
const obj_externalFilePermissionTypes_item = obj_externalFilePermissionTypes[i];
|
|
1023
|
+
const path_externalFilePermissionTypes_item = path_externalFilePermissionTypes + '[' + i + ']';
|
|
1024
|
+
const referencepath_externalFilePermissionTypes_itemValidationError = validate$g(obj_externalFilePermissionTypes_item, path_externalFilePermissionTypes_item);
|
|
1025
|
+
if (referencepath_externalFilePermissionTypes_itemValidationError !== null) {
|
|
1026
|
+
let message = 'Object doesn\'t match ContentHubPermissionTypeRepresentation (at "' + path_externalFilePermissionTypes_item + '")\n';
|
|
1027
|
+
message += referencepath_externalFilePermissionTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1028
|
+
return new TypeError(message);
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
const obj_externalFilePermissionsFailure = obj.externalFilePermissionsFailure;
|
|
1032
|
+
const path_externalFilePermissionsFailure = path + '.externalFilePermissionsFailure';
|
|
1033
|
+
if (typeof obj_externalFilePermissionsFailure !== 'boolean') {
|
|
1034
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_externalFilePermissionsFailure + '" (at "' + path_externalFilePermissionsFailure + '")');
|
|
1035
|
+
}
|
|
1036
|
+
const obj_externalFilePermissionsInfoFailureReason = obj.externalFilePermissionsInfoFailureReason;
|
|
1037
|
+
const path_externalFilePermissionsInfoFailureReason = path + '.externalFilePermissionsInfoFailureReason';
|
|
1038
|
+
if (typeof obj_externalFilePermissionsInfoFailureReason !== 'string') {
|
|
1039
|
+
return new TypeError('Expected "string" but received "' + typeof obj_externalFilePermissionsInfoFailureReason + '" (at "' + path_externalFilePermissionsInfoFailureReason + '")');
|
|
1040
|
+
}
|
|
1041
|
+
const obj_externalFileSharingStatus = obj.externalFileSharingStatus;
|
|
1042
|
+
const path_externalFileSharingStatus = path + '.externalFileSharingStatus';
|
|
1043
|
+
if (typeof obj_externalFileSharingStatus !== 'string') {
|
|
1044
|
+
return new TypeError('Expected "string" but received "' + typeof obj_externalFileSharingStatus + '" (at "' + path_externalFileSharingStatus + '")');
|
|
1045
|
+
}
|
|
1046
|
+
const obj_repositoryPublicGroups = obj.repositoryPublicGroups;
|
|
1047
|
+
const path_repositoryPublicGroups = path + '.repositoryPublicGroups';
|
|
1048
|
+
if (!ArrayIsArray(obj_repositoryPublicGroups)) {
|
|
1049
|
+
return new TypeError('Expected "array" but received "' + typeof obj_repositoryPublicGroups + '" (at "' + path_repositoryPublicGroups + '")');
|
|
1050
|
+
}
|
|
1051
|
+
for (let i = 0; i < obj_repositoryPublicGroups.length; i++) {
|
|
1052
|
+
const obj_repositoryPublicGroups_item = obj_repositoryPublicGroups[i];
|
|
1053
|
+
const path_repositoryPublicGroups_item = path_repositoryPublicGroups + '[' + i + ']';
|
|
1054
|
+
const referencepath_repositoryPublicGroups_itemValidationError = validate$f(obj_repositoryPublicGroups_item, path_repositoryPublicGroups_item);
|
|
1055
|
+
if (referencepath_repositoryPublicGroups_itemValidationError !== null) {
|
|
1056
|
+
let message = 'Object doesn\'t match RepositoryGroupSummaryRepresentation (at "' + path_repositoryPublicGroups_item + '")\n';
|
|
1057
|
+
message += referencepath_repositoryPublicGroups_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1058
|
+
return new TypeError(message);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
})();
|
|
1062
|
+
return v_error === undefined ? null : v_error;
|
|
1063
|
+
}
|
|
1064
|
+
const select$f = function ExternalFilePermissionInformationRepresentationSelect() {
|
|
1065
|
+
const { selections: ContentHubPermissionTypeRepresentation__selections, opaque: ContentHubPermissionTypeRepresentation__opaque, } = select$h();
|
|
1066
|
+
const { selections: RepositoryGroupSummaryRepresentation__selections, opaque: RepositoryGroupSummaryRepresentation__opaque, } = select$g();
|
|
1067
|
+
return {
|
|
1068
|
+
kind: 'Fragment',
|
|
1069
|
+
version: VERSION$e,
|
|
1070
|
+
private: [],
|
|
1071
|
+
selections: [
|
|
1072
|
+
{
|
|
1073
|
+
name: 'externalFilePermissionTypes',
|
|
1074
|
+
kind: 'Object',
|
|
1075
|
+
plural: true,
|
|
1076
|
+
selections: ContentHubPermissionTypeRepresentation__selections
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
name: 'externalFilePermissionsFailure',
|
|
1080
|
+
kind: 'Scalar'
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
name: 'externalFilePermissionsInfoFailureReason',
|
|
1084
|
+
kind: 'Scalar'
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
name: 'externalFileSharingStatus',
|
|
1088
|
+
kind: 'Scalar'
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
name: 'repositoryPublicGroups',
|
|
1092
|
+
kind: 'Object',
|
|
1093
|
+
plural: true,
|
|
1094
|
+
selections: RepositoryGroupSummaryRepresentation__selections
|
|
1095
|
+
}
|
|
1096
|
+
]
|
|
1097
|
+
};
|
|
1098
|
+
};
|
|
1099
|
+
function equals$e(existing, incoming) {
|
|
1100
|
+
const existing_externalFilePermissionsFailure = existing.externalFilePermissionsFailure;
|
|
1101
|
+
const incoming_externalFilePermissionsFailure = incoming.externalFilePermissionsFailure;
|
|
1102
|
+
if (!(existing_externalFilePermissionsFailure === incoming_externalFilePermissionsFailure)) {
|
|
1103
|
+
return false;
|
|
1104
|
+
}
|
|
1105
|
+
const existing_externalFilePermissionsInfoFailureReason = existing.externalFilePermissionsInfoFailureReason;
|
|
1106
|
+
const incoming_externalFilePermissionsInfoFailureReason = incoming.externalFilePermissionsInfoFailureReason;
|
|
1107
|
+
if (!(existing_externalFilePermissionsInfoFailureReason === incoming_externalFilePermissionsInfoFailureReason)) {
|
|
1108
|
+
return false;
|
|
1109
|
+
}
|
|
1110
|
+
const existing_externalFileSharingStatus = existing.externalFileSharingStatus;
|
|
1111
|
+
const incoming_externalFileSharingStatus = incoming.externalFileSharingStatus;
|
|
1112
|
+
if (!(existing_externalFileSharingStatus === incoming_externalFileSharingStatus)) {
|
|
1113
|
+
return false;
|
|
1114
|
+
}
|
|
1115
|
+
const existing_externalFilePermissionTypes = existing.externalFilePermissionTypes;
|
|
1116
|
+
const incoming_externalFilePermissionTypes = incoming.externalFilePermissionTypes;
|
|
1117
|
+
const equals_externalFilePermissionTypes_items = equalsArray(existing_externalFilePermissionTypes, incoming_externalFilePermissionTypes, (existing_externalFilePermissionTypes_item, incoming_externalFilePermissionTypes_item) => {
|
|
1118
|
+
if (!(equals$g(existing_externalFilePermissionTypes_item, incoming_externalFilePermissionTypes_item))) {
|
|
1119
|
+
return false;
|
|
1120
|
+
}
|
|
1121
|
+
});
|
|
1122
|
+
if (equals_externalFilePermissionTypes_items === false) {
|
|
1123
|
+
return false;
|
|
1124
|
+
}
|
|
1125
|
+
const existing_repositoryPublicGroups = existing.repositoryPublicGroups;
|
|
1126
|
+
const incoming_repositoryPublicGroups = incoming.repositoryPublicGroups;
|
|
1127
|
+
const equals_repositoryPublicGroups_items = equalsArray(existing_repositoryPublicGroups, incoming_repositoryPublicGroups, (existing_repositoryPublicGroups_item, incoming_repositoryPublicGroups_item) => {
|
|
1128
|
+
if (!(equals$f(existing_repositoryPublicGroups_item, incoming_repositoryPublicGroups_item))) {
|
|
1129
|
+
return false;
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
if (equals_repositoryPublicGroups_items === false) {
|
|
1133
|
+
return false;
|
|
1134
|
+
}
|
|
1135
|
+
return true;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
const VERSION$d = "4ffe76c088b0010d6c07321f8fc71413";
|
|
1139
|
+
function validate$d(obj, path = 'FileAssetRepresentation') {
|
|
1140
|
+
const v_error = (() => {
|
|
1141
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1142
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1143
|
+
}
|
|
1144
|
+
const obj_baseAssetUrl = obj.baseAssetUrl;
|
|
1145
|
+
const path_baseAssetUrl = path + '.baseAssetUrl';
|
|
1146
|
+
if (typeof obj_baseAssetUrl !== 'string') {
|
|
1147
|
+
return new TypeError('Expected "string" but received "' + typeof obj_baseAssetUrl + '" (at "' + path_baseAssetUrl + '")');
|
|
1148
|
+
}
|
|
1149
|
+
const obj_baseUnauthenticatedAssetUrl = obj.baseUnauthenticatedAssetUrl;
|
|
1150
|
+
const path_baseUnauthenticatedAssetUrl = path + '.baseUnauthenticatedAssetUrl';
|
|
1151
|
+
if (typeof obj_baseUnauthenticatedAssetUrl !== 'string') {
|
|
1152
|
+
return new TypeError('Expected "string" but received "' + typeof obj_baseUnauthenticatedAssetUrl + '" (at "' + path_baseUnauthenticatedAssetUrl + '")');
|
|
1153
|
+
}
|
|
1154
|
+
const obj_id = obj.id;
|
|
1155
|
+
const path_id = path + '.id';
|
|
1156
|
+
if (typeof obj_id !== 'string') {
|
|
1157
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1158
|
+
}
|
|
1159
|
+
const obj_isVisibleByExternalUsers = obj.isVisibleByExternalUsers;
|
|
1160
|
+
const path_isVisibleByExternalUsers = path + '.isVisibleByExternalUsers';
|
|
1161
|
+
if (typeof obj_isVisibleByExternalUsers !== 'boolean') {
|
|
1162
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isVisibleByExternalUsers + '" (at "' + path_isVisibleByExternalUsers + '")');
|
|
1163
|
+
}
|
|
1164
|
+
const obj_masterLabel = obj.masterLabel;
|
|
1165
|
+
const path_masterLabel = path + '.masterLabel';
|
|
1166
|
+
if (typeof obj_masterLabel !== 'string') {
|
|
1167
|
+
return new TypeError('Expected "string" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
|
|
1168
|
+
}
|
|
1169
|
+
const obj_name = obj.name;
|
|
1170
|
+
const path_name = path + '.name';
|
|
1171
|
+
if (typeof obj_name !== 'string') {
|
|
1172
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1173
|
+
}
|
|
1174
|
+
const obj_namespacePrefix = obj.namespacePrefix;
|
|
1175
|
+
const path_namespacePrefix = path + '.namespacePrefix';
|
|
1176
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
1177
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
1178
|
+
}
|
|
1179
|
+
const obj_type = obj.type;
|
|
1180
|
+
const path_type = path + '.type';
|
|
1181
|
+
if (typeof obj_type !== 'string') {
|
|
1182
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1183
|
+
}
|
|
1184
|
+
})();
|
|
1185
|
+
return v_error === undefined ? null : v_error;
|
|
1186
|
+
}
|
|
1187
|
+
const select$e = function FileAssetRepresentationSelect() {
|
|
1188
|
+
return {
|
|
1189
|
+
kind: 'Fragment',
|
|
1190
|
+
version: VERSION$d,
|
|
1191
|
+
private: [],
|
|
1192
|
+
selections: [
|
|
1193
|
+
{
|
|
1194
|
+
name: 'baseAssetUrl',
|
|
1195
|
+
kind: 'Scalar'
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
name: 'baseUnauthenticatedAssetUrl',
|
|
1199
|
+
kind: 'Scalar'
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
name: 'id',
|
|
1203
|
+
kind: 'Scalar'
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
name: 'isVisibleByExternalUsers',
|
|
1207
|
+
kind: 'Scalar'
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
name: 'masterLabel',
|
|
1211
|
+
kind: 'Scalar'
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
name: 'name',
|
|
1215
|
+
kind: 'Scalar'
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
name: 'namespacePrefix',
|
|
1219
|
+
kind: 'Scalar'
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
name: 'type',
|
|
1223
|
+
kind: 'Scalar'
|
|
1224
|
+
}
|
|
1225
|
+
]
|
|
1226
|
+
};
|
|
1227
|
+
};
|
|
1228
|
+
function equals$d(existing, incoming) {
|
|
1229
|
+
const existing_isVisibleByExternalUsers = existing.isVisibleByExternalUsers;
|
|
1230
|
+
const incoming_isVisibleByExternalUsers = incoming.isVisibleByExternalUsers;
|
|
1231
|
+
if (!(existing_isVisibleByExternalUsers === incoming_isVisibleByExternalUsers)) {
|
|
1232
|
+
return false;
|
|
1233
|
+
}
|
|
1234
|
+
const existing_baseAssetUrl = existing.baseAssetUrl;
|
|
1235
|
+
const incoming_baseAssetUrl = incoming.baseAssetUrl;
|
|
1236
|
+
if (!(existing_baseAssetUrl === incoming_baseAssetUrl)) {
|
|
1237
|
+
return false;
|
|
1238
|
+
}
|
|
1239
|
+
const existing_baseUnauthenticatedAssetUrl = existing.baseUnauthenticatedAssetUrl;
|
|
1240
|
+
const incoming_baseUnauthenticatedAssetUrl = incoming.baseUnauthenticatedAssetUrl;
|
|
1241
|
+
if (!(existing_baseUnauthenticatedAssetUrl === incoming_baseUnauthenticatedAssetUrl)) {
|
|
1242
|
+
return false;
|
|
1243
|
+
}
|
|
1244
|
+
const existing_id = existing.id;
|
|
1245
|
+
const incoming_id = incoming.id;
|
|
1246
|
+
if (!(existing_id === incoming_id)) {
|
|
1247
|
+
return false;
|
|
1248
|
+
}
|
|
1249
|
+
const existing_masterLabel = existing.masterLabel;
|
|
1250
|
+
const incoming_masterLabel = incoming.masterLabel;
|
|
1251
|
+
if (!(existing_masterLabel === incoming_masterLabel)) {
|
|
1252
|
+
return false;
|
|
1253
|
+
}
|
|
1254
|
+
const existing_name = existing.name;
|
|
1255
|
+
const incoming_name = incoming.name;
|
|
1256
|
+
if (!(existing_name === incoming_name)) {
|
|
1257
|
+
return false;
|
|
1258
|
+
}
|
|
1259
|
+
const existing_namespacePrefix = existing.namespacePrefix;
|
|
1260
|
+
const incoming_namespacePrefix = incoming.namespacePrefix;
|
|
1261
|
+
if (!(existing_namespacePrefix === incoming_namespacePrefix)) {
|
|
1262
|
+
return false;
|
|
1263
|
+
}
|
|
1264
|
+
const existing_type = existing.type;
|
|
1265
|
+
const incoming_type = incoming.type;
|
|
1266
|
+
if (!(existing_type === incoming_type)) {
|
|
1267
|
+
return false;
|
|
1268
|
+
}
|
|
1269
|
+
return true;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
const VERSION$c = "33984440af1a8d58f347ad7f777f3599";
|
|
1273
|
+
function validate$c(obj, path = 'ModerationFlagItemRepresentation') {
|
|
1274
|
+
const v_error = (() => {
|
|
1275
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1276
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1277
|
+
}
|
|
1278
|
+
const obj_createdBy = obj.createdBy;
|
|
1279
|
+
const path_createdBy = path + '.createdBy';
|
|
1280
|
+
if (typeof obj_createdBy !== 'string') {
|
|
1281
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
1282
|
+
}
|
|
1283
|
+
const obj_createdDate = obj.createdDate;
|
|
1284
|
+
const path_createdDate = path + '.createdDate';
|
|
1285
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1286
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1287
|
+
}
|
|
1288
|
+
const obj_id = obj.id;
|
|
1289
|
+
const path_id = path + '.id';
|
|
1290
|
+
if (typeof obj_id !== 'string') {
|
|
1291
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1292
|
+
}
|
|
1293
|
+
const obj_moderationType = obj.moderationType;
|
|
1294
|
+
const path_moderationType = path + '.moderationType';
|
|
1295
|
+
if (typeof obj_moderationType !== 'string') {
|
|
1296
|
+
return new TypeError('Expected "string" but received "' + typeof obj_moderationType + '" (at "' + path_moderationType + '")');
|
|
1297
|
+
}
|
|
1298
|
+
const obj_note = obj.note;
|
|
1299
|
+
const path_note = path + '.note';
|
|
1300
|
+
if (typeof obj_note !== 'string') {
|
|
1301
|
+
return new TypeError('Expected "string" but received "' + typeof obj_note + '" (at "' + path_note + '")');
|
|
1302
|
+
}
|
|
1303
|
+
const obj_visibility = obj.visibility;
|
|
1304
|
+
const path_visibility = path + '.visibility';
|
|
1305
|
+
if (typeof obj_visibility !== 'string') {
|
|
1306
|
+
return new TypeError('Expected "string" but received "' + typeof obj_visibility + '" (at "' + path_visibility + '")');
|
|
1307
|
+
}
|
|
1308
|
+
})();
|
|
1309
|
+
return v_error === undefined ? null : v_error;
|
|
1310
|
+
}
|
|
1311
|
+
const select$d = function ModerationFlagItemRepresentationSelect() {
|
|
1312
|
+
return {
|
|
1313
|
+
kind: 'Fragment',
|
|
1314
|
+
version: VERSION$c,
|
|
1315
|
+
private: [],
|
|
1316
|
+
selections: [
|
|
1317
|
+
{
|
|
1318
|
+
name: 'createdBy',
|
|
1319
|
+
kind: 'Scalar'
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
name: 'createdDate',
|
|
1323
|
+
kind: 'Scalar'
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
name: 'id',
|
|
1327
|
+
kind: 'Scalar'
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
name: 'moderationType',
|
|
1331
|
+
kind: 'Scalar'
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
name: 'note',
|
|
1335
|
+
kind: 'Scalar'
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
name: 'visibility',
|
|
1339
|
+
kind: 'Scalar'
|
|
1340
|
+
}
|
|
1341
|
+
]
|
|
1342
|
+
};
|
|
1343
|
+
};
|
|
1344
|
+
function equals$c(existing, incoming) {
|
|
1345
|
+
const existing_createdBy = existing.createdBy;
|
|
1346
|
+
const incoming_createdBy = incoming.createdBy;
|
|
1347
|
+
if (!(existing_createdBy === incoming_createdBy)) {
|
|
1348
|
+
return false;
|
|
1349
|
+
}
|
|
1350
|
+
const existing_createdDate = existing.createdDate;
|
|
1351
|
+
const incoming_createdDate = incoming.createdDate;
|
|
1352
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
1353
|
+
return false;
|
|
1354
|
+
}
|
|
1355
|
+
const existing_id = existing.id;
|
|
1356
|
+
const incoming_id = incoming.id;
|
|
1357
|
+
if (!(existing_id === incoming_id)) {
|
|
1358
|
+
return false;
|
|
1359
|
+
}
|
|
1360
|
+
const existing_moderationType = existing.moderationType;
|
|
1361
|
+
const incoming_moderationType = incoming.moderationType;
|
|
1362
|
+
if (!(existing_moderationType === incoming_moderationType)) {
|
|
1363
|
+
return false;
|
|
1364
|
+
}
|
|
1365
|
+
const existing_note = existing.note;
|
|
1366
|
+
const incoming_note = incoming.note;
|
|
1367
|
+
if (!(existing_note === incoming_note)) {
|
|
1368
|
+
return false;
|
|
1369
|
+
}
|
|
1370
|
+
const existing_visibility = existing.visibility;
|
|
1371
|
+
const incoming_visibility = incoming.visibility;
|
|
1372
|
+
if (!(existing_visibility === incoming_visibility)) {
|
|
1373
|
+
return false;
|
|
1374
|
+
}
|
|
1375
|
+
return true;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
const VERSION$b = "352260f98bea3d1c4691d37f0a76a0b9";
|
|
1379
|
+
function validate$b(obj, path = 'ModerationFlagsCollectionRepresentation') {
|
|
1380
|
+
const v_error = (() => {
|
|
1381
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1382
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1383
|
+
}
|
|
1384
|
+
const obj_currentPageToken = obj.currentPageToken;
|
|
1385
|
+
const path_currentPageToken = path + '.currentPageToken';
|
|
1386
|
+
if (typeof obj_currentPageToken !== 'string') {
|
|
1387
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageToken + '" (at "' + path_currentPageToken + '")');
|
|
1388
|
+
}
|
|
1389
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
1390
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
1391
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
1392
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
1393
|
+
}
|
|
1394
|
+
const obj_flags = obj.flags;
|
|
1395
|
+
const path_flags = path + '.flags';
|
|
1396
|
+
if (!ArrayIsArray(obj_flags)) {
|
|
1397
|
+
return new TypeError('Expected "array" but received "' + typeof obj_flags + '" (at "' + path_flags + '")');
|
|
1398
|
+
}
|
|
1399
|
+
for (let i = 0; i < obj_flags.length; i++) {
|
|
1400
|
+
const obj_flags_item = obj_flags[i];
|
|
1401
|
+
const path_flags_item = path_flags + '[' + i + ']';
|
|
1402
|
+
const referencepath_flags_itemValidationError = validate$c(obj_flags_item, path_flags_item);
|
|
1403
|
+
if (referencepath_flags_itemValidationError !== null) {
|
|
1404
|
+
let message = 'Object doesn\'t match ModerationFlagItemRepresentation (at "' + path_flags_item + '")\n';
|
|
1405
|
+
message += referencepath_flags_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1406
|
+
return new TypeError(message);
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
const obj_nextPageToken = obj.nextPageToken;
|
|
1410
|
+
const path_nextPageToken = path + '.nextPageToken';
|
|
1411
|
+
if (typeof obj_nextPageToken !== 'string') {
|
|
1412
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageToken + '" (at "' + path_nextPageToken + '")');
|
|
1413
|
+
}
|
|
1414
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
1415
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
1416
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
1417
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1418
|
+
}
|
|
1419
|
+
const obj_pageSize = obj.pageSize;
|
|
1420
|
+
const path_pageSize = path + '.pageSize';
|
|
1421
|
+
if (typeof obj_pageSize !== 'number' || (typeof obj_pageSize === 'number' && Math.floor(obj_pageSize) !== obj_pageSize)) {
|
|
1422
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_pageSize + '" (at "' + path_pageSize + '")');
|
|
1423
|
+
}
|
|
1424
|
+
})();
|
|
1425
|
+
return v_error === undefined ? null : v_error;
|
|
1426
|
+
}
|
|
1427
|
+
const select$c = function ModerationFlagsCollectionRepresentationSelect() {
|
|
1428
|
+
const { selections: ModerationFlagItemRepresentation__selections, opaque: ModerationFlagItemRepresentation__opaque, } = select$d();
|
|
1429
|
+
return {
|
|
1430
|
+
kind: 'Fragment',
|
|
1431
|
+
version: VERSION$b,
|
|
1432
|
+
private: [],
|
|
1433
|
+
selections: [
|
|
1434
|
+
{
|
|
1435
|
+
name: 'currentPageToken',
|
|
1436
|
+
kind: 'Scalar'
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
name: 'currentPageUrl',
|
|
1440
|
+
kind: 'Scalar'
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
name: 'flags',
|
|
1444
|
+
kind: 'Object',
|
|
1445
|
+
plural: true,
|
|
1446
|
+
selections: ModerationFlagItemRepresentation__selections
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
name: 'nextPageToken',
|
|
1450
|
+
kind: 'Scalar'
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
name: 'nextPageUrl',
|
|
1454
|
+
kind: 'Scalar'
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
name: 'pageSize',
|
|
1458
|
+
kind: 'Scalar'
|
|
1459
|
+
}
|
|
1460
|
+
]
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
function equals$b(existing, incoming) {
|
|
1464
|
+
const existing_pageSize = existing.pageSize;
|
|
1465
|
+
const incoming_pageSize = incoming.pageSize;
|
|
1466
|
+
if (!(existing_pageSize === incoming_pageSize)) {
|
|
1467
|
+
return false;
|
|
1468
|
+
}
|
|
1469
|
+
const existing_currentPageToken = existing.currentPageToken;
|
|
1470
|
+
const incoming_currentPageToken = incoming.currentPageToken;
|
|
1471
|
+
if (!(existing_currentPageToken === incoming_currentPageToken)) {
|
|
1472
|
+
return false;
|
|
1473
|
+
}
|
|
1474
|
+
const existing_currentPageUrl = existing.currentPageUrl;
|
|
1475
|
+
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
1476
|
+
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
1477
|
+
return false;
|
|
1478
|
+
}
|
|
1479
|
+
const existing_nextPageToken = existing.nextPageToken;
|
|
1480
|
+
const incoming_nextPageToken = incoming.nextPageToken;
|
|
1481
|
+
if (!(existing_nextPageToken === incoming_nextPageToken)) {
|
|
1482
|
+
return false;
|
|
1483
|
+
}
|
|
1484
|
+
const existing_nextPageUrl = existing.nextPageUrl;
|
|
1485
|
+
const incoming_nextPageUrl = incoming.nextPageUrl;
|
|
1486
|
+
if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
|
|
1487
|
+
return false;
|
|
1488
|
+
}
|
|
1489
|
+
const existing_flags = existing.flags;
|
|
1490
|
+
const incoming_flags = incoming.flags;
|
|
1491
|
+
const equals_flags_items = equalsArray(existing_flags, incoming_flags, (existing_flags_item, incoming_flags_item) => {
|
|
1492
|
+
if (!(equals$c(existing_flags_item, incoming_flags_item))) {
|
|
1493
|
+
return false;
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
if (equals_flags_items === false) {
|
|
1497
|
+
return false;
|
|
1498
|
+
}
|
|
1499
|
+
return true;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
const VERSION$a = "13562eb8ff78d5886789a53d2bd5a8a4";
|
|
1503
|
+
function validate$a(obj, path = 'ModerationFlagsRepresentation') {
|
|
1504
|
+
const v_error = (() => {
|
|
1505
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1506
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1507
|
+
}
|
|
1508
|
+
const obj_flagCount = obj.flagCount;
|
|
1509
|
+
const path_flagCount = path + '.flagCount';
|
|
1510
|
+
if (typeof obj_flagCount !== 'number' || (typeof obj_flagCount === 'number' && Math.floor(obj_flagCount) !== obj_flagCount)) {
|
|
1511
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_flagCount + '" (at "' + path_flagCount + '")');
|
|
1512
|
+
}
|
|
1513
|
+
const obj_flagCountByReason = obj.flagCountByReason;
|
|
1514
|
+
const path_flagCountByReason = path + '.flagCountByReason';
|
|
1515
|
+
if (typeof obj_flagCountByReason !== 'object' || ArrayIsArray(obj_flagCountByReason) || obj_flagCountByReason === null) {
|
|
1516
|
+
return new TypeError('Expected "object" but received "' + typeof obj_flagCountByReason + '" (at "' + path_flagCountByReason + '")');
|
|
1517
|
+
}
|
|
1518
|
+
const obj_flagCountByReason_keys = ObjectKeys(obj_flagCountByReason);
|
|
1519
|
+
for (let i = 0; i < obj_flagCountByReason_keys.length; i++) {
|
|
1520
|
+
const key = obj_flagCountByReason_keys[i];
|
|
1521
|
+
const obj_flagCountByReason_prop = obj_flagCountByReason[key];
|
|
1522
|
+
const path_flagCountByReason_prop = path_flagCountByReason + '["' + key + '"]';
|
|
1523
|
+
if (typeof obj_flagCountByReason_prop !== 'number' || (typeof obj_flagCountByReason_prop === 'number' && Math.floor(obj_flagCountByReason_prop) !== obj_flagCountByReason_prop)) {
|
|
1524
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_flagCountByReason_prop + '" (at "' + path_flagCountByReason_prop + '")');
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
const obj_flaggedByMe = obj.flaggedByMe;
|
|
1528
|
+
const path_flaggedByMe = path + '.flaggedByMe';
|
|
1529
|
+
if (typeof obj_flaggedByMe !== 'boolean') {
|
|
1530
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_flaggedByMe + '" (at "' + path_flaggedByMe + '")');
|
|
1531
|
+
}
|
|
1532
|
+
const obj_flags = obj.flags;
|
|
1533
|
+
const path_flags = path + '.flags';
|
|
1534
|
+
const referencepath_flagsValidationError = validate$b(obj_flags, path_flags);
|
|
1535
|
+
if (referencepath_flagsValidationError !== null) {
|
|
1536
|
+
let message = 'Object doesn\'t match ModerationFlagsCollectionRepresentation (at "' + path_flags + '")\n';
|
|
1537
|
+
message += referencepath_flagsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1538
|
+
return new TypeError(message);
|
|
1539
|
+
}
|
|
1540
|
+
})();
|
|
1541
|
+
return v_error === undefined ? null : v_error;
|
|
1542
|
+
}
|
|
1543
|
+
const select$b = function ModerationFlagsRepresentationSelect() {
|
|
1544
|
+
const { selections: ModerationFlagsCollectionRepresentation__selections, opaque: ModerationFlagsCollectionRepresentation__opaque, } = select$c();
|
|
1545
|
+
return {
|
|
1546
|
+
kind: 'Fragment',
|
|
1547
|
+
version: VERSION$a,
|
|
1548
|
+
private: [],
|
|
1549
|
+
selections: [
|
|
1550
|
+
{
|
|
1551
|
+
name: 'flagCount',
|
|
1552
|
+
kind: 'Scalar'
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
name: 'flagCountByReason',
|
|
1556
|
+
kind: 'Scalar',
|
|
1557
|
+
map: true
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
name: 'flaggedByMe',
|
|
1561
|
+
kind: 'Scalar'
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
name: 'flags',
|
|
1565
|
+
kind: 'Object',
|
|
1566
|
+
selections: ModerationFlagsCollectionRepresentation__selections
|
|
1567
|
+
}
|
|
1568
|
+
]
|
|
1569
|
+
};
|
|
1570
|
+
};
|
|
1571
|
+
function equals$a(existing, incoming) {
|
|
1572
|
+
const existing_flaggedByMe = existing.flaggedByMe;
|
|
1573
|
+
const incoming_flaggedByMe = incoming.flaggedByMe;
|
|
1574
|
+
if (!(existing_flaggedByMe === incoming_flaggedByMe)) {
|
|
1575
|
+
return false;
|
|
1576
|
+
}
|
|
1577
|
+
const existing_flagCount = existing.flagCount;
|
|
1578
|
+
const incoming_flagCount = incoming.flagCount;
|
|
1579
|
+
if (!(existing_flagCount === incoming_flagCount)) {
|
|
1580
|
+
return false;
|
|
1581
|
+
}
|
|
1582
|
+
const existing_flagCountByReason = existing.flagCountByReason;
|
|
1583
|
+
const incoming_flagCountByReason = incoming.flagCountByReason;
|
|
1584
|
+
const equals_flagCountByReason_props = equalsObject(existing_flagCountByReason, incoming_flagCountByReason, (existing_flagCountByReason_prop, incoming_flagCountByReason_prop) => {
|
|
1585
|
+
if (!(existing_flagCountByReason_prop === incoming_flagCountByReason_prop)) {
|
|
1586
|
+
return false;
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
if (equals_flagCountByReason_props === false) {
|
|
1590
|
+
return false;
|
|
1591
|
+
}
|
|
1592
|
+
const existing_flags = existing.flags;
|
|
1593
|
+
const incoming_flags = incoming.flags;
|
|
1594
|
+
if (!(equals$b(existing_flags, incoming_flags))) {
|
|
1595
|
+
return false;
|
|
1596
|
+
}
|
|
1597
|
+
return true;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
const VERSION$9 = "ea2628b3acfa34a5fb973e3cdc2dcbe0";
|
|
1601
|
+
function validate$9(obj, path = 'MotifRepresentation') {
|
|
1602
|
+
const v_error = (() => {
|
|
1603
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1604
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1605
|
+
}
|
|
1606
|
+
const obj_color = obj.color;
|
|
1607
|
+
const path_color = path + '.color';
|
|
1608
|
+
if (typeof obj_color !== 'string') {
|
|
1609
|
+
return new TypeError('Expected "string" but received "' + typeof obj_color + '" (at "' + path_color + '")');
|
|
1610
|
+
}
|
|
1611
|
+
const obj_largeIconUrl = obj.largeIconUrl;
|
|
1612
|
+
const path_largeIconUrl = path + '.largeIconUrl';
|
|
1613
|
+
if (typeof obj_largeIconUrl !== 'string') {
|
|
1614
|
+
return new TypeError('Expected "string" but received "' + typeof obj_largeIconUrl + '" (at "' + path_largeIconUrl + '")');
|
|
1615
|
+
}
|
|
1616
|
+
const obj_mediumIconUrl = obj.mediumIconUrl;
|
|
1617
|
+
const path_mediumIconUrl = path + '.mediumIconUrl';
|
|
1618
|
+
if (typeof obj_mediumIconUrl !== 'string') {
|
|
1619
|
+
return new TypeError('Expected "string" but received "' + typeof obj_mediumIconUrl + '" (at "' + path_mediumIconUrl + '")');
|
|
1620
|
+
}
|
|
1621
|
+
const obj_smallIconUrl = obj.smallIconUrl;
|
|
1622
|
+
const path_smallIconUrl = path + '.smallIconUrl';
|
|
1623
|
+
if (typeof obj_smallIconUrl !== 'string') {
|
|
1624
|
+
return new TypeError('Expected "string" but received "' + typeof obj_smallIconUrl + '" (at "' + path_smallIconUrl + '")');
|
|
1625
|
+
}
|
|
1626
|
+
const obj_svgIconUrl = obj.svgIconUrl;
|
|
1627
|
+
const path_svgIconUrl = path + '.svgIconUrl';
|
|
1628
|
+
let obj_svgIconUrl_union0 = null;
|
|
1629
|
+
const obj_svgIconUrl_union0_error = (() => {
|
|
1630
|
+
if (typeof obj_svgIconUrl !== 'string') {
|
|
1631
|
+
return new TypeError('Expected "string" but received "' + typeof obj_svgIconUrl + '" (at "' + path_svgIconUrl + '")');
|
|
1632
|
+
}
|
|
1633
|
+
})();
|
|
1634
|
+
if (obj_svgIconUrl_union0_error != null) {
|
|
1635
|
+
obj_svgIconUrl_union0 = obj_svgIconUrl_union0_error.message;
|
|
1636
|
+
}
|
|
1637
|
+
let obj_svgIconUrl_union1 = null;
|
|
1638
|
+
const obj_svgIconUrl_union1_error = (() => {
|
|
1639
|
+
if (obj_svgIconUrl !== null) {
|
|
1640
|
+
return new TypeError('Expected "null" but received "' + typeof obj_svgIconUrl + '" (at "' + path_svgIconUrl + '")');
|
|
1641
|
+
}
|
|
1642
|
+
})();
|
|
1643
|
+
if (obj_svgIconUrl_union1_error != null) {
|
|
1644
|
+
obj_svgIconUrl_union1 = obj_svgIconUrl_union1_error.message;
|
|
1645
|
+
}
|
|
1646
|
+
if (obj_svgIconUrl_union0 && obj_svgIconUrl_union1) {
|
|
1647
|
+
let message = 'Object doesn\'t match union (at "' + path_svgIconUrl + '")';
|
|
1648
|
+
message += '\n' + obj_svgIconUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1649
|
+
message += '\n' + obj_svgIconUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1650
|
+
return new TypeError(message);
|
|
1651
|
+
}
|
|
1652
|
+
})();
|
|
1653
|
+
return v_error === undefined ? null : v_error;
|
|
1654
|
+
}
|
|
1655
|
+
const select$a = function MotifRepresentationSelect() {
|
|
1656
|
+
return {
|
|
1657
|
+
kind: 'Fragment',
|
|
1658
|
+
version: VERSION$9,
|
|
1659
|
+
private: [],
|
|
1660
|
+
selections: [
|
|
1661
|
+
{
|
|
1662
|
+
name: 'color',
|
|
1663
|
+
kind: 'Scalar'
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
name: 'largeIconUrl',
|
|
1667
|
+
kind: 'Scalar'
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
name: 'mediumIconUrl',
|
|
1671
|
+
kind: 'Scalar'
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
name: 'smallIconUrl',
|
|
1675
|
+
kind: 'Scalar'
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
name: 'svgIconUrl',
|
|
1679
|
+
kind: 'Scalar'
|
|
1680
|
+
}
|
|
1681
|
+
]
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
function equals$9(existing, incoming) {
|
|
1685
|
+
const existing_color = existing.color;
|
|
1686
|
+
const incoming_color = incoming.color;
|
|
1687
|
+
if (!(existing_color === incoming_color)) {
|
|
1688
|
+
return false;
|
|
1689
|
+
}
|
|
1690
|
+
const existing_largeIconUrl = existing.largeIconUrl;
|
|
1691
|
+
const incoming_largeIconUrl = incoming.largeIconUrl;
|
|
1692
|
+
if (!(existing_largeIconUrl === incoming_largeIconUrl)) {
|
|
1693
|
+
return false;
|
|
1694
|
+
}
|
|
1695
|
+
const existing_mediumIconUrl = existing.mediumIconUrl;
|
|
1696
|
+
const incoming_mediumIconUrl = incoming.mediumIconUrl;
|
|
1697
|
+
if (!(existing_mediumIconUrl === incoming_mediumIconUrl)) {
|
|
1698
|
+
return false;
|
|
1699
|
+
}
|
|
1700
|
+
const existing_smallIconUrl = existing.smallIconUrl;
|
|
1701
|
+
const incoming_smallIconUrl = incoming.smallIconUrl;
|
|
1702
|
+
if (!(existing_smallIconUrl === incoming_smallIconUrl)) {
|
|
1703
|
+
return false;
|
|
1704
|
+
}
|
|
1705
|
+
const existing_svgIconUrl = existing.svgIconUrl;
|
|
1706
|
+
const incoming_svgIconUrl = incoming.svgIconUrl;
|
|
1707
|
+
if (!(existing_svgIconUrl === incoming_svgIconUrl)) {
|
|
1708
|
+
return false;
|
|
1709
|
+
}
|
|
1710
|
+
return true;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
const VERSION$8 = "05d2b9c24b3e86c43f4585b49253d98e";
|
|
1714
|
+
function validate$8(obj, path = 'OutOfOfficeRepresentation') {
|
|
1715
|
+
const v_error = (() => {
|
|
1716
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1717
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1718
|
+
}
|
|
1719
|
+
const obj_message = obj.message;
|
|
1720
|
+
const path_message = path + '.message';
|
|
1721
|
+
if (typeof obj_message !== 'string') {
|
|
1722
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1723
|
+
}
|
|
1724
|
+
})();
|
|
1725
|
+
return v_error === undefined ? null : v_error;
|
|
1726
|
+
}
|
|
1727
|
+
const select$9 = function OutOfOfficeRepresentationSelect() {
|
|
1728
|
+
return {
|
|
1729
|
+
kind: 'Fragment',
|
|
1730
|
+
version: VERSION$8,
|
|
1731
|
+
private: [],
|
|
1732
|
+
selections: [
|
|
1733
|
+
{
|
|
1734
|
+
name: 'message',
|
|
1735
|
+
kind: 'Scalar'
|
|
1736
|
+
}
|
|
1737
|
+
]
|
|
1738
|
+
};
|
|
1739
|
+
};
|
|
1740
|
+
function equals$8(existing, incoming) {
|
|
1741
|
+
const existing_message = existing.message;
|
|
1742
|
+
const incoming_message = incoming.message;
|
|
1743
|
+
if (!(existing_message === incoming_message)) {
|
|
1744
|
+
return false;
|
|
1745
|
+
}
|
|
1746
|
+
return true;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
const VERSION$7 = "04f9649781446a4380f18667d5951641";
|
|
1750
|
+
function validate$7(obj, path = 'PhotoRepresentation') {
|
|
1751
|
+
const v_error = (() => {
|
|
1752
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1753
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1754
|
+
}
|
|
1755
|
+
const obj_fullEmailPhotoUrl = obj.fullEmailPhotoUrl;
|
|
1756
|
+
const path_fullEmailPhotoUrl = path + '.fullEmailPhotoUrl';
|
|
1757
|
+
if (typeof obj_fullEmailPhotoUrl !== 'string') {
|
|
1758
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fullEmailPhotoUrl + '" (at "' + path_fullEmailPhotoUrl + '")');
|
|
1759
|
+
}
|
|
1760
|
+
const obj_largePhotoUrl = obj.largePhotoUrl;
|
|
1761
|
+
const path_largePhotoUrl = path + '.largePhotoUrl';
|
|
1762
|
+
if (typeof obj_largePhotoUrl !== 'string') {
|
|
1763
|
+
return new TypeError('Expected "string" but received "' + typeof obj_largePhotoUrl + '" (at "' + path_largePhotoUrl + '")');
|
|
1764
|
+
}
|
|
1765
|
+
const obj_mediumPhotoUrl = obj.mediumPhotoUrl;
|
|
1766
|
+
const path_mediumPhotoUrl = path + '.mediumPhotoUrl';
|
|
1767
|
+
if (typeof obj_mediumPhotoUrl !== 'string') {
|
|
1768
|
+
return new TypeError('Expected "string" but received "' + typeof obj_mediumPhotoUrl + '" (at "' + path_mediumPhotoUrl + '")');
|
|
1769
|
+
}
|
|
1770
|
+
const obj_photoVersionId = obj.photoVersionId;
|
|
1771
|
+
const path_photoVersionId = path + '.photoVersionId';
|
|
1772
|
+
let obj_photoVersionId_union0 = null;
|
|
1773
|
+
const obj_photoVersionId_union0_error = (() => {
|
|
1774
|
+
if (typeof obj_photoVersionId !== 'string') {
|
|
1775
|
+
return new TypeError('Expected "string" but received "' + typeof obj_photoVersionId + '" (at "' + path_photoVersionId + '")');
|
|
1776
|
+
}
|
|
1777
|
+
})();
|
|
1778
|
+
if (obj_photoVersionId_union0_error != null) {
|
|
1779
|
+
obj_photoVersionId_union0 = obj_photoVersionId_union0_error.message;
|
|
1780
|
+
}
|
|
1781
|
+
let obj_photoVersionId_union1 = null;
|
|
1782
|
+
const obj_photoVersionId_union1_error = (() => {
|
|
1783
|
+
if (obj_photoVersionId !== null) {
|
|
1784
|
+
return new TypeError('Expected "null" but received "' + typeof obj_photoVersionId + '" (at "' + path_photoVersionId + '")');
|
|
1785
|
+
}
|
|
1786
|
+
})();
|
|
1787
|
+
if (obj_photoVersionId_union1_error != null) {
|
|
1788
|
+
obj_photoVersionId_union1 = obj_photoVersionId_union1_error.message;
|
|
1789
|
+
}
|
|
1790
|
+
if (obj_photoVersionId_union0 && obj_photoVersionId_union1) {
|
|
1791
|
+
let message = 'Object doesn\'t match union (at "' + path_photoVersionId + '")';
|
|
1792
|
+
message += '\n' + obj_photoVersionId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1793
|
+
message += '\n' + obj_photoVersionId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1794
|
+
return new TypeError(message);
|
|
1795
|
+
}
|
|
1796
|
+
const obj_smallPhotoUrl = obj.smallPhotoUrl;
|
|
1797
|
+
const path_smallPhotoUrl = path + '.smallPhotoUrl';
|
|
1798
|
+
if (typeof obj_smallPhotoUrl !== 'string') {
|
|
1799
|
+
return new TypeError('Expected "string" but received "' + typeof obj_smallPhotoUrl + '" (at "' + path_smallPhotoUrl + '")');
|
|
1800
|
+
}
|
|
1801
|
+
const obj_standardEmailPhotoUrl = obj.standardEmailPhotoUrl;
|
|
1802
|
+
const path_standardEmailPhotoUrl = path + '.standardEmailPhotoUrl';
|
|
1803
|
+
if (typeof obj_standardEmailPhotoUrl !== 'string') {
|
|
1804
|
+
return new TypeError('Expected "string" but received "' + typeof obj_standardEmailPhotoUrl + '" (at "' + path_standardEmailPhotoUrl + '")');
|
|
1805
|
+
}
|
|
1806
|
+
const obj_url = obj.url;
|
|
1807
|
+
const path_url = path + '.url';
|
|
1808
|
+
if (typeof obj_url !== 'string') {
|
|
1809
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1810
|
+
}
|
|
1811
|
+
})();
|
|
1812
|
+
return v_error === undefined ? null : v_error;
|
|
1813
|
+
}
|
|
1814
|
+
const select$8 = function PhotoRepresentationSelect() {
|
|
1815
|
+
return {
|
|
1816
|
+
kind: 'Fragment',
|
|
1817
|
+
version: VERSION$7,
|
|
1818
|
+
private: [],
|
|
1819
|
+
selections: [
|
|
1820
|
+
{
|
|
1821
|
+
name: 'fullEmailPhotoUrl',
|
|
1822
|
+
kind: 'Scalar'
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
name: 'largePhotoUrl',
|
|
1826
|
+
kind: 'Scalar'
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
name: 'mediumPhotoUrl',
|
|
1830
|
+
kind: 'Scalar'
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
name: 'photoVersionId',
|
|
1834
|
+
kind: 'Scalar'
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
name: 'smallPhotoUrl',
|
|
1838
|
+
kind: 'Scalar'
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
name: 'standardEmailPhotoUrl',
|
|
1842
|
+
kind: 'Scalar'
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
name: 'url',
|
|
1846
|
+
kind: 'Scalar'
|
|
1847
|
+
}
|
|
1848
|
+
]
|
|
1849
|
+
};
|
|
1850
|
+
};
|
|
1851
|
+
function equals$7(existing, incoming) {
|
|
1852
|
+
const existing_fullEmailPhotoUrl = existing.fullEmailPhotoUrl;
|
|
1853
|
+
const incoming_fullEmailPhotoUrl = incoming.fullEmailPhotoUrl;
|
|
1854
|
+
if (!(existing_fullEmailPhotoUrl === incoming_fullEmailPhotoUrl)) {
|
|
1855
|
+
return false;
|
|
1856
|
+
}
|
|
1857
|
+
const existing_largePhotoUrl = existing.largePhotoUrl;
|
|
1858
|
+
const incoming_largePhotoUrl = incoming.largePhotoUrl;
|
|
1859
|
+
if (!(existing_largePhotoUrl === incoming_largePhotoUrl)) {
|
|
1860
|
+
return false;
|
|
1861
|
+
}
|
|
1862
|
+
const existing_mediumPhotoUrl = existing.mediumPhotoUrl;
|
|
1863
|
+
const incoming_mediumPhotoUrl = incoming.mediumPhotoUrl;
|
|
1864
|
+
if (!(existing_mediumPhotoUrl === incoming_mediumPhotoUrl)) {
|
|
1865
|
+
return false;
|
|
1866
|
+
}
|
|
1867
|
+
const existing_smallPhotoUrl = existing.smallPhotoUrl;
|
|
1868
|
+
const incoming_smallPhotoUrl = incoming.smallPhotoUrl;
|
|
1869
|
+
if (!(existing_smallPhotoUrl === incoming_smallPhotoUrl)) {
|
|
1870
|
+
return false;
|
|
1871
|
+
}
|
|
1872
|
+
const existing_standardEmailPhotoUrl = existing.standardEmailPhotoUrl;
|
|
1873
|
+
const incoming_standardEmailPhotoUrl = incoming.standardEmailPhotoUrl;
|
|
1874
|
+
if (!(existing_standardEmailPhotoUrl === incoming_standardEmailPhotoUrl)) {
|
|
1875
|
+
return false;
|
|
1876
|
+
}
|
|
1877
|
+
const existing_url = existing.url;
|
|
1878
|
+
const incoming_url = incoming.url;
|
|
1879
|
+
if (!(existing_url === incoming_url)) {
|
|
1880
|
+
return false;
|
|
1881
|
+
}
|
|
1882
|
+
const existing_photoVersionId = existing.photoVersionId;
|
|
1883
|
+
const incoming_photoVersionId = incoming.photoVersionId;
|
|
1884
|
+
if (!(existing_photoVersionId === incoming_photoVersionId)) {
|
|
1885
|
+
return false;
|
|
1886
|
+
}
|
|
1887
|
+
return true;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
const VERSION$6 = "b95277d84efb4e17fd50b8682527adaf";
|
|
1891
|
+
function validate$6(obj, path = 'ReputationLevelRepresentation') {
|
|
1892
|
+
const v_error = (() => {
|
|
1893
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1894
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1895
|
+
}
|
|
1896
|
+
const obj_levelImageUrl = obj.levelImageUrl;
|
|
1897
|
+
const path_levelImageUrl = path + '.levelImageUrl';
|
|
1898
|
+
if (typeof obj_levelImageUrl !== 'string') {
|
|
1899
|
+
return new TypeError('Expected "string" but received "' + typeof obj_levelImageUrl + '" (at "' + path_levelImageUrl + '")');
|
|
1900
|
+
}
|
|
1901
|
+
const obj_levelName = obj.levelName;
|
|
1902
|
+
const path_levelName = path + '.levelName';
|
|
1903
|
+
if (typeof obj_levelName !== 'string') {
|
|
1904
|
+
return new TypeError('Expected "string" but received "' + typeof obj_levelName + '" (at "' + path_levelName + '")');
|
|
1905
|
+
}
|
|
1906
|
+
const obj_levelNumber = obj.levelNumber;
|
|
1907
|
+
const path_levelNumber = path + '.levelNumber';
|
|
1908
|
+
if (typeof obj_levelNumber !== 'number' || (typeof obj_levelNumber === 'number' && Math.floor(obj_levelNumber) !== obj_levelNumber)) {
|
|
1909
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_levelNumber + '" (at "' + path_levelNumber + '")');
|
|
1910
|
+
}
|
|
1911
|
+
})();
|
|
1912
|
+
return v_error === undefined ? null : v_error;
|
|
1913
|
+
}
|
|
1914
|
+
const select$7 = function ReputationLevelRepresentationSelect() {
|
|
1915
|
+
return {
|
|
1916
|
+
kind: 'Fragment',
|
|
1917
|
+
version: VERSION$6,
|
|
1918
|
+
private: [],
|
|
1919
|
+
selections: [
|
|
1920
|
+
{
|
|
1921
|
+
name: 'levelImageUrl',
|
|
1922
|
+
kind: 'Scalar'
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
name: 'levelName',
|
|
1926
|
+
kind: 'Scalar'
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
name: 'levelNumber',
|
|
1930
|
+
kind: 'Scalar'
|
|
1931
|
+
}
|
|
1932
|
+
]
|
|
1933
|
+
};
|
|
1934
|
+
};
|
|
1935
|
+
function equals$6(existing, incoming) {
|
|
1936
|
+
const existing_levelNumber = existing.levelNumber;
|
|
1937
|
+
const incoming_levelNumber = incoming.levelNumber;
|
|
1938
|
+
if (!(existing_levelNumber === incoming_levelNumber)) {
|
|
1939
|
+
return false;
|
|
1940
|
+
}
|
|
1941
|
+
const existing_levelImageUrl = existing.levelImageUrl;
|
|
1942
|
+
const incoming_levelImageUrl = incoming.levelImageUrl;
|
|
1943
|
+
if (!(existing_levelImageUrl === incoming_levelImageUrl)) {
|
|
1944
|
+
return false;
|
|
1945
|
+
}
|
|
1946
|
+
const existing_levelName = existing.levelName;
|
|
1947
|
+
const incoming_levelName = incoming.levelName;
|
|
1948
|
+
if (!(existing_levelName === incoming_levelName)) {
|
|
1949
|
+
return false;
|
|
1950
|
+
}
|
|
1951
|
+
return true;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
const VERSION$5 = "f176d65dfc0ee669db9c0f1a1d25d53b";
|
|
1955
|
+
function validate$5(obj, path = 'ReputationRepresentation') {
|
|
1956
|
+
const v_error = (() => {
|
|
1957
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1958
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1959
|
+
}
|
|
1960
|
+
const obj_reputationLevel = obj.reputationLevel;
|
|
1961
|
+
const path_reputationLevel = path + '.reputationLevel';
|
|
1962
|
+
const referencepath_reputationLevelValidationError = validate$6(obj_reputationLevel, path_reputationLevel);
|
|
1963
|
+
if (referencepath_reputationLevelValidationError !== null) {
|
|
1964
|
+
let message = 'Object doesn\'t match ReputationLevelRepresentation (at "' + path_reputationLevel + '")\n';
|
|
1965
|
+
message += referencepath_reputationLevelValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1966
|
+
return new TypeError(message);
|
|
1967
|
+
}
|
|
1968
|
+
obj.reputationPoints;
|
|
1969
|
+
const obj_url = obj.url;
|
|
1970
|
+
const path_url = path + '.url';
|
|
1971
|
+
if (typeof obj_url !== 'string') {
|
|
1972
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1973
|
+
}
|
|
1974
|
+
})();
|
|
1975
|
+
return v_error === undefined ? null : v_error;
|
|
1976
|
+
}
|
|
1977
|
+
const select$6 = function ReputationRepresentationSelect() {
|
|
1978
|
+
const { selections: ReputationLevelRepresentation__selections, opaque: ReputationLevelRepresentation__opaque, } = select$7();
|
|
1979
|
+
return {
|
|
1980
|
+
kind: 'Fragment',
|
|
1981
|
+
version: VERSION$5,
|
|
1982
|
+
private: [],
|
|
1983
|
+
selections: [
|
|
1984
|
+
{
|
|
1985
|
+
name: 'reputationLevel',
|
|
1986
|
+
kind: 'Object',
|
|
1987
|
+
selections: ReputationLevelRepresentation__selections
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
name: 'reputationPoints',
|
|
1991
|
+
kind: 'Scalar'
|
|
1992
|
+
},
|
|
1993
|
+
{
|
|
1994
|
+
name: 'url',
|
|
1995
|
+
kind: 'Scalar'
|
|
1996
|
+
}
|
|
1997
|
+
]
|
|
1998
|
+
};
|
|
1999
|
+
};
|
|
2000
|
+
function equals$5(existing, incoming) {
|
|
2001
|
+
const existing_url = existing.url;
|
|
2002
|
+
const incoming_url = incoming.url;
|
|
2003
|
+
if (!(existing_url === incoming_url)) {
|
|
2004
|
+
return false;
|
|
2005
|
+
}
|
|
2006
|
+
const existing_reputationPoints = existing.reputationPoints;
|
|
2007
|
+
const incoming_reputationPoints = incoming.reputationPoints;
|
|
2008
|
+
if (!(existing_reputationPoints === incoming_reputationPoints)) {
|
|
2009
|
+
return false;
|
|
2010
|
+
}
|
|
2011
|
+
const existing_reputationLevel = existing.reputationLevel;
|
|
2012
|
+
const incoming_reputationLevel = incoming.reputationLevel;
|
|
2013
|
+
if (!(equals$6(existing_reputationLevel, incoming_reputationLevel))) {
|
|
2014
|
+
return false;
|
|
2015
|
+
}
|
|
2016
|
+
return true;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
const VERSION$4 = "a902c1345fece0b23591fc79dea8e8b0";
|
|
2020
|
+
function validate$4(obj, path = 'UserSummaryRepresentation') {
|
|
2021
|
+
const v_error = (() => {
|
|
2022
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2023
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2024
|
+
}
|
|
2025
|
+
const obj_additionalLabel = obj.additionalLabel;
|
|
2026
|
+
const path_additionalLabel = path + '.additionalLabel';
|
|
2027
|
+
let obj_additionalLabel_union0 = null;
|
|
2028
|
+
const obj_additionalLabel_union0_error = (() => {
|
|
2029
|
+
if (typeof obj_additionalLabel !== 'string') {
|
|
2030
|
+
return new TypeError('Expected "string" but received "' + typeof obj_additionalLabel + '" (at "' + path_additionalLabel + '")');
|
|
2031
|
+
}
|
|
2032
|
+
})();
|
|
2033
|
+
if (obj_additionalLabel_union0_error != null) {
|
|
2034
|
+
obj_additionalLabel_union0 = obj_additionalLabel_union0_error.message;
|
|
2035
|
+
}
|
|
2036
|
+
let obj_additionalLabel_union1 = null;
|
|
2037
|
+
const obj_additionalLabel_union1_error = (() => {
|
|
2038
|
+
if (obj_additionalLabel !== null) {
|
|
2039
|
+
return new TypeError('Expected "null" but received "' + typeof obj_additionalLabel + '" (at "' + path_additionalLabel + '")');
|
|
2040
|
+
}
|
|
2041
|
+
})();
|
|
2042
|
+
if (obj_additionalLabel_union1_error != null) {
|
|
2043
|
+
obj_additionalLabel_union1 = obj_additionalLabel_union1_error.message;
|
|
2044
|
+
}
|
|
2045
|
+
if (obj_additionalLabel_union0 && obj_additionalLabel_union1) {
|
|
2046
|
+
let message = 'Object doesn\'t match union (at "' + path_additionalLabel + '")';
|
|
2047
|
+
message += '\n' + obj_additionalLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2048
|
+
message += '\n' + obj_additionalLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2049
|
+
return new TypeError(message);
|
|
2050
|
+
}
|
|
2051
|
+
if (obj.communityNickname !== undefined) {
|
|
2052
|
+
const obj_communityNickname = obj.communityNickname;
|
|
2053
|
+
const path_communityNickname = path + '.communityNickname';
|
|
2054
|
+
if (typeof obj_communityNickname !== 'string') {
|
|
2055
|
+
return new TypeError('Expected "string" but received "' + typeof obj_communityNickname + '" (at "' + path_communityNickname + '")');
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
const obj_companyName = obj.companyName;
|
|
2059
|
+
const path_companyName = path + '.companyName';
|
|
2060
|
+
if (typeof obj_companyName !== 'string') {
|
|
2061
|
+
return new TypeError('Expected "string" but received "' + typeof obj_companyName + '" (at "' + path_companyName + '")');
|
|
2062
|
+
}
|
|
2063
|
+
const obj_displayName = obj.displayName;
|
|
2064
|
+
const path_displayName = path + '.displayName';
|
|
2065
|
+
if (typeof obj_displayName !== 'string') {
|
|
2066
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
|
|
2067
|
+
}
|
|
2068
|
+
const obj_firstName = obj.firstName;
|
|
2069
|
+
const path_firstName = path + '.firstName';
|
|
2070
|
+
if (typeof obj_firstName !== 'string') {
|
|
2071
|
+
return new TypeError('Expected "string" but received "' + typeof obj_firstName + '" (at "' + path_firstName + '")');
|
|
2072
|
+
}
|
|
2073
|
+
const obj_id = obj.id;
|
|
2074
|
+
const path_id = path + '.id';
|
|
2075
|
+
if (typeof obj_id !== 'string') {
|
|
2076
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2077
|
+
}
|
|
2078
|
+
const obj_isActive = obj.isActive;
|
|
2079
|
+
const path_isActive = path + '.isActive';
|
|
2080
|
+
if (typeof obj_isActive !== 'boolean') {
|
|
2081
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
2082
|
+
}
|
|
2083
|
+
const obj_isInThisCommunity = obj.isInThisCommunity;
|
|
2084
|
+
const path_isInThisCommunity = path + '.isInThisCommunity';
|
|
2085
|
+
if (typeof obj_isInThisCommunity !== 'boolean') {
|
|
2086
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isInThisCommunity + '" (at "' + path_isInThisCommunity + '")');
|
|
2087
|
+
}
|
|
2088
|
+
const obj_lastName = obj.lastName;
|
|
2089
|
+
const path_lastName = path + '.lastName';
|
|
2090
|
+
if (typeof obj_lastName !== 'string') {
|
|
2091
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastName + '" (at "' + path_lastName + '")');
|
|
2092
|
+
}
|
|
2093
|
+
const obj_motif = obj.motif;
|
|
2094
|
+
const path_motif = path + '.motif';
|
|
2095
|
+
const referencepath_motifValidationError = validate$9(obj_motif, path_motif);
|
|
2096
|
+
if (referencepath_motifValidationError !== null) {
|
|
2097
|
+
let message = 'Object doesn\'t match MotifRepresentation (at "' + path_motif + '")\n';
|
|
2098
|
+
message += referencepath_motifValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2099
|
+
return new TypeError(message);
|
|
2100
|
+
}
|
|
2101
|
+
const obj_mySubscription = obj.mySubscription;
|
|
2102
|
+
const path_mySubscription = path + '.mySubscription';
|
|
2103
|
+
let obj_mySubscription_union0 = null;
|
|
2104
|
+
const obj_mySubscription_union0_error = (() => {
|
|
2105
|
+
const referencepath_mySubscriptionValidationError = validate$j(obj_mySubscription, path_mySubscription);
|
|
2106
|
+
if (referencepath_mySubscriptionValidationError !== null) {
|
|
2107
|
+
let message = 'Object doesn\'t match ReferenceRepresentation (at "' + path_mySubscription + '")\n';
|
|
2108
|
+
message += referencepath_mySubscriptionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2109
|
+
return new TypeError(message);
|
|
2110
|
+
}
|
|
2111
|
+
})();
|
|
2112
|
+
if (obj_mySubscription_union0_error != null) {
|
|
2113
|
+
obj_mySubscription_union0 = obj_mySubscription_union0_error.message;
|
|
2114
|
+
}
|
|
2115
|
+
let obj_mySubscription_union1 = null;
|
|
2116
|
+
const obj_mySubscription_union1_error = (() => {
|
|
2117
|
+
if (obj_mySubscription !== null) {
|
|
2118
|
+
return new TypeError('Expected "null" but received "' + typeof obj_mySubscription + '" (at "' + path_mySubscription + '")');
|
|
2119
|
+
}
|
|
2120
|
+
})();
|
|
2121
|
+
if (obj_mySubscription_union1_error != null) {
|
|
2122
|
+
obj_mySubscription_union1 = obj_mySubscription_union1_error.message;
|
|
2123
|
+
}
|
|
2124
|
+
if (obj_mySubscription_union0 && obj_mySubscription_union1) {
|
|
2125
|
+
let message = 'Object doesn\'t match union (at "' + path_mySubscription + '")';
|
|
2126
|
+
message += '\n' + obj_mySubscription_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2127
|
+
message += '\n' + obj_mySubscription_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2128
|
+
return new TypeError(message);
|
|
2129
|
+
}
|
|
2130
|
+
const obj_name = obj.name;
|
|
2131
|
+
const path_name = path + '.name';
|
|
2132
|
+
if (typeof obj_name !== 'string') {
|
|
2133
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2134
|
+
}
|
|
2135
|
+
const obj_outOfOffice = obj.outOfOffice;
|
|
2136
|
+
const path_outOfOffice = path + '.outOfOffice';
|
|
2137
|
+
const referencepath_outOfOfficeValidationError = validate$8(obj_outOfOffice, path_outOfOffice);
|
|
2138
|
+
if (referencepath_outOfOfficeValidationError !== null) {
|
|
2139
|
+
let message = 'Object doesn\'t match OutOfOfficeRepresentation (at "' + path_outOfOffice + '")\n';
|
|
2140
|
+
message += referencepath_outOfOfficeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2141
|
+
return new TypeError(message);
|
|
2142
|
+
}
|
|
2143
|
+
const obj_photo = obj.photo;
|
|
2144
|
+
const path_photo = path + '.photo';
|
|
2145
|
+
const referencepath_photoValidationError = validate$7(obj_photo, path_photo);
|
|
2146
|
+
if (referencepath_photoValidationError !== null) {
|
|
2147
|
+
let message = 'Object doesn\'t match PhotoRepresentation (at "' + path_photo + '")\n';
|
|
2148
|
+
message += referencepath_photoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2149
|
+
return new TypeError(message);
|
|
2150
|
+
}
|
|
2151
|
+
const obj_reputation = obj.reputation;
|
|
2152
|
+
const path_reputation = path + '.reputation';
|
|
2153
|
+
let obj_reputation_union0 = null;
|
|
2154
|
+
const obj_reputation_union0_error = (() => {
|
|
2155
|
+
const referencepath_reputationValidationError = validate$5(obj_reputation, path_reputation);
|
|
2156
|
+
if (referencepath_reputationValidationError !== null) {
|
|
2157
|
+
let message = 'Object doesn\'t match ReputationRepresentation (at "' + path_reputation + '")\n';
|
|
2158
|
+
message += referencepath_reputationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2159
|
+
return new TypeError(message);
|
|
2160
|
+
}
|
|
2161
|
+
})();
|
|
2162
|
+
if (obj_reputation_union0_error != null) {
|
|
2163
|
+
obj_reputation_union0 = obj_reputation_union0_error.message;
|
|
2164
|
+
}
|
|
2165
|
+
let obj_reputation_union1 = null;
|
|
2166
|
+
const obj_reputation_union1_error = (() => {
|
|
2167
|
+
if (obj_reputation !== null) {
|
|
2168
|
+
return new TypeError('Expected "null" but received "' + typeof obj_reputation + '" (at "' + path_reputation + '")');
|
|
2169
|
+
}
|
|
2170
|
+
})();
|
|
2171
|
+
if (obj_reputation_union1_error != null) {
|
|
2172
|
+
obj_reputation_union1 = obj_reputation_union1_error.message;
|
|
2173
|
+
}
|
|
2174
|
+
if (obj_reputation_union0 && obj_reputation_union1) {
|
|
2175
|
+
let message = 'Object doesn\'t match union (at "' + path_reputation + '")';
|
|
2176
|
+
message += '\n' + obj_reputation_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2177
|
+
message += '\n' + obj_reputation_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2178
|
+
return new TypeError(message);
|
|
2179
|
+
}
|
|
2180
|
+
const obj_title = obj.title;
|
|
2181
|
+
const path_title = path + '.title';
|
|
2182
|
+
let obj_title_union0 = null;
|
|
2183
|
+
const obj_title_union0_error = (() => {
|
|
2184
|
+
if (typeof obj_title !== 'string') {
|
|
2185
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
2186
|
+
}
|
|
2187
|
+
})();
|
|
2188
|
+
if (obj_title_union0_error != null) {
|
|
2189
|
+
obj_title_union0 = obj_title_union0_error.message;
|
|
2190
|
+
}
|
|
2191
|
+
let obj_title_union1 = null;
|
|
2192
|
+
const obj_title_union1_error = (() => {
|
|
2193
|
+
if (obj_title !== null) {
|
|
2194
|
+
return new TypeError('Expected "null" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
2195
|
+
}
|
|
2196
|
+
})();
|
|
2197
|
+
if (obj_title_union1_error != null) {
|
|
2198
|
+
obj_title_union1 = obj_title_union1_error.message;
|
|
2199
|
+
}
|
|
2200
|
+
if (obj_title_union0 && obj_title_union1) {
|
|
2201
|
+
let message = 'Object doesn\'t match union (at "' + path_title + '")';
|
|
2202
|
+
message += '\n' + obj_title_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2203
|
+
message += '\n' + obj_title_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2204
|
+
return new TypeError(message);
|
|
2205
|
+
}
|
|
2206
|
+
const obj_type = obj.type;
|
|
2207
|
+
const path_type = path + '.type';
|
|
2208
|
+
let obj_type_union0 = null;
|
|
2209
|
+
const obj_type_union0_error = (() => {
|
|
2210
|
+
if (typeof obj_type !== 'string') {
|
|
2211
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
2212
|
+
}
|
|
2213
|
+
})();
|
|
2214
|
+
if (obj_type_union0_error != null) {
|
|
2215
|
+
obj_type_union0 = obj_type_union0_error.message;
|
|
2216
|
+
}
|
|
2217
|
+
let obj_type_union1 = null;
|
|
2218
|
+
const obj_type_union1_error = (() => {
|
|
2219
|
+
if (obj_type !== null) {
|
|
2220
|
+
return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
2221
|
+
}
|
|
2222
|
+
})();
|
|
2223
|
+
if (obj_type_union1_error != null) {
|
|
2224
|
+
obj_type_union1 = obj_type_union1_error.message;
|
|
2225
|
+
}
|
|
2226
|
+
if (obj_type_union0 && obj_type_union1) {
|
|
2227
|
+
let message = 'Object doesn\'t match union (at "' + path_type + '")';
|
|
2228
|
+
message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2229
|
+
message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2230
|
+
return new TypeError(message);
|
|
2231
|
+
}
|
|
2232
|
+
const obj_url = obj.url;
|
|
2233
|
+
const path_url = path + '.url';
|
|
2234
|
+
if (typeof obj_url !== 'string') {
|
|
2235
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
2236
|
+
}
|
|
2237
|
+
const obj_userType = obj.userType;
|
|
2238
|
+
const path_userType = path + '.userType';
|
|
2239
|
+
if (typeof obj_userType !== 'string') {
|
|
2240
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userType + '" (at "' + path_userType + '")');
|
|
2241
|
+
}
|
|
2242
|
+
})();
|
|
2243
|
+
return v_error === undefined ? null : v_error;
|
|
2244
|
+
}
|
|
2245
|
+
const select$5 = function UserSummaryRepresentationSelect() {
|
|
2246
|
+
const { selections: MotifRepresentation__selections, opaque: MotifRepresentation__opaque, } = select$a();
|
|
2247
|
+
const { selections: ReferenceRepresentation__selections, opaque: ReferenceRepresentation__opaque, } = select$k();
|
|
2248
|
+
const { selections: OutOfOfficeRepresentation__selections, opaque: OutOfOfficeRepresentation__opaque, } = select$9();
|
|
2249
|
+
const { selections: PhotoRepresentation__selections, opaque: PhotoRepresentation__opaque, } = select$8();
|
|
2250
|
+
const { selections: ReputationRepresentation__selections, opaque: ReputationRepresentation__opaque, } = select$6();
|
|
2251
|
+
return {
|
|
2252
|
+
kind: 'Fragment',
|
|
2253
|
+
version: VERSION$4,
|
|
2254
|
+
private: [],
|
|
2255
|
+
selections: [
|
|
2256
|
+
{
|
|
2257
|
+
name: 'additionalLabel',
|
|
2258
|
+
kind: 'Scalar'
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
name: 'communityNickname',
|
|
2262
|
+
kind: 'Scalar',
|
|
2263
|
+
required: false
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
name: 'companyName',
|
|
2267
|
+
kind: 'Scalar'
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
name: 'displayName',
|
|
2271
|
+
kind: 'Scalar'
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
name: 'firstName',
|
|
2275
|
+
kind: 'Scalar'
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
name: 'id',
|
|
2279
|
+
kind: 'Scalar'
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
name: 'isActive',
|
|
2283
|
+
kind: 'Scalar'
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
name: 'isInThisCommunity',
|
|
2287
|
+
kind: 'Scalar'
|
|
2288
|
+
},
|
|
2289
|
+
{
|
|
2290
|
+
name: 'lastName',
|
|
2291
|
+
kind: 'Scalar'
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
name: 'motif',
|
|
2295
|
+
kind: 'Object',
|
|
2296
|
+
selections: MotifRepresentation__selections
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
name: 'mySubscription',
|
|
2300
|
+
kind: 'Object',
|
|
2301
|
+
nullable: true,
|
|
2302
|
+
selections: ReferenceRepresentation__selections
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
name: 'name',
|
|
2306
|
+
kind: 'Scalar'
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
name: 'outOfOffice',
|
|
2310
|
+
kind: 'Object',
|
|
2311
|
+
selections: OutOfOfficeRepresentation__selections
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
name: 'photo',
|
|
2315
|
+
kind: 'Object',
|
|
2316
|
+
selections: PhotoRepresentation__selections
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
name: 'reputation',
|
|
2320
|
+
kind: 'Object',
|
|
2321
|
+
nullable: true,
|
|
2322
|
+
selections: ReputationRepresentation__selections
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
name: 'title',
|
|
2326
|
+
kind: 'Scalar'
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
name: 'type',
|
|
2330
|
+
kind: 'Scalar'
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
name: 'url',
|
|
2334
|
+
kind: 'Scalar'
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
name: 'userType',
|
|
2338
|
+
kind: 'Scalar'
|
|
2339
|
+
}
|
|
2340
|
+
]
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
function equals$4(existing, incoming) {
|
|
2344
|
+
const existing_isActive = existing.isActive;
|
|
2345
|
+
const incoming_isActive = incoming.isActive;
|
|
2346
|
+
if (!(existing_isActive === incoming_isActive)) {
|
|
2347
|
+
return false;
|
|
2348
|
+
}
|
|
2349
|
+
const existing_isInThisCommunity = existing.isInThisCommunity;
|
|
2350
|
+
const incoming_isInThisCommunity = incoming.isInThisCommunity;
|
|
2351
|
+
if (!(existing_isInThisCommunity === incoming_isInThisCommunity)) {
|
|
2352
|
+
return false;
|
|
2353
|
+
}
|
|
2354
|
+
const existing_communityNickname = existing.communityNickname;
|
|
2355
|
+
const incoming_communityNickname = incoming.communityNickname;
|
|
2356
|
+
// if at least one of these optionals is defined
|
|
2357
|
+
if (existing_communityNickname !== undefined || incoming_communityNickname !== undefined) {
|
|
2358
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2359
|
+
// not equal
|
|
2360
|
+
if (existing_communityNickname === undefined || incoming_communityNickname === undefined) {
|
|
2361
|
+
return false;
|
|
2362
|
+
}
|
|
2363
|
+
if (!(existing_communityNickname === incoming_communityNickname)) {
|
|
2364
|
+
return false;
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
const existing_companyName = existing.companyName;
|
|
2368
|
+
const incoming_companyName = incoming.companyName;
|
|
2369
|
+
if (!(existing_companyName === incoming_companyName)) {
|
|
2370
|
+
return false;
|
|
2371
|
+
}
|
|
2372
|
+
const existing_displayName = existing.displayName;
|
|
2373
|
+
const incoming_displayName = incoming.displayName;
|
|
2374
|
+
if (!(existing_displayName === incoming_displayName)) {
|
|
2375
|
+
return false;
|
|
2376
|
+
}
|
|
2377
|
+
const existing_firstName = existing.firstName;
|
|
2378
|
+
const incoming_firstName = incoming.firstName;
|
|
2379
|
+
if (!(existing_firstName === incoming_firstName)) {
|
|
2380
|
+
return false;
|
|
2381
|
+
}
|
|
2382
|
+
const existing_id = existing.id;
|
|
2383
|
+
const incoming_id = incoming.id;
|
|
2384
|
+
if (!(existing_id === incoming_id)) {
|
|
2385
|
+
return false;
|
|
2386
|
+
}
|
|
2387
|
+
const existing_lastName = existing.lastName;
|
|
2388
|
+
const incoming_lastName = incoming.lastName;
|
|
2389
|
+
if (!(existing_lastName === incoming_lastName)) {
|
|
2390
|
+
return false;
|
|
2391
|
+
}
|
|
2392
|
+
const existing_name = existing.name;
|
|
2393
|
+
const incoming_name = incoming.name;
|
|
2394
|
+
if (!(existing_name === incoming_name)) {
|
|
2395
|
+
return false;
|
|
2396
|
+
}
|
|
2397
|
+
const existing_url = existing.url;
|
|
2398
|
+
const incoming_url = incoming.url;
|
|
2399
|
+
if (!(existing_url === incoming_url)) {
|
|
2400
|
+
return false;
|
|
2401
|
+
}
|
|
2402
|
+
const existing_userType = existing.userType;
|
|
2403
|
+
const incoming_userType = incoming.userType;
|
|
2404
|
+
if (!(existing_userType === incoming_userType)) {
|
|
2405
|
+
return false;
|
|
2406
|
+
}
|
|
2407
|
+
const existing_additionalLabel = existing.additionalLabel;
|
|
2408
|
+
const incoming_additionalLabel = incoming.additionalLabel;
|
|
2409
|
+
if (!(existing_additionalLabel === incoming_additionalLabel)) {
|
|
2410
|
+
return false;
|
|
2411
|
+
}
|
|
2412
|
+
const existing_motif = existing.motif;
|
|
2413
|
+
const incoming_motif = incoming.motif;
|
|
2414
|
+
if (!(equals$9(existing_motif, incoming_motif))) {
|
|
2415
|
+
return false;
|
|
2416
|
+
}
|
|
2417
|
+
const existing_mySubscription = existing.mySubscription;
|
|
2418
|
+
const incoming_mySubscription = incoming.mySubscription;
|
|
2419
|
+
if (!(existing_mySubscription === incoming_mySubscription
|
|
2420
|
+
|| (existing_mySubscription != null &&
|
|
2421
|
+
incoming_mySubscription != null &&
|
|
2422
|
+
equals$j(existing_mySubscription, incoming_mySubscription)))) {
|
|
2423
|
+
return false;
|
|
2424
|
+
}
|
|
2425
|
+
const existing_outOfOffice = existing.outOfOffice;
|
|
2426
|
+
const incoming_outOfOffice = incoming.outOfOffice;
|
|
2427
|
+
if (!(equals$8(existing_outOfOffice, incoming_outOfOffice))) {
|
|
2428
|
+
return false;
|
|
2429
|
+
}
|
|
2430
|
+
const existing_photo = existing.photo;
|
|
2431
|
+
const incoming_photo = incoming.photo;
|
|
2432
|
+
if (!(equals$7(existing_photo, incoming_photo))) {
|
|
2433
|
+
return false;
|
|
2434
|
+
}
|
|
2435
|
+
const existing_reputation = existing.reputation;
|
|
2436
|
+
const incoming_reputation = incoming.reputation;
|
|
2437
|
+
if (!(existing_reputation === incoming_reputation
|
|
2438
|
+
|| (existing_reputation != null &&
|
|
2439
|
+
incoming_reputation != null &&
|
|
2440
|
+
equals$5(existing_reputation, incoming_reputation)))) {
|
|
2441
|
+
return false;
|
|
2442
|
+
}
|
|
2443
|
+
const existing_title = existing.title;
|
|
2444
|
+
const incoming_title = incoming.title;
|
|
2445
|
+
if (!(existing_title === incoming_title)) {
|
|
2446
|
+
return false;
|
|
2447
|
+
}
|
|
2448
|
+
const existing_type = existing.type;
|
|
2449
|
+
const incoming_type = incoming.type;
|
|
2450
|
+
if (!(existing_type === incoming_type)) {
|
|
2451
|
+
return false;
|
|
2452
|
+
}
|
|
2453
|
+
return true;
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
const VERSION$3 = "2ec7dbb6937db8bdecf67aaf4acfef8a";
|
|
2457
|
+
function validate$3(obj, path = 'TopicImagesRepresentation') {
|
|
2458
|
+
const v_error = (() => {
|
|
2459
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2460
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2461
|
+
}
|
|
2462
|
+
const obj_coverImageUrl = obj.coverImageUrl;
|
|
2463
|
+
const path_coverImageUrl = path + '.coverImageUrl';
|
|
2464
|
+
if (typeof obj_coverImageUrl !== 'string') {
|
|
2465
|
+
return new TypeError('Expected "string" but received "' + typeof obj_coverImageUrl + '" (at "' + path_coverImageUrl + '")');
|
|
2466
|
+
}
|
|
2467
|
+
const obj_featuredImageUrl = obj.featuredImageUrl;
|
|
2468
|
+
const path_featuredImageUrl = path + '.featuredImageUrl';
|
|
2469
|
+
if (typeof obj_featuredImageUrl !== 'string') {
|
|
2470
|
+
return new TypeError('Expected "string" but received "' + typeof obj_featuredImageUrl + '" (at "' + path_featuredImageUrl + '")');
|
|
2471
|
+
}
|
|
2472
|
+
})();
|
|
2473
|
+
return v_error === undefined ? null : v_error;
|
|
2474
|
+
}
|
|
2475
|
+
const select$4 = function TopicImagesRepresentationSelect() {
|
|
2476
|
+
return {
|
|
2477
|
+
kind: 'Fragment',
|
|
2478
|
+
version: VERSION$3,
|
|
2479
|
+
private: [],
|
|
2480
|
+
selections: [
|
|
2481
|
+
{
|
|
2482
|
+
name: 'coverImageUrl',
|
|
2483
|
+
kind: 'Scalar'
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
name: 'featuredImageUrl',
|
|
2487
|
+
kind: 'Scalar'
|
|
2488
|
+
}
|
|
2489
|
+
]
|
|
2490
|
+
};
|
|
2491
|
+
};
|
|
2492
|
+
function equals$3(existing, incoming) {
|
|
2493
|
+
const existing_coverImageUrl = existing.coverImageUrl;
|
|
2494
|
+
const incoming_coverImageUrl = incoming.coverImageUrl;
|
|
2495
|
+
if (!(existing_coverImageUrl === incoming_coverImageUrl)) {
|
|
2496
|
+
return false;
|
|
2497
|
+
}
|
|
2498
|
+
const existing_featuredImageUrl = existing.featuredImageUrl;
|
|
2499
|
+
const incoming_featuredImageUrl = incoming.featuredImageUrl;
|
|
2500
|
+
if (!(existing_featuredImageUrl === incoming_featuredImageUrl)) {
|
|
2501
|
+
return false;
|
|
2502
|
+
}
|
|
2503
|
+
return true;
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
const VERSION$2 = "626ba3f153e360df401492195cb56f42";
|
|
2507
|
+
function validate$2(obj, path = 'TopicRepresentation') {
|
|
2508
|
+
const v_error = (() => {
|
|
2509
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2510
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2511
|
+
}
|
|
2512
|
+
const obj_createdDate = obj.createdDate;
|
|
2513
|
+
const path_createdDate = path + '.createdDate';
|
|
2514
|
+
if (typeof obj_createdDate !== 'string') {
|
|
2515
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
2516
|
+
}
|
|
2517
|
+
const obj_description = obj.description;
|
|
2518
|
+
const path_description = path + '.description';
|
|
2519
|
+
if (typeof obj_description !== 'string') {
|
|
2520
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2521
|
+
}
|
|
2522
|
+
const obj_id = obj.id;
|
|
2523
|
+
const path_id = path + '.id';
|
|
2524
|
+
if (typeof obj_id !== 'string') {
|
|
2525
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2526
|
+
}
|
|
2527
|
+
const obj_images = obj.images;
|
|
2528
|
+
const path_images = path + '.images';
|
|
2529
|
+
const referencepath_imagesValidationError = validate$3(obj_images, path_images);
|
|
2530
|
+
if (referencepath_imagesValidationError !== null) {
|
|
2531
|
+
let message = 'Object doesn\'t match TopicImagesRepresentation (at "' + path_images + '")\n';
|
|
2532
|
+
message += referencepath_imagesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2533
|
+
return new TypeError(message);
|
|
2534
|
+
}
|
|
2535
|
+
const obj_isBeingDeleted = obj.isBeingDeleted;
|
|
2536
|
+
const path_isBeingDeleted = path + '.isBeingDeleted';
|
|
2537
|
+
if (typeof obj_isBeingDeleted !== 'boolean') {
|
|
2538
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isBeingDeleted + '" (at "' + path_isBeingDeleted + '")');
|
|
2539
|
+
}
|
|
2540
|
+
const obj_name = obj.name;
|
|
2541
|
+
const path_name = path + '.name';
|
|
2542
|
+
if (typeof obj_name !== 'string') {
|
|
2543
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2544
|
+
}
|
|
2545
|
+
const obj_nonLocalizedName = obj.nonLocalizedName;
|
|
2546
|
+
const path_nonLocalizedName = path + '.nonLocalizedName';
|
|
2547
|
+
if (typeof obj_nonLocalizedName !== 'string') {
|
|
2548
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nonLocalizedName + '" (at "' + path_nonLocalizedName + '")');
|
|
2549
|
+
}
|
|
2550
|
+
const obj_talkingAbout = obj.talkingAbout;
|
|
2551
|
+
const path_talkingAbout = path + '.talkingAbout';
|
|
2552
|
+
if (typeof obj_talkingAbout !== 'number' || (typeof obj_talkingAbout === 'number' && Math.floor(obj_talkingAbout) !== obj_talkingAbout)) {
|
|
2553
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_talkingAbout + '" (at "' + path_talkingAbout + '")');
|
|
2554
|
+
}
|
|
2555
|
+
const obj_url = obj.url;
|
|
2556
|
+
const path_url = path + '.url';
|
|
2557
|
+
if (typeof obj_url !== 'string') {
|
|
2558
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
2559
|
+
}
|
|
2560
|
+
})();
|
|
2561
|
+
return v_error === undefined ? null : v_error;
|
|
2562
|
+
}
|
|
2563
|
+
const select$3 = function TopicRepresentationSelect() {
|
|
2564
|
+
const { selections: TopicImagesRepresentation__selections, opaque: TopicImagesRepresentation__opaque, } = select$4();
|
|
2565
|
+
return {
|
|
2566
|
+
kind: 'Fragment',
|
|
2567
|
+
version: VERSION$2,
|
|
2568
|
+
private: [],
|
|
2569
|
+
selections: [
|
|
2570
|
+
{
|
|
2571
|
+
name: 'createdDate',
|
|
2572
|
+
kind: 'Scalar'
|
|
2573
|
+
},
|
|
2574
|
+
{
|
|
2575
|
+
name: 'description',
|
|
2576
|
+
kind: 'Scalar'
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
name: 'id',
|
|
2580
|
+
kind: 'Scalar'
|
|
2581
|
+
},
|
|
2582
|
+
{
|
|
2583
|
+
name: 'images',
|
|
2584
|
+
kind: 'Object',
|
|
2585
|
+
selections: TopicImagesRepresentation__selections
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
name: 'isBeingDeleted',
|
|
2589
|
+
kind: 'Scalar'
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
name: 'name',
|
|
2593
|
+
kind: 'Scalar'
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
name: 'nonLocalizedName',
|
|
2597
|
+
kind: 'Scalar'
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
name: 'talkingAbout',
|
|
2601
|
+
kind: 'Scalar'
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
name: 'url',
|
|
2605
|
+
kind: 'Scalar'
|
|
2606
|
+
}
|
|
2607
|
+
]
|
|
2608
|
+
};
|
|
2609
|
+
};
|
|
2610
|
+
function equals$2(existing, incoming) {
|
|
2611
|
+
const existing_isBeingDeleted = existing.isBeingDeleted;
|
|
2612
|
+
const incoming_isBeingDeleted = incoming.isBeingDeleted;
|
|
2613
|
+
if (!(existing_isBeingDeleted === incoming_isBeingDeleted)) {
|
|
2614
|
+
return false;
|
|
2615
|
+
}
|
|
2616
|
+
const existing_talkingAbout = existing.talkingAbout;
|
|
2617
|
+
const incoming_talkingAbout = incoming.talkingAbout;
|
|
2618
|
+
if (!(existing_talkingAbout === incoming_talkingAbout)) {
|
|
2619
|
+
return false;
|
|
2620
|
+
}
|
|
2621
|
+
const existing_createdDate = existing.createdDate;
|
|
2622
|
+
const incoming_createdDate = incoming.createdDate;
|
|
2623
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
2624
|
+
return false;
|
|
2625
|
+
}
|
|
2626
|
+
const existing_description = existing.description;
|
|
2627
|
+
const incoming_description = incoming.description;
|
|
2628
|
+
if (!(existing_description === incoming_description)) {
|
|
2629
|
+
return false;
|
|
2630
|
+
}
|
|
2631
|
+
const existing_id = existing.id;
|
|
2632
|
+
const incoming_id = incoming.id;
|
|
2633
|
+
if (!(existing_id === incoming_id)) {
|
|
2634
|
+
return false;
|
|
2635
|
+
}
|
|
2636
|
+
const existing_name = existing.name;
|
|
2637
|
+
const incoming_name = incoming.name;
|
|
2638
|
+
if (!(existing_name === incoming_name)) {
|
|
2639
|
+
return false;
|
|
2640
|
+
}
|
|
2641
|
+
const existing_nonLocalizedName = existing.nonLocalizedName;
|
|
2642
|
+
const incoming_nonLocalizedName = incoming.nonLocalizedName;
|
|
2643
|
+
if (!(existing_nonLocalizedName === incoming_nonLocalizedName)) {
|
|
2644
|
+
return false;
|
|
2645
|
+
}
|
|
2646
|
+
const existing_url = existing.url;
|
|
2647
|
+
const incoming_url = incoming.url;
|
|
2648
|
+
if (!(existing_url === incoming_url)) {
|
|
2649
|
+
return false;
|
|
2650
|
+
}
|
|
2651
|
+
const existing_images = existing.images;
|
|
2652
|
+
const incoming_images = incoming.images;
|
|
2653
|
+
if (!(equals$3(existing_images, incoming_images))) {
|
|
2654
|
+
return false;
|
|
2655
|
+
}
|
|
2656
|
+
return true;
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
const VERSION$1 = "c049f45670ae38f19bfc0c1ee3406cb7";
|
|
2660
|
+
function validate$1(obj, path = 'TopicCollectionRepresentation') {
|
|
2661
|
+
const v_error = (() => {
|
|
2662
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2663
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2664
|
+
}
|
|
2665
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
2666
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
2667
|
+
let obj_currentPageUrl_union0 = null;
|
|
2668
|
+
const obj_currentPageUrl_union0_error = (() => {
|
|
2669
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
2670
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
2671
|
+
}
|
|
2672
|
+
})();
|
|
2673
|
+
if (obj_currentPageUrl_union0_error != null) {
|
|
2674
|
+
obj_currentPageUrl_union0 = obj_currentPageUrl_union0_error.message;
|
|
2675
|
+
}
|
|
2676
|
+
let obj_currentPageUrl_union1 = null;
|
|
2677
|
+
const obj_currentPageUrl_union1_error = (() => {
|
|
2678
|
+
if (obj_currentPageUrl !== null) {
|
|
2679
|
+
return new TypeError('Expected "null" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
2680
|
+
}
|
|
2681
|
+
})();
|
|
2682
|
+
if (obj_currentPageUrl_union1_error != null) {
|
|
2683
|
+
obj_currentPageUrl_union1 = obj_currentPageUrl_union1_error.message;
|
|
2684
|
+
}
|
|
2685
|
+
if (obj_currentPageUrl_union0 && obj_currentPageUrl_union1) {
|
|
2686
|
+
let message = 'Object doesn\'t match union (at "' + path_currentPageUrl + '")';
|
|
2687
|
+
message += '\n' + obj_currentPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2688
|
+
message += '\n' + obj_currentPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2689
|
+
return new TypeError(message);
|
|
2690
|
+
}
|
|
2691
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
2692
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
2693
|
+
let obj_nextPageUrl_union0 = null;
|
|
2694
|
+
const obj_nextPageUrl_union0_error = (() => {
|
|
2695
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
2696
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
2697
|
+
}
|
|
2698
|
+
})();
|
|
2699
|
+
if (obj_nextPageUrl_union0_error != null) {
|
|
2700
|
+
obj_nextPageUrl_union0 = obj_nextPageUrl_union0_error.message;
|
|
2701
|
+
}
|
|
2702
|
+
let obj_nextPageUrl_union1 = null;
|
|
2703
|
+
const obj_nextPageUrl_union1_error = (() => {
|
|
2704
|
+
if (obj_nextPageUrl !== null) {
|
|
2705
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
2706
|
+
}
|
|
2707
|
+
})();
|
|
2708
|
+
if (obj_nextPageUrl_union1_error != null) {
|
|
2709
|
+
obj_nextPageUrl_union1 = obj_nextPageUrl_union1_error.message;
|
|
2710
|
+
}
|
|
2711
|
+
if (obj_nextPageUrl_union0 && obj_nextPageUrl_union1) {
|
|
2712
|
+
let message = 'Object doesn\'t match union (at "' + path_nextPageUrl + '")';
|
|
2713
|
+
message += '\n' + obj_nextPageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2714
|
+
message += '\n' + obj_nextPageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2715
|
+
return new TypeError(message);
|
|
2716
|
+
}
|
|
2717
|
+
const obj_topics = obj.topics;
|
|
2718
|
+
const path_topics = path + '.topics';
|
|
2719
|
+
if (!ArrayIsArray(obj_topics)) {
|
|
2720
|
+
return new TypeError('Expected "array" but received "' + typeof obj_topics + '" (at "' + path_topics + '")');
|
|
2721
|
+
}
|
|
2722
|
+
for (let i = 0; i < obj_topics.length; i++) {
|
|
2723
|
+
const obj_topics_item = obj_topics[i];
|
|
2724
|
+
const path_topics_item = path_topics + '[' + i + ']';
|
|
2725
|
+
let obj_topics_item_union0 = null;
|
|
2726
|
+
const obj_topics_item_union0_error = (() => {
|
|
2727
|
+
const referencepath_topics_itemValidationError = validate$2(obj_topics_item, path_topics_item);
|
|
2728
|
+
if (referencepath_topics_itemValidationError !== null) {
|
|
2729
|
+
let message = 'Object doesn\'t match TopicRepresentation (at "' + path_topics_item + '")\n';
|
|
2730
|
+
message += referencepath_topics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2731
|
+
return new TypeError(message);
|
|
2732
|
+
}
|
|
2733
|
+
})();
|
|
2734
|
+
if (obj_topics_item_union0_error != null) {
|
|
2735
|
+
obj_topics_item_union0 = obj_topics_item_union0_error.message;
|
|
2736
|
+
}
|
|
2737
|
+
let obj_topics_item_union1 = null;
|
|
2738
|
+
const obj_topics_item_union1_error = (() => {
|
|
2739
|
+
if (obj_topics_item !== null) {
|
|
2740
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topics_item + '" (at "' + path_topics_item + '")');
|
|
2741
|
+
}
|
|
2742
|
+
})();
|
|
2743
|
+
if (obj_topics_item_union1_error != null) {
|
|
2744
|
+
obj_topics_item_union1 = obj_topics_item_union1_error.message;
|
|
2745
|
+
}
|
|
2746
|
+
if (obj_topics_item_union0 && obj_topics_item_union1) {
|
|
2747
|
+
let message = 'Object doesn\'t match union (at "' + path_topics_item + '")';
|
|
2748
|
+
message += '\n' + obj_topics_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2749
|
+
message += '\n' + obj_topics_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2750
|
+
return new TypeError(message);
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
})();
|
|
2754
|
+
return v_error === undefined ? null : v_error;
|
|
2755
|
+
}
|
|
2756
|
+
const select$2 = function TopicCollectionRepresentationSelect() {
|
|
2757
|
+
const { selections: TopicRepresentation__selections, opaque: TopicRepresentation__opaque, } = select$3();
|
|
2758
|
+
return {
|
|
2759
|
+
kind: 'Fragment',
|
|
2760
|
+
version: VERSION$1,
|
|
2761
|
+
private: [],
|
|
2762
|
+
selections: [
|
|
2763
|
+
{
|
|
2764
|
+
name: 'currentPageUrl',
|
|
2765
|
+
kind: 'Scalar'
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
name: 'nextPageUrl',
|
|
2769
|
+
kind: 'Scalar'
|
|
2770
|
+
},
|
|
2771
|
+
{
|
|
2772
|
+
name: 'topics',
|
|
2773
|
+
kind: 'Object',
|
|
2774
|
+
nullable: true,
|
|
2775
|
+
plural: true,
|
|
2776
|
+
selections: TopicRepresentation__selections
|
|
2777
|
+
}
|
|
2778
|
+
]
|
|
2779
|
+
};
|
|
2780
|
+
};
|
|
2781
|
+
function equals$1(existing, incoming) {
|
|
2782
|
+
const existing_currentPageUrl = existing.currentPageUrl;
|
|
2783
|
+
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
2784
|
+
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
2785
|
+
return false;
|
|
2786
|
+
}
|
|
2787
|
+
const existing_nextPageUrl = existing.nextPageUrl;
|
|
2788
|
+
const incoming_nextPageUrl = incoming.nextPageUrl;
|
|
2789
|
+
if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
|
|
2790
|
+
return false;
|
|
2791
|
+
}
|
|
2792
|
+
const existing_topics = existing.topics;
|
|
2793
|
+
const incoming_topics = incoming.topics;
|
|
2794
|
+
const equals_topics_items = equalsArray(existing_topics, incoming_topics, (existing_topics_item, incoming_topics_item) => {
|
|
2795
|
+
if (!(existing_topics_item === incoming_topics_item
|
|
2796
|
+
|| (existing_topics_item != null &&
|
|
2797
|
+
incoming_topics_item != null &&
|
|
2798
|
+
equals$2(existing_topics_item, incoming_topics_item)))) {
|
|
2799
|
+
return false;
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
if (equals_topics_items === false) {
|
|
2803
|
+
return false;
|
|
2804
|
+
}
|
|
2805
|
+
return true;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
const TTL = 100;
|
|
2809
|
+
const VERSION = "472a1bdc1617b702fa962cd73dd73eee";
|
|
2810
|
+
function validate(obj, path = 'FileDetailRepresentation') {
|
|
2811
|
+
const v_error = (() => {
|
|
2812
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2813
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2814
|
+
}
|
|
2815
|
+
const obj_checksum = obj.checksum;
|
|
2816
|
+
const path_checksum = path + '.checksum';
|
|
2817
|
+
let obj_checksum_union0 = null;
|
|
2818
|
+
const obj_checksum_union0_error = (() => {
|
|
2819
|
+
if (typeof obj_checksum !== 'string') {
|
|
2820
|
+
return new TypeError('Expected "string" but received "' + typeof obj_checksum + '" (at "' + path_checksum + '")');
|
|
2821
|
+
}
|
|
2822
|
+
})();
|
|
2823
|
+
if (obj_checksum_union0_error != null) {
|
|
2824
|
+
obj_checksum_union0 = obj_checksum_union0_error.message;
|
|
2825
|
+
}
|
|
2826
|
+
let obj_checksum_union1 = null;
|
|
2827
|
+
const obj_checksum_union1_error = (() => {
|
|
2828
|
+
if (obj_checksum !== null) {
|
|
2829
|
+
return new TypeError('Expected "null" but received "' + typeof obj_checksum + '" (at "' + path_checksum + '")');
|
|
2830
|
+
}
|
|
2831
|
+
})();
|
|
2832
|
+
if (obj_checksum_union1_error != null) {
|
|
2833
|
+
obj_checksum_union1 = obj_checksum_union1_error.message;
|
|
2834
|
+
}
|
|
2835
|
+
if (obj_checksum_union0 && obj_checksum_union1) {
|
|
2836
|
+
let message = 'Object doesn\'t match union (at "' + path_checksum + '")';
|
|
2837
|
+
message += '\n' + obj_checksum_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2838
|
+
message += '\n' + obj_checksum_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2839
|
+
return new TypeError(message);
|
|
2840
|
+
}
|
|
2841
|
+
const obj_contentHubRepository = obj.contentHubRepository;
|
|
2842
|
+
const path_contentHubRepository = path + '.contentHubRepository';
|
|
2843
|
+
let obj_contentHubRepository_union0 = null;
|
|
2844
|
+
const obj_contentHubRepository_union0_error = (() => {
|
|
2845
|
+
const referencepath_contentHubRepositoryValidationError = validate$h(obj_contentHubRepository, path_contentHubRepository);
|
|
2846
|
+
if (referencepath_contentHubRepositoryValidationError !== null) {
|
|
2847
|
+
let message = 'Object doesn\'t match ContentHubRepositoryRepresentation (at "' + path_contentHubRepository + '")\n';
|
|
2848
|
+
message += referencepath_contentHubRepositoryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2849
|
+
return new TypeError(message);
|
|
2850
|
+
}
|
|
2851
|
+
})();
|
|
2852
|
+
if (obj_contentHubRepository_union0_error != null) {
|
|
2853
|
+
obj_contentHubRepository_union0 = obj_contentHubRepository_union0_error.message;
|
|
2854
|
+
}
|
|
2855
|
+
let obj_contentHubRepository_union1 = null;
|
|
2856
|
+
const obj_contentHubRepository_union1_error = (() => {
|
|
2857
|
+
if (obj_contentHubRepository !== null) {
|
|
2858
|
+
return new TypeError('Expected "null" but received "' + typeof obj_contentHubRepository + '" (at "' + path_contentHubRepository + '")');
|
|
2859
|
+
}
|
|
2860
|
+
})();
|
|
2861
|
+
if (obj_contentHubRepository_union1_error != null) {
|
|
2862
|
+
obj_contentHubRepository_union1 = obj_contentHubRepository_union1_error.message;
|
|
2863
|
+
}
|
|
2864
|
+
if (obj_contentHubRepository_union0 && obj_contentHubRepository_union1) {
|
|
2865
|
+
let message = 'Object doesn\'t match union (at "' + path_contentHubRepository + '")';
|
|
2866
|
+
message += '\n' + obj_contentHubRepository_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2867
|
+
message += '\n' + obj_contentHubRepository_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2868
|
+
return new TypeError(message);
|
|
2869
|
+
}
|
|
2870
|
+
const obj_contentModifiedDate = obj.contentModifiedDate;
|
|
2871
|
+
const path_contentModifiedDate = path + '.contentModifiedDate';
|
|
2872
|
+
let obj_contentModifiedDate_union0 = null;
|
|
2873
|
+
const obj_contentModifiedDate_union0_error = (() => {
|
|
2874
|
+
if (typeof obj_contentModifiedDate !== 'string') {
|
|
2875
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contentModifiedDate + '" (at "' + path_contentModifiedDate + '")');
|
|
2876
|
+
}
|
|
2877
|
+
})();
|
|
2878
|
+
if (obj_contentModifiedDate_union0_error != null) {
|
|
2879
|
+
obj_contentModifiedDate_union0 = obj_contentModifiedDate_union0_error.message;
|
|
2880
|
+
}
|
|
2881
|
+
let obj_contentModifiedDate_union1 = null;
|
|
2882
|
+
const obj_contentModifiedDate_union1_error = (() => {
|
|
2883
|
+
if (obj_contentModifiedDate !== null) {
|
|
2884
|
+
return new TypeError('Expected "null" but received "' + typeof obj_contentModifiedDate + '" (at "' + path_contentModifiedDate + '")');
|
|
2885
|
+
}
|
|
2886
|
+
})();
|
|
2887
|
+
if (obj_contentModifiedDate_union1_error != null) {
|
|
2888
|
+
obj_contentModifiedDate_union1 = obj_contentModifiedDate_union1_error.message;
|
|
2889
|
+
}
|
|
2890
|
+
if (obj_contentModifiedDate_union0 && obj_contentModifiedDate_union1) {
|
|
2891
|
+
let message = 'Object doesn\'t match union (at "' + path_contentModifiedDate + '")';
|
|
2892
|
+
message += '\n' + obj_contentModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2893
|
+
message += '\n' + obj_contentModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2894
|
+
return new TypeError(message);
|
|
2895
|
+
}
|
|
2896
|
+
const obj_contentSize = obj.contentSize;
|
|
2897
|
+
const path_contentSize = path + '.contentSize';
|
|
2898
|
+
let obj_contentSize_union0 = null;
|
|
2899
|
+
const obj_contentSize_union0_error = (() => {
|
|
2900
|
+
if (typeof obj_contentSize !== 'number' || (typeof obj_contentSize === 'number' && Math.floor(obj_contentSize) !== obj_contentSize)) {
|
|
2901
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_contentSize + '" (at "' + path_contentSize + '")');
|
|
2902
|
+
}
|
|
2903
|
+
})();
|
|
2904
|
+
if (obj_contentSize_union0_error != null) {
|
|
2905
|
+
obj_contentSize_union0 = obj_contentSize_union0_error.message;
|
|
2906
|
+
}
|
|
2907
|
+
let obj_contentSize_union1 = null;
|
|
2908
|
+
const obj_contentSize_union1_error = (() => {
|
|
2909
|
+
if (obj_contentSize !== null) {
|
|
2910
|
+
return new TypeError('Expected "null" but received "' + typeof obj_contentSize + '" (at "' + path_contentSize + '")');
|
|
2911
|
+
}
|
|
2912
|
+
})();
|
|
2913
|
+
if (obj_contentSize_union1_error != null) {
|
|
2914
|
+
obj_contentSize_union1 = obj_contentSize_union1_error.message;
|
|
2915
|
+
}
|
|
2916
|
+
if (obj_contentSize_union0 && obj_contentSize_union1) {
|
|
2917
|
+
let message = 'Object doesn\'t match union (at "' + path_contentSize + '")';
|
|
2918
|
+
message += '\n' + obj_contentSize_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2919
|
+
message += '\n' + obj_contentSize_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2920
|
+
return new TypeError(message);
|
|
2921
|
+
}
|
|
2922
|
+
const obj_contentUrl = obj.contentUrl;
|
|
2923
|
+
const path_contentUrl = path + '.contentUrl';
|
|
2924
|
+
let obj_contentUrl_union0 = null;
|
|
2925
|
+
const obj_contentUrl_union0_error = (() => {
|
|
2926
|
+
if (typeof obj_contentUrl !== 'string') {
|
|
2927
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contentUrl + '" (at "' + path_contentUrl + '")');
|
|
2928
|
+
}
|
|
2929
|
+
})();
|
|
2930
|
+
if (obj_contentUrl_union0_error != null) {
|
|
2931
|
+
obj_contentUrl_union0 = obj_contentUrl_union0_error.message;
|
|
2932
|
+
}
|
|
2933
|
+
let obj_contentUrl_union1 = null;
|
|
2934
|
+
const obj_contentUrl_union1_error = (() => {
|
|
2935
|
+
if (obj_contentUrl !== null) {
|
|
2936
|
+
return new TypeError('Expected "null" but received "' + typeof obj_contentUrl + '" (at "' + path_contentUrl + '")');
|
|
2937
|
+
}
|
|
2938
|
+
})();
|
|
2939
|
+
if (obj_contentUrl_union1_error != null) {
|
|
2940
|
+
obj_contentUrl_union1 = obj_contentUrl_union1_error.message;
|
|
2941
|
+
}
|
|
2942
|
+
if (obj_contentUrl_union0 && obj_contentUrl_union1) {
|
|
2943
|
+
let message = 'Object doesn\'t match union (at "' + path_contentUrl + '")';
|
|
2944
|
+
message += '\n' + obj_contentUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2945
|
+
message += '\n' + obj_contentUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2946
|
+
return new TypeError(message);
|
|
2947
|
+
}
|
|
2948
|
+
const obj_contentVersionId = obj.contentVersionId;
|
|
2949
|
+
const path_contentVersionId = path + '.contentVersionId';
|
|
2950
|
+
let obj_contentVersionId_union0 = null;
|
|
2951
|
+
const obj_contentVersionId_union0_error = (() => {
|
|
2952
|
+
if (typeof obj_contentVersionId !== 'string') {
|
|
2953
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contentVersionId + '" (at "' + path_contentVersionId + '")');
|
|
2954
|
+
}
|
|
2955
|
+
})();
|
|
2956
|
+
if (obj_contentVersionId_union0_error != null) {
|
|
2957
|
+
obj_contentVersionId_union0 = obj_contentVersionId_union0_error.message;
|
|
2958
|
+
}
|
|
2959
|
+
let obj_contentVersionId_union1 = null;
|
|
2960
|
+
const obj_contentVersionId_union1_error = (() => {
|
|
2961
|
+
if (obj_contentVersionId !== null) {
|
|
2962
|
+
return new TypeError('Expected "null" but received "' + typeof obj_contentVersionId + '" (at "' + path_contentVersionId + '")');
|
|
2963
|
+
}
|
|
2964
|
+
})();
|
|
2965
|
+
if (obj_contentVersionId_union1_error != null) {
|
|
2966
|
+
obj_contentVersionId_union1 = obj_contentVersionId_union1_error.message;
|
|
2967
|
+
}
|
|
2968
|
+
if (obj_contentVersionId_union0 && obj_contentVersionId_union1) {
|
|
2969
|
+
let message = 'Object doesn\'t match union (at "' + path_contentVersionId + '")';
|
|
2970
|
+
message += '\n' + obj_contentVersionId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2971
|
+
message += '\n' + obj_contentVersionId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2972
|
+
return new TypeError(message);
|
|
2973
|
+
}
|
|
2974
|
+
const obj_createdDate = obj.createdDate;
|
|
2975
|
+
const path_createdDate = path + '.createdDate';
|
|
2976
|
+
let obj_createdDate_union0 = null;
|
|
2977
|
+
const obj_createdDate_union0_error = (() => {
|
|
2978
|
+
if (typeof obj_createdDate !== 'string') {
|
|
2979
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
2980
|
+
}
|
|
2981
|
+
})();
|
|
2982
|
+
if (obj_createdDate_union0_error != null) {
|
|
2983
|
+
obj_createdDate_union0 = obj_createdDate_union0_error.message;
|
|
2984
|
+
}
|
|
2985
|
+
let obj_createdDate_union1 = null;
|
|
2986
|
+
const obj_createdDate_union1_error = (() => {
|
|
2987
|
+
if (obj_createdDate !== null) {
|
|
2988
|
+
return new TypeError('Expected "null" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
2989
|
+
}
|
|
2990
|
+
})();
|
|
2991
|
+
if (obj_createdDate_union1_error != null) {
|
|
2992
|
+
obj_createdDate_union1 = obj_createdDate_union1_error.message;
|
|
2993
|
+
}
|
|
2994
|
+
if (obj_createdDate_union0 && obj_createdDate_union1) {
|
|
2995
|
+
let message = 'Object doesn\'t match union (at "' + path_createdDate + '")';
|
|
2996
|
+
message += '\n' + obj_createdDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2997
|
+
message += '\n' + obj_createdDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2998
|
+
return new TypeError(message);
|
|
2999
|
+
}
|
|
3000
|
+
const obj_description = obj.description;
|
|
3001
|
+
const path_description = path + '.description';
|
|
3002
|
+
let obj_description_union0 = null;
|
|
3003
|
+
const obj_description_union0_error = (() => {
|
|
3004
|
+
if (typeof obj_description !== 'string') {
|
|
3005
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3006
|
+
}
|
|
3007
|
+
})();
|
|
3008
|
+
if (obj_description_union0_error != null) {
|
|
3009
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
3010
|
+
}
|
|
3011
|
+
let obj_description_union1 = null;
|
|
3012
|
+
const obj_description_union1_error = (() => {
|
|
3013
|
+
if (obj_description !== null) {
|
|
3014
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3015
|
+
}
|
|
3016
|
+
})();
|
|
3017
|
+
if (obj_description_union1_error != null) {
|
|
3018
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
3019
|
+
}
|
|
3020
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
3021
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
3022
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3023
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3024
|
+
return new TypeError(message);
|
|
3025
|
+
}
|
|
3026
|
+
const obj_downloadUrl = obj.downloadUrl;
|
|
3027
|
+
const path_downloadUrl = path + '.downloadUrl';
|
|
3028
|
+
let obj_downloadUrl_union0 = null;
|
|
3029
|
+
const obj_downloadUrl_union0_error = (() => {
|
|
3030
|
+
if (typeof obj_downloadUrl !== 'string') {
|
|
3031
|
+
return new TypeError('Expected "string" but received "' + typeof obj_downloadUrl + '" (at "' + path_downloadUrl + '")');
|
|
3032
|
+
}
|
|
3033
|
+
})();
|
|
3034
|
+
if (obj_downloadUrl_union0_error != null) {
|
|
3035
|
+
obj_downloadUrl_union0 = obj_downloadUrl_union0_error.message;
|
|
3036
|
+
}
|
|
3037
|
+
let obj_downloadUrl_union1 = null;
|
|
3038
|
+
const obj_downloadUrl_union1_error = (() => {
|
|
3039
|
+
if (obj_downloadUrl !== null) {
|
|
3040
|
+
return new TypeError('Expected "null" but received "' + typeof obj_downloadUrl + '" (at "' + path_downloadUrl + '")');
|
|
3041
|
+
}
|
|
3042
|
+
})();
|
|
3043
|
+
if (obj_downloadUrl_union1_error != null) {
|
|
3044
|
+
obj_downloadUrl_union1 = obj_downloadUrl_union1_error.message;
|
|
3045
|
+
}
|
|
3046
|
+
if (obj_downloadUrl_union0 && obj_downloadUrl_union1) {
|
|
3047
|
+
let message = 'Object doesn\'t match union (at "' + path_downloadUrl + '")';
|
|
3048
|
+
message += '\n' + obj_downloadUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3049
|
+
message += '\n' + obj_downloadUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3050
|
+
return new TypeError(message);
|
|
3051
|
+
}
|
|
3052
|
+
const obj_externalDocumentUrl = obj.externalDocumentUrl;
|
|
3053
|
+
const path_externalDocumentUrl = path + '.externalDocumentUrl';
|
|
3054
|
+
let obj_externalDocumentUrl_union0 = null;
|
|
3055
|
+
const obj_externalDocumentUrl_union0_error = (() => {
|
|
3056
|
+
if (typeof obj_externalDocumentUrl !== 'string') {
|
|
3057
|
+
return new TypeError('Expected "string" but received "' + typeof obj_externalDocumentUrl + '" (at "' + path_externalDocumentUrl + '")');
|
|
3058
|
+
}
|
|
3059
|
+
})();
|
|
3060
|
+
if (obj_externalDocumentUrl_union0_error != null) {
|
|
3061
|
+
obj_externalDocumentUrl_union0 = obj_externalDocumentUrl_union0_error.message;
|
|
3062
|
+
}
|
|
3063
|
+
let obj_externalDocumentUrl_union1 = null;
|
|
3064
|
+
const obj_externalDocumentUrl_union1_error = (() => {
|
|
3065
|
+
if (obj_externalDocumentUrl !== null) {
|
|
3066
|
+
return new TypeError('Expected "null" but received "' + typeof obj_externalDocumentUrl + '" (at "' + path_externalDocumentUrl + '")');
|
|
3067
|
+
}
|
|
3068
|
+
})();
|
|
3069
|
+
if (obj_externalDocumentUrl_union1_error != null) {
|
|
3070
|
+
obj_externalDocumentUrl_union1 = obj_externalDocumentUrl_union1_error.message;
|
|
3071
|
+
}
|
|
3072
|
+
if (obj_externalDocumentUrl_union0 && obj_externalDocumentUrl_union1) {
|
|
3073
|
+
let message = 'Object doesn\'t match union (at "' + path_externalDocumentUrl + '")';
|
|
3074
|
+
message += '\n' + obj_externalDocumentUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3075
|
+
message += '\n' + obj_externalDocumentUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3076
|
+
return new TypeError(message);
|
|
3077
|
+
}
|
|
3078
|
+
const obj_externalFilePermissionInformation = obj.externalFilePermissionInformation;
|
|
3079
|
+
const path_externalFilePermissionInformation = path + '.externalFilePermissionInformation';
|
|
3080
|
+
let obj_externalFilePermissionInformation_union0 = null;
|
|
3081
|
+
const obj_externalFilePermissionInformation_union0_error = (() => {
|
|
3082
|
+
const referencepath_externalFilePermissionInformationValidationError = validate$e(obj_externalFilePermissionInformation, path_externalFilePermissionInformation);
|
|
3083
|
+
if (referencepath_externalFilePermissionInformationValidationError !== null) {
|
|
3084
|
+
let message = 'Object doesn\'t match ExternalFilePermissionInformationRepresentation (at "' + path_externalFilePermissionInformation + '")\n';
|
|
3085
|
+
message += referencepath_externalFilePermissionInformationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3086
|
+
return new TypeError(message);
|
|
3087
|
+
}
|
|
3088
|
+
})();
|
|
3089
|
+
if (obj_externalFilePermissionInformation_union0_error != null) {
|
|
3090
|
+
obj_externalFilePermissionInformation_union0 = obj_externalFilePermissionInformation_union0_error.message;
|
|
3091
|
+
}
|
|
3092
|
+
let obj_externalFilePermissionInformation_union1 = null;
|
|
3093
|
+
const obj_externalFilePermissionInformation_union1_error = (() => {
|
|
3094
|
+
if (obj_externalFilePermissionInformation !== null) {
|
|
3095
|
+
return new TypeError('Expected "null" but received "' + typeof obj_externalFilePermissionInformation + '" (at "' + path_externalFilePermissionInformation + '")');
|
|
3096
|
+
}
|
|
3097
|
+
})();
|
|
3098
|
+
if (obj_externalFilePermissionInformation_union1_error != null) {
|
|
3099
|
+
obj_externalFilePermissionInformation_union1 = obj_externalFilePermissionInformation_union1_error.message;
|
|
3100
|
+
}
|
|
3101
|
+
if (obj_externalFilePermissionInformation_union0 && obj_externalFilePermissionInformation_union1) {
|
|
3102
|
+
let message = 'Object doesn\'t match union (at "' + path_externalFilePermissionInformation + '")';
|
|
3103
|
+
message += '\n' + obj_externalFilePermissionInformation_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3104
|
+
message += '\n' + obj_externalFilePermissionInformation_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3105
|
+
return new TypeError(message);
|
|
3106
|
+
}
|
|
3107
|
+
const obj_fileAsset = obj.fileAsset;
|
|
3108
|
+
const path_fileAsset = path + '.fileAsset';
|
|
3109
|
+
let obj_fileAsset_union0 = null;
|
|
3110
|
+
const obj_fileAsset_union0_error = (() => {
|
|
3111
|
+
const referencepath_fileAssetValidationError = validate$d(obj_fileAsset, path_fileAsset);
|
|
3112
|
+
if (referencepath_fileAssetValidationError !== null) {
|
|
3113
|
+
let message = 'Object doesn\'t match FileAssetRepresentation (at "' + path_fileAsset + '")\n';
|
|
3114
|
+
message += referencepath_fileAssetValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3115
|
+
return new TypeError(message);
|
|
3116
|
+
}
|
|
3117
|
+
})();
|
|
3118
|
+
if (obj_fileAsset_union0_error != null) {
|
|
3119
|
+
obj_fileAsset_union0 = obj_fileAsset_union0_error.message;
|
|
3120
|
+
}
|
|
3121
|
+
let obj_fileAsset_union1 = null;
|
|
3122
|
+
const obj_fileAsset_union1_error = (() => {
|
|
3123
|
+
if (obj_fileAsset !== null) {
|
|
3124
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fileAsset + '" (at "' + path_fileAsset + '")');
|
|
3125
|
+
}
|
|
3126
|
+
})();
|
|
3127
|
+
if (obj_fileAsset_union1_error != null) {
|
|
3128
|
+
obj_fileAsset_union1 = obj_fileAsset_union1_error.message;
|
|
3129
|
+
}
|
|
3130
|
+
if (obj_fileAsset_union0 && obj_fileAsset_union1) {
|
|
3131
|
+
let message = 'Object doesn\'t match union (at "' + path_fileAsset + '")';
|
|
3132
|
+
message += '\n' + obj_fileAsset_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3133
|
+
message += '\n' + obj_fileAsset_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3134
|
+
return new TypeError(message);
|
|
3135
|
+
}
|
|
3136
|
+
const obj_fileExtension = obj.fileExtension;
|
|
3137
|
+
const path_fileExtension = path + '.fileExtension';
|
|
3138
|
+
let obj_fileExtension_union0 = null;
|
|
3139
|
+
const obj_fileExtension_union0_error = (() => {
|
|
3140
|
+
if (typeof obj_fileExtension !== 'string') {
|
|
3141
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fileExtension + '" (at "' + path_fileExtension + '")');
|
|
3142
|
+
}
|
|
3143
|
+
})();
|
|
3144
|
+
if (obj_fileExtension_union0_error != null) {
|
|
3145
|
+
obj_fileExtension_union0 = obj_fileExtension_union0_error.message;
|
|
3146
|
+
}
|
|
3147
|
+
let obj_fileExtension_union1 = null;
|
|
3148
|
+
const obj_fileExtension_union1_error = (() => {
|
|
3149
|
+
if (obj_fileExtension !== null) {
|
|
3150
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fileExtension + '" (at "' + path_fileExtension + '")');
|
|
3151
|
+
}
|
|
3152
|
+
})();
|
|
3153
|
+
if (obj_fileExtension_union1_error != null) {
|
|
3154
|
+
obj_fileExtension_union1 = obj_fileExtension_union1_error.message;
|
|
3155
|
+
}
|
|
3156
|
+
if (obj_fileExtension_union0 && obj_fileExtension_union1) {
|
|
3157
|
+
let message = 'Object doesn\'t match union (at "' + path_fileExtension + '")';
|
|
3158
|
+
message += '\n' + obj_fileExtension_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3159
|
+
message += '\n' + obj_fileExtension_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3160
|
+
return new TypeError(message);
|
|
3161
|
+
}
|
|
3162
|
+
const obj_fileType = obj.fileType;
|
|
3163
|
+
const path_fileType = path + '.fileType';
|
|
3164
|
+
let obj_fileType_union0 = null;
|
|
3165
|
+
const obj_fileType_union0_error = (() => {
|
|
3166
|
+
if (typeof obj_fileType !== 'string') {
|
|
3167
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fileType + '" (at "' + path_fileType + '")');
|
|
3168
|
+
}
|
|
3169
|
+
})();
|
|
3170
|
+
if (obj_fileType_union0_error != null) {
|
|
3171
|
+
obj_fileType_union0 = obj_fileType_union0_error.message;
|
|
3172
|
+
}
|
|
3173
|
+
let obj_fileType_union1 = null;
|
|
3174
|
+
const obj_fileType_union1_error = (() => {
|
|
3175
|
+
if (obj_fileType !== null) {
|
|
3176
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fileType + '" (at "' + path_fileType + '")');
|
|
3177
|
+
}
|
|
3178
|
+
})();
|
|
3179
|
+
if (obj_fileType_union1_error != null) {
|
|
3180
|
+
obj_fileType_union1 = obj_fileType_union1_error.message;
|
|
3181
|
+
}
|
|
3182
|
+
if (obj_fileType_union0 && obj_fileType_union1) {
|
|
3183
|
+
let message = 'Object doesn\'t match union (at "' + path_fileType + '")';
|
|
3184
|
+
message += '\n' + obj_fileType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3185
|
+
message += '\n' + obj_fileType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3186
|
+
return new TypeError(message);
|
|
3187
|
+
}
|
|
3188
|
+
const obj_flashRenditionStatus = obj.flashRenditionStatus;
|
|
3189
|
+
const path_flashRenditionStatus = path + '.flashRenditionStatus';
|
|
3190
|
+
let obj_flashRenditionStatus_union0 = null;
|
|
3191
|
+
const obj_flashRenditionStatus_union0_error = (() => {
|
|
3192
|
+
if (typeof obj_flashRenditionStatus !== 'string') {
|
|
3193
|
+
return new TypeError('Expected "string" but received "' + typeof obj_flashRenditionStatus + '" (at "' + path_flashRenditionStatus + '")');
|
|
3194
|
+
}
|
|
3195
|
+
})();
|
|
3196
|
+
if (obj_flashRenditionStatus_union0_error != null) {
|
|
3197
|
+
obj_flashRenditionStatus_union0 = obj_flashRenditionStatus_union0_error.message;
|
|
3198
|
+
}
|
|
3199
|
+
let obj_flashRenditionStatus_union1 = null;
|
|
3200
|
+
const obj_flashRenditionStatus_union1_error = (() => {
|
|
3201
|
+
if (obj_flashRenditionStatus !== null) {
|
|
3202
|
+
return new TypeError('Expected "null" but received "' + typeof obj_flashRenditionStatus + '" (at "' + path_flashRenditionStatus + '")');
|
|
3203
|
+
}
|
|
3204
|
+
})();
|
|
3205
|
+
if (obj_flashRenditionStatus_union1_error != null) {
|
|
3206
|
+
obj_flashRenditionStatus_union1 = obj_flashRenditionStatus_union1_error.message;
|
|
3207
|
+
}
|
|
3208
|
+
if (obj_flashRenditionStatus_union0 && obj_flashRenditionStatus_union1) {
|
|
3209
|
+
let message = 'Object doesn\'t match union (at "' + path_flashRenditionStatus + '")';
|
|
3210
|
+
message += '\n' + obj_flashRenditionStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3211
|
+
message += '\n' + obj_flashRenditionStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3212
|
+
return new TypeError(message);
|
|
3213
|
+
}
|
|
3214
|
+
const obj_id = obj.id;
|
|
3215
|
+
const path_id = path + '.id';
|
|
3216
|
+
let obj_id_union0 = null;
|
|
3217
|
+
const obj_id_union0_error = (() => {
|
|
3218
|
+
if (typeof obj_id !== 'string') {
|
|
3219
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
3220
|
+
}
|
|
3221
|
+
})();
|
|
3222
|
+
if (obj_id_union0_error != null) {
|
|
3223
|
+
obj_id_union0 = obj_id_union0_error.message;
|
|
3224
|
+
}
|
|
3225
|
+
let obj_id_union1 = null;
|
|
3226
|
+
const obj_id_union1_error = (() => {
|
|
3227
|
+
if (obj_id !== null) {
|
|
3228
|
+
return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
3229
|
+
}
|
|
3230
|
+
})();
|
|
3231
|
+
if (obj_id_union1_error != null) {
|
|
3232
|
+
obj_id_union1 = obj_id_union1_error.message;
|
|
3233
|
+
}
|
|
3234
|
+
if (obj_id_union0 && obj_id_union1) {
|
|
3235
|
+
let message = 'Object doesn\'t match union (at "' + path_id + '")';
|
|
3236
|
+
message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3237
|
+
message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3238
|
+
return new TypeError(message);
|
|
3239
|
+
}
|
|
3240
|
+
const obj_isFileAsset = obj.isFileAsset;
|
|
3241
|
+
const path_isFileAsset = path + '.isFileAsset';
|
|
3242
|
+
let obj_isFileAsset_union0 = null;
|
|
3243
|
+
const obj_isFileAsset_union0_error = (() => {
|
|
3244
|
+
if (typeof obj_isFileAsset !== 'boolean') {
|
|
3245
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isFileAsset + '" (at "' + path_isFileAsset + '")');
|
|
3246
|
+
}
|
|
3247
|
+
})();
|
|
3248
|
+
if (obj_isFileAsset_union0_error != null) {
|
|
3249
|
+
obj_isFileAsset_union0 = obj_isFileAsset_union0_error.message;
|
|
3250
|
+
}
|
|
3251
|
+
let obj_isFileAsset_union1 = null;
|
|
3252
|
+
const obj_isFileAsset_union1_error = (() => {
|
|
3253
|
+
if (obj_isFileAsset !== null) {
|
|
3254
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isFileAsset + '" (at "' + path_isFileAsset + '")');
|
|
3255
|
+
}
|
|
3256
|
+
})();
|
|
3257
|
+
if (obj_isFileAsset_union1_error != null) {
|
|
3258
|
+
obj_isFileAsset_union1 = obj_isFileAsset_union1_error.message;
|
|
3259
|
+
}
|
|
3260
|
+
if (obj_isFileAsset_union0 && obj_isFileAsset_union1) {
|
|
3261
|
+
let message = 'Object doesn\'t match union (at "' + path_isFileAsset + '")';
|
|
3262
|
+
message += '\n' + obj_isFileAsset_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3263
|
+
message += '\n' + obj_isFileAsset_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3264
|
+
return new TypeError(message);
|
|
3265
|
+
}
|
|
3266
|
+
const obj_isInMyFileSync = obj.isInMyFileSync;
|
|
3267
|
+
const path_isInMyFileSync = path + '.isInMyFileSync';
|
|
3268
|
+
let obj_isInMyFileSync_union0 = null;
|
|
3269
|
+
const obj_isInMyFileSync_union0_error = (() => {
|
|
3270
|
+
if (typeof obj_isInMyFileSync !== 'boolean') {
|
|
3271
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isInMyFileSync + '" (at "' + path_isInMyFileSync + '")');
|
|
3272
|
+
}
|
|
3273
|
+
})();
|
|
3274
|
+
if (obj_isInMyFileSync_union0_error != null) {
|
|
3275
|
+
obj_isInMyFileSync_union0 = obj_isInMyFileSync_union0_error.message;
|
|
3276
|
+
}
|
|
3277
|
+
let obj_isInMyFileSync_union1 = null;
|
|
3278
|
+
const obj_isInMyFileSync_union1_error = (() => {
|
|
3279
|
+
if (obj_isInMyFileSync !== null) {
|
|
3280
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isInMyFileSync + '" (at "' + path_isInMyFileSync + '")');
|
|
3281
|
+
}
|
|
3282
|
+
})();
|
|
3283
|
+
if (obj_isInMyFileSync_union1_error != null) {
|
|
3284
|
+
obj_isInMyFileSync_union1 = obj_isInMyFileSync_union1_error.message;
|
|
3285
|
+
}
|
|
3286
|
+
if (obj_isInMyFileSync_union0 && obj_isInMyFileSync_union1) {
|
|
3287
|
+
let message = 'Object doesn\'t match union (at "' + path_isInMyFileSync + '")';
|
|
3288
|
+
message += '\n' + obj_isInMyFileSync_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3289
|
+
message += '\n' + obj_isInMyFileSync_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3290
|
+
return new TypeError(message);
|
|
3291
|
+
}
|
|
3292
|
+
const obj_isMajorVersion = obj.isMajorVersion;
|
|
3293
|
+
const path_isMajorVersion = path + '.isMajorVersion';
|
|
3294
|
+
let obj_isMajorVersion_union0 = null;
|
|
3295
|
+
const obj_isMajorVersion_union0_error = (() => {
|
|
3296
|
+
if (typeof obj_isMajorVersion !== 'boolean') {
|
|
3297
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isMajorVersion + '" (at "' + path_isMajorVersion + '")');
|
|
3298
|
+
}
|
|
3299
|
+
})();
|
|
3300
|
+
if (obj_isMajorVersion_union0_error != null) {
|
|
3301
|
+
obj_isMajorVersion_union0 = obj_isMajorVersion_union0_error.message;
|
|
3302
|
+
}
|
|
3303
|
+
let obj_isMajorVersion_union1 = null;
|
|
3304
|
+
const obj_isMajorVersion_union1_error = (() => {
|
|
3305
|
+
if (obj_isMajorVersion !== null) {
|
|
3306
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isMajorVersion + '" (at "' + path_isMajorVersion + '")');
|
|
3307
|
+
}
|
|
3308
|
+
})();
|
|
3309
|
+
if (obj_isMajorVersion_union1_error != null) {
|
|
3310
|
+
obj_isMajorVersion_union1 = obj_isMajorVersion_union1_error.message;
|
|
3311
|
+
}
|
|
3312
|
+
if (obj_isMajorVersion_union0 && obj_isMajorVersion_union1) {
|
|
3313
|
+
let message = 'Object doesn\'t match union (at "' + path_isMajorVersion + '")';
|
|
3314
|
+
message += '\n' + obj_isMajorVersion_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3315
|
+
message += '\n' + obj_isMajorVersion_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3316
|
+
return new TypeError(message);
|
|
3317
|
+
}
|
|
3318
|
+
const obj_mimeType = obj.mimeType;
|
|
3319
|
+
const path_mimeType = path + '.mimeType';
|
|
3320
|
+
let obj_mimeType_union0 = null;
|
|
3321
|
+
const obj_mimeType_union0_error = (() => {
|
|
3322
|
+
if (typeof obj_mimeType !== 'string') {
|
|
3323
|
+
return new TypeError('Expected "string" but received "' + typeof obj_mimeType + '" (at "' + path_mimeType + '")');
|
|
3324
|
+
}
|
|
3325
|
+
})();
|
|
3326
|
+
if (obj_mimeType_union0_error != null) {
|
|
3327
|
+
obj_mimeType_union0 = obj_mimeType_union0_error.message;
|
|
3328
|
+
}
|
|
3329
|
+
let obj_mimeType_union1 = null;
|
|
3330
|
+
const obj_mimeType_union1_error = (() => {
|
|
3331
|
+
if (obj_mimeType !== null) {
|
|
3332
|
+
return new TypeError('Expected "null" but received "' + typeof obj_mimeType + '" (at "' + path_mimeType + '")');
|
|
3333
|
+
}
|
|
3334
|
+
})();
|
|
3335
|
+
if (obj_mimeType_union1_error != null) {
|
|
3336
|
+
obj_mimeType_union1 = obj_mimeType_union1_error.message;
|
|
3337
|
+
}
|
|
3338
|
+
if (obj_mimeType_union0 && obj_mimeType_union1) {
|
|
3339
|
+
let message = 'Object doesn\'t match union (at "' + path_mimeType + '")';
|
|
3340
|
+
message += '\n' + obj_mimeType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3341
|
+
message += '\n' + obj_mimeType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3342
|
+
return new TypeError(message);
|
|
3343
|
+
}
|
|
3344
|
+
const obj_moderationFlags = obj.moderationFlags;
|
|
3345
|
+
const path_moderationFlags = path + '.moderationFlags';
|
|
3346
|
+
let obj_moderationFlags_union0 = null;
|
|
3347
|
+
const obj_moderationFlags_union0_error = (() => {
|
|
3348
|
+
const referencepath_moderationFlagsValidationError = validate$a(obj_moderationFlags, path_moderationFlags);
|
|
3349
|
+
if (referencepath_moderationFlagsValidationError !== null) {
|
|
3350
|
+
let message = 'Object doesn\'t match ModerationFlagsRepresentation (at "' + path_moderationFlags + '")\n';
|
|
3351
|
+
message += referencepath_moderationFlagsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3352
|
+
return new TypeError(message);
|
|
3353
|
+
}
|
|
3354
|
+
})();
|
|
3355
|
+
if (obj_moderationFlags_union0_error != null) {
|
|
3356
|
+
obj_moderationFlags_union0 = obj_moderationFlags_union0_error.message;
|
|
3357
|
+
}
|
|
3358
|
+
let obj_moderationFlags_union1 = null;
|
|
3359
|
+
const obj_moderationFlags_union1_error = (() => {
|
|
3360
|
+
if (obj_moderationFlags !== null) {
|
|
3361
|
+
return new TypeError('Expected "null" but received "' + typeof obj_moderationFlags + '" (at "' + path_moderationFlags + '")');
|
|
3362
|
+
}
|
|
3363
|
+
})();
|
|
3364
|
+
if (obj_moderationFlags_union1_error != null) {
|
|
3365
|
+
obj_moderationFlags_union1 = obj_moderationFlags_union1_error.message;
|
|
3366
|
+
}
|
|
3367
|
+
if (obj_moderationFlags_union0 && obj_moderationFlags_union1) {
|
|
3368
|
+
let message = 'Object doesn\'t match union (at "' + path_moderationFlags + '")';
|
|
3369
|
+
message += '\n' + obj_moderationFlags_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3370
|
+
message += '\n' + obj_moderationFlags_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3371
|
+
return new TypeError(message);
|
|
3372
|
+
}
|
|
3373
|
+
const obj_modifiedDate = obj.modifiedDate;
|
|
3374
|
+
const path_modifiedDate = path + '.modifiedDate';
|
|
3375
|
+
let obj_modifiedDate_union0 = null;
|
|
3376
|
+
const obj_modifiedDate_union0_error = (() => {
|
|
3377
|
+
if (typeof obj_modifiedDate !== 'string') {
|
|
3378
|
+
return new TypeError('Expected "string" but received "' + typeof obj_modifiedDate + '" (at "' + path_modifiedDate + '")');
|
|
3379
|
+
}
|
|
3380
|
+
})();
|
|
3381
|
+
if (obj_modifiedDate_union0_error != null) {
|
|
3382
|
+
obj_modifiedDate_union0 = obj_modifiedDate_union0_error.message;
|
|
3383
|
+
}
|
|
3384
|
+
let obj_modifiedDate_union1 = null;
|
|
3385
|
+
const obj_modifiedDate_union1_error = (() => {
|
|
3386
|
+
if (obj_modifiedDate !== null) {
|
|
3387
|
+
return new TypeError('Expected "null" but received "' + typeof obj_modifiedDate + '" (at "' + path_modifiedDate + '")');
|
|
3388
|
+
}
|
|
3389
|
+
})();
|
|
3390
|
+
if (obj_modifiedDate_union1_error != null) {
|
|
3391
|
+
obj_modifiedDate_union1 = obj_modifiedDate_union1_error.message;
|
|
3392
|
+
}
|
|
3393
|
+
if (obj_modifiedDate_union0 && obj_modifiedDate_union1) {
|
|
3394
|
+
let message = 'Object doesn\'t match union (at "' + path_modifiedDate + '")';
|
|
3395
|
+
message += '\n' + obj_modifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3396
|
+
message += '\n' + obj_modifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3397
|
+
return new TypeError(message);
|
|
3398
|
+
}
|
|
3399
|
+
const obj_motif = obj.motif;
|
|
3400
|
+
const path_motif = path + '.motif';
|
|
3401
|
+
let obj_motif_union0 = null;
|
|
3402
|
+
const obj_motif_union0_error = (() => {
|
|
3403
|
+
const referencepath_motifValidationError = validate$9(obj_motif, path_motif);
|
|
3404
|
+
if (referencepath_motifValidationError !== null) {
|
|
3405
|
+
let message = 'Object doesn\'t match MotifRepresentation (at "' + path_motif + '")\n';
|
|
3406
|
+
message += referencepath_motifValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3407
|
+
return new TypeError(message);
|
|
3408
|
+
}
|
|
3409
|
+
})();
|
|
3410
|
+
if (obj_motif_union0_error != null) {
|
|
3411
|
+
obj_motif_union0 = obj_motif_union0_error.message;
|
|
3412
|
+
}
|
|
3413
|
+
let obj_motif_union1 = null;
|
|
3414
|
+
const obj_motif_union1_error = (() => {
|
|
3415
|
+
if (obj_motif !== null) {
|
|
3416
|
+
return new TypeError('Expected "null" but received "' + typeof obj_motif + '" (at "' + path_motif + '")');
|
|
3417
|
+
}
|
|
3418
|
+
})();
|
|
3419
|
+
if (obj_motif_union1_error != null) {
|
|
3420
|
+
obj_motif_union1 = obj_motif_union1_error.message;
|
|
3421
|
+
}
|
|
3422
|
+
if (obj_motif_union0 && obj_motif_union1) {
|
|
3423
|
+
let message = 'Object doesn\'t match union (at "' + path_motif + '")';
|
|
3424
|
+
message += '\n' + obj_motif_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3425
|
+
message += '\n' + obj_motif_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3426
|
+
return new TypeError(message);
|
|
3427
|
+
}
|
|
3428
|
+
const obj_mySubscription = obj.mySubscription;
|
|
3429
|
+
const path_mySubscription = path + '.mySubscription';
|
|
3430
|
+
let obj_mySubscription_union0 = null;
|
|
3431
|
+
const obj_mySubscription_union0_error = (() => {
|
|
3432
|
+
const referencepath_mySubscriptionValidationError = validate$j(obj_mySubscription, path_mySubscription);
|
|
3433
|
+
if (referencepath_mySubscriptionValidationError !== null) {
|
|
3434
|
+
let message = 'Object doesn\'t match ReferenceRepresentation (at "' + path_mySubscription + '")\n';
|
|
3435
|
+
message += referencepath_mySubscriptionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3436
|
+
return new TypeError(message);
|
|
3437
|
+
}
|
|
3438
|
+
})();
|
|
3439
|
+
if (obj_mySubscription_union0_error != null) {
|
|
3440
|
+
obj_mySubscription_union0 = obj_mySubscription_union0_error.message;
|
|
3441
|
+
}
|
|
3442
|
+
let obj_mySubscription_union1 = null;
|
|
3443
|
+
const obj_mySubscription_union1_error = (() => {
|
|
3444
|
+
if (obj_mySubscription !== null) {
|
|
3445
|
+
return new TypeError('Expected "null" but received "' + typeof obj_mySubscription + '" (at "' + path_mySubscription + '")');
|
|
3446
|
+
}
|
|
3447
|
+
})();
|
|
3448
|
+
if (obj_mySubscription_union1_error != null) {
|
|
3449
|
+
obj_mySubscription_union1 = obj_mySubscription_union1_error.message;
|
|
3450
|
+
}
|
|
3451
|
+
if (obj_mySubscription_union0 && obj_mySubscription_union1) {
|
|
3452
|
+
let message = 'Object doesn\'t match union (at "' + path_mySubscription + '")';
|
|
3453
|
+
message += '\n' + obj_mySubscription_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3454
|
+
message += '\n' + obj_mySubscription_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3455
|
+
return new TypeError(message);
|
|
3456
|
+
}
|
|
3457
|
+
const obj_name = obj.name;
|
|
3458
|
+
const path_name = path + '.name';
|
|
3459
|
+
let obj_name_union0 = null;
|
|
3460
|
+
const obj_name_union0_error = (() => {
|
|
3461
|
+
if (typeof obj_name !== 'string') {
|
|
3462
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3463
|
+
}
|
|
3464
|
+
})();
|
|
3465
|
+
if (obj_name_union0_error != null) {
|
|
3466
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
3467
|
+
}
|
|
3468
|
+
let obj_name_union1 = null;
|
|
3469
|
+
const obj_name_union1_error = (() => {
|
|
3470
|
+
if (obj_name !== null) {
|
|
3471
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3472
|
+
}
|
|
3473
|
+
})();
|
|
3474
|
+
if (obj_name_union1_error != null) {
|
|
3475
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
3476
|
+
}
|
|
3477
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
3478
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
3479
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3480
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3481
|
+
return new TypeError(message);
|
|
3482
|
+
}
|
|
3483
|
+
const obj_origin = obj.origin;
|
|
3484
|
+
const path_origin = path + '.origin';
|
|
3485
|
+
let obj_origin_union0 = null;
|
|
3486
|
+
const obj_origin_union0_error = (() => {
|
|
3487
|
+
if (typeof obj_origin !== 'string') {
|
|
3488
|
+
return new TypeError('Expected "string" but received "' + typeof obj_origin + '" (at "' + path_origin + '")');
|
|
3489
|
+
}
|
|
3490
|
+
})();
|
|
3491
|
+
if (obj_origin_union0_error != null) {
|
|
3492
|
+
obj_origin_union0 = obj_origin_union0_error.message;
|
|
3493
|
+
}
|
|
3494
|
+
let obj_origin_union1 = null;
|
|
3495
|
+
const obj_origin_union1_error = (() => {
|
|
3496
|
+
if (obj_origin !== null) {
|
|
3497
|
+
return new TypeError('Expected "null" but received "' + typeof obj_origin + '" (at "' + path_origin + '")');
|
|
3498
|
+
}
|
|
3499
|
+
})();
|
|
3500
|
+
if (obj_origin_union1_error != null) {
|
|
3501
|
+
obj_origin_union1 = obj_origin_union1_error.message;
|
|
3502
|
+
}
|
|
3503
|
+
if (obj_origin_union0 && obj_origin_union1) {
|
|
3504
|
+
let message = 'Object doesn\'t match union (at "' + path_origin + '")';
|
|
3505
|
+
message += '\n' + obj_origin_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3506
|
+
message += '\n' + obj_origin_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3507
|
+
return new TypeError(message);
|
|
3508
|
+
}
|
|
3509
|
+
const obj_owner = obj.owner;
|
|
3510
|
+
const path_owner = path + '.owner';
|
|
3511
|
+
let obj_owner_union0 = null;
|
|
3512
|
+
const obj_owner_union0_error = (() => {
|
|
3513
|
+
const referencepath_ownerValidationError = validate$4(obj_owner, path_owner);
|
|
3514
|
+
if (referencepath_ownerValidationError !== null) {
|
|
3515
|
+
let message = 'Object doesn\'t match UserSummaryRepresentation (at "' + path_owner + '")\n';
|
|
3516
|
+
message += referencepath_ownerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3517
|
+
return new TypeError(message);
|
|
3518
|
+
}
|
|
3519
|
+
})();
|
|
3520
|
+
if (obj_owner_union0_error != null) {
|
|
3521
|
+
obj_owner_union0 = obj_owner_union0_error.message;
|
|
3522
|
+
}
|
|
3523
|
+
let obj_owner_union1 = null;
|
|
3524
|
+
const obj_owner_union1_error = (() => {
|
|
3525
|
+
if (obj_owner !== null) {
|
|
3526
|
+
return new TypeError('Expected "null" but received "' + typeof obj_owner + '" (at "' + path_owner + '")');
|
|
3527
|
+
}
|
|
3528
|
+
})();
|
|
3529
|
+
if (obj_owner_union1_error != null) {
|
|
3530
|
+
obj_owner_union1 = obj_owner_union1_error.message;
|
|
3531
|
+
}
|
|
3532
|
+
if (obj_owner_union0 && obj_owner_union1) {
|
|
3533
|
+
let message = 'Object doesn\'t match union (at "' + path_owner + '")';
|
|
3534
|
+
message += '\n' + obj_owner_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3535
|
+
message += '\n' + obj_owner_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3536
|
+
return new TypeError(message);
|
|
3537
|
+
}
|
|
3538
|
+
const obj_pageCount = obj.pageCount;
|
|
3539
|
+
const path_pageCount = path + '.pageCount';
|
|
3540
|
+
let obj_pageCount_union0 = null;
|
|
3541
|
+
const obj_pageCount_union0_error = (() => {
|
|
3542
|
+
if (typeof obj_pageCount !== 'number' || (typeof obj_pageCount === 'number' && Math.floor(obj_pageCount) !== obj_pageCount)) {
|
|
3543
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_pageCount + '" (at "' + path_pageCount + '")');
|
|
3544
|
+
}
|
|
3545
|
+
})();
|
|
3546
|
+
if (obj_pageCount_union0_error != null) {
|
|
3547
|
+
obj_pageCount_union0 = obj_pageCount_union0_error.message;
|
|
3548
|
+
}
|
|
3549
|
+
let obj_pageCount_union1 = null;
|
|
3550
|
+
const obj_pageCount_union1_error = (() => {
|
|
3551
|
+
if (obj_pageCount !== null) {
|
|
3552
|
+
return new TypeError('Expected "null" but received "' + typeof obj_pageCount + '" (at "' + path_pageCount + '")');
|
|
3553
|
+
}
|
|
3554
|
+
})();
|
|
3555
|
+
if (obj_pageCount_union1_error != null) {
|
|
3556
|
+
obj_pageCount_union1 = obj_pageCount_union1_error.message;
|
|
3557
|
+
}
|
|
3558
|
+
if (obj_pageCount_union0 && obj_pageCount_union1) {
|
|
3559
|
+
let message = 'Object doesn\'t match union (at "' + path_pageCount + '")';
|
|
3560
|
+
message += '\n' + obj_pageCount_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3561
|
+
message += '\n' + obj_pageCount_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3562
|
+
return new TypeError(message);
|
|
3563
|
+
}
|
|
3564
|
+
const obj_parentFolder = obj.parentFolder;
|
|
3565
|
+
const path_parentFolder = path + '.parentFolder';
|
|
3566
|
+
let obj_parentFolder_union0 = null;
|
|
3567
|
+
const obj_parentFolder_union0_error = (() => {
|
|
3568
|
+
const referencepath_parentFolderValidationError = validate$j(obj_parentFolder, path_parentFolder);
|
|
3569
|
+
if (referencepath_parentFolderValidationError !== null) {
|
|
3570
|
+
let message = 'Object doesn\'t match ReferenceRepresentation (at "' + path_parentFolder + '")\n';
|
|
3571
|
+
message += referencepath_parentFolderValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3572
|
+
return new TypeError(message);
|
|
3573
|
+
}
|
|
3574
|
+
})();
|
|
3575
|
+
if (obj_parentFolder_union0_error != null) {
|
|
3576
|
+
obj_parentFolder_union0 = obj_parentFolder_union0_error.message;
|
|
3577
|
+
}
|
|
3578
|
+
let obj_parentFolder_union1 = null;
|
|
3579
|
+
const obj_parentFolder_union1_error = (() => {
|
|
3580
|
+
if (obj_parentFolder !== null) {
|
|
3581
|
+
return new TypeError('Expected "null" but received "' + typeof obj_parentFolder + '" (at "' + path_parentFolder + '")');
|
|
3582
|
+
}
|
|
3583
|
+
})();
|
|
3584
|
+
if (obj_parentFolder_union1_error != null) {
|
|
3585
|
+
obj_parentFolder_union1 = obj_parentFolder_union1_error.message;
|
|
3586
|
+
}
|
|
3587
|
+
if (obj_parentFolder_union0 && obj_parentFolder_union1) {
|
|
3588
|
+
let message = 'Object doesn\'t match union (at "' + path_parentFolder + '")';
|
|
3589
|
+
message += '\n' + obj_parentFolder_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3590
|
+
message += '\n' + obj_parentFolder_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3591
|
+
return new TypeError(message);
|
|
3592
|
+
}
|
|
3593
|
+
const obj_pdfRenditionStatus = obj.pdfRenditionStatus;
|
|
3594
|
+
const path_pdfRenditionStatus = path + '.pdfRenditionStatus';
|
|
3595
|
+
let obj_pdfRenditionStatus_union0 = null;
|
|
3596
|
+
const obj_pdfRenditionStatus_union0_error = (() => {
|
|
3597
|
+
if (typeof obj_pdfRenditionStatus !== 'string') {
|
|
3598
|
+
return new TypeError('Expected "string" but received "' + typeof obj_pdfRenditionStatus + '" (at "' + path_pdfRenditionStatus + '")');
|
|
3599
|
+
}
|
|
3600
|
+
})();
|
|
3601
|
+
if (obj_pdfRenditionStatus_union0_error != null) {
|
|
3602
|
+
obj_pdfRenditionStatus_union0 = obj_pdfRenditionStatus_union0_error.message;
|
|
3603
|
+
}
|
|
3604
|
+
let obj_pdfRenditionStatus_union1 = null;
|
|
3605
|
+
const obj_pdfRenditionStatus_union1_error = (() => {
|
|
3606
|
+
if (obj_pdfRenditionStatus !== null) {
|
|
3607
|
+
return new TypeError('Expected "null" but received "' + typeof obj_pdfRenditionStatus + '" (at "' + path_pdfRenditionStatus + '")');
|
|
3608
|
+
}
|
|
3609
|
+
})();
|
|
3610
|
+
if (obj_pdfRenditionStatus_union1_error != null) {
|
|
3611
|
+
obj_pdfRenditionStatus_union1 = obj_pdfRenditionStatus_union1_error.message;
|
|
3612
|
+
}
|
|
3613
|
+
if (obj_pdfRenditionStatus_union0 && obj_pdfRenditionStatus_union1) {
|
|
3614
|
+
let message = 'Object doesn\'t match union (at "' + path_pdfRenditionStatus + '")';
|
|
3615
|
+
message += '\n' + obj_pdfRenditionStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3616
|
+
message += '\n' + obj_pdfRenditionStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3617
|
+
return new TypeError(message);
|
|
3618
|
+
}
|
|
3619
|
+
const obj_publishStatus = obj.publishStatus;
|
|
3620
|
+
const path_publishStatus = path + '.publishStatus';
|
|
3621
|
+
let obj_publishStatus_union0 = null;
|
|
3622
|
+
const obj_publishStatus_union0_error = (() => {
|
|
3623
|
+
if (typeof obj_publishStatus !== 'string') {
|
|
3624
|
+
return new TypeError('Expected "string" but received "' + typeof obj_publishStatus + '" (at "' + path_publishStatus + '")');
|
|
3625
|
+
}
|
|
3626
|
+
})();
|
|
3627
|
+
if (obj_publishStatus_union0_error != null) {
|
|
3628
|
+
obj_publishStatus_union0 = obj_publishStatus_union0_error.message;
|
|
3629
|
+
}
|
|
3630
|
+
let obj_publishStatus_union1 = null;
|
|
3631
|
+
const obj_publishStatus_union1_error = (() => {
|
|
3632
|
+
if (obj_publishStatus !== null) {
|
|
3633
|
+
return new TypeError('Expected "null" but received "' + typeof obj_publishStatus + '" (at "' + path_publishStatus + '")');
|
|
3634
|
+
}
|
|
3635
|
+
})();
|
|
3636
|
+
if (obj_publishStatus_union1_error != null) {
|
|
3637
|
+
obj_publishStatus_union1 = obj_publishStatus_union1_error.message;
|
|
3638
|
+
}
|
|
3639
|
+
if (obj_publishStatus_union0 && obj_publishStatus_union1) {
|
|
3640
|
+
let message = 'Object doesn\'t match union (at "' + path_publishStatus + '")';
|
|
3641
|
+
message += '\n' + obj_publishStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3642
|
+
message += '\n' + obj_publishStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3643
|
+
return new TypeError(message);
|
|
3644
|
+
}
|
|
3645
|
+
const obj_renditionUrl = obj.renditionUrl;
|
|
3646
|
+
const path_renditionUrl = path + '.renditionUrl';
|
|
3647
|
+
let obj_renditionUrl_union0 = null;
|
|
3648
|
+
const obj_renditionUrl_union0_error = (() => {
|
|
3649
|
+
if (typeof obj_renditionUrl !== 'string') {
|
|
3650
|
+
return new TypeError('Expected "string" but received "' + typeof obj_renditionUrl + '" (at "' + path_renditionUrl + '")');
|
|
3651
|
+
}
|
|
3652
|
+
})();
|
|
3653
|
+
if (obj_renditionUrl_union0_error != null) {
|
|
3654
|
+
obj_renditionUrl_union0 = obj_renditionUrl_union0_error.message;
|
|
3655
|
+
}
|
|
3656
|
+
let obj_renditionUrl_union1 = null;
|
|
3657
|
+
const obj_renditionUrl_union1_error = (() => {
|
|
3658
|
+
if (obj_renditionUrl !== null) {
|
|
3659
|
+
return new TypeError('Expected "null" but received "' + typeof obj_renditionUrl + '" (at "' + path_renditionUrl + '")');
|
|
3660
|
+
}
|
|
3661
|
+
})();
|
|
3662
|
+
if (obj_renditionUrl_union1_error != null) {
|
|
3663
|
+
obj_renditionUrl_union1 = obj_renditionUrl_union1_error.message;
|
|
3664
|
+
}
|
|
3665
|
+
if (obj_renditionUrl_union0 && obj_renditionUrl_union1) {
|
|
3666
|
+
let message = 'Object doesn\'t match union (at "' + path_renditionUrl + '")';
|
|
3667
|
+
message += '\n' + obj_renditionUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3668
|
+
message += '\n' + obj_renditionUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3669
|
+
return new TypeError(message);
|
|
3670
|
+
}
|
|
3671
|
+
const obj_renditionUrl240By180 = obj.renditionUrl240By180;
|
|
3672
|
+
const path_renditionUrl240By180 = path + '.renditionUrl240By180';
|
|
3673
|
+
let obj_renditionUrl240By180_union0 = null;
|
|
3674
|
+
const obj_renditionUrl240By180_union0_error = (() => {
|
|
3675
|
+
if (typeof obj_renditionUrl240By180 !== 'string') {
|
|
3676
|
+
return new TypeError('Expected "string" but received "' + typeof obj_renditionUrl240By180 + '" (at "' + path_renditionUrl240By180 + '")');
|
|
3677
|
+
}
|
|
3678
|
+
})();
|
|
3679
|
+
if (obj_renditionUrl240By180_union0_error != null) {
|
|
3680
|
+
obj_renditionUrl240By180_union0 = obj_renditionUrl240By180_union0_error.message;
|
|
3681
|
+
}
|
|
3682
|
+
let obj_renditionUrl240By180_union1 = null;
|
|
3683
|
+
const obj_renditionUrl240By180_union1_error = (() => {
|
|
3684
|
+
if (obj_renditionUrl240By180 !== null) {
|
|
3685
|
+
return new TypeError('Expected "null" but received "' + typeof obj_renditionUrl240By180 + '" (at "' + path_renditionUrl240By180 + '")');
|
|
3686
|
+
}
|
|
3687
|
+
})();
|
|
3688
|
+
if (obj_renditionUrl240By180_union1_error != null) {
|
|
3689
|
+
obj_renditionUrl240By180_union1 = obj_renditionUrl240By180_union1_error.message;
|
|
3690
|
+
}
|
|
3691
|
+
if (obj_renditionUrl240By180_union0 && obj_renditionUrl240By180_union1) {
|
|
3692
|
+
let message = 'Object doesn\'t match union (at "' + path_renditionUrl240By180 + '")';
|
|
3693
|
+
message += '\n' + obj_renditionUrl240By180_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3694
|
+
message += '\n' + obj_renditionUrl240By180_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3695
|
+
return new TypeError(message);
|
|
3696
|
+
}
|
|
3697
|
+
const obj_renditionUrl720By480 = obj.renditionUrl720By480;
|
|
3698
|
+
const path_renditionUrl720By480 = path + '.renditionUrl720By480';
|
|
3699
|
+
let obj_renditionUrl720By480_union0 = null;
|
|
3700
|
+
const obj_renditionUrl720By480_union0_error = (() => {
|
|
3701
|
+
if (typeof obj_renditionUrl720By480 !== 'string') {
|
|
3702
|
+
return new TypeError('Expected "string" but received "' + typeof obj_renditionUrl720By480 + '" (at "' + path_renditionUrl720By480 + '")');
|
|
3703
|
+
}
|
|
3704
|
+
})();
|
|
3705
|
+
if (obj_renditionUrl720By480_union0_error != null) {
|
|
3706
|
+
obj_renditionUrl720By480_union0 = obj_renditionUrl720By480_union0_error.message;
|
|
3707
|
+
}
|
|
3708
|
+
let obj_renditionUrl720By480_union1 = null;
|
|
3709
|
+
const obj_renditionUrl720By480_union1_error = (() => {
|
|
3710
|
+
if (obj_renditionUrl720By480 !== null) {
|
|
3711
|
+
return new TypeError('Expected "null" but received "' + typeof obj_renditionUrl720By480 + '" (at "' + path_renditionUrl720By480 + '")');
|
|
3712
|
+
}
|
|
3713
|
+
})();
|
|
3714
|
+
if (obj_renditionUrl720By480_union1_error != null) {
|
|
3715
|
+
obj_renditionUrl720By480_union1 = obj_renditionUrl720By480_union1_error.message;
|
|
3716
|
+
}
|
|
3717
|
+
if (obj_renditionUrl720By480_union0 && obj_renditionUrl720By480_union1) {
|
|
3718
|
+
let message = 'Object doesn\'t match union (at "' + path_renditionUrl720By480 + '")';
|
|
3719
|
+
message += '\n' + obj_renditionUrl720By480_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3720
|
+
message += '\n' + obj_renditionUrl720By480_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3721
|
+
return new TypeError(message);
|
|
3722
|
+
}
|
|
3723
|
+
const obj_repositoryFileId = obj.repositoryFileId;
|
|
3724
|
+
const path_repositoryFileId = path + '.repositoryFileId';
|
|
3725
|
+
let obj_repositoryFileId_union0 = null;
|
|
3726
|
+
const obj_repositoryFileId_union0_error = (() => {
|
|
3727
|
+
if (typeof obj_repositoryFileId !== 'string') {
|
|
3728
|
+
return new TypeError('Expected "string" but received "' + typeof obj_repositoryFileId + '" (at "' + path_repositoryFileId + '")');
|
|
3729
|
+
}
|
|
3730
|
+
})();
|
|
3731
|
+
if (obj_repositoryFileId_union0_error != null) {
|
|
3732
|
+
obj_repositoryFileId_union0 = obj_repositoryFileId_union0_error.message;
|
|
3733
|
+
}
|
|
3734
|
+
let obj_repositoryFileId_union1 = null;
|
|
3735
|
+
const obj_repositoryFileId_union1_error = (() => {
|
|
3736
|
+
if (obj_repositoryFileId !== null) {
|
|
3737
|
+
return new TypeError('Expected "null" but received "' + typeof obj_repositoryFileId + '" (at "' + path_repositoryFileId + '")');
|
|
3738
|
+
}
|
|
3739
|
+
})();
|
|
3740
|
+
if (obj_repositoryFileId_union1_error != null) {
|
|
3741
|
+
obj_repositoryFileId_union1 = obj_repositoryFileId_union1_error.message;
|
|
3742
|
+
}
|
|
3743
|
+
if (obj_repositoryFileId_union0 && obj_repositoryFileId_union1) {
|
|
3744
|
+
let message = 'Object doesn\'t match union (at "' + path_repositoryFileId + '")';
|
|
3745
|
+
message += '\n' + obj_repositoryFileId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3746
|
+
message += '\n' + obj_repositoryFileId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3747
|
+
return new TypeError(message);
|
|
3748
|
+
}
|
|
3749
|
+
const obj_repositoryFileUrl = obj.repositoryFileUrl;
|
|
3750
|
+
const path_repositoryFileUrl = path + '.repositoryFileUrl';
|
|
3751
|
+
let obj_repositoryFileUrl_union0 = null;
|
|
3752
|
+
const obj_repositoryFileUrl_union0_error = (() => {
|
|
3753
|
+
if (typeof obj_repositoryFileUrl !== 'string') {
|
|
3754
|
+
return new TypeError('Expected "string" but received "' + typeof obj_repositoryFileUrl + '" (at "' + path_repositoryFileUrl + '")');
|
|
3755
|
+
}
|
|
3756
|
+
})();
|
|
3757
|
+
if (obj_repositoryFileUrl_union0_error != null) {
|
|
3758
|
+
obj_repositoryFileUrl_union0 = obj_repositoryFileUrl_union0_error.message;
|
|
3759
|
+
}
|
|
3760
|
+
let obj_repositoryFileUrl_union1 = null;
|
|
3761
|
+
const obj_repositoryFileUrl_union1_error = (() => {
|
|
3762
|
+
if (obj_repositoryFileUrl !== null) {
|
|
3763
|
+
return new TypeError('Expected "null" but received "' + typeof obj_repositoryFileUrl + '" (at "' + path_repositoryFileUrl + '")');
|
|
3764
|
+
}
|
|
3765
|
+
})();
|
|
3766
|
+
if (obj_repositoryFileUrl_union1_error != null) {
|
|
3767
|
+
obj_repositoryFileUrl_union1 = obj_repositoryFileUrl_union1_error.message;
|
|
3768
|
+
}
|
|
3769
|
+
if (obj_repositoryFileUrl_union0 && obj_repositoryFileUrl_union1) {
|
|
3770
|
+
let message = 'Object doesn\'t match union (at "' + path_repositoryFileUrl + '")';
|
|
3771
|
+
message += '\n' + obj_repositoryFileUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3772
|
+
message += '\n' + obj_repositoryFileUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3773
|
+
return new TypeError(message);
|
|
3774
|
+
}
|
|
3775
|
+
const obj_sharingOption = obj.sharingOption;
|
|
3776
|
+
const path_sharingOption = path + '.sharingOption';
|
|
3777
|
+
let obj_sharingOption_union0 = null;
|
|
3778
|
+
const obj_sharingOption_union0_error = (() => {
|
|
3779
|
+
if (typeof obj_sharingOption !== 'string') {
|
|
3780
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sharingOption + '" (at "' + path_sharingOption + '")');
|
|
3781
|
+
}
|
|
3782
|
+
})();
|
|
3783
|
+
if (obj_sharingOption_union0_error != null) {
|
|
3784
|
+
obj_sharingOption_union0 = obj_sharingOption_union0_error.message;
|
|
3785
|
+
}
|
|
3786
|
+
let obj_sharingOption_union1 = null;
|
|
3787
|
+
const obj_sharingOption_union1_error = (() => {
|
|
3788
|
+
if (obj_sharingOption !== null) {
|
|
3789
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sharingOption + '" (at "' + path_sharingOption + '")');
|
|
3790
|
+
}
|
|
3791
|
+
})();
|
|
3792
|
+
if (obj_sharingOption_union1_error != null) {
|
|
3793
|
+
obj_sharingOption_union1 = obj_sharingOption_union1_error.message;
|
|
3794
|
+
}
|
|
3795
|
+
if (obj_sharingOption_union0 && obj_sharingOption_union1) {
|
|
3796
|
+
let message = 'Object doesn\'t match union (at "' + path_sharingOption + '")';
|
|
3797
|
+
message += '\n' + obj_sharingOption_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3798
|
+
message += '\n' + obj_sharingOption_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3799
|
+
return new TypeError(message);
|
|
3800
|
+
}
|
|
3801
|
+
const obj_sharingPrivacy = obj.sharingPrivacy;
|
|
3802
|
+
const path_sharingPrivacy = path + '.sharingPrivacy';
|
|
3803
|
+
let obj_sharingPrivacy_union0 = null;
|
|
3804
|
+
const obj_sharingPrivacy_union0_error = (() => {
|
|
3805
|
+
if (typeof obj_sharingPrivacy !== 'string') {
|
|
3806
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sharingPrivacy + '" (at "' + path_sharingPrivacy + '")');
|
|
3807
|
+
}
|
|
3808
|
+
})();
|
|
3809
|
+
if (obj_sharingPrivacy_union0_error != null) {
|
|
3810
|
+
obj_sharingPrivacy_union0 = obj_sharingPrivacy_union0_error.message;
|
|
3811
|
+
}
|
|
3812
|
+
let obj_sharingPrivacy_union1 = null;
|
|
3813
|
+
const obj_sharingPrivacy_union1_error = (() => {
|
|
3814
|
+
if (obj_sharingPrivacy !== null) {
|
|
3815
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sharingPrivacy + '" (at "' + path_sharingPrivacy + '")');
|
|
3816
|
+
}
|
|
3817
|
+
})();
|
|
3818
|
+
if (obj_sharingPrivacy_union1_error != null) {
|
|
3819
|
+
obj_sharingPrivacy_union1 = obj_sharingPrivacy_union1_error.message;
|
|
3820
|
+
}
|
|
3821
|
+
if (obj_sharingPrivacy_union0 && obj_sharingPrivacy_union1) {
|
|
3822
|
+
let message = 'Object doesn\'t match union (at "' + path_sharingPrivacy + '")';
|
|
3823
|
+
message += '\n' + obj_sharingPrivacy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3824
|
+
message += '\n' + obj_sharingPrivacy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3825
|
+
return new TypeError(message);
|
|
3826
|
+
}
|
|
3827
|
+
const obj_sharingRole = obj.sharingRole;
|
|
3828
|
+
const path_sharingRole = path + '.sharingRole';
|
|
3829
|
+
let obj_sharingRole_union0 = null;
|
|
3830
|
+
const obj_sharingRole_union0_error = (() => {
|
|
3831
|
+
if (typeof obj_sharingRole !== 'string') {
|
|
3832
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sharingRole + '" (at "' + path_sharingRole + '")');
|
|
3833
|
+
}
|
|
3834
|
+
})();
|
|
3835
|
+
if (obj_sharingRole_union0_error != null) {
|
|
3836
|
+
obj_sharingRole_union0 = obj_sharingRole_union0_error.message;
|
|
3837
|
+
}
|
|
3838
|
+
let obj_sharingRole_union1 = null;
|
|
3839
|
+
const obj_sharingRole_union1_error = (() => {
|
|
3840
|
+
if (obj_sharingRole !== null) {
|
|
3841
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sharingRole + '" (at "' + path_sharingRole + '")');
|
|
3842
|
+
}
|
|
3843
|
+
})();
|
|
3844
|
+
if (obj_sharingRole_union1_error != null) {
|
|
3845
|
+
obj_sharingRole_union1 = obj_sharingRole_union1_error.message;
|
|
3846
|
+
}
|
|
3847
|
+
if (obj_sharingRole_union0 && obj_sharingRole_union1) {
|
|
3848
|
+
let message = 'Object doesn\'t match union (at "' + path_sharingRole + '")';
|
|
3849
|
+
message += '\n' + obj_sharingRole_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3850
|
+
message += '\n' + obj_sharingRole_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3851
|
+
return new TypeError(message);
|
|
3852
|
+
}
|
|
3853
|
+
const obj_systemModstamp = obj.systemModstamp;
|
|
3854
|
+
const path_systemModstamp = path + '.systemModstamp';
|
|
3855
|
+
let obj_systemModstamp_union0 = null;
|
|
3856
|
+
const obj_systemModstamp_union0_error = (() => {
|
|
3857
|
+
if (typeof obj_systemModstamp !== 'string') {
|
|
3858
|
+
return new TypeError('Expected "string" but received "' + typeof obj_systemModstamp + '" (at "' + path_systemModstamp + '")');
|
|
3859
|
+
}
|
|
3860
|
+
})();
|
|
3861
|
+
if (obj_systemModstamp_union0_error != null) {
|
|
3862
|
+
obj_systemModstamp_union0 = obj_systemModstamp_union0_error.message;
|
|
3863
|
+
}
|
|
3864
|
+
let obj_systemModstamp_union1 = null;
|
|
3865
|
+
const obj_systemModstamp_union1_error = (() => {
|
|
3866
|
+
if (obj_systemModstamp !== null) {
|
|
3867
|
+
return new TypeError('Expected "null" but received "' + typeof obj_systemModstamp + '" (at "' + path_systemModstamp + '")');
|
|
3868
|
+
}
|
|
3869
|
+
})();
|
|
3870
|
+
if (obj_systemModstamp_union1_error != null) {
|
|
3871
|
+
obj_systemModstamp_union1 = obj_systemModstamp_union1_error.message;
|
|
3872
|
+
}
|
|
3873
|
+
if (obj_systemModstamp_union0 && obj_systemModstamp_union1) {
|
|
3874
|
+
let message = 'Object doesn\'t match union (at "' + path_systemModstamp + '")';
|
|
3875
|
+
message += '\n' + obj_systemModstamp_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3876
|
+
message += '\n' + obj_systemModstamp_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3877
|
+
return new TypeError(message);
|
|
3878
|
+
}
|
|
3879
|
+
const obj_textPreview = obj.textPreview;
|
|
3880
|
+
const path_textPreview = path + '.textPreview';
|
|
3881
|
+
let obj_textPreview_union0 = null;
|
|
3882
|
+
const obj_textPreview_union0_error = (() => {
|
|
3883
|
+
if (typeof obj_textPreview !== 'string') {
|
|
3884
|
+
return new TypeError('Expected "string" but received "' + typeof obj_textPreview + '" (at "' + path_textPreview + '")');
|
|
3885
|
+
}
|
|
3886
|
+
})();
|
|
3887
|
+
if (obj_textPreview_union0_error != null) {
|
|
3888
|
+
obj_textPreview_union0 = obj_textPreview_union0_error.message;
|
|
3889
|
+
}
|
|
3890
|
+
let obj_textPreview_union1 = null;
|
|
3891
|
+
const obj_textPreview_union1_error = (() => {
|
|
3892
|
+
if (obj_textPreview !== null) {
|
|
3893
|
+
return new TypeError('Expected "null" but received "' + typeof obj_textPreview + '" (at "' + path_textPreview + '")');
|
|
3894
|
+
}
|
|
3895
|
+
})();
|
|
3896
|
+
if (obj_textPreview_union1_error != null) {
|
|
3897
|
+
obj_textPreview_union1 = obj_textPreview_union1_error.message;
|
|
3898
|
+
}
|
|
3899
|
+
if (obj_textPreview_union0 && obj_textPreview_union1) {
|
|
3900
|
+
let message = 'Object doesn\'t match union (at "' + path_textPreview + '")';
|
|
3901
|
+
message += '\n' + obj_textPreview_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3902
|
+
message += '\n' + obj_textPreview_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3903
|
+
return new TypeError(message);
|
|
3904
|
+
}
|
|
3905
|
+
const obj_thumb120By90RenditionStatus = obj.thumb120By90RenditionStatus;
|
|
3906
|
+
const path_thumb120By90RenditionStatus = path + '.thumb120By90RenditionStatus';
|
|
3907
|
+
let obj_thumb120By90RenditionStatus_union0 = null;
|
|
3908
|
+
const obj_thumb120By90RenditionStatus_union0_error = (() => {
|
|
3909
|
+
if (typeof obj_thumb120By90RenditionStatus !== 'string') {
|
|
3910
|
+
return new TypeError('Expected "string" but received "' + typeof obj_thumb120By90RenditionStatus + '" (at "' + path_thumb120By90RenditionStatus + '")');
|
|
3911
|
+
}
|
|
3912
|
+
})();
|
|
3913
|
+
if (obj_thumb120By90RenditionStatus_union0_error != null) {
|
|
3914
|
+
obj_thumb120By90RenditionStatus_union0 = obj_thumb120By90RenditionStatus_union0_error.message;
|
|
3915
|
+
}
|
|
3916
|
+
let obj_thumb120By90RenditionStatus_union1 = null;
|
|
3917
|
+
const obj_thumb120By90RenditionStatus_union1_error = (() => {
|
|
3918
|
+
if (obj_thumb120By90RenditionStatus !== null) {
|
|
3919
|
+
return new TypeError('Expected "null" but received "' + typeof obj_thumb120By90RenditionStatus + '" (at "' + path_thumb120By90RenditionStatus + '")');
|
|
3920
|
+
}
|
|
3921
|
+
})();
|
|
3922
|
+
if (obj_thumb120By90RenditionStatus_union1_error != null) {
|
|
3923
|
+
obj_thumb120By90RenditionStatus_union1 = obj_thumb120By90RenditionStatus_union1_error.message;
|
|
3924
|
+
}
|
|
3925
|
+
if (obj_thumb120By90RenditionStatus_union0 && obj_thumb120By90RenditionStatus_union1) {
|
|
3926
|
+
let message = 'Object doesn\'t match union (at "' + path_thumb120By90RenditionStatus + '")';
|
|
3927
|
+
message += '\n' + obj_thumb120By90RenditionStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3928
|
+
message += '\n' + obj_thumb120By90RenditionStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3929
|
+
return new TypeError(message);
|
|
3930
|
+
}
|
|
3931
|
+
const obj_thumb240By180RenditionStatus = obj.thumb240By180RenditionStatus;
|
|
3932
|
+
const path_thumb240By180RenditionStatus = path + '.thumb240By180RenditionStatus';
|
|
3933
|
+
let obj_thumb240By180RenditionStatus_union0 = null;
|
|
3934
|
+
const obj_thumb240By180RenditionStatus_union0_error = (() => {
|
|
3935
|
+
if (typeof obj_thumb240By180RenditionStatus !== 'string') {
|
|
3936
|
+
return new TypeError('Expected "string" but received "' + typeof obj_thumb240By180RenditionStatus + '" (at "' + path_thumb240By180RenditionStatus + '")');
|
|
3937
|
+
}
|
|
3938
|
+
})();
|
|
3939
|
+
if (obj_thumb240By180RenditionStatus_union0_error != null) {
|
|
3940
|
+
obj_thumb240By180RenditionStatus_union0 = obj_thumb240By180RenditionStatus_union0_error.message;
|
|
3941
|
+
}
|
|
3942
|
+
let obj_thumb240By180RenditionStatus_union1 = null;
|
|
3943
|
+
const obj_thumb240By180RenditionStatus_union1_error = (() => {
|
|
3944
|
+
if (obj_thumb240By180RenditionStatus !== null) {
|
|
3945
|
+
return new TypeError('Expected "null" but received "' + typeof obj_thumb240By180RenditionStatus + '" (at "' + path_thumb240By180RenditionStatus + '")');
|
|
3946
|
+
}
|
|
3947
|
+
})();
|
|
3948
|
+
if (obj_thumb240By180RenditionStatus_union1_error != null) {
|
|
3949
|
+
obj_thumb240By180RenditionStatus_union1 = obj_thumb240By180RenditionStatus_union1_error.message;
|
|
3950
|
+
}
|
|
3951
|
+
if (obj_thumb240By180RenditionStatus_union0 && obj_thumb240By180RenditionStatus_union1) {
|
|
3952
|
+
let message = 'Object doesn\'t match union (at "' + path_thumb240By180RenditionStatus + '")';
|
|
3953
|
+
message += '\n' + obj_thumb240By180RenditionStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3954
|
+
message += '\n' + obj_thumb240By180RenditionStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3955
|
+
return new TypeError(message);
|
|
3956
|
+
}
|
|
3957
|
+
const obj_thumb720By480RenditionStatus = obj.thumb720By480RenditionStatus;
|
|
3958
|
+
const path_thumb720By480RenditionStatus = path + '.thumb720By480RenditionStatus';
|
|
3959
|
+
let obj_thumb720By480RenditionStatus_union0 = null;
|
|
3960
|
+
const obj_thumb720By480RenditionStatus_union0_error = (() => {
|
|
3961
|
+
if (typeof obj_thumb720By480RenditionStatus !== 'string') {
|
|
3962
|
+
return new TypeError('Expected "string" but received "' + typeof obj_thumb720By480RenditionStatus + '" (at "' + path_thumb720By480RenditionStatus + '")');
|
|
3963
|
+
}
|
|
3964
|
+
})();
|
|
3965
|
+
if (obj_thumb720By480RenditionStatus_union0_error != null) {
|
|
3966
|
+
obj_thumb720By480RenditionStatus_union0 = obj_thumb720By480RenditionStatus_union0_error.message;
|
|
3967
|
+
}
|
|
3968
|
+
let obj_thumb720By480RenditionStatus_union1 = null;
|
|
3969
|
+
const obj_thumb720By480RenditionStatus_union1_error = (() => {
|
|
3970
|
+
if (obj_thumb720By480RenditionStatus !== null) {
|
|
3971
|
+
return new TypeError('Expected "null" but received "' + typeof obj_thumb720By480RenditionStatus + '" (at "' + path_thumb720By480RenditionStatus + '")');
|
|
3972
|
+
}
|
|
3973
|
+
})();
|
|
3974
|
+
if (obj_thumb720By480RenditionStatus_union1_error != null) {
|
|
3975
|
+
obj_thumb720By480RenditionStatus_union1 = obj_thumb720By480RenditionStatus_union1_error.message;
|
|
3976
|
+
}
|
|
3977
|
+
if (obj_thumb720By480RenditionStatus_union0 && obj_thumb720By480RenditionStatus_union1) {
|
|
3978
|
+
let message = 'Object doesn\'t match union (at "' + path_thumb720By480RenditionStatus + '")';
|
|
3979
|
+
message += '\n' + obj_thumb720By480RenditionStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3980
|
+
message += '\n' + obj_thumb720By480RenditionStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3981
|
+
return new TypeError(message);
|
|
3982
|
+
}
|
|
3983
|
+
const obj_title = obj.title;
|
|
3984
|
+
const path_title = path + '.title';
|
|
3985
|
+
let obj_title_union0 = null;
|
|
3986
|
+
const obj_title_union0_error = (() => {
|
|
3987
|
+
if (typeof obj_title !== 'string') {
|
|
3988
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
3989
|
+
}
|
|
3990
|
+
})();
|
|
3991
|
+
if (obj_title_union0_error != null) {
|
|
3992
|
+
obj_title_union0 = obj_title_union0_error.message;
|
|
3993
|
+
}
|
|
3994
|
+
let obj_title_union1 = null;
|
|
3995
|
+
const obj_title_union1_error = (() => {
|
|
3996
|
+
if (obj_title !== null) {
|
|
3997
|
+
return new TypeError('Expected "null" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
3998
|
+
}
|
|
3999
|
+
})();
|
|
4000
|
+
if (obj_title_union1_error != null) {
|
|
4001
|
+
obj_title_union1 = obj_title_union1_error.message;
|
|
4002
|
+
}
|
|
4003
|
+
if (obj_title_union0 && obj_title_union1) {
|
|
4004
|
+
let message = 'Object doesn\'t match union (at "' + path_title + '")';
|
|
4005
|
+
message += '\n' + obj_title_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4006
|
+
message += '\n' + obj_title_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4007
|
+
return new TypeError(message);
|
|
4008
|
+
}
|
|
4009
|
+
const obj_topics = obj.topics;
|
|
4010
|
+
const path_topics = path + '.topics';
|
|
4011
|
+
let obj_topics_union0 = null;
|
|
4012
|
+
const obj_topics_union0_error = (() => {
|
|
4013
|
+
const referencepath_topicsValidationError = validate$1(obj_topics, path_topics);
|
|
4014
|
+
if (referencepath_topicsValidationError !== null) {
|
|
4015
|
+
let message = 'Object doesn\'t match TopicCollectionRepresentation (at "' + path_topics + '")\n';
|
|
4016
|
+
message += referencepath_topicsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4017
|
+
return new TypeError(message);
|
|
4018
|
+
}
|
|
4019
|
+
})();
|
|
4020
|
+
if (obj_topics_union0_error != null) {
|
|
4021
|
+
obj_topics_union0 = obj_topics_union0_error.message;
|
|
4022
|
+
}
|
|
4023
|
+
let obj_topics_union1 = null;
|
|
4024
|
+
const obj_topics_union1_error = (() => {
|
|
4025
|
+
if (obj_topics !== null) {
|
|
4026
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topics + '" (at "' + path_topics + '")');
|
|
4027
|
+
}
|
|
4028
|
+
})();
|
|
4029
|
+
if (obj_topics_union1_error != null) {
|
|
4030
|
+
obj_topics_union1 = obj_topics_union1_error.message;
|
|
4031
|
+
}
|
|
4032
|
+
if (obj_topics_union0 && obj_topics_union1) {
|
|
4033
|
+
let message = 'Object doesn\'t match union (at "' + path_topics + '")';
|
|
4034
|
+
message += '\n' + obj_topics_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4035
|
+
message += '\n' + obj_topics_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4036
|
+
return new TypeError(message);
|
|
4037
|
+
}
|
|
4038
|
+
const obj_type = obj.type;
|
|
4039
|
+
const path_type = path + '.type';
|
|
4040
|
+
let obj_type_union0 = null;
|
|
4041
|
+
const obj_type_union0_error = (() => {
|
|
4042
|
+
if (typeof obj_type !== 'string') {
|
|
4043
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
4044
|
+
}
|
|
4045
|
+
})();
|
|
4046
|
+
if (obj_type_union0_error != null) {
|
|
4047
|
+
obj_type_union0 = obj_type_union0_error.message;
|
|
4048
|
+
}
|
|
4049
|
+
let obj_type_union1 = null;
|
|
4050
|
+
const obj_type_union1_error = (() => {
|
|
4051
|
+
if (obj_type !== null) {
|
|
4052
|
+
return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
4053
|
+
}
|
|
4054
|
+
})();
|
|
4055
|
+
if (obj_type_union1_error != null) {
|
|
4056
|
+
obj_type_union1 = obj_type_union1_error.message;
|
|
4057
|
+
}
|
|
4058
|
+
if (obj_type_union0 && obj_type_union1) {
|
|
4059
|
+
let message = 'Object doesn\'t match union (at "' + path_type + '")';
|
|
4060
|
+
message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4061
|
+
message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4062
|
+
return new TypeError(message);
|
|
4063
|
+
}
|
|
4064
|
+
const obj_url = obj.url;
|
|
4065
|
+
const path_url = path + '.url';
|
|
4066
|
+
let obj_url_union0 = null;
|
|
4067
|
+
const obj_url_union0_error = (() => {
|
|
4068
|
+
if (typeof obj_url !== 'string') {
|
|
4069
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
4070
|
+
}
|
|
4071
|
+
})();
|
|
4072
|
+
if (obj_url_union0_error != null) {
|
|
4073
|
+
obj_url_union0 = obj_url_union0_error.message;
|
|
4074
|
+
}
|
|
4075
|
+
let obj_url_union1 = null;
|
|
4076
|
+
const obj_url_union1_error = (() => {
|
|
4077
|
+
if (obj_url !== null) {
|
|
4078
|
+
return new TypeError('Expected "null" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
4079
|
+
}
|
|
4080
|
+
})();
|
|
4081
|
+
if (obj_url_union1_error != null) {
|
|
4082
|
+
obj_url_union1 = obj_url_union1_error.message;
|
|
4083
|
+
}
|
|
4084
|
+
if (obj_url_union0 && obj_url_union1) {
|
|
4085
|
+
let message = 'Object doesn\'t match union (at "' + path_url + '")';
|
|
4086
|
+
message += '\n' + obj_url_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4087
|
+
message += '\n' + obj_url_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4088
|
+
return new TypeError(message);
|
|
4089
|
+
}
|
|
4090
|
+
const obj_versionNumber = obj.versionNumber;
|
|
4091
|
+
const path_versionNumber = path + '.versionNumber';
|
|
4092
|
+
let obj_versionNumber_union0 = null;
|
|
4093
|
+
const obj_versionNumber_union0_error = (() => {
|
|
4094
|
+
if (typeof obj_versionNumber !== 'string') {
|
|
4095
|
+
return new TypeError('Expected "string" but received "' + typeof obj_versionNumber + '" (at "' + path_versionNumber + '")');
|
|
4096
|
+
}
|
|
4097
|
+
})();
|
|
4098
|
+
if (obj_versionNumber_union0_error != null) {
|
|
4099
|
+
obj_versionNumber_union0 = obj_versionNumber_union0_error.message;
|
|
4100
|
+
}
|
|
4101
|
+
let obj_versionNumber_union1 = null;
|
|
4102
|
+
const obj_versionNumber_union1_error = (() => {
|
|
4103
|
+
if (obj_versionNumber !== null) {
|
|
4104
|
+
return new TypeError('Expected "null" but received "' + typeof obj_versionNumber + '" (at "' + path_versionNumber + '")');
|
|
4105
|
+
}
|
|
4106
|
+
})();
|
|
4107
|
+
if (obj_versionNumber_union1_error != null) {
|
|
4108
|
+
obj_versionNumber_union1 = obj_versionNumber_union1_error.message;
|
|
4109
|
+
}
|
|
4110
|
+
if (obj_versionNumber_union0 && obj_versionNumber_union1) {
|
|
4111
|
+
let message = 'Object doesn\'t match union (at "' + path_versionNumber + '")';
|
|
4112
|
+
message += '\n' + obj_versionNumber_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4113
|
+
message += '\n' + obj_versionNumber_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4114
|
+
return new TypeError(message);
|
|
4115
|
+
}
|
|
4116
|
+
})();
|
|
4117
|
+
return v_error === undefined ? null : v_error;
|
|
4118
|
+
}
|
|
4119
|
+
const RepresentationType = 'FileDetailRepresentation';
|
|
4120
|
+
function keyBuilder(luvio, config) {
|
|
4121
|
+
return keyPrefix + '::' + RepresentationType + ':' + (config.id === null ? '' : config.id);
|
|
4122
|
+
}
|
|
4123
|
+
function keyBuilderFromType(luvio, object) {
|
|
4124
|
+
const keyParams = {
|
|
4125
|
+
id: object.id
|
|
4126
|
+
};
|
|
4127
|
+
return keyBuilder(luvio, keyParams);
|
|
4128
|
+
}
|
|
4129
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
4130
|
+
return input;
|
|
4131
|
+
}
|
|
4132
|
+
const select$1 = function FileDetailRepresentationSelect() {
|
|
4133
|
+
const { selections: ContentHubRepositoryRepresentation__selections, opaque: ContentHubRepositoryRepresentation__opaque, } = select$i();
|
|
4134
|
+
const { selections: ExternalFilePermissionInformationRepresentation__selections, opaque: ExternalFilePermissionInformationRepresentation__opaque, } = select$f();
|
|
4135
|
+
const { selections: FileAssetRepresentation__selections, opaque: FileAssetRepresentation__opaque, } = select$e();
|
|
4136
|
+
const { selections: ModerationFlagsRepresentation__selections, opaque: ModerationFlagsRepresentation__opaque, } = select$b();
|
|
4137
|
+
const { selections: MotifRepresentation__selections, opaque: MotifRepresentation__opaque, } = select$a();
|
|
4138
|
+
const { selections: ReferenceRepresentation__selections, opaque: ReferenceRepresentation__opaque, } = select$k();
|
|
4139
|
+
const { selections: UserSummaryRepresentation__selections, opaque: UserSummaryRepresentation__opaque, } = select$5();
|
|
4140
|
+
const { selections: TopicCollectionRepresentation__selections, opaque: TopicCollectionRepresentation__opaque, } = select$2();
|
|
4141
|
+
return {
|
|
4142
|
+
kind: 'Fragment',
|
|
4143
|
+
version: VERSION,
|
|
4144
|
+
private: [],
|
|
4145
|
+
selections: [
|
|
4146
|
+
{
|
|
4147
|
+
name: 'checksum',
|
|
4148
|
+
kind: 'Scalar'
|
|
4149
|
+
},
|
|
4150
|
+
{
|
|
4151
|
+
name: 'contentHubRepository',
|
|
4152
|
+
kind: 'Object',
|
|
4153
|
+
nullable: true,
|
|
4154
|
+
selections: ContentHubRepositoryRepresentation__selections
|
|
4155
|
+
},
|
|
4156
|
+
{
|
|
4157
|
+
name: 'contentModifiedDate',
|
|
4158
|
+
kind: 'Scalar'
|
|
4159
|
+
},
|
|
4160
|
+
{
|
|
4161
|
+
name: 'contentSize',
|
|
4162
|
+
kind: 'Scalar'
|
|
4163
|
+
},
|
|
4164
|
+
{
|
|
4165
|
+
name: 'contentUrl',
|
|
4166
|
+
kind: 'Scalar'
|
|
4167
|
+
},
|
|
4168
|
+
{
|
|
4169
|
+
name: 'contentVersionId',
|
|
4170
|
+
kind: 'Scalar'
|
|
4171
|
+
},
|
|
4172
|
+
{
|
|
4173
|
+
name: 'createdDate',
|
|
4174
|
+
kind: 'Scalar'
|
|
4175
|
+
},
|
|
4176
|
+
{
|
|
4177
|
+
name: 'description',
|
|
4178
|
+
kind: 'Scalar'
|
|
4179
|
+
},
|
|
4180
|
+
{
|
|
4181
|
+
name: 'downloadUrl',
|
|
4182
|
+
kind: 'Scalar'
|
|
4183
|
+
},
|
|
4184
|
+
{
|
|
4185
|
+
name: 'externalDocumentUrl',
|
|
4186
|
+
kind: 'Scalar'
|
|
4187
|
+
},
|
|
4188
|
+
{
|
|
4189
|
+
name: 'externalFilePermissionInformation',
|
|
4190
|
+
kind: 'Object',
|
|
4191
|
+
nullable: true,
|
|
4192
|
+
selections: ExternalFilePermissionInformationRepresentation__selections
|
|
4193
|
+
},
|
|
4194
|
+
{
|
|
4195
|
+
name: 'fileAsset',
|
|
4196
|
+
kind: 'Object',
|
|
4197
|
+
nullable: true,
|
|
4198
|
+
selections: FileAssetRepresentation__selections
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
name: 'fileExtension',
|
|
4202
|
+
kind: 'Scalar'
|
|
4203
|
+
},
|
|
4204
|
+
{
|
|
4205
|
+
name: 'fileType',
|
|
4206
|
+
kind: 'Scalar'
|
|
4207
|
+
},
|
|
4208
|
+
{
|
|
4209
|
+
name: 'flashRenditionStatus',
|
|
4210
|
+
kind: 'Scalar'
|
|
4211
|
+
},
|
|
4212
|
+
{
|
|
4213
|
+
name: 'id',
|
|
4214
|
+
kind: 'Scalar'
|
|
4215
|
+
},
|
|
4216
|
+
{
|
|
4217
|
+
name: 'isFileAsset',
|
|
4218
|
+
kind: 'Scalar'
|
|
4219
|
+
},
|
|
4220
|
+
{
|
|
4221
|
+
name: 'isInMyFileSync',
|
|
4222
|
+
kind: 'Scalar'
|
|
4223
|
+
},
|
|
4224
|
+
{
|
|
4225
|
+
name: 'isMajorVersion',
|
|
4226
|
+
kind: 'Scalar'
|
|
4227
|
+
},
|
|
4228
|
+
{
|
|
4229
|
+
name: 'mimeType',
|
|
4230
|
+
kind: 'Scalar'
|
|
4231
|
+
},
|
|
4232
|
+
{
|
|
4233
|
+
name: 'moderationFlags',
|
|
4234
|
+
kind: 'Object',
|
|
4235
|
+
nullable: true,
|
|
4236
|
+
selections: ModerationFlagsRepresentation__selections
|
|
4237
|
+
},
|
|
4238
|
+
{
|
|
4239
|
+
name: 'modifiedDate',
|
|
4240
|
+
kind: 'Scalar'
|
|
4241
|
+
},
|
|
4242
|
+
{
|
|
4243
|
+
name: 'motif',
|
|
4244
|
+
kind: 'Object',
|
|
4245
|
+
nullable: true,
|
|
4246
|
+
selections: MotifRepresentation__selections
|
|
4247
|
+
},
|
|
4248
|
+
{
|
|
4249
|
+
name: 'mySubscription',
|
|
4250
|
+
kind: 'Object',
|
|
4251
|
+
nullable: true,
|
|
4252
|
+
selections: ReferenceRepresentation__selections
|
|
4253
|
+
},
|
|
4254
|
+
{
|
|
4255
|
+
name: 'name',
|
|
4256
|
+
kind: 'Scalar'
|
|
4257
|
+
},
|
|
4258
|
+
{
|
|
4259
|
+
name: 'origin',
|
|
4260
|
+
kind: 'Scalar'
|
|
4261
|
+
},
|
|
4262
|
+
{
|
|
4263
|
+
name: 'owner',
|
|
4264
|
+
kind: 'Object',
|
|
4265
|
+
nullable: true,
|
|
4266
|
+
selections: UserSummaryRepresentation__selections
|
|
4267
|
+
},
|
|
4268
|
+
{
|
|
4269
|
+
name: 'pageCount',
|
|
4270
|
+
kind: 'Scalar'
|
|
4271
|
+
},
|
|
4272
|
+
{
|
|
4273
|
+
name: 'parentFolder',
|
|
4274
|
+
kind: 'Object',
|
|
4275
|
+
nullable: true,
|
|
4276
|
+
selections: ReferenceRepresentation__selections
|
|
4277
|
+
},
|
|
4278
|
+
{
|
|
4279
|
+
name: 'pdfRenditionStatus',
|
|
4280
|
+
kind: 'Scalar'
|
|
4281
|
+
},
|
|
4282
|
+
{
|
|
4283
|
+
name: 'publishStatus',
|
|
4284
|
+
kind: 'Scalar'
|
|
4285
|
+
},
|
|
4286
|
+
{
|
|
4287
|
+
name: 'renditionUrl',
|
|
4288
|
+
kind: 'Scalar'
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
name: 'renditionUrl240By180',
|
|
4292
|
+
kind: 'Scalar'
|
|
4293
|
+
},
|
|
4294
|
+
{
|
|
4295
|
+
name: 'renditionUrl720By480',
|
|
4296
|
+
kind: 'Scalar'
|
|
4297
|
+
},
|
|
4298
|
+
{
|
|
4299
|
+
name: 'repositoryFileId',
|
|
4300
|
+
kind: 'Scalar'
|
|
4301
|
+
},
|
|
4302
|
+
{
|
|
4303
|
+
name: 'repositoryFileUrl',
|
|
4304
|
+
kind: 'Scalar'
|
|
4305
|
+
},
|
|
4306
|
+
{
|
|
4307
|
+
name: 'sharingOption',
|
|
4308
|
+
kind: 'Scalar'
|
|
4309
|
+
},
|
|
4310
|
+
{
|
|
4311
|
+
name: 'sharingPrivacy',
|
|
4312
|
+
kind: 'Scalar'
|
|
4313
|
+
},
|
|
4314
|
+
{
|
|
4315
|
+
name: 'sharingRole',
|
|
4316
|
+
kind: 'Scalar'
|
|
4317
|
+
},
|
|
4318
|
+
{
|
|
4319
|
+
name: 'systemModstamp',
|
|
4320
|
+
kind: 'Scalar'
|
|
4321
|
+
},
|
|
4322
|
+
{
|
|
4323
|
+
name: 'textPreview',
|
|
4324
|
+
kind: 'Scalar'
|
|
4325
|
+
},
|
|
4326
|
+
{
|
|
4327
|
+
name: 'thumb120By90RenditionStatus',
|
|
4328
|
+
kind: 'Scalar'
|
|
4329
|
+
},
|
|
4330
|
+
{
|
|
4331
|
+
name: 'thumb240By180RenditionStatus',
|
|
4332
|
+
kind: 'Scalar'
|
|
4333
|
+
},
|
|
4334
|
+
{
|
|
4335
|
+
name: 'thumb720By480RenditionStatus',
|
|
4336
|
+
kind: 'Scalar'
|
|
4337
|
+
},
|
|
4338
|
+
{
|
|
4339
|
+
name: 'title',
|
|
4340
|
+
kind: 'Scalar'
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
name: 'topics',
|
|
4344
|
+
kind: 'Object',
|
|
4345
|
+
nullable: true,
|
|
4346
|
+
selections: TopicCollectionRepresentation__selections
|
|
4347
|
+
},
|
|
4348
|
+
{
|
|
4349
|
+
name: 'type',
|
|
4350
|
+
kind: 'Scalar'
|
|
4351
|
+
},
|
|
4352
|
+
{
|
|
4353
|
+
name: 'url',
|
|
4354
|
+
kind: 'Scalar'
|
|
4355
|
+
},
|
|
4356
|
+
{
|
|
4357
|
+
name: 'versionNumber',
|
|
4358
|
+
kind: 'Scalar'
|
|
4359
|
+
}
|
|
4360
|
+
]
|
|
4361
|
+
};
|
|
4362
|
+
};
|
|
4363
|
+
function equals(existing, incoming) {
|
|
4364
|
+
const existing_checksum = existing.checksum;
|
|
4365
|
+
const incoming_checksum = incoming.checksum;
|
|
4366
|
+
if (!(existing_checksum === incoming_checksum)) {
|
|
4367
|
+
return false;
|
|
4368
|
+
}
|
|
4369
|
+
const existing_contentHubRepository = existing.contentHubRepository;
|
|
4370
|
+
const incoming_contentHubRepository = incoming.contentHubRepository;
|
|
4371
|
+
if (!(existing_contentHubRepository === incoming_contentHubRepository
|
|
4372
|
+
|| (existing_contentHubRepository != null &&
|
|
4373
|
+
incoming_contentHubRepository != null &&
|
|
4374
|
+
equals$h(existing_contentHubRepository, incoming_contentHubRepository)))) {
|
|
4375
|
+
return false;
|
|
4376
|
+
}
|
|
4377
|
+
const existing_contentModifiedDate = existing.contentModifiedDate;
|
|
4378
|
+
const incoming_contentModifiedDate = incoming.contentModifiedDate;
|
|
4379
|
+
if (!(existing_contentModifiedDate === incoming_contentModifiedDate)) {
|
|
4380
|
+
return false;
|
|
4381
|
+
}
|
|
4382
|
+
const existing_contentSize = existing.contentSize;
|
|
4383
|
+
const incoming_contentSize = incoming.contentSize;
|
|
4384
|
+
if (!(existing_contentSize === incoming_contentSize)) {
|
|
4385
|
+
return false;
|
|
4386
|
+
}
|
|
4387
|
+
const existing_contentUrl = existing.contentUrl;
|
|
4388
|
+
const incoming_contentUrl = incoming.contentUrl;
|
|
4389
|
+
if (!(existing_contentUrl === incoming_contentUrl)) {
|
|
4390
|
+
return false;
|
|
4391
|
+
}
|
|
4392
|
+
const existing_contentVersionId = existing.contentVersionId;
|
|
4393
|
+
const incoming_contentVersionId = incoming.contentVersionId;
|
|
4394
|
+
if (!(existing_contentVersionId === incoming_contentVersionId)) {
|
|
4395
|
+
return false;
|
|
4396
|
+
}
|
|
4397
|
+
const existing_createdDate = existing.createdDate;
|
|
4398
|
+
const incoming_createdDate = incoming.createdDate;
|
|
4399
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
4400
|
+
return false;
|
|
4401
|
+
}
|
|
4402
|
+
const existing_description = existing.description;
|
|
4403
|
+
const incoming_description = incoming.description;
|
|
4404
|
+
if (!(existing_description === incoming_description)) {
|
|
4405
|
+
return false;
|
|
4406
|
+
}
|
|
4407
|
+
const existing_downloadUrl = existing.downloadUrl;
|
|
4408
|
+
const incoming_downloadUrl = incoming.downloadUrl;
|
|
4409
|
+
if (!(existing_downloadUrl === incoming_downloadUrl)) {
|
|
4410
|
+
return false;
|
|
4411
|
+
}
|
|
4412
|
+
const existing_externalDocumentUrl = existing.externalDocumentUrl;
|
|
4413
|
+
const incoming_externalDocumentUrl = incoming.externalDocumentUrl;
|
|
4414
|
+
if (!(existing_externalDocumentUrl === incoming_externalDocumentUrl)) {
|
|
4415
|
+
return false;
|
|
4416
|
+
}
|
|
4417
|
+
const existing_externalFilePermissionInformation = existing.externalFilePermissionInformation;
|
|
4418
|
+
const incoming_externalFilePermissionInformation = incoming.externalFilePermissionInformation;
|
|
4419
|
+
if (!(existing_externalFilePermissionInformation === incoming_externalFilePermissionInformation
|
|
4420
|
+
|| (existing_externalFilePermissionInformation != null &&
|
|
4421
|
+
incoming_externalFilePermissionInformation != null &&
|
|
4422
|
+
equals$e(existing_externalFilePermissionInformation, incoming_externalFilePermissionInformation)))) {
|
|
4423
|
+
return false;
|
|
4424
|
+
}
|
|
4425
|
+
const existing_fileAsset = existing.fileAsset;
|
|
4426
|
+
const incoming_fileAsset = incoming.fileAsset;
|
|
4427
|
+
if (!(existing_fileAsset === incoming_fileAsset
|
|
4428
|
+
|| (existing_fileAsset != null &&
|
|
4429
|
+
incoming_fileAsset != null &&
|
|
4430
|
+
equals$d(existing_fileAsset, incoming_fileAsset)))) {
|
|
4431
|
+
return false;
|
|
4432
|
+
}
|
|
4433
|
+
const existing_fileExtension = existing.fileExtension;
|
|
4434
|
+
const incoming_fileExtension = incoming.fileExtension;
|
|
4435
|
+
if (!(existing_fileExtension === incoming_fileExtension)) {
|
|
4436
|
+
return false;
|
|
4437
|
+
}
|
|
4438
|
+
const existing_fileType = existing.fileType;
|
|
4439
|
+
const incoming_fileType = incoming.fileType;
|
|
4440
|
+
if (!(existing_fileType === incoming_fileType)) {
|
|
4441
|
+
return false;
|
|
4442
|
+
}
|
|
4443
|
+
const existing_flashRenditionStatus = existing.flashRenditionStatus;
|
|
4444
|
+
const incoming_flashRenditionStatus = incoming.flashRenditionStatus;
|
|
4445
|
+
if (!(existing_flashRenditionStatus === incoming_flashRenditionStatus)) {
|
|
4446
|
+
return false;
|
|
4447
|
+
}
|
|
4448
|
+
const existing_id = existing.id;
|
|
4449
|
+
const incoming_id = incoming.id;
|
|
4450
|
+
if (!(existing_id === incoming_id)) {
|
|
4451
|
+
return false;
|
|
4452
|
+
}
|
|
4453
|
+
const existing_isFileAsset = existing.isFileAsset;
|
|
4454
|
+
const incoming_isFileAsset = incoming.isFileAsset;
|
|
4455
|
+
if (!(existing_isFileAsset === incoming_isFileAsset)) {
|
|
4456
|
+
return false;
|
|
4457
|
+
}
|
|
4458
|
+
const existing_isInMyFileSync = existing.isInMyFileSync;
|
|
4459
|
+
const incoming_isInMyFileSync = incoming.isInMyFileSync;
|
|
4460
|
+
if (!(existing_isInMyFileSync === incoming_isInMyFileSync)) {
|
|
4461
|
+
return false;
|
|
4462
|
+
}
|
|
4463
|
+
const existing_isMajorVersion = existing.isMajorVersion;
|
|
4464
|
+
const incoming_isMajorVersion = incoming.isMajorVersion;
|
|
4465
|
+
if (!(existing_isMajorVersion === incoming_isMajorVersion)) {
|
|
4466
|
+
return false;
|
|
4467
|
+
}
|
|
4468
|
+
const existing_mimeType = existing.mimeType;
|
|
4469
|
+
const incoming_mimeType = incoming.mimeType;
|
|
4470
|
+
if (!(existing_mimeType === incoming_mimeType)) {
|
|
4471
|
+
return false;
|
|
4472
|
+
}
|
|
4473
|
+
const existing_moderationFlags = existing.moderationFlags;
|
|
4474
|
+
const incoming_moderationFlags = incoming.moderationFlags;
|
|
4475
|
+
if (!(existing_moderationFlags === incoming_moderationFlags
|
|
4476
|
+
|| (existing_moderationFlags != null &&
|
|
4477
|
+
incoming_moderationFlags != null &&
|
|
4478
|
+
equals$a(existing_moderationFlags, incoming_moderationFlags)))) {
|
|
4479
|
+
return false;
|
|
4480
|
+
}
|
|
4481
|
+
const existing_modifiedDate = existing.modifiedDate;
|
|
4482
|
+
const incoming_modifiedDate = incoming.modifiedDate;
|
|
4483
|
+
if (!(existing_modifiedDate === incoming_modifiedDate)) {
|
|
4484
|
+
return false;
|
|
4485
|
+
}
|
|
4486
|
+
const existing_motif = existing.motif;
|
|
4487
|
+
const incoming_motif = incoming.motif;
|
|
4488
|
+
if (!(existing_motif === incoming_motif
|
|
4489
|
+
|| (existing_motif != null &&
|
|
4490
|
+
incoming_motif != null &&
|
|
4491
|
+
equals$9(existing_motif, incoming_motif)))) {
|
|
4492
|
+
return false;
|
|
4493
|
+
}
|
|
4494
|
+
const existing_mySubscription = existing.mySubscription;
|
|
4495
|
+
const incoming_mySubscription = incoming.mySubscription;
|
|
4496
|
+
if (!(existing_mySubscription === incoming_mySubscription
|
|
4497
|
+
|| (existing_mySubscription != null &&
|
|
4498
|
+
incoming_mySubscription != null &&
|
|
4499
|
+
equals$j(existing_mySubscription, incoming_mySubscription)))) {
|
|
4500
|
+
return false;
|
|
4501
|
+
}
|
|
4502
|
+
const existing_name = existing.name;
|
|
4503
|
+
const incoming_name = incoming.name;
|
|
4504
|
+
if (!(existing_name === incoming_name)) {
|
|
4505
|
+
return false;
|
|
4506
|
+
}
|
|
4507
|
+
const existing_origin = existing.origin;
|
|
4508
|
+
const incoming_origin = incoming.origin;
|
|
4509
|
+
if (!(existing_origin === incoming_origin)) {
|
|
4510
|
+
return false;
|
|
4511
|
+
}
|
|
4512
|
+
const existing_owner = existing.owner;
|
|
4513
|
+
const incoming_owner = incoming.owner;
|
|
4514
|
+
if (!(existing_owner === incoming_owner
|
|
4515
|
+
|| (existing_owner != null &&
|
|
4516
|
+
incoming_owner != null &&
|
|
4517
|
+
equals$4(existing_owner, incoming_owner)))) {
|
|
4518
|
+
return false;
|
|
4519
|
+
}
|
|
4520
|
+
const existing_pageCount = existing.pageCount;
|
|
4521
|
+
const incoming_pageCount = incoming.pageCount;
|
|
4522
|
+
if (!(existing_pageCount === incoming_pageCount)) {
|
|
4523
|
+
return false;
|
|
4524
|
+
}
|
|
4525
|
+
const existing_parentFolder = existing.parentFolder;
|
|
4526
|
+
const incoming_parentFolder = incoming.parentFolder;
|
|
4527
|
+
if (!(existing_parentFolder === incoming_parentFolder
|
|
4528
|
+
|| (existing_parentFolder != null &&
|
|
4529
|
+
incoming_parentFolder != null &&
|
|
4530
|
+
equals$j(existing_parentFolder, incoming_parentFolder)))) {
|
|
4531
|
+
return false;
|
|
4532
|
+
}
|
|
4533
|
+
const existing_pdfRenditionStatus = existing.pdfRenditionStatus;
|
|
4534
|
+
const incoming_pdfRenditionStatus = incoming.pdfRenditionStatus;
|
|
4535
|
+
if (!(existing_pdfRenditionStatus === incoming_pdfRenditionStatus)) {
|
|
4536
|
+
return false;
|
|
4537
|
+
}
|
|
4538
|
+
const existing_publishStatus = existing.publishStatus;
|
|
4539
|
+
const incoming_publishStatus = incoming.publishStatus;
|
|
4540
|
+
if (!(existing_publishStatus === incoming_publishStatus)) {
|
|
4541
|
+
return false;
|
|
4542
|
+
}
|
|
4543
|
+
const existing_renditionUrl = existing.renditionUrl;
|
|
4544
|
+
const incoming_renditionUrl = incoming.renditionUrl;
|
|
4545
|
+
if (!(existing_renditionUrl === incoming_renditionUrl)) {
|
|
4546
|
+
return false;
|
|
4547
|
+
}
|
|
4548
|
+
const existing_renditionUrl240By180 = existing.renditionUrl240By180;
|
|
4549
|
+
const incoming_renditionUrl240By180 = incoming.renditionUrl240By180;
|
|
4550
|
+
if (!(existing_renditionUrl240By180 === incoming_renditionUrl240By180)) {
|
|
4551
|
+
return false;
|
|
4552
|
+
}
|
|
4553
|
+
const existing_renditionUrl720By480 = existing.renditionUrl720By480;
|
|
4554
|
+
const incoming_renditionUrl720By480 = incoming.renditionUrl720By480;
|
|
4555
|
+
if (!(existing_renditionUrl720By480 === incoming_renditionUrl720By480)) {
|
|
4556
|
+
return false;
|
|
4557
|
+
}
|
|
4558
|
+
const existing_repositoryFileId = existing.repositoryFileId;
|
|
4559
|
+
const incoming_repositoryFileId = incoming.repositoryFileId;
|
|
4560
|
+
if (!(existing_repositoryFileId === incoming_repositoryFileId)) {
|
|
4561
|
+
return false;
|
|
4562
|
+
}
|
|
4563
|
+
const existing_repositoryFileUrl = existing.repositoryFileUrl;
|
|
4564
|
+
const incoming_repositoryFileUrl = incoming.repositoryFileUrl;
|
|
4565
|
+
if (!(existing_repositoryFileUrl === incoming_repositoryFileUrl)) {
|
|
4566
|
+
return false;
|
|
4567
|
+
}
|
|
4568
|
+
const existing_sharingOption = existing.sharingOption;
|
|
4569
|
+
const incoming_sharingOption = incoming.sharingOption;
|
|
4570
|
+
if (!(existing_sharingOption === incoming_sharingOption)) {
|
|
4571
|
+
return false;
|
|
4572
|
+
}
|
|
4573
|
+
const existing_sharingPrivacy = existing.sharingPrivacy;
|
|
4574
|
+
const incoming_sharingPrivacy = incoming.sharingPrivacy;
|
|
4575
|
+
if (!(existing_sharingPrivacy === incoming_sharingPrivacy)) {
|
|
4576
|
+
return false;
|
|
4577
|
+
}
|
|
4578
|
+
const existing_sharingRole = existing.sharingRole;
|
|
4579
|
+
const incoming_sharingRole = incoming.sharingRole;
|
|
4580
|
+
if (!(existing_sharingRole === incoming_sharingRole)) {
|
|
4581
|
+
return false;
|
|
4582
|
+
}
|
|
4583
|
+
const existing_systemModstamp = existing.systemModstamp;
|
|
4584
|
+
const incoming_systemModstamp = incoming.systemModstamp;
|
|
4585
|
+
if (!(existing_systemModstamp === incoming_systemModstamp)) {
|
|
4586
|
+
return false;
|
|
4587
|
+
}
|
|
4588
|
+
const existing_textPreview = existing.textPreview;
|
|
4589
|
+
const incoming_textPreview = incoming.textPreview;
|
|
4590
|
+
if (!(existing_textPreview === incoming_textPreview)) {
|
|
4591
|
+
return false;
|
|
4592
|
+
}
|
|
4593
|
+
const existing_thumb120By90RenditionStatus = existing.thumb120By90RenditionStatus;
|
|
4594
|
+
const incoming_thumb120By90RenditionStatus = incoming.thumb120By90RenditionStatus;
|
|
4595
|
+
if (!(existing_thumb120By90RenditionStatus === incoming_thumb120By90RenditionStatus)) {
|
|
4596
|
+
return false;
|
|
4597
|
+
}
|
|
4598
|
+
const existing_thumb240By180RenditionStatus = existing.thumb240By180RenditionStatus;
|
|
4599
|
+
const incoming_thumb240By180RenditionStatus = incoming.thumb240By180RenditionStatus;
|
|
4600
|
+
if (!(existing_thumb240By180RenditionStatus === incoming_thumb240By180RenditionStatus)) {
|
|
4601
|
+
return false;
|
|
4602
|
+
}
|
|
4603
|
+
const existing_thumb720By480RenditionStatus = existing.thumb720By480RenditionStatus;
|
|
4604
|
+
const incoming_thumb720By480RenditionStatus = incoming.thumb720By480RenditionStatus;
|
|
4605
|
+
if (!(existing_thumb720By480RenditionStatus === incoming_thumb720By480RenditionStatus)) {
|
|
4606
|
+
return false;
|
|
4607
|
+
}
|
|
4608
|
+
const existing_title = existing.title;
|
|
4609
|
+
const incoming_title = incoming.title;
|
|
4610
|
+
if (!(existing_title === incoming_title)) {
|
|
4611
|
+
return false;
|
|
4612
|
+
}
|
|
4613
|
+
const existing_topics = existing.topics;
|
|
4614
|
+
const incoming_topics = incoming.topics;
|
|
4615
|
+
if (!(existing_topics === incoming_topics
|
|
4616
|
+
|| (existing_topics != null &&
|
|
4617
|
+
incoming_topics != null &&
|
|
4618
|
+
equals$1(existing_topics, incoming_topics)))) {
|
|
4619
|
+
return false;
|
|
4620
|
+
}
|
|
4621
|
+
const existing_type = existing.type;
|
|
4622
|
+
const incoming_type = incoming.type;
|
|
4623
|
+
if (!(existing_type === incoming_type)) {
|
|
4624
|
+
return false;
|
|
4625
|
+
}
|
|
4626
|
+
const existing_url = existing.url;
|
|
4627
|
+
const incoming_url = incoming.url;
|
|
4628
|
+
if (!(existing_url === incoming_url)) {
|
|
4629
|
+
return false;
|
|
4630
|
+
}
|
|
4631
|
+
const existing_versionNumber = existing.versionNumber;
|
|
4632
|
+
const incoming_versionNumber = incoming.versionNumber;
|
|
4633
|
+
if (!(existing_versionNumber === incoming_versionNumber)) {
|
|
4634
|
+
return false;
|
|
4635
|
+
}
|
|
4636
|
+
return true;
|
|
4637
|
+
}
|
|
4638
|
+
const ingest = function FileDetailRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4639
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4640
|
+
const validateError = validate(input);
|
|
4641
|
+
if (validateError !== null) {
|
|
4642
|
+
throw validateError;
|
|
4643
|
+
}
|
|
4644
|
+
}
|
|
4645
|
+
const key = keyBuilderFromType(luvio, input);
|
|
4646
|
+
const ttlToUse = TTL;
|
|
4647
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "files", VERSION, RepresentationType, equals);
|
|
4648
|
+
return createLink(key);
|
|
4649
|
+
};
|
|
4650
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
4651
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4652
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
4653
|
+
rootKeySet.set(rootKey, {
|
|
4654
|
+
namespace: keyPrefix,
|
|
4655
|
+
representationName: RepresentationType,
|
|
4656
|
+
mergeable: false
|
|
4657
|
+
});
|
|
4658
|
+
}
|
|
4659
|
+
|
|
4660
|
+
function select(luvio, params) {
|
|
4661
|
+
return select$1();
|
|
4662
|
+
}
|
|
4663
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4664
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
4665
|
+
}
|
|
4666
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
4667
|
+
const { body } = response;
|
|
4668
|
+
const key = keyBuilderFromType(luvio, body);
|
|
4669
|
+
luvio.storeIngest(key, ingest, body);
|
|
4670
|
+
const snapshot = luvio.storeLookup({
|
|
4671
|
+
recordId: key,
|
|
4672
|
+
node: select(),
|
|
4673
|
+
variables: {},
|
|
4674
|
+
});
|
|
4675
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4676
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4677
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
deepFreeze(snapshot.data);
|
|
4681
|
+
return snapshot;
|
|
4682
|
+
}
|
|
4683
|
+
function createResourceRequest(config) {
|
|
4684
|
+
const headers = {};
|
|
4685
|
+
return {
|
|
4686
|
+
baseUri: '/services/data/v62.0',
|
|
4687
|
+
basePath: '/connect/files/users/' + config.urlParams.userId + '',
|
|
4688
|
+
method: 'post',
|
|
4689
|
+
body: config.body,
|
|
4690
|
+
urlParams: config.urlParams,
|
|
4691
|
+
queryParams: {},
|
|
4692
|
+
headers,
|
|
4693
|
+
priority: 'normal',
|
|
4694
|
+
};
|
|
4695
|
+
}
|
|
4696
|
+
|
|
4697
|
+
const adapterName = 'createContentDocFromContentBody';
|
|
4698
|
+
const createContentDocFromContentBody_ConfigPropertyMetadata = [
|
|
4699
|
+
generateParamConfigMetadata('userId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4700
|
+
generateParamConfigMetadata('contentBodyId', true, 2 /* Body */, 0 /* String */),
|
|
4701
|
+
generateParamConfigMetadata('contentModifiedDate', false, 2 /* Body */, 0 /* String */),
|
|
4702
|
+
generateParamConfigMetadata('desc', false, 2 /* Body */, 0 /* String */),
|
|
4703
|
+
generateParamConfigMetadata('firstPublishLocationId', false, 2 /* Body */, 0 /* String */),
|
|
4704
|
+
generateParamConfigMetadata('includeExternalFilePermissionsInfo', false, 2 /* Body */, 1 /* Boolean */),
|
|
4705
|
+
generateParamConfigMetadata('isInMyFileSync', false, 2 /* Body */, 1 /* Boolean */),
|
|
4706
|
+
generateParamConfigMetadata('isMajorVersion', false, 2 /* Body */, 1 /* Boolean */),
|
|
4707
|
+
generateParamConfigMetadata('networkId', true, 2 /* Body */, 0 /* String */),
|
|
4708
|
+
generateParamConfigMetadata('parentFolderId', false, 2 /* Body */, 0 /* String */),
|
|
4709
|
+
generateParamConfigMetadata('pathOnClient', true, 2 /* Body */, 0 /* String */),
|
|
4710
|
+
generateParamConfigMetadata('repositoryFileId', false, 2 /* Body */, 0 /* String */),
|
|
4711
|
+
generateParamConfigMetadata('repositoryFileUri', false, 2 /* Body */, 0 /* String */),
|
|
4712
|
+
generateParamConfigMetadata('repositoryId', false, 2 /* Body */, 0 /* String */),
|
|
4713
|
+
generateParamConfigMetadata('reuseReference', false, 2 /* Body */, 1 /* Boolean */),
|
|
4714
|
+
generateParamConfigMetadata('sharingOption', false, 2 /* Body */, 0 /* String */),
|
|
4715
|
+
generateParamConfigMetadata('sharingPrivacy', false, 2 /* Body */, 0 /* String */),
|
|
4716
|
+
generateParamConfigMetadata('title', true, 2 /* Body */, 0 /* String */),
|
|
4717
|
+
];
|
|
4718
|
+
const createContentDocFromContentBody_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, createContentDocFromContentBody_ConfigPropertyMetadata);
|
|
4719
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(createContentDocFromContentBody_ConfigPropertyMetadata);
|
|
4720
|
+
function typeCheckConfig(untrustedConfig) {
|
|
4721
|
+
const config = {};
|
|
4722
|
+
typeCheckConfig$2(untrustedConfig, config, createContentDocFromContentBody_ConfigPropertyMetadata);
|
|
4723
|
+
return config;
|
|
4724
|
+
}
|
|
4725
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
4726
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4727
|
+
return null;
|
|
4728
|
+
}
|
|
4729
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4730
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4731
|
+
}
|
|
4732
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
4733
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4734
|
+
return null;
|
|
4735
|
+
}
|
|
4736
|
+
return config;
|
|
4737
|
+
}
|
|
4738
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
4739
|
+
const resourceParams = createResourceParams(config);
|
|
4740
|
+
const request = createResourceRequest(resourceParams);
|
|
4741
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4742
|
+
.then((response) => {
|
|
4743
|
+
return luvio.handleSuccessResponse(() => {
|
|
4744
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
4745
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4746
|
+
}, () => {
|
|
4747
|
+
const cache = new StoreKeyMap();
|
|
4748
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
4749
|
+
return cache;
|
|
4750
|
+
});
|
|
4751
|
+
}, (response) => {
|
|
4752
|
+
deepFreeze(response);
|
|
4753
|
+
throw response;
|
|
4754
|
+
});
|
|
4755
|
+
}
|
|
4756
|
+
const createContentDocFromContentBodyAdapterFactory = (luvio) => {
|
|
4757
|
+
return function createContentDocFromContentBody(untrustedConfig) {
|
|
4758
|
+
const config = validateAdapterConfig(untrustedConfig, createContentDocFromContentBody_ConfigPropertyNames);
|
|
4759
|
+
// Invalid or incomplete config
|
|
4760
|
+
if (config === null) {
|
|
4761
|
+
throw new Error('Invalid config for "createContentDocFromContentBody"');
|
|
4762
|
+
}
|
|
4763
|
+
return buildNetworkSnapshot(luvio, config);
|
|
4764
|
+
};
|
|
4765
|
+
};
|
|
4766
|
+
|
|
4767
|
+
export { createContentDocFromContentBodyAdapterFactory, getFileUploadConfigAdapterFactory };
|