@salesforce/lds-adapters-platform-sharing 1.343.0 → 1.345.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/platform-sharing.js +374 -59
- package/dist/es/es2018/types/src/generated/adapters/addRemoveUserToGroups.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/getGroupsForUser.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/getSharingGroupsForUserByGroupTypeAndUserId.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/resources/postSharingAddRemoveUserToGroups.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/types/PublicGroupRepresentation.d.ts +10 -1
- 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/package.json +3 -3
- package/sfdc/index.js +347 -20
- package/src/raml/api.raml +71 -0
- package/src/raml/luvio.raml +13 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6, typeCheckConfig as typeCheckConfig$6, StoreKeyMap, createResourceParams as createResourceParams$6 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -101,6 +101,277 @@ function createLink(ref) {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
const TTL$5 = 300;
|
|
105
|
+
const VERSION$i = "9934cf4cb3fdd0b955c08c2d695a9a53";
|
|
106
|
+
function validate$i(obj, path = 'UserGroupMembershipDetailsRepresentation') {
|
|
107
|
+
const v_error = (() => {
|
|
108
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
109
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
110
|
+
}
|
|
111
|
+
const obj_errors = obj.errors;
|
|
112
|
+
const path_errors = path + '.errors';
|
|
113
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
114
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
115
|
+
}
|
|
116
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
117
|
+
const obj_errors_item = obj_errors[i];
|
|
118
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
119
|
+
if (typeof obj_errors_item !== 'string') {
|
|
120
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errors_item + '" (at "' + path_errors_item + '")');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const obj_infos = obj.infos;
|
|
124
|
+
const path_infos = path + '.infos';
|
|
125
|
+
if (!ArrayIsArray(obj_infos)) {
|
|
126
|
+
return new TypeError('Expected "array" but received "' + typeof obj_infos + '" (at "' + path_infos + '")');
|
|
127
|
+
}
|
|
128
|
+
for (let i = 0; i < obj_infos.length; i++) {
|
|
129
|
+
const obj_infos_item = obj_infos[i];
|
|
130
|
+
const path_infos_item = path_infos + '[' + i + ']';
|
|
131
|
+
if (typeof obj_infos_item !== 'string') {
|
|
132
|
+
return new TypeError('Expected "string" but received "' + typeof obj_infos_item + '" (at "' + path_infos_item + '")');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const obj_isSuccess = obj.isSuccess;
|
|
136
|
+
const path_isSuccess = path + '.isSuccess';
|
|
137
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
138
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
139
|
+
}
|
|
140
|
+
const obj_operation = obj.operation;
|
|
141
|
+
const path_operation = path + '.operation';
|
|
142
|
+
if (typeof obj_operation !== 'string') {
|
|
143
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operation + '" (at "' + path_operation + '")');
|
|
144
|
+
}
|
|
145
|
+
})();
|
|
146
|
+
return v_error === undefined ? null : v_error;
|
|
147
|
+
}
|
|
148
|
+
const RepresentationType$5 = 'UserGroupMembershipDetailsRepresentation';
|
|
149
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
150
|
+
return input;
|
|
151
|
+
}
|
|
152
|
+
const select$o = function UserGroupMembershipDetailsRepresentationSelect() {
|
|
153
|
+
return {
|
|
154
|
+
kind: 'Fragment',
|
|
155
|
+
version: VERSION$i,
|
|
156
|
+
private: [],
|
|
157
|
+
selections: [
|
|
158
|
+
{
|
|
159
|
+
name: 'errors',
|
|
160
|
+
kind: 'Scalar',
|
|
161
|
+
plural: true
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'infos',
|
|
165
|
+
kind: 'Scalar',
|
|
166
|
+
plural: true
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'isSuccess',
|
|
170
|
+
kind: 'Scalar'
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'operation',
|
|
174
|
+
kind: 'Scalar'
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
function equals$i(existing, incoming) {
|
|
180
|
+
const existing_isSuccess = existing.isSuccess;
|
|
181
|
+
const incoming_isSuccess = incoming.isSuccess;
|
|
182
|
+
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
const existing_operation = existing.operation;
|
|
186
|
+
const incoming_operation = incoming.operation;
|
|
187
|
+
if (!(existing_operation === incoming_operation)) {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
const existing_errors = existing.errors;
|
|
191
|
+
const incoming_errors = incoming.errors;
|
|
192
|
+
const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
|
|
193
|
+
if (!(existing_errors_item === incoming_errors_item)) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
if (equals_errors_items === false) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
const existing_infos = existing.infos;
|
|
201
|
+
const incoming_infos = incoming.infos;
|
|
202
|
+
const equals_infos_items = equalsArray(existing_infos, incoming_infos, (existing_infos_item, incoming_infos_item) => {
|
|
203
|
+
if (!(existing_infos_item === incoming_infos_item)) {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
if (equals_infos_items === false) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
const ingest$5 = function UserGroupMembershipDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
213
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
214
|
+
const validateError = validate$i(input);
|
|
215
|
+
if (validateError !== null) {
|
|
216
|
+
throw validateError;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
const key = path.fullPath;
|
|
220
|
+
const ttlToUse = TTL$5;
|
|
221
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "sharing", VERSION$i, RepresentationType$5, equals$i);
|
|
222
|
+
return createLink(key);
|
|
223
|
+
};
|
|
224
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
225
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
226
|
+
const rootKey = fullPathFactory();
|
|
227
|
+
rootKeySet.set(rootKey, {
|
|
228
|
+
namespace: keyPrefix,
|
|
229
|
+
representationName: RepresentationType$5,
|
|
230
|
+
mergeable: false
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function select$n(luvio, params) {
|
|
235
|
+
return select$o();
|
|
236
|
+
}
|
|
237
|
+
function keyBuilder$b(luvio, params) {
|
|
238
|
+
return keyPrefix + '::UserGroupMembershipDetailsRepresentation:(' + 'userId:' + params.body.userId + '::' + 'memberType:' + params.body.memberType + '::' + 'operation:' + params.body.operation + '::' + 'selectedGroups:' + params.body.selectedGroups + ')';
|
|
239
|
+
}
|
|
240
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
241
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
242
|
+
}
|
|
243
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
244
|
+
const { body } = response;
|
|
245
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
246
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
247
|
+
const snapshot = luvio.storeLookup({
|
|
248
|
+
recordId: key,
|
|
249
|
+
node: select$n(),
|
|
250
|
+
variables: {},
|
|
251
|
+
}, snapshotRefresh);
|
|
252
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
253
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
254
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
deepFreeze(snapshot.data);
|
|
258
|
+
return snapshot;
|
|
259
|
+
}
|
|
260
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
261
|
+
const key = keyBuilder$b(luvio, params);
|
|
262
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
263
|
+
const storeMetadataParams = {
|
|
264
|
+
ttl: TTL$5,
|
|
265
|
+
namespace: keyPrefix,
|
|
266
|
+
version: VERSION$i,
|
|
267
|
+
representationName: RepresentationType$5
|
|
268
|
+
};
|
|
269
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
270
|
+
return errorSnapshot;
|
|
271
|
+
}
|
|
272
|
+
function createResourceRequest$5(config) {
|
|
273
|
+
const headers = {};
|
|
274
|
+
return {
|
|
275
|
+
baseUri: '/services/data/v64.0',
|
|
276
|
+
basePath: '/sharing/addRemoveUserToGroups',
|
|
277
|
+
method: 'post',
|
|
278
|
+
body: config.body,
|
|
279
|
+
urlParams: {},
|
|
280
|
+
queryParams: {},
|
|
281
|
+
headers,
|
|
282
|
+
priority: 'normal',
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const adapterName$5 = 'addRemoveUserToGroups';
|
|
287
|
+
const addRemoveUserToGroups_ConfigPropertyMetadata = [
|
|
288
|
+
generateParamConfigMetadata('userId', true, 2 /* Body */, 0 /* String */),
|
|
289
|
+
generateParamConfigMetadata('memberType', true, 2 /* Body */, 0 /* String */),
|
|
290
|
+
generateParamConfigMetadata('operation', true, 2 /* Body */, 0 /* String */),
|
|
291
|
+
generateParamConfigMetadata('selectedGroups', true, 2 /* Body */, 0 /* String */, true),
|
|
292
|
+
];
|
|
293
|
+
const addRemoveUserToGroups_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, addRemoveUserToGroups_ConfigPropertyMetadata);
|
|
294
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(addRemoveUserToGroups_ConfigPropertyMetadata);
|
|
295
|
+
function keyBuilder$a(luvio, config) {
|
|
296
|
+
const resourceParams = createResourceParams$5(config);
|
|
297
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
298
|
+
}
|
|
299
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
300
|
+
const config = {};
|
|
301
|
+
typeCheckConfig$6(untrustedConfig, config, addRemoveUserToGroups_ConfigPropertyMetadata);
|
|
302
|
+
return config;
|
|
303
|
+
}
|
|
304
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
305
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
309
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
310
|
+
}
|
|
311
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
312
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
return config;
|
|
316
|
+
}
|
|
317
|
+
function adapterFragment$5(luvio, config) {
|
|
318
|
+
createResourceParams$5(config);
|
|
319
|
+
return select$n();
|
|
320
|
+
}
|
|
321
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
322
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
323
|
+
config,
|
|
324
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
325
|
+
});
|
|
326
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
327
|
+
}
|
|
328
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
329
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
330
|
+
config,
|
|
331
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
332
|
+
});
|
|
333
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
334
|
+
}
|
|
335
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
336
|
+
const resourceParams = createResourceParams$5(config);
|
|
337
|
+
const request = createResourceRequest$5(resourceParams);
|
|
338
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
339
|
+
.then((response) => {
|
|
340
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
341
|
+
const cache = new StoreKeyMap();
|
|
342
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
343
|
+
return cache;
|
|
344
|
+
});
|
|
345
|
+
}, (response) => {
|
|
346
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
350
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, 'get', false);
|
|
351
|
+
}
|
|
352
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
353
|
+
const { luvio, config } = context;
|
|
354
|
+
const selector = {
|
|
355
|
+
recordId: keyBuilder$a(luvio, config),
|
|
356
|
+
node: adapterFragment$5(luvio, config),
|
|
357
|
+
variables: {},
|
|
358
|
+
};
|
|
359
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
360
|
+
config,
|
|
361
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
362
|
+
});
|
|
363
|
+
return cacheSnapshot;
|
|
364
|
+
}
|
|
365
|
+
const addRemoveUserToGroupsAdapterFactory = (luvio) => function sharing__addRemoveUserToGroups(untrustedConfig, requestContext) {
|
|
366
|
+
const config = validateAdapterConfig$5(untrustedConfig, addRemoveUserToGroups_ConfigPropertyNames);
|
|
367
|
+
// Invalid or incomplete config
|
|
368
|
+
if (config === null) {
|
|
369
|
+
return null;
|
|
370
|
+
}
|
|
371
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
372
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
373
|
+
};
|
|
374
|
+
|
|
104
375
|
const VERSION$h = "8f1b312aa04c8869624b95b9e3f3cd4e";
|
|
105
376
|
function validate$h(obj, path = 'SobjectOutputSharingRepresentation') {
|
|
106
377
|
const v_error = (() => {
|
|
@@ -332,14 +603,14 @@ const getAllSobjects_ConfigPropertyMetadata = [
|
|
|
332
603
|
generateParamConfigMetadata('searchText', false, 1 /* QueryParameter */, 0 /* String */),
|
|
333
604
|
];
|
|
334
605
|
const getAllSobjects_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getAllSobjects_ConfigPropertyMetadata);
|
|
335
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
606
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(getAllSobjects_ConfigPropertyMetadata);
|
|
336
607
|
function keyBuilder$8(luvio, config) {
|
|
337
608
|
const resourceParams = createResourceParams$4(config);
|
|
338
609
|
return keyBuilder$9(luvio, resourceParams);
|
|
339
610
|
}
|
|
340
611
|
function typeCheckConfig$4(untrustedConfig) {
|
|
341
612
|
const config = {};
|
|
342
|
-
typeCheckConfig$
|
|
613
|
+
typeCheckConfig$6(untrustedConfig, config, getAllSobjects_ConfigPropertyMetadata);
|
|
343
614
|
return config;
|
|
344
615
|
}
|
|
345
616
|
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
@@ -388,7 +659,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
388
659
|
});
|
|
389
660
|
}
|
|
390
661
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
391
|
-
return buildNetworkSnapshotCachePolicy$
|
|
662
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
392
663
|
}
|
|
393
664
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
394
665
|
const { luvio, config } = context;
|
|
@@ -413,12 +684,27 @@ const getAllSobjectsAdapterFactory = (luvio) => function sharing__getAllSobjects
|
|
|
413
684
|
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
414
685
|
};
|
|
415
686
|
|
|
416
|
-
const VERSION$f = "
|
|
687
|
+
const VERSION$f = "0769937b310d74bd11d5782eebfc254a";
|
|
417
688
|
function validate$f(obj, path = 'PublicGroupRepresentation') {
|
|
418
689
|
const v_error = (() => {
|
|
419
690
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
420
691
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
421
692
|
}
|
|
693
|
+
const obj_createdById = obj.createdById;
|
|
694
|
+
const path_createdById = path + '.createdById';
|
|
695
|
+
if (typeof obj_createdById !== 'string') {
|
|
696
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdById + '" (at "' + path_createdById + '")');
|
|
697
|
+
}
|
|
698
|
+
const obj_createdByName = obj.createdByName;
|
|
699
|
+
const path_createdByName = path + '.createdByName';
|
|
700
|
+
if (typeof obj_createdByName !== 'string') {
|
|
701
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdByName + '" (at "' + path_createdByName + '")');
|
|
702
|
+
}
|
|
703
|
+
const obj_createdDate = obj.createdDate;
|
|
704
|
+
const path_createdDate = path + '.createdDate';
|
|
705
|
+
if (typeof obj_createdDate !== 'string') {
|
|
706
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
707
|
+
}
|
|
422
708
|
const obj_developerName = obj.developerName;
|
|
423
709
|
const path_developerName = path + '.developerName';
|
|
424
710
|
if (typeof obj_developerName !== 'string') {
|
|
@@ -448,6 +734,18 @@ const select$j = function PublicGroupRepresentationSelect() {
|
|
|
448
734
|
version: VERSION$f,
|
|
449
735
|
private: [],
|
|
450
736
|
selections: [
|
|
737
|
+
{
|
|
738
|
+
name: 'createdById',
|
|
739
|
+
kind: 'Scalar'
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: 'createdByName',
|
|
743
|
+
kind: 'Scalar'
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: 'createdDate',
|
|
747
|
+
kind: 'Scalar'
|
|
748
|
+
},
|
|
451
749
|
{
|
|
452
750
|
name: 'developerName',
|
|
453
751
|
kind: 'Scalar'
|
|
@@ -473,6 +771,21 @@ function equals$f(existing, incoming) {
|
|
|
473
771
|
if (!(existing_includeBosses === incoming_includeBosses)) {
|
|
474
772
|
return false;
|
|
475
773
|
}
|
|
774
|
+
const existing_createdById = existing.createdById;
|
|
775
|
+
const incoming_createdById = incoming.createdById;
|
|
776
|
+
if (!(existing_createdById === incoming_createdById)) {
|
|
777
|
+
return false;
|
|
778
|
+
}
|
|
779
|
+
const existing_createdByName = existing.createdByName;
|
|
780
|
+
const incoming_createdByName = incoming.createdByName;
|
|
781
|
+
if (!(existing_createdByName === incoming_createdByName)) {
|
|
782
|
+
return false;
|
|
783
|
+
}
|
|
784
|
+
const existing_createdDate = existing.createdDate;
|
|
785
|
+
const incoming_createdDate = incoming.createdDate;
|
|
786
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
787
|
+
return false;
|
|
788
|
+
}
|
|
476
789
|
const existing_developerName = existing.developerName;
|
|
477
790
|
const incoming_developerName = incoming.developerName;
|
|
478
791
|
if (!(existing_developerName === incoming_developerName)) {
|
|
@@ -671,7 +984,7 @@ function select$g(luvio, params) {
|
|
|
671
984
|
return select$h();
|
|
672
985
|
}
|
|
673
986
|
function keyBuilder$7(luvio, params) {
|
|
674
|
-
return keyPrefix + '::GroupCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'sortBy:' + params.queryParams.sortBy + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'groupType:' + params.urlParams.groupType + ',' + 'userId:' + params.urlParams.userId + ')';
|
|
987
|
+
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 + ')';
|
|
675
988
|
}
|
|
676
989
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
677
990
|
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
@@ -727,16 +1040,18 @@ const getGroupsForUser_ConfigPropertyMetadata = [
|
|
|
727
1040
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
728
1041
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
729
1042
|
generateParamConfigMetadata('sortOrder', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1043
|
+
generateParamConfigMetadata('groupMembership', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1044
|
+
generateParamConfigMetadata('searchTerm', false, 1 /* QueryParameter */, 0 /* String */),
|
|
730
1045
|
];
|
|
731
1046
|
const getGroupsForUser_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getGroupsForUser_ConfigPropertyMetadata);
|
|
732
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
1047
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(getGroupsForUser_ConfigPropertyMetadata);
|
|
733
1048
|
function keyBuilder$6(luvio, config) {
|
|
734
1049
|
const resourceParams = createResourceParams$3(config);
|
|
735
1050
|
return keyBuilder$7(luvio, resourceParams);
|
|
736
1051
|
}
|
|
737
1052
|
function typeCheckConfig$3(untrustedConfig) {
|
|
738
1053
|
const config = {};
|
|
739
|
-
typeCheckConfig$
|
|
1054
|
+
typeCheckConfig$6(untrustedConfig, config, getGroupsForUser_ConfigPropertyMetadata);
|
|
740
1055
|
return config;
|
|
741
1056
|
}
|
|
742
1057
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -785,7 +1100,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
785
1100
|
});
|
|
786
1101
|
}
|
|
787
1102
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
788
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1103
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
789
1104
|
}
|
|
790
1105
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
791
1106
|
const { luvio, config } = context;
|
|
@@ -1530,14 +1845,14 @@ const getPublicGroupMembershipDetails_ConfigPropertyMetadata = [
|
|
|
1530
1845
|
generateParamConfigMetadata('selectedMembers', true, 2 /* Body */, 0 /* String */, true),
|
|
1531
1846
|
];
|
|
1532
1847
|
const getPublicGroupMembershipDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getPublicGroupMembershipDetails_ConfigPropertyMetadata);
|
|
1533
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
1848
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getPublicGroupMembershipDetails_ConfigPropertyMetadata);
|
|
1534
1849
|
function keyBuilder$4(luvio, config) {
|
|
1535
1850
|
const resourceParams = createResourceParams$2(config);
|
|
1536
1851
|
return keyBuilder$5(luvio, resourceParams);
|
|
1537
1852
|
}
|
|
1538
1853
|
function typeCheckConfig$2(untrustedConfig) {
|
|
1539
1854
|
const config = {};
|
|
1540
|
-
typeCheckConfig$
|
|
1855
|
+
typeCheckConfig$6(untrustedConfig, config, getPublicGroupMembershipDetails_ConfigPropertyMetadata);
|
|
1541
1856
|
const untrustedConfig_filterCriteria = untrustedConfig.filterCriteria;
|
|
1542
1857
|
config.filterCriteria = untrustedConfig_filterCriteria;
|
|
1543
1858
|
return config;
|
|
@@ -1588,7 +1903,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1588
1903
|
});
|
|
1589
1904
|
}
|
|
1590
1905
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1591
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1906
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, 'get', false);
|
|
1592
1907
|
}
|
|
1593
1908
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1594
1909
|
const { luvio, config } = context;
|
|
@@ -2482,14 +2797,14 @@ const getPublicGroupShareData_ConfigPropertyMetadata = [
|
|
|
2482
2797
|
generateParamConfigMetadata('orderType', true, 2 /* Body */, 0 /* String */),
|
|
2483
2798
|
];
|
|
2484
2799
|
const getPublicGroupShareData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPublicGroupShareData_ConfigPropertyMetadata);
|
|
2485
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
2800
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getPublicGroupShareData_ConfigPropertyMetadata);
|
|
2486
2801
|
function keyBuilder$2(luvio, config) {
|
|
2487
2802
|
const resourceParams = createResourceParams$1(config);
|
|
2488
2803
|
return keyBuilder$3(luvio, resourceParams);
|
|
2489
2804
|
}
|
|
2490
2805
|
function typeCheckConfig$1(untrustedConfig) {
|
|
2491
2806
|
const config = {};
|
|
2492
|
-
typeCheckConfig$
|
|
2807
|
+
typeCheckConfig$6(untrustedConfig, config, getPublicGroupShareData_ConfigPropertyMetadata);
|
|
2493
2808
|
return config;
|
|
2494
2809
|
}
|
|
2495
2810
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -2538,7 +2853,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
2538
2853
|
});
|
|
2539
2854
|
}
|
|
2540
2855
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
2541
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2856
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, 'get', false);
|
|
2542
2857
|
}
|
|
2543
2858
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
2544
2859
|
const { luvio, config } = context;
|
|
@@ -2876,14 +3191,14 @@ const getUserPermissions_ConfigPropertyMetadata = [
|
|
|
2876
3191
|
generateParamConfigMetadata('recordId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
2877
3192
|
];
|
|
2878
3193
|
const getUserPermissions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getUserPermissions_ConfigPropertyMetadata);
|
|
2879
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
3194
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$6(getUserPermissions_ConfigPropertyMetadata);
|
|
2880
3195
|
function keyBuilder(luvio, config) {
|
|
2881
3196
|
const resourceParams = createResourceParams(config);
|
|
2882
3197
|
return keyBuilder$1(luvio, resourceParams);
|
|
2883
3198
|
}
|
|
2884
3199
|
function typeCheckConfig(untrustedConfig) {
|
|
2885
3200
|
const config = {};
|
|
2886
|
-
typeCheckConfig$
|
|
3201
|
+
typeCheckConfig$6(untrustedConfig, config, getUserPermissions_ConfigPropertyMetadata);
|
|
2887
3202
|
return config;
|
|
2888
3203
|
}
|
|
2889
3204
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -2932,7 +3247,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
2932
3247
|
});
|
|
2933
3248
|
}
|
|
2934
3249
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
2935
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3250
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
2936
3251
|
}
|
|
2937
3252
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
2938
3253
|
const { luvio, config } = context;
|
|
@@ -2957,18 +3272,25 @@ const getUserPermissionsAdapterFactory = (luvio) => function sharing__getUserPer
|
|
|
2957
3272
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2958
3273
|
};
|
|
2959
3274
|
|
|
3275
|
+
let addRemoveUserToGroups;
|
|
2960
3276
|
let getAllSobjects;
|
|
2961
3277
|
let getGroupsForUser;
|
|
2962
3278
|
let getPublicGroupMembershipDetails;
|
|
2963
3279
|
let getPublicGroupShareData;
|
|
2964
3280
|
let getUserPermissions;
|
|
2965
3281
|
// Imperative GET Adapters
|
|
3282
|
+
let addRemoveUserToGroups_imperative;
|
|
2966
3283
|
let getAllSobjects_imperative;
|
|
2967
3284
|
let getGroupsForUser_imperative;
|
|
2968
3285
|
let getPublicGroupMembershipDetails_imperative;
|
|
2969
3286
|
let getPublicGroupShareData_imperative;
|
|
2970
3287
|
let getUserPermissions_imperative;
|
|
2971
3288
|
// Adapter Metadata
|
|
3289
|
+
const addRemoveUserToGroupsMetadata = {
|
|
3290
|
+
apiFamily: 'sharing',
|
|
3291
|
+
name: 'addRemoveUserToGroups',
|
|
3292
|
+
ttl: 300,
|
|
3293
|
+
};
|
|
2972
3294
|
const getAllSobjectsMetadata = { apiFamily: 'sharing', name: 'getAllSobjects', ttl: 900000 };
|
|
2973
3295
|
const getGroupsForUserMetadata = { apiFamily: 'sharing', name: 'getGroupsForUser', ttl: 300 };
|
|
2974
3296
|
const getPublicGroupMembershipDetailsMetadata = {
|
|
@@ -2985,18 +3307,21 @@ const getUserPermissionsMetadata = { apiFamily: 'sharing', name: 'getUserPermiss
|
|
|
2985
3307
|
// Notify Update Available
|
|
2986
3308
|
function bindExportsTo(luvio) {
|
|
2987
3309
|
// LDS Adapters
|
|
3310
|
+
const addRemoveUserToGroups_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'addRemoveUserToGroups', addRemoveUserToGroupsAdapterFactory), addRemoveUserToGroupsMetadata);
|
|
2988
3311
|
const getAllSobjects_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getAllSobjects', getAllSobjectsAdapterFactory), getAllSobjectsMetadata);
|
|
2989
3312
|
const getGroupsForUser_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getGroupsForUser', getGroupsForUserAdapterFactory), getGroupsForUserMetadata);
|
|
2990
3313
|
const getPublicGroupMembershipDetails_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPublicGroupMembershipDetails', getPublicGroupMembershipDetailsAdapterFactory), getPublicGroupMembershipDetailsMetadata);
|
|
2991
3314
|
const getPublicGroupShareData_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPublicGroupShareData', getPublicGroupShareDataAdapterFactory), getPublicGroupShareDataMetadata);
|
|
2992
3315
|
const getUserPermissions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getUserPermissions', getUserPermissionsAdapterFactory), getUserPermissionsMetadata);
|
|
2993
3316
|
return {
|
|
3317
|
+
addRemoveUserToGroups: createWireAdapterConstructor(luvio, addRemoveUserToGroups_ldsAdapter, addRemoveUserToGroupsMetadata),
|
|
2994
3318
|
getAllSobjects: createWireAdapterConstructor(luvio, getAllSobjects_ldsAdapter, getAllSobjectsMetadata),
|
|
2995
3319
|
getGroupsForUser: createWireAdapterConstructor(luvio, getGroupsForUser_ldsAdapter, getGroupsForUserMetadata),
|
|
2996
3320
|
getPublicGroupMembershipDetails: createWireAdapterConstructor(luvio, getPublicGroupMembershipDetails_ldsAdapter, getPublicGroupMembershipDetailsMetadata),
|
|
2997
3321
|
getPublicGroupShareData: createWireAdapterConstructor(luvio, getPublicGroupShareData_ldsAdapter, getPublicGroupShareDataMetadata),
|
|
2998
3322
|
getUserPermissions: createWireAdapterConstructor(luvio, getUserPermissions_ldsAdapter, getUserPermissionsMetadata),
|
|
2999
3323
|
// Imperative GET Adapters
|
|
3324
|
+
addRemoveUserToGroups_imperative: createImperativeAdapter(luvio, addRemoveUserToGroups_ldsAdapter, addRemoveUserToGroupsMetadata),
|
|
3000
3325
|
getAllSobjects_imperative: createImperativeAdapter(luvio, getAllSobjects_ldsAdapter, getAllSobjectsMetadata),
|
|
3001
3326
|
getGroupsForUser_imperative: createImperativeAdapter(luvio, getGroupsForUser_ldsAdapter, getGroupsForUserMetadata),
|
|
3002
3327
|
getPublicGroupMembershipDetails_imperative: createImperativeAdapter(luvio, getPublicGroupMembershipDetails_ldsAdapter, getPublicGroupMembershipDetailsMetadata),
|
|
@@ -3007,11 +3332,13 @@ function bindExportsTo(luvio) {
|
|
|
3007
3332
|
}
|
|
3008
3333
|
withDefaultLuvio((luvio) => {
|
|
3009
3334
|
({
|
|
3335
|
+
addRemoveUserToGroups,
|
|
3010
3336
|
getAllSobjects,
|
|
3011
3337
|
getGroupsForUser,
|
|
3012
3338
|
getPublicGroupMembershipDetails,
|
|
3013
3339
|
getPublicGroupShareData,
|
|
3014
3340
|
getUserPermissions,
|
|
3341
|
+
addRemoveUserToGroups_imperative,
|
|
3015
3342
|
getAllSobjects_imperative,
|
|
3016
3343
|
getGroupsForUser_imperative,
|
|
3017
3344
|
getPublicGroupMembershipDetails_imperative,
|
|
@@ -3020,5 +3347,5 @@ withDefaultLuvio((luvio) => {
|
|
|
3020
3347
|
} = bindExportsTo(luvio));
|
|
3021
3348
|
});
|
|
3022
3349
|
|
|
3023
|
-
export { getAllSobjects, getAllSobjects_imperative, getGroupsForUser, getGroupsForUser_imperative, getPublicGroupMembershipDetails, getPublicGroupMembershipDetails_imperative, getPublicGroupShareData, getPublicGroupShareData_imperative, getUserPermissions, getUserPermissions_imperative };
|
|
3024
|
-
// version: 1.
|
|
3350
|
+
export { addRemoveUserToGroups, addRemoveUserToGroups_imperative, getAllSobjects, getAllSobjects_imperative, getGroupsForUser, getGroupsForUser_imperative, getPublicGroupMembershipDetails, getPublicGroupMembershipDetails_imperative, getPublicGroupShareData, getPublicGroupShareData_imperative, getUserPermissions, getUserPermissions_imperative };
|
|
3351
|
+
// version: 1.345.0-faf201180e
|
package/src/raml/api.raml
CHANGED
|
@@ -178,6 +178,27 @@ types:
|
|
|
178
178
|
type: array
|
|
179
179
|
items:
|
|
180
180
|
type: string
|
|
181
|
+
UserGroupMembershipDetailsRepresentation:
|
|
182
|
+
description: Output format for all types of data generated by this API.
|
|
183
|
+
type: object
|
|
184
|
+
properties:
|
|
185
|
+
isSuccess:
|
|
186
|
+
description: API Status.
|
|
187
|
+
type: boolean
|
|
188
|
+
operation:
|
|
189
|
+
description: Api Operation. Supported operations are AddMembers, DeleteMembers.
|
|
190
|
+
type: string
|
|
191
|
+
errors:
|
|
192
|
+
description: API execution error, if encountered during processing.
|
|
193
|
+
type: array
|
|
194
|
+
items:
|
|
195
|
+
type: string
|
|
196
|
+
infos:
|
|
197
|
+
description: Api execution information.
|
|
198
|
+
type: array
|
|
199
|
+
items:
|
|
200
|
+
type: string
|
|
201
|
+
|
|
181
202
|
PublicGroupMembershipDetailsRepresentation:
|
|
182
203
|
description: Parent output representation for all form of data emitted by this
|
|
183
204
|
API
|
|
@@ -238,6 +259,33 @@ types:
|
|
|
238
259
|
name:
|
|
239
260
|
description: The name of the Public Group.
|
|
240
261
|
type: string
|
|
262
|
+
createdByName:
|
|
263
|
+
description: The name of user who created the Public Group.
|
|
264
|
+
type: string
|
|
265
|
+
createdById:
|
|
266
|
+
description: The Id of user who created the Public Group.
|
|
267
|
+
type: string
|
|
268
|
+
createdDate:
|
|
269
|
+
description: The date when the public group was created.
|
|
270
|
+
type: string
|
|
271
|
+
UserGroupMembershipDetailsInputRepresentation:
|
|
272
|
+
description: Input representation for Adding Removing Membership from Group resource
|
|
273
|
+
type: object
|
|
274
|
+
properties:
|
|
275
|
+
userId:
|
|
276
|
+
description: A user ID on which operations to add or remove from groups and queues will be executed.
|
|
277
|
+
type: string
|
|
278
|
+
memberType:
|
|
279
|
+
description: This property specifies the type of group resource on which the operation should be performed.
|
|
280
|
+
type: string
|
|
281
|
+
operation:
|
|
282
|
+
description: This denotes either the AddMembers or DeleteMembers operation. Depending on the operation type, the user will be added to or removed from the specified set of groups.
|
|
283
|
+
type: string
|
|
284
|
+
selectedGroups:
|
|
285
|
+
description: List of group record ids.
|
|
286
|
+
type: array
|
|
287
|
+
items:
|
|
288
|
+
type: string
|
|
241
289
|
PublicGroupSummaryInputRepresentation:
|
|
242
290
|
description: Input representation for public group summary.
|
|
243
291
|
type: object
|
|
@@ -804,6 +852,15 @@ types:
|
|
|
804
852
|
sortOrder:
|
|
805
853
|
type: string
|
|
806
854
|
required: false
|
|
855
|
+
groupMembership:
|
|
856
|
+
type: string
|
|
857
|
+
required: false
|
|
858
|
+
enum:
|
|
859
|
+
- Present
|
|
860
|
+
- NotPresent
|
|
861
|
+
searchTerm:
|
|
862
|
+
type: string
|
|
863
|
+
required: false
|
|
807
864
|
uriParameters:
|
|
808
865
|
groupType:
|
|
809
866
|
type: string
|
|
@@ -814,6 +871,20 @@ types:
|
|
|
814
871
|
userId:
|
|
815
872
|
type: string
|
|
816
873
|
required: true
|
|
874
|
+
/addRemoveUserToGroups:
|
|
875
|
+
post:
|
|
876
|
+
displayName: postAddRemoveGroupMembership
|
|
877
|
+
description: Add/Remove the user to/from the groups/queues based on filter criteria
|
|
878
|
+
responses:
|
|
879
|
+
'200':
|
|
880
|
+
description: Success
|
|
881
|
+
body:
|
|
882
|
+
application/json:
|
|
883
|
+
type: UserGroupMembershipDetailsRepresentation
|
|
884
|
+
body:
|
|
885
|
+
application/json:
|
|
886
|
+
type: UserGroupMembershipDetailsInputRepresentation
|
|
887
|
+
(oas-body-name): userGroupsDetailsParams
|
|
817
888
|
/publicGroupsDetails:
|
|
818
889
|
post:
|
|
819
890
|
displayName: postPublicGroupMembershipDetails
|