@salesforce/lds-adapters-platform-sharing 0.1.0-dev1
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 +3363 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/addRemoveUserToGroups.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/getAllSobjects.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/getGroupsForUser.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/adapters/getPublicGroupMembershipDetails.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/adapters/getPublicGroupShareData.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/adapters/getUserPermissions.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +6 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingGroupsForUserByGroupTypeAndUserId.d.ts +24 -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/getSharingSobjects.d.ts +17 -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/getSharingUserPermissions.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getSharingUsersOrGroups.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/postSharingAddRemoveUserToGroups.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/postSharingPublicGroupsDetails.d.ts +22 -0
- package/dist/es/es2018/types/src/generated/resources/postSharingPublicGroupsSummary.d.ts +21 -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/FilterCriteriaInputRepresentation.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 +37 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupMembersInPublicGroupRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupMembershipDetailsInputRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupMembershipDetailsRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupSummaryInputRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupSummaryRepresentation.d.ts +50 -0
- package/dist/es/es2018/types/src/generated/types/QueueRepresentation.d.ts +52 -0
- package/dist/es/es2018/types/src/generated/types/QueuesSharingRepresentation.d.ts +37 -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/RolesInGroupRepresentation.d.ts +46 -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 +43 -0
- package/dist/es/es2018/types/src/generated/types/SharingRulesOwnerGroupSharingRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/SobjectOutputSharingRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/SobjectsOutputSharingRepresentation.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/types/SupportedObjectListRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/UserGroupMembershipDetailsInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/UserGroupMembershipDetailsRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/UserMembersInPublicGroupRepresentation.d.ts +49 -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/UserPermissionInfoRepresentation.d.ts +55 -0
- package/dist/es/es2018/types/src/generated/types/UserPermissionsInfoListRepresentation.d.ts +33 -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 +3449 -0
- package/src/raml/api.raml +1130 -0
- package/src/raml/luvio.raml +94 -0
|
@@ -0,0 +1,3363 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6, typeCheckConfig as typeCheckConfig$6, StoreKeyMap, createResourceParams as createResourceParams$6 } from '@luvio/engine';
|
|
8
|
+
|
|
9
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
+
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
11
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
|
+
/**
|
|
13
|
+
* Validates an adapter config is well-formed.
|
|
14
|
+
* @param config The config to validate.
|
|
15
|
+
* @param adapter The adapter validation configuration.
|
|
16
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
17
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
18
|
+
*/
|
|
19
|
+
function validateConfig(config, adapter, oneOf) {
|
|
20
|
+
const { displayName } = adapter;
|
|
21
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
22
|
+
if (config === undefined ||
|
|
23
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
24
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
27
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
28
|
+
}
|
|
29
|
+
if (unsupported !== undefined &&
|
|
30
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
31
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
const supported = required.concat(optional);
|
|
34
|
+
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
35
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function untrustedIsObject(untrusted) {
|
|
39
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
40
|
+
}
|
|
41
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
42
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
43
|
+
}
|
|
44
|
+
const snapshotRefreshOptions = {
|
|
45
|
+
overrides: {
|
|
46
|
+
headers: {
|
|
47
|
+
'Cache-Control': 'no-cache',
|
|
48
|
+
},
|
|
49
|
+
}
|
|
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
|
+
}
|
|
61
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
62
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
63
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
64
|
+
return {
|
|
65
|
+
displayName,
|
|
66
|
+
parameters: {
|
|
67
|
+
required,
|
|
68
|
+
optional,
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const keyPrefix = 'sharing';
|
|
73
|
+
|
|
74
|
+
const { isArray: ArrayIsArray } = Array;
|
|
75
|
+
function equalsArray(a, b, equalsItem) {
|
|
76
|
+
const aLength = a.length;
|
|
77
|
+
const bLength = b.length;
|
|
78
|
+
if (aLength !== bLength) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
for (let i = 0; i < aLength; i++) {
|
|
82
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
function createLink(ref) {
|
|
89
|
+
return {
|
|
90
|
+
__ref: serializeStructuredKey(ref),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const VERSION$i = "56d2fddc6bd67f680c2301e397df75c1";
|
|
95
|
+
function validate$i(obj, path = 'PublicGroupRepresentation') {
|
|
96
|
+
const v_error = (() => {
|
|
97
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
98
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
99
|
+
}
|
|
100
|
+
const obj_createdById = obj.createdById;
|
|
101
|
+
const path_createdById = path + '.createdById';
|
|
102
|
+
if (typeof obj_createdById !== 'string') {
|
|
103
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdById + '" (at "' + path_createdById + '")');
|
|
104
|
+
}
|
|
105
|
+
const obj_createdByName = obj.createdByName;
|
|
106
|
+
const path_createdByName = path + '.createdByName';
|
|
107
|
+
if (typeof obj_createdByName !== 'string') {
|
|
108
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdByName + '" (at "' + path_createdByName + '")');
|
|
109
|
+
}
|
|
110
|
+
const obj_createdDate = obj.createdDate;
|
|
111
|
+
const path_createdDate = path + '.createdDate';
|
|
112
|
+
if (typeof obj_createdDate !== 'string') {
|
|
113
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
114
|
+
}
|
|
115
|
+
const obj_developerName = obj.developerName;
|
|
116
|
+
const path_developerName = path + '.developerName';
|
|
117
|
+
if (typeof obj_developerName !== 'string') {
|
|
118
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
119
|
+
}
|
|
120
|
+
const obj_groupId = obj.groupId;
|
|
121
|
+
const path_groupId = path + '.groupId';
|
|
122
|
+
if (typeof obj_groupId !== 'string') {
|
|
123
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupId + '" (at "' + path_groupId + '")');
|
|
124
|
+
}
|
|
125
|
+
const obj_includeBosses = obj.includeBosses;
|
|
126
|
+
const path_includeBosses = path + '.includeBosses';
|
|
127
|
+
if (typeof obj_includeBosses !== 'boolean') {
|
|
128
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_includeBosses + '" (at "' + path_includeBosses + '")');
|
|
129
|
+
}
|
|
130
|
+
const obj_membershipLevel = obj.membershipLevel;
|
|
131
|
+
const path_membershipLevel = path + '.membershipLevel';
|
|
132
|
+
if (typeof obj_membershipLevel !== 'string') {
|
|
133
|
+
return new TypeError('Expected "string" but received "' + typeof obj_membershipLevel + '" (at "' + path_membershipLevel + '")');
|
|
134
|
+
}
|
|
135
|
+
const obj_name = obj.name;
|
|
136
|
+
const path_name = path + '.name';
|
|
137
|
+
if (typeof obj_name !== 'string') {
|
|
138
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
139
|
+
}
|
|
140
|
+
})();
|
|
141
|
+
return v_error === undefined ? null : v_error;
|
|
142
|
+
}
|
|
143
|
+
const select$o = function PublicGroupRepresentationSelect() {
|
|
144
|
+
return {
|
|
145
|
+
kind: 'Fragment',
|
|
146
|
+
version: VERSION$i,
|
|
147
|
+
private: [],
|
|
148
|
+
selections: [
|
|
149
|
+
{
|
|
150
|
+
name: 'createdById',
|
|
151
|
+
kind: 'Scalar'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'createdByName',
|
|
155
|
+
kind: 'Scalar'
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'createdDate',
|
|
159
|
+
kind: 'Scalar'
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'developerName',
|
|
163
|
+
kind: 'Scalar'
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'groupId',
|
|
167
|
+
kind: 'Scalar'
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'includeBosses',
|
|
171
|
+
kind: 'Scalar'
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'membershipLevel',
|
|
175
|
+
kind: 'Scalar'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'name',
|
|
179
|
+
kind: 'Scalar'
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
function equals$i(existing, incoming) {
|
|
185
|
+
const existing_includeBosses = existing.includeBosses;
|
|
186
|
+
const incoming_includeBosses = incoming.includeBosses;
|
|
187
|
+
if (!(existing_includeBosses === incoming_includeBosses)) {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
const existing_createdById = existing.createdById;
|
|
191
|
+
const incoming_createdById = incoming.createdById;
|
|
192
|
+
if (!(existing_createdById === incoming_createdById)) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
const existing_createdByName = existing.createdByName;
|
|
196
|
+
const incoming_createdByName = incoming.createdByName;
|
|
197
|
+
if (!(existing_createdByName === incoming_createdByName)) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
const existing_createdDate = existing.createdDate;
|
|
201
|
+
const incoming_createdDate = incoming.createdDate;
|
|
202
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
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_groupId = existing.groupId;
|
|
211
|
+
const incoming_groupId = incoming.groupId;
|
|
212
|
+
if (!(existing_groupId === incoming_groupId)) {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
const existing_membershipLevel = existing.membershipLevel;
|
|
216
|
+
const incoming_membershipLevel = incoming.membershipLevel;
|
|
217
|
+
if (!(existing_membershipLevel === incoming_membershipLevel)) {
|
|
218
|
+
return false;
|
|
219
|
+
}
|
|
220
|
+
const existing_name = existing.name;
|
|
221
|
+
const incoming_name = incoming.name;
|
|
222
|
+
if (!(existing_name === incoming_name)) {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const VERSION$h = "86395e9e3ea80502810c8109ecd94d68";
|
|
229
|
+
function validate$h(obj, path = 'QueueRepresentation') {
|
|
230
|
+
const v_error = (() => {
|
|
231
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
232
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
233
|
+
}
|
|
234
|
+
const obj_developerName = obj.developerName;
|
|
235
|
+
const path_developerName = path + '.developerName';
|
|
236
|
+
if (typeof obj_developerName !== 'string') {
|
|
237
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
238
|
+
}
|
|
239
|
+
const obj_membershipLevel = obj.membershipLevel;
|
|
240
|
+
const path_membershipLevel = path + '.membershipLevel';
|
|
241
|
+
if (typeof obj_membershipLevel !== 'string') {
|
|
242
|
+
return new TypeError('Expected "string" but received "' + typeof obj_membershipLevel + '" (at "' + path_membershipLevel + '")');
|
|
243
|
+
}
|
|
244
|
+
const obj_modifiedById = obj.modifiedById;
|
|
245
|
+
const path_modifiedById = path + '.modifiedById';
|
|
246
|
+
if (typeof obj_modifiedById !== 'string') {
|
|
247
|
+
return new TypeError('Expected "string" but received "' + typeof obj_modifiedById + '" (at "' + path_modifiedById + '")');
|
|
248
|
+
}
|
|
249
|
+
const obj_modifiedByName = obj.modifiedByName;
|
|
250
|
+
const path_modifiedByName = path + '.modifiedByName';
|
|
251
|
+
if (typeof obj_modifiedByName !== 'string') {
|
|
252
|
+
return new TypeError('Expected "string" but received "' + typeof obj_modifiedByName + '" (at "' + path_modifiedByName + '")');
|
|
253
|
+
}
|
|
254
|
+
const obj_modifiedDate = obj.modifiedDate;
|
|
255
|
+
const path_modifiedDate = path + '.modifiedDate';
|
|
256
|
+
if (typeof obj_modifiedDate !== 'string') {
|
|
257
|
+
return new TypeError('Expected "string" but received "' + typeof obj_modifiedDate + '" (at "' + path_modifiedDate + '")');
|
|
258
|
+
}
|
|
259
|
+
const obj_name = obj.name;
|
|
260
|
+
const path_name = path + '.name';
|
|
261
|
+
if (typeof obj_name !== 'string') {
|
|
262
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
263
|
+
}
|
|
264
|
+
const obj_queueEmail = obj.queueEmail;
|
|
265
|
+
const path_queueEmail = path + '.queueEmail';
|
|
266
|
+
if (typeof obj_queueEmail !== 'string') {
|
|
267
|
+
return new TypeError('Expected "string" but received "' + typeof obj_queueEmail + '" (at "' + path_queueEmail + '")');
|
|
268
|
+
}
|
|
269
|
+
const obj_queueId = obj.queueId;
|
|
270
|
+
const path_queueId = path + '.queueId';
|
|
271
|
+
if (typeof obj_queueId !== 'string') {
|
|
272
|
+
return new TypeError('Expected "string" but received "' + typeof obj_queueId + '" (at "' + path_queueId + '")');
|
|
273
|
+
}
|
|
274
|
+
const obj_supportedSObjects = obj.supportedSObjects;
|
|
275
|
+
const path_supportedSObjects = path + '.supportedSObjects';
|
|
276
|
+
if (typeof obj_supportedSObjects !== 'string') {
|
|
277
|
+
return new TypeError('Expected "string" but received "' + typeof obj_supportedSObjects + '" (at "' + path_supportedSObjects + '")');
|
|
278
|
+
}
|
|
279
|
+
})();
|
|
280
|
+
return v_error === undefined ? null : v_error;
|
|
281
|
+
}
|
|
282
|
+
const select$n = function QueueRepresentationSelect() {
|
|
283
|
+
return {
|
|
284
|
+
kind: 'Fragment',
|
|
285
|
+
version: VERSION$h,
|
|
286
|
+
private: [],
|
|
287
|
+
selections: [
|
|
288
|
+
{
|
|
289
|
+
name: 'developerName',
|
|
290
|
+
kind: 'Scalar'
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: 'membershipLevel',
|
|
294
|
+
kind: 'Scalar'
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: 'modifiedById',
|
|
298
|
+
kind: 'Scalar'
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: 'modifiedByName',
|
|
302
|
+
kind: 'Scalar'
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'modifiedDate',
|
|
306
|
+
kind: 'Scalar'
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: 'name',
|
|
310
|
+
kind: 'Scalar'
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: 'queueEmail',
|
|
314
|
+
kind: 'Scalar'
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
name: 'queueId',
|
|
318
|
+
kind: 'Scalar'
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: 'supportedSObjects',
|
|
322
|
+
kind: 'Scalar'
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
function equals$h(existing, incoming) {
|
|
328
|
+
const existing_developerName = existing.developerName;
|
|
329
|
+
const incoming_developerName = incoming.developerName;
|
|
330
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
const existing_membershipLevel = existing.membershipLevel;
|
|
334
|
+
const incoming_membershipLevel = incoming.membershipLevel;
|
|
335
|
+
if (!(existing_membershipLevel === incoming_membershipLevel)) {
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
338
|
+
const existing_modifiedById = existing.modifiedById;
|
|
339
|
+
const incoming_modifiedById = incoming.modifiedById;
|
|
340
|
+
if (!(existing_modifiedById === incoming_modifiedById)) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
const existing_modifiedByName = existing.modifiedByName;
|
|
344
|
+
const incoming_modifiedByName = incoming.modifiedByName;
|
|
345
|
+
if (!(existing_modifiedByName === incoming_modifiedByName)) {
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
const existing_modifiedDate = existing.modifiedDate;
|
|
349
|
+
const incoming_modifiedDate = incoming.modifiedDate;
|
|
350
|
+
if (!(existing_modifiedDate === incoming_modifiedDate)) {
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
const existing_name = existing.name;
|
|
354
|
+
const incoming_name = incoming.name;
|
|
355
|
+
if (!(existing_name === incoming_name)) {
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
const existing_queueEmail = existing.queueEmail;
|
|
359
|
+
const incoming_queueEmail = incoming.queueEmail;
|
|
360
|
+
if (!(existing_queueEmail === incoming_queueEmail)) {
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
const existing_queueId = existing.queueId;
|
|
364
|
+
const incoming_queueId = incoming.queueId;
|
|
365
|
+
if (!(existing_queueId === incoming_queueId)) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
const existing_supportedSObjects = existing.supportedSObjects;
|
|
369
|
+
const incoming_supportedSObjects = incoming.supportedSObjects;
|
|
370
|
+
if (!(existing_supportedSObjects === incoming_supportedSObjects)) {
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
373
|
+
return true;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
const TTL$5 = 300;
|
|
377
|
+
const VERSION$g = "3659c4a4f46957a3a2b5cb2d2383180d";
|
|
378
|
+
function validate$g(obj, path = 'GroupCollectionRepresentation') {
|
|
379
|
+
const v_error = (() => {
|
|
380
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
381
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
382
|
+
}
|
|
383
|
+
const obj_publicGroupRepresentations = obj.publicGroupRepresentations;
|
|
384
|
+
const path_publicGroupRepresentations = path + '.publicGroupRepresentations';
|
|
385
|
+
if (!ArrayIsArray(obj_publicGroupRepresentations)) {
|
|
386
|
+
return new TypeError('Expected "array" but received "' + typeof obj_publicGroupRepresentations + '" (at "' + path_publicGroupRepresentations + '")');
|
|
387
|
+
}
|
|
388
|
+
for (let i = 0; i < obj_publicGroupRepresentations.length; i++) {
|
|
389
|
+
const obj_publicGroupRepresentations_item = obj_publicGroupRepresentations[i];
|
|
390
|
+
const path_publicGroupRepresentations_item = path_publicGroupRepresentations + '[' + i + ']';
|
|
391
|
+
const referencepath_publicGroupRepresentations_itemValidationError = validate$i(obj_publicGroupRepresentations_item, path_publicGroupRepresentations_item);
|
|
392
|
+
if (referencepath_publicGroupRepresentations_itemValidationError !== null) {
|
|
393
|
+
let message = 'Object doesn\'t match PublicGroupRepresentation (at "' + path_publicGroupRepresentations_item + '")\n';
|
|
394
|
+
message += referencepath_publicGroupRepresentations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
395
|
+
return new TypeError(message);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
const obj_queueRepresentations = obj.queueRepresentations;
|
|
399
|
+
const path_queueRepresentations = path + '.queueRepresentations';
|
|
400
|
+
if (!ArrayIsArray(obj_queueRepresentations)) {
|
|
401
|
+
return new TypeError('Expected "array" but received "' + typeof obj_queueRepresentations + '" (at "' + path_queueRepresentations + '")');
|
|
402
|
+
}
|
|
403
|
+
for (let i = 0; i < obj_queueRepresentations.length; i++) {
|
|
404
|
+
const obj_queueRepresentations_item = obj_queueRepresentations[i];
|
|
405
|
+
const path_queueRepresentations_item = path_queueRepresentations + '[' + i + ']';
|
|
406
|
+
const referencepath_queueRepresentations_itemValidationError = validate$h(obj_queueRepresentations_item, path_queueRepresentations_item);
|
|
407
|
+
if (referencepath_queueRepresentations_itemValidationError !== null) {
|
|
408
|
+
let message = 'Object doesn\'t match QueueRepresentation (at "' + path_queueRepresentations_item + '")\n';
|
|
409
|
+
message += referencepath_queueRepresentations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
410
|
+
return new TypeError(message);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
})();
|
|
414
|
+
return v_error === undefined ? null : v_error;
|
|
415
|
+
}
|
|
416
|
+
const RepresentationType$5 = 'GroupCollectionRepresentation';
|
|
417
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
418
|
+
return input;
|
|
419
|
+
}
|
|
420
|
+
const select$m = function GroupCollectionRepresentationSelect() {
|
|
421
|
+
const { selections: PublicGroupRepresentation__selections, opaque: PublicGroupRepresentation__opaque, } = select$o();
|
|
422
|
+
const { selections: QueueRepresentation__selections, opaque: QueueRepresentation__opaque, } = select$n();
|
|
423
|
+
return {
|
|
424
|
+
kind: 'Fragment',
|
|
425
|
+
version: VERSION$g,
|
|
426
|
+
private: [],
|
|
427
|
+
selections: [
|
|
428
|
+
{
|
|
429
|
+
name: 'publicGroupRepresentations',
|
|
430
|
+
kind: 'Object',
|
|
431
|
+
plural: true,
|
|
432
|
+
selections: PublicGroupRepresentation__selections
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
name: 'queueRepresentations',
|
|
436
|
+
kind: 'Object',
|
|
437
|
+
plural: true,
|
|
438
|
+
selections: QueueRepresentation__selections
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
function equals$g(existing, incoming) {
|
|
444
|
+
const existing_publicGroupRepresentations = existing.publicGroupRepresentations;
|
|
445
|
+
const incoming_publicGroupRepresentations = incoming.publicGroupRepresentations;
|
|
446
|
+
const equals_publicGroupRepresentations_items = equalsArray(existing_publicGroupRepresentations, incoming_publicGroupRepresentations, (existing_publicGroupRepresentations_item, incoming_publicGroupRepresentations_item) => {
|
|
447
|
+
if (!(equals$i(existing_publicGroupRepresentations_item, incoming_publicGroupRepresentations_item))) {
|
|
448
|
+
return false;
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
if (equals_publicGroupRepresentations_items === false) {
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
const existing_queueRepresentations = existing.queueRepresentations;
|
|
455
|
+
const incoming_queueRepresentations = incoming.queueRepresentations;
|
|
456
|
+
const equals_queueRepresentations_items = equalsArray(existing_queueRepresentations, incoming_queueRepresentations, (existing_queueRepresentations_item, incoming_queueRepresentations_item) => {
|
|
457
|
+
if (!(equals$h(existing_queueRepresentations_item, incoming_queueRepresentations_item))) {
|
|
458
|
+
return false;
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
if (equals_queueRepresentations_items === false) {
|
|
462
|
+
return false;
|
|
463
|
+
}
|
|
464
|
+
return true;
|
|
465
|
+
}
|
|
466
|
+
const ingest$5 = function GroupCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
467
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
468
|
+
const validateError = validate$g(input);
|
|
469
|
+
if (validateError !== null) {
|
|
470
|
+
throw validateError;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
const key = path.fullPath;
|
|
474
|
+
const ttlToUse = TTL$5;
|
|
475
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "sharing", VERSION$g, RepresentationType$5, equals$g);
|
|
476
|
+
return createLink(key);
|
|
477
|
+
};
|
|
478
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
479
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
480
|
+
const rootKey = fullPathFactory();
|
|
481
|
+
rootKeySet.set(rootKey, {
|
|
482
|
+
namespace: keyPrefix,
|
|
483
|
+
representationName: RepresentationType$5,
|
|
484
|
+
mergeable: false
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
function select$l(luvio, params) {
|
|
489
|
+
return select$m();
|
|
490
|
+
}
|
|
491
|
+
function keyBuilder$b(luvio, params) {
|
|
492
|
+
return keyPrefix + '::GroupCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'sortBy:' + params.queryParams.sortBy + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'groupMembership:' + params.queryParams.groupMembership + ',' + 'searchTerm:' + params.queryParams.searchTerm + ',' + 'groupType:' + params.urlParams.groupType + ',' + 'userId:' + params.urlParams.userId + ')';
|
|
493
|
+
}
|
|
494
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
495
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
496
|
+
}
|
|
497
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
498
|
+
const { body } = response;
|
|
499
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
500
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
501
|
+
const snapshot = luvio.storeLookup({
|
|
502
|
+
recordId: key,
|
|
503
|
+
node: select$l(),
|
|
504
|
+
variables: {},
|
|
505
|
+
}, snapshotRefresh);
|
|
506
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
507
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
508
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
deepFreeze(snapshot.data);
|
|
512
|
+
return snapshot;
|
|
513
|
+
}
|
|
514
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
515
|
+
const key = keyBuilder$b(luvio, params);
|
|
516
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
517
|
+
const storeMetadataParams = {
|
|
518
|
+
ttl: TTL$5,
|
|
519
|
+
namespace: keyPrefix,
|
|
520
|
+
version: VERSION$g,
|
|
521
|
+
representationName: RepresentationType$5
|
|
522
|
+
};
|
|
523
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
524
|
+
return errorSnapshot;
|
|
525
|
+
}
|
|
526
|
+
function createResourceRequest$5(config) {
|
|
527
|
+
const headers = {};
|
|
528
|
+
return {
|
|
529
|
+
baseUri: '/services/data/v66.0',
|
|
530
|
+
basePath: '/sharing/groups-for-user/' + config.urlParams.userId + '/' + config.urlParams.groupType + '',
|
|
531
|
+
method: 'get',
|
|
532
|
+
body: null,
|
|
533
|
+
urlParams: config.urlParams,
|
|
534
|
+
queryParams: config.queryParams,
|
|
535
|
+
headers,
|
|
536
|
+
priority: 'normal',
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
const adapterName$5 = 'getGroupsForUser';
|
|
541
|
+
const getGroupsForUser_ConfigPropertyMetadata = [
|
|
542
|
+
generateParamConfigMetadata('groupType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
543
|
+
generateParamConfigMetadata('userId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
544
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
545
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
546
|
+
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
547
|
+
generateParamConfigMetadata('sortOrder', false, 1 /* QueryParameter */, 0 /* String */),
|
|
548
|
+
generateParamConfigMetadata('groupMembership', false, 1 /* QueryParameter */, 0 /* String */),
|
|
549
|
+
generateParamConfigMetadata('searchTerm', false, 1 /* QueryParameter */, 0 /* String */),
|
|
550
|
+
];
|
|
551
|
+
const getGroupsForUser_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getGroupsForUser_ConfigPropertyMetadata);
|
|
552
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getGroupsForUser_ConfigPropertyMetadata);
|
|
553
|
+
function keyBuilder$a(luvio, config) {
|
|
554
|
+
const resourceParams = createResourceParams$5(config);
|
|
555
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
556
|
+
}
|
|
557
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
558
|
+
const config = {};
|
|
559
|
+
typeCheckConfig$6(untrustedConfig, config, getGroupsForUser_ConfigPropertyMetadata);
|
|
560
|
+
return config;
|
|
561
|
+
}
|
|
562
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
563
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
564
|
+
return null;
|
|
565
|
+
}
|
|
566
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
567
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
568
|
+
}
|
|
569
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
570
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
571
|
+
return null;
|
|
572
|
+
}
|
|
573
|
+
return config;
|
|
574
|
+
}
|
|
575
|
+
function adapterFragment$5(luvio, config) {
|
|
576
|
+
createResourceParams$5(config);
|
|
577
|
+
return select$l();
|
|
578
|
+
}
|
|
579
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
580
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
581
|
+
config,
|
|
582
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
583
|
+
});
|
|
584
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
585
|
+
}
|
|
586
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
587
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
588
|
+
config,
|
|
589
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
590
|
+
});
|
|
591
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
592
|
+
}
|
|
593
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
594
|
+
const resourceParams = createResourceParams$5(config);
|
|
595
|
+
const request = createResourceRequest$5(resourceParams);
|
|
596
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
597
|
+
.then((response) => {
|
|
598
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
599
|
+
const cache = new StoreKeyMap();
|
|
600
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
601
|
+
return cache;
|
|
602
|
+
});
|
|
603
|
+
}, (response) => {
|
|
604
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
608
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
609
|
+
}
|
|
610
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
611
|
+
const { luvio, config } = context;
|
|
612
|
+
const selector = {
|
|
613
|
+
recordId: keyBuilder$a(luvio, config),
|
|
614
|
+
node: adapterFragment$5(luvio, config),
|
|
615
|
+
variables: {},
|
|
616
|
+
};
|
|
617
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
618
|
+
config,
|
|
619
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
620
|
+
});
|
|
621
|
+
return cacheSnapshot;
|
|
622
|
+
}
|
|
623
|
+
const getGroupsForUserAdapterFactory = (luvio) => function sharing__getGroupsForUser(untrustedConfig, requestContext) {
|
|
624
|
+
const config = validateAdapterConfig$5(untrustedConfig, getGroupsForUser_ConfigPropertyNames);
|
|
625
|
+
// Invalid or incomplete config
|
|
626
|
+
if (config === null) {
|
|
627
|
+
return null;
|
|
628
|
+
}
|
|
629
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
630
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
const TTL$4 = 300;
|
|
634
|
+
const VERSION$f = "9934cf4cb3fdd0b955c08c2d695a9a53";
|
|
635
|
+
function validate$f(obj, path = 'UserGroupMembershipDetailsRepresentation') {
|
|
636
|
+
const v_error = (() => {
|
|
637
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
638
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
639
|
+
}
|
|
640
|
+
const obj_errors = obj.errors;
|
|
641
|
+
const path_errors = path + '.errors';
|
|
642
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
643
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
644
|
+
}
|
|
645
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
646
|
+
const obj_errors_item = obj_errors[i];
|
|
647
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
648
|
+
if (typeof obj_errors_item !== 'string') {
|
|
649
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errors_item + '" (at "' + path_errors_item + '")');
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
const obj_infos = obj.infos;
|
|
653
|
+
const path_infos = path + '.infos';
|
|
654
|
+
if (!ArrayIsArray(obj_infos)) {
|
|
655
|
+
return new TypeError('Expected "array" but received "' + typeof obj_infos + '" (at "' + path_infos + '")');
|
|
656
|
+
}
|
|
657
|
+
for (let i = 0; i < obj_infos.length; i++) {
|
|
658
|
+
const obj_infos_item = obj_infos[i];
|
|
659
|
+
const path_infos_item = path_infos + '[' + i + ']';
|
|
660
|
+
if (typeof obj_infos_item !== 'string') {
|
|
661
|
+
return new TypeError('Expected "string" but received "' + typeof obj_infos_item + '" (at "' + path_infos_item + '")');
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
const obj_isSuccess = obj.isSuccess;
|
|
665
|
+
const path_isSuccess = path + '.isSuccess';
|
|
666
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
667
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
668
|
+
}
|
|
669
|
+
const obj_operation = obj.operation;
|
|
670
|
+
const path_operation = path + '.operation';
|
|
671
|
+
if (typeof obj_operation !== 'string') {
|
|
672
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operation + '" (at "' + path_operation + '")');
|
|
673
|
+
}
|
|
674
|
+
})();
|
|
675
|
+
return v_error === undefined ? null : v_error;
|
|
676
|
+
}
|
|
677
|
+
const RepresentationType$4 = 'UserGroupMembershipDetailsRepresentation';
|
|
678
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
679
|
+
return input;
|
|
680
|
+
}
|
|
681
|
+
const select$k = function UserGroupMembershipDetailsRepresentationSelect() {
|
|
682
|
+
return {
|
|
683
|
+
kind: 'Fragment',
|
|
684
|
+
version: VERSION$f,
|
|
685
|
+
private: [],
|
|
686
|
+
selections: [
|
|
687
|
+
{
|
|
688
|
+
name: 'errors',
|
|
689
|
+
kind: 'Scalar',
|
|
690
|
+
plural: true
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
name: 'infos',
|
|
694
|
+
kind: 'Scalar',
|
|
695
|
+
plural: true
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
name: 'isSuccess',
|
|
699
|
+
kind: 'Scalar'
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
name: 'operation',
|
|
703
|
+
kind: 'Scalar'
|
|
704
|
+
}
|
|
705
|
+
]
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
function equals$f(existing, incoming) {
|
|
709
|
+
const existing_isSuccess = existing.isSuccess;
|
|
710
|
+
const incoming_isSuccess = incoming.isSuccess;
|
|
711
|
+
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
712
|
+
return false;
|
|
713
|
+
}
|
|
714
|
+
const existing_operation = existing.operation;
|
|
715
|
+
const incoming_operation = incoming.operation;
|
|
716
|
+
if (!(existing_operation === incoming_operation)) {
|
|
717
|
+
return false;
|
|
718
|
+
}
|
|
719
|
+
const existing_errors = existing.errors;
|
|
720
|
+
const incoming_errors = incoming.errors;
|
|
721
|
+
const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
|
|
722
|
+
if (!(existing_errors_item === incoming_errors_item)) {
|
|
723
|
+
return false;
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
if (equals_errors_items === false) {
|
|
727
|
+
return false;
|
|
728
|
+
}
|
|
729
|
+
const existing_infos = existing.infos;
|
|
730
|
+
const incoming_infos = incoming.infos;
|
|
731
|
+
const equals_infos_items = equalsArray(existing_infos, incoming_infos, (existing_infos_item, incoming_infos_item) => {
|
|
732
|
+
if (!(existing_infos_item === incoming_infos_item)) {
|
|
733
|
+
return false;
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
if (equals_infos_items === false) {
|
|
737
|
+
return false;
|
|
738
|
+
}
|
|
739
|
+
return true;
|
|
740
|
+
}
|
|
741
|
+
const ingest$4 = function UserGroupMembershipDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
742
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
743
|
+
const validateError = validate$f(input);
|
|
744
|
+
if (validateError !== null) {
|
|
745
|
+
throw validateError;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
const key = path.fullPath;
|
|
749
|
+
const ttlToUse = TTL$4;
|
|
750
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "sharing", VERSION$f, RepresentationType$4, equals$f);
|
|
751
|
+
return createLink(key);
|
|
752
|
+
};
|
|
753
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
754
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
755
|
+
const rootKey = fullPathFactory();
|
|
756
|
+
rootKeySet.set(rootKey, {
|
|
757
|
+
namespace: keyPrefix,
|
|
758
|
+
representationName: RepresentationType$4,
|
|
759
|
+
mergeable: false
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
function select$j(luvio, params) {
|
|
764
|
+
return select$k();
|
|
765
|
+
}
|
|
766
|
+
function keyBuilder$9(luvio, params) {
|
|
767
|
+
return keyPrefix + '::UserGroupMembershipDetailsRepresentation:(' + 'userId:' + params.body.userId + '::' + 'memberType:' + params.body.memberType + '::' + 'operation:' + params.body.operation + '::' + 'selectedGroups:' + params.body.selectedGroups + ')';
|
|
768
|
+
}
|
|
769
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
770
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
771
|
+
}
|
|
772
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
773
|
+
const { body } = response;
|
|
774
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
775
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
776
|
+
const snapshot = luvio.storeLookup({
|
|
777
|
+
recordId: key,
|
|
778
|
+
node: select$j(),
|
|
779
|
+
variables: {},
|
|
780
|
+
}, snapshotRefresh);
|
|
781
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
782
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
783
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
deepFreeze(snapshot.data);
|
|
787
|
+
return snapshot;
|
|
788
|
+
}
|
|
789
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
790
|
+
const key = keyBuilder$9(luvio, params);
|
|
791
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
792
|
+
const storeMetadataParams = {
|
|
793
|
+
ttl: TTL$4,
|
|
794
|
+
namespace: keyPrefix,
|
|
795
|
+
version: VERSION$f,
|
|
796
|
+
representationName: RepresentationType$4
|
|
797
|
+
};
|
|
798
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
799
|
+
return errorSnapshot;
|
|
800
|
+
}
|
|
801
|
+
function createResourceRequest$4(config) {
|
|
802
|
+
const headers = {};
|
|
803
|
+
return {
|
|
804
|
+
baseUri: '/services/data/v66.0',
|
|
805
|
+
basePath: '/sharing/addRemoveUserToGroups',
|
|
806
|
+
method: 'post',
|
|
807
|
+
body: config.body,
|
|
808
|
+
urlParams: {},
|
|
809
|
+
queryParams: {},
|
|
810
|
+
headers,
|
|
811
|
+
priority: 'normal',
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
const adapterName$4 = 'addRemoveUserToGroups';
|
|
816
|
+
const addRemoveUserToGroups_ConfigPropertyMetadata = [
|
|
817
|
+
generateParamConfigMetadata('userId', true, 2 /* Body */, 0 /* String */),
|
|
818
|
+
generateParamConfigMetadata('memberType', true, 2 /* Body */, 0 /* String */),
|
|
819
|
+
generateParamConfigMetadata('operation', true, 2 /* Body */, 0 /* String */),
|
|
820
|
+
generateParamConfigMetadata('selectedGroups', true, 2 /* Body */, 0 /* String */, true),
|
|
821
|
+
];
|
|
822
|
+
const addRemoveUserToGroups_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, addRemoveUserToGroups_ConfigPropertyMetadata);
|
|
823
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(addRemoveUserToGroups_ConfigPropertyMetadata);
|
|
824
|
+
function keyBuilder$8(luvio, config) {
|
|
825
|
+
const resourceParams = createResourceParams$4(config);
|
|
826
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
827
|
+
}
|
|
828
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
829
|
+
const config = {};
|
|
830
|
+
typeCheckConfig$6(untrustedConfig, config, addRemoveUserToGroups_ConfigPropertyMetadata);
|
|
831
|
+
return config;
|
|
832
|
+
}
|
|
833
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
834
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
835
|
+
return null;
|
|
836
|
+
}
|
|
837
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
838
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
839
|
+
}
|
|
840
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
841
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
842
|
+
return null;
|
|
843
|
+
}
|
|
844
|
+
return config;
|
|
845
|
+
}
|
|
846
|
+
function adapterFragment$4(luvio, config) {
|
|
847
|
+
createResourceParams$4(config);
|
|
848
|
+
return select$j();
|
|
849
|
+
}
|
|
850
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
851
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
852
|
+
config,
|
|
853
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
854
|
+
});
|
|
855
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
856
|
+
}
|
|
857
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
858
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
859
|
+
config,
|
|
860
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
861
|
+
});
|
|
862
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
863
|
+
}
|
|
864
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
865
|
+
const resourceParams = createResourceParams$4(config);
|
|
866
|
+
const request = createResourceRequest$4(resourceParams);
|
|
867
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
868
|
+
.then((response) => {
|
|
869
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
870
|
+
const cache = new StoreKeyMap();
|
|
871
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
872
|
+
return cache;
|
|
873
|
+
});
|
|
874
|
+
}, (response) => {
|
|
875
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
879
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, 'get', false);
|
|
880
|
+
}
|
|
881
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
882
|
+
const { luvio, config } = context;
|
|
883
|
+
const selector = {
|
|
884
|
+
recordId: keyBuilder$8(luvio, config),
|
|
885
|
+
node: adapterFragment$4(luvio, config),
|
|
886
|
+
variables: {},
|
|
887
|
+
};
|
|
888
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
889
|
+
config,
|
|
890
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
891
|
+
});
|
|
892
|
+
return cacheSnapshot;
|
|
893
|
+
}
|
|
894
|
+
const addRemoveUserToGroupsAdapterFactory = (luvio) => function sharing__addRemoveUserToGroups(untrustedConfig, requestContext) {
|
|
895
|
+
const config = validateAdapterConfig$4(untrustedConfig, addRemoveUserToGroups_ConfigPropertyNames);
|
|
896
|
+
// Invalid or incomplete config
|
|
897
|
+
if (config === null) {
|
|
898
|
+
return null;
|
|
899
|
+
}
|
|
900
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
901
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
const VERSION$e = "10400ecb443c1cd1f8fa280e9f89ded8";
|
|
905
|
+
function validate$e(obj, path = 'PublicGroupMembersInPublicGroupRepresentation') {
|
|
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_createdBy = obj.createdBy;
|
|
911
|
+
const path_createdBy = path + '.createdBy';
|
|
912
|
+
if (typeof obj_createdBy !== 'string') {
|
|
913
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
914
|
+
}
|
|
915
|
+
const obj_createdDate = obj.createdDate;
|
|
916
|
+
const path_createdDate = path + '.createdDate';
|
|
917
|
+
if (typeof obj_createdDate !== 'string') {
|
|
918
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
919
|
+
}
|
|
920
|
+
const obj_dataId = obj.dataId;
|
|
921
|
+
const path_dataId = path + '.dataId';
|
|
922
|
+
if (typeof obj_dataId !== 'string') {
|
|
923
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataId + '" (at "' + path_dataId + '")');
|
|
924
|
+
}
|
|
925
|
+
const obj_developerName = obj.developerName;
|
|
926
|
+
const path_developerName = path + '.developerName';
|
|
927
|
+
if (typeof obj_developerName !== 'string') {
|
|
928
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
929
|
+
}
|
|
930
|
+
const obj_groupName = obj.groupName;
|
|
931
|
+
const path_groupName = path + '.groupName';
|
|
932
|
+
if (typeof obj_groupName !== 'string') {
|
|
933
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
934
|
+
}
|
|
935
|
+
const obj_groupType = obj.groupType;
|
|
936
|
+
const path_groupType = path + '.groupType';
|
|
937
|
+
if (typeof obj_groupType !== 'string') {
|
|
938
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupType + '" (at "' + path_groupType + '")');
|
|
939
|
+
}
|
|
940
|
+
const obj_includeBosses = obj.includeBosses;
|
|
941
|
+
const path_includeBosses = path + '.includeBosses';
|
|
942
|
+
if (typeof obj_includeBosses !== 'boolean') {
|
|
943
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_includeBosses + '" (at "' + path_includeBosses + '")');
|
|
944
|
+
}
|
|
945
|
+
})();
|
|
946
|
+
return v_error === undefined ? null : v_error;
|
|
947
|
+
}
|
|
948
|
+
const select$i = function PublicGroupMembersInPublicGroupRepresentationSelect() {
|
|
949
|
+
return {
|
|
950
|
+
kind: 'Fragment',
|
|
951
|
+
version: VERSION$e,
|
|
952
|
+
private: [],
|
|
953
|
+
selections: [
|
|
954
|
+
{
|
|
955
|
+
name: 'createdBy',
|
|
956
|
+
kind: 'Scalar'
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
name: 'createdDate',
|
|
960
|
+
kind: 'Scalar'
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: 'dataId',
|
|
964
|
+
kind: 'Scalar'
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
name: 'developerName',
|
|
968
|
+
kind: 'Scalar'
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
name: 'groupName',
|
|
972
|
+
kind: 'Scalar'
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
name: 'groupType',
|
|
976
|
+
kind: 'Scalar'
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
name: 'includeBosses',
|
|
980
|
+
kind: 'Scalar'
|
|
981
|
+
}
|
|
982
|
+
]
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
function equals$e(existing, incoming) {
|
|
986
|
+
const existing_includeBosses = existing.includeBosses;
|
|
987
|
+
const incoming_includeBosses = incoming.includeBosses;
|
|
988
|
+
if (!(existing_includeBosses === incoming_includeBosses)) {
|
|
989
|
+
return false;
|
|
990
|
+
}
|
|
991
|
+
const existing_createdBy = existing.createdBy;
|
|
992
|
+
const incoming_createdBy = incoming.createdBy;
|
|
993
|
+
if (!(existing_createdBy === incoming_createdBy)) {
|
|
994
|
+
return false;
|
|
995
|
+
}
|
|
996
|
+
const existing_createdDate = existing.createdDate;
|
|
997
|
+
const incoming_createdDate = incoming.createdDate;
|
|
998
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
999
|
+
return false;
|
|
1000
|
+
}
|
|
1001
|
+
const existing_dataId = existing.dataId;
|
|
1002
|
+
const incoming_dataId = incoming.dataId;
|
|
1003
|
+
if (!(existing_dataId === incoming_dataId)) {
|
|
1004
|
+
return false;
|
|
1005
|
+
}
|
|
1006
|
+
const existing_developerName = existing.developerName;
|
|
1007
|
+
const incoming_developerName = incoming.developerName;
|
|
1008
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
const existing_groupName = existing.groupName;
|
|
1012
|
+
const incoming_groupName = incoming.groupName;
|
|
1013
|
+
if (!(existing_groupName === incoming_groupName)) {
|
|
1014
|
+
return false;
|
|
1015
|
+
}
|
|
1016
|
+
const existing_groupType = existing.groupType;
|
|
1017
|
+
const incoming_groupType = incoming.groupType;
|
|
1018
|
+
if (!(existing_groupType === incoming_groupType)) {
|
|
1019
|
+
return false;
|
|
1020
|
+
}
|
|
1021
|
+
return true;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
const VERSION$d = "23a331717bb19992d3c37b818fc7008a";
|
|
1025
|
+
function validate$d(obj, path = 'RolesInGroupRepresentation') {
|
|
1026
|
+
const v_error = (() => {
|
|
1027
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1028
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1029
|
+
}
|
|
1030
|
+
const obj_dataId = obj.dataId;
|
|
1031
|
+
const path_dataId = path + '.dataId';
|
|
1032
|
+
if (typeof obj_dataId !== 'string') {
|
|
1033
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataId + '" (at "' + path_dataId + '")');
|
|
1034
|
+
}
|
|
1035
|
+
const obj_groupType = obj.groupType;
|
|
1036
|
+
const path_groupType = path + '.groupType';
|
|
1037
|
+
if (typeof obj_groupType !== 'string') {
|
|
1038
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupType + '" (at "' + path_groupType + '")');
|
|
1039
|
+
}
|
|
1040
|
+
const obj_roleName = obj.roleName;
|
|
1041
|
+
const path_roleName = path + '.roleName';
|
|
1042
|
+
if (typeof obj_roleName !== 'string') {
|
|
1043
|
+
return new TypeError('Expected "string" but received "' + typeof obj_roleName + '" (at "' + path_roleName + '")');
|
|
1044
|
+
}
|
|
1045
|
+
const obj_roleParentDevName = obj.roleParentDevName;
|
|
1046
|
+
const path_roleParentDevName = path + '.roleParentDevName';
|
|
1047
|
+
if (typeof obj_roleParentDevName !== 'string') {
|
|
1048
|
+
return new TypeError('Expected "string" but received "' + typeof obj_roleParentDevName + '" (at "' + path_roleParentDevName + '")');
|
|
1049
|
+
}
|
|
1050
|
+
const obj_roleParentLabel = obj.roleParentLabel;
|
|
1051
|
+
const path_roleParentLabel = path + '.roleParentLabel';
|
|
1052
|
+
if (typeof obj_roleParentLabel !== 'string') {
|
|
1053
|
+
return new TypeError('Expected "string" but received "' + typeof obj_roleParentLabel + '" (at "' + path_roleParentLabel + '")');
|
|
1054
|
+
}
|
|
1055
|
+
const obj_roleUpdatedBy = obj.roleUpdatedBy;
|
|
1056
|
+
const path_roleUpdatedBy = path + '.roleUpdatedBy';
|
|
1057
|
+
if (typeof obj_roleUpdatedBy !== 'string') {
|
|
1058
|
+
return new TypeError('Expected "string" but received "' + typeof obj_roleUpdatedBy + '" (at "' + path_roleUpdatedBy + '")');
|
|
1059
|
+
}
|
|
1060
|
+
const obj_roleUpdatedOn = obj.roleUpdatedOn;
|
|
1061
|
+
const path_roleUpdatedOn = path + '.roleUpdatedOn';
|
|
1062
|
+
if (typeof obj_roleUpdatedOn !== 'string') {
|
|
1063
|
+
return new TypeError('Expected "string" but received "' + typeof obj_roleUpdatedOn + '" (at "' + path_roleUpdatedOn + '")');
|
|
1064
|
+
}
|
|
1065
|
+
})();
|
|
1066
|
+
return v_error === undefined ? null : v_error;
|
|
1067
|
+
}
|
|
1068
|
+
const select$h = function RolesInGroupRepresentationSelect() {
|
|
1069
|
+
return {
|
|
1070
|
+
kind: 'Fragment',
|
|
1071
|
+
version: VERSION$d,
|
|
1072
|
+
private: [],
|
|
1073
|
+
selections: [
|
|
1074
|
+
{
|
|
1075
|
+
name: 'dataId',
|
|
1076
|
+
kind: 'Scalar'
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
name: 'groupType',
|
|
1080
|
+
kind: 'Scalar'
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
name: 'roleName',
|
|
1084
|
+
kind: 'Scalar'
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
name: 'roleParentDevName',
|
|
1088
|
+
kind: 'Scalar'
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
name: 'roleParentLabel',
|
|
1092
|
+
kind: 'Scalar'
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
name: 'roleUpdatedBy',
|
|
1096
|
+
kind: 'Scalar'
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
name: 'roleUpdatedOn',
|
|
1100
|
+
kind: 'Scalar'
|
|
1101
|
+
}
|
|
1102
|
+
]
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
function equals$d(existing, incoming) {
|
|
1106
|
+
const existing_dataId = existing.dataId;
|
|
1107
|
+
const incoming_dataId = incoming.dataId;
|
|
1108
|
+
if (!(existing_dataId === incoming_dataId)) {
|
|
1109
|
+
return false;
|
|
1110
|
+
}
|
|
1111
|
+
const existing_groupType = existing.groupType;
|
|
1112
|
+
const incoming_groupType = incoming.groupType;
|
|
1113
|
+
if (!(existing_groupType === incoming_groupType)) {
|
|
1114
|
+
return false;
|
|
1115
|
+
}
|
|
1116
|
+
const existing_roleName = existing.roleName;
|
|
1117
|
+
const incoming_roleName = incoming.roleName;
|
|
1118
|
+
if (!(existing_roleName === incoming_roleName)) {
|
|
1119
|
+
return false;
|
|
1120
|
+
}
|
|
1121
|
+
const existing_roleParentDevName = existing.roleParentDevName;
|
|
1122
|
+
const incoming_roleParentDevName = incoming.roleParentDevName;
|
|
1123
|
+
if (!(existing_roleParentDevName === incoming_roleParentDevName)) {
|
|
1124
|
+
return false;
|
|
1125
|
+
}
|
|
1126
|
+
const existing_roleParentLabel = existing.roleParentLabel;
|
|
1127
|
+
const incoming_roleParentLabel = incoming.roleParentLabel;
|
|
1128
|
+
if (!(existing_roleParentLabel === incoming_roleParentLabel)) {
|
|
1129
|
+
return false;
|
|
1130
|
+
}
|
|
1131
|
+
const existing_roleUpdatedBy = existing.roleUpdatedBy;
|
|
1132
|
+
const incoming_roleUpdatedBy = incoming.roleUpdatedBy;
|
|
1133
|
+
if (!(existing_roleUpdatedBy === incoming_roleUpdatedBy)) {
|
|
1134
|
+
return false;
|
|
1135
|
+
}
|
|
1136
|
+
const existing_roleUpdatedOn = existing.roleUpdatedOn;
|
|
1137
|
+
const incoming_roleUpdatedOn = incoming.roleUpdatedOn;
|
|
1138
|
+
if (!(existing_roleUpdatedOn === incoming_roleUpdatedOn)) {
|
|
1139
|
+
return false;
|
|
1140
|
+
}
|
|
1141
|
+
return true;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
const VERSION$c = "81212e87b01ada2a285c551aadcec218";
|
|
1145
|
+
function validate$c(obj, path = 'UserMembersInPublicGroupRepresentation') {
|
|
1146
|
+
const v_error = (() => {
|
|
1147
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1148
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1149
|
+
}
|
|
1150
|
+
const obj_alias = obj.alias;
|
|
1151
|
+
const path_alias = path + '.alias';
|
|
1152
|
+
if (typeof obj_alias !== 'string') {
|
|
1153
|
+
return new TypeError('Expected "string" but received "' + typeof obj_alias + '" (at "' + path_alias + '")');
|
|
1154
|
+
}
|
|
1155
|
+
const obj_dataId = obj.dataId;
|
|
1156
|
+
const path_dataId = path + '.dataId';
|
|
1157
|
+
if (typeof obj_dataId !== 'string') {
|
|
1158
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataId + '" (at "' + path_dataId + '")');
|
|
1159
|
+
}
|
|
1160
|
+
const obj_status = obj.status;
|
|
1161
|
+
const path_status = path + '.status';
|
|
1162
|
+
if (typeof obj_status !== 'boolean') {
|
|
1163
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1164
|
+
}
|
|
1165
|
+
const obj_userFullName = obj.userFullName;
|
|
1166
|
+
const path_userFullName = path + '.userFullName';
|
|
1167
|
+
if (typeof obj_userFullName !== 'string') {
|
|
1168
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userFullName + '" (at "' + path_userFullName + '")');
|
|
1169
|
+
}
|
|
1170
|
+
const obj_userName = obj.userName;
|
|
1171
|
+
const path_userName = path + '.userName';
|
|
1172
|
+
if (typeof obj_userName !== 'string') {
|
|
1173
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userName + '" (at "' + path_userName + '")');
|
|
1174
|
+
}
|
|
1175
|
+
const obj_userProfile = obj.userProfile;
|
|
1176
|
+
const path_userProfile = path + '.userProfile';
|
|
1177
|
+
if (typeof obj_userProfile !== 'string') {
|
|
1178
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userProfile + '" (at "' + path_userProfile + '")');
|
|
1179
|
+
}
|
|
1180
|
+
const obj_userRoleName = obj.userRoleName;
|
|
1181
|
+
const path_userRoleName = path + '.userRoleName';
|
|
1182
|
+
if (typeof obj_userRoleName !== 'string') {
|
|
1183
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userRoleName + '" (at "' + path_userRoleName + '")');
|
|
1184
|
+
}
|
|
1185
|
+
const obj_userType = obj.userType;
|
|
1186
|
+
const path_userType = path + '.userType';
|
|
1187
|
+
if (typeof obj_userType !== 'string') {
|
|
1188
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userType + '" (at "' + path_userType + '")');
|
|
1189
|
+
}
|
|
1190
|
+
})();
|
|
1191
|
+
return v_error === undefined ? null : v_error;
|
|
1192
|
+
}
|
|
1193
|
+
const select$g = function UserMembersInPublicGroupRepresentationSelect() {
|
|
1194
|
+
return {
|
|
1195
|
+
kind: 'Fragment',
|
|
1196
|
+
version: VERSION$c,
|
|
1197
|
+
private: [],
|
|
1198
|
+
selections: [
|
|
1199
|
+
{
|
|
1200
|
+
name: 'alias',
|
|
1201
|
+
kind: 'Scalar'
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
name: 'dataId',
|
|
1205
|
+
kind: 'Scalar'
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
name: 'status',
|
|
1209
|
+
kind: 'Scalar'
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
name: 'userFullName',
|
|
1213
|
+
kind: 'Scalar'
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
name: 'userName',
|
|
1217
|
+
kind: 'Scalar'
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
name: 'userProfile',
|
|
1221
|
+
kind: 'Scalar'
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
name: 'userRoleName',
|
|
1225
|
+
kind: 'Scalar'
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
name: 'userType',
|
|
1229
|
+
kind: 'Scalar'
|
|
1230
|
+
}
|
|
1231
|
+
]
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1234
|
+
function equals$c(existing, incoming) {
|
|
1235
|
+
const existing_status = existing.status;
|
|
1236
|
+
const incoming_status = incoming.status;
|
|
1237
|
+
if (!(existing_status === incoming_status)) {
|
|
1238
|
+
return false;
|
|
1239
|
+
}
|
|
1240
|
+
const existing_alias = existing.alias;
|
|
1241
|
+
const incoming_alias = incoming.alias;
|
|
1242
|
+
if (!(existing_alias === incoming_alias)) {
|
|
1243
|
+
return false;
|
|
1244
|
+
}
|
|
1245
|
+
const existing_dataId = existing.dataId;
|
|
1246
|
+
const incoming_dataId = incoming.dataId;
|
|
1247
|
+
if (!(existing_dataId === incoming_dataId)) {
|
|
1248
|
+
return false;
|
|
1249
|
+
}
|
|
1250
|
+
const existing_userFullName = existing.userFullName;
|
|
1251
|
+
const incoming_userFullName = incoming.userFullName;
|
|
1252
|
+
if (!(existing_userFullName === incoming_userFullName)) {
|
|
1253
|
+
return false;
|
|
1254
|
+
}
|
|
1255
|
+
const existing_userName = existing.userName;
|
|
1256
|
+
const incoming_userName = incoming.userName;
|
|
1257
|
+
if (!(existing_userName === incoming_userName)) {
|
|
1258
|
+
return false;
|
|
1259
|
+
}
|
|
1260
|
+
const existing_userProfile = existing.userProfile;
|
|
1261
|
+
const incoming_userProfile = incoming.userProfile;
|
|
1262
|
+
if (!(existing_userProfile === incoming_userProfile)) {
|
|
1263
|
+
return false;
|
|
1264
|
+
}
|
|
1265
|
+
const existing_userRoleName = existing.userRoleName;
|
|
1266
|
+
const incoming_userRoleName = incoming.userRoleName;
|
|
1267
|
+
if (!(existing_userRoleName === incoming_userRoleName)) {
|
|
1268
|
+
return false;
|
|
1269
|
+
}
|
|
1270
|
+
const existing_userType = existing.userType;
|
|
1271
|
+
const incoming_userType = incoming.userType;
|
|
1272
|
+
if (!(existing_userType === incoming_userType)) {
|
|
1273
|
+
return false;
|
|
1274
|
+
}
|
|
1275
|
+
return true;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
const TTL$3 = 300;
|
|
1279
|
+
const VERSION$b = "ff9b160e9ebbf564f9bbe3a7ee37cc16";
|
|
1280
|
+
function validate$b(obj, path = 'PublicGroupMembershipDetailsRepresentation') {
|
|
1281
|
+
const v_error = (() => {
|
|
1282
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1283
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1284
|
+
}
|
|
1285
|
+
const obj_isMember = obj.isMember;
|
|
1286
|
+
const path_isMember = path + '.isMember';
|
|
1287
|
+
if (typeof obj_isMember !== 'boolean') {
|
|
1288
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isMember + '" (at "' + path_isMember + '")');
|
|
1289
|
+
}
|
|
1290
|
+
const obj_listChannelPrograms = obj.listChannelPrograms;
|
|
1291
|
+
const path_listChannelPrograms = path + '.listChannelPrograms';
|
|
1292
|
+
if (!ArrayIsArray(obj_listChannelPrograms)) {
|
|
1293
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listChannelPrograms + '" (at "' + path_listChannelPrograms + '")');
|
|
1294
|
+
}
|
|
1295
|
+
for (let i = 0; i < obj_listChannelPrograms.length; i++) {
|
|
1296
|
+
const obj_listChannelPrograms_item = obj_listChannelPrograms[i];
|
|
1297
|
+
const path_listChannelPrograms_item = path_listChannelPrograms + '[' + i + ']';
|
|
1298
|
+
const referencepath_listChannelPrograms_itemValidationError = validate$e(obj_listChannelPrograms_item, path_listChannelPrograms_item);
|
|
1299
|
+
if (referencepath_listChannelPrograms_itemValidationError !== null) {
|
|
1300
|
+
let message = 'Object doesn\'t match PublicGroupMembersInPublicGroupRepresentation (at "' + path_listChannelPrograms_item + '")\n';
|
|
1301
|
+
message += referencepath_listChannelPrograms_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1302
|
+
return new TypeError(message);
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
const obj_listPublicGroups = obj.listPublicGroups;
|
|
1306
|
+
const path_listPublicGroups = path + '.listPublicGroups';
|
|
1307
|
+
if (!ArrayIsArray(obj_listPublicGroups)) {
|
|
1308
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listPublicGroups + '" (at "' + path_listPublicGroups + '")');
|
|
1309
|
+
}
|
|
1310
|
+
for (let i = 0; i < obj_listPublicGroups.length; i++) {
|
|
1311
|
+
const obj_listPublicGroups_item = obj_listPublicGroups[i];
|
|
1312
|
+
const path_listPublicGroups_item = path_listPublicGroups + '[' + i + ']';
|
|
1313
|
+
const referencepath_listPublicGroups_itemValidationError = validate$e(obj_listPublicGroups_item, path_listPublicGroups_item);
|
|
1314
|
+
if (referencepath_listPublicGroups_itemValidationError !== null) {
|
|
1315
|
+
let message = 'Object doesn\'t match PublicGroupMembersInPublicGroupRepresentation (at "' + path_listPublicGroups_item + '")\n';
|
|
1316
|
+
message += referencepath_listPublicGroups_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1317
|
+
return new TypeError(message);
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
const obj_listRoles = obj.listRoles;
|
|
1321
|
+
const path_listRoles = path + '.listRoles';
|
|
1322
|
+
if (!ArrayIsArray(obj_listRoles)) {
|
|
1323
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listRoles + '" (at "' + path_listRoles + '")');
|
|
1324
|
+
}
|
|
1325
|
+
for (let i = 0; i < obj_listRoles.length; i++) {
|
|
1326
|
+
const obj_listRoles_item = obj_listRoles[i];
|
|
1327
|
+
const path_listRoles_item = path_listRoles + '[' + i + ']';
|
|
1328
|
+
const referencepath_listRoles_itemValidationError = validate$d(obj_listRoles_item, path_listRoles_item);
|
|
1329
|
+
if (referencepath_listRoles_itemValidationError !== null) {
|
|
1330
|
+
let message = 'Object doesn\'t match RolesInGroupRepresentation (at "' + path_listRoles_item + '")\n';
|
|
1331
|
+
message += referencepath_listRoles_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1332
|
+
return new TypeError(message);
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
const obj_listRolesAndInternalSubordinates = obj.listRolesAndInternalSubordinates;
|
|
1336
|
+
const path_listRolesAndInternalSubordinates = path + '.listRolesAndInternalSubordinates';
|
|
1337
|
+
if (!ArrayIsArray(obj_listRolesAndInternalSubordinates)) {
|
|
1338
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listRolesAndInternalSubordinates + '" (at "' + path_listRolesAndInternalSubordinates + '")');
|
|
1339
|
+
}
|
|
1340
|
+
for (let i = 0; i < obj_listRolesAndInternalSubordinates.length; i++) {
|
|
1341
|
+
const obj_listRolesAndInternalSubordinates_item = obj_listRolesAndInternalSubordinates[i];
|
|
1342
|
+
const path_listRolesAndInternalSubordinates_item = path_listRolesAndInternalSubordinates + '[' + i + ']';
|
|
1343
|
+
const referencepath_listRolesAndInternalSubordinates_itemValidationError = validate$d(obj_listRolesAndInternalSubordinates_item, path_listRolesAndInternalSubordinates_item);
|
|
1344
|
+
if (referencepath_listRolesAndInternalSubordinates_itemValidationError !== null) {
|
|
1345
|
+
let message = 'Object doesn\'t match RolesInGroupRepresentation (at "' + path_listRolesAndInternalSubordinates_item + '")\n';
|
|
1346
|
+
message += referencepath_listRolesAndInternalSubordinates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1347
|
+
return new TypeError(message);
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
const obj_listRolesInternalAndPortalSubordinates = obj.listRolesInternalAndPortalSubordinates;
|
|
1351
|
+
const path_listRolesInternalAndPortalSubordinates = path + '.listRolesInternalAndPortalSubordinates';
|
|
1352
|
+
if (!ArrayIsArray(obj_listRolesInternalAndPortalSubordinates)) {
|
|
1353
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listRolesInternalAndPortalSubordinates + '" (at "' + path_listRolesInternalAndPortalSubordinates + '")');
|
|
1354
|
+
}
|
|
1355
|
+
for (let i = 0; i < obj_listRolesInternalAndPortalSubordinates.length; i++) {
|
|
1356
|
+
const obj_listRolesInternalAndPortalSubordinates_item = obj_listRolesInternalAndPortalSubordinates[i];
|
|
1357
|
+
const path_listRolesInternalAndPortalSubordinates_item = path_listRolesInternalAndPortalSubordinates + '[' + i + ']';
|
|
1358
|
+
const referencepath_listRolesInternalAndPortalSubordinates_itemValidationError = validate$d(obj_listRolesInternalAndPortalSubordinates_item, path_listRolesInternalAndPortalSubordinates_item);
|
|
1359
|
+
if (referencepath_listRolesInternalAndPortalSubordinates_itemValidationError !== null) {
|
|
1360
|
+
let message = 'Object doesn\'t match RolesInGroupRepresentation (at "' + path_listRolesInternalAndPortalSubordinates_item + '")\n';
|
|
1361
|
+
message += referencepath_listRolesInternalAndPortalSubordinates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1362
|
+
return new TypeError(message);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
const obj_listTerritories = obj.listTerritories;
|
|
1366
|
+
const path_listTerritories = path + '.listTerritories';
|
|
1367
|
+
if (!ArrayIsArray(obj_listTerritories)) {
|
|
1368
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listTerritories + '" (at "' + path_listTerritories + '")');
|
|
1369
|
+
}
|
|
1370
|
+
for (let i = 0; i < obj_listTerritories.length; i++) {
|
|
1371
|
+
const obj_listTerritories_item = obj_listTerritories[i];
|
|
1372
|
+
const path_listTerritories_item = path_listTerritories + '[' + i + ']';
|
|
1373
|
+
const referencepath_listTerritories_itemValidationError = validate$d(obj_listTerritories_item, path_listTerritories_item);
|
|
1374
|
+
if (referencepath_listTerritories_itemValidationError !== null) {
|
|
1375
|
+
let message = 'Object doesn\'t match RolesInGroupRepresentation (at "' + path_listTerritories_item + '")\n';
|
|
1376
|
+
message += referencepath_listTerritories_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1377
|
+
return new TypeError(message);
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
const obj_listUsers = obj.listUsers;
|
|
1381
|
+
const path_listUsers = path + '.listUsers';
|
|
1382
|
+
if (!ArrayIsArray(obj_listUsers)) {
|
|
1383
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listUsers + '" (at "' + path_listUsers + '")');
|
|
1384
|
+
}
|
|
1385
|
+
for (let i = 0; i < obj_listUsers.length; i++) {
|
|
1386
|
+
const obj_listUsers_item = obj_listUsers[i];
|
|
1387
|
+
const path_listUsers_item = path_listUsers + '[' + i + ']';
|
|
1388
|
+
const referencepath_listUsers_itemValidationError = validate$c(obj_listUsers_item, path_listUsers_item);
|
|
1389
|
+
if (referencepath_listUsers_itemValidationError !== null) {
|
|
1390
|
+
let message = 'Object doesn\'t match UserMembersInPublicGroupRepresentation (at "' + path_listUsers_item + '")\n';
|
|
1391
|
+
message += referencepath_listUsers_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1392
|
+
return new TypeError(message);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
})();
|
|
1396
|
+
return v_error === undefined ? null : v_error;
|
|
1397
|
+
}
|
|
1398
|
+
const RepresentationType$3 = 'PublicGroupMembershipDetailsRepresentation';
|
|
1399
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1400
|
+
return input;
|
|
1401
|
+
}
|
|
1402
|
+
const select$f = function PublicGroupMembershipDetailsRepresentationSelect() {
|
|
1403
|
+
const { selections: PublicGroupMembersInPublicGroupRepresentation__selections, opaque: PublicGroupMembersInPublicGroupRepresentation__opaque, } = select$i();
|
|
1404
|
+
const { selections: RolesInGroupRepresentation__selections, opaque: RolesInGroupRepresentation__opaque, } = select$h();
|
|
1405
|
+
const { selections: UserMembersInPublicGroupRepresentation__selections, opaque: UserMembersInPublicGroupRepresentation__opaque, } = select$g();
|
|
1406
|
+
return {
|
|
1407
|
+
kind: 'Fragment',
|
|
1408
|
+
version: VERSION$b,
|
|
1409
|
+
private: [],
|
|
1410
|
+
selections: [
|
|
1411
|
+
{
|
|
1412
|
+
name: 'isMember',
|
|
1413
|
+
kind: 'Scalar'
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
name: 'listChannelPrograms',
|
|
1417
|
+
kind: 'Object',
|
|
1418
|
+
plural: true,
|
|
1419
|
+
selections: PublicGroupMembersInPublicGroupRepresentation__selections
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
name: 'listPublicGroups',
|
|
1423
|
+
kind: 'Object',
|
|
1424
|
+
plural: true,
|
|
1425
|
+
selections: PublicGroupMembersInPublicGroupRepresentation__selections
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
name: 'listRoles',
|
|
1429
|
+
kind: 'Object',
|
|
1430
|
+
plural: true,
|
|
1431
|
+
selections: RolesInGroupRepresentation__selections
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
name: 'listRolesAndInternalSubordinates',
|
|
1435
|
+
kind: 'Object',
|
|
1436
|
+
plural: true,
|
|
1437
|
+
selections: RolesInGroupRepresentation__selections
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
name: 'listRolesInternalAndPortalSubordinates',
|
|
1441
|
+
kind: 'Object',
|
|
1442
|
+
plural: true,
|
|
1443
|
+
selections: RolesInGroupRepresentation__selections
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
name: 'listTerritories',
|
|
1447
|
+
kind: 'Object',
|
|
1448
|
+
plural: true,
|
|
1449
|
+
selections: RolesInGroupRepresentation__selections
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
name: 'listUsers',
|
|
1453
|
+
kind: 'Object',
|
|
1454
|
+
plural: true,
|
|
1455
|
+
selections: UserMembersInPublicGroupRepresentation__selections
|
|
1456
|
+
}
|
|
1457
|
+
]
|
|
1458
|
+
};
|
|
1459
|
+
};
|
|
1460
|
+
function equals$b(existing, incoming) {
|
|
1461
|
+
const existing_isMember = existing.isMember;
|
|
1462
|
+
const incoming_isMember = incoming.isMember;
|
|
1463
|
+
if (!(existing_isMember === incoming_isMember)) {
|
|
1464
|
+
return false;
|
|
1465
|
+
}
|
|
1466
|
+
const existing_listChannelPrograms = existing.listChannelPrograms;
|
|
1467
|
+
const incoming_listChannelPrograms = incoming.listChannelPrograms;
|
|
1468
|
+
const equals_listChannelPrograms_items = equalsArray(existing_listChannelPrograms, incoming_listChannelPrograms, (existing_listChannelPrograms_item, incoming_listChannelPrograms_item) => {
|
|
1469
|
+
if (!(equals$e(existing_listChannelPrograms_item, incoming_listChannelPrograms_item))) {
|
|
1470
|
+
return false;
|
|
1471
|
+
}
|
|
1472
|
+
});
|
|
1473
|
+
if (equals_listChannelPrograms_items === false) {
|
|
1474
|
+
return false;
|
|
1475
|
+
}
|
|
1476
|
+
const existing_listPublicGroups = existing.listPublicGroups;
|
|
1477
|
+
const incoming_listPublicGroups = incoming.listPublicGroups;
|
|
1478
|
+
const equals_listPublicGroups_items = equalsArray(existing_listPublicGroups, incoming_listPublicGroups, (existing_listPublicGroups_item, incoming_listPublicGroups_item) => {
|
|
1479
|
+
if (!(equals$e(existing_listPublicGroups_item, incoming_listPublicGroups_item))) {
|
|
1480
|
+
return false;
|
|
1481
|
+
}
|
|
1482
|
+
});
|
|
1483
|
+
if (equals_listPublicGroups_items === false) {
|
|
1484
|
+
return false;
|
|
1485
|
+
}
|
|
1486
|
+
const existing_listRoles = existing.listRoles;
|
|
1487
|
+
const incoming_listRoles = incoming.listRoles;
|
|
1488
|
+
const equals_listRoles_items = equalsArray(existing_listRoles, incoming_listRoles, (existing_listRoles_item, incoming_listRoles_item) => {
|
|
1489
|
+
if (!(equals$d(existing_listRoles_item, incoming_listRoles_item))) {
|
|
1490
|
+
return false;
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
if (equals_listRoles_items === false) {
|
|
1494
|
+
return false;
|
|
1495
|
+
}
|
|
1496
|
+
const existing_listRolesAndInternalSubordinates = existing.listRolesAndInternalSubordinates;
|
|
1497
|
+
const incoming_listRolesAndInternalSubordinates = incoming.listRolesAndInternalSubordinates;
|
|
1498
|
+
const equals_listRolesAndInternalSubordinates_items = equalsArray(existing_listRolesAndInternalSubordinates, incoming_listRolesAndInternalSubordinates, (existing_listRolesAndInternalSubordinates_item, incoming_listRolesAndInternalSubordinates_item) => {
|
|
1499
|
+
if (!(equals$d(existing_listRolesAndInternalSubordinates_item, incoming_listRolesAndInternalSubordinates_item))) {
|
|
1500
|
+
return false;
|
|
1501
|
+
}
|
|
1502
|
+
});
|
|
1503
|
+
if (equals_listRolesAndInternalSubordinates_items === false) {
|
|
1504
|
+
return false;
|
|
1505
|
+
}
|
|
1506
|
+
const existing_listRolesInternalAndPortalSubordinates = existing.listRolesInternalAndPortalSubordinates;
|
|
1507
|
+
const incoming_listRolesInternalAndPortalSubordinates = incoming.listRolesInternalAndPortalSubordinates;
|
|
1508
|
+
const equals_listRolesInternalAndPortalSubordinates_items = equalsArray(existing_listRolesInternalAndPortalSubordinates, incoming_listRolesInternalAndPortalSubordinates, (existing_listRolesInternalAndPortalSubordinates_item, incoming_listRolesInternalAndPortalSubordinates_item) => {
|
|
1509
|
+
if (!(equals$d(existing_listRolesInternalAndPortalSubordinates_item, incoming_listRolesInternalAndPortalSubordinates_item))) {
|
|
1510
|
+
return false;
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
if (equals_listRolesInternalAndPortalSubordinates_items === false) {
|
|
1514
|
+
return false;
|
|
1515
|
+
}
|
|
1516
|
+
const existing_listTerritories = existing.listTerritories;
|
|
1517
|
+
const incoming_listTerritories = incoming.listTerritories;
|
|
1518
|
+
const equals_listTerritories_items = equalsArray(existing_listTerritories, incoming_listTerritories, (existing_listTerritories_item, incoming_listTerritories_item) => {
|
|
1519
|
+
if (!(equals$d(existing_listTerritories_item, incoming_listTerritories_item))) {
|
|
1520
|
+
return false;
|
|
1521
|
+
}
|
|
1522
|
+
});
|
|
1523
|
+
if (equals_listTerritories_items === false) {
|
|
1524
|
+
return false;
|
|
1525
|
+
}
|
|
1526
|
+
const existing_listUsers = existing.listUsers;
|
|
1527
|
+
const incoming_listUsers = incoming.listUsers;
|
|
1528
|
+
const equals_listUsers_items = equalsArray(existing_listUsers, incoming_listUsers, (existing_listUsers_item, incoming_listUsers_item) => {
|
|
1529
|
+
if (!(equals$c(existing_listUsers_item, incoming_listUsers_item))) {
|
|
1530
|
+
return false;
|
|
1531
|
+
}
|
|
1532
|
+
});
|
|
1533
|
+
if (equals_listUsers_items === false) {
|
|
1534
|
+
return false;
|
|
1535
|
+
}
|
|
1536
|
+
return true;
|
|
1537
|
+
}
|
|
1538
|
+
const ingest$3 = function PublicGroupMembershipDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1539
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1540
|
+
const validateError = validate$b(input);
|
|
1541
|
+
if (validateError !== null) {
|
|
1542
|
+
throw validateError;
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
const key = path.fullPath;
|
|
1546
|
+
const ttlToUse = TTL$3;
|
|
1547
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "sharing", VERSION$b, RepresentationType$3, equals$b);
|
|
1548
|
+
return createLink(key);
|
|
1549
|
+
};
|
|
1550
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1551
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1552
|
+
const rootKey = fullPathFactory();
|
|
1553
|
+
rootKeySet.set(rootKey, {
|
|
1554
|
+
namespace: keyPrefix,
|
|
1555
|
+
representationName: RepresentationType$3,
|
|
1556
|
+
mergeable: false
|
|
1557
|
+
});
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
function select$e(luvio, params) {
|
|
1561
|
+
return select$f();
|
|
1562
|
+
}
|
|
1563
|
+
function keyBuilder$7(luvio, params) {
|
|
1564
|
+
return keyPrefix + '::PublicGroupMembershipDetailsRepresentation:(' + 'filterCriteria:' + params.body.filterCriteria + '::' + 'groupId:' + params.body.groupId + '::' + 'limit:' + params.body.limit + '::' + 'offset:' + params.body.offset + '::' + 'operation:' + params.body.operation + '::' + 'orderBy:' + params.body.orderBy + '::' + 'orderType:' + params.body.orderType + '::' + 'selectedMembers:' + params.body.selectedMembers + ')';
|
|
1565
|
+
}
|
|
1566
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1567
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
1568
|
+
}
|
|
1569
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1570
|
+
const { body } = response;
|
|
1571
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1572
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1573
|
+
const snapshot = luvio.storeLookup({
|
|
1574
|
+
recordId: key,
|
|
1575
|
+
node: select$e(),
|
|
1576
|
+
variables: {},
|
|
1577
|
+
}, snapshotRefresh);
|
|
1578
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1579
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1580
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
deepFreeze(snapshot.data);
|
|
1584
|
+
return snapshot;
|
|
1585
|
+
}
|
|
1586
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1587
|
+
const key = keyBuilder$7(luvio, params);
|
|
1588
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1589
|
+
const storeMetadataParams = {
|
|
1590
|
+
ttl: TTL$3,
|
|
1591
|
+
namespace: keyPrefix,
|
|
1592
|
+
version: VERSION$b,
|
|
1593
|
+
representationName: RepresentationType$3
|
|
1594
|
+
};
|
|
1595
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1596
|
+
return errorSnapshot;
|
|
1597
|
+
}
|
|
1598
|
+
function createResourceRequest$3(config) {
|
|
1599
|
+
const headers = {};
|
|
1600
|
+
return {
|
|
1601
|
+
baseUri: '/services/data/v66.0',
|
|
1602
|
+
basePath: '/sharing/publicGroupsDetails',
|
|
1603
|
+
method: 'post',
|
|
1604
|
+
body: config.body,
|
|
1605
|
+
urlParams: {},
|
|
1606
|
+
queryParams: {},
|
|
1607
|
+
headers,
|
|
1608
|
+
priority: 'normal',
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
const adapterName$3 = 'getPublicGroupMembershipDetails';
|
|
1613
|
+
const getPublicGroupMembershipDetails_ConfigPropertyMetadata = [
|
|
1614
|
+
generateParamConfigMetadata('filterCriteria', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1615
|
+
generateParamConfigMetadata('groupId', true, 2 /* Body */, 0 /* String */),
|
|
1616
|
+
generateParamConfigMetadata('limit', true, 2 /* Body */, 3 /* Integer */),
|
|
1617
|
+
generateParamConfigMetadata('offset', true, 2 /* Body */, 3 /* Integer */),
|
|
1618
|
+
generateParamConfigMetadata('operation', true, 2 /* Body */, 0 /* String */),
|
|
1619
|
+
generateParamConfigMetadata('orderBy', true, 2 /* Body */, 0 /* String */),
|
|
1620
|
+
generateParamConfigMetadata('orderType', true, 2 /* Body */, 0 /* String */),
|
|
1621
|
+
generateParamConfigMetadata('selectedMembers', true, 2 /* Body */, 0 /* String */, true),
|
|
1622
|
+
];
|
|
1623
|
+
const getPublicGroupMembershipDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getPublicGroupMembershipDetails_ConfigPropertyMetadata);
|
|
1624
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(getPublicGroupMembershipDetails_ConfigPropertyMetadata);
|
|
1625
|
+
function keyBuilder$6(luvio, config) {
|
|
1626
|
+
const resourceParams = createResourceParams$3(config);
|
|
1627
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
1628
|
+
}
|
|
1629
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1630
|
+
const config = {};
|
|
1631
|
+
typeCheckConfig$6(untrustedConfig, config, getPublicGroupMembershipDetails_ConfigPropertyMetadata);
|
|
1632
|
+
const untrustedConfig_filterCriteria = untrustedConfig.filterCriteria;
|
|
1633
|
+
config.filterCriteria = untrustedConfig_filterCriteria;
|
|
1634
|
+
return config;
|
|
1635
|
+
}
|
|
1636
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1637
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1638
|
+
return null;
|
|
1639
|
+
}
|
|
1640
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1641
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1642
|
+
}
|
|
1643
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1644
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1645
|
+
return null;
|
|
1646
|
+
}
|
|
1647
|
+
return config;
|
|
1648
|
+
}
|
|
1649
|
+
function adapterFragment$3(luvio, config) {
|
|
1650
|
+
createResourceParams$3(config);
|
|
1651
|
+
return select$e();
|
|
1652
|
+
}
|
|
1653
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1654
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1655
|
+
config,
|
|
1656
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1657
|
+
});
|
|
1658
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1659
|
+
}
|
|
1660
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1661
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1662
|
+
config,
|
|
1663
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1664
|
+
});
|
|
1665
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1666
|
+
}
|
|
1667
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1668
|
+
const resourceParams = createResourceParams$3(config);
|
|
1669
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1670
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1671
|
+
.then((response) => {
|
|
1672
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1673
|
+
const cache = new StoreKeyMap();
|
|
1674
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1675
|
+
return cache;
|
|
1676
|
+
});
|
|
1677
|
+
}, (response) => {
|
|
1678
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1682
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, 'get', false);
|
|
1683
|
+
}
|
|
1684
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1685
|
+
const { luvio, config } = context;
|
|
1686
|
+
const selector = {
|
|
1687
|
+
recordId: keyBuilder$6(luvio, config),
|
|
1688
|
+
node: adapterFragment$3(luvio, config),
|
|
1689
|
+
variables: {},
|
|
1690
|
+
};
|
|
1691
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1692
|
+
config,
|
|
1693
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1694
|
+
});
|
|
1695
|
+
return cacheSnapshot;
|
|
1696
|
+
}
|
|
1697
|
+
const getPublicGroupMembershipDetailsAdapterFactory = (luvio) => function sharing__getPublicGroupMembershipDetails(untrustedConfig, requestContext) {
|
|
1698
|
+
const config = validateAdapterConfig$3(untrustedConfig, getPublicGroupMembershipDetails_ConfigPropertyNames);
|
|
1699
|
+
// Invalid or incomplete config
|
|
1700
|
+
if (config === null) {
|
|
1701
|
+
return null;
|
|
1702
|
+
}
|
|
1703
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1704
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1705
|
+
};
|
|
1706
|
+
|
|
1707
|
+
const VERSION$a = "11e587d0bd769c0df33d7cce4eb7210d";
|
|
1708
|
+
function validate$a(obj, path = 'IncludedGroupsSharingRepresentation') {
|
|
1709
|
+
const v_error = (() => {
|
|
1710
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1711
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1712
|
+
}
|
|
1713
|
+
const obj_createdBy = obj.createdBy;
|
|
1714
|
+
const path_createdBy = path + '.createdBy';
|
|
1715
|
+
if (typeof obj_createdBy !== 'string') {
|
|
1716
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
1717
|
+
}
|
|
1718
|
+
const obj_createdOn = obj.createdOn;
|
|
1719
|
+
const path_createdOn = path + '.createdOn';
|
|
1720
|
+
if (typeof obj_createdOn !== 'string') {
|
|
1721
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdOn + '" (at "' + path_createdOn + '")');
|
|
1722
|
+
}
|
|
1723
|
+
const obj_developerName = obj.developerName;
|
|
1724
|
+
const path_developerName = path + '.developerName';
|
|
1725
|
+
if (typeof obj_developerName !== 'string') {
|
|
1726
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1727
|
+
}
|
|
1728
|
+
const obj_grantAccessHierarchies = obj.grantAccessHierarchies;
|
|
1729
|
+
const path_grantAccessHierarchies = path + '.grantAccessHierarchies';
|
|
1730
|
+
if (typeof obj_grantAccessHierarchies !== 'boolean') {
|
|
1731
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_grantAccessHierarchies + '" (at "' + path_grantAccessHierarchies + '")');
|
|
1732
|
+
}
|
|
1733
|
+
const obj_label = obj.label;
|
|
1734
|
+
const path_label = path + '.label';
|
|
1735
|
+
if (typeof obj_label !== 'string') {
|
|
1736
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1737
|
+
}
|
|
1738
|
+
})();
|
|
1739
|
+
return v_error === undefined ? null : v_error;
|
|
1740
|
+
}
|
|
1741
|
+
const select$d = function IncludedGroupsSharingRepresentationSelect() {
|
|
1742
|
+
return {
|
|
1743
|
+
kind: 'Fragment',
|
|
1744
|
+
version: VERSION$a,
|
|
1745
|
+
private: [],
|
|
1746
|
+
selections: [
|
|
1747
|
+
{
|
|
1748
|
+
name: 'createdBy',
|
|
1749
|
+
kind: 'Scalar'
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
name: 'createdOn',
|
|
1753
|
+
kind: 'Scalar'
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
name: 'developerName',
|
|
1757
|
+
kind: 'Scalar'
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
name: 'grantAccessHierarchies',
|
|
1761
|
+
kind: 'Scalar'
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
name: 'label',
|
|
1765
|
+
kind: 'Scalar'
|
|
1766
|
+
}
|
|
1767
|
+
]
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
function equals$a(existing, incoming) {
|
|
1771
|
+
const existing_grantAccessHierarchies = existing.grantAccessHierarchies;
|
|
1772
|
+
const incoming_grantAccessHierarchies = incoming.grantAccessHierarchies;
|
|
1773
|
+
if (!(existing_grantAccessHierarchies === incoming_grantAccessHierarchies)) {
|
|
1774
|
+
return false;
|
|
1775
|
+
}
|
|
1776
|
+
const existing_createdBy = existing.createdBy;
|
|
1777
|
+
const incoming_createdBy = incoming.createdBy;
|
|
1778
|
+
if (!(existing_createdBy === incoming_createdBy)) {
|
|
1779
|
+
return false;
|
|
1780
|
+
}
|
|
1781
|
+
const existing_createdOn = existing.createdOn;
|
|
1782
|
+
const incoming_createdOn = incoming.createdOn;
|
|
1783
|
+
if (!(existing_createdOn === incoming_createdOn)) {
|
|
1784
|
+
return false;
|
|
1785
|
+
}
|
|
1786
|
+
const existing_developerName = existing.developerName;
|
|
1787
|
+
const incoming_developerName = incoming.developerName;
|
|
1788
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
1789
|
+
return false;
|
|
1790
|
+
}
|
|
1791
|
+
const existing_label = existing.label;
|
|
1792
|
+
const incoming_label = incoming.label;
|
|
1793
|
+
if (!(existing_label === incoming_label)) {
|
|
1794
|
+
return false;
|
|
1795
|
+
}
|
|
1796
|
+
return true;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
const VERSION$9 = "b8227d5d544c32d4b6c8f7048a6529d9";
|
|
1800
|
+
function validate$9(obj, path = 'ListViewGroupSharingRepresentation') {
|
|
1801
|
+
const v_error = (() => {
|
|
1802
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1803
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1804
|
+
}
|
|
1805
|
+
const obj_developerName = obj.developerName;
|
|
1806
|
+
const path_developerName = path + '.developerName';
|
|
1807
|
+
if (typeof obj_developerName !== 'string') {
|
|
1808
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1809
|
+
}
|
|
1810
|
+
const obj_label = obj.label;
|
|
1811
|
+
const path_label = path + '.label';
|
|
1812
|
+
if (typeof obj_label !== 'string') {
|
|
1813
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1814
|
+
}
|
|
1815
|
+
const obj_objectAPIName = obj.objectAPIName;
|
|
1816
|
+
const path_objectAPIName = path + '.objectAPIName';
|
|
1817
|
+
if (typeof obj_objectAPIName !== 'string') {
|
|
1818
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectAPIName + '" (at "' + path_objectAPIName + '")');
|
|
1819
|
+
}
|
|
1820
|
+
const obj_objectName = obj.objectName;
|
|
1821
|
+
const path_objectName = path + '.objectName';
|
|
1822
|
+
if (typeof obj_objectName !== 'string') {
|
|
1823
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
1824
|
+
}
|
|
1825
|
+
})();
|
|
1826
|
+
return v_error === undefined ? null : v_error;
|
|
1827
|
+
}
|
|
1828
|
+
const select$c = function ListViewGroupSharingRepresentationSelect() {
|
|
1829
|
+
return {
|
|
1830
|
+
kind: 'Fragment',
|
|
1831
|
+
version: VERSION$9,
|
|
1832
|
+
private: [],
|
|
1833
|
+
selections: [
|
|
1834
|
+
{
|
|
1835
|
+
name: 'developerName',
|
|
1836
|
+
kind: 'Scalar'
|
|
1837
|
+
},
|
|
1838
|
+
{
|
|
1839
|
+
name: 'label',
|
|
1840
|
+
kind: 'Scalar'
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
name: 'objectAPIName',
|
|
1844
|
+
kind: 'Scalar'
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
name: 'objectName',
|
|
1848
|
+
kind: 'Scalar'
|
|
1849
|
+
}
|
|
1850
|
+
]
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
function equals$9(existing, incoming) {
|
|
1854
|
+
const existing_developerName = existing.developerName;
|
|
1855
|
+
const incoming_developerName = incoming.developerName;
|
|
1856
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
1857
|
+
return false;
|
|
1858
|
+
}
|
|
1859
|
+
const existing_label = existing.label;
|
|
1860
|
+
const incoming_label = incoming.label;
|
|
1861
|
+
if (!(existing_label === incoming_label)) {
|
|
1862
|
+
return false;
|
|
1863
|
+
}
|
|
1864
|
+
const existing_objectAPIName = existing.objectAPIName;
|
|
1865
|
+
const incoming_objectAPIName = incoming.objectAPIName;
|
|
1866
|
+
if (!(existing_objectAPIName === incoming_objectAPIName)) {
|
|
1867
|
+
return false;
|
|
1868
|
+
}
|
|
1869
|
+
const existing_objectName = existing.objectName;
|
|
1870
|
+
const incoming_objectName = incoming.objectName;
|
|
1871
|
+
if (!(existing_objectName === incoming_objectName)) {
|
|
1872
|
+
return false;
|
|
1873
|
+
}
|
|
1874
|
+
return true;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
const VERSION$8 = "07fe7eab011def0e046285b2d5c9d774";
|
|
1878
|
+
function validate$8(obj, path = 'QueuesSharingRepresentation') {
|
|
1879
|
+
const v_error = (() => {
|
|
1880
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1881
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1882
|
+
}
|
|
1883
|
+
const obj_developerName = obj.developerName;
|
|
1884
|
+
const path_developerName = path + '.developerName';
|
|
1885
|
+
if (typeof obj_developerName !== 'string') {
|
|
1886
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1887
|
+
}
|
|
1888
|
+
const obj_email = obj.email;
|
|
1889
|
+
const path_email = path + '.email';
|
|
1890
|
+
if (typeof obj_email !== 'string') {
|
|
1891
|
+
return new TypeError('Expected "string" but received "' + typeof obj_email + '" (at "' + path_email + '")');
|
|
1892
|
+
}
|
|
1893
|
+
const obj_label = obj.label;
|
|
1894
|
+
const path_label = path + '.label';
|
|
1895
|
+
if (typeof obj_label !== 'string') {
|
|
1896
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1897
|
+
}
|
|
1898
|
+
const obj_supportedObjects = obj.supportedObjects;
|
|
1899
|
+
const path_supportedObjects = path + '.supportedObjects';
|
|
1900
|
+
if (typeof obj_supportedObjects !== 'string') {
|
|
1901
|
+
return new TypeError('Expected "string" but received "' + typeof obj_supportedObjects + '" (at "' + path_supportedObjects + '")');
|
|
1902
|
+
}
|
|
1903
|
+
})();
|
|
1904
|
+
return v_error === undefined ? null : v_error;
|
|
1905
|
+
}
|
|
1906
|
+
const select$b = function QueuesSharingRepresentationSelect() {
|
|
1907
|
+
return {
|
|
1908
|
+
kind: 'Fragment',
|
|
1909
|
+
version: VERSION$8,
|
|
1910
|
+
private: [],
|
|
1911
|
+
selections: [
|
|
1912
|
+
{
|
|
1913
|
+
name: 'developerName',
|
|
1914
|
+
kind: 'Scalar'
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
name: 'email',
|
|
1918
|
+
kind: 'Scalar'
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
name: 'label',
|
|
1922
|
+
kind: 'Scalar'
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
name: 'supportedObjects',
|
|
1926
|
+
kind: 'Scalar'
|
|
1927
|
+
}
|
|
1928
|
+
]
|
|
1929
|
+
};
|
|
1930
|
+
};
|
|
1931
|
+
function equals$8(existing, incoming) {
|
|
1932
|
+
const existing_developerName = existing.developerName;
|
|
1933
|
+
const incoming_developerName = incoming.developerName;
|
|
1934
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
1935
|
+
return false;
|
|
1936
|
+
}
|
|
1937
|
+
const existing_email = existing.email;
|
|
1938
|
+
const incoming_email = incoming.email;
|
|
1939
|
+
if (!(existing_email === incoming_email)) {
|
|
1940
|
+
return false;
|
|
1941
|
+
}
|
|
1942
|
+
const existing_label = existing.label;
|
|
1943
|
+
const incoming_label = incoming.label;
|
|
1944
|
+
if (!(existing_label === incoming_label)) {
|
|
1945
|
+
return false;
|
|
1946
|
+
}
|
|
1947
|
+
const existing_supportedObjects = existing.supportedObjects;
|
|
1948
|
+
const incoming_supportedObjects = incoming.supportedObjects;
|
|
1949
|
+
if (!(existing_supportedObjects === incoming_supportedObjects)) {
|
|
1950
|
+
return false;
|
|
1951
|
+
}
|
|
1952
|
+
return true;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
const VERSION$7 = "a0ed38b40ad9886f3e05a1b65fd2e246";
|
|
1956
|
+
function validate$7(obj, path = 'ReportAndDashboardFolderGroupSharingRepresentation') {
|
|
1957
|
+
const v_error = (() => {
|
|
1958
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1959
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1960
|
+
}
|
|
1961
|
+
const obj_accessLevel = obj.accessLevel;
|
|
1962
|
+
const path_accessLevel = path + '.accessLevel';
|
|
1963
|
+
if (typeof obj_accessLevel !== 'string') {
|
|
1964
|
+
return new TypeError('Expected "string" but received "' + typeof obj_accessLevel + '" (at "' + path_accessLevel + '")');
|
|
1965
|
+
}
|
|
1966
|
+
const obj_createdBy = obj.createdBy;
|
|
1967
|
+
const path_createdBy = path + '.createdBy';
|
|
1968
|
+
if (typeof obj_createdBy !== 'string') {
|
|
1969
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
1970
|
+
}
|
|
1971
|
+
const obj_createdOn = obj.createdOn;
|
|
1972
|
+
const path_createdOn = path + '.createdOn';
|
|
1973
|
+
if (typeof obj_createdOn !== 'string') {
|
|
1974
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdOn + '" (at "' + path_createdOn + '")');
|
|
1975
|
+
}
|
|
1976
|
+
const obj_developerName = obj.developerName;
|
|
1977
|
+
const path_developerName = path + '.developerName';
|
|
1978
|
+
if (typeof obj_developerName !== 'string') {
|
|
1979
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1980
|
+
}
|
|
1981
|
+
const obj_label = obj.label;
|
|
1982
|
+
const path_label = path + '.label';
|
|
1983
|
+
if (typeof obj_label !== 'string') {
|
|
1984
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1985
|
+
}
|
|
1986
|
+
const obj_type = obj.type;
|
|
1987
|
+
const path_type = path + '.type';
|
|
1988
|
+
if (typeof obj_type !== 'string') {
|
|
1989
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1990
|
+
}
|
|
1991
|
+
})();
|
|
1992
|
+
return v_error === undefined ? null : v_error;
|
|
1993
|
+
}
|
|
1994
|
+
const select$a = function ReportAndDashboardFolderGroupSharingRepresentationSelect() {
|
|
1995
|
+
return {
|
|
1996
|
+
kind: 'Fragment',
|
|
1997
|
+
version: VERSION$7,
|
|
1998
|
+
private: [],
|
|
1999
|
+
selections: [
|
|
2000
|
+
{
|
|
2001
|
+
name: 'accessLevel',
|
|
2002
|
+
kind: 'Scalar'
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
name: 'createdBy',
|
|
2006
|
+
kind: 'Scalar'
|
|
2007
|
+
},
|
|
2008
|
+
{
|
|
2009
|
+
name: 'createdOn',
|
|
2010
|
+
kind: 'Scalar'
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
name: 'developerName',
|
|
2014
|
+
kind: 'Scalar'
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
name: 'label',
|
|
2018
|
+
kind: 'Scalar'
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
name: 'type',
|
|
2022
|
+
kind: 'Scalar'
|
|
2023
|
+
}
|
|
2024
|
+
]
|
|
2025
|
+
};
|
|
2026
|
+
};
|
|
2027
|
+
function equals$7(existing, incoming) {
|
|
2028
|
+
const existing_accessLevel = existing.accessLevel;
|
|
2029
|
+
const incoming_accessLevel = incoming.accessLevel;
|
|
2030
|
+
if (!(existing_accessLevel === incoming_accessLevel)) {
|
|
2031
|
+
return false;
|
|
2032
|
+
}
|
|
2033
|
+
const existing_createdBy = existing.createdBy;
|
|
2034
|
+
const incoming_createdBy = incoming.createdBy;
|
|
2035
|
+
if (!(existing_createdBy === incoming_createdBy)) {
|
|
2036
|
+
return false;
|
|
2037
|
+
}
|
|
2038
|
+
const existing_createdOn = existing.createdOn;
|
|
2039
|
+
const incoming_createdOn = incoming.createdOn;
|
|
2040
|
+
if (!(existing_createdOn === incoming_createdOn)) {
|
|
2041
|
+
return false;
|
|
2042
|
+
}
|
|
2043
|
+
const existing_developerName = existing.developerName;
|
|
2044
|
+
const incoming_developerName = incoming.developerName;
|
|
2045
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
2046
|
+
return false;
|
|
2047
|
+
}
|
|
2048
|
+
const existing_label = existing.label;
|
|
2049
|
+
const incoming_label = incoming.label;
|
|
2050
|
+
if (!(existing_label === incoming_label)) {
|
|
2051
|
+
return false;
|
|
2052
|
+
}
|
|
2053
|
+
const existing_type = existing.type;
|
|
2054
|
+
const incoming_type = incoming.type;
|
|
2055
|
+
if (!(existing_type === incoming_type)) {
|
|
2056
|
+
return false;
|
|
2057
|
+
}
|
|
2058
|
+
return true;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
const VERSION$6 = "c1fd46badd6b7d74d5d487367b066f42";
|
|
2062
|
+
function validate$6(obj, path = 'SharingRulesCriteriaGroupSharingRepresentation') {
|
|
2063
|
+
const v_error = (() => {
|
|
2064
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2065
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2066
|
+
}
|
|
2067
|
+
const obj_accessLevel = obj.accessLevel;
|
|
2068
|
+
const path_accessLevel = path + '.accessLevel';
|
|
2069
|
+
if (typeof obj_accessLevel !== 'string') {
|
|
2070
|
+
return new TypeError('Expected "string" but received "' + typeof obj_accessLevel + '" (at "' + path_accessLevel + '")');
|
|
2071
|
+
}
|
|
2072
|
+
const obj_criteria = obj.criteria;
|
|
2073
|
+
const path_criteria = path + '.criteria';
|
|
2074
|
+
if (typeof obj_criteria !== 'string') {
|
|
2075
|
+
return new TypeError('Expected "string" but received "' + typeof obj_criteria + '" (at "' + path_criteria + '")');
|
|
2076
|
+
}
|
|
2077
|
+
const obj_developerName = obj.developerName;
|
|
2078
|
+
const path_developerName = path + '.developerName';
|
|
2079
|
+
if (typeof obj_developerName !== 'string') {
|
|
2080
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
2081
|
+
}
|
|
2082
|
+
const obj_label = obj.label;
|
|
2083
|
+
const path_label = path + '.label';
|
|
2084
|
+
if (typeof obj_label !== 'string') {
|
|
2085
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2086
|
+
}
|
|
2087
|
+
const obj_objectAPIName = obj.objectAPIName;
|
|
2088
|
+
const path_objectAPIName = path + '.objectAPIName';
|
|
2089
|
+
if (typeof obj_objectAPIName !== 'string') {
|
|
2090
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectAPIName + '" (at "' + path_objectAPIName + '")');
|
|
2091
|
+
}
|
|
2092
|
+
const obj_objectName = obj.objectName;
|
|
2093
|
+
const path_objectName = path + '.objectName';
|
|
2094
|
+
if (typeof obj_objectName !== 'string') {
|
|
2095
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
2096
|
+
}
|
|
2097
|
+
})();
|
|
2098
|
+
return v_error === undefined ? null : v_error;
|
|
2099
|
+
}
|
|
2100
|
+
const select$9 = function SharingRulesCriteriaGroupSharingRepresentationSelect() {
|
|
2101
|
+
return {
|
|
2102
|
+
kind: 'Fragment',
|
|
2103
|
+
version: VERSION$6,
|
|
2104
|
+
private: [],
|
|
2105
|
+
selections: [
|
|
2106
|
+
{
|
|
2107
|
+
name: 'accessLevel',
|
|
2108
|
+
kind: 'Scalar'
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
name: 'criteria',
|
|
2112
|
+
kind: 'Scalar'
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
name: 'developerName',
|
|
2116
|
+
kind: 'Scalar'
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
name: 'label',
|
|
2120
|
+
kind: 'Scalar'
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
name: 'objectAPIName',
|
|
2124
|
+
kind: 'Scalar'
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
name: 'objectName',
|
|
2128
|
+
kind: 'Scalar'
|
|
2129
|
+
}
|
|
2130
|
+
]
|
|
2131
|
+
};
|
|
2132
|
+
};
|
|
2133
|
+
function equals$6(existing, incoming) {
|
|
2134
|
+
const existing_accessLevel = existing.accessLevel;
|
|
2135
|
+
const incoming_accessLevel = incoming.accessLevel;
|
|
2136
|
+
if (!(existing_accessLevel === incoming_accessLevel)) {
|
|
2137
|
+
return false;
|
|
2138
|
+
}
|
|
2139
|
+
const existing_criteria = existing.criteria;
|
|
2140
|
+
const incoming_criteria = incoming.criteria;
|
|
2141
|
+
if (!(existing_criteria === incoming_criteria)) {
|
|
2142
|
+
return false;
|
|
2143
|
+
}
|
|
2144
|
+
const existing_developerName = existing.developerName;
|
|
2145
|
+
const incoming_developerName = incoming.developerName;
|
|
2146
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
2147
|
+
return false;
|
|
2148
|
+
}
|
|
2149
|
+
const existing_label = existing.label;
|
|
2150
|
+
const incoming_label = incoming.label;
|
|
2151
|
+
if (!(existing_label === incoming_label)) {
|
|
2152
|
+
return false;
|
|
2153
|
+
}
|
|
2154
|
+
const existing_objectAPIName = existing.objectAPIName;
|
|
2155
|
+
const incoming_objectAPIName = incoming.objectAPIName;
|
|
2156
|
+
if (!(existing_objectAPIName === incoming_objectAPIName)) {
|
|
2157
|
+
return false;
|
|
2158
|
+
}
|
|
2159
|
+
const existing_objectName = existing.objectName;
|
|
2160
|
+
const incoming_objectName = incoming.objectName;
|
|
2161
|
+
if (!(existing_objectName === incoming_objectName)) {
|
|
2162
|
+
return false;
|
|
2163
|
+
}
|
|
2164
|
+
return true;
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
const VERSION$5 = "f880257a24b8878ee52c03288b208b67";
|
|
2168
|
+
function validate$5(obj, path = 'SharingRulesOwnerGroupSharingRepresentation') {
|
|
2169
|
+
const v_error = (() => {
|
|
2170
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2171
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2172
|
+
}
|
|
2173
|
+
const obj_accessLevel = obj.accessLevel;
|
|
2174
|
+
const path_accessLevel = path + '.accessLevel';
|
|
2175
|
+
if (typeof obj_accessLevel !== 'string') {
|
|
2176
|
+
return new TypeError('Expected "string" but received "' + typeof obj_accessLevel + '" (at "' + path_accessLevel + '")');
|
|
2177
|
+
}
|
|
2178
|
+
const obj_developerName = obj.developerName;
|
|
2179
|
+
const path_developerName = path + '.developerName';
|
|
2180
|
+
if (typeof obj_developerName !== 'string') {
|
|
2181
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
2182
|
+
}
|
|
2183
|
+
const obj_label = obj.label;
|
|
2184
|
+
const path_label = path + '.label';
|
|
2185
|
+
if (typeof obj_label !== 'string') {
|
|
2186
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2187
|
+
}
|
|
2188
|
+
const obj_objectAPIName = obj.objectAPIName;
|
|
2189
|
+
const path_objectAPIName = path + '.objectAPIName';
|
|
2190
|
+
if (typeof obj_objectAPIName !== 'string') {
|
|
2191
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectAPIName + '" (at "' + path_objectAPIName + '")');
|
|
2192
|
+
}
|
|
2193
|
+
const obj_objectName = obj.objectName;
|
|
2194
|
+
const path_objectName = path + '.objectName';
|
|
2195
|
+
if (typeof obj_objectName !== 'string') {
|
|
2196
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
2197
|
+
}
|
|
2198
|
+
const obj_sharedFrom = obj.sharedFrom;
|
|
2199
|
+
const path_sharedFrom = path + '.sharedFrom';
|
|
2200
|
+
if (typeof obj_sharedFrom !== 'string') {
|
|
2201
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sharedFrom + '" (at "' + path_sharedFrom + '")');
|
|
2202
|
+
}
|
|
2203
|
+
})();
|
|
2204
|
+
return v_error === undefined ? null : v_error;
|
|
2205
|
+
}
|
|
2206
|
+
const select$8 = function SharingRulesOwnerGroupSharingRepresentationSelect() {
|
|
2207
|
+
return {
|
|
2208
|
+
kind: 'Fragment',
|
|
2209
|
+
version: VERSION$5,
|
|
2210
|
+
private: [],
|
|
2211
|
+
selections: [
|
|
2212
|
+
{
|
|
2213
|
+
name: 'accessLevel',
|
|
2214
|
+
kind: 'Scalar'
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
name: 'developerName',
|
|
2218
|
+
kind: 'Scalar'
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
name: 'label',
|
|
2222
|
+
kind: 'Scalar'
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
name: 'objectAPIName',
|
|
2226
|
+
kind: 'Scalar'
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
name: 'objectName',
|
|
2230
|
+
kind: 'Scalar'
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
name: 'sharedFrom',
|
|
2234
|
+
kind: 'Scalar'
|
|
2235
|
+
}
|
|
2236
|
+
]
|
|
2237
|
+
};
|
|
2238
|
+
};
|
|
2239
|
+
function equals$5(existing, incoming) {
|
|
2240
|
+
const existing_accessLevel = existing.accessLevel;
|
|
2241
|
+
const incoming_accessLevel = incoming.accessLevel;
|
|
2242
|
+
if (!(existing_accessLevel === incoming_accessLevel)) {
|
|
2243
|
+
return false;
|
|
2244
|
+
}
|
|
2245
|
+
const existing_developerName = existing.developerName;
|
|
2246
|
+
const incoming_developerName = incoming.developerName;
|
|
2247
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
2248
|
+
return false;
|
|
2249
|
+
}
|
|
2250
|
+
const existing_label = existing.label;
|
|
2251
|
+
const incoming_label = incoming.label;
|
|
2252
|
+
if (!(existing_label === incoming_label)) {
|
|
2253
|
+
return false;
|
|
2254
|
+
}
|
|
2255
|
+
const existing_objectAPIName = existing.objectAPIName;
|
|
2256
|
+
const incoming_objectAPIName = incoming.objectAPIName;
|
|
2257
|
+
if (!(existing_objectAPIName === incoming_objectAPIName)) {
|
|
2258
|
+
return false;
|
|
2259
|
+
}
|
|
2260
|
+
const existing_objectName = existing.objectName;
|
|
2261
|
+
const incoming_objectName = incoming.objectName;
|
|
2262
|
+
if (!(existing_objectName === incoming_objectName)) {
|
|
2263
|
+
return false;
|
|
2264
|
+
}
|
|
2265
|
+
const existing_sharedFrom = existing.sharedFrom;
|
|
2266
|
+
const incoming_sharedFrom = incoming.sharedFrom;
|
|
2267
|
+
if (!(existing_sharedFrom === incoming_sharedFrom)) {
|
|
2268
|
+
return false;
|
|
2269
|
+
}
|
|
2270
|
+
return true;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
const TTL$2 = 300;
|
|
2274
|
+
const VERSION$4 = "15c900aaeff3e74e7f57fc5b1e879cea";
|
|
2275
|
+
function validate$4(obj, path = 'PublicGroupSummaryRepresentation') {
|
|
2276
|
+
const v_error = (() => {
|
|
2277
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2278
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2279
|
+
}
|
|
2280
|
+
const obj_includedGroupsSharing = obj.includedGroupsSharing;
|
|
2281
|
+
const path_includedGroupsSharing = path + '.includedGroupsSharing';
|
|
2282
|
+
if (!ArrayIsArray(obj_includedGroupsSharing)) {
|
|
2283
|
+
return new TypeError('Expected "array" but received "' + typeof obj_includedGroupsSharing + '" (at "' + path_includedGroupsSharing + '")');
|
|
2284
|
+
}
|
|
2285
|
+
for (let i = 0; i < obj_includedGroupsSharing.length; i++) {
|
|
2286
|
+
const obj_includedGroupsSharing_item = obj_includedGroupsSharing[i];
|
|
2287
|
+
const path_includedGroupsSharing_item = path_includedGroupsSharing + '[' + i + ']';
|
|
2288
|
+
const referencepath_includedGroupsSharing_itemValidationError = validate$a(obj_includedGroupsSharing_item, path_includedGroupsSharing_item);
|
|
2289
|
+
if (referencepath_includedGroupsSharing_itemValidationError !== null) {
|
|
2290
|
+
let message = 'Object doesn\'t match IncludedGroupsSharingRepresentation (at "' + path_includedGroupsSharing_item + '")\n';
|
|
2291
|
+
message += referencepath_includedGroupsSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2292
|
+
return new TypeError(message);
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
const obj_listViewGroupSharing = obj.listViewGroupSharing;
|
|
2296
|
+
const path_listViewGroupSharing = path + '.listViewGroupSharing';
|
|
2297
|
+
if (!ArrayIsArray(obj_listViewGroupSharing)) {
|
|
2298
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listViewGroupSharing + '" (at "' + path_listViewGroupSharing + '")');
|
|
2299
|
+
}
|
|
2300
|
+
for (let i = 0; i < obj_listViewGroupSharing.length; i++) {
|
|
2301
|
+
const obj_listViewGroupSharing_item = obj_listViewGroupSharing[i];
|
|
2302
|
+
const path_listViewGroupSharing_item = path_listViewGroupSharing + '[' + i + ']';
|
|
2303
|
+
const referencepath_listViewGroupSharing_itemValidationError = validate$9(obj_listViewGroupSharing_item, path_listViewGroupSharing_item);
|
|
2304
|
+
if (referencepath_listViewGroupSharing_itemValidationError !== null) {
|
|
2305
|
+
let message = 'Object doesn\'t match ListViewGroupSharingRepresentation (at "' + path_listViewGroupSharing_item + '")\n';
|
|
2306
|
+
message += referencepath_listViewGroupSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2307
|
+
return new TypeError(message);
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
const obj_queuesSharing = obj.queuesSharing;
|
|
2311
|
+
const path_queuesSharing = path + '.queuesSharing';
|
|
2312
|
+
if (!ArrayIsArray(obj_queuesSharing)) {
|
|
2313
|
+
return new TypeError('Expected "array" but received "' + typeof obj_queuesSharing + '" (at "' + path_queuesSharing + '")');
|
|
2314
|
+
}
|
|
2315
|
+
for (let i = 0; i < obj_queuesSharing.length; i++) {
|
|
2316
|
+
const obj_queuesSharing_item = obj_queuesSharing[i];
|
|
2317
|
+
const path_queuesSharing_item = path_queuesSharing + '[' + i + ']';
|
|
2318
|
+
const referencepath_queuesSharing_itemValidationError = validate$8(obj_queuesSharing_item, path_queuesSharing_item);
|
|
2319
|
+
if (referencepath_queuesSharing_itemValidationError !== null) {
|
|
2320
|
+
let message = 'Object doesn\'t match QueuesSharingRepresentation (at "' + path_queuesSharing_item + '")\n';
|
|
2321
|
+
message += referencepath_queuesSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2322
|
+
return new TypeError(message);
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
const obj_reportAndDashboardFolderGroupSharing = obj.reportAndDashboardFolderGroupSharing;
|
|
2326
|
+
const path_reportAndDashboardFolderGroupSharing = path + '.reportAndDashboardFolderGroupSharing';
|
|
2327
|
+
if (!ArrayIsArray(obj_reportAndDashboardFolderGroupSharing)) {
|
|
2328
|
+
return new TypeError('Expected "array" but received "' + typeof obj_reportAndDashboardFolderGroupSharing + '" (at "' + path_reportAndDashboardFolderGroupSharing + '")');
|
|
2329
|
+
}
|
|
2330
|
+
for (let i = 0; i < obj_reportAndDashboardFolderGroupSharing.length; i++) {
|
|
2331
|
+
const obj_reportAndDashboardFolderGroupSharing_item = obj_reportAndDashboardFolderGroupSharing[i];
|
|
2332
|
+
const path_reportAndDashboardFolderGroupSharing_item = path_reportAndDashboardFolderGroupSharing + '[' + i + ']';
|
|
2333
|
+
const referencepath_reportAndDashboardFolderGroupSharing_itemValidationError = validate$7(obj_reportAndDashboardFolderGroupSharing_item, path_reportAndDashboardFolderGroupSharing_item);
|
|
2334
|
+
if (referencepath_reportAndDashboardFolderGroupSharing_itemValidationError !== null) {
|
|
2335
|
+
let message = 'Object doesn\'t match ReportAndDashboardFolderGroupSharingRepresentation (at "' + path_reportAndDashboardFolderGroupSharing_item + '")\n';
|
|
2336
|
+
message += referencepath_reportAndDashboardFolderGroupSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2337
|
+
return new TypeError(message);
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
const obj_sharingRulesCriteriaGroupSharing = obj.sharingRulesCriteriaGroupSharing;
|
|
2341
|
+
const path_sharingRulesCriteriaGroupSharing = path + '.sharingRulesCriteriaGroupSharing';
|
|
2342
|
+
if (!ArrayIsArray(obj_sharingRulesCriteriaGroupSharing)) {
|
|
2343
|
+
return new TypeError('Expected "array" but received "' + typeof obj_sharingRulesCriteriaGroupSharing + '" (at "' + path_sharingRulesCriteriaGroupSharing + '")');
|
|
2344
|
+
}
|
|
2345
|
+
for (let i = 0; i < obj_sharingRulesCriteriaGroupSharing.length; i++) {
|
|
2346
|
+
const obj_sharingRulesCriteriaGroupSharing_item = obj_sharingRulesCriteriaGroupSharing[i];
|
|
2347
|
+
const path_sharingRulesCriteriaGroupSharing_item = path_sharingRulesCriteriaGroupSharing + '[' + i + ']';
|
|
2348
|
+
const referencepath_sharingRulesCriteriaGroupSharing_itemValidationError = validate$6(obj_sharingRulesCriteriaGroupSharing_item, path_sharingRulesCriteriaGroupSharing_item);
|
|
2349
|
+
if (referencepath_sharingRulesCriteriaGroupSharing_itemValidationError !== null) {
|
|
2350
|
+
let message = 'Object doesn\'t match SharingRulesCriteriaGroupSharingRepresentation (at "' + path_sharingRulesCriteriaGroupSharing_item + '")\n';
|
|
2351
|
+
message += referencepath_sharingRulesCriteriaGroupSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2352
|
+
return new TypeError(message);
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
const obj_sharingRulesOwnerGroupSharing = obj.sharingRulesOwnerGroupSharing;
|
|
2356
|
+
const path_sharingRulesOwnerGroupSharing = path + '.sharingRulesOwnerGroupSharing';
|
|
2357
|
+
if (!ArrayIsArray(obj_sharingRulesOwnerGroupSharing)) {
|
|
2358
|
+
return new TypeError('Expected "array" but received "' + typeof obj_sharingRulesOwnerGroupSharing + '" (at "' + path_sharingRulesOwnerGroupSharing + '")');
|
|
2359
|
+
}
|
|
2360
|
+
for (let i = 0; i < obj_sharingRulesOwnerGroupSharing.length; i++) {
|
|
2361
|
+
const obj_sharingRulesOwnerGroupSharing_item = obj_sharingRulesOwnerGroupSharing[i];
|
|
2362
|
+
const path_sharingRulesOwnerGroupSharing_item = path_sharingRulesOwnerGroupSharing + '[' + i + ']';
|
|
2363
|
+
const referencepath_sharingRulesOwnerGroupSharing_itemValidationError = validate$5(obj_sharingRulesOwnerGroupSharing_item, path_sharingRulesOwnerGroupSharing_item);
|
|
2364
|
+
if (referencepath_sharingRulesOwnerGroupSharing_itemValidationError !== null) {
|
|
2365
|
+
let message = 'Object doesn\'t match SharingRulesOwnerGroupSharingRepresentation (at "' + path_sharingRulesOwnerGroupSharing_item + '")\n';
|
|
2366
|
+
message += referencepath_sharingRulesOwnerGroupSharing_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2367
|
+
return new TypeError(message);
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
})();
|
|
2371
|
+
return v_error === undefined ? null : v_error;
|
|
2372
|
+
}
|
|
2373
|
+
const RepresentationType$2 = 'PublicGroupSummaryRepresentation';
|
|
2374
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
2375
|
+
return input;
|
|
2376
|
+
}
|
|
2377
|
+
const select$7 = function PublicGroupSummaryRepresentationSelect() {
|
|
2378
|
+
const { selections: IncludedGroupsSharingRepresentation__selections, opaque: IncludedGroupsSharingRepresentation__opaque, } = select$d();
|
|
2379
|
+
const { selections: ListViewGroupSharingRepresentation__selections, opaque: ListViewGroupSharingRepresentation__opaque, } = select$c();
|
|
2380
|
+
const { selections: QueuesSharingRepresentation__selections, opaque: QueuesSharingRepresentation__opaque, } = select$b();
|
|
2381
|
+
const { selections: ReportAndDashboardFolderGroupSharingRepresentation__selections, opaque: ReportAndDashboardFolderGroupSharingRepresentation__opaque, } = select$a();
|
|
2382
|
+
const { selections: SharingRulesCriteriaGroupSharingRepresentation__selections, opaque: SharingRulesCriteriaGroupSharingRepresentation__opaque, } = select$9();
|
|
2383
|
+
const { selections: SharingRulesOwnerGroupSharingRepresentation__selections, opaque: SharingRulesOwnerGroupSharingRepresentation__opaque, } = select$8();
|
|
2384
|
+
return {
|
|
2385
|
+
kind: 'Fragment',
|
|
2386
|
+
version: VERSION$4,
|
|
2387
|
+
private: [],
|
|
2388
|
+
selections: [
|
|
2389
|
+
{
|
|
2390
|
+
name: 'includedGroupsSharing',
|
|
2391
|
+
kind: 'Object',
|
|
2392
|
+
plural: true,
|
|
2393
|
+
selections: IncludedGroupsSharingRepresentation__selections
|
|
2394
|
+
},
|
|
2395
|
+
{
|
|
2396
|
+
name: 'listViewGroupSharing',
|
|
2397
|
+
kind: 'Object',
|
|
2398
|
+
plural: true,
|
|
2399
|
+
selections: ListViewGroupSharingRepresentation__selections
|
|
2400
|
+
},
|
|
2401
|
+
{
|
|
2402
|
+
name: 'queuesSharing',
|
|
2403
|
+
kind: 'Object',
|
|
2404
|
+
plural: true,
|
|
2405
|
+
selections: QueuesSharingRepresentation__selections
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
name: 'reportAndDashboardFolderGroupSharing',
|
|
2409
|
+
kind: 'Object',
|
|
2410
|
+
plural: true,
|
|
2411
|
+
selections: ReportAndDashboardFolderGroupSharingRepresentation__selections
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
name: 'sharingRulesCriteriaGroupSharing',
|
|
2415
|
+
kind: 'Object',
|
|
2416
|
+
plural: true,
|
|
2417
|
+
selections: SharingRulesCriteriaGroupSharingRepresentation__selections
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
name: 'sharingRulesOwnerGroupSharing',
|
|
2421
|
+
kind: 'Object',
|
|
2422
|
+
plural: true,
|
|
2423
|
+
selections: SharingRulesOwnerGroupSharingRepresentation__selections
|
|
2424
|
+
}
|
|
2425
|
+
]
|
|
2426
|
+
};
|
|
2427
|
+
};
|
|
2428
|
+
function equals$4(existing, incoming) {
|
|
2429
|
+
const existing_includedGroupsSharing = existing.includedGroupsSharing;
|
|
2430
|
+
const incoming_includedGroupsSharing = incoming.includedGroupsSharing;
|
|
2431
|
+
const equals_includedGroupsSharing_items = equalsArray(existing_includedGroupsSharing, incoming_includedGroupsSharing, (existing_includedGroupsSharing_item, incoming_includedGroupsSharing_item) => {
|
|
2432
|
+
if (!(equals$a(existing_includedGroupsSharing_item, incoming_includedGroupsSharing_item))) {
|
|
2433
|
+
return false;
|
|
2434
|
+
}
|
|
2435
|
+
});
|
|
2436
|
+
if (equals_includedGroupsSharing_items === false) {
|
|
2437
|
+
return false;
|
|
2438
|
+
}
|
|
2439
|
+
const existing_listViewGroupSharing = existing.listViewGroupSharing;
|
|
2440
|
+
const incoming_listViewGroupSharing = incoming.listViewGroupSharing;
|
|
2441
|
+
const equals_listViewGroupSharing_items = equalsArray(existing_listViewGroupSharing, incoming_listViewGroupSharing, (existing_listViewGroupSharing_item, incoming_listViewGroupSharing_item) => {
|
|
2442
|
+
if (!(equals$9(existing_listViewGroupSharing_item, incoming_listViewGroupSharing_item))) {
|
|
2443
|
+
return false;
|
|
2444
|
+
}
|
|
2445
|
+
});
|
|
2446
|
+
if (equals_listViewGroupSharing_items === false) {
|
|
2447
|
+
return false;
|
|
2448
|
+
}
|
|
2449
|
+
const existing_queuesSharing = existing.queuesSharing;
|
|
2450
|
+
const incoming_queuesSharing = incoming.queuesSharing;
|
|
2451
|
+
const equals_queuesSharing_items = equalsArray(existing_queuesSharing, incoming_queuesSharing, (existing_queuesSharing_item, incoming_queuesSharing_item) => {
|
|
2452
|
+
if (!(equals$8(existing_queuesSharing_item, incoming_queuesSharing_item))) {
|
|
2453
|
+
return false;
|
|
2454
|
+
}
|
|
2455
|
+
});
|
|
2456
|
+
if (equals_queuesSharing_items === false) {
|
|
2457
|
+
return false;
|
|
2458
|
+
}
|
|
2459
|
+
const existing_reportAndDashboardFolderGroupSharing = existing.reportAndDashboardFolderGroupSharing;
|
|
2460
|
+
const incoming_reportAndDashboardFolderGroupSharing = incoming.reportAndDashboardFolderGroupSharing;
|
|
2461
|
+
const equals_reportAndDashboardFolderGroupSharing_items = equalsArray(existing_reportAndDashboardFolderGroupSharing, incoming_reportAndDashboardFolderGroupSharing, (existing_reportAndDashboardFolderGroupSharing_item, incoming_reportAndDashboardFolderGroupSharing_item) => {
|
|
2462
|
+
if (!(equals$7(existing_reportAndDashboardFolderGroupSharing_item, incoming_reportAndDashboardFolderGroupSharing_item))) {
|
|
2463
|
+
return false;
|
|
2464
|
+
}
|
|
2465
|
+
});
|
|
2466
|
+
if (equals_reportAndDashboardFolderGroupSharing_items === false) {
|
|
2467
|
+
return false;
|
|
2468
|
+
}
|
|
2469
|
+
const existing_sharingRulesCriteriaGroupSharing = existing.sharingRulesCriteriaGroupSharing;
|
|
2470
|
+
const incoming_sharingRulesCriteriaGroupSharing = incoming.sharingRulesCriteriaGroupSharing;
|
|
2471
|
+
const equals_sharingRulesCriteriaGroupSharing_items = equalsArray(existing_sharingRulesCriteriaGroupSharing, incoming_sharingRulesCriteriaGroupSharing, (existing_sharingRulesCriteriaGroupSharing_item, incoming_sharingRulesCriteriaGroupSharing_item) => {
|
|
2472
|
+
if (!(equals$6(existing_sharingRulesCriteriaGroupSharing_item, incoming_sharingRulesCriteriaGroupSharing_item))) {
|
|
2473
|
+
return false;
|
|
2474
|
+
}
|
|
2475
|
+
});
|
|
2476
|
+
if (equals_sharingRulesCriteriaGroupSharing_items === false) {
|
|
2477
|
+
return false;
|
|
2478
|
+
}
|
|
2479
|
+
const existing_sharingRulesOwnerGroupSharing = existing.sharingRulesOwnerGroupSharing;
|
|
2480
|
+
const incoming_sharingRulesOwnerGroupSharing = incoming.sharingRulesOwnerGroupSharing;
|
|
2481
|
+
const equals_sharingRulesOwnerGroupSharing_items = equalsArray(existing_sharingRulesOwnerGroupSharing, incoming_sharingRulesOwnerGroupSharing, (existing_sharingRulesOwnerGroupSharing_item, incoming_sharingRulesOwnerGroupSharing_item) => {
|
|
2482
|
+
if (!(equals$5(existing_sharingRulesOwnerGroupSharing_item, incoming_sharingRulesOwnerGroupSharing_item))) {
|
|
2483
|
+
return false;
|
|
2484
|
+
}
|
|
2485
|
+
});
|
|
2486
|
+
if (equals_sharingRulesOwnerGroupSharing_items === false) {
|
|
2487
|
+
return false;
|
|
2488
|
+
}
|
|
2489
|
+
return true;
|
|
2490
|
+
}
|
|
2491
|
+
const ingest$2 = function PublicGroupSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2492
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2493
|
+
const validateError = validate$4(input);
|
|
2494
|
+
if (validateError !== null) {
|
|
2495
|
+
throw validateError;
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
const key = path.fullPath;
|
|
2499
|
+
const ttlToUse = TTL$2;
|
|
2500
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "sharing", VERSION$4, RepresentationType$2, equals$4);
|
|
2501
|
+
return createLink(key);
|
|
2502
|
+
};
|
|
2503
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
2504
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2505
|
+
const rootKey = fullPathFactory();
|
|
2506
|
+
rootKeySet.set(rootKey, {
|
|
2507
|
+
namespace: keyPrefix,
|
|
2508
|
+
representationName: RepresentationType$2,
|
|
2509
|
+
mergeable: false
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
function select$6(luvio, params) {
|
|
2514
|
+
return select$7();
|
|
2515
|
+
}
|
|
2516
|
+
function keyBuilder$5(luvio, params) {
|
|
2517
|
+
return keyPrefix + '::PublicGroupSummaryRepresentation:(' + 'entityKeyPrefix:' + params.body.entityKeyPrefix + '::' + 'groupId:' + params.body.groupId + '::' + 'limit:' + params.body.limit + '::' + 'offset:' + params.body.offset + '::' + 'operation:' + params.body.operation + '::' + 'orderBy:' + params.body.orderBy + '::' + 'orderType:' + params.body.orderType + ')';
|
|
2518
|
+
}
|
|
2519
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
2520
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
2521
|
+
}
|
|
2522
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
2523
|
+
const { body } = response;
|
|
2524
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
2525
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
2526
|
+
const snapshot = luvio.storeLookup({
|
|
2527
|
+
recordId: key,
|
|
2528
|
+
node: select$6(),
|
|
2529
|
+
variables: {},
|
|
2530
|
+
}, snapshotRefresh);
|
|
2531
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2532
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2533
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
deepFreeze(snapshot.data);
|
|
2537
|
+
return snapshot;
|
|
2538
|
+
}
|
|
2539
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
2540
|
+
const key = keyBuilder$5(luvio, params);
|
|
2541
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2542
|
+
const storeMetadataParams = {
|
|
2543
|
+
ttl: TTL$2,
|
|
2544
|
+
namespace: keyPrefix,
|
|
2545
|
+
version: VERSION$4,
|
|
2546
|
+
representationName: RepresentationType$2
|
|
2547
|
+
};
|
|
2548
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2549
|
+
return errorSnapshot;
|
|
2550
|
+
}
|
|
2551
|
+
function createResourceRequest$2(config) {
|
|
2552
|
+
const headers = {};
|
|
2553
|
+
return {
|
|
2554
|
+
baseUri: '/services/data/v66.0',
|
|
2555
|
+
basePath: '/sharing/publicGroupsSummary',
|
|
2556
|
+
method: 'post',
|
|
2557
|
+
body: config.body,
|
|
2558
|
+
urlParams: {},
|
|
2559
|
+
queryParams: {},
|
|
2560
|
+
headers,
|
|
2561
|
+
priority: 'normal',
|
|
2562
|
+
};
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
const adapterName$2 = 'getPublicGroupShareData';
|
|
2566
|
+
const getPublicGroupShareData_ConfigPropertyMetadata = [
|
|
2567
|
+
generateParamConfigMetadata('entityKeyPrefix', true, 2 /* Body */, 0 /* String */),
|
|
2568
|
+
generateParamConfigMetadata('groupId', true, 2 /* Body */, 0 /* String */),
|
|
2569
|
+
generateParamConfigMetadata('limit', true, 2 /* Body */, 3 /* Integer */),
|
|
2570
|
+
generateParamConfigMetadata('offset', true, 2 /* Body */, 3 /* Integer */),
|
|
2571
|
+
generateParamConfigMetadata('operation', true, 2 /* Body */, 0 /* String */),
|
|
2572
|
+
generateParamConfigMetadata('orderBy', true, 2 /* Body */, 0 /* String */),
|
|
2573
|
+
generateParamConfigMetadata('orderType', true, 2 /* Body */, 0 /* String */),
|
|
2574
|
+
];
|
|
2575
|
+
const getPublicGroupShareData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getPublicGroupShareData_ConfigPropertyMetadata);
|
|
2576
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getPublicGroupShareData_ConfigPropertyMetadata);
|
|
2577
|
+
function keyBuilder$4(luvio, config) {
|
|
2578
|
+
const resourceParams = createResourceParams$2(config);
|
|
2579
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
2580
|
+
}
|
|
2581
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
2582
|
+
const config = {};
|
|
2583
|
+
typeCheckConfig$6(untrustedConfig, config, getPublicGroupShareData_ConfigPropertyMetadata);
|
|
2584
|
+
return config;
|
|
2585
|
+
}
|
|
2586
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
2587
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2588
|
+
return null;
|
|
2589
|
+
}
|
|
2590
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2591
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2592
|
+
}
|
|
2593
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
2594
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2595
|
+
return null;
|
|
2596
|
+
}
|
|
2597
|
+
return config;
|
|
2598
|
+
}
|
|
2599
|
+
function adapterFragment$2(luvio, config) {
|
|
2600
|
+
createResourceParams$2(config);
|
|
2601
|
+
return select$6();
|
|
2602
|
+
}
|
|
2603
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
2604
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
2605
|
+
config,
|
|
2606
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
2607
|
+
});
|
|
2608
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2609
|
+
}
|
|
2610
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
2611
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
2612
|
+
config,
|
|
2613
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
2614
|
+
});
|
|
2615
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2616
|
+
}
|
|
2617
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
2618
|
+
const resourceParams = createResourceParams$2(config);
|
|
2619
|
+
const request = createResourceRequest$2(resourceParams);
|
|
2620
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2621
|
+
.then((response) => {
|
|
2622
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
2623
|
+
const cache = new StoreKeyMap();
|
|
2624
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
2625
|
+
return cache;
|
|
2626
|
+
});
|
|
2627
|
+
}, (response) => {
|
|
2628
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
2629
|
+
});
|
|
2630
|
+
}
|
|
2631
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
2632
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, 'get', false);
|
|
2633
|
+
}
|
|
2634
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
2635
|
+
const { luvio, config } = context;
|
|
2636
|
+
const selector = {
|
|
2637
|
+
recordId: keyBuilder$4(luvio, config),
|
|
2638
|
+
node: adapterFragment$2(luvio, config),
|
|
2639
|
+
variables: {},
|
|
2640
|
+
};
|
|
2641
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2642
|
+
config,
|
|
2643
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
2644
|
+
});
|
|
2645
|
+
return cacheSnapshot;
|
|
2646
|
+
}
|
|
2647
|
+
const getPublicGroupShareDataAdapterFactory = (luvio) => function sharing__getPublicGroupShareData(untrustedConfig, requestContext) {
|
|
2648
|
+
const config = validateAdapterConfig$2(untrustedConfig, getPublicGroupShareData_ConfigPropertyNames);
|
|
2649
|
+
// Invalid or incomplete config
|
|
2650
|
+
if (config === null) {
|
|
2651
|
+
return null;
|
|
2652
|
+
}
|
|
2653
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2654
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
2655
|
+
};
|
|
2656
|
+
|
|
2657
|
+
const VERSION$3 = "8f1b312aa04c8869624b95b9e3f3cd4e";
|
|
2658
|
+
function validate$3(obj, path = 'SobjectOutputSharingRepresentation') {
|
|
2659
|
+
const v_error = (() => {
|
|
2660
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2661
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2662
|
+
}
|
|
2663
|
+
const obj_apiName = obj.apiName;
|
|
2664
|
+
const path_apiName = path + '.apiName';
|
|
2665
|
+
if (typeof obj_apiName !== 'string') {
|
|
2666
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
2667
|
+
}
|
|
2668
|
+
const obj_keyPrefix = obj.keyPrefix;
|
|
2669
|
+
const path_keyPrefix = path + '.keyPrefix';
|
|
2670
|
+
if (typeof obj_keyPrefix !== 'string') {
|
|
2671
|
+
return new TypeError('Expected "string" but received "' + typeof obj_keyPrefix + '" (at "' + path_keyPrefix + '")');
|
|
2672
|
+
}
|
|
2673
|
+
const obj_label = obj.label;
|
|
2674
|
+
const path_label = path + '.label';
|
|
2675
|
+
if (typeof obj_label !== 'string') {
|
|
2676
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
2677
|
+
}
|
|
2678
|
+
const obj_labelPlural = obj.labelPlural;
|
|
2679
|
+
const path_labelPlural = path + '.labelPlural';
|
|
2680
|
+
if (typeof obj_labelPlural !== 'string') {
|
|
2681
|
+
return new TypeError('Expected "string" but received "' + typeof obj_labelPlural + '" (at "' + path_labelPlural + '")');
|
|
2682
|
+
}
|
|
2683
|
+
})();
|
|
2684
|
+
return v_error === undefined ? null : v_error;
|
|
2685
|
+
}
|
|
2686
|
+
const select$5 = function SobjectOutputSharingRepresentationSelect() {
|
|
2687
|
+
return {
|
|
2688
|
+
kind: 'Fragment',
|
|
2689
|
+
version: VERSION$3,
|
|
2690
|
+
private: [],
|
|
2691
|
+
selections: [
|
|
2692
|
+
{
|
|
2693
|
+
name: 'apiName',
|
|
2694
|
+
kind: 'Scalar'
|
|
2695
|
+
},
|
|
2696
|
+
{
|
|
2697
|
+
name: 'keyPrefix',
|
|
2698
|
+
kind: 'Scalar'
|
|
2699
|
+
},
|
|
2700
|
+
{
|
|
2701
|
+
name: 'label',
|
|
2702
|
+
kind: 'Scalar'
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
name: 'labelPlural',
|
|
2706
|
+
kind: 'Scalar'
|
|
2707
|
+
}
|
|
2708
|
+
]
|
|
2709
|
+
};
|
|
2710
|
+
};
|
|
2711
|
+
function equals$3(existing, incoming) {
|
|
2712
|
+
const existing_apiName = existing.apiName;
|
|
2713
|
+
const incoming_apiName = incoming.apiName;
|
|
2714
|
+
if (!(existing_apiName === incoming_apiName)) {
|
|
2715
|
+
return false;
|
|
2716
|
+
}
|
|
2717
|
+
const existing_keyPrefix = existing.keyPrefix;
|
|
2718
|
+
const incoming_keyPrefix = incoming.keyPrefix;
|
|
2719
|
+
if (!(existing_keyPrefix === incoming_keyPrefix)) {
|
|
2720
|
+
return false;
|
|
2721
|
+
}
|
|
2722
|
+
const existing_label = existing.label;
|
|
2723
|
+
const incoming_label = incoming.label;
|
|
2724
|
+
if (!(existing_label === incoming_label)) {
|
|
2725
|
+
return false;
|
|
2726
|
+
}
|
|
2727
|
+
const existing_labelPlural = existing.labelPlural;
|
|
2728
|
+
const incoming_labelPlural = incoming.labelPlural;
|
|
2729
|
+
if (!(existing_labelPlural === incoming_labelPlural)) {
|
|
2730
|
+
return false;
|
|
2731
|
+
}
|
|
2732
|
+
return true;
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
const TTL$1 = 900000;
|
|
2736
|
+
const VERSION$2 = "891459dfe3e992adddad156c898d3aef";
|
|
2737
|
+
function validate$2(obj, path = 'SobjectsOutputSharingRepresentation') {
|
|
2738
|
+
const v_error = (() => {
|
|
2739
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2740
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2741
|
+
}
|
|
2742
|
+
const obj_size = obj.size;
|
|
2743
|
+
const path_size = path + '.size';
|
|
2744
|
+
if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
|
|
2745
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
|
|
2746
|
+
}
|
|
2747
|
+
const obj_sobjects = obj.sobjects;
|
|
2748
|
+
const path_sobjects = path + '.sobjects';
|
|
2749
|
+
if (!ArrayIsArray(obj_sobjects)) {
|
|
2750
|
+
return new TypeError('Expected "array" but received "' + typeof obj_sobjects + '" (at "' + path_sobjects + '")');
|
|
2751
|
+
}
|
|
2752
|
+
for (let i = 0; i < obj_sobjects.length; i++) {
|
|
2753
|
+
const obj_sobjects_item = obj_sobjects[i];
|
|
2754
|
+
const path_sobjects_item = path_sobjects + '[' + i + ']';
|
|
2755
|
+
const referencepath_sobjects_itemValidationError = validate$3(obj_sobjects_item, path_sobjects_item);
|
|
2756
|
+
if (referencepath_sobjects_itemValidationError !== null) {
|
|
2757
|
+
let message = 'Object doesn\'t match SobjectOutputSharingRepresentation (at "' + path_sobjects_item + '")\n';
|
|
2758
|
+
message += referencepath_sobjects_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2759
|
+
return new TypeError(message);
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
})();
|
|
2763
|
+
return v_error === undefined ? null : v_error;
|
|
2764
|
+
}
|
|
2765
|
+
const RepresentationType$1 = 'SobjectsOutputSharingRepresentation';
|
|
2766
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2767
|
+
return input;
|
|
2768
|
+
}
|
|
2769
|
+
const select$4 = function SobjectsOutputSharingRepresentationSelect() {
|
|
2770
|
+
const { selections: SobjectOutputSharingRepresentation__selections, opaque: SobjectOutputSharingRepresentation__opaque, } = select$5();
|
|
2771
|
+
return {
|
|
2772
|
+
kind: 'Fragment',
|
|
2773
|
+
version: VERSION$2,
|
|
2774
|
+
private: [],
|
|
2775
|
+
selections: [
|
|
2776
|
+
{
|
|
2777
|
+
name: 'size',
|
|
2778
|
+
kind: 'Scalar'
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
name: 'sobjects',
|
|
2782
|
+
kind: 'Object',
|
|
2783
|
+
plural: true,
|
|
2784
|
+
selections: SobjectOutputSharingRepresentation__selections
|
|
2785
|
+
}
|
|
2786
|
+
]
|
|
2787
|
+
};
|
|
2788
|
+
};
|
|
2789
|
+
function equals$2(existing, incoming) {
|
|
2790
|
+
const existing_size = existing.size;
|
|
2791
|
+
const incoming_size = incoming.size;
|
|
2792
|
+
if (!(existing_size === incoming_size)) {
|
|
2793
|
+
return false;
|
|
2794
|
+
}
|
|
2795
|
+
const existing_sobjects = existing.sobjects;
|
|
2796
|
+
const incoming_sobjects = incoming.sobjects;
|
|
2797
|
+
const equals_sobjects_items = equalsArray(existing_sobjects, incoming_sobjects, (existing_sobjects_item, incoming_sobjects_item) => {
|
|
2798
|
+
if (!(equals$3(existing_sobjects_item, incoming_sobjects_item))) {
|
|
2799
|
+
return false;
|
|
2800
|
+
}
|
|
2801
|
+
});
|
|
2802
|
+
if (equals_sobjects_items === false) {
|
|
2803
|
+
return false;
|
|
2804
|
+
}
|
|
2805
|
+
return true;
|
|
2806
|
+
}
|
|
2807
|
+
const ingest$1 = function SobjectsOutputSharingRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2808
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2809
|
+
const validateError = validate$2(input);
|
|
2810
|
+
if (validateError !== null) {
|
|
2811
|
+
throw validateError;
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
const key = path.fullPath;
|
|
2815
|
+
const ttlToUse = TTL$1;
|
|
2816
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "sharing", VERSION$2, RepresentationType$1, equals$2);
|
|
2817
|
+
return createLink(key);
|
|
2818
|
+
};
|
|
2819
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
2820
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2821
|
+
const rootKey = fullPathFactory();
|
|
2822
|
+
rootKeySet.set(rootKey, {
|
|
2823
|
+
namespace: keyPrefix,
|
|
2824
|
+
representationName: RepresentationType$1,
|
|
2825
|
+
mergeable: false
|
|
2826
|
+
});
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
function select$3(luvio, params) {
|
|
2830
|
+
return select$4();
|
|
2831
|
+
}
|
|
2832
|
+
function keyBuilder$3(luvio, params) {
|
|
2833
|
+
return keyPrefix + '::SobjectsOutputSharingRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'searchText:' + params.queryParams.searchText + ')';
|
|
2834
|
+
}
|
|
2835
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
2836
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
2837
|
+
}
|
|
2838
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
2839
|
+
const { body } = response;
|
|
2840
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
2841
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
2842
|
+
const snapshot = luvio.storeLookup({
|
|
2843
|
+
recordId: key,
|
|
2844
|
+
node: select$3(),
|
|
2845
|
+
variables: {},
|
|
2846
|
+
}, snapshotRefresh);
|
|
2847
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2848
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2849
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
deepFreeze(snapshot.data);
|
|
2853
|
+
return snapshot;
|
|
2854
|
+
}
|
|
2855
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
2856
|
+
const key = keyBuilder$3(luvio, params);
|
|
2857
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2858
|
+
const storeMetadataParams = {
|
|
2859
|
+
ttl: TTL$1,
|
|
2860
|
+
namespace: keyPrefix,
|
|
2861
|
+
version: VERSION$2,
|
|
2862
|
+
representationName: RepresentationType$1
|
|
2863
|
+
};
|
|
2864
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2865
|
+
return errorSnapshot;
|
|
2866
|
+
}
|
|
2867
|
+
function createResourceRequest$1(config) {
|
|
2868
|
+
const headers = {};
|
|
2869
|
+
return {
|
|
2870
|
+
baseUri: '/services/data/v66.0',
|
|
2871
|
+
basePath: '/sharing/sobjects',
|
|
2872
|
+
method: 'get',
|
|
2873
|
+
body: null,
|
|
2874
|
+
urlParams: {},
|
|
2875
|
+
queryParams: config.queryParams,
|
|
2876
|
+
headers,
|
|
2877
|
+
priority: 'normal',
|
|
2878
|
+
};
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2881
|
+
const adapterName$1 = 'getAllSobjects';
|
|
2882
|
+
const getAllSobjects_ConfigPropertyMetadata = [
|
|
2883
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2884
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2885
|
+
generateParamConfigMetadata('searchText', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2886
|
+
];
|
|
2887
|
+
const getAllSobjects_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getAllSobjects_ConfigPropertyMetadata);
|
|
2888
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getAllSobjects_ConfigPropertyMetadata);
|
|
2889
|
+
function keyBuilder$2(luvio, config) {
|
|
2890
|
+
const resourceParams = createResourceParams$1(config);
|
|
2891
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
2892
|
+
}
|
|
2893
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
2894
|
+
const config = {};
|
|
2895
|
+
typeCheckConfig$6(untrustedConfig, config, getAllSobjects_ConfigPropertyMetadata);
|
|
2896
|
+
return config;
|
|
2897
|
+
}
|
|
2898
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
2899
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2900
|
+
return null;
|
|
2901
|
+
}
|
|
2902
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2903
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2904
|
+
}
|
|
2905
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
2906
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2907
|
+
return null;
|
|
2908
|
+
}
|
|
2909
|
+
return config;
|
|
2910
|
+
}
|
|
2911
|
+
function adapterFragment$1(luvio, config) {
|
|
2912
|
+
createResourceParams$1(config);
|
|
2913
|
+
return select$3();
|
|
2914
|
+
}
|
|
2915
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
2916
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
2917
|
+
config,
|
|
2918
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2919
|
+
});
|
|
2920
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2921
|
+
}
|
|
2922
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
2923
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
2924
|
+
config,
|
|
2925
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2926
|
+
});
|
|
2927
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2928
|
+
}
|
|
2929
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
2930
|
+
const resourceParams = createResourceParams$1(config);
|
|
2931
|
+
const request = createResourceRequest$1(resourceParams);
|
|
2932
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2933
|
+
.then((response) => {
|
|
2934
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
2935
|
+
const cache = new StoreKeyMap();
|
|
2936
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
2937
|
+
return cache;
|
|
2938
|
+
});
|
|
2939
|
+
}, (response) => {
|
|
2940
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
2941
|
+
});
|
|
2942
|
+
}
|
|
2943
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
2944
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
2945
|
+
}
|
|
2946
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
2947
|
+
const { luvio, config } = context;
|
|
2948
|
+
const selector = {
|
|
2949
|
+
recordId: keyBuilder$2(luvio, config),
|
|
2950
|
+
node: adapterFragment$1(luvio, config),
|
|
2951
|
+
variables: {},
|
|
2952
|
+
};
|
|
2953
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2954
|
+
config,
|
|
2955
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2956
|
+
});
|
|
2957
|
+
return cacheSnapshot;
|
|
2958
|
+
}
|
|
2959
|
+
const getAllSobjectsAdapterFactory = (luvio) => function sharing__getAllSobjects(untrustedConfig, requestContext) {
|
|
2960
|
+
const config = validateAdapterConfig$1(untrustedConfig, getAllSobjects_ConfigPropertyNames);
|
|
2961
|
+
// Invalid or incomplete config
|
|
2962
|
+
if (config === null) {
|
|
2963
|
+
return null;
|
|
2964
|
+
}
|
|
2965
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2966
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
2967
|
+
};
|
|
2968
|
+
|
|
2969
|
+
const VERSION$1 = "8f69c6b84d8d2d88af30e45bfe796380";
|
|
2970
|
+
function validate$1(obj, path = 'UserPermissionInfoRepresentation') {
|
|
2971
|
+
const v_error = (() => {
|
|
2972
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2973
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2974
|
+
}
|
|
2975
|
+
const obj_parentApiName = obj.parentApiName;
|
|
2976
|
+
const path_parentApiName = path + '.parentApiName';
|
|
2977
|
+
if (typeof obj_parentApiName !== 'string') {
|
|
2978
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentApiName + '" (at "' + path_parentApiName + '")');
|
|
2979
|
+
}
|
|
2980
|
+
const obj_parentDescription = obj.parentDescription;
|
|
2981
|
+
const path_parentDescription = path + '.parentDescription';
|
|
2982
|
+
if (typeof obj_parentDescription !== 'string') {
|
|
2983
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentDescription + '" (at "' + path_parentDescription + '")');
|
|
2984
|
+
}
|
|
2985
|
+
const obj_parentHasActivationRequired = obj.parentHasActivationRequired;
|
|
2986
|
+
const path_parentHasActivationRequired = path + '.parentHasActivationRequired';
|
|
2987
|
+
if (typeof obj_parentHasActivationRequired !== 'boolean') {
|
|
2988
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_parentHasActivationRequired + '" (at "' + path_parentHasActivationRequired + '")');
|
|
2989
|
+
}
|
|
2990
|
+
const obj_parentId = obj.parentId;
|
|
2991
|
+
const path_parentId = path + '.parentId';
|
|
2992
|
+
if (typeof obj_parentId !== 'string') {
|
|
2993
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentId + '" (at "' + path_parentId + '")');
|
|
2994
|
+
}
|
|
2995
|
+
const obj_parentIsCustom = obj.parentIsCustom;
|
|
2996
|
+
const path_parentIsCustom = path + '.parentIsCustom';
|
|
2997
|
+
if (typeof obj_parentIsCustom !== 'boolean') {
|
|
2998
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_parentIsCustom + '" (at "' + path_parentIsCustom + '")');
|
|
2999
|
+
}
|
|
3000
|
+
const obj_parentLabel = obj.parentLabel;
|
|
3001
|
+
const path_parentLabel = path + '.parentLabel';
|
|
3002
|
+
if (typeof obj_parentLabel !== 'string') {
|
|
3003
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentLabel + '" (at "' + path_parentLabel + '")');
|
|
3004
|
+
}
|
|
3005
|
+
const obj_parentProfileLicense = obj.parentProfileLicense;
|
|
3006
|
+
const path_parentProfileLicense = path + '.parentProfileLicense';
|
|
3007
|
+
if (typeof obj_parentProfileLicense !== 'string') {
|
|
3008
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentProfileLicense + '" (at "' + path_parentProfileLicense + '")');
|
|
3009
|
+
}
|
|
3010
|
+
const obj_userPermApiName = obj.userPermApiName;
|
|
3011
|
+
const path_userPermApiName = path + '.userPermApiName';
|
|
3012
|
+
if (typeof obj_userPermApiName !== 'string') {
|
|
3013
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userPermApiName + '" (at "' + path_userPermApiName + '")');
|
|
3014
|
+
}
|
|
3015
|
+
const obj_userPermDescription = obj.userPermDescription;
|
|
3016
|
+
const path_userPermDescription = path + '.userPermDescription';
|
|
3017
|
+
if (typeof obj_userPermDescription !== 'string') {
|
|
3018
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userPermDescription + '" (at "' + path_userPermDescription + '")');
|
|
3019
|
+
}
|
|
3020
|
+
const obj_userPermLabel = obj.userPermLabel;
|
|
3021
|
+
const path_userPermLabel = path + '.userPermLabel';
|
|
3022
|
+
if (typeof obj_userPermLabel !== 'string') {
|
|
3023
|
+
return new TypeError('Expected "string" but received "' + typeof obj_userPermLabel + '" (at "' + path_userPermLabel + '")');
|
|
3024
|
+
}
|
|
3025
|
+
})();
|
|
3026
|
+
return v_error === undefined ? null : v_error;
|
|
3027
|
+
}
|
|
3028
|
+
const select$2 = function UserPermissionInfoRepresentationSelect() {
|
|
3029
|
+
return {
|
|
3030
|
+
kind: 'Fragment',
|
|
3031
|
+
version: VERSION$1,
|
|
3032
|
+
private: [],
|
|
3033
|
+
selections: [
|
|
3034
|
+
{
|
|
3035
|
+
name: 'parentApiName',
|
|
3036
|
+
kind: 'Scalar'
|
|
3037
|
+
},
|
|
3038
|
+
{
|
|
3039
|
+
name: 'parentDescription',
|
|
3040
|
+
kind: 'Scalar'
|
|
3041
|
+
},
|
|
3042
|
+
{
|
|
3043
|
+
name: 'parentHasActivationRequired',
|
|
3044
|
+
kind: 'Scalar'
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
name: 'parentId',
|
|
3048
|
+
kind: 'Scalar'
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
name: 'parentIsCustom',
|
|
3052
|
+
kind: 'Scalar'
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
name: 'parentLabel',
|
|
3056
|
+
kind: 'Scalar'
|
|
3057
|
+
},
|
|
3058
|
+
{
|
|
3059
|
+
name: 'parentProfileLicense',
|
|
3060
|
+
kind: 'Scalar'
|
|
3061
|
+
},
|
|
3062
|
+
{
|
|
3063
|
+
name: 'userPermApiName',
|
|
3064
|
+
kind: 'Scalar'
|
|
3065
|
+
},
|
|
3066
|
+
{
|
|
3067
|
+
name: 'userPermDescription',
|
|
3068
|
+
kind: 'Scalar'
|
|
3069
|
+
},
|
|
3070
|
+
{
|
|
3071
|
+
name: 'userPermLabel',
|
|
3072
|
+
kind: 'Scalar'
|
|
3073
|
+
}
|
|
3074
|
+
]
|
|
3075
|
+
};
|
|
3076
|
+
};
|
|
3077
|
+
function equals$1(existing, incoming) {
|
|
3078
|
+
const existing_parentHasActivationRequired = existing.parentHasActivationRequired;
|
|
3079
|
+
const incoming_parentHasActivationRequired = incoming.parentHasActivationRequired;
|
|
3080
|
+
if (!(existing_parentHasActivationRequired === incoming_parentHasActivationRequired)) {
|
|
3081
|
+
return false;
|
|
3082
|
+
}
|
|
3083
|
+
const existing_parentIsCustom = existing.parentIsCustom;
|
|
3084
|
+
const incoming_parentIsCustom = incoming.parentIsCustom;
|
|
3085
|
+
if (!(existing_parentIsCustom === incoming_parentIsCustom)) {
|
|
3086
|
+
return false;
|
|
3087
|
+
}
|
|
3088
|
+
const existing_parentApiName = existing.parentApiName;
|
|
3089
|
+
const incoming_parentApiName = incoming.parentApiName;
|
|
3090
|
+
if (!(existing_parentApiName === incoming_parentApiName)) {
|
|
3091
|
+
return false;
|
|
3092
|
+
}
|
|
3093
|
+
const existing_parentDescription = existing.parentDescription;
|
|
3094
|
+
const incoming_parentDescription = incoming.parentDescription;
|
|
3095
|
+
if (!(existing_parentDescription === incoming_parentDescription)) {
|
|
3096
|
+
return false;
|
|
3097
|
+
}
|
|
3098
|
+
const existing_parentId = existing.parentId;
|
|
3099
|
+
const incoming_parentId = incoming.parentId;
|
|
3100
|
+
if (!(existing_parentId === incoming_parentId)) {
|
|
3101
|
+
return false;
|
|
3102
|
+
}
|
|
3103
|
+
const existing_parentLabel = existing.parentLabel;
|
|
3104
|
+
const incoming_parentLabel = incoming.parentLabel;
|
|
3105
|
+
if (!(existing_parentLabel === incoming_parentLabel)) {
|
|
3106
|
+
return false;
|
|
3107
|
+
}
|
|
3108
|
+
const existing_parentProfileLicense = existing.parentProfileLicense;
|
|
3109
|
+
const incoming_parentProfileLicense = incoming.parentProfileLicense;
|
|
3110
|
+
if (!(existing_parentProfileLicense === incoming_parentProfileLicense)) {
|
|
3111
|
+
return false;
|
|
3112
|
+
}
|
|
3113
|
+
const existing_userPermApiName = existing.userPermApiName;
|
|
3114
|
+
const incoming_userPermApiName = incoming.userPermApiName;
|
|
3115
|
+
if (!(existing_userPermApiName === incoming_userPermApiName)) {
|
|
3116
|
+
return false;
|
|
3117
|
+
}
|
|
3118
|
+
const existing_userPermDescription = existing.userPermDescription;
|
|
3119
|
+
const incoming_userPermDescription = incoming.userPermDescription;
|
|
3120
|
+
if (!(existing_userPermDescription === incoming_userPermDescription)) {
|
|
3121
|
+
return false;
|
|
3122
|
+
}
|
|
3123
|
+
const existing_userPermLabel = existing.userPermLabel;
|
|
3124
|
+
const incoming_userPermLabel = incoming.userPermLabel;
|
|
3125
|
+
if (!(existing_userPermLabel === incoming_userPermLabel)) {
|
|
3126
|
+
return false;
|
|
3127
|
+
}
|
|
3128
|
+
return true;
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
const TTL = 300;
|
|
3132
|
+
const VERSION = "627ab68dfb8c0174c1e9dc9f2701c1b2";
|
|
3133
|
+
function validate(obj, path = 'UserPermissionsInfoListRepresentation') {
|
|
3134
|
+
const v_error = (() => {
|
|
3135
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3136
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3137
|
+
}
|
|
3138
|
+
const obj_size = obj.size;
|
|
3139
|
+
const path_size = path + '.size';
|
|
3140
|
+
if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
|
|
3141
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
|
|
3142
|
+
}
|
|
3143
|
+
const obj_userPermissions = obj.userPermissions;
|
|
3144
|
+
const path_userPermissions = path + '.userPermissions';
|
|
3145
|
+
if (!ArrayIsArray(obj_userPermissions)) {
|
|
3146
|
+
return new TypeError('Expected "array" but received "' + typeof obj_userPermissions + '" (at "' + path_userPermissions + '")');
|
|
3147
|
+
}
|
|
3148
|
+
for (let i = 0; i < obj_userPermissions.length; i++) {
|
|
3149
|
+
const obj_userPermissions_item = obj_userPermissions[i];
|
|
3150
|
+
const path_userPermissions_item = path_userPermissions + '[' + i + ']';
|
|
3151
|
+
const referencepath_userPermissions_itemValidationError = validate$1(obj_userPermissions_item, path_userPermissions_item);
|
|
3152
|
+
if (referencepath_userPermissions_itemValidationError !== null) {
|
|
3153
|
+
let message = 'Object doesn\'t match UserPermissionInfoRepresentation (at "' + path_userPermissions_item + '")\n';
|
|
3154
|
+
message += referencepath_userPermissions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3155
|
+
return new TypeError(message);
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
})();
|
|
3159
|
+
return v_error === undefined ? null : v_error;
|
|
3160
|
+
}
|
|
3161
|
+
const RepresentationType = 'UserPermissionsInfoListRepresentation';
|
|
3162
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
3163
|
+
return input;
|
|
3164
|
+
}
|
|
3165
|
+
const select$1 = function UserPermissionsInfoListRepresentationSelect() {
|
|
3166
|
+
const { selections: UserPermissionInfoRepresentation__selections, opaque: UserPermissionInfoRepresentation__opaque, } = select$2();
|
|
3167
|
+
return {
|
|
3168
|
+
kind: 'Fragment',
|
|
3169
|
+
version: VERSION,
|
|
3170
|
+
private: [],
|
|
3171
|
+
selections: [
|
|
3172
|
+
{
|
|
3173
|
+
name: 'size',
|
|
3174
|
+
kind: 'Scalar'
|
|
3175
|
+
},
|
|
3176
|
+
{
|
|
3177
|
+
name: 'userPermissions',
|
|
3178
|
+
kind: 'Object',
|
|
3179
|
+
plural: true,
|
|
3180
|
+
selections: UserPermissionInfoRepresentation__selections
|
|
3181
|
+
}
|
|
3182
|
+
]
|
|
3183
|
+
};
|
|
3184
|
+
};
|
|
3185
|
+
function equals(existing, incoming) {
|
|
3186
|
+
const existing_size = existing.size;
|
|
3187
|
+
const incoming_size = incoming.size;
|
|
3188
|
+
if (!(existing_size === incoming_size)) {
|
|
3189
|
+
return false;
|
|
3190
|
+
}
|
|
3191
|
+
const existing_userPermissions = existing.userPermissions;
|
|
3192
|
+
const incoming_userPermissions = incoming.userPermissions;
|
|
3193
|
+
const equals_userPermissions_items = equalsArray(existing_userPermissions, incoming_userPermissions, (existing_userPermissions_item, incoming_userPermissions_item) => {
|
|
3194
|
+
if (!(equals$1(existing_userPermissions_item, incoming_userPermissions_item))) {
|
|
3195
|
+
return false;
|
|
3196
|
+
}
|
|
3197
|
+
});
|
|
3198
|
+
if (equals_userPermissions_items === false) {
|
|
3199
|
+
return false;
|
|
3200
|
+
}
|
|
3201
|
+
return true;
|
|
3202
|
+
}
|
|
3203
|
+
const ingest = function UserPermissionsInfoListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3204
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3205
|
+
const validateError = validate(input);
|
|
3206
|
+
if (validateError !== null) {
|
|
3207
|
+
throw validateError;
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
const key = path.fullPath;
|
|
3211
|
+
const ttlToUse = TTL;
|
|
3212
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "sharing", VERSION, RepresentationType, equals);
|
|
3213
|
+
return createLink(key);
|
|
3214
|
+
};
|
|
3215
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
3216
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3217
|
+
const rootKey = fullPathFactory();
|
|
3218
|
+
rootKeySet.set(rootKey, {
|
|
3219
|
+
namespace: keyPrefix,
|
|
3220
|
+
representationName: RepresentationType,
|
|
3221
|
+
mergeable: false
|
|
3222
|
+
});
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
function select(luvio, params) {
|
|
3226
|
+
return select$1();
|
|
3227
|
+
}
|
|
3228
|
+
function keyBuilder$1(luvio, params) {
|
|
3229
|
+
return keyPrefix + '::UserPermissionsInfoListRepresentation:(' + 'recordId:' + params.queryParams.recordId + ')';
|
|
3230
|
+
}
|
|
3231
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
3232
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
3233
|
+
}
|
|
3234
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
3235
|
+
const { body } = response;
|
|
3236
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
3237
|
+
luvio.storeIngest(key, ingest, body);
|
|
3238
|
+
const snapshot = luvio.storeLookup({
|
|
3239
|
+
recordId: key,
|
|
3240
|
+
node: select(),
|
|
3241
|
+
variables: {},
|
|
3242
|
+
}, snapshotRefresh);
|
|
3243
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3244
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3245
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
deepFreeze(snapshot.data);
|
|
3249
|
+
return snapshot;
|
|
3250
|
+
}
|
|
3251
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
3252
|
+
const key = keyBuilder$1(luvio, params);
|
|
3253
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3254
|
+
const storeMetadataParams = {
|
|
3255
|
+
ttl: TTL,
|
|
3256
|
+
namespace: keyPrefix,
|
|
3257
|
+
version: VERSION,
|
|
3258
|
+
representationName: RepresentationType
|
|
3259
|
+
};
|
|
3260
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3261
|
+
return errorSnapshot;
|
|
3262
|
+
}
|
|
3263
|
+
function createResourceRequest(config) {
|
|
3264
|
+
const headers = {};
|
|
3265
|
+
return {
|
|
3266
|
+
baseUri: '/services/data/v66.0',
|
|
3267
|
+
basePath: '/sharing/userPermissions',
|
|
3268
|
+
method: 'get',
|
|
3269
|
+
body: null,
|
|
3270
|
+
urlParams: {},
|
|
3271
|
+
queryParams: config.queryParams,
|
|
3272
|
+
headers,
|
|
3273
|
+
priority: 'normal',
|
|
3274
|
+
};
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3277
|
+
const adapterName = 'getUserPermissions';
|
|
3278
|
+
const getUserPermissions_ConfigPropertyMetadata = [
|
|
3279
|
+
generateParamConfigMetadata('recordId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
3280
|
+
];
|
|
3281
|
+
const getUserPermissions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getUserPermissions_ConfigPropertyMetadata);
|
|
3282
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$6(getUserPermissions_ConfigPropertyMetadata);
|
|
3283
|
+
function keyBuilder(luvio, config) {
|
|
3284
|
+
const resourceParams = createResourceParams(config);
|
|
3285
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
3286
|
+
}
|
|
3287
|
+
function typeCheckConfig(untrustedConfig) {
|
|
3288
|
+
const config = {};
|
|
3289
|
+
typeCheckConfig$6(untrustedConfig, config, getUserPermissions_ConfigPropertyMetadata);
|
|
3290
|
+
return config;
|
|
3291
|
+
}
|
|
3292
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
3293
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3294
|
+
return null;
|
|
3295
|
+
}
|
|
3296
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3297
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3298
|
+
}
|
|
3299
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
3300
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3301
|
+
return null;
|
|
3302
|
+
}
|
|
3303
|
+
return config;
|
|
3304
|
+
}
|
|
3305
|
+
function adapterFragment(luvio, config) {
|
|
3306
|
+
createResourceParams(config);
|
|
3307
|
+
return select();
|
|
3308
|
+
}
|
|
3309
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
3310
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
3311
|
+
config,
|
|
3312
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3313
|
+
});
|
|
3314
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3315
|
+
}
|
|
3316
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
3317
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
3318
|
+
config,
|
|
3319
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3320
|
+
});
|
|
3321
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3322
|
+
}
|
|
3323
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
3324
|
+
const resourceParams = createResourceParams(config);
|
|
3325
|
+
const request = createResourceRequest(resourceParams);
|
|
3326
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3327
|
+
.then((response) => {
|
|
3328
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
3329
|
+
const cache = new StoreKeyMap();
|
|
3330
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
3331
|
+
return cache;
|
|
3332
|
+
});
|
|
3333
|
+
}, (response) => {
|
|
3334
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
3335
|
+
});
|
|
3336
|
+
}
|
|
3337
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3338
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
3339
|
+
}
|
|
3340
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3341
|
+
const { luvio, config } = context;
|
|
3342
|
+
const selector = {
|
|
3343
|
+
recordId: keyBuilder(luvio, config),
|
|
3344
|
+
node: adapterFragment(luvio, config),
|
|
3345
|
+
variables: {},
|
|
3346
|
+
};
|
|
3347
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3348
|
+
config,
|
|
3349
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3350
|
+
});
|
|
3351
|
+
return cacheSnapshot;
|
|
3352
|
+
}
|
|
3353
|
+
const getUserPermissionsAdapterFactory = (luvio) => function sharing__getUserPermissions(untrustedConfig, requestContext) {
|
|
3354
|
+
const config = validateAdapterConfig(untrustedConfig, getUserPermissions_ConfigPropertyNames);
|
|
3355
|
+
// Invalid or incomplete config
|
|
3356
|
+
if (config === null) {
|
|
3357
|
+
return null;
|
|
3358
|
+
}
|
|
3359
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3360
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
3361
|
+
};
|
|
3362
|
+
|
|
3363
|
+
export { addRemoveUserToGroupsAdapterFactory, getAllSobjectsAdapterFactory, getGroupsForUserAdapterFactory, getPublicGroupMembershipDetailsAdapterFactory, getPublicGroupShareDataAdapterFactory, getUserPermissionsAdapterFactory };
|