@salesforce/lds-adapters-platform-sharing 1.279.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/LICENSE.txt +82 -0
- package/dist/es/es2018/platform-sharing.js +1215 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/getGroupsForUser.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/getPublicGroupShareData.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingGroupsForUserByGroupTypeAndUserId.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingRecordAccessDetailByRecordIdAndUserId.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingRulesByEntityApiName.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingShareAccessLevels.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingShareAccessLevelsByObjectApiName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingUserAccessLevelsByRecordId.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingUserOrGroupTypes.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingUsersOrGroups.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/postSharingPublicGroupsSummary.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/types/AccessLevelFieldRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/AccessLevelRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/GroupCollectionRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/IncludedGroupsSharingRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/ListViewGroupSharingRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupSummaryInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupSummaryRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/QueueRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/RecordAccessDetailRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/RecordUserAccessCollectionRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/RecordUserAccessRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/ReportAndDashboardFolderGroupSharingRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/ShareAccessLevelRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/ShareRelationshipArrayRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ShareRelationshipCollectionRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ShareRelationshipRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/SharingReasonRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/SharingRuleCollectionRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/SharingRuleRepresentation.d.ts +57 -0
- package/dist/es/es2018/types/src/generated/types/SharingRulesCriteriaGroupSharingRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/SharingRulesOwnerGroupSharingRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/SupportedObjectListRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/UserOrGroupRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/UserOrGroupTypeRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/UserOrGroupTypesCollectionRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/UsersOrGroupsCollectionRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +66 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +1261 -0
- package/src/raml/api.raml +689 -0
- package/src/raml/luvio.raml +39 -0
package/sfdc/index.js
ADDED
|
@@ -0,0 +1,1261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* ATTENTION!
|
|
9
|
+
* THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
|
|
10
|
+
* If you would like to contribute to LDS, please follow the steps outlined in the git repo.
|
|
11
|
+
* Any changes made to this file in p4 will be automatically overwritten.
|
|
12
|
+
* *******************************************************************************************
|
|
13
|
+
*/
|
|
14
|
+
/* proxy-compat-disable */
|
|
15
|
+
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
|
+
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
|
|
18
|
+
|
|
19
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
|
+
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
21
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
22
|
+
/**
|
|
23
|
+
* Validates an adapter config is well-formed.
|
|
24
|
+
* @param config The config to validate.
|
|
25
|
+
* @param adapter The adapter validation configuration.
|
|
26
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
27
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
28
|
+
*/
|
|
29
|
+
function validateConfig(config, adapter, oneOf) {
|
|
30
|
+
const { displayName } = adapter;
|
|
31
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
32
|
+
if (config === undefined ||
|
|
33
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
34
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
35
|
+
}
|
|
36
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
37
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
38
|
+
}
|
|
39
|
+
if (unsupported !== undefined &&
|
|
40
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
41
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
42
|
+
}
|
|
43
|
+
const supported = required.concat(optional);
|
|
44
|
+
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
45
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function untrustedIsObject(untrusted) {
|
|
49
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
50
|
+
}
|
|
51
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
52
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
53
|
+
}
|
|
54
|
+
const snapshotRefreshOptions = {
|
|
55
|
+
overrides: {
|
|
56
|
+
headers: {
|
|
57
|
+
'Cache-Control': 'no-cache',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
62
|
+
return {
|
|
63
|
+
name,
|
|
64
|
+
required,
|
|
65
|
+
resourceType,
|
|
66
|
+
typeCheckShape,
|
|
67
|
+
isArrayShape,
|
|
68
|
+
coerceFn,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
72
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
73
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
74
|
+
return {
|
|
75
|
+
displayName,
|
|
76
|
+
parameters: {
|
|
77
|
+
required,
|
|
78
|
+
optional,
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const keyPrefix = 'sharing';
|
|
83
|
+
|
|
84
|
+
const { isArray: ArrayIsArray } = Array;
|
|
85
|
+
function equalsArray(a, b, equalsItem) {
|
|
86
|
+
const aLength = a.length;
|
|
87
|
+
const bLength = b.length;
|
|
88
|
+
if (aLength !== bLength) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
for (let i = 0; i < aLength; i++) {
|
|
92
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
function createLink(ref) {
|
|
99
|
+
return {
|
|
100
|
+
__ref: serializeStructuredKey(ref),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const VERSION$8 = "252bb771341222662b0b76c855414e1f";
|
|
105
|
+
function validate$8(obj, path = 'PublicGroupRepresentation') {
|
|
106
|
+
const v_error = (() => {
|
|
107
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
108
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
109
|
+
}
|
|
110
|
+
const obj_developerName = obj.developerName;
|
|
111
|
+
const path_developerName = path + '.developerName';
|
|
112
|
+
if (typeof obj_developerName !== 'string') {
|
|
113
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
114
|
+
}
|
|
115
|
+
const obj_includeBosses = obj.includeBosses;
|
|
116
|
+
const path_includeBosses = path + '.includeBosses';
|
|
117
|
+
if (typeof obj_includeBosses !== 'boolean') {
|
|
118
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_includeBosses + '" (at "' + path_includeBosses + '")');
|
|
119
|
+
}
|
|
120
|
+
const obj_name = obj.name;
|
|
121
|
+
const path_name = path + '.name';
|
|
122
|
+
if (typeof obj_name !== 'string') {
|
|
123
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
124
|
+
}
|
|
125
|
+
})();
|
|
126
|
+
return v_error === undefined ? null : v_error;
|
|
127
|
+
}
|
|
128
|
+
const select$a = function PublicGroupRepresentationSelect() {
|
|
129
|
+
return {
|
|
130
|
+
kind: 'Fragment',
|
|
131
|
+
version: VERSION$8,
|
|
132
|
+
private: [],
|
|
133
|
+
selections: [
|
|
134
|
+
{
|
|
135
|
+
name: 'developerName',
|
|
136
|
+
kind: 'Scalar'
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'includeBosses',
|
|
140
|
+
kind: 'Scalar'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'name',
|
|
144
|
+
kind: 'Scalar'
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
function equals$8(existing, incoming) {
|
|
150
|
+
const existing_includeBosses = existing.includeBosses;
|
|
151
|
+
const incoming_includeBosses = incoming.includeBosses;
|
|
152
|
+
if (!(existing_includeBosses === incoming_includeBosses)) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
const existing_developerName = existing.developerName;
|
|
156
|
+
const incoming_developerName = incoming.developerName;
|
|
157
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
const existing_name = existing.name;
|
|
161
|
+
const incoming_name = incoming.name;
|
|
162
|
+
if (!(existing_name === incoming_name)) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const VERSION$7 = "9371d1d2e640f37aa01c377fc78d6ef7";
|
|
169
|
+
function validate$7(obj, path = 'QueueRepresentation') {
|
|
170
|
+
const v_error = (() => {
|
|
171
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
172
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
173
|
+
}
|
|
174
|
+
const obj_developerName = obj.developerName;
|
|
175
|
+
const path_developerName = path + '.developerName';
|
|
176
|
+
if (typeof obj_developerName !== 'string') {
|
|
177
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
178
|
+
}
|
|
179
|
+
const obj_name = obj.name;
|
|
180
|
+
const path_name = path + '.name';
|
|
181
|
+
if (typeof obj_name !== 'string') {
|
|
182
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
183
|
+
}
|
|
184
|
+
})();
|
|
185
|
+
return v_error === undefined ? null : v_error;
|
|
186
|
+
}
|
|
187
|
+
const select$9 = function QueueRepresentationSelect() {
|
|
188
|
+
return {
|
|
189
|
+
kind: 'Fragment',
|
|
190
|
+
version: VERSION$7,
|
|
191
|
+
private: [],
|
|
192
|
+
selections: [
|
|
193
|
+
{
|
|
194
|
+
name: 'developerName',
|
|
195
|
+
kind: 'Scalar'
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'name',
|
|
199
|
+
kind: 'Scalar'
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
function equals$7(existing, incoming) {
|
|
205
|
+
const existing_developerName = existing.developerName;
|
|
206
|
+
const incoming_developerName = incoming.developerName;
|
|
207
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
const existing_name = existing.name;
|
|
211
|
+
const incoming_name = incoming.name;
|
|
212
|
+
if (!(existing_name === incoming_name)) {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const TTL$1 = 300;
|
|
219
|
+
const VERSION$6 = "3659c4a4f46957a3a2b5cb2d2383180d";
|
|
220
|
+
function validate$6(obj, path = 'GroupCollectionRepresentation') {
|
|
221
|
+
const v_error = (() => {
|
|
222
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
223
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
224
|
+
}
|
|
225
|
+
const obj_publicGroupRepresentations = obj.publicGroupRepresentations;
|
|
226
|
+
const path_publicGroupRepresentations = path + '.publicGroupRepresentations';
|
|
227
|
+
if (!ArrayIsArray(obj_publicGroupRepresentations)) {
|
|
228
|
+
return new TypeError('Expected "array" but received "' + typeof obj_publicGroupRepresentations + '" (at "' + path_publicGroupRepresentations + '")');
|
|
229
|
+
}
|
|
230
|
+
for (let i = 0; i < obj_publicGroupRepresentations.length; i++) {
|
|
231
|
+
const obj_publicGroupRepresentations_item = obj_publicGroupRepresentations[i];
|
|
232
|
+
const path_publicGroupRepresentations_item = path_publicGroupRepresentations + '[' + i + ']';
|
|
233
|
+
const referencepath_publicGroupRepresentations_itemValidationError = validate$8(obj_publicGroupRepresentations_item, path_publicGroupRepresentations_item);
|
|
234
|
+
if (referencepath_publicGroupRepresentations_itemValidationError !== null) {
|
|
235
|
+
let message = 'Object doesn\'t match PublicGroupRepresentation (at "' + path_publicGroupRepresentations_item + '")\n';
|
|
236
|
+
message += referencepath_publicGroupRepresentations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
237
|
+
return new TypeError(message);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
const obj_queueRepresentations = obj.queueRepresentations;
|
|
241
|
+
const path_queueRepresentations = path + '.queueRepresentations';
|
|
242
|
+
if (!ArrayIsArray(obj_queueRepresentations)) {
|
|
243
|
+
return new TypeError('Expected "array" but received "' + typeof obj_queueRepresentations + '" (at "' + path_queueRepresentations + '")');
|
|
244
|
+
}
|
|
245
|
+
for (let i = 0; i < obj_queueRepresentations.length; i++) {
|
|
246
|
+
const obj_queueRepresentations_item = obj_queueRepresentations[i];
|
|
247
|
+
const path_queueRepresentations_item = path_queueRepresentations + '[' + i + ']';
|
|
248
|
+
const referencepath_queueRepresentations_itemValidationError = validate$7(obj_queueRepresentations_item, path_queueRepresentations_item);
|
|
249
|
+
if (referencepath_queueRepresentations_itemValidationError !== null) {
|
|
250
|
+
let message = 'Object doesn\'t match QueueRepresentation (at "' + path_queueRepresentations_item + '")\n';
|
|
251
|
+
message += referencepath_queueRepresentations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
252
|
+
return new TypeError(message);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
})();
|
|
256
|
+
return v_error === undefined ? null : v_error;
|
|
257
|
+
}
|
|
258
|
+
const RepresentationType$1 = 'GroupCollectionRepresentation';
|
|
259
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
260
|
+
return input;
|
|
261
|
+
}
|
|
262
|
+
const select$8 = function GroupCollectionRepresentationSelect() {
|
|
263
|
+
const { selections: PublicGroupRepresentation__selections, opaque: PublicGroupRepresentation__opaque, } = select$a();
|
|
264
|
+
const { selections: QueueRepresentation__selections, opaque: QueueRepresentation__opaque, } = select$9();
|
|
265
|
+
return {
|
|
266
|
+
kind: 'Fragment',
|
|
267
|
+
version: VERSION$6,
|
|
268
|
+
private: [],
|
|
269
|
+
selections: [
|
|
270
|
+
{
|
|
271
|
+
name: 'publicGroupRepresentations',
|
|
272
|
+
kind: 'Object',
|
|
273
|
+
plural: true,
|
|
274
|
+
selections: PublicGroupRepresentation__selections
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: 'queueRepresentations',
|
|
278
|
+
kind: 'Object',
|
|
279
|
+
plural: true,
|
|
280
|
+
selections: QueueRepresentation__selections
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
function equals$6(existing, incoming) {
|
|
286
|
+
const existing_publicGroupRepresentations = existing.publicGroupRepresentations;
|
|
287
|
+
const incoming_publicGroupRepresentations = incoming.publicGroupRepresentations;
|
|
288
|
+
const equals_publicGroupRepresentations_items = equalsArray(existing_publicGroupRepresentations, incoming_publicGroupRepresentations, (existing_publicGroupRepresentations_item, incoming_publicGroupRepresentations_item) => {
|
|
289
|
+
if (!(equals$8(existing_publicGroupRepresentations_item, incoming_publicGroupRepresentations_item))) {
|
|
290
|
+
return false;
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
if (equals_publicGroupRepresentations_items === false) {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
const existing_queueRepresentations = existing.queueRepresentations;
|
|
297
|
+
const incoming_queueRepresentations = incoming.queueRepresentations;
|
|
298
|
+
const equals_queueRepresentations_items = equalsArray(existing_queueRepresentations, incoming_queueRepresentations, (existing_queueRepresentations_item, incoming_queueRepresentations_item) => {
|
|
299
|
+
if (!(equals$7(existing_queueRepresentations_item, incoming_queueRepresentations_item))) {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
if (equals_queueRepresentations_items === false) {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
return true;
|
|
307
|
+
}
|
|
308
|
+
const ingest$1 = function GroupCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
309
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
310
|
+
const validateError = validate$6(input);
|
|
311
|
+
if (validateError !== null) {
|
|
312
|
+
throw validateError;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
const key = path.fullPath;
|
|
316
|
+
const ttlToUse = TTL$1;
|
|
317
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "sharing", VERSION$6, RepresentationType$1, equals$6);
|
|
318
|
+
return createLink(key);
|
|
319
|
+
};
|
|
320
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
321
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
322
|
+
const rootKey = fullPathFactory();
|
|
323
|
+
rootKeySet.set(rootKey, {
|
|
324
|
+
namespace: keyPrefix,
|
|
325
|
+
representationName: RepresentationType$1,
|
|
326
|
+
mergeable: false
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function select$7(luvio, params) {
|
|
331
|
+
return select$8();
|
|
332
|
+
}
|
|
333
|
+
function keyBuilder$3(luvio, params) {
|
|
334
|
+
return keyPrefix + '::GroupCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'groupType:' + params.urlParams.groupType + ',' + 'userId:' + params.urlParams.userId + ')';
|
|
335
|
+
}
|
|
336
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
337
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
338
|
+
}
|
|
339
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
340
|
+
const { body } = response;
|
|
341
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
342
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
343
|
+
const snapshot = luvio.storeLookup({
|
|
344
|
+
recordId: key,
|
|
345
|
+
node: select$7(),
|
|
346
|
+
variables: {},
|
|
347
|
+
}, snapshotRefresh);
|
|
348
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
349
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
350
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
deepFreeze(snapshot.data);
|
|
354
|
+
return snapshot;
|
|
355
|
+
}
|
|
356
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
357
|
+
const key = keyBuilder$3(luvio, params);
|
|
358
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
359
|
+
const storeMetadataParams = {
|
|
360
|
+
ttl: TTL$1,
|
|
361
|
+
namespace: keyPrefix,
|
|
362
|
+
version: VERSION$6,
|
|
363
|
+
representationName: RepresentationType$1
|
|
364
|
+
};
|
|
365
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
366
|
+
return errorSnapshot;
|
|
367
|
+
}
|
|
368
|
+
function createResourceRequest$1(config) {
|
|
369
|
+
const headers = {};
|
|
370
|
+
return {
|
|
371
|
+
baseUri: '/services/data/v61.0',
|
|
372
|
+
basePath: '/sharing/groups-for-user/' + config.urlParams.userId + '/' + config.urlParams.groupType + '',
|
|
373
|
+
method: 'get',
|
|
374
|
+
body: null,
|
|
375
|
+
urlParams: config.urlParams,
|
|
376
|
+
queryParams: config.queryParams,
|
|
377
|
+
headers,
|
|
378
|
+
priority: 'normal',
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
const adapterName$1 = 'getGroupsForUser';
|
|
383
|
+
const getGroupsForUser_ConfigPropertyMetadata = [
|
|
384
|
+
generateParamConfigMetadata('groupType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
385
|
+
generateParamConfigMetadata('userId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
386
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
387
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
388
|
+
];
|
|
389
|
+
const getGroupsForUser_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getGroupsForUser_ConfigPropertyMetadata);
|
|
390
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getGroupsForUser_ConfigPropertyMetadata);
|
|
391
|
+
function keyBuilder$2(luvio, config) {
|
|
392
|
+
const resourceParams = createResourceParams$1(config);
|
|
393
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
394
|
+
}
|
|
395
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
396
|
+
const config = {};
|
|
397
|
+
typeCheckConfig$2(untrustedConfig, config, getGroupsForUser_ConfigPropertyMetadata);
|
|
398
|
+
return config;
|
|
399
|
+
}
|
|
400
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
401
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
402
|
+
return null;
|
|
403
|
+
}
|
|
404
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
405
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
406
|
+
}
|
|
407
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
408
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
return config;
|
|
412
|
+
}
|
|
413
|
+
function adapterFragment$1(luvio, config) {
|
|
414
|
+
createResourceParams$1(config);
|
|
415
|
+
return select$7();
|
|
416
|
+
}
|
|
417
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
418
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
419
|
+
config,
|
|
420
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
421
|
+
});
|
|
422
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
423
|
+
}
|
|
424
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
425
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
426
|
+
config,
|
|
427
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
428
|
+
});
|
|
429
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
430
|
+
}
|
|
431
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
432
|
+
const resourceParams = createResourceParams$1(config);
|
|
433
|
+
const request = createResourceRequest$1(resourceParams);
|
|
434
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
435
|
+
.then((response) => {
|
|
436
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
437
|
+
const cache = new StoreKeyMap();
|
|
438
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
439
|
+
return cache;
|
|
440
|
+
});
|
|
441
|
+
}, (response) => {
|
|
442
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
446
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
447
|
+
}
|
|
448
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
449
|
+
const { luvio, config } = context;
|
|
450
|
+
const selector = {
|
|
451
|
+
recordId: keyBuilder$2(luvio, config),
|
|
452
|
+
node: adapterFragment$1(luvio, config),
|
|
453
|
+
variables: {},
|
|
454
|
+
};
|
|
455
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
456
|
+
config,
|
|
457
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
458
|
+
});
|
|
459
|
+
return cacheSnapshot;
|
|
460
|
+
}
|
|
461
|
+
const getGroupsForUserAdapterFactory = (luvio) => function sharing__getGroupsForUser(untrustedConfig, requestContext) {
|
|
462
|
+
const config = validateAdapterConfig$1(untrustedConfig, getGroupsForUser_ConfigPropertyNames);
|
|
463
|
+
// Invalid or incomplete config
|
|
464
|
+
if (config === null) {
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
467
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
468
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
const VERSION$5 = "11e587d0bd769c0df33d7cce4eb7210d";
|
|
472
|
+
function validate$5(obj, path = 'IncludedGroupsSharingRepresentation') {
|
|
473
|
+
const v_error = (() => {
|
|
474
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
475
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
476
|
+
}
|
|
477
|
+
const obj_createdBy = obj.createdBy;
|
|
478
|
+
const path_createdBy = path + '.createdBy';
|
|
479
|
+
if (typeof obj_createdBy !== 'string') {
|
|
480
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
481
|
+
}
|
|
482
|
+
const obj_createdOn = obj.createdOn;
|
|
483
|
+
const path_createdOn = path + '.createdOn';
|
|
484
|
+
if (typeof obj_createdOn !== 'string') {
|
|
485
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdOn + '" (at "' + path_createdOn + '")');
|
|
486
|
+
}
|
|
487
|
+
const obj_developerName = obj.developerName;
|
|
488
|
+
const path_developerName = path + '.developerName';
|
|
489
|
+
if (typeof obj_developerName !== 'string') {
|
|
490
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
491
|
+
}
|
|
492
|
+
const obj_grantAccessHierarchies = obj.grantAccessHierarchies;
|
|
493
|
+
const path_grantAccessHierarchies = path + '.grantAccessHierarchies';
|
|
494
|
+
if (typeof obj_grantAccessHierarchies !== 'boolean') {
|
|
495
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_grantAccessHierarchies + '" (at "' + path_grantAccessHierarchies + '")');
|
|
496
|
+
}
|
|
497
|
+
const obj_label = obj.label;
|
|
498
|
+
const path_label = path + '.label';
|
|
499
|
+
if (typeof obj_label !== 'string') {
|
|
500
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
501
|
+
}
|
|
502
|
+
})();
|
|
503
|
+
return v_error === undefined ? null : v_error;
|
|
504
|
+
}
|
|
505
|
+
const select$6 = function IncludedGroupsSharingRepresentationSelect() {
|
|
506
|
+
return {
|
|
507
|
+
kind: 'Fragment',
|
|
508
|
+
version: VERSION$5,
|
|
509
|
+
private: [],
|
|
510
|
+
selections: [
|
|
511
|
+
{
|
|
512
|
+
name: 'createdBy',
|
|
513
|
+
kind: 'Scalar'
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: 'createdOn',
|
|
517
|
+
kind: 'Scalar'
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
name: 'developerName',
|
|
521
|
+
kind: 'Scalar'
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
name: 'grantAccessHierarchies',
|
|
525
|
+
kind: 'Scalar'
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
name: 'label',
|
|
529
|
+
kind: 'Scalar'
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
function equals$5(existing, incoming) {
|
|
535
|
+
const existing_grantAccessHierarchies = existing.grantAccessHierarchies;
|
|
536
|
+
const incoming_grantAccessHierarchies = incoming.grantAccessHierarchies;
|
|
537
|
+
if (!(existing_grantAccessHierarchies === incoming_grantAccessHierarchies)) {
|
|
538
|
+
return false;
|
|
539
|
+
}
|
|
540
|
+
const existing_createdBy = existing.createdBy;
|
|
541
|
+
const incoming_createdBy = incoming.createdBy;
|
|
542
|
+
if (!(existing_createdBy === incoming_createdBy)) {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
const existing_createdOn = existing.createdOn;
|
|
546
|
+
const incoming_createdOn = incoming.createdOn;
|
|
547
|
+
if (!(existing_createdOn === incoming_createdOn)) {
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
const existing_developerName = existing.developerName;
|
|
551
|
+
const incoming_developerName = incoming.developerName;
|
|
552
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
553
|
+
return false;
|
|
554
|
+
}
|
|
555
|
+
const existing_label = existing.label;
|
|
556
|
+
const incoming_label = incoming.label;
|
|
557
|
+
if (!(existing_label === incoming_label)) {
|
|
558
|
+
return false;
|
|
559
|
+
}
|
|
560
|
+
return true;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
const VERSION$4 = "06eef993be289c8b20b37b2ae6f4c5ee";
|
|
564
|
+
function validate$4(obj, path = 'ListViewGroupSharingRepresentation') {
|
|
565
|
+
const v_error = (() => {
|
|
566
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
567
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
568
|
+
}
|
|
569
|
+
const obj_developerName = obj.developerName;
|
|
570
|
+
const path_developerName = path + '.developerName';
|
|
571
|
+
if (typeof obj_developerName !== 'string') {
|
|
572
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
573
|
+
}
|
|
574
|
+
const obj_label = obj.label;
|
|
575
|
+
const path_label = path + '.label';
|
|
576
|
+
if (typeof obj_label !== 'string') {
|
|
577
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
578
|
+
}
|
|
579
|
+
})();
|
|
580
|
+
return v_error === undefined ? null : v_error;
|
|
581
|
+
}
|
|
582
|
+
const select$5 = function ListViewGroupSharingRepresentationSelect() {
|
|
583
|
+
return {
|
|
584
|
+
kind: 'Fragment',
|
|
585
|
+
version: VERSION$4,
|
|
586
|
+
private: [],
|
|
587
|
+
selections: [
|
|
588
|
+
{
|
|
589
|
+
name: 'developerName',
|
|
590
|
+
kind: 'Scalar'
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
name: 'label',
|
|
594
|
+
kind: 'Scalar'
|
|
595
|
+
}
|
|
596
|
+
]
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
function equals$4(existing, incoming) {
|
|
600
|
+
const existing_developerName = existing.developerName;
|
|
601
|
+
const incoming_developerName = incoming.developerName;
|
|
602
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
603
|
+
return false;
|
|
604
|
+
}
|
|
605
|
+
const existing_label = existing.label;
|
|
606
|
+
const incoming_label = incoming.label;
|
|
607
|
+
if (!(existing_label === incoming_label)) {
|
|
608
|
+
return false;
|
|
609
|
+
}
|
|
610
|
+
return true;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
const VERSION$3 = "a0ed38b40ad9886f3e05a1b65fd2e246";
|
|
614
|
+
function validate$3(obj, path = 'ReportAndDashboardFolderGroupSharingRepresentation') {
|
|
615
|
+
const v_error = (() => {
|
|
616
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
617
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
618
|
+
}
|
|
619
|
+
const obj_accessLevel = obj.accessLevel;
|
|
620
|
+
const path_accessLevel = path + '.accessLevel';
|
|
621
|
+
if (typeof obj_accessLevel !== 'string') {
|
|
622
|
+
return new TypeError('Expected "string" but received "' + typeof obj_accessLevel + '" (at "' + path_accessLevel + '")');
|
|
623
|
+
}
|
|
624
|
+
const obj_createdBy = obj.createdBy;
|
|
625
|
+
const path_createdBy = path + '.createdBy';
|
|
626
|
+
if (typeof obj_createdBy !== 'string') {
|
|
627
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
628
|
+
}
|
|
629
|
+
const obj_createdOn = obj.createdOn;
|
|
630
|
+
const path_createdOn = path + '.createdOn';
|
|
631
|
+
if (typeof obj_createdOn !== 'string') {
|
|
632
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdOn + '" (at "' + path_createdOn + '")');
|
|
633
|
+
}
|
|
634
|
+
const obj_developerName = obj.developerName;
|
|
635
|
+
const path_developerName = path + '.developerName';
|
|
636
|
+
if (typeof obj_developerName !== 'string') {
|
|
637
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
638
|
+
}
|
|
639
|
+
const obj_label = obj.label;
|
|
640
|
+
const path_label = path + '.label';
|
|
641
|
+
if (typeof obj_label !== 'string') {
|
|
642
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
643
|
+
}
|
|
644
|
+
const obj_type = obj.type;
|
|
645
|
+
const path_type = path + '.type';
|
|
646
|
+
if (typeof obj_type !== 'string') {
|
|
647
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
648
|
+
}
|
|
649
|
+
})();
|
|
650
|
+
return v_error === undefined ? null : v_error;
|
|
651
|
+
}
|
|
652
|
+
const select$4 = function ReportAndDashboardFolderGroupSharingRepresentationSelect() {
|
|
653
|
+
return {
|
|
654
|
+
kind: 'Fragment',
|
|
655
|
+
version: VERSION$3,
|
|
656
|
+
private: [],
|
|
657
|
+
selections: [
|
|
658
|
+
{
|
|
659
|
+
name: 'accessLevel',
|
|
660
|
+
kind: 'Scalar'
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
name: 'createdBy',
|
|
664
|
+
kind: 'Scalar'
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
name: 'createdOn',
|
|
668
|
+
kind: 'Scalar'
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
name: 'developerName',
|
|
672
|
+
kind: 'Scalar'
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
name: 'label',
|
|
676
|
+
kind: 'Scalar'
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
name: 'type',
|
|
680
|
+
kind: 'Scalar'
|
|
681
|
+
}
|
|
682
|
+
]
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
function equals$3(existing, incoming) {
|
|
686
|
+
const existing_accessLevel = existing.accessLevel;
|
|
687
|
+
const incoming_accessLevel = incoming.accessLevel;
|
|
688
|
+
if (!(existing_accessLevel === incoming_accessLevel)) {
|
|
689
|
+
return false;
|
|
690
|
+
}
|
|
691
|
+
const existing_createdBy = existing.createdBy;
|
|
692
|
+
const incoming_createdBy = incoming.createdBy;
|
|
693
|
+
if (!(existing_createdBy === incoming_createdBy)) {
|
|
694
|
+
return false;
|
|
695
|
+
}
|
|
696
|
+
const existing_createdOn = existing.createdOn;
|
|
697
|
+
const incoming_createdOn = incoming.createdOn;
|
|
698
|
+
if (!(existing_createdOn === incoming_createdOn)) {
|
|
699
|
+
return false;
|
|
700
|
+
}
|
|
701
|
+
const existing_developerName = existing.developerName;
|
|
702
|
+
const incoming_developerName = incoming.developerName;
|
|
703
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
704
|
+
return false;
|
|
705
|
+
}
|
|
706
|
+
const existing_label = existing.label;
|
|
707
|
+
const incoming_label = incoming.label;
|
|
708
|
+
if (!(existing_label === incoming_label)) {
|
|
709
|
+
return false;
|
|
710
|
+
}
|
|
711
|
+
const existing_type = existing.type;
|
|
712
|
+
const incoming_type = incoming.type;
|
|
713
|
+
if (!(existing_type === incoming_type)) {
|
|
714
|
+
return false;
|
|
715
|
+
}
|
|
716
|
+
return true;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
const VERSION$2 = "1036a20704b51746749bb4be569e39c0";
|
|
720
|
+
function validate$2(obj, path = 'SharingRulesCriteriaGroupSharingRepresentation') {
|
|
721
|
+
const v_error = (() => {
|
|
722
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
723
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
724
|
+
}
|
|
725
|
+
const obj_accessLevel = obj.accessLevel;
|
|
726
|
+
const path_accessLevel = path + '.accessLevel';
|
|
727
|
+
if (typeof obj_accessLevel !== 'string') {
|
|
728
|
+
return new TypeError('Expected "string" but received "' + typeof obj_accessLevel + '" (at "' + path_accessLevel + '")');
|
|
729
|
+
}
|
|
730
|
+
const obj_criteria = obj.criteria;
|
|
731
|
+
const path_criteria = path + '.criteria';
|
|
732
|
+
if (typeof obj_criteria !== 'string') {
|
|
733
|
+
return new TypeError('Expected "string" but received "' + typeof obj_criteria + '" (at "' + path_criteria + '")');
|
|
734
|
+
}
|
|
735
|
+
const obj_developerName = obj.developerName;
|
|
736
|
+
const path_developerName = path + '.developerName';
|
|
737
|
+
if (typeof obj_developerName !== 'string') {
|
|
738
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
739
|
+
}
|
|
740
|
+
const obj_label = obj.label;
|
|
741
|
+
const path_label = path + '.label';
|
|
742
|
+
if (typeof obj_label !== 'string') {
|
|
743
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
744
|
+
}
|
|
745
|
+
})();
|
|
746
|
+
return v_error === undefined ? null : v_error;
|
|
747
|
+
}
|
|
748
|
+
const select$3 = function SharingRulesCriteriaGroupSharingRepresentationSelect() {
|
|
749
|
+
return {
|
|
750
|
+
kind: 'Fragment',
|
|
751
|
+
version: VERSION$2,
|
|
752
|
+
private: [],
|
|
753
|
+
selections: [
|
|
754
|
+
{
|
|
755
|
+
name: 'accessLevel',
|
|
756
|
+
kind: 'Scalar'
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
name: 'criteria',
|
|
760
|
+
kind: 'Scalar'
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
name: 'developerName',
|
|
764
|
+
kind: 'Scalar'
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
name: 'label',
|
|
768
|
+
kind: 'Scalar'
|
|
769
|
+
}
|
|
770
|
+
]
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
function equals$2(existing, incoming) {
|
|
774
|
+
const existing_accessLevel = existing.accessLevel;
|
|
775
|
+
const incoming_accessLevel = incoming.accessLevel;
|
|
776
|
+
if (!(existing_accessLevel === incoming_accessLevel)) {
|
|
777
|
+
return false;
|
|
778
|
+
}
|
|
779
|
+
const existing_criteria = existing.criteria;
|
|
780
|
+
const incoming_criteria = incoming.criteria;
|
|
781
|
+
if (!(existing_criteria === incoming_criteria)) {
|
|
782
|
+
return false;
|
|
783
|
+
}
|
|
784
|
+
const existing_developerName = existing.developerName;
|
|
785
|
+
const incoming_developerName = incoming.developerName;
|
|
786
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
787
|
+
return false;
|
|
788
|
+
}
|
|
789
|
+
const existing_label = existing.label;
|
|
790
|
+
const incoming_label = incoming.label;
|
|
791
|
+
if (!(existing_label === incoming_label)) {
|
|
792
|
+
return false;
|
|
793
|
+
}
|
|
794
|
+
return true;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
const VERSION$1 = "8f205925d69192f91fd2c71838ed20e7";
|
|
798
|
+
function validate$1(obj, path = 'SharingRulesOwnerGroupSharingRepresentation') {
|
|
799
|
+
const v_error = (() => {
|
|
800
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
801
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
802
|
+
}
|
|
803
|
+
const obj_accessLevel = obj.accessLevel;
|
|
804
|
+
const path_accessLevel = path + '.accessLevel';
|
|
805
|
+
if (typeof obj_accessLevel !== 'string') {
|
|
806
|
+
return new TypeError('Expected "string" but received "' + typeof obj_accessLevel + '" (at "' + path_accessLevel + '")');
|
|
807
|
+
}
|
|
808
|
+
const obj_developerName = obj.developerName;
|
|
809
|
+
const path_developerName = path + '.developerName';
|
|
810
|
+
if (typeof obj_developerName !== 'string') {
|
|
811
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
812
|
+
}
|
|
813
|
+
const obj_label = obj.label;
|
|
814
|
+
const path_label = path + '.label';
|
|
815
|
+
if (typeof obj_label !== 'string') {
|
|
816
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
817
|
+
}
|
|
818
|
+
const obj_sharedFrom = obj.sharedFrom;
|
|
819
|
+
const path_sharedFrom = path + '.sharedFrom';
|
|
820
|
+
if (typeof obj_sharedFrom !== 'string') {
|
|
821
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sharedFrom + '" (at "' + path_sharedFrom + '")');
|
|
822
|
+
}
|
|
823
|
+
})();
|
|
824
|
+
return v_error === undefined ? null : v_error;
|
|
825
|
+
}
|
|
826
|
+
const select$2 = function SharingRulesOwnerGroupSharingRepresentationSelect() {
|
|
827
|
+
return {
|
|
828
|
+
kind: 'Fragment',
|
|
829
|
+
version: VERSION$1,
|
|
830
|
+
private: [],
|
|
831
|
+
selections: [
|
|
832
|
+
{
|
|
833
|
+
name: 'accessLevel',
|
|
834
|
+
kind: 'Scalar'
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
name: 'developerName',
|
|
838
|
+
kind: 'Scalar'
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: 'label',
|
|
842
|
+
kind: 'Scalar'
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
name: 'sharedFrom',
|
|
846
|
+
kind: 'Scalar'
|
|
847
|
+
}
|
|
848
|
+
]
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
function equals$1(existing, incoming) {
|
|
852
|
+
const existing_accessLevel = existing.accessLevel;
|
|
853
|
+
const incoming_accessLevel = incoming.accessLevel;
|
|
854
|
+
if (!(existing_accessLevel === incoming_accessLevel)) {
|
|
855
|
+
return false;
|
|
856
|
+
}
|
|
857
|
+
const existing_developerName = existing.developerName;
|
|
858
|
+
const incoming_developerName = incoming.developerName;
|
|
859
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
860
|
+
return false;
|
|
861
|
+
}
|
|
862
|
+
const existing_label = existing.label;
|
|
863
|
+
const incoming_label = incoming.label;
|
|
864
|
+
if (!(existing_label === incoming_label)) {
|
|
865
|
+
return false;
|
|
866
|
+
}
|
|
867
|
+
const existing_sharedFrom = existing.sharedFrom;
|
|
868
|
+
const incoming_sharedFrom = incoming.sharedFrom;
|
|
869
|
+
if (!(existing_sharedFrom === incoming_sharedFrom)) {
|
|
870
|
+
return false;
|
|
871
|
+
}
|
|
872
|
+
return true;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
const TTL = 300;
|
|
876
|
+
const VERSION = "68cd535d9b1bd32d0d42ce950115eff5";
|
|
877
|
+
function validate(obj, path = 'PublicGroupSummaryRepresentation') {
|
|
878
|
+
const v_error = (() => {
|
|
879
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
880
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
881
|
+
}
|
|
882
|
+
const obj_includedGroupsSharing = obj.includedGroupsSharing;
|
|
883
|
+
const path_includedGroupsSharing = path + '.includedGroupsSharing';
|
|
884
|
+
if (!ArrayIsArray(obj_includedGroupsSharing)) {
|
|
885
|
+
return new TypeError('Expected "array" but received "' + typeof obj_includedGroupsSharing + '" (at "' + path_includedGroupsSharing + '")');
|
|
886
|
+
}
|
|
887
|
+
for (let i = 0; i < obj_includedGroupsSharing.length; i++) {
|
|
888
|
+
const obj_includedGroupsSharing_item = obj_includedGroupsSharing[i];
|
|
889
|
+
const path_includedGroupsSharing_item = path_includedGroupsSharing + '[' + i + ']';
|
|
890
|
+
const referencepath_includedGroupsSharing_itemValidationError = validate$5(obj_includedGroupsSharing_item, path_includedGroupsSharing_item);
|
|
891
|
+
if (referencepath_includedGroupsSharing_itemValidationError !== null) {
|
|
892
|
+
let message = 'Object doesn\'t match IncludedGroupsSharingRepresentation (at "' + path_includedGroupsSharing_item + '")\n';
|
|
893
|
+
message += referencepath_includedGroupsSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
894
|
+
return new TypeError(message);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
const obj_listViewGroupSharing = obj.listViewGroupSharing;
|
|
898
|
+
const path_listViewGroupSharing = path + '.listViewGroupSharing';
|
|
899
|
+
if (!ArrayIsArray(obj_listViewGroupSharing)) {
|
|
900
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listViewGroupSharing + '" (at "' + path_listViewGroupSharing + '")');
|
|
901
|
+
}
|
|
902
|
+
for (let i = 0; i < obj_listViewGroupSharing.length; i++) {
|
|
903
|
+
const obj_listViewGroupSharing_item = obj_listViewGroupSharing[i];
|
|
904
|
+
const path_listViewGroupSharing_item = path_listViewGroupSharing + '[' + i + ']';
|
|
905
|
+
const referencepath_listViewGroupSharing_itemValidationError = validate$4(obj_listViewGroupSharing_item, path_listViewGroupSharing_item);
|
|
906
|
+
if (referencepath_listViewGroupSharing_itemValidationError !== null) {
|
|
907
|
+
let message = 'Object doesn\'t match ListViewGroupSharingRepresentation (at "' + path_listViewGroupSharing_item + '")\n';
|
|
908
|
+
message += referencepath_listViewGroupSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
909
|
+
return new TypeError(message);
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
const obj_reportAndDashboardFolderGroupSharing = obj.reportAndDashboardFolderGroupSharing;
|
|
913
|
+
const path_reportAndDashboardFolderGroupSharing = path + '.reportAndDashboardFolderGroupSharing';
|
|
914
|
+
if (!ArrayIsArray(obj_reportAndDashboardFolderGroupSharing)) {
|
|
915
|
+
return new TypeError('Expected "array" but received "' + typeof obj_reportAndDashboardFolderGroupSharing + '" (at "' + path_reportAndDashboardFolderGroupSharing + '")');
|
|
916
|
+
}
|
|
917
|
+
for (let i = 0; i < obj_reportAndDashboardFolderGroupSharing.length; i++) {
|
|
918
|
+
const obj_reportAndDashboardFolderGroupSharing_item = obj_reportAndDashboardFolderGroupSharing[i];
|
|
919
|
+
const path_reportAndDashboardFolderGroupSharing_item = path_reportAndDashboardFolderGroupSharing + '[' + i + ']';
|
|
920
|
+
const referencepath_reportAndDashboardFolderGroupSharing_itemValidationError = validate$3(obj_reportAndDashboardFolderGroupSharing_item, path_reportAndDashboardFolderGroupSharing_item);
|
|
921
|
+
if (referencepath_reportAndDashboardFolderGroupSharing_itemValidationError !== null) {
|
|
922
|
+
let message = 'Object doesn\'t match ReportAndDashboardFolderGroupSharingRepresentation (at "' + path_reportAndDashboardFolderGroupSharing_item + '")\n';
|
|
923
|
+
message += referencepath_reportAndDashboardFolderGroupSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
924
|
+
return new TypeError(message);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
const obj_sharingRulesCriteriaGroupSharing = obj.sharingRulesCriteriaGroupSharing;
|
|
928
|
+
const path_sharingRulesCriteriaGroupSharing = path + '.sharingRulesCriteriaGroupSharing';
|
|
929
|
+
if (!ArrayIsArray(obj_sharingRulesCriteriaGroupSharing)) {
|
|
930
|
+
return new TypeError('Expected "array" but received "' + typeof obj_sharingRulesCriteriaGroupSharing + '" (at "' + path_sharingRulesCriteriaGroupSharing + '")');
|
|
931
|
+
}
|
|
932
|
+
for (let i = 0; i < obj_sharingRulesCriteriaGroupSharing.length; i++) {
|
|
933
|
+
const obj_sharingRulesCriteriaGroupSharing_item = obj_sharingRulesCriteriaGroupSharing[i];
|
|
934
|
+
const path_sharingRulesCriteriaGroupSharing_item = path_sharingRulesCriteriaGroupSharing + '[' + i + ']';
|
|
935
|
+
const referencepath_sharingRulesCriteriaGroupSharing_itemValidationError = validate$2(obj_sharingRulesCriteriaGroupSharing_item, path_sharingRulesCriteriaGroupSharing_item);
|
|
936
|
+
if (referencepath_sharingRulesCriteriaGroupSharing_itemValidationError !== null) {
|
|
937
|
+
let message = 'Object doesn\'t match SharingRulesCriteriaGroupSharingRepresentation (at "' + path_sharingRulesCriteriaGroupSharing_item + '")\n';
|
|
938
|
+
message += referencepath_sharingRulesCriteriaGroupSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
939
|
+
return new TypeError(message);
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
const obj_sharingRulesOwnerGroupSharing = obj.sharingRulesOwnerGroupSharing;
|
|
943
|
+
const path_sharingRulesOwnerGroupSharing = path + '.sharingRulesOwnerGroupSharing';
|
|
944
|
+
if (!ArrayIsArray(obj_sharingRulesOwnerGroupSharing)) {
|
|
945
|
+
return new TypeError('Expected "array" but received "' + typeof obj_sharingRulesOwnerGroupSharing + '" (at "' + path_sharingRulesOwnerGroupSharing + '")');
|
|
946
|
+
}
|
|
947
|
+
for (let i = 0; i < obj_sharingRulesOwnerGroupSharing.length; i++) {
|
|
948
|
+
const obj_sharingRulesOwnerGroupSharing_item = obj_sharingRulesOwnerGroupSharing[i];
|
|
949
|
+
const path_sharingRulesOwnerGroupSharing_item = path_sharingRulesOwnerGroupSharing + '[' + i + ']';
|
|
950
|
+
const referencepath_sharingRulesOwnerGroupSharing_itemValidationError = validate$1(obj_sharingRulesOwnerGroupSharing_item, path_sharingRulesOwnerGroupSharing_item);
|
|
951
|
+
if (referencepath_sharingRulesOwnerGroupSharing_itemValidationError !== null) {
|
|
952
|
+
let message = 'Object doesn\'t match SharingRulesOwnerGroupSharingRepresentation (at "' + path_sharingRulesOwnerGroupSharing_item + '")\n';
|
|
953
|
+
message += referencepath_sharingRulesOwnerGroupSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
954
|
+
return new TypeError(message);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
})();
|
|
958
|
+
return v_error === undefined ? null : v_error;
|
|
959
|
+
}
|
|
960
|
+
const RepresentationType = 'PublicGroupSummaryRepresentation';
|
|
961
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
962
|
+
return input;
|
|
963
|
+
}
|
|
964
|
+
const select$1 = function PublicGroupSummaryRepresentationSelect() {
|
|
965
|
+
const { selections: IncludedGroupsSharingRepresentation__selections, opaque: IncludedGroupsSharingRepresentation__opaque, } = select$6();
|
|
966
|
+
const { selections: ListViewGroupSharingRepresentation__selections, opaque: ListViewGroupSharingRepresentation__opaque, } = select$5();
|
|
967
|
+
const { selections: ReportAndDashboardFolderGroupSharingRepresentation__selections, opaque: ReportAndDashboardFolderGroupSharingRepresentation__opaque, } = select$4();
|
|
968
|
+
const { selections: SharingRulesCriteriaGroupSharingRepresentation__selections, opaque: SharingRulesCriteriaGroupSharingRepresentation__opaque, } = select$3();
|
|
969
|
+
const { selections: SharingRulesOwnerGroupSharingRepresentation__selections, opaque: SharingRulesOwnerGroupSharingRepresentation__opaque, } = select$2();
|
|
970
|
+
return {
|
|
971
|
+
kind: 'Fragment',
|
|
972
|
+
version: VERSION,
|
|
973
|
+
private: [],
|
|
974
|
+
selections: [
|
|
975
|
+
{
|
|
976
|
+
name: 'includedGroupsSharing',
|
|
977
|
+
kind: 'Object',
|
|
978
|
+
plural: true,
|
|
979
|
+
selections: IncludedGroupsSharingRepresentation__selections
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
name: 'listViewGroupSharing',
|
|
983
|
+
kind: 'Object',
|
|
984
|
+
plural: true,
|
|
985
|
+
selections: ListViewGroupSharingRepresentation__selections
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
name: 'reportAndDashboardFolderGroupSharing',
|
|
989
|
+
kind: 'Object',
|
|
990
|
+
plural: true,
|
|
991
|
+
selections: ReportAndDashboardFolderGroupSharingRepresentation__selections
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
name: 'sharingRulesCriteriaGroupSharing',
|
|
995
|
+
kind: 'Object',
|
|
996
|
+
plural: true,
|
|
997
|
+
selections: SharingRulesCriteriaGroupSharingRepresentation__selections
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
name: 'sharingRulesOwnerGroupSharing',
|
|
1001
|
+
kind: 'Object',
|
|
1002
|
+
plural: true,
|
|
1003
|
+
selections: SharingRulesOwnerGroupSharingRepresentation__selections
|
|
1004
|
+
}
|
|
1005
|
+
]
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
1008
|
+
function equals(existing, incoming) {
|
|
1009
|
+
const existing_includedGroupsSharing = existing.includedGroupsSharing;
|
|
1010
|
+
const incoming_includedGroupsSharing = incoming.includedGroupsSharing;
|
|
1011
|
+
const equals_includedGroupsSharing_items = equalsArray(existing_includedGroupsSharing, incoming_includedGroupsSharing, (existing_includedGroupsSharing_item, incoming_includedGroupsSharing_item) => {
|
|
1012
|
+
if (!(equals$5(existing_includedGroupsSharing_item, incoming_includedGroupsSharing_item))) {
|
|
1013
|
+
return false;
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
if (equals_includedGroupsSharing_items === false) {
|
|
1017
|
+
return false;
|
|
1018
|
+
}
|
|
1019
|
+
const existing_listViewGroupSharing = existing.listViewGroupSharing;
|
|
1020
|
+
const incoming_listViewGroupSharing = incoming.listViewGroupSharing;
|
|
1021
|
+
const equals_listViewGroupSharing_items = equalsArray(existing_listViewGroupSharing, incoming_listViewGroupSharing, (existing_listViewGroupSharing_item, incoming_listViewGroupSharing_item) => {
|
|
1022
|
+
if (!(equals$4(existing_listViewGroupSharing_item, incoming_listViewGroupSharing_item))) {
|
|
1023
|
+
return false;
|
|
1024
|
+
}
|
|
1025
|
+
});
|
|
1026
|
+
if (equals_listViewGroupSharing_items === false) {
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
1029
|
+
const existing_reportAndDashboardFolderGroupSharing = existing.reportAndDashboardFolderGroupSharing;
|
|
1030
|
+
const incoming_reportAndDashboardFolderGroupSharing = incoming.reportAndDashboardFolderGroupSharing;
|
|
1031
|
+
const equals_reportAndDashboardFolderGroupSharing_items = equalsArray(existing_reportAndDashboardFolderGroupSharing, incoming_reportAndDashboardFolderGroupSharing, (existing_reportAndDashboardFolderGroupSharing_item, incoming_reportAndDashboardFolderGroupSharing_item) => {
|
|
1032
|
+
if (!(equals$3(existing_reportAndDashboardFolderGroupSharing_item, incoming_reportAndDashboardFolderGroupSharing_item))) {
|
|
1033
|
+
return false;
|
|
1034
|
+
}
|
|
1035
|
+
});
|
|
1036
|
+
if (equals_reportAndDashboardFolderGroupSharing_items === false) {
|
|
1037
|
+
return false;
|
|
1038
|
+
}
|
|
1039
|
+
const existing_sharingRulesCriteriaGroupSharing = existing.sharingRulesCriteriaGroupSharing;
|
|
1040
|
+
const incoming_sharingRulesCriteriaGroupSharing = incoming.sharingRulesCriteriaGroupSharing;
|
|
1041
|
+
const equals_sharingRulesCriteriaGroupSharing_items = equalsArray(existing_sharingRulesCriteriaGroupSharing, incoming_sharingRulesCriteriaGroupSharing, (existing_sharingRulesCriteriaGroupSharing_item, incoming_sharingRulesCriteriaGroupSharing_item) => {
|
|
1042
|
+
if (!(equals$2(existing_sharingRulesCriteriaGroupSharing_item, incoming_sharingRulesCriteriaGroupSharing_item))) {
|
|
1043
|
+
return false;
|
|
1044
|
+
}
|
|
1045
|
+
});
|
|
1046
|
+
if (equals_sharingRulesCriteriaGroupSharing_items === false) {
|
|
1047
|
+
return false;
|
|
1048
|
+
}
|
|
1049
|
+
const existing_sharingRulesOwnerGroupSharing = existing.sharingRulesOwnerGroupSharing;
|
|
1050
|
+
const incoming_sharingRulesOwnerGroupSharing = incoming.sharingRulesOwnerGroupSharing;
|
|
1051
|
+
const equals_sharingRulesOwnerGroupSharing_items = equalsArray(existing_sharingRulesOwnerGroupSharing, incoming_sharingRulesOwnerGroupSharing, (existing_sharingRulesOwnerGroupSharing_item, incoming_sharingRulesOwnerGroupSharing_item) => {
|
|
1052
|
+
if (!(equals$1(existing_sharingRulesOwnerGroupSharing_item, incoming_sharingRulesOwnerGroupSharing_item))) {
|
|
1053
|
+
return false;
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
if (equals_sharingRulesOwnerGroupSharing_items === false) {
|
|
1057
|
+
return false;
|
|
1058
|
+
}
|
|
1059
|
+
return true;
|
|
1060
|
+
}
|
|
1061
|
+
const ingest = function PublicGroupSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1062
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1063
|
+
const validateError = validate(input);
|
|
1064
|
+
if (validateError !== null) {
|
|
1065
|
+
throw validateError;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
const key = path.fullPath;
|
|
1069
|
+
const ttlToUse = TTL;
|
|
1070
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "sharing", VERSION, RepresentationType, equals);
|
|
1071
|
+
return createLink(key);
|
|
1072
|
+
};
|
|
1073
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1074
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1075
|
+
const rootKey = fullPathFactory();
|
|
1076
|
+
rootKeySet.set(rootKey, {
|
|
1077
|
+
namespace: keyPrefix,
|
|
1078
|
+
representationName: RepresentationType,
|
|
1079
|
+
mergeable: false
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
function select(luvio, params) {
|
|
1084
|
+
return select$1();
|
|
1085
|
+
}
|
|
1086
|
+
function keyBuilder$1(luvio, params) {
|
|
1087
|
+
return keyPrefix + '::PublicGroupSummaryRepresentation:(' + 'entityKeyPrefix:' + params.body.entityKeyPrefix + '::' + 'groupId:' + params.body.groupId + '::' + 'limit:' + params.body.limit + '::' + 'offset:' + params.body.offset + '::' + 'operation:' + params.body.operation + ')';
|
|
1088
|
+
}
|
|
1089
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1090
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
1091
|
+
}
|
|
1092
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1093
|
+
const { body } = response;
|
|
1094
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
1095
|
+
luvio.storeIngest(key, ingest, body);
|
|
1096
|
+
const snapshot = luvio.storeLookup({
|
|
1097
|
+
recordId: key,
|
|
1098
|
+
node: select(),
|
|
1099
|
+
variables: {},
|
|
1100
|
+
}, snapshotRefresh);
|
|
1101
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1102
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1103
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
deepFreeze(snapshot.data);
|
|
1107
|
+
return snapshot;
|
|
1108
|
+
}
|
|
1109
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1110
|
+
const key = keyBuilder$1(luvio, params);
|
|
1111
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1112
|
+
const storeMetadataParams = {
|
|
1113
|
+
ttl: TTL,
|
|
1114
|
+
namespace: keyPrefix,
|
|
1115
|
+
version: VERSION,
|
|
1116
|
+
representationName: RepresentationType
|
|
1117
|
+
};
|
|
1118
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1119
|
+
return errorSnapshot;
|
|
1120
|
+
}
|
|
1121
|
+
function createResourceRequest(config) {
|
|
1122
|
+
const headers = {};
|
|
1123
|
+
return {
|
|
1124
|
+
baseUri: '/services/data/v61.0',
|
|
1125
|
+
basePath: '/sharing/publicGroupsSummary',
|
|
1126
|
+
method: 'post',
|
|
1127
|
+
body: config.body,
|
|
1128
|
+
urlParams: {},
|
|
1129
|
+
queryParams: {},
|
|
1130
|
+
headers,
|
|
1131
|
+
priority: 'normal',
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
const adapterName = 'getPublicGroupShareData';
|
|
1136
|
+
const getPublicGroupShareData_ConfigPropertyMetadata = [
|
|
1137
|
+
generateParamConfigMetadata('entityKeyPrefix', true, 2 /* Body */, 0 /* String */),
|
|
1138
|
+
generateParamConfigMetadata('groupId', true, 2 /* Body */, 0 /* String */),
|
|
1139
|
+
generateParamConfigMetadata('limit', true, 2 /* Body */, 3 /* Integer */),
|
|
1140
|
+
generateParamConfigMetadata('offset', true, 2 /* Body */, 3 /* Integer */),
|
|
1141
|
+
generateParamConfigMetadata('operation', true, 2 /* Body */, 0 /* String */),
|
|
1142
|
+
];
|
|
1143
|
+
const getPublicGroupShareData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getPublicGroupShareData_ConfigPropertyMetadata);
|
|
1144
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(getPublicGroupShareData_ConfigPropertyMetadata);
|
|
1145
|
+
function keyBuilder(luvio, config) {
|
|
1146
|
+
const resourceParams = createResourceParams(config);
|
|
1147
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
1148
|
+
}
|
|
1149
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1150
|
+
const config = {};
|
|
1151
|
+
typeCheckConfig$2(untrustedConfig, config, getPublicGroupShareData_ConfigPropertyMetadata);
|
|
1152
|
+
return config;
|
|
1153
|
+
}
|
|
1154
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1155
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1156
|
+
return null;
|
|
1157
|
+
}
|
|
1158
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1159
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1160
|
+
}
|
|
1161
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1162
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1163
|
+
return null;
|
|
1164
|
+
}
|
|
1165
|
+
return config;
|
|
1166
|
+
}
|
|
1167
|
+
function adapterFragment(luvio, config) {
|
|
1168
|
+
createResourceParams(config);
|
|
1169
|
+
return select();
|
|
1170
|
+
}
|
|
1171
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1172
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1173
|
+
config,
|
|
1174
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1175
|
+
});
|
|
1176
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1177
|
+
}
|
|
1178
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1179
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1180
|
+
config,
|
|
1181
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1182
|
+
});
|
|
1183
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1184
|
+
}
|
|
1185
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1186
|
+
const resourceParams = createResourceParams(config);
|
|
1187
|
+
const request = createResourceRequest(resourceParams);
|
|
1188
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1189
|
+
.then((response) => {
|
|
1190
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1191
|
+
const cache = new StoreKeyMap();
|
|
1192
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1193
|
+
return cache;
|
|
1194
|
+
});
|
|
1195
|
+
}, (response) => {
|
|
1196
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1199
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1200
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, 'get', false);
|
|
1201
|
+
}
|
|
1202
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1203
|
+
const { luvio, config } = context;
|
|
1204
|
+
const selector = {
|
|
1205
|
+
recordId: keyBuilder(luvio, config),
|
|
1206
|
+
node: adapterFragment(luvio, config),
|
|
1207
|
+
variables: {},
|
|
1208
|
+
};
|
|
1209
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1210
|
+
config,
|
|
1211
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1212
|
+
});
|
|
1213
|
+
return cacheSnapshot;
|
|
1214
|
+
}
|
|
1215
|
+
const getPublicGroupShareDataAdapterFactory = (luvio) => function sharing__getPublicGroupShareData(untrustedConfig, requestContext) {
|
|
1216
|
+
const config = validateAdapterConfig(untrustedConfig, getPublicGroupShareData_ConfigPropertyNames);
|
|
1217
|
+
// Invalid or incomplete config
|
|
1218
|
+
if (config === null) {
|
|
1219
|
+
return null;
|
|
1220
|
+
}
|
|
1221
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1222
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1223
|
+
};
|
|
1224
|
+
|
|
1225
|
+
let getGroupsForUser;
|
|
1226
|
+
let getPublicGroupShareData;
|
|
1227
|
+
// Imperative GET Adapters
|
|
1228
|
+
let getGroupsForUser_imperative;
|
|
1229
|
+
let getPublicGroupShareData_imperative;
|
|
1230
|
+
// Adapter Metadata
|
|
1231
|
+
const getGroupsForUserMetadata = { apiFamily: 'sharing', name: 'getGroupsForUser', ttl: 300 };
|
|
1232
|
+
const getPublicGroupShareDataMetadata = {
|
|
1233
|
+
apiFamily: 'sharing',
|
|
1234
|
+
name: 'getPublicGroupShareData',
|
|
1235
|
+
ttl: 300,
|
|
1236
|
+
};
|
|
1237
|
+
// Notify Update Available
|
|
1238
|
+
function bindExportsTo(luvio) {
|
|
1239
|
+
// LDS Adapters
|
|
1240
|
+
const getGroupsForUser_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getGroupsForUser', getGroupsForUserAdapterFactory), getGroupsForUserMetadata);
|
|
1241
|
+
const getPublicGroupShareData_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPublicGroupShareData', getPublicGroupShareDataAdapterFactory), getPublicGroupShareDataMetadata);
|
|
1242
|
+
return {
|
|
1243
|
+
getGroupsForUser: createWireAdapterConstructor(luvio, getGroupsForUser_ldsAdapter, getGroupsForUserMetadata),
|
|
1244
|
+
getPublicGroupShareData: createWireAdapterConstructor(luvio, getPublicGroupShareData_ldsAdapter, getPublicGroupShareDataMetadata),
|
|
1245
|
+
// Imperative GET Adapters
|
|
1246
|
+
getGroupsForUser_imperative: createImperativeAdapter(luvio, getGroupsForUser_ldsAdapter, getGroupsForUserMetadata),
|
|
1247
|
+
getPublicGroupShareData_imperative: createImperativeAdapter(luvio, getPublicGroupShareData_ldsAdapter, getPublicGroupShareDataMetadata),
|
|
1248
|
+
// Notify Update Availables
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
withDefaultLuvio((luvio) => {
|
|
1252
|
+
({
|
|
1253
|
+
getGroupsForUser,
|
|
1254
|
+
getPublicGroupShareData,
|
|
1255
|
+
getGroupsForUser_imperative,
|
|
1256
|
+
getPublicGroupShareData_imperative,
|
|
1257
|
+
} = bindExportsTo(luvio));
|
|
1258
|
+
});
|
|
1259
|
+
|
|
1260
|
+
export { getGroupsForUser, getGroupsForUser_imperative, getPublicGroupShareData, getPublicGroupShareData_imperative };
|
|
1261
|
+
// version: 1.279.0-5933c6c0c
|