@salesforce/lds-adapters-service-slack 1.335.0 → 1.337.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/service-slack.js +1087 -776
- package/dist/es/es2018/types/src/generated/adapters/getSlackWorkspace.d.ts +27 -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/getConnectSwarmingWorkspaces.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/types/SlackWorkspaceListOutputRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/SlackWorkspaceOutputRepresentation.d.ts +40 -0
- package/package.json +3 -3
- package/sfdc/index.js +1016 -697
- package/src/raml/api.raml +35 -1
- package/src/raml/luvio.raml +7 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a, typeCheckConfig as typeCheckConfig$g, StoreKeyMap, createResourceParams as createResourceParams$g } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -111,8 +111,8 @@ function createLink(ref) {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
const VERSION$
|
|
115
|
-
function validate$
|
|
114
|
+
const VERSION$i = "9349aea0ef244c3f54fc857eb2d17577";
|
|
115
|
+
function validate$i(obj, path = 'SlackSalesforceAuthenticationOutputRepresentation') {
|
|
116
116
|
const v_error = (() => {
|
|
117
117
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
118
118
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -125,14 +125,14 @@ function validate$g(obj, path = 'SlackSalesforceAuthenticationOutputRepresentati
|
|
|
125
125
|
})();
|
|
126
126
|
return v_error === undefined ? null : v_error;
|
|
127
127
|
}
|
|
128
|
-
const RepresentationType$
|
|
129
|
-
function normalize$
|
|
128
|
+
const RepresentationType$f = 'SlackSalesforceAuthenticationOutputRepresentation';
|
|
129
|
+
function normalize$e(input, existing, path, luvio, store, timestamp) {
|
|
130
130
|
return input;
|
|
131
131
|
}
|
|
132
|
-
const select$
|
|
132
|
+
const select$w = function SlackSalesforceAuthenticationOutputRepresentationSelect() {
|
|
133
133
|
return {
|
|
134
134
|
kind: 'Fragment',
|
|
135
|
-
version: VERSION$
|
|
135
|
+
version: VERSION$i,
|
|
136
136
|
private: [],
|
|
137
137
|
selections: [
|
|
138
138
|
{
|
|
@@ -142,7 +142,7 @@ const select$t = function SlackSalesforceAuthenticationOutputRepresentationSelec
|
|
|
142
142
|
]
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
|
-
function equals$
|
|
145
|
+
function equals$i(existing, incoming) {
|
|
146
146
|
const existing_authUrl = existing.authUrl;
|
|
147
147
|
const incoming_authUrl = incoming.authUrl;
|
|
148
148
|
if (!(existing_authUrl === incoming_authUrl)) {
|
|
@@ -150,44 +150,44 @@ function equals$g(existing, incoming) {
|
|
|
150
150
|
}
|
|
151
151
|
return true;
|
|
152
152
|
}
|
|
153
|
-
const ingest$
|
|
153
|
+
const ingest$e = function SlackSalesforceAuthenticationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
154
154
|
if (process.env.NODE_ENV !== 'production') {
|
|
155
|
-
const validateError = validate$
|
|
155
|
+
const validateError = validate$i(input);
|
|
156
156
|
if (validateError !== null) {
|
|
157
157
|
throw validateError;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
const key = path.fullPath;
|
|
161
161
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
162
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
162
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$e, "Slack", VERSION$i, RepresentationType$f, equals$i);
|
|
163
163
|
return createLink(key);
|
|
164
164
|
};
|
|
165
|
-
function getTypeCacheKeys$
|
|
165
|
+
function getTypeCacheKeys$e(rootKeySet, luvio, input, fullPathFactory) {
|
|
166
166
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
167
167
|
const rootKey = fullPathFactory();
|
|
168
168
|
rootKeySet.set(rootKey, {
|
|
169
169
|
namespace: keyPrefix,
|
|
170
|
-
representationName: RepresentationType$
|
|
170
|
+
representationName: RepresentationType$f,
|
|
171
171
|
mergeable: false
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
function select$
|
|
176
|
-
return select$
|
|
175
|
+
function select$v(luvio, params) {
|
|
176
|
+
return select$w();
|
|
177
177
|
}
|
|
178
|
-
function keyBuilder$
|
|
178
|
+
function keyBuilder$t(luvio, params) {
|
|
179
179
|
return keyPrefix + '::SlackSalesforceAuthenticationOutputRepresentation:(' + 'appId:' + params.queryParams.appId + ')';
|
|
180
180
|
}
|
|
181
|
-
function getResponseCacheKeys$
|
|
182
|
-
getTypeCacheKeys$
|
|
181
|
+
function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
|
|
182
|
+
getTypeCacheKeys$e(storeKeyMap, luvio, response, () => keyBuilder$t(luvio, resourceParams));
|
|
183
183
|
}
|
|
184
|
-
function ingestSuccess$
|
|
184
|
+
function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
185
185
|
const { body } = response;
|
|
186
|
-
const key = keyBuilder$
|
|
187
|
-
luvio.storeIngest(key, ingest$
|
|
186
|
+
const key = keyBuilder$t(luvio, resourceParams);
|
|
187
|
+
luvio.storeIngest(key, ingest$e, body);
|
|
188
188
|
const snapshot = luvio.storeLookup({
|
|
189
189
|
recordId: key,
|
|
190
|
-
node: select$
|
|
190
|
+
node: select$v(),
|
|
191
191
|
variables: {},
|
|
192
192
|
}, snapshotRefresh);
|
|
193
193
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -198,13 +198,13 @@ function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
198
198
|
deepFreeze(snapshot.data);
|
|
199
199
|
return snapshot;
|
|
200
200
|
}
|
|
201
|
-
function ingestError$
|
|
202
|
-
const key = keyBuilder$
|
|
201
|
+
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
202
|
+
const key = keyBuilder$t(luvio, params);
|
|
203
203
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
204
204
|
luvio.storeIngestError(key, errorSnapshot);
|
|
205
205
|
return errorSnapshot;
|
|
206
206
|
}
|
|
207
|
-
function createResourceRequest$
|
|
207
|
+
function createResourceRequest$f(config) {
|
|
208
208
|
const headers = {};
|
|
209
209
|
return {
|
|
210
210
|
baseUri: '/services/data/v64.0',
|
|
@@ -218,94 +218,94 @@ function createResourceRequest$e(config) {
|
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
const adapterName$
|
|
221
|
+
const adapterName$f = 'getSlackSalesforceAuth';
|
|
222
222
|
const getSlackSalesforceAuth_ConfigPropertyMetadata = [
|
|
223
223
|
generateParamConfigMetadata('appId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
224
224
|
];
|
|
225
|
-
const getSlackSalesforceAuth_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
226
|
-
const createResourceParams$
|
|
227
|
-
function keyBuilder$
|
|
228
|
-
const resourceParams = createResourceParams$
|
|
229
|
-
return keyBuilder$
|
|
225
|
+
const getSlackSalesforceAuth_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, getSlackSalesforceAuth_ConfigPropertyMetadata);
|
|
226
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$g(getSlackSalesforceAuth_ConfigPropertyMetadata);
|
|
227
|
+
function keyBuilder$s(luvio, config) {
|
|
228
|
+
const resourceParams = createResourceParams$f(config);
|
|
229
|
+
return keyBuilder$t(luvio, resourceParams);
|
|
230
230
|
}
|
|
231
|
-
function typeCheckConfig$
|
|
231
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
232
232
|
const config = {};
|
|
233
|
-
typeCheckConfig$
|
|
233
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackSalesforceAuth_ConfigPropertyMetadata);
|
|
234
234
|
return config;
|
|
235
235
|
}
|
|
236
|
-
function validateAdapterConfig$
|
|
236
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
237
237
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
238
238
|
return null;
|
|
239
239
|
}
|
|
240
240
|
if (process.env.NODE_ENV !== 'production') {
|
|
241
241
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
242
242
|
}
|
|
243
|
-
const config = typeCheckConfig$
|
|
243
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
244
244
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
245
245
|
return null;
|
|
246
246
|
}
|
|
247
247
|
return config;
|
|
248
248
|
}
|
|
249
|
-
function adapterFragment$
|
|
250
|
-
createResourceParams$
|
|
251
|
-
return select$
|
|
249
|
+
function adapterFragment$9(luvio, config) {
|
|
250
|
+
createResourceParams$f(config);
|
|
251
|
+
return select$v();
|
|
252
252
|
}
|
|
253
|
-
function onFetchResponseSuccess$
|
|
254
|
-
const snapshot = ingestSuccess$
|
|
253
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
254
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
|
|
255
255
|
config,
|
|
256
|
-
resolve: () => buildNetworkSnapshot$
|
|
256
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
257
257
|
});
|
|
258
258
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
259
259
|
}
|
|
260
|
-
function onFetchResponseError$
|
|
261
|
-
const snapshot = ingestError$
|
|
260
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
261
|
+
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
262
262
|
config,
|
|
263
|
-
resolve: () => buildNetworkSnapshot$
|
|
263
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
264
264
|
});
|
|
265
265
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
266
266
|
}
|
|
267
|
-
function buildNetworkSnapshot$
|
|
268
|
-
const resourceParams = createResourceParams$
|
|
269
|
-
const request = createResourceRequest$
|
|
267
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
268
|
+
const resourceParams = createResourceParams$f(config);
|
|
269
|
+
const request = createResourceRequest$f(resourceParams);
|
|
270
270
|
return luvio.dispatchResourceRequest(request, options)
|
|
271
271
|
.then((response) => {
|
|
272
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
272
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
273
273
|
const cache = new StoreKeyMap();
|
|
274
|
-
getResponseCacheKeys$
|
|
274
|
+
getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
|
|
275
275
|
return cache;
|
|
276
276
|
});
|
|
277
277
|
}, (response) => {
|
|
278
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
278
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
function buildNetworkSnapshotCachePolicy$
|
|
282
|
-
return buildNetworkSnapshotCachePolicy$
|
|
281
|
+
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
282
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$f, undefined, false);
|
|
283
283
|
}
|
|
284
|
-
function buildCachedSnapshotCachePolicy$
|
|
284
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
285
285
|
const { luvio, config } = context;
|
|
286
286
|
const selector = {
|
|
287
|
-
recordId: keyBuilder$
|
|
288
|
-
node: adapterFragment$
|
|
287
|
+
recordId: keyBuilder$s(luvio, config),
|
|
288
|
+
node: adapterFragment$9(luvio, config),
|
|
289
289
|
variables: {},
|
|
290
290
|
};
|
|
291
291
|
const cacheSnapshot = storeLookup(selector, {
|
|
292
292
|
config,
|
|
293
|
-
resolve: () => buildNetworkSnapshot$
|
|
293
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
294
294
|
});
|
|
295
295
|
return cacheSnapshot;
|
|
296
296
|
}
|
|
297
297
|
const getSlackSalesforceAuthAdapterFactory = (luvio) => function Slack__getSlackSalesforceAuth(untrustedConfig, requestContext) {
|
|
298
|
-
const config = validateAdapterConfig$
|
|
298
|
+
const config = validateAdapterConfig$f(untrustedConfig, getSlackSalesforceAuth_ConfigPropertyNames);
|
|
299
299
|
// Invalid or incomplete config
|
|
300
300
|
if (config === null) {
|
|
301
301
|
return null;
|
|
302
302
|
}
|
|
303
303
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
304
|
-
buildCachedSnapshotCachePolicy$
|
|
304
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
305
305
|
};
|
|
306
306
|
|
|
307
|
-
const VERSION$
|
|
308
|
-
function validate$
|
|
307
|
+
const VERSION$h = "c1bddf326dab5c5496dc81bd0e4d7e2e";
|
|
308
|
+
function validate$h(obj, path = 'SlackCustomEmojisOutputRepresentation') {
|
|
309
309
|
const v_error = (() => {
|
|
310
310
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
311
311
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -332,14 +332,14 @@ function validate$f(obj, path = 'SlackCustomEmojisOutputRepresentation') {
|
|
|
332
332
|
})();
|
|
333
333
|
return v_error === undefined ? null : v_error;
|
|
334
334
|
}
|
|
335
|
-
const RepresentationType$
|
|
336
|
-
function normalize$
|
|
335
|
+
const RepresentationType$e = 'SlackCustomEmojisOutputRepresentation';
|
|
336
|
+
function normalize$d(input, existing, path, luvio, store, timestamp) {
|
|
337
337
|
return input;
|
|
338
338
|
}
|
|
339
|
-
const select$
|
|
339
|
+
const select$u = function SlackCustomEmojisOutputRepresentationSelect() {
|
|
340
340
|
return {
|
|
341
341
|
kind: 'Fragment',
|
|
342
|
-
version: VERSION$
|
|
342
|
+
version: VERSION$h,
|
|
343
343
|
private: [],
|
|
344
344
|
selections: [
|
|
345
345
|
{
|
|
@@ -354,7 +354,7 @@ const select$r = function SlackCustomEmojisOutputRepresentationSelect() {
|
|
|
354
354
|
]
|
|
355
355
|
};
|
|
356
356
|
};
|
|
357
|
-
function equals$
|
|
357
|
+
function equals$h(existing, incoming) {
|
|
358
358
|
const existing_teamId = existing.teamId;
|
|
359
359
|
const incoming_teamId = incoming.teamId;
|
|
360
360
|
if (!(existing_teamId === incoming_teamId)) {
|
|
@@ -372,44 +372,44 @@ function equals$f(existing, incoming) {
|
|
|
372
372
|
}
|
|
373
373
|
return true;
|
|
374
374
|
}
|
|
375
|
-
const ingest$
|
|
375
|
+
const ingest$d = function SlackCustomEmojisOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
376
376
|
if (process.env.NODE_ENV !== 'production') {
|
|
377
|
-
const validateError = validate$
|
|
377
|
+
const validateError = validate$h(input);
|
|
378
378
|
if (validateError !== null) {
|
|
379
379
|
throw validateError;
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
const key = path.fullPath;
|
|
383
383
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
384
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
384
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$d, "Slack", VERSION$h, RepresentationType$e, equals$h);
|
|
385
385
|
return createLink(key);
|
|
386
386
|
};
|
|
387
|
-
function getTypeCacheKeys$
|
|
387
|
+
function getTypeCacheKeys$d(rootKeySet, luvio, input, fullPathFactory) {
|
|
388
388
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
389
389
|
const rootKey = fullPathFactory();
|
|
390
390
|
rootKeySet.set(rootKey, {
|
|
391
391
|
namespace: keyPrefix,
|
|
392
|
-
representationName: RepresentationType$
|
|
392
|
+
representationName: RepresentationType$e,
|
|
393
393
|
mergeable: false
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
-
function select$
|
|
398
|
-
return select$
|
|
397
|
+
function select$t(luvio, params) {
|
|
398
|
+
return select$u();
|
|
399
399
|
}
|
|
400
|
-
function keyBuilder$
|
|
400
|
+
function keyBuilder$r(luvio, params) {
|
|
401
401
|
return keyPrefix + '::SlackCustomEmojisOutputRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'teamId:' + params.queryParams.teamId + ')';
|
|
402
402
|
}
|
|
403
|
-
function getResponseCacheKeys$
|
|
404
|
-
getTypeCacheKeys$
|
|
403
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
404
|
+
getTypeCacheKeys$d(storeKeyMap, luvio, response, () => keyBuilder$r(luvio, resourceParams));
|
|
405
405
|
}
|
|
406
|
-
function ingestSuccess$
|
|
406
|
+
function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
|
|
407
407
|
const { body } = response;
|
|
408
|
-
const key = keyBuilder$
|
|
409
|
-
luvio.storeIngest(key, ingest$
|
|
408
|
+
const key = keyBuilder$r(luvio, resourceParams);
|
|
409
|
+
luvio.storeIngest(key, ingest$d, body);
|
|
410
410
|
const snapshot = luvio.storeLookup({
|
|
411
411
|
recordId: key,
|
|
412
|
-
node: select$
|
|
412
|
+
node: select$t(),
|
|
413
413
|
variables: {},
|
|
414
414
|
}, snapshotRefresh);
|
|
415
415
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -420,13 +420,13 @@ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
420
420
|
deepFreeze(snapshot.data);
|
|
421
421
|
return snapshot;
|
|
422
422
|
}
|
|
423
|
-
function ingestError$
|
|
424
|
-
const key = keyBuilder$
|
|
423
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
424
|
+
const key = keyBuilder$r(luvio, params);
|
|
425
425
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
426
426
|
luvio.storeIngestError(key, errorSnapshot);
|
|
427
427
|
return errorSnapshot;
|
|
428
428
|
}
|
|
429
|
-
function createResourceRequest$
|
|
429
|
+
function createResourceRequest$e(config) {
|
|
430
430
|
const headers = {};
|
|
431
431
|
return {
|
|
432
432
|
baseUri: '/services/data/v64.0',
|
|
@@ -440,95 +440,95 @@ function createResourceRequest$d(config) {
|
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
const adapterName$
|
|
443
|
+
const adapterName$e = 'getSlackCustomEmoji';
|
|
444
444
|
const getSlackCustomEmoji_ConfigPropertyMetadata = [
|
|
445
445
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
446
446
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
447
447
|
];
|
|
448
|
-
const getSlackCustomEmoji_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
449
|
-
const createResourceParams$
|
|
450
|
-
function keyBuilder$
|
|
451
|
-
const resourceParams = createResourceParams$
|
|
452
|
-
return keyBuilder$
|
|
448
|
+
const getSlackCustomEmoji_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, getSlackCustomEmoji_ConfigPropertyMetadata);
|
|
449
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$g(getSlackCustomEmoji_ConfigPropertyMetadata);
|
|
450
|
+
function keyBuilder$q(luvio, config) {
|
|
451
|
+
const resourceParams = createResourceParams$e(config);
|
|
452
|
+
return keyBuilder$r(luvio, resourceParams);
|
|
453
453
|
}
|
|
454
|
-
function typeCheckConfig$
|
|
454
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
455
455
|
const config = {};
|
|
456
|
-
typeCheckConfig$
|
|
456
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackCustomEmoji_ConfigPropertyMetadata);
|
|
457
457
|
return config;
|
|
458
458
|
}
|
|
459
|
-
function validateAdapterConfig$
|
|
459
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
460
460
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
461
461
|
return null;
|
|
462
462
|
}
|
|
463
463
|
if (process.env.NODE_ENV !== 'production') {
|
|
464
464
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
465
465
|
}
|
|
466
|
-
const config = typeCheckConfig$
|
|
466
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
467
467
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
468
468
|
return null;
|
|
469
469
|
}
|
|
470
470
|
return config;
|
|
471
471
|
}
|
|
472
|
-
function adapterFragment$
|
|
473
|
-
createResourceParams$
|
|
474
|
-
return select$
|
|
472
|
+
function adapterFragment$8(luvio, config) {
|
|
473
|
+
createResourceParams$e(config);
|
|
474
|
+
return select$t();
|
|
475
475
|
}
|
|
476
|
-
function onFetchResponseSuccess$
|
|
477
|
-
const snapshot = ingestSuccess$
|
|
476
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
477
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
|
|
478
478
|
config,
|
|
479
|
-
resolve: () => buildNetworkSnapshot$
|
|
479
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
480
480
|
});
|
|
481
481
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
482
482
|
}
|
|
483
|
-
function onFetchResponseError$
|
|
484
|
-
const snapshot = ingestError$
|
|
483
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
484
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
485
485
|
config,
|
|
486
|
-
resolve: () => buildNetworkSnapshot$
|
|
486
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
487
487
|
});
|
|
488
488
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
489
489
|
}
|
|
490
|
-
function buildNetworkSnapshot$
|
|
491
|
-
const resourceParams = createResourceParams$
|
|
492
|
-
const request = createResourceRequest$
|
|
490
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
491
|
+
const resourceParams = createResourceParams$e(config);
|
|
492
|
+
const request = createResourceRequest$e(resourceParams);
|
|
493
493
|
return luvio.dispatchResourceRequest(request, options)
|
|
494
494
|
.then((response) => {
|
|
495
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
495
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
496
496
|
const cache = new StoreKeyMap();
|
|
497
|
-
getResponseCacheKeys$
|
|
497
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
498
498
|
return cache;
|
|
499
499
|
});
|
|
500
500
|
}, (response) => {
|
|
501
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
501
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
|
-
function buildNetworkSnapshotCachePolicy$
|
|
505
|
-
return buildNetworkSnapshotCachePolicy$
|
|
504
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
505
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$e, undefined, false);
|
|
506
506
|
}
|
|
507
|
-
function buildCachedSnapshotCachePolicy$
|
|
507
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
508
508
|
const { luvio, config } = context;
|
|
509
509
|
const selector = {
|
|
510
|
-
recordId: keyBuilder$
|
|
511
|
-
node: adapterFragment$
|
|
510
|
+
recordId: keyBuilder$q(luvio, config),
|
|
511
|
+
node: adapterFragment$8(luvio, config),
|
|
512
512
|
variables: {},
|
|
513
513
|
};
|
|
514
514
|
const cacheSnapshot = storeLookup(selector, {
|
|
515
515
|
config,
|
|
516
|
-
resolve: () => buildNetworkSnapshot$
|
|
516
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
517
517
|
});
|
|
518
518
|
return cacheSnapshot;
|
|
519
519
|
}
|
|
520
520
|
const getSlackCustomEmojiAdapterFactory = (luvio) => function Slack__getSlackCustomEmoji(untrustedConfig, requestContext) {
|
|
521
|
-
const config = validateAdapterConfig$
|
|
521
|
+
const config = validateAdapterConfig$e(untrustedConfig, getSlackCustomEmoji_ConfigPropertyNames);
|
|
522
522
|
// Invalid or incomplete config
|
|
523
523
|
if (config === null) {
|
|
524
524
|
return null;
|
|
525
525
|
}
|
|
526
526
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
527
|
-
buildCachedSnapshotCachePolicy$
|
|
527
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
528
528
|
};
|
|
529
529
|
|
|
530
|
-
const VERSION$
|
|
531
|
-
function validate$
|
|
530
|
+
const VERSION$g = "67b7fe6f8ee1967c58049a7212129bad";
|
|
531
|
+
function validate$g(obj, path = 'FileTypeOutputRepresentation') {
|
|
532
532
|
const v_error = (() => {
|
|
533
533
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
534
534
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -546,10 +546,10 @@ function validate$e(obj, path = 'FileTypeOutputRepresentation') {
|
|
|
546
546
|
})();
|
|
547
547
|
return v_error === undefined ? null : v_error;
|
|
548
548
|
}
|
|
549
|
-
const select$
|
|
549
|
+
const select$s = function FileTypeOutputRepresentationSelect() {
|
|
550
550
|
return {
|
|
551
551
|
kind: 'Fragment',
|
|
552
|
-
version: VERSION$
|
|
552
|
+
version: VERSION$g,
|
|
553
553
|
private: [],
|
|
554
554
|
selections: [
|
|
555
555
|
{
|
|
@@ -563,7 +563,7 @@ const select$p = function FileTypeOutputRepresentationSelect() {
|
|
|
563
563
|
]
|
|
564
564
|
};
|
|
565
565
|
};
|
|
566
|
-
function equals$
|
|
566
|
+
function equals$g(existing, incoming) {
|
|
567
567
|
const existing_extension = existing.extension;
|
|
568
568
|
const incoming_extension = incoming.extension;
|
|
569
569
|
if (!(existing_extension === incoming_extension)) {
|
|
@@ -577,8 +577,8 @@ function equals$e(existing, incoming) {
|
|
|
577
577
|
return true;
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
-
const VERSION$
|
|
581
|
-
function validate$
|
|
580
|
+
const VERSION$f = "73aa50e42c29769a00f9777e21b0e1d7";
|
|
581
|
+
function validate$f(obj, path = 'ContentVersionOutputRepresentation') {
|
|
582
582
|
const v_error = (() => {
|
|
583
583
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
584
584
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -592,7 +592,7 @@ function validate$d(obj, path = 'ContentVersionOutputRepresentation') {
|
|
|
592
592
|
const path_filetype = path + '.filetype';
|
|
593
593
|
let obj_filetype_union0 = null;
|
|
594
594
|
const obj_filetype_union0_error = (() => {
|
|
595
|
-
const referencepath_filetypeValidationError = validate$
|
|
595
|
+
const referencepath_filetypeValidationError = validate$g(obj_filetype, path_filetype);
|
|
596
596
|
if (referencepath_filetypeValidationError !== null) {
|
|
597
597
|
let message = 'Object doesn\'t match FileTypeOutputRepresentation (at "' + path_filetype + '")\n';
|
|
598
598
|
message += referencepath_filetypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -661,11 +661,11 @@ function validate$d(obj, path = 'ContentVersionOutputRepresentation') {
|
|
|
661
661
|
})();
|
|
662
662
|
return v_error === undefined ? null : v_error;
|
|
663
663
|
}
|
|
664
|
-
const select$
|
|
665
|
-
const { selections: FileTypeOutputRepresentation__selections, opaque: FileTypeOutputRepresentation__opaque, } = select$
|
|
664
|
+
const select$r = function ContentVersionOutputRepresentationSelect() {
|
|
665
|
+
const { selections: FileTypeOutputRepresentation__selections, opaque: FileTypeOutputRepresentation__opaque, } = select$s();
|
|
666
666
|
return {
|
|
667
667
|
kind: 'Fragment',
|
|
668
|
-
version: VERSION$
|
|
668
|
+
version: VERSION$f,
|
|
669
669
|
private: [],
|
|
670
670
|
selections: [
|
|
671
671
|
{
|
|
@@ -697,7 +697,7 @@ const select$o = function ContentVersionOutputRepresentationSelect() {
|
|
|
697
697
|
]
|
|
698
698
|
};
|
|
699
699
|
};
|
|
700
|
-
function equals$
|
|
700
|
+
function equals$f(existing, incoming) {
|
|
701
701
|
const existing_size = existing.size;
|
|
702
702
|
const incoming_size = incoming.size;
|
|
703
703
|
if (!(existing_size === incoming_size)) {
|
|
@@ -723,7 +723,7 @@ function equals$d(existing, incoming) {
|
|
|
723
723
|
if (!(existing_filetype === incoming_filetype
|
|
724
724
|
|| (existing_filetype != null &&
|
|
725
725
|
incoming_filetype != null &&
|
|
726
|
-
equals$
|
|
726
|
+
equals$g(existing_filetype, incoming_filetype)))) {
|
|
727
727
|
return false;
|
|
728
728
|
}
|
|
729
729
|
const existing_versionUrl = existing.versionUrl;
|
|
@@ -734,15 +734,15 @@ function equals$d(existing, incoming) {
|
|
|
734
734
|
return true;
|
|
735
735
|
}
|
|
736
736
|
|
|
737
|
-
const VERSION$
|
|
738
|
-
function validate$
|
|
737
|
+
const VERSION$e = "86dc45870c15b40e9591690f7fb1ac16";
|
|
738
|
+
function validate$e(obj, path = 'ContentDocumentOutputRepresentation') {
|
|
739
739
|
const v_error = (() => {
|
|
740
740
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
741
741
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
742
742
|
}
|
|
743
743
|
const obj_filetype = obj.filetype;
|
|
744
744
|
const path_filetype = path + '.filetype';
|
|
745
|
-
const referencepath_filetypeValidationError = validate$
|
|
745
|
+
const referencepath_filetypeValidationError = validate$g(obj_filetype, path_filetype);
|
|
746
746
|
if (referencepath_filetypeValidationError !== null) {
|
|
747
747
|
let message = 'Object doesn\'t match FileTypeOutputRepresentation (at "' + path_filetype + '")\n';
|
|
748
748
|
message += referencepath_filetypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -755,7 +755,7 @@ function validate$c(obj, path = 'ContentDocumentOutputRepresentation') {
|
|
|
755
755
|
}
|
|
756
756
|
const obj_latestPublishedVersion = obj.latestPublishedVersion;
|
|
757
757
|
const path_latestPublishedVersion = path + '.latestPublishedVersion';
|
|
758
|
-
const referencepath_latestPublishedVersionValidationError = validate$
|
|
758
|
+
const referencepath_latestPublishedVersionValidationError = validate$f(obj_latestPublishedVersion, path_latestPublishedVersion);
|
|
759
759
|
if (referencepath_latestPublishedVersionValidationError !== null) {
|
|
760
760
|
let message = 'Object doesn\'t match ContentVersionOutputRepresentation (at "' + path_latestPublishedVersion + '")\n';
|
|
761
761
|
message += referencepath_latestPublishedVersionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -774,12 +774,12 @@ function validate$c(obj, path = 'ContentDocumentOutputRepresentation') {
|
|
|
774
774
|
})();
|
|
775
775
|
return v_error === undefined ? null : v_error;
|
|
776
776
|
}
|
|
777
|
-
const select$
|
|
778
|
-
const { selections: FileTypeOutputRepresentation__selections, opaque: FileTypeOutputRepresentation__opaque, } = select$
|
|
779
|
-
const { selections: ContentVersionOutputRepresentation__selections, opaque: ContentVersionOutputRepresentation__opaque, } = select$
|
|
777
|
+
const select$q = function ContentDocumentOutputRepresentationSelect() {
|
|
778
|
+
const { selections: FileTypeOutputRepresentation__selections, opaque: FileTypeOutputRepresentation__opaque, } = select$s();
|
|
779
|
+
const { selections: ContentVersionOutputRepresentation__selections, opaque: ContentVersionOutputRepresentation__opaque, } = select$r();
|
|
780
780
|
return {
|
|
781
781
|
kind: 'Fragment',
|
|
782
|
-
version: VERSION$
|
|
782
|
+
version: VERSION$e,
|
|
783
783
|
private: [],
|
|
784
784
|
selections: [
|
|
785
785
|
{
|
|
@@ -807,7 +807,7 @@ const select$n = function ContentDocumentOutputRepresentationSelect() {
|
|
|
807
807
|
]
|
|
808
808
|
};
|
|
809
809
|
};
|
|
810
|
-
function equals$
|
|
810
|
+
function equals$e(existing, incoming) {
|
|
811
811
|
const existing_size = existing.size;
|
|
812
812
|
const incoming_size = incoming.size;
|
|
813
813
|
if (!(existing_size === incoming_size)) {
|
|
@@ -825,19 +825,19 @@ function equals$c(existing, incoming) {
|
|
|
825
825
|
}
|
|
826
826
|
const existing_filetype = existing.filetype;
|
|
827
827
|
const incoming_filetype = incoming.filetype;
|
|
828
|
-
if (!(equals$
|
|
828
|
+
if (!(equals$g(existing_filetype, incoming_filetype))) {
|
|
829
829
|
return false;
|
|
830
830
|
}
|
|
831
831
|
const existing_latestPublishedVersion = existing.latestPublishedVersion;
|
|
832
832
|
const incoming_latestPublishedVersion = incoming.latestPublishedVersion;
|
|
833
|
-
if (!(equals$
|
|
833
|
+
if (!(equals$f(existing_latestPublishedVersion, incoming_latestPublishedVersion))) {
|
|
834
834
|
return false;
|
|
835
835
|
}
|
|
836
836
|
return true;
|
|
837
837
|
}
|
|
838
838
|
|
|
839
|
-
const VERSION$
|
|
840
|
-
function validate$
|
|
839
|
+
const VERSION$d = "bb76a06cd8248e2edce70bc4fb6e4626";
|
|
840
|
+
function validate$d(obj, path = 'SlackFileOutputRepresentation') {
|
|
841
841
|
const v_error = (() => {
|
|
842
842
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
843
843
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -846,7 +846,7 @@ function validate$b(obj, path = 'SlackFileOutputRepresentation') {
|
|
|
846
846
|
const path_contentDocument = path + '.contentDocument';
|
|
847
847
|
let obj_contentDocument_union0 = null;
|
|
848
848
|
const obj_contentDocument_union0_error = (() => {
|
|
849
|
-
const referencepath_contentDocumentValidationError = validate$
|
|
849
|
+
const referencepath_contentDocumentValidationError = validate$e(obj_contentDocument, path_contentDocument);
|
|
850
850
|
if (referencepath_contentDocumentValidationError !== null) {
|
|
851
851
|
let message = 'Object doesn\'t match ContentDocumentOutputRepresentation (at "' + path_contentDocument + '")\n';
|
|
852
852
|
message += referencepath_contentDocumentValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1008,24 +1008,24 @@ function validate$b(obj, path = 'SlackFileOutputRepresentation') {
|
|
|
1008
1008
|
})();
|
|
1009
1009
|
return v_error === undefined ? null : v_error;
|
|
1010
1010
|
}
|
|
1011
|
-
const RepresentationType$
|
|
1012
|
-
function keyBuilder$
|
|
1013
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1011
|
+
const RepresentationType$d = 'SlackFileOutputRepresentation';
|
|
1012
|
+
function keyBuilder$p(luvio, config) {
|
|
1013
|
+
return keyPrefix + '::' + RepresentationType$d + ':' + (config.uniqueKey === null ? '' : config.uniqueKey);
|
|
1014
1014
|
}
|
|
1015
|
-
function keyBuilderFromType$
|
|
1015
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
1016
1016
|
const keyParams = {
|
|
1017
1017
|
uniqueKey: object.uniqueKey
|
|
1018
1018
|
};
|
|
1019
|
-
return keyBuilder$
|
|
1019
|
+
return keyBuilder$p(luvio, keyParams);
|
|
1020
1020
|
}
|
|
1021
|
-
function normalize$
|
|
1021
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
1022
1022
|
return input;
|
|
1023
1023
|
}
|
|
1024
|
-
const select$
|
|
1025
|
-
const { selections: ContentDocumentOutputRepresentation__selections, opaque: ContentDocumentOutputRepresentation__opaque, } = select$
|
|
1024
|
+
const select$p = function SlackFileOutputRepresentationSelect() {
|
|
1025
|
+
const { selections: ContentDocumentOutputRepresentation__selections, opaque: ContentDocumentOutputRepresentation__opaque, } = select$q();
|
|
1026
1026
|
return {
|
|
1027
1027
|
kind: 'Fragment',
|
|
1028
|
-
version: VERSION$
|
|
1028
|
+
version: VERSION$d,
|
|
1029
1029
|
private: [],
|
|
1030
1030
|
selections: [
|
|
1031
1031
|
{
|
|
@@ -1077,7 +1077,7 @@ const select$m = function SlackFileOutputRepresentationSelect() {
|
|
|
1077
1077
|
]
|
|
1078
1078
|
};
|
|
1079
1079
|
};
|
|
1080
|
-
function equals$
|
|
1080
|
+
function equals$d(existing, incoming) {
|
|
1081
1081
|
const existing_filetype = existing.filetype;
|
|
1082
1082
|
const incoming_filetype = incoming.filetype;
|
|
1083
1083
|
if (!(existing_filetype === incoming_filetype)) {
|
|
@@ -1113,7 +1113,7 @@ function equals$b(existing, incoming) {
|
|
|
1113
1113
|
if (!(existing_contentDocument === incoming_contentDocument
|
|
1114
1114
|
|| (existing_contentDocument != null &&
|
|
1115
1115
|
incoming_contentDocument != null &&
|
|
1116
|
-
equals$
|
|
1116
|
+
equals$e(existing_contentDocument, incoming_contentDocument)))) {
|
|
1117
1117
|
return false;
|
|
1118
1118
|
}
|
|
1119
1119
|
const existing_size = existing.size;
|
|
@@ -1138,41 +1138,41 @@ function equals$b(existing, incoming) {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
return true;
|
|
1140
1140
|
}
|
|
1141
|
-
const ingest$
|
|
1141
|
+
const ingest$c = function SlackFileOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1142
1142
|
if (process.env.NODE_ENV !== 'production') {
|
|
1143
|
-
const validateError = validate$
|
|
1143
|
+
const validateError = validate$d(input);
|
|
1144
1144
|
if (validateError !== null) {
|
|
1145
1145
|
throw validateError;
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
|
-
const key = keyBuilderFromType$
|
|
1148
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
1149
1149
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1150
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1150
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "Slack", VERSION$d, RepresentationType$d, equals$d);
|
|
1151
1151
|
return createLink(key);
|
|
1152
1152
|
};
|
|
1153
|
-
function getTypeCacheKeys$
|
|
1153
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
1154
1154
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1155
|
-
const rootKey = keyBuilderFromType$
|
|
1155
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
1156
1156
|
rootKeySet.set(rootKey, {
|
|
1157
1157
|
namespace: keyPrefix,
|
|
1158
|
-
representationName: RepresentationType$
|
|
1158
|
+
representationName: RepresentationType$d,
|
|
1159
1159
|
mergeable: false
|
|
1160
1160
|
});
|
|
1161
1161
|
}
|
|
1162
1162
|
|
|
1163
|
-
function select$
|
|
1164
|
-
return select$
|
|
1163
|
+
function select$o(luvio, params) {
|
|
1164
|
+
return select$p();
|
|
1165
1165
|
}
|
|
1166
|
-
function getResponseCacheKeys$
|
|
1167
|
-
getTypeCacheKeys$
|
|
1166
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
1167
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response);
|
|
1168
1168
|
}
|
|
1169
|
-
function ingestSuccess$
|
|
1169
|
+
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
1170
1170
|
const { body } = response;
|
|
1171
|
-
const key = keyBuilderFromType$
|
|
1172
|
-
luvio.storeIngest(key, ingest$
|
|
1171
|
+
const key = keyBuilderFromType$6(luvio, body);
|
|
1172
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
1173
1173
|
const snapshot = luvio.storeLookup({
|
|
1174
1174
|
recordId: key,
|
|
1175
|
-
node: select$
|
|
1175
|
+
node: select$o(),
|
|
1176
1176
|
variables: {},
|
|
1177
1177
|
});
|
|
1178
1178
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1183,7 +1183,7 @@ function ingestSuccess$a(luvio, resourceParams, response) {
|
|
|
1183
1183
|
deepFreeze(snapshot.data);
|
|
1184
1184
|
return snapshot;
|
|
1185
1185
|
}
|
|
1186
|
-
function createResourceRequest$
|
|
1186
|
+
function createResourceRequest$d(config) {
|
|
1187
1187
|
const headers = {};
|
|
1188
1188
|
return {
|
|
1189
1189
|
baseUri: '/services/data/v64.0',
|
|
@@ -1197,7 +1197,7 @@ function createResourceRequest$c(config) {
|
|
|
1197
1197
|
};
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
|
-
const adapterName$
|
|
1200
|
+
const adapterName$d = 'postSlackFile';
|
|
1201
1201
|
const postSlackFile_ConfigPropertyMetadata = [
|
|
1202
1202
|
generateParamConfigMetadata('appId', true, 2 /* Body */, 0 /* String */),
|
|
1203
1203
|
generateParamConfigMetadata('base64EncodedFileData', true, 2 /* Body */, 0 /* String */),
|
|
@@ -1209,11 +1209,11 @@ const postSlackFile_ConfigPropertyMetadata = [
|
|
|
1209
1209
|
generateParamConfigMetadata('threadTs', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1210
1210
|
generateParamConfigMetadata('title', true, 2 /* Body */, 0 /* String */),
|
|
1211
1211
|
];
|
|
1212
|
-
const postSlackFile_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1213
|
-
const createResourceParams$
|
|
1214
|
-
function typeCheckConfig$
|
|
1212
|
+
const postSlackFile_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, postSlackFile_ConfigPropertyMetadata);
|
|
1213
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$g(postSlackFile_ConfigPropertyMetadata);
|
|
1214
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
1215
1215
|
const config = {};
|
|
1216
|
-
typeCheckConfig$
|
|
1216
|
+
typeCheckConfig$g(untrustedConfig, config, postSlackFile_ConfigPropertyMetadata);
|
|
1217
1217
|
const untrustedConfig_threadTs = untrustedConfig.threadTs;
|
|
1218
1218
|
if (typeof untrustedConfig_threadTs === 'string') {
|
|
1219
1219
|
config.threadTs = untrustedConfig_threadTs;
|
|
@@ -1223,30 +1223,30 @@ function typeCheckConfig$c(untrustedConfig) {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
return config;
|
|
1225
1225
|
}
|
|
1226
|
-
function validateAdapterConfig$
|
|
1226
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
1227
1227
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1228
1228
|
return null;
|
|
1229
1229
|
}
|
|
1230
1230
|
if (process.env.NODE_ENV !== 'production') {
|
|
1231
1231
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1232
1232
|
}
|
|
1233
|
-
const config = typeCheckConfig$
|
|
1233
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
1234
1234
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1235
1235
|
return null;
|
|
1236
1236
|
}
|
|
1237
1237
|
return config;
|
|
1238
1238
|
}
|
|
1239
|
-
function buildNetworkSnapshot$
|
|
1240
|
-
const resourceParams = createResourceParams$
|
|
1241
|
-
const request = createResourceRequest$
|
|
1239
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
1240
|
+
const resourceParams = createResourceParams$d(config);
|
|
1241
|
+
const request = createResourceRequest$d(resourceParams);
|
|
1242
1242
|
return luvio.dispatchResourceRequest(request, options)
|
|
1243
1243
|
.then((response) => {
|
|
1244
1244
|
return luvio.handleSuccessResponse(() => {
|
|
1245
|
-
const snapshot = ingestSuccess$
|
|
1245
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response);
|
|
1246
1246
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1247
1247
|
}, () => {
|
|
1248
1248
|
const cache = new StoreKeyMap();
|
|
1249
|
-
getResponseCacheKeys$
|
|
1249
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
1250
1250
|
return cache;
|
|
1251
1251
|
});
|
|
1252
1252
|
}, (response) => {
|
|
@@ -1256,17 +1256,17 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
const postSlackFileAdapterFactory = (luvio) => {
|
|
1258
1258
|
return function postSlackFile(untrustedConfig) {
|
|
1259
|
-
const config = validateAdapterConfig$
|
|
1259
|
+
const config = validateAdapterConfig$d(untrustedConfig, postSlackFile_ConfigPropertyNames);
|
|
1260
1260
|
// Invalid or incomplete config
|
|
1261
1261
|
if (config === null) {
|
|
1262
1262
|
throw new Error('Invalid config for "postSlackFile"');
|
|
1263
1263
|
}
|
|
1264
|
-
return buildNetworkSnapshot$
|
|
1264
|
+
return buildNetworkSnapshot$d(luvio, config);
|
|
1265
1265
|
};
|
|
1266
1266
|
};
|
|
1267
1267
|
|
|
1268
|
-
const VERSION$
|
|
1269
|
-
function validate$
|
|
1268
|
+
const VERSION$c = "3f50a4365904d17e52e2980cf0e2dae1";
|
|
1269
|
+
function validate$c(obj, path = 'SlackEmojiOutputRepresentation') {
|
|
1270
1270
|
const v_error = (() => {
|
|
1271
1271
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1272
1272
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1389,10 +1389,10 @@ function validate$a(obj, path = 'SlackEmojiOutputRepresentation') {
|
|
|
1389
1389
|
})();
|
|
1390
1390
|
return v_error === undefined ? null : v_error;
|
|
1391
1391
|
}
|
|
1392
|
-
const select$
|
|
1392
|
+
const select$n = function SlackEmojiOutputRepresentationSelect() {
|
|
1393
1393
|
return {
|
|
1394
1394
|
kind: 'Fragment',
|
|
1395
|
-
version: VERSION$
|
|
1395
|
+
version: VERSION$c,
|
|
1396
1396
|
private: [],
|
|
1397
1397
|
selections: [
|
|
1398
1398
|
{
|
|
@@ -1421,7 +1421,7 @@ const select$k = function SlackEmojiOutputRepresentationSelect() {
|
|
|
1421
1421
|
]
|
|
1422
1422
|
};
|
|
1423
1423
|
};
|
|
1424
|
-
function equals$
|
|
1424
|
+
function equals$c(existing, incoming) {
|
|
1425
1425
|
const existing_name = existing.name;
|
|
1426
1426
|
const incoming_name = incoming.name;
|
|
1427
1427
|
if (!(existing_name === incoming_name)) {
|
|
@@ -1474,8 +1474,8 @@ function equals$a(existing, incoming) {
|
|
|
1474
1474
|
return true;
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
1477
|
-
const VERSION$
|
|
1478
|
-
function validate$
|
|
1477
|
+
const VERSION$b = "211c714365ce34ef733d04a962d56adf";
|
|
1478
|
+
function validate$b(obj, path = 'SlackUserInfoOutputRepresentation') {
|
|
1479
1479
|
const v_error = (() => {
|
|
1480
1480
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1481
1481
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1802,7 +1802,7 @@ function validate$9(obj, path = 'SlackUserInfoOutputRepresentation') {
|
|
|
1802
1802
|
const path_statusEmoji = path + '.statusEmoji';
|
|
1803
1803
|
let obj_statusEmoji_union0 = null;
|
|
1804
1804
|
const obj_statusEmoji_union0_error = (() => {
|
|
1805
|
-
const referencepath_statusEmojiValidationError = validate$
|
|
1805
|
+
const referencepath_statusEmojiValidationError = validate$c(obj_statusEmoji, path_statusEmoji);
|
|
1806
1806
|
if (referencepath_statusEmojiValidationError !== null) {
|
|
1807
1807
|
let message = 'Object doesn\'t match SlackEmojiOutputRepresentation (at "' + path_statusEmoji + '")\n';
|
|
1808
1808
|
message += referencepath_statusEmojiValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1864,24 +1864,24 @@ function validate$9(obj, path = 'SlackUserInfoOutputRepresentation') {
|
|
|
1864
1864
|
})();
|
|
1865
1865
|
return v_error === undefined ? null : v_error;
|
|
1866
1866
|
}
|
|
1867
|
-
const RepresentationType$
|
|
1868
|
-
function keyBuilder$
|
|
1869
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1867
|
+
const RepresentationType$c = 'SlackUserInfoOutputRepresentation';
|
|
1868
|
+
function keyBuilder$o(luvio, config) {
|
|
1869
|
+
return keyPrefix + '::' + RepresentationType$c + ':' + config.userId;
|
|
1870
1870
|
}
|
|
1871
|
-
function keyBuilderFromType$
|
|
1871
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
1872
1872
|
const keyParams = {
|
|
1873
1873
|
userId: object.slackUserId
|
|
1874
1874
|
};
|
|
1875
|
-
return keyBuilder$
|
|
1875
|
+
return keyBuilder$o(luvio, keyParams);
|
|
1876
1876
|
}
|
|
1877
|
-
function normalize$
|
|
1877
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
1878
1878
|
return input;
|
|
1879
1879
|
}
|
|
1880
|
-
const select$
|
|
1881
|
-
const { selections: SlackEmojiOutputRepresentation__selections, opaque: SlackEmojiOutputRepresentation__opaque, } = select$
|
|
1880
|
+
const select$m = function SlackUserInfoOutputRepresentationSelect() {
|
|
1881
|
+
const { selections: SlackEmojiOutputRepresentation__selections, opaque: SlackEmojiOutputRepresentation__opaque, } = select$n();
|
|
1882
1882
|
return {
|
|
1883
1883
|
kind: 'Fragment',
|
|
1884
|
-
version: VERSION$
|
|
1884
|
+
version: VERSION$b,
|
|
1885
1885
|
private: [],
|
|
1886
1886
|
selections: [
|
|
1887
1887
|
{
|
|
@@ -1967,7 +1967,7 @@ const select$j = function SlackUserInfoOutputRepresentationSelect() {
|
|
|
1967
1967
|
]
|
|
1968
1968
|
};
|
|
1969
1969
|
};
|
|
1970
|
-
function equals$
|
|
1970
|
+
function equals$b(existing, incoming) {
|
|
1971
1971
|
const existing_bot = existing.bot;
|
|
1972
1972
|
const incoming_bot = incoming.bot;
|
|
1973
1973
|
if (!(existing_bot === incoming_bot)) {
|
|
@@ -2119,7 +2119,7 @@ function equals$9(existing, incoming) {
|
|
|
2119
2119
|
if (!(existing_statusEmoji === incoming_statusEmoji
|
|
2120
2120
|
|| (existing_statusEmoji != null &&
|
|
2121
2121
|
incoming_statusEmoji != null &&
|
|
2122
|
-
equals$
|
|
2122
|
+
equals$c(existing_statusEmoji, incoming_statusEmoji)))) {
|
|
2123
2123
|
return false;
|
|
2124
2124
|
}
|
|
2125
2125
|
}
|
|
@@ -2138,31 +2138,31 @@ function equals$9(existing, incoming) {
|
|
|
2138
2138
|
}
|
|
2139
2139
|
return true;
|
|
2140
2140
|
}
|
|
2141
|
-
const ingest$
|
|
2141
|
+
const ingest$b = function SlackUserInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2142
2142
|
if (process.env.NODE_ENV !== 'production') {
|
|
2143
|
-
const validateError = validate$
|
|
2143
|
+
const validateError = validate$b(input);
|
|
2144
2144
|
if (validateError !== null) {
|
|
2145
2145
|
throw validateError;
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
|
-
const key = keyBuilderFromType$
|
|
2148
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
2149
2149
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2150
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2150
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "Slack", VERSION$b, RepresentationType$c, equals$b);
|
|
2151
2151
|
return createLink(key);
|
|
2152
2152
|
};
|
|
2153
|
-
function getTypeCacheKeys$
|
|
2153
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
2154
2154
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2155
|
-
const rootKey = keyBuilderFromType$
|
|
2155
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
2156
2156
|
rootKeySet.set(rootKey, {
|
|
2157
2157
|
namespace: keyPrefix,
|
|
2158
|
-
representationName: RepresentationType$
|
|
2158
|
+
representationName: RepresentationType$c,
|
|
2159
2159
|
mergeable: false
|
|
2160
2160
|
});
|
|
2161
2161
|
}
|
|
2162
2162
|
|
|
2163
2163
|
const TTL$3 = 100;
|
|
2164
|
-
const VERSION$
|
|
2165
|
-
function validate$
|
|
2164
|
+
const VERSION$a = "0d8f9b582f9edf68d990e24110571988";
|
|
2165
|
+
function validate$a(obj, path = 'SlackReactionOutputRepresentation') {
|
|
2166
2166
|
const v_error = (() => {
|
|
2167
2167
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2168
2168
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2327,25 +2327,25 @@ function validate$8(obj, path = 'SlackReactionOutputRepresentation') {
|
|
|
2327
2327
|
})();
|
|
2328
2328
|
return v_error === undefined ? null : v_error;
|
|
2329
2329
|
}
|
|
2330
|
-
const RepresentationType$
|
|
2331
|
-
function keyBuilder$
|
|
2332
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2330
|
+
const RepresentationType$b = 'SlackReactionOutputRepresentation';
|
|
2331
|
+
function keyBuilder$n(luvio, config) {
|
|
2332
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.messageTimestamp + ':' + config.name + ':' + (config.uniqueKey === null ? '' : config.uniqueKey);
|
|
2333
2333
|
}
|
|
2334
|
-
function keyBuilderFromType$
|
|
2334
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
2335
2335
|
const keyParams = {
|
|
2336
2336
|
messageTimestamp: object.messageTs,
|
|
2337
2337
|
name: object.name,
|
|
2338
2338
|
uniqueKey: object.uniqueKey
|
|
2339
2339
|
};
|
|
2340
|
-
return keyBuilder$
|
|
2340
|
+
return keyBuilder$n(luvio, keyParams);
|
|
2341
2341
|
}
|
|
2342
|
-
function normalize$
|
|
2342
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
2343
2343
|
const input_reactedUsers = input.reactedUsers;
|
|
2344
2344
|
const input_reactedUsers_id = path.fullPath + '__reactedUsers';
|
|
2345
2345
|
for (let i = 0; i < input_reactedUsers.length; i++) {
|
|
2346
2346
|
const input_reactedUsers_item = input_reactedUsers[i];
|
|
2347
2347
|
let input_reactedUsers_item_id = input_reactedUsers_id + '__' + i;
|
|
2348
|
-
input_reactedUsers[i] = ingest$
|
|
2348
|
+
input_reactedUsers[i] = ingest$b(input_reactedUsers_item, {
|
|
2349
2349
|
fullPath: input_reactedUsers_item_id,
|
|
2350
2350
|
propertyName: i,
|
|
2351
2351
|
parent: {
|
|
@@ -2358,10 +2358,10 @@ function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
return input;
|
|
2360
2360
|
}
|
|
2361
|
-
const select$
|
|
2361
|
+
const select$l = function SlackReactionOutputRepresentationSelect() {
|
|
2362
2362
|
return {
|
|
2363
2363
|
kind: 'Fragment',
|
|
2364
|
-
version: VERSION$
|
|
2364
|
+
version: VERSION$a,
|
|
2365
2365
|
private: [],
|
|
2366
2366
|
selections: [
|
|
2367
2367
|
{
|
|
@@ -2388,7 +2388,7 @@ const select$i = function SlackReactionOutputRepresentationSelect() {
|
|
|
2388
2388
|
name: 'reactedUsers',
|
|
2389
2389
|
kind: 'Link',
|
|
2390
2390
|
plural: true,
|
|
2391
|
-
fragment: select$
|
|
2391
|
+
fragment: select$m()
|
|
2392
2392
|
},
|
|
2393
2393
|
{
|
|
2394
2394
|
name: 'unicode',
|
|
@@ -2405,7 +2405,7 @@ const select$i = function SlackReactionOutputRepresentationSelect() {
|
|
|
2405
2405
|
]
|
|
2406
2406
|
};
|
|
2407
2407
|
};
|
|
2408
|
-
function equals$
|
|
2408
|
+
function equals$a(existing, incoming) {
|
|
2409
2409
|
const existing_hasUserReacted = existing.hasUserReacted;
|
|
2410
2410
|
const incoming_hasUserReacted = incoming.hasUserReacted;
|
|
2411
2411
|
if (!(existing_hasUserReacted === incoming_hasUserReacted)) {
|
|
@@ -2458,35 +2458,35 @@ function equals$8(existing, incoming) {
|
|
|
2458
2458
|
}
|
|
2459
2459
|
return true;
|
|
2460
2460
|
}
|
|
2461
|
-
const ingest$
|
|
2461
|
+
const ingest$a = function SlackReactionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2462
2462
|
if (process.env.NODE_ENV !== 'production') {
|
|
2463
|
-
const validateError = validate$
|
|
2463
|
+
const validateError = validate$a(input);
|
|
2464
2464
|
if (validateError !== null) {
|
|
2465
2465
|
throw validateError;
|
|
2466
2466
|
}
|
|
2467
2467
|
}
|
|
2468
|
-
const key = keyBuilderFromType$
|
|
2468
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
2469
2469
|
const ttlToUse = TTL$3;
|
|
2470
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2470
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "Slack", VERSION$a, RepresentationType$b, equals$a);
|
|
2471
2471
|
return createLink(key);
|
|
2472
2472
|
};
|
|
2473
|
-
function getTypeCacheKeys$
|
|
2473
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
2474
2474
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2475
|
-
const rootKey = keyBuilderFromType$
|
|
2475
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
2476
2476
|
rootKeySet.set(rootKey, {
|
|
2477
2477
|
namespace: keyPrefix,
|
|
2478
|
-
representationName: RepresentationType$
|
|
2478
|
+
representationName: RepresentationType$b,
|
|
2479
2479
|
mergeable: false
|
|
2480
2480
|
});
|
|
2481
2481
|
const input_reactedUsers_length = input.reactedUsers.length;
|
|
2482
2482
|
for (let i = 0; i < input_reactedUsers_length; i++) {
|
|
2483
|
-
getTypeCacheKeys$
|
|
2483
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.reactedUsers[i]);
|
|
2484
2484
|
}
|
|
2485
2485
|
}
|
|
2486
2486
|
|
|
2487
2487
|
const TTL$2 = 300;
|
|
2488
|
-
const VERSION$
|
|
2489
|
-
function validate$
|
|
2488
|
+
const VERSION$9 = "f13e32c2aedd6b70cf8a701ed37990b7";
|
|
2489
|
+
function validate$9(obj, path = 'SlackMessageOutputRepresentation') {
|
|
2490
2490
|
const v_error = (() => {
|
|
2491
2491
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2492
2492
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2867,23 +2867,23 @@ function validate$7(obj, path = 'SlackMessageOutputRepresentation') {
|
|
|
2867
2867
|
})();
|
|
2868
2868
|
return v_error === undefined ? null : v_error;
|
|
2869
2869
|
}
|
|
2870
|
-
const RepresentationType$
|
|
2871
|
-
function keyBuilder$
|
|
2872
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2870
|
+
const RepresentationType$a = 'SlackMessageOutputRepresentation';
|
|
2871
|
+
function keyBuilder$m(luvio, config) {
|
|
2872
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.messageTimestamp;
|
|
2873
2873
|
}
|
|
2874
|
-
function keyBuilderFromType$
|
|
2874
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
2875
2875
|
const keyParams = {
|
|
2876
2876
|
messageTimestamp: object.slackMessageTs
|
|
2877
2877
|
};
|
|
2878
|
-
return keyBuilder$
|
|
2878
|
+
return keyBuilder$m(luvio, keyParams);
|
|
2879
2879
|
}
|
|
2880
|
-
function normalize$
|
|
2880
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
2881
2881
|
const input_files = input.files;
|
|
2882
2882
|
const input_files_id = path.fullPath + '__files';
|
|
2883
2883
|
for (let i = 0; i < input_files.length; i++) {
|
|
2884
2884
|
const input_files_item = input_files[i];
|
|
2885
2885
|
let input_files_item_id = input_files_id + '__' + i;
|
|
2886
|
-
input_files[i] = ingest$
|
|
2886
|
+
input_files[i] = ingest$c(input_files_item, {
|
|
2887
2887
|
fullPath: input_files_item_id,
|
|
2888
2888
|
propertyName: i,
|
|
2889
2889
|
parent: {
|
|
@@ -2899,7 +2899,7 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
2899
2899
|
for (let i = 0; i < input_reactions.length; i++) {
|
|
2900
2900
|
const input_reactions_item = input_reactions[i];
|
|
2901
2901
|
let input_reactions_item_id = input_reactions_id + '__' + i;
|
|
2902
|
-
input_reactions[i] = ingest$
|
|
2902
|
+
input_reactions[i] = ingest$a(input_reactions_item, {
|
|
2903
2903
|
fullPath: input_reactions_item_id,
|
|
2904
2904
|
propertyName: i,
|
|
2905
2905
|
parent: {
|
|
@@ -2915,7 +2915,7 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
2915
2915
|
for (let i = 0; i < input_replyUsers.length; i++) {
|
|
2916
2916
|
const input_replyUsers_item = input_replyUsers[i];
|
|
2917
2917
|
let input_replyUsers_item_id = input_replyUsers_id + '__' + i;
|
|
2918
|
-
input_replyUsers[i] = ingest$
|
|
2918
|
+
input_replyUsers[i] = ingest$b(input_replyUsers_item, {
|
|
2919
2919
|
fullPath: input_replyUsers_item_id,
|
|
2920
2920
|
propertyName: i,
|
|
2921
2921
|
parent: {
|
|
@@ -2928,7 +2928,7 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
2928
2928
|
}
|
|
2929
2929
|
const input_userInfo = input.userInfo;
|
|
2930
2930
|
const input_userInfo_id = path.fullPath + '__userInfo';
|
|
2931
|
-
input.userInfo = ingest$
|
|
2931
|
+
input.userInfo = ingest$b(input_userInfo, {
|
|
2932
2932
|
fullPath: input_userInfo_id,
|
|
2933
2933
|
propertyName: 'userInfo',
|
|
2934
2934
|
parent: {
|
|
@@ -2940,10 +2940,10 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
2940
2940
|
}, luvio, store, timestamp);
|
|
2941
2941
|
return input;
|
|
2942
2942
|
}
|
|
2943
|
-
const select$
|
|
2943
|
+
const select$k = function SlackMessageOutputRepresentationSelect() {
|
|
2944
2944
|
return {
|
|
2945
2945
|
kind: 'Fragment',
|
|
2946
|
-
version: VERSION$
|
|
2946
|
+
version: VERSION$9,
|
|
2947
2947
|
private: [],
|
|
2948
2948
|
selections: [
|
|
2949
2949
|
{
|
|
@@ -2962,7 +2962,7 @@ const select$h = function SlackMessageOutputRepresentationSelect() {
|
|
|
2962
2962
|
name: 'files',
|
|
2963
2963
|
kind: 'Link',
|
|
2964
2964
|
plural: true,
|
|
2965
|
-
fragment: select$
|
|
2965
|
+
fragment: select$p()
|
|
2966
2966
|
},
|
|
2967
2967
|
{
|
|
2968
2968
|
name: 'includesCustomEmoji',
|
|
@@ -3004,7 +3004,7 @@ const select$h = function SlackMessageOutputRepresentationSelect() {
|
|
|
3004
3004
|
name: 'reactions',
|
|
3005
3005
|
kind: 'Link',
|
|
3006
3006
|
plural: true,
|
|
3007
|
-
fragment: select$
|
|
3007
|
+
fragment: select$l()
|
|
3008
3008
|
},
|
|
3009
3009
|
{
|
|
3010
3010
|
name: 'replyCount',
|
|
@@ -3014,7 +3014,7 @@ const select$h = function SlackMessageOutputRepresentationSelect() {
|
|
|
3014
3014
|
name: 'replyUsers',
|
|
3015
3015
|
kind: 'Link',
|
|
3016
3016
|
plural: true,
|
|
3017
|
-
fragment: select$
|
|
3017
|
+
fragment: select$m()
|
|
3018
3018
|
},
|
|
3019
3019
|
{
|
|
3020
3020
|
name: 'replyUsersCount',
|
|
@@ -3051,12 +3051,12 @@ const select$h = function SlackMessageOutputRepresentationSelect() {
|
|
|
3051
3051
|
{
|
|
3052
3052
|
name: 'userInfo',
|
|
3053
3053
|
kind: 'Link',
|
|
3054
|
-
fragment: select$
|
|
3054
|
+
fragment: select$m()
|
|
3055
3055
|
}
|
|
3056
3056
|
]
|
|
3057
3057
|
};
|
|
3058
3058
|
};
|
|
3059
|
-
function equals$
|
|
3059
|
+
function equals$9(existing, incoming) {
|
|
3060
3060
|
const existing_isEditable = existing.isEditable;
|
|
3061
3061
|
const incoming_isEditable = incoming.isEditable;
|
|
3062
3062
|
if (!(existing_isEditable === incoming_isEditable)) {
|
|
@@ -3199,43 +3199,43 @@ function equals$7(existing, incoming) {
|
|
|
3199
3199
|
}
|
|
3200
3200
|
return true;
|
|
3201
3201
|
}
|
|
3202
|
-
const ingest$
|
|
3202
|
+
const ingest$9 = function SlackMessageOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3203
3203
|
if (process.env.NODE_ENV !== 'production') {
|
|
3204
|
-
const validateError = validate$
|
|
3204
|
+
const validateError = validate$9(input);
|
|
3205
3205
|
if (validateError !== null) {
|
|
3206
3206
|
throw validateError;
|
|
3207
3207
|
}
|
|
3208
3208
|
}
|
|
3209
|
-
const key = keyBuilderFromType$
|
|
3209
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
3210
3210
|
const ttlToUse = TTL$2;
|
|
3211
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3211
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "Slack", VERSION$9, RepresentationType$a, equals$9);
|
|
3212
3212
|
return createLink(key);
|
|
3213
3213
|
};
|
|
3214
|
-
function getTypeCacheKeys$
|
|
3214
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
3215
3215
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3216
|
-
const rootKey = keyBuilderFromType$
|
|
3216
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
3217
3217
|
rootKeySet.set(rootKey, {
|
|
3218
3218
|
namespace: keyPrefix,
|
|
3219
|
-
representationName: RepresentationType$
|
|
3219
|
+
representationName: RepresentationType$a,
|
|
3220
3220
|
mergeable: false
|
|
3221
3221
|
});
|
|
3222
3222
|
const input_files_length = input.files.length;
|
|
3223
3223
|
for (let i = 0; i < input_files_length; i++) {
|
|
3224
|
-
getTypeCacheKeys$
|
|
3224
|
+
getTypeCacheKeys$c(rootKeySet, luvio, input.files[i]);
|
|
3225
3225
|
}
|
|
3226
3226
|
const input_reactions_length = input.reactions.length;
|
|
3227
3227
|
for (let i = 0; i < input_reactions_length; i++) {
|
|
3228
|
-
getTypeCacheKeys$
|
|
3228
|
+
getTypeCacheKeys$a(rootKeySet, luvio, input.reactions[i]);
|
|
3229
3229
|
}
|
|
3230
3230
|
const input_replyUsers_length = input.replyUsers.length;
|
|
3231
3231
|
for (let i = 0; i < input_replyUsers_length; i++) {
|
|
3232
|
-
getTypeCacheKeys$
|
|
3232
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.replyUsers[i]);
|
|
3233
3233
|
}
|
|
3234
|
-
getTypeCacheKeys$
|
|
3234
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.userInfo);
|
|
3235
3235
|
}
|
|
3236
3236
|
|
|
3237
|
-
const VERSION$
|
|
3238
|
-
function validate$
|
|
3237
|
+
const VERSION$8 = "54b71fa43b81f03c9bf835539e0bdefc";
|
|
3238
|
+
function validate$8(obj, path = 'SlackConversationOutputRepresentation') {
|
|
3239
3239
|
const v_error = (() => {
|
|
3240
3240
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3241
3241
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3379,11 +3379,11 @@ function validate$6(obj, path = 'SlackConversationOutputRepresentation') {
|
|
|
3379
3379
|
})();
|
|
3380
3380
|
return v_error === undefined ? null : v_error;
|
|
3381
3381
|
}
|
|
3382
|
-
const RepresentationType$
|
|
3383
|
-
function normalize$
|
|
3382
|
+
const RepresentationType$9 = 'SlackConversationOutputRepresentation';
|
|
3383
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
3384
3384
|
const input_contextUserInfo = input.contextUserInfo;
|
|
3385
3385
|
const input_contextUserInfo_id = path.fullPath + '__contextUserInfo';
|
|
3386
|
-
input.contextUserInfo = ingest$
|
|
3386
|
+
input.contextUserInfo = ingest$b(input_contextUserInfo, {
|
|
3387
3387
|
fullPath: input_contextUserInfo_id,
|
|
3388
3388
|
propertyName: 'contextUserInfo',
|
|
3389
3389
|
parent: {
|
|
@@ -3398,7 +3398,7 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
|
3398
3398
|
for (let i = 0; i < input_messages.length; i++) {
|
|
3399
3399
|
const input_messages_item = input_messages[i];
|
|
3400
3400
|
let input_messages_item_id = input_messages_id + '__' + i;
|
|
3401
|
-
input_messages[i] = ingest$
|
|
3401
|
+
input_messages[i] = ingest$9(input_messages_item, {
|
|
3402
3402
|
fullPath: input_messages_item_id,
|
|
3403
3403
|
propertyName: i,
|
|
3404
3404
|
parent: {
|
|
@@ -3411,10 +3411,10 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
|
3411
3411
|
}
|
|
3412
3412
|
return input;
|
|
3413
3413
|
}
|
|
3414
|
-
const select$
|
|
3414
|
+
const select$j = function SlackConversationOutputRepresentationSelect() {
|
|
3415
3415
|
return {
|
|
3416
3416
|
kind: 'Fragment',
|
|
3417
|
-
version: VERSION$
|
|
3417
|
+
version: VERSION$8,
|
|
3418
3418
|
private: [],
|
|
3419
3419
|
selections: [
|
|
3420
3420
|
{
|
|
@@ -3428,7 +3428,7 @@ const select$g = function SlackConversationOutputRepresentationSelect() {
|
|
|
3428
3428
|
{
|
|
3429
3429
|
name: 'contextUserInfo',
|
|
3430
3430
|
kind: 'Link',
|
|
3431
|
-
fragment: select$
|
|
3431
|
+
fragment: select$m()
|
|
3432
3432
|
},
|
|
3433
3433
|
{
|
|
3434
3434
|
name: 'hasMore',
|
|
@@ -3442,7 +3442,7 @@ const select$g = function SlackConversationOutputRepresentationSelect() {
|
|
|
3442
3442
|
name: 'messages',
|
|
3443
3443
|
kind: 'Link',
|
|
3444
3444
|
plural: true,
|
|
3445
|
-
fragment: select$
|
|
3445
|
+
fragment: select$k()
|
|
3446
3446
|
},
|
|
3447
3447
|
{
|
|
3448
3448
|
name: 'oldestMessageTs',
|
|
@@ -3459,7 +3459,7 @@ const select$g = function SlackConversationOutputRepresentationSelect() {
|
|
|
3459
3459
|
]
|
|
3460
3460
|
};
|
|
3461
3461
|
};
|
|
3462
|
-
function equals$
|
|
3462
|
+
function equals$8(existing, incoming) {
|
|
3463
3463
|
const existing_appId = existing.appId;
|
|
3464
3464
|
const incoming_appId = incoming.appId;
|
|
3465
3465
|
if (!(existing_appId === incoming_appId)) {
|
|
@@ -3512,49 +3512,49 @@ function equals$6(existing, incoming) {
|
|
|
3512
3512
|
}
|
|
3513
3513
|
return true;
|
|
3514
3514
|
}
|
|
3515
|
-
const ingest$
|
|
3515
|
+
const ingest$8 = function SlackConversationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3516
3516
|
if (process.env.NODE_ENV !== 'production') {
|
|
3517
|
-
const validateError = validate$
|
|
3517
|
+
const validateError = validate$8(input);
|
|
3518
3518
|
if (validateError !== null) {
|
|
3519
3519
|
throw validateError;
|
|
3520
3520
|
}
|
|
3521
3521
|
}
|
|
3522
3522
|
const key = path.fullPath;
|
|
3523
3523
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
3524
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3524
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "Slack", VERSION$8, RepresentationType$9, equals$8);
|
|
3525
3525
|
return createLink(key);
|
|
3526
3526
|
};
|
|
3527
|
-
function getTypeCacheKeys$
|
|
3527
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
3528
3528
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3529
3529
|
const rootKey = fullPathFactory();
|
|
3530
3530
|
rootKeySet.set(rootKey, {
|
|
3531
3531
|
namespace: keyPrefix,
|
|
3532
|
-
representationName: RepresentationType$
|
|
3532
|
+
representationName: RepresentationType$9,
|
|
3533
3533
|
mergeable: false
|
|
3534
3534
|
});
|
|
3535
|
-
getTypeCacheKeys$
|
|
3535
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.contextUserInfo);
|
|
3536
3536
|
const input_messages_length = input.messages.length;
|
|
3537
3537
|
for (let i = 0; i < input_messages_length; i++) {
|
|
3538
|
-
getTypeCacheKeys$
|
|
3538
|
+
getTypeCacheKeys$9(rootKeySet, luvio, input.messages[i]);
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
3541
|
|
|
3542
|
-
function select$
|
|
3543
|
-
return select$
|
|
3542
|
+
function select$i(luvio, params) {
|
|
3543
|
+
return select$j();
|
|
3544
3544
|
}
|
|
3545
|
-
function keyBuilder$
|
|
3545
|
+
function keyBuilder$l(luvio, params) {
|
|
3546
3546
|
return keyPrefix + '::SlackConversationOutputRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'channelId:' + params.queryParams.channelId + ',' + 'latestMessageTs:' + params.queryParams.latestMessageTs + ',' + 'limit:' + params.queryParams.limit + ',' + 'parentMessageTs:' + params.queryParams.parentMessageTs + ',' + 'relatedRecordId:' + params.queryParams.relatedRecordId + ',' + 'teamId:' + params.queryParams.teamId + ')';
|
|
3547
3547
|
}
|
|
3548
|
-
function getResponseCacheKeys$
|
|
3549
|
-
getTypeCacheKeys$
|
|
3548
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
3549
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$l(luvio, resourceParams));
|
|
3550
3550
|
}
|
|
3551
|
-
function ingestSuccess$
|
|
3551
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
3552
3552
|
const { body } = response;
|
|
3553
|
-
const key = keyBuilder$
|
|
3554
|
-
luvio.storeIngest(key, ingest$
|
|
3553
|
+
const key = keyBuilder$l(luvio, resourceParams);
|
|
3554
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
3555
3555
|
const snapshot = luvio.storeLookup({
|
|
3556
3556
|
recordId: key,
|
|
3557
|
-
node: select$
|
|
3557
|
+
node: select$i(),
|
|
3558
3558
|
variables: {},
|
|
3559
3559
|
}, snapshotRefresh);
|
|
3560
3560
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3565,13 +3565,13 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3565
3565
|
deepFreeze(snapshot.data);
|
|
3566
3566
|
return snapshot;
|
|
3567
3567
|
}
|
|
3568
|
-
function ingestError$
|
|
3569
|
-
const key = keyBuilder$
|
|
3568
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
3569
|
+
const key = keyBuilder$l(luvio, params);
|
|
3570
3570
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3571
3571
|
luvio.storeIngestError(key, errorSnapshot);
|
|
3572
3572
|
return errorSnapshot;
|
|
3573
3573
|
}
|
|
3574
|
-
function createResourceRequest$
|
|
3574
|
+
function createResourceRequest$c(config) {
|
|
3575
3575
|
const headers = {};
|
|
3576
3576
|
return {
|
|
3577
3577
|
baseUri: '/services/data/v64.0',
|
|
@@ -3585,7 +3585,7 @@ function createResourceRequest$b(config) {
|
|
|
3585
3585
|
};
|
|
3586
3586
|
}
|
|
3587
3587
|
|
|
3588
|
-
const adapterName$
|
|
3588
|
+
const adapterName$c = 'getSlackConversation';
|
|
3589
3589
|
const getSlackConversation_ConfigPropertyMetadata = [
|
|
3590
3590
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3591
3591
|
generateParamConfigMetadata('channelId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -3595,91 +3595,91 @@ const getSlackConversation_ConfigPropertyMetadata = [
|
|
|
3595
3595
|
generateParamConfigMetadata('relatedRecordId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3596
3596
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3597
3597
|
];
|
|
3598
|
-
const getSlackConversation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3599
|
-
const createResourceParams$
|
|
3600
|
-
function keyBuilder$
|
|
3601
|
-
const resourceParams = createResourceParams$
|
|
3602
|
-
return keyBuilder$
|
|
3598
|
+
const getSlackConversation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getSlackConversation_ConfigPropertyMetadata);
|
|
3599
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$g(getSlackConversation_ConfigPropertyMetadata);
|
|
3600
|
+
function keyBuilder$k(luvio, config) {
|
|
3601
|
+
const resourceParams = createResourceParams$c(config);
|
|
3602
|
+
return keyBuilder$l(luvio, resourceParams);
|
|
3603
3603
|
}
|
|
3604
|
-
function typeCheckConfig$
|
|
3604
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
3605
3605
|
const config = {};
|
|
3606
|
-
typeCheckConfig$
|
|
3606
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackConversation_ConfigPropertyMetadata);
|
|
3607
3607
|
return config;
|
|
3608
3608
|
}
|
|
3609
|
-
function validateAdapterConfig$
|
|
3609
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
3610
3610
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3611
3611
|
return null;
|
|
3612
3612
|
}
|
|
3613
3613
|
if (process.env.NODE_ENV !== 'production') {
|
|
3614
3614
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3615
3615
|
}
|
|
3616
|
-
const config = typeCheckConfig$
|
|
3616
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
3617
3617
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3618
3618
|
return null;
|
|
3619
3619
|
}
|
|
3620
3620
|
return config;
|
|
3621
3621
|
}
|
|
3622
|
-
function adapterFragment$
|
|
3623
|
-
createResourceParams$
|
|
3624
|
-
return select$
|
|
3622
|
+
function adapterFragment$7(luvio, config) {
|
|
3623
|
+
createResourceParams$c(config);
|
|
3624
|
+
return select$i();
|
|
3625
3625
|
}
|
|
3626
|
-
function onFetchResponseSuccess$
|
|
3627
|
-
const snapshot = ingestSuccess$
|
|
3626
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
3627
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
3628
3628
|
config,
|
|
3629
|
-
resolve: () => buildNetworkSnapshot$
|
|
3629
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3630
3630
|
});
|
|
3631
3631
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3632
3632
|
}
|
|
3633
|
-
function onFetchResponseError$
|
|
3634
|
-
const snapshot = ingestError$
|
|
3633
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
3634
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
3635
3635
|
config,
|
|
3636
|
-
resolve: () => buildNetworkSnapshot$
|
|
3636
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3637
3637
|
});
|
|
3638
3638
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3639
3639
|
}
|
|
3640
|
-
function buildNetworkSnapshot$
|
|
3641
|
-
const resourceParams = createResourceParams$
|
|
3642
|
-
const request = createResourceRequest$
|
|
3640
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
3641
|
+
const resourceParams = createResourceParams$c(config);
|
|
3642
|
+
const request = createResourceRequest$c(resourceParams);
|
|
3643
3643
|
return luvio.dispatchResourceRequest(request, options)
|
|
3644
3644
|
.then((response) => {
|
|
3645
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3645
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
3646
3646
|
const cache = new StoreKeyMap();
|
|
3647
|
-
getResponseCacheKeys$
|
|
3647
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
3648
3648
|
return cache;
|
|
3649
3649
|
});
|
|
3650
3650
|
}, (response) => {
|
|
3651
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3651
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
3652
3652
|
});
|
|
3653
3653
|
}
|
|
3654
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3655
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3654
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
3655
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
3656
3656
|
}
|
|
3657
|
-
function buildCachedSnapshotCachePolicy$
|
|
3657
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
3658
3658
|
const { luvio, config } = context;
|
|
3659
3659
|
const selector = {
|
|
3660
|
-
recordId: keyBuilder$
|
|
3661
|
-
node: adapterFragment$
|
|
3660
|
+
recordId: keyBuilder$k(luvio, config),
|
|
3661
|
+
node: adapterFragment$7(luvio, config),
|
|
3662
3662
|
variables: {},
|
|
3663
3663
|
};
|
|
3664
3664
|
const cacheSnapshot = storeLookup(selector, {
|
|
3665
3665
|
config,
|
|
3666
|
-
resolve: () => buildNetworkSnapshot$
|
|
3666
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3667
3667
|
});
|
|
3668
3668
|
return cacheSnapshot;
|
|
3669
3669
|
}
|
|
3670
3670
|
const getSlackConversationAdapterFactory = (luvio) => function Slack__getSlackConversation(untrustedConfig, requestContext) {
|
|
3671
|
-
const config = validateAdapterConfig$
|
|
3671
|
+
const config = validateAdapterConfig$c(untrustedConfig, getSlackConversation_ConfigPropertyNames);
|
|
3672
3672
|
// Invalid or incomplete config
|
|
3673
3673
|
if (config === null) {
|
|
3674
3674
|
return null;
|
|
3675
3675
|
}
|
|
3676
3676
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3677
|
-
buildCachedSnapshotCachePolicy$
|
|
3677
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
3678
3678
|
};
|
|
3679
3679
|
|
|
3680
3680
|
const TTL$1 = 300;
|
|
3681
|
-
const VERSION$
|
|
3682
|
-
function validate$
|
|
3681
|
+
const VERSION$7 = "3fbe2a2b782a04407aa59b540ea5c4ba";
|
|
3682
|
+
function validate$7(obj, path = 'SlackPostMessageOutputRepresentation') {
|
|
3683
3683
|
const v_error = (() => {
|
|
3684
3684
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3685
3685
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3702,21 +3702,21 @@ function validate$5(obj, path = 'SlackPostMessageOutputRepresentation') {
|
|
|
3702
3702
|
})();
|
|
3703
3703
|
return v_error === undefined ? null : v_error;
|
|
3704
3704
|
}
|
|
3705
|
-
const RepresentationType$
|
|
3706
|
-
function keyBuilder$
|
|
3707
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3705
|
+
const RepresentationType$8 = 'SlackPostMessageOutputRepresentation';
|
|
3706
|
+
function keyBuilder$j(luvio, config) {
|
|
3707
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.channelId + ':' + config.timestamp;
|
|
3708
3708
|
}
|
|
3709
|
-
function keyBuilderFromType$
|
|
3709
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
3710
3710
|
const keyParams = {
|
|
3711
3711
|
channelId: object.channelId,
|
|
3712
3712
|
timestamp: object.timestamp
|
|
3713
3713
|
};
|
|
3714
|
-
return keyBuilder$
|
|
3714
|
+
return keyBuilder$j(luvio, keyParams);
|
|
3715
3715
|
}
|
|
3716
|
-
function normalize$
|
|
3716
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
3717
3717
|
const input_postedMessage = input.postedMessage;
|
|
3718
3718
|
const input_postedMessage_id = path.fullPath + '__postedMessage';
|
|
3719
|
-
input.postedMessage = ingest$
|
|
3719
|
+
input.postedMessage = ingest$9(input_postedMessage, {
|
|
3720
3720
|
fullPath: input_postedMessage_id,
|
|
3721
3721
|
propertyName: 'postedMessage',
|
|
3722
3722
|
parent: {
|
|
@@ -3728,10 +3728,10 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
3728
3728
|
}, luvio, store, timestamp);
|
|
3729
3729
|
return input;
|
|
3730
3730
|
}
|
|
3731
|
-
const select$
|
|
3731
|
+
const select$h = function SlackPostMessageOutputRepresentationSelect() {
|
|
3732
3732
|
return {
|
|
3733
3733
|
kind: 'Fragment',
|
|
3734
|
-
version: VERSION$
|
|
3734
|
+
version: VERSION$7,
|
|
3735
3735
|
private: [],
|
|
3736
3736
|
selections: [
|
|
3737
3737
|
{
|
|
@@ -3741,7 +3741,7 @@ const select$e = function SlackPostMessageOutputRepresentationSelect() {
|
|
|
3741
3741
|
{
|
|
3742
3742
|
name: 'postedMessage',
|
|
3743
3743
|
kind: 'Link',
|
|
3744
|
-
fragment: select$
|
|
3744
|
+
fragment: select$k()
|
|
3745
3745
|
},
|
|
3746
3746
|
{
|
|
3747
3747
|
name: 'timestamp',
|
|
@@ -3750,7 +3750,7 @@ const select$e = function SlackPostMessageOutputRepresentationSelect() {
|
|
|
3750
3750
|
]
|
|
3751
3751
|
};
|
|
3752
3752
|
};
|
|
3753
|
-
function equals$
|
|
3753
|
+
function equals$7(existing, incoming) {
|
|
3754
3754
|
const existing_channelId = existing.channelId;
|
|
3755
3755
|
const incoming_channelId = incoming.channelId;
|
|
3756
3756
|
if (!(existing_channelId === incoming_channelId)) {
|
|
@@ -3768,42 +3768,42 @@ function equals$5(existing, incoming) {
|
|
|
3768
3768
|
}
|
|
3769
3769
|
return true;
|
|
3770
3770
|
}
|
|
3771
|
-
const ingest$
|
|
3771
|
+
const ingest$7 = function SlackPostMessageOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3772
3772
|
if (process.env.NODE_ENV !== 'production') {
|
|
3773
|
-
const validateError = validate$
|
|
3773
|
+
const validateError = validate$7(input);
|
|
3774
3774
|
if (validateError !== null) {
|
|
3775
3775
|
throw validateError;
|
|
3776
3776
|
}
|
|
3777
3777
|
}
|
|
3778
|
-
const key = keyBuilderFromType$
|
|
3778
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
3779
3779
|
const ttlToUse = TTL$1;
|
|
3780
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3780
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "Slack", VERSION$7, RepresentationType$8, equals$7);
|
|
3781
3781
|
return createLink(key);
|
|
3782
3782
|
};
|
|
3783
|
-
function getTypeCacheKeys$
|
|
3783
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
3784
3784
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3785
|
-
const rootKey = keyBuilderFromType$
|
|
3785
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
3786
3786
|
rootKeySet.set(rootKey, {
|
|
3787
3787
|
namespace: keyPrefix,
|
|
3788
|
-
representationName: RepresentationType$
|
|
3788
|
+
representationName: RepresentationType$8,
|
|
3789
3789
|
mergeable: false
|
|
3790
3790
|
});
|
|
3791
|
-
getTypeCacheKeys$
|
|
3791
|
+
getTypeCacheKeys$9(rootKeySet, luvio, input.postedMessage);
|
|
3792
3792
|
}
|
|
3793
3793
|
|
|
3794
|
-
function select$
|
|
3795
|
-
return select$
|
|
3794
|
+
function select$g(luvio, params) {
|
|
3795
|
+
return select$h();
|
|
3796
3796
|
}
|
|
3797
|
-
function getResponseCacheKeys$
|
|
3798
|
-
getTypeCacheKeys$
|
|
3797
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
3798
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
3799
3799
|
}
|
|
3800
|
-
function ingestSuccess$
|
|
3800
|
+
function ingestSuccess$9(luvio, resourceParams, response) {
|
|
3801
3801
|
const { body } = response;
|
|
3802
|
-
const key = keyBuilderFromType$
|
|
3803
|
-
luvio.storeIngest(key, ingest$
|
|
3802
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
3803
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3804
3804
|
const snapshot = luvio.storeLookup({
|
|
3805
3805
|
recordId: key,
|
|
3806
|
-
node: select$
|
|
3806
|
+
node: select$g(),
|
|
3807
3807
|
variables: {},
|
|
3808
3808
|
});
|
|
3809
3809
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3814,7 +3814,7 @@ function ingestSuccess$8(luvio, resourceParams, response) {
|
|
|
3814
3814
|
deepFreeze(snapshot.data);
|
|
3815
3815
|
return snapshot;
|
|
3816
3816
|
}
|
|
3817
|
-
function createResourceRequest$
|
|
3817
|
+
function createResourceRequest$b(config) {
|
|
3818
3818
|
const headers = {};
|
|
3819
3819
|
return {
|
|
3820
3820
|
baseUri: '/services/data/v64.0',
|
|
@@ -3828,7 +3828,7 @@ function createResourceRequest$a(config) {
|
|
|
3828
3828
|
};
|
|
3829
3829
|
}
|
|
3830
3830
|
|
|
3831
|
-
const adapterName$
|
|
3831
|
+
const adapterName$b = 'postSlackConversation';
|
|
3832
3832
|
const postSlackConversation_ConfigPropertyMetadata = [
|
|
3833
3833
|
generateParamConfigMetadata('appId', true, 2 /* Body */, 0 /* String */),
|
|
3834
3834
|
generateParamConfigMetadata('channelId', true, 2 /* Body */, 0 /* String */),
|
|
@@ -3838,11 +3838,11 @@ const postSlackConversation_ConfigPropertyMetadata = [
|
|
|
3838
3838
|
generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
|
|
3839
3839
|
generateParamConfigMetadata('threadTs', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3840
3840
|
];
|
|
3841
|
-
const postSlackConversation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3842
|
-
const createResourceParams$
|
|
3843
|
-
function typeCheckConfig$
|
|
3841
|
+
const postSlackConversation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, postSlackConversation_ConfigPropertyMetadata);
|
|
3842
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$g(postSlackConversation_ConfigPropertyMetadata);
|
|
3843
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
3844
3844
|
const config = {};
|
|
3845
|
-
typeCheckConfig$
|
|
3845
|
+
typeCheckConfig$g(untrustedConfig, config, postSlackConversation_ConfigPropertyMetadata);
|
|
3846
3846
|
const untrustedConfig_threadTs = untrustedConfig.threadTs;
|
|
3847
3847
|
if (typeof untrustedConfig_threadTs === 'string') {
|
|
3848
3848
|
config.threadTs = untrustedConfig_threadTs;
|
|
@@ -3852,30 +3852,30 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
3852
3852
|
}
|
|
3853
3853
|
return config;
|
|
3854
3854
|
}
|
|
3855
|
-
function validateAdapterConfig$
|
|
3855
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
3856
3856
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3857
3857
|
return null;
|
|
3858
3858
|
}
|
|
3859
3859
|
if (process.env.NODE_ENV !== 'production') {
|
|
3860
3860
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3861
3861
|
}
|
|
3862
|
-
const config = typeCheckConfig$
|
|
3862
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
3863
3863
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3864
3864
|
return null;
|
|
3865
3865
|
}
|
|
3866
3866
|
return config;
|
|
3867
3867
|
}
|
|
3868
|
-
function buildNetworkSnapshot$
|
|
3869
|
-
const resourceParams = createResourceParams$
|
|
3870
|
-
const request = createResourceRequest$
|
|
3868
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
3869
|
+
const resourceParams = createResourceParams$b(config);
|
|
3870
|
+
const request = createResourceRequest$b(resourceParams);
|
|
3871
3871
|
return luvio.dispatchResourceRequest(request, options)
|
|
3872
3872
|
.then((response) => {
|
|
3873
3873
|
return luvio.handleSuccessResponse(() => {
|
|
3874
|
-
const snapshot = ingestSuccess$
|
|
3874
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response);
|
|
3875
3875
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3876
3876
|
}, () => {
|
|
3877
3877
|
const cache = new StoreKeyMap();
|
|
3878
|
-
getResponseCacheKeys$
|
|
3878
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
3879
3879
|
return cache;
|
|
3880
3880
|
});
|
|
3881
3881
|
}, (response) => {
|
|
@@ -3885,33 +3885,33 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
3885
3885
|
}
|
|
3886
3886
|
const postSlackConversationAdapterFactory = (luvio) => {
|
|
3887
3887
|
return function postSlackConversation(untrustedConfig) {
|
|
3888
|
-
const config = validateAdapterConfig$
|
|
3888
|
+
const config = validateAdapterConfig$b(untrustedConfig, postSlackConversation_ConfigPropertyNames);
|
|
3889
3889
|
// Invalid or incomplete config
|
|
3890
3890
|
if (config === null) {
|
|
3891
3891
|
throw new Error('Invalid config for "postSlackConversation"');
|
|
3892
3892
|
}
|
|
3893
|
-
return buildNetworkSnapshot$
|
|
3893
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
3894
3894
|
};
|
|
3895
3895
|
};
|
|
3896
3896
|
|
|
3897
|
-
function keyBuilder$
|
|
3898
|
-
return keyBuilder$
|
|
3897
|
+
function keyBuilder$i(luvio, params) {
|
|
3898
|
+
return keyBuilder$m(luvio, {
|
|
3899
3899
|
messageTimestamp: params.urlParams.messageTimestamp
|
|
3900
3900
|
});
|
|
3901
3901
|
}
|
|
3902
|
-
function getResponseCacheKeys$
|
|
3903
|
-
const key = keyBuilder$
|
|
3902
|
+
function getResponseCacheKeys$a(cacheKeyMap, luvio, resourceParams) {
|
|
3903
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
3904
3904
|
cacheKeyMap.set(key, {
|
|
3905
3905
|
namespace: keyPrefix,
|
|
3906
|
-
representationName: RepresentationType$
|
|
3906
|
+
representationName: RepresentationType$a,
|
|
3907
3907
|
mergeable: false
|
|
3908
3908
|
});
|
|
3909
3909
|
}
|
|
3910
3910
|
function evictSuccess$1(luvio, resourceParams) {
|
|
3911
|
-
const key = keyBuilder$
|
|
3911
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
3912
3912
|
luvio.storeEvict(key);
|
|
3913
3913
|
}
|
|
3914
|
-
function createResourceRequest$
|
|
3914
|
+
function createResourceRequest$a(config) {
|
|
3915
3915
|
const headers = {};
|
|
3916
3916
|
return {
|
|
3917
3917
|
baseUri: '/services/data/v64.0',
|
|
@@ -3925,36 +3925,36 @@ function createResourceRequest$9(config) {
|
|
|
3925
3925
|
};
|
|
3926
3926
|
}
|
|
3927
3927
|
|
|
3928
|
-
const adapterName$
|
|
3928
|
+
const adapterName$a = 'deleteSlackMessage';
|
|
3929
3929
|
const deleteSlackMessage_ConfigPropertyMetadata = [
|
|
3930
3930
|
generateParamConfigMetadata('messageTimestamp', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3931
3931
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3932
3932
|
generateParamConfigMetadata('channelId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3933
3933
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3934
3934
|
];
|
|
3935
|
-
const deleteSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3936
|
-
const createResourceParams$
|
|
3937
|
-
function typeCheckConfig$
|
|
3935
|
+
const deleteSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, deleteSlackMessage_ConfigPropertyMetadata);
|
|
3936
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$g(deleteSlackMessage_ConfigPropertyMetadata);
|
|
3937
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
3938
3938
|
const config = {};
|
|
3939
|
-
typeCheckConfig$
|
|
3939
|
+
typeCheckConfig$g(untrustedConfig, config, deleteSlackMessage_ConfigPropertyMetadata);
|
|
3940
3940
|
return config;
|
|
3941
3941
|
}
|
|
3942
|
-
function validateAdapterConfig$
|
|
3942
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
3943
3943
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3944
3944
|
return null;
|
|
3945
3945
|
}
|
|
3946
3946
|
if (process.env.NODE_ENV !== 'production') {
|
|
3947
3947
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3948
3948
|
}
|
|
3949
|
-
const config = typeCheckConfig$
|
|
3949
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
3950
3950
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3951
3951
|
return null;
|
|
3952
3952
|
}
|
|
3953
3953
|
return config;
|
|
3954
3954
|
}
|
|
3955
|
-
function buildNetworkSnapshot$
|
|
3956
|
-
const resourceParams = createResourceParams$
|
|
3957
|
-
const request = createResourceRequest$
|
|
3955
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
3956
|
+
const resourceParams = createResourceParams$a(config);
|
|
3957
|
+
const request = createResourceRequest$a(resourceParams);
|
|
3958
3958
|
return luvio.dispatchResourceRequest(request, options)
|
|
3959
3959
|
.then(() => {
|
|
3960
3960
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -3962,7 +3962,7 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
3962
3962
|
return luvio.storeBroadcast();
|
|
3963
3963
|
}, () => {
|
|
3964
3964
|
const cache = new StoreKeyMap();
|
|
3965
|
-
getResponseCacheKeys$
|
|
3965
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams);
|
|
3966
3966
|
return cache;
|
|
3967
3967
|
});
|
|
3968
3968
|
}, (response) => {
|
|
@@ -3972,33 +3972,33 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
3972
3972
|
}
|
|
3973
3973
|
const deleteSlackMessageAdapterFactory = (luvio) => {
|
|
3974
3974
|
return function SlackdeleteSlackMessage(untrustedConfig) {
|
|
3975
|
-
const config = validateAdapterConfig$
|
|
3975
|
+
const config = validateAdapterConfig$a(untrustedConfig, deleteSlackMessage_ConfigPropertyNames);
|
|
3976
3976
|
// Invalid or incomplete config
|
|
3977
3977
|
if (config === null) {
|
|
3978
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
3978
|
+
throw new Error(`Invalid config for "${adapterName$a}"`);
|
|
3979
3979
|
}
|
|
3980
|
-
return buildNetworkSnapshot$
|
|
3980
|
+
return buildNetworkSnapshot$a(luvio, config);
|
|
3981
3981
|
};
|
|
3982
3982
|
};
|
|
3983
3983
|
|
|
3984
|
-
function select$
|
|
3985
|
-
return select$
|
|
3984
|
+
function select$f(luvio, params) {
|
|
3985
|
+
return select$k();
|
|
3986
3986
|
}
|
|
3987
|
-
function keyBuilder$
|
|
3988
|
-
return keyBuilder$
|
|
3987
|
+
function keyBuilder$h(luvio, params) {
|
|
3988
|
+
return keyBuilder$m(luvio, {
|
|
3989
3989
|
messageTimestamp: params.urlParams.messageTimestamp
|
|
3990
3990
|
});
|
|
3991
3991
|
}
|
|
3992
|
-
function getResponseCacheKeys$
|
|
3993
|
-
getTypeCacheKeys$
|
|
3992
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
3993
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
3994
3994
|
}
|
|
3995
|
-
function ingestSuccess$
|
|
3995
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
3996
3996
|
const { body } = response;
|
|
3997
|
-
const key = keyBuilder$
|
|
3998
|
-
luvio.storeIngest(key, ingest$
|
|
3997
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
3998
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
3999
3999
|
const snapshot = luvio.storeLookup({
|
|
4000
4000
|
recordId: key,
|
|
4001
|
-
node: select$
|
|
4001
|
+
node: select$f(),
|
|
4002
4002
|
variables: {},
|
|
4003
4003
|
}, snapshotRefresh);
|
|
4004
4004
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4009,19 +4009,19 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4009
4009
|
deepFreeze(snapshot.data);
|
|
4010
4010
|
return snapshot;
|
|
4011
4011
|
}
|
|
4012
|
-
function ingestError$
|
|
4013
|
-
const key = keyBuilder$
|
|
4012
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
4013
|
+
const key = keyBuilder$h(luvio, params);
|
|
4014
4014
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4015
4015
|
const storeMetadataParams = {
|
|
4016
4016
|
ttl: TTL$2,
|
|
4017
4017
|
namespace: keyPrefix,
|
|
4018
|
-
version: VERSION$
|
|
4019
|
-
representationName: RepresentationType$
|
|
4018
|
+
version: VERSION$9,
|
|
4019
|
+
representationName: RepresentationType$a
|
|
4020
4020
|
};
|
|
4021
4021
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4022
4022
|
return errorSnapshot;
|
|
4023
4023
|
}
|
|
4024
|
-
function createResourceRequest$
|
|
4024
|
+
function createResourceRequest$9(config) {
|
|
4025
4025
|
const headers = {};
|
|
4026
4026
|
return {
|
|
4027
4027
|
baseUri: '/services/data/v64.0',
|
|
@@ -4035,7 +4035,7 @@ function createResourceRequest$8(config) {
|
|
|
4035
4035
|
};
|
|
4036
4036
|
}
|
|
4037
4037
|
|
|
4038
|
-
const adapterName$
|
|
4038
|
+
const adapterName$9 = 'getSlackMessage';
|
|
4039
4039
|
const getSlackMessage_ConfigPropertyMetadata = [
|
|
4040
4040
|
generateParamConfigMetadata('messageTimestamp', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4041
4041
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -4044,91 +4044,91 @@ const getSlackMessage_ConfigPropertyMetadata = [
|
|
|
4044
4044
|
generateParamConfigMetadata('relatedRecordId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4045
4045
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4046
4046
|
];
|
|
4047
|
-
const getSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4048
|
-
const createResourceParams$
|
|
4049
|
-
function keyBuilder$
|
|
4050
|
-
const resourceParams = createResourceParams$
|
|
4051
|
-
return keyBuilder$
|
|
4047
|
+
const getSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getSlackMessage_ConfigPropertyMetadata);
|
|
4048
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$g(getSlackMessage_ConfigPropertyMetadata);
|
|
4049
|
+
function keyBuilder$g(luvio, config) {
|
|
4050
|
+
const resourceParams = createResourceParams$9(config);
|
|
4051
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
4052
4052
|
}
|
|
4053
|
-
function typeCheckConfig$
|
|
4053
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
4054
4054
|
const config = {};
|
|
4055
|
-
typeCheckConfig$
|
|
4055
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackMessage_ConfigPropertyMetadata);
|
|
4056
4056
|
return config;
|
|
4057
4057
|
}
|
|
4058
|
-
function validateAdapterConfig$
|
|
4058
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
4059
4059
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4060
4060
|
return null;
|
|
4061
4061
|
}
|
|
4062
4062
|
if (process.env.NODE_ENV !== 'production') {
|
|
4063
4063
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4064
4064
|
}
|
|
4065
|
-
const config = typeCheckConfig$
|
|
4065
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
4066
4066
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4067
4067
|
return null;
|
|
4068
4068
|
}
|
|
4069
4069
|
return config;
|
|
4070
4070
|
}
|
|
4071
|
-
function adapterFragment$
|
|
4072
|
-
createResourceParams$
|
|
4073
|
-
return select$
|
|
4071
|
+
function adapterFragment$6(luvio, config) {
|
|
4072
|
+
createResourceParams$9(config);
|
|
4073
|
+
return select$f();
|
|
4074
4074
|
}
|
|
4075
|
-
function onFetchResponseSuccess$
|
|
4076
|
-
const snapshot = ingestSuccess$
|
|
4075
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
4076
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
4077
4077
|
config,
|
|
4078
|
-
resolve: () => buildNetworkSnapshot$
|
|
4078
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4079
4079
|
});
|
|
4080
4080
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4081
4081
|
}
|
|
4082
|
-
function onFetchResponseError$
|
|
4083
|
-
const snapshot = ingestError$
|
|
4082
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
4083
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
4084
4084
|
config,
|
|
4085
|
-
resolve: () => buildNetworkSnapshot$
|
|
4085
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4086
4086
|
});
|
|
4087
4087
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4088
4088
|
}
|
|
4089
|
-
function buildNetworkSnapshot$
|
|
4090
|
-
const resourceParams = createResourceParams$
|
|
4091
|
-
const request = createResourceRequest$
|
|
4089
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
4090
|
+
const resourceParams = createResourceParams$9(config);
|
|
4091
|
+
const request = createResourceRequest$9(resourceParams);
|
|
4092
4092
|
return luvio.dispatchResourceRequest(request, options)
|
|
4093
4093
|
.then((response) => {
|
|
4094
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4094
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
4095
4095
|
const cache = new StoreKeyMap();
|
|
4096
|
-
getResponseCacheKeys$
|
|
4096
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
4097
4097
|
return cache;
|
|
4098
4098
|
});
|
|
4099
4099
|
}, (response) => {
|
|
4100
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4100
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
4101
4101
|
});
|
|
4102
4102
|
}
|
|
4103
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4104
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4103
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
4104
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
4105
4105
|
}
|
|
4106
|
-
function buildCachedSnapshotCachePolicy$
|
|
4106
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
4107
4107
|
const { luvio, config } = context;
|
|
4108
4108
|
const selector = {
|
|
4109
|
-
recordId: keyBuilder$
|
|
4110
|
-
node: adapterFragment$
|
|
4109
|
+
recordId: keyBuilder$g(luvio, config),
|
|
4110
|
+
node: adapterFragment$6(luvio, config),
|
|
4111
4111
|
variables: {},
|
|
4112
4112
|
};
|
|
4113
4113
|
const cacheSnapshot = storeLookup(selector, {
|
|
4114
4114
|
config,
|
|
4115
|
-
resolve: () => buildNetworkSnapshot$
|
|
4115
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4116
4116
|
});
|
|
4117
4117
|
return cacheSnapshot;
|
|
4118
4118
|
}
|
|
4119
4119
|
const getSlackMessageAdapterFactory = (luvio) => function Slack__getSlackMessage(untrustedConfig, requestContext) {
|
|
4120
|
-
const config = validateAdapterConfig$
|
|
4120
|
+
const config = validateAdapterConfig$9(untrustedConfig, getSlackMessage_ConfigPropertyNames);
|
|
4121
4121
|
// Invalid or incomplete config
|
|
4122
4122
|
if (config === null) {
|
|
4123
4123
|
return null;
|
|
4124
4124
|
}
|
|
4125
4125
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4126
|
-
buildCachedSnapshotCachePolicy$
|
|
4126
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
4127
4127
|
};
|
|
4128
4128
|
|
|
4129
4129
|
const TTL = 300;
|
|
4130
|
-
const VERSION$
|
|
4131
|
-
function validate$
|
|
4130
|
+
const VERSION$6 = "e0dc0ed06034e8a0dcff97612151271f";
|
|
4131
|
+
function validate$6(obj, path = 'SlackUpdatedMessageOutputRepresentation') {
|
|
4132
4132
|
const v_error = (() => {
|
|
4133
4133
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4134
4134
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4151,21 +4151,21 @@ function validate$4(obj, path = 'SlackUpdatedMessageOutputRepresentation') {
|
|
|
4151
4151
|
})();
|
|
4152
4152
|
return v_error === undefined ? null : v_error;
|
|
4153
4153
|
}
|
|
4154
|
-
const RepresentationType$
|
|
4155
|
-
function keyBuilder$
|
|
4156
|
-
return keyPrefix + '::' + RepresentationType$
|
|
4154
|
+
const RepresentationType$7 = 'SlackUpdatedMessageOutputRepresentation';
|
|
4155
|
+
function keyBuilder$f(luvio, config) {
|
|
4156
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.channelId + ':' + config.timestamp;
|
|
4157
4157
|
}
|
|
4158
|
-
function keyBuilderFromType(luvio, object) {
|
|
4158
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
4159
4159
|
const keyParams = {
|
|
4160
4160
|
channelId: object.channelId,
|
|
4161
4161
|
timestamp: object.timestamp
|
|
4162
4162
|
};
|
|
4163
|
-
return keyBuilder$
|
|
4163
|
+
return keyBuilder$f(luvio, keyParams);
|
|
4164
4164
|
}
|
|
4165
|
-
function normalize$
|
|
4165
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
4166
4166
|
const input_updatedMessage = input.updatedMessage;
|
|
4167
4167
|
const input_updatedMessage_id = path.fullPath + '__updatedMessage';
|
|
4168
|
-
input.updatedMessage = ingest$
|
|
4168
|
+
input.updatedMessage = ingest$9(input_updatedMessage, {
|
|
4169
4169
|
fullPath: input_updatedMessage_id,
|
|
4170
4170
|
propertyName: 'updatedMessage',
|
|
4171
4171
|
parent: {
|
|
@@ -4177,10 +4177,10 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
4177
4177
|
}, luvio, store, timestamp);
|
|
4178
4178
|
return input;
|
|
4179
4179
|
}
|
|
4180
|
-
const select$
|
|
4180
|
+
const select$e = function SlackUpdatedMessageOutputRepresentationSelect() {
|
|
4181
4181
|
return {
|
|
4182
4182
|
kind: 'Fragment',
|
|
4183
|
-
version: VERSION$
|
|
4183
|
+
version: VERSION$6,
|
|
4184
4184
|
private: [],
|
|
4185
4185
|
selections: [
|
|
4186
4186
|
{
|
|
@@ -4194,12 +4194,12 @@ const select$b = function SlackUpdatedMessageOutputRepresentationSelect() {
|
|
|
4194
4194
|
{
|
|
4195
4195
|
name: 'updatedMessage',
|
|
4196
4196
|
kind: 'Link',
|
|
4197
|
-
fragment: select$
|
|
4197
|
+
fragment: select$k()
|
|
4198
4198
|
}
|
|
4199
4199
|
]
|
|
4200
4200
|
};
|
|
4201
4201
|
};
|
|
4202
|
-
function equals$
|
|
4202
|
+
function equals$6(existing, incoming) {
|
|
4203
4203
|
const existing_channelId = existing.channelId;
|
|
4204
4204
|
const incoming_channelId = incoming.channelId;
|
|
4205
4205
|
if (!(existing_channelId === incoming_channelId)) {
|
|
@@ -4217,42 +4217,42 @@ function equals$4(existing, incoming) {
|
|
|
4217
4217
|
}
|
|
4218
4218
|
return true;
|
|
4219
4219
|
}
|
|
4220
|
-
const ingest$
|
|
4220
|
+
const ingest$6 = function SlackUpdatedMessageOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4221
4221
|
if (process.env.NODE_ENV !== 'production') {
|
|
4222
|
-
const validateError = validate$
|
|
4222
|
+
const validateError = validate$6(input);
|
|
4223
4223
|
if (validateError !== null) {
|
|
4224
4224
|
throw validateError;
|
|
4225
4225
|
}
|
|
4226
4226
|
}
|
|
4227
|
-
const key = keyBuilderFromType(luvio, input);
|
|
4227
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
4228
4228
|
const ttlToUse = TTL;
|
|
4229
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4229
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "Slack", VERSION$6, RepresentationType$7, equals$6);
|
|
4230
4230
|
return createLink(key);
|
|
4231
4231
|
};
|
|
4232
|
-
function getTypeCacheKeys$
|
|
4232
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
4233
4233
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4234
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
4234
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
4235
4235
|
rootKeySet.set(rootKey, {
|
|
4236
4236
|
namespace: keyPrefix,
|
|
4237
|
-
representationName: RepresentationType$
|
|
4237
|
+
representationName: RepresentationType$7,
|
|
4238
4238
|
mergeable: false
|
|
4239
4239
|
});
|
|
4240
|
-
getTypeCacheKeys$
|
|
4240
|
+
getTypeCacheKeys$9(rootKeySet, luvio, input.updatedMessage);
|
|
4241
4241
|
}
|
|
4242
4242
|
|
|
4243
|
-
function select$
|
|
4244
|
-
return select$
|
|
4243
|
+
function select$d(luvio, params) {
|
|
4244
|
+
return select$e();
|
|
4245
4245
|
}
|
|
4246
|
-
function getResponseCacheKeys$
|
|
4247
|
-
getTypeCacheKeys$
|
|
4246
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
4247
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
4248
4248
|
}
|
|
4249
|
-
function ingestSuccess$
|
|
4249
|
+
function ingestSuccess$7(luvio, resourceParams, response) {
|
|
4250
4250
|
const { body } = response;
|
|
4251
|
-
const key = keyBuilderFromType(luvio, body);
|
|
4252
|
-
luvio.storeIngest(key, ingest$
|
|
4251
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
4252
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
4253
4253
|
const snapshot = luvio.storeLookup({
|
|
4254
4254
|
recordId: key,
|
|
4255
|
-
node: select$
|
|
4255
|
+
node: select$d(),
|
|
4256
4256
|
variables: {},
|
|
4257
4257
|
});
|
|
4258
4258
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4263,7 +4263,7 @@ function ingestSuccess$6(luvio, resourceParams, response) {
|
|
|
4263
4263
|
deepFreeze(snapshot.data);
|
|
4264
4264
|
return snapshot;
|
|
4265
4265
|
}
|
|
4266
|
-
function createResourceRequest$
|
|
4266
|
+
function createResourceRequest$8(config) {
|
|
4267
4267
|
const headers = {};
|
|
4268
4268
|
return {
|
|
4269
4269
|
baseUri: '/services/data/v64.0',
|
|
@@ -4277,7 +4277,7 @@ function createResourceRequest$7(config) {
|
|
|
4277
4277
|
};
|
|
4278
4278
|
}
|
|
4279
4279
|
|
|
4280
|
-
const adapterName$
|
|
4280
|
+
const adapterName$8 = 'patchSlackMessage';
|
|
4281
4281
|
const patchSlackMessage_ConfigPropertyMetadata = [
|
|
4282
4282
|
generateParamConfigMetadata('messageTimestamp', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4283
4283
|
generateParamConfigMetadata('appId', true, 2 /* Body */, 0 /* String */),
|
|
@@ -4285,37 +4285,37 @@ const patchSlackMessage_ConfigPropertyMetadata = [
|
|
|
4285
4285
|
generateParamConfigMetadata('teamId', true, 2 /* Body */, 0 /* String */),
|
|
4286
4286
|
generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
|
|
4287
4287
|
];
|
|
4288
|
-
const patchSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4289
|
-
const createResourceParams$
|
|
4290
|
-
function typeCheckConfig$
|
|
4288
|
+
const patchSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, patchSlackMessage_ConfigPropertyMetadata);
|
|
4289
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$g(patchSlackMessage_ConfigPropertyMetadata);
|
|
4290
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
4291
4291
|
const config = {};
|
|
4292
|
-
typeCheckConfig$
|
|
4292
|
+
typeCheckConfig$g(untrustedConfig, config, patchSlackMessage_ConfigPropertyMetadata);
|
|
4293
4293
|
return config;
|
|
4294
4294
|
}
|
|
4295
|
-
function validateAdapterConfig$
|
|
4295
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
4296
4296
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4297
4297
|
return null;
|
|
4298
4298
|
}
|
|
4299
4299
|
if (process.env.NODE_ENV !== 'production') {
|
|
4300
4300
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4301
4301
|
}
|
|
4302
|
-
const config = typeCheckConfig$
|
|
4302
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
4303
4303
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4304
4304
|
return null;
|
|
4305
4305
|
}
|
|
4306
4306
|
return config;
|
|
4307
4307
|
}
|
|
4308
|
-
function buildNetworkSnapshot$
|
|
4309
|
-
const resourceParams = createResourceParams$
|
|
4310
|
-
const request = createResourceRequest$
|
|
4308
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
4309
|
+
const resourceParams = createResourceParams$8(config);
|
|
4310
|
+
const request = createResourceRequest$8(resourceParams);
|
|
4311
4311
|
return luvio.dispatchResourceRequest(request, options)
|
|
4312
4312
|
.then((response) => {
|
|
4313
4313
|
return luvio.handleSuccessResponse(() => {
|
|
4314
|
-
const snapshot = ingestSuccess$
|
|
4314
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response);
|
|
4315
4315
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4316
4316
|
}, () => {
|
|
4317
4317
|
const cache = new StoreKeyMap();
|
|
4318
|
-
getResponseCacheKeys$
|
|
4318
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
4319
4319
|
return cache;
|
|
4320
4320
|
});
|
|
4321
4321
|
}, (response) => {
|
|
@@ -4325,38 +4325,38 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
4325
4325
|
}
|
|
4326
4326
|
const patchSlackMessageAdapterFactory = (luvio) => {
|
|
4327
4327
|
return function patchSlackMessage(untrustedConfig) {
|
|
4328
|
-
const config = validateAdapterConfig$
|
|
4328
|
+
const config = validateAdapterConfig$8(untrustedConfig, patchSlackMessage_ConfigPropertyNames);
|
|
4329
4329
|
// Invalid or incomplete config
|
|
4330
4330
|
if (config === null) {
|
|
4331
4331
|
throw new Error('Invalid config for "patchSlackMessage"');
|
|
4332
4332
|
}
|
|
4333
|
-
return buildNetworkSnapshot$
|
|
4333
|
+
return buildNetworkSnapshot$8(luvio, config);
|
|
4334
4334
|
};
|
|
4335
4335
|
};
|
|
4336
4336
|
|
|
4337
|
-
const RepresentationType$
|
|
4338
|
-
function keyBuilder$
|
|
4339
|
-
return keyPrefix + '::' + RepresentationType$
|
|
4337
|
+
const RepresentationType$6 = 'SlackReactionsOutputRepresentation';
|
|
4338
|
+
function keyBuilder$e(luvio, config) {
|
|
4339
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.messageTimestamp;
|
|
4340
4340
|
}
|
|
4341
4341
|
|
|
4342
|
-
function keyBuilder$
|
|
4343
|
-
return keyBuilder$
|
|
4342
|
+
function keyBuilder$d(luvio, params) {
|
|
4343
|
+
return keyBuilder$e(luvio, {
|
|
4344
4344
|
messageTimestamp: params.urlParams.messageTimestamp
|
|
4345
4345
|
});
|
|
4346
4346
|
}
|
|
4347
|
-
function getResponseCacheKeys$
|
|
4348
|
-
const key = keyBuilder$
|
|
4347
|
+
function getResponseCacheKeys$7(cacheKeyMap, luvio, resourceParams) {
|
|
4348
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
4349
4349
|
cacheKeyMap.set(key, {
|
|
4350
4350
|
namespace: keyPrefix,
|
|
4351
|
-
representationName: RepresentationType$
|
|
4351
|
+
representationName: RepresentationType$6,
|
|
4352
4352
|
mergeable: false
|
|
4353
4353
|
});
|
|
4354
4354
|
}
|
|
4355
4355
|
function evictSuccess(luvio, resourceParams) {
|
|
4356
|
-
const key = keyBuilder$
|
|
4356
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
4357
4357
|
luvio.storeEvict(key);
|
|
4358
4358
|
}
|
|
4359
|
-
function createResourceRequest$
|
|
4359
|
+
function createResourceRequest$7(config) {
|
|
4360
4360
|
const headers = {};
|
|
4361
4361
|
return {
|
|
4362
4362
|
baseUri: '/services/data/v64.0',
|
|
@@ -4370,7 +4370,7 @@ function createResourceRequest$6(config) {
|
|
|
4370
4370
|
};
|
|
4371
4371
|
}
|
|
4372
4372
|
|
|
4373
|
-
const adapterName$
|
|
4373
|
+
const adapterName$7 = 'deleteSlackMessageReactions';
|
|
4374
4374
|
const deleteSlackMessageReactions_ConfigPropertyMetadata = [
|
|
4375
4375
|
generateParamConfigMetadata('messageTimestamp', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4376
4376
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
@@ -4378,29 +4378,29 @@ const deleteSlackMessageReactions_ConfigPropertyMetadata = [
|
|
|
4378
4378
|
generateParamConfigMetadata('name', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4379
4379
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4380
4380
|
];
|
|
4381
|
-
const deleteSlackMessageReactions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4382
|
-
const createResourceParams$
|
|
4383
|
-
function typeCheckConfig$
|
|
4381
|
+
const deleteSlackMessageReactions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, deleteSlackMessageReactions_ConfigPropertyMetadata);
|
|
4382
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$g(deleteSlackMessageReactions_ConfigPropertyMetadata);
|
|
4383
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
4384
4384
|
const config = {};
|
|
4385
|
-
typeCheckConfig$
|
|
4385
|
+
typeCheckConfig$g(untrustedConfig, config, deleteSlackMessageReactions_ConfigPropertyMetadata);
|
|
4386
4386
|
return config;
|
|
4387
4387
|
}
|
|
4388
|
-
function validateAdapterConfig$
|
|
4388
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
4389
4389
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4390
4390
|
return null;
|
|
4391
4391
|
}
|
|
4392
4392
|
if (process.env.NODE_ENV !== 'production') {
|
|
4393
4393
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4394
4394
|
}
|
|
4395
|
-
const config = typeCheckConfig$
|
|
4395
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
4396
4396
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4397
4397
|
return null;
|
|
4398
4398
|
}
|
|
4399
4399
|
return config;
|
|
4400
4400
|
}
|
|
4401
|
-
function buildNetworkSnapshot$
|
|
4402
|
-
const resourceParams = createResourceParams$
|
|
4403
|
-
const request = createResourceRequest$
|
|
4401
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
4402
|
+
const resourceParams = createResourceParams$7(config);
|
|
4403
|
+
const request = createResourceRequest$7(resourceParams);
|
|
4404
4404
|
return luvio.dispatchResourceRequest(request, options)
|
|
4405
4405
|
.then(() => {
|
|
4406
4406
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -4408,7 +4408,7 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
4408
4408
|
return luvio.storeBroadcast();
|
|
4409
4409
|
}, () => {
|
|
4410
4410
|
const cache = new StoreKeyMap();
|
|
4411
|
-
getResponseCacheKeys$
|
|
4411
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams);
|
|
4412
4412
|
return cache;
|
|
4413
4413
|
});
|
|
4414
4414
|
}, (response) => {
|
|
@@ -4418,28 +4418,28 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
4418
4418
|
}
|
|
4419
4419
|
const deleteSlackMessageReactionsAdapterFactory = (luvio) => {
|
|
4420
4420
|
return function SlackdeleteSlackMessageReactions(untrustedConfig) {
|
|
4421
|
-
const config = validateAdapterConfig$
|
|
4421
|
+
const config = validateAdapterConfig$7(untrustedConfig, deleteSlackMessageReactions_ConfigPropertyNames);
|
|
4422
4422
|
// Invalid or incomplete config
|
|
4423
4423
|
if (config === null) {
|
|
4424
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
4424
|
+
throw new Error(`Invalid config for "${adapterName$7}"`);
|
|
4425
4425
|
}
|
|
4426
|
-
return buildNetworkSnapshot$
|
|
4426
|
+
return buildNetworkSnapshot$7(luvio, config);
|
|
4427
4427
|
};
|
|
4428
4428
|
};
|
|
4429
4429
|
|
|
4430
|
-
function select$
|
|
4431
|
-
return select$
|
|
4430
|
+
function select$c(luvio, params) {
|
|
4431
|
+
return select$l();
|
|
4432
4432
|
}
|
|
4433
|
-
function getResponseCacheKeys$
|
|
4434
|
-
getTypeCacheKeys$
|
|
4433
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
4434
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
4435
4435
|
}
|
|
4436
|
-
function ingestSuccess$
|
|
4436
|
+
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
4437
4437
|
const { body } = response;
|
|
4438
|
-
const key = keyBuilderFromType$
|
|
4439
|
-
luvio.storeIngest(key, ingest$
|
|
4438
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
4439
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
4440
4440
|
const snapshot = luvio.storeLookup({
|
|
4441
4441
|
recordId: key,
|
|
4442
|
-
node: select$
|
|
4442
|
+
node: select$c(),
|
|
4443
4443
|
variables: {},
|
|
4444
4444
|
});
|
|
4445
4445
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4450,7 +4450,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
|
|
|
4450
4450
|
deepFreeze(snapshot.data);
|
|
4451
4451
|
return snapshot;
|
|
4452
4452
|
}
|
|
4453
|
-
function createResourceRequest$
|
|
4453
|
+
function createResourceRequest$6(config) {
|
|
4454
4454
|
const headers = {};
|
|
4455
4455
|
return {
|
|
4456
4456
|
baseUri: '/services/data/v64.0',
|
|
@@ -4464,7 +4464,7 @@ function createResourceRequest$5(config) {
|
|
|
4464
4464
|
};
|
|
4465
4465
|
}
|
|
4466
4466
|
|
|
4467
|
-
const adapterName$
|
|
4467
|
+
const adapterName$6 = 'postSlackMessageReactions';
|
|
4468
4468
|
const postSlackMessageReactions_ConfigPropertyMetadata = [
|
|
4469
4469
|
generateParamConfigMetadata('messageTimestamp', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4470
4470
|
generateParamConfigMetadata('appId', true, 2 /* Body */, 0 /* String */),
|
|
@@ -4472,37 +4472,37 @@ const postSlackMessageReactions_ConfigPropertyMetadata = [
|
|
|
4472
4472
|
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
4473
4473
|
generateParamConfigMetadata('teamId', true, 2 /* Body */, 0 /* String */),
|
|
4474
4474
|
];
|
|
4475
|
-
const postSlackMessageReactions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4476
|
-
const createResourceParams$
|
|
4477
|
-
function typeCheckConfig$
|
|
4475
|
+
const postSlackMessageReactions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, postSlackMessageReactions_ConfigPropertyMetadata);
|
|
4476
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$g(postSlackMessageReactions_ConfigPropertyMetadata);
|
|
4477
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
4478
4478
|
const config = {};
|
|
4479
|
-
typeCheckConfig$
|
|
4479
|
+
typeCheckConfig$g(untrustedConfig, config, postSlackMessageReactions_ConfigPropertyMetadata);
|
|
4480
4480
|
return config;
|
|
4481
4481
|
}
|
|
4482
|
-
function validateAdapterConfig$
|
|
4482
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
4483
4483
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4484
4484
|
return null;
|
|
4485
4485
|
}
|
|
4486
4486
|
if (process.env.NODE_ENV !== 'production') {
|
|
4487
4487
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4488
4488
|
}
|
|
4489
|
-
const config = typeCheckConfig$
|
|
4489
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
4490
4490
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4491
4491
|
return null;
|
|
4492
4492
|
}
|
|
4493
4493
|
return config;
|
|
4494
4494
|
}
|
|
4495
|
-
function buildNetworkSnapshot$
|
|
4496
|
-
const resourceParams = createResourceParams$
|
|
4497
|
-
const request = createResourceRequest$
|
|
4495
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
4496
|
+
const resourceParams = createResourceParams$6(config);
|
|
4497
|
+
const request = createResourceRequest$6(resourceParams);
|
|
4498
4498
|
return luvio.dispatchResourceRequest(request, options)
|
|
4499
4499
|
.then((response) => {
|
|
4500
4500
|
return luvio.handleSuccessResponse(() => {
|
|
4501
|
-
const snapshot = ingestSuccess$
|
|
4501
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
4502
4502
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4503
4503
|
}, () => {
|
|
4504
4504
|
const cache = new StoreKeyMap();
|
|
4505
|
-
getResponseCacheKeys$
|
|
4505
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
4506
4506
|
return cache;
|
|
4507
4507
|
});
|
|
4508
4508
|
}, (response) => {
|
|
@@ -4512,33 +4512,33 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
4512
4512
|
}
|
|
4513
4513
|
const postSlackMessageReactionsAdapterFactory = (luvio) => {
|
|
4514
4514
|
return function postSlackMessageReactions(untrustedConfig) {
|
|
4515
|
-
const config = validateAdapterConfig$
|
|
4515
|
+
const config = validateAdapterConfig$6(untrustedConfig, postSlackMessageReactions_ConfigPropertyNames);
|
|
4516
4516
|
// Invalid or incomplete config
|
|
4517
4517
|
if (config === null) {
|
|
4518
4518
|
throw new Error('Invalid config for "postSlackMessageReactions"');
|
|
4519
4519
|
}
|
|
4520
|
-
return buildNetworkSnapshot$
|
|
4520
|
+
return buildNetworkSnapshot$6(luvio, config);
|
|
4521
4521
|
};
|
|
4522
4522
|
};
|
|
4523
4523
|
|
|
4524
|
-
function select$
|
|
4525
|
-
return select$
|
|
4524
|
+
function select$b(luvio, params) {
|
|
4525
|
+
return select$m();
|
|
4526
4526
|
}
|
|
4527
|
-
function keyBuilder$
|
|
4528
|
-
return keyBuilder$
|
|
4527
|
+
function keyBuilder$c(luvio, params) {
|
|
4528
|
+
return keyBuilder$o(luvio, {
|
|
4529
4529
|
userId: params.urlParams.userId
|
|
4530
4530
|
});
|
|
4531
4531
|
}
|
|
4532
|
-
function getResponseCacheKeys$
|
|
4533
|
-
getTypeCacheKeys$
|
|
4532
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
4533
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
4534
4534
|
}
|
|
4535
|
-
function ingestSuccess$
|
|
4535
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
4536
4536
|
const { body } = response;
|
|
4537
|
-
const key = keyBuilder$
|
|
4538
|
-
luvio.storeIngest(key, ingest$
|
|
4537
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
4538
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
4539
4539
|
const snapshot = luvio.storeLookup({
|
|
4540
4540
|
recordId: key,
|
|
4541
|
-
node: select$
|
|
4541
|
+
node: select$b(),
|
|
4542
4542
|
variables: {},
|
|
4543
4543
|
}, snapshotRefresh);
|
|
4544
4544
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4549,13 +4549,13 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4549
4549
|
deepFreeze(snapshot.data);
|
|
4550
4550
|
return snapshot;
|
|
4551
4551
|
}
|
|
4552
|
-
function ingestError$
|
|
4553
|
-
const key = keyBuilder$
|
|
4552
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
4553
|
+
const key = keyBuilder$c(luvio, params);
|
|
4554
4554
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4555
4555
|
luvio.storeIngestError(key, errorSnapshot);
|
|
4556
4556
|
return errorSnapshot;
|
|
4557
4557
|
}
|
|
4558
|
-
function createResourceRequest$
|
|
4558
|
+
function createResourceRequest$5(config) {
|
|
4559
4559
|
const headers = {};
|
|
4560
4560
|
return {
|
|
4561
4561
|
baseUri: '/services/data/v64.0',
|
|
@@ -4569,96 +4569,96 @@ function createResourceRequest$4(config) {
|
|
|
4569
4569
|
};
|
|
4570
4570
|
}
|
|
4571
4571
|
|
|
4572
|
-
const adapterName$
|
|
4572
|
+
const adapterName$5 = 'getSlackUser';
|
|
4573
4573
|
const getSlackUser_ConfigPropertyMetadata = [
|
|
4574
4574
|
generateParamConfigMetadata('userId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4575
4575
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4576
4576
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4577
4577
|
];
|
|
4578
|
-
const getSlackUser_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4579
|
-
const createResourceParams$
|
|
4580
|
-
function keyBuilder$
|
|
4581
|
-
const resourceParams = createResourceParams$
|
|
4582
|
-
return keyBuilder$
|
|
4578
|
+
const getSlackUser_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getSlackUser_ConfigPropertyMetadata);
|
|
4579
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$g(getSlackUser_ConfigPropertyMetadata);
|
|
4580
|
+
function keyBuilder$b(luvio, config) {
|
|
4581
|
+
const resourceParams = createResourceParams$5(config);
|
|
4582
|
+
return keyBuilder$c(luvio, resourceParams);
|
|
4583
4583
|
}
|
|
4584
|
-
function typeCheckConfig$
|
|
4584
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
4585
4585
|
const config = {};
|
|
4586
|
-
typeCheckConfig$
|
|
4586
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackUser_ConfigPropertyMetadata);
|
|
4587
4587
|
return config;
|
|
4588
4588
|
}
|
|
4589
|
-
function validateAdapterConfig$
|
|
4589
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
4590
4590
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4591
4591
|
return null;
|
|
4592
4592
|
}
|
|
4593
4593
|
if (process.env.NODE_ENV !== 'production') {
|
|
4594
4594
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4595
4595
|
}
|
|
4596
|
-
const config = typeCheckConfig$
|
|
4596
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
4597
4597
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4598
4598
|
return null;
|
|
4599
4599
|
}
|
|
4600
4600
|
return config;
|
|
4601
4601
|
}
|
|
4602
|
-
function adapterFragment$
|
|
4603
|
-
createResourceParams$
|
|
4604
|
-
return select$
|
|
4602
|
+
function adapterFragment$5(luvio, config) {
|
|
4603
|
+
createResourceParams$5(config);
|
|
4604
|
+
return select$b();
|
|
4605
4605
|
}
|
|
4606
|
-
function onFetchResponseSuccess$
|
|
4607
|
-
const snapshot = ingestSuccess$
|
|
4606
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
4607
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
4608
4608
|
config,
|
|
4609
|
-
resolve: () => buildNetworkSnapshot$
|
|
4609
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
4610
4610
|
});
|
|
4611
4611
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4612
4612
|
}
|
|
4613
|
-
function onFetchResponseError$
|
|
4614
|
-
const snapshot = ingestError$
|
|
4613
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
4614
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
4615
4615
|
config,
|
|
4616
|
-
resolve: () => buildNetworkSnapshot$
|
|
4616
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
4617
4617
|
});
|
|
4618
4618
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4619
4619
|
}
|
|
4620
|
-
function buildNetworkSnapshot$
|
|
4621
|
-
const resourceParams = createResourceParams$
|
|
4622
|
-
const request = createResourceRequest$
|
|
4620
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
4621
|
+
const resourceParams = createResourceParams$5(config);
|
|
4622
|
+
const request = createResourceRequest$5(resourceParams);
|
|
4623
4623
|
return luvio.dispatchResourceRequest(request, options)
|
|
4624
4624
|
.then((response) => {
|
|
4625
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4625
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
4626
4626
|
const cache = new StoreKeyMap();
|
|
4627
|
-
getResponseCacheKeys$
|
|
4627
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
4628
4628
|
return cache;
|
|
4629
4629
|
});
|
|
4630
4630
|
}, (response) => {
|
|
4631
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4631
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
4632
4632
|
});
|
|
4633
4633
|
}
|
|
4634
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4635
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4634
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
4635
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
4636
4636
|
}
|
|
4637
|
-
function buildCachedSnapshotCachePolicy$
|
|
4637
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
4638
4638
|
const { luvio, config } = context;
|
|
4639
4639
|
const selector = {
|
|
4640
|
-
recordId: keyBuilder$
|
|
4641
|
-
node: adapterFragment$
|
|
4640
|
+
recordId: keyBuilder$b(luvio, config),
|
|
4641
|
+
node: adapterFragment$5(luvio, config),
|
|
4642
4642
|
variables: {},
|
|
4643
4643
|
};
|
|
4644
4644
|
const cacheSnapshot = storeLookup(selector, {
|
|
4645
4645
|
config,
|
|
4646
|
-
resolve: () => buildNetworkSnapshot$
|
|
4646
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
4647
4647
|
});
|
|
4648
4648
|
return cacheSnapshot;
|
|
4649
4649
|
}
|
|
4650
4650
|
const getSlackUserAdapterFactory = (luvio) => function Slack__getSlackUser(untrustedConfig, requestContext) {
|
|
4651
|
-
const config = validateAdapterConfig$
|
|
4651
|
+
const config = validateAdapterConfig$5(untrustedConfig, getSlackUser_ConfigPropertyNames);
|
|
4652
4652
|
// Invalid or incomplete config
|
|
4653
4653
|
if (config === null) {
|
|
4654
4654
|
return null;
|
|
4655
4655
|
}
|
|
4656
4656
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4657
|
-
buildCachedSnapshotCachePolicy$
|
|
4657
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
4658
4658
|
};
|
|
4659
4659
|
|
|
4660
|
-
const VERSION$
|
|
4661
|
-
function validate$
|
|
4660
|
+
const VERSION$5 = "404a1b5e032907ee5acb8a57b59de85e";
|
|
4661
|
+
function validate$5(obj, path = 'SlackConversationInfoOutputRepresentation') {
|
|
4662
4662
|
const v_error = (() => {
|
|
4663
4663
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4664
4664
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4988,14 +4988,14 @@ function validate$3(obj, path = 'SlackConversationInfoOutputRepresentation') {
|
|
|
4988
4988
|
})();
|
|
4989
4989
|
return v_error === undefined ? null : v_error;
|
|
4990
4990
|
}
|
|
4991
|
-
const RepresentationType$
|
|
4992
|
-
function normalize$
|
|
4991
|
+
const RepresentationType$5 = 'SlackConversationInfoOutputRepresentation';
|
|
4992
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
4993
4993
|
return input;
|
|
4994
4994
|
}
|
|
4995
|
-
const select$
|
|
4995
|
+
const select$a = function SlackConversationInfoOutputRepresentationSelect() {
|
|
4996
4996
|
return {
|
|
4997
4997
|
kind: 'Fragment',
|
|
4998
|
-
version: VERSION$
|
|
4998
|
+
version: VERSION$5,
|
|
4999
4999
|
private: [],
|
|
5000
5000
|
selections: [
|
|
5001
5001
|
{
|
|
@@ -5057,7 +5057,7 @@ const select$7 = function SlackConversationInfoOutputRepresentationSelect() {
|
|
|
5057
5057
|
]
|
|
5058
5058
|
};
|
|
5059
5059
|
};
|
|
5060
|
-
function equals$
|
|
5060
|
+
function equals$5(existing, incoming) {
|
|
5061
5061
|
const existing_id = existing.id;
|
|
5062
5062
|
const incoming_id = incoming.id;
|
|
5063
5063
|
if (!(existing_id === incoming_id)) {
|
|
@@ -5130,44 +5130,44 @@ function equals$3(existing, incoming) {
|
|
|
5130
5130
|
}
|
|
5131
5131
|
return true;
|
|
5132
5132
|
}
|
|
5133
|
-
const ingest$
|
|
5133
|
+
const ingest$5 = function SlackConversationInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5134
5134
|
if (process.env.NODE_ENV !== 'production') {
|
|
5135
|
-
const validateError = validate$
|
|
5135
|
+
const validateError = validate$5(input);
|
|
5136
5136
|
if (validateError !== null) {
|
|
5137
5137
|
throw validateError;
|
|
5138
5138
|
}
|
|
5139
5139
|
}
|
|
5140
5140
|
const key = path.fullPath;
|
|
5141
5141
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
5142
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
5142
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "Slack", VERSION$5, RepresentationType$5, equals$5);
|
|
5143
5143
|
return createLink(key);
|
|
5144
5144
|
};
|
|
5145
|
-
function getTypeCacheKeys$
|
|
5145
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
5146
5146
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5147
5147
|
const rootKey = fullPathFactory();
|
|
5148
5148
|
rootKeySet.set(rootKey, {
|
|
5149
5149
|
namespace: keyPrefix,
|
|
5150
|
-
representationName: RepresentationType$
|
|
5150
|
+
representationName: RepresentationType$5,
|
|
5151
5151
|
mergeable: false
|
|
5152
5152
|
});
|
|
5153
5153
|
}
|
|
5154
5154
|
|
|
5155
|
-
function select$
|
|
5156
|
-
return select$
|
|
5155
|
+
function select$9(luvio, params) {
|
|
5156
|
+
return select$a();
|
|
5157
5157
|
}
|
|
5158
|
-
function keyBuilder$
|
|
5158
|
+
function keyBuilder$a(luvio, params) {
|
|
5159
5159
|
return keyPrefix + '::SlackConversationInfoOutputRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'channelId:' + params.queryParams.channelId + ',' + 'teamId:' + params.queryParams.teamId + ')';
|
|
5160
5160
|
}
|
|
5161
|
-
function getResponseCacheKeys$
|
|
5162
|
-
getTypeCacheKeys$
|
|
5161
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
5162
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
|
|
5163
5163
|
}
|
|
5164
|
-
function ingestSuccess$
|
|
5164
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
5165
5165
|
const { body } = response;
|
|
5166
|
-
const key = keyBuilder$
|
|
5167
|
-
luvio.storeIngest(key, ingest$
|
|
5166
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
5167
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
5168
5168
|
const snapshot = luvio.storeLookup({
|
|
5169
5169
|
recordId: key,
|
|
5170
|
-
node: select$
|
|
5170
|
+
node: select$9(),
|
|
5171
5171
|
variables: {},
|
|
5172
5172
|
}, snapshotRefresh);
|
|
5173
5173
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5178,13 +5178,13 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5178
5178
|
deepFreeze(snapshot.data);
|
|
5179
5179
|
return snapshot;
|
|
5180
5180
|
}
|
|
5181
|
-
function ingestError$
|
|
5182
|
-
const key = keyBuilder$
|
|
5181
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
5182
|
+
const key = keyBuilder$a(luvio, params);
|
|
5183
5183
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5184
5184
|
luvio.storeIngestError(key, errorSnapshot);
|
|
5185
5185
|
return errorSnapshot;
|
|
5186
5186
|
}
|
|
5187
|
-
function createResourceRequest$
|
|
5187
|
+
function createResourceRequest$4(config) {
|
|
5188
5188
|
const headers = {};
|
|
5189
5189
|
return {
|
|
5190
5190
|
baseUri: '/services/data/v64.0',
|
|
@@ -5198,96 +5198,96 @@ function createResourceRequest$3(config) {
|
|
|
5198
5198
|
};
|
|
5199
5199
|
}
|
|
5200
5200
|
|
|
5201
|
-
const adapterName$
|
|
5201
|
+
const adapterName$4 = 'getSlackConversationInfo';
|
|
5202
5202
|
const getSlackConversationInfo_ConfigPropertyMetadata = [
|
|
5203
5203
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5204
5204
|
generateParamConfigMetadata('channelId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5205
5205
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5206
5206
|
];
|
|
5207
|
-
const getSlackConversationInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
5208
|
-
const createResourceParams$
|
|
5209
|
-
function keyBuilder$
|
|
5210
|
-
const resourceParams = createResourceParams$
|
|
5211
|
-
return keyBuilder$
|
|
5207
|
+
const getSlackConversationInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getSlackConversationInfo_ConfigPropertyMetadata);
|
|
5208
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$g(getSlackConversationInfo_ConfigPropertyMetadata);
|
|
5209
|
+
function keyBuilder$9(luvio, config) {
|
|
5210
|
+
const resourceParams = createResourceParams$4(config);
|
|
5211
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
5212
5212
|
}
|
|
5213
|
-
function typeCheckConfig$
|
|
5213
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
5214
5214
|
const config = {};
|
|
5215
|
-
typeCheckConfig$
|
|
5215
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackConversationInfo_ConfigPropertyMetadata);
|
|
5216
5216
|
return config;
|
|
5217
5217
|
}
|
|
5218
|
-
function validateAdapterConfig$
|
|
5218
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
5219
5219
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5220
5220
|
return null;
|
|
5221
5221
|
}
|
|
5222
5222
|
if (process.env.NODE_ENV !== 'production') {
|
|
5223
5223
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5224
5224
|
}
|
|
5225
|
-
const config = typeCheckConfig$
|
|
5225
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
5226
5226
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5227
5227
|
return null;
|
|
5228
5228
|
}
|
|
5229
5229
|
return config;
|
|
5230
5230
|
}
|
|
5231
|
-
function adapterFragment$
|
|
5232
|
-
createResourceParams$
|
|
5233
|
-
return select$
|
|
5231
|
+
function adapterFragment$4(luvio, config) {
|
|
5232
|
+
createResourceParams$4(config);
|
|
5233
|
+
return select$9();
|
|
5234
5234
|
}
|
|
5235
|
-
function onFetchResponseSuccess$
|
|
5236
|
-
const snapshot = ingestSuccess$
|
|
5235
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
5236
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
5237
5237
|
config,
|
|
5238
|
-
resolve: () => buildNetworkSnapshot$
|
|
5238
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5239
5239
|
});
|
|
5240
5240
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5241
5241
|
}
|
|
5242
|
-
function onFetchResponseError$
|
|
5243
|
-
const snapshot = ingestError$
|
|
5242
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
5243
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
5244
5244
|
config,
|
|
5245
|
-
resolve: () => buildNetworkSnapshot$
|
|
5245
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5246
5246
|
});
|
|
5247
5247
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5248
5248
|
}
|
|
5249
|
-
function buildNetworkSnapshot$
|
|
5250
|
-
const resourceParams = createResourceParams$
|
|
5251
|
-
const request = createResourceRequest$
|
|
5249
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
5250
|
+
const resourceParams = createResourceParams$4(config);
|
|
5251
|
+
const request = createResourceRequest$4(resourceParams);
|
|
5252
5252
|
return luvio.dispatchResourceRequest(request, options)
|
|
5253
5253
|
.then((response) => {
|
|
5254
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5254
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
5255
5255
|
const cache = new StoreKeyMap();
|
|
5256
|
-
getResponseCacheKeys$
|
|
5256
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
5257
5257
|
return cache;
|
|
5258
5258
|
});
|
|
5259
5259
|
}, (response) => {
|
|
5260
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5260
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
5261
5261
|
});
|
|
5262
5262
|
}
|
|
5263
|
-
function buildNetworkSnapshotCachePolicy$
|
|
5264
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5263
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
5264
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
5265
5265
|
}
|
|
5266
|
-
function buildCachedSnapshotCachePolicy$
|
|
5266
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
5267
5267
|
const { luvio, config } = context;
|
|
5268
5268
|
const selector = {
|
|
5269
|
-
recordId: keyBuilder$
|
|
5270
|
-
node: adapterFragment$
|
|
5269
|
+
recordId: keyBuilder$9(luvio, config),
|
|
5270
|
+
node: adapterFragment$4(luvio, config),
|
|
5271
5271
|
variables: {},
|
|
5272
5272
|
};
|
|
5273
5273
|
const cacheSnapshot = storeLookup(selector, {
|
|
5274
5274
|
config,
|
|
5275
|
-
resolve: () => buildNetworkSnapshot$
|
|
5275
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5276
5276
|
});
|
|
5277
5277
|
return cacheSnapshot;
|
|
5278
5278
|
}
|
|
5279
5279
|
const getSlackConversationInfoAdapterFactory = (luvio) => function Slack__getSlackConversationInfo(untrustedConfig, requestContext) {
|
|
5280
|
-
const config = validateAdapterConfig$
|
|
5280
|
+
const config = validateAdapterConfig$4(untrustedConfig, getSlackConversationInfo_ConfigPropertyNames);
|
|
5281
5281
|
// Invalid or incomplete config
|
|
5282
5282
|
if (config === null) {
|
|
5283
5283
|
return null;
|
|
5284
5284
|
}
|
|
5285
5285
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5286
|
-
buildCachedSnapshotCachePolicy$
|
|
5286
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
5287
5287
|
};
|
|
5288
5288
|
|
|
5289
|
-
const VERSION$
|
|
5290
|
-
function validate$
|
|
5289
|
+
const VERSION$4 = "1ec9fefce81c3d121b6efc55f8267a31";
|
|
5290
|
+
function validate$4(obj, path = 'SlackConversationInfosOutputRepresentation') {
|
|
5291
5291
|
const v_error = (() => {
|
|
5292
5292
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5293
5293
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5300,7 +5300,7 @@ function validate$2(obj, path = 'SlackConversationInfosOutputRepresentation') {
|
|
|
5300
5300
|
for (let i = 0; i < obj_conversationInfos.length; i++) {
|
|
5301
5301
|
const obj_conversationInfos_item = obj_conversationInfos[i];
|
|
5302
5302
|
const path_conversationInfos_item = path_conversationInfos + '[' + i + ']';
|
|
5303
|
-
const referencepath_conversationInfos_itemValidationError = validate$
|
|
5303
|
+
const referencepath_conversationInfos_itemValidationError = validate$5(obj_conversationInfos_item, path_conversationInfos_item);
|
|
5304
5304
|
if (referencepath_conversationInfos_itemValidationError !== null) {
|
|
5305
5305
|
let message = 'Object doesn\'t match SlackConversationInfoOutputRepresentation (at "' + path_conversationInfos_item + '")\n';
|
|
5306
5306
|
message += referencepath_conversationInfos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5336,15 +5336,15 @@ function validate$2(obj, path = 'SlackConversationInfosOutputRepresentation') {
|
|
|
5336
5336
|
})();
|
|
5337
5337
|
return v_error === undefined ? null : v_error;
|
|
5338
5338
|
}
|
|
5339
|
-
const RepresentationType$
|
|
5340
|
-
function normalize$
|
|
5339
|
+
const RepresentationType$4 = 'SlackConversationInfosOutputRepresentation';
|
|
5340
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
5341
5341
|
return input;
|
|
5342
5342
|
}
|
|
5343
|
-
const select$
|
|
5344
|
-
const { selections: SlackConversationInfoOutputRepresentation__selections, opaque: SlackConversationInfoOutputRepresentation__opaque, } = select$
|
|
5343
|
+
const select$8 = function SlackConversationInfosOutputRepresentationSelect() {
|
|
5344
|
+
const { selections: SlackConversationInfoOutputRepresentation__selections, opaque: SlackConversationInfoOutputRepresentation__opaque, } = select$a();
|
|
5345
5345
|
return {
|
|
5346
5346
|
kind: 'Fragment',
|
|
5347
|
-
version: VERSION$
|
|
5347
|
+
version: VERSION$4,
|
|
5348
5348
|
private: [],
|
|
5349
5349
|
selections: [
|
|
5350
5350
|
{
|
|
@@ -5360,11 +5360,11 @@ const select$5 = function SlackConversationInfosOutputRepresentationSelect() {
|
|
|
5360
5360
|
]
|
|
5361
5361
|
};
|
|
5362
5362
|
};
|
|
5363
|
-
function equals$
|
|
5363
|
+
function equals$4(existing, incoming) {
|
|
5364
5364
|
const existing_conversationInfos = existing.conversationInfos;
|
|
5365
5365
|
const incoming_conversationInfos = incoming.conversationInfos;
|
|
5366
5366
|
const equals_conversationInfos_items = equalsArray(existing_conversationInfos, incoming_conversationInfos, (existing_conversationInfos_item, incoming_conversationInfos_item) => {
|
|
5367
|
-
if (!(equals$
|
|
5367
|
+
if (!(equals$5(existing_conversationInfos_item, incoming_conversationInfos_item))) {
|
|
5368
5368
|
return false;
|
|
5369
5369
|
}
|
|
5370
5370
|
});
|
|
@@ -5378,44 +5378,44 @@ function equals$2(existing, incoming) {
|
|
|
5378
5378
|
}
|
|
5379
5379
|
return true;
|
|
5380
5380
|
}
|
|
5381
|
-
const ingest$
|
|
5381
|
+
const ingest$4 = function SlackConversationInfosOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5382
5382
|
if (process.env.NODE_ENV !== 'production') {
|
|
5383
|
-
const validateError = validate$
|
|
5383
|
+
const validateError = validate$4(input);
|
|
5384
5384
|
if (validateError !== null) {
|
|
5385
5385
|
throw validateError;
|
|
5386
5386
|
}
|
|
5387
5387
|
}
|
|
5388
5388
|
const key = path.fullPath;
|
|
5389
5389
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
5390
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
5390
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "Slack", VERSION$4, RepresentationType$4, equals$4);
|
|
5391
5391
|
return createLink(key);
|
|
5392
5392
|
};
|
|
5393
|
-
function getTypeCacheKeys$
|
|
5393
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
5394
5394
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5395
5395
|
const rootKey = fullPathFactory();
|
|
5396
5396
|
rootKeySet.set(rootKey, {
|
|
5397
5397
|
namespace: keyPrefix,
|
|
5398
|
-
representationName: RepresentationType$
|
|
5398
|
+
representationName: RepresentationType$4,
|
|
5399
5399
|
mergeable: false
|
|
5400
5400
|
});
|
|
5401
5401
|
}
|
|
5402
5402
|
|
|
5403
|
-
function select$
|
|
5404
|
-
return select$
|
|
5403
|
+
function select$7(luvio, params) {
|
|
5404
|
+
return select$8();
|
|
5405
5405
|
}
|
|
5406
|
-
function keyBuilder$
|
|
5406
|
+
function keyBuilder$8(luvio, params) {
|
|
5407
5407
|
return keyPrefix + '::SlackConversationInfosOutputRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'search:' + params.queryParams.search + ',' + 'teamId:' + params.queryParams.teamId + ')';
|
|
5408
5408
|
}
|
|
5409
|
-
function getResponseCacheKeys$
|
|
5410
|
-
getTypeCacheKeys$
|
|
5409
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
5410
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
|
|
5411
5411
|
}
|
|
5412
|
-
function ingestSuccess$
|
|
5412
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
5413
5413
|
const { body } = response;
|
|
5414
|
-
const key = keyBuilder$
|
|
5415
|
-
luvio.storeIngest(key, ingest$
|
|
5414
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
5415
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
5416
5416
|
const snapshot = luvio.storeLookup({
|
|
5417
5417
|
recordId: key,
|
|
5418
|
-
node: select$
|
|
5418
|
+
node: select$7(),
|
|
5419
5419
|
variables: {},
|
|
5420
5420
|
}, snapshotRefresh);
|
|
5421
5421
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5426,13 +5426,13 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5426
5426
|
deepFreeze(snapshot.data);
|
|
5427
5427
|
return snapshot;
|
|
5428
5428
|
}
|
|
5429
|
-
function ingestError$
|
|
5430
|
-
const key = keyBuilder$
|
|
5429
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
5430
|
+
const key = keyBuilder$8(luvio, params);
|
|
5431
5431
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5432
5432
|
luvio.storeIngestError(key, errorSnapshot);
|
|
5433
5433
|
return errorSnapshot;
|
|
5434
5434
|
}
|
|
5435
|
-
function createResourceRequest$
|
|
5435
|
+
function createResourceRequest$3(config) {
|
|
5436
5436
|
const headers = {};
|
|
5437
5437
|
return {
|
|
5438
5438
|
baseUri: '/services/data/v64.0',
|
|
@@ -5446,96 +5446,96 @@ function createResourceRequest$2(config) {
|
|
|
5446
5446
|
};
|
|
5447
5447
|
}
|
|
5448
5448
|
|
|
5449
|
-
const adapterName$
|
|
5449
|
+
const adapterName$3 = 'getSlackSearchConversation';
|
|
5450
5450
|
const getSlackSearchConversation_ConfigPropertyMetadata = [
|
|
5451
5451
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5452
5452
|
generateParamConfigMetadata('search', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5453
5453
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5454
5454
|
];
|
|
5455
|
-
const getSlackSearchConversation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
5456
|
-
const createResourceParams$
|
|
5457
|
-
function keyBuilder$
|
|
5458
|
-
const resourceParams = createResourceParams$
|
|
5459
|
-
return keyBuilder$
|
|
5455
|
+
const getSlackSearchConversation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getSlackSearchConversation_ConfigPropertyMetadata);
|
|
5456
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$g(getSlackSearchConversation_ConfigPropertyMetadata);
|
|
5457
|
+
function keyBuilder$7(luvio, config) {
|
|
5458
|
+
const resourceParams = createResourceParams$3(config);
|
|
5459
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
5460
5460
|
}
|
|
5461
|
-
function typeCheckConfig$
|
|
5461
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
5462
5462
|
const config = {};
|
|
5463
|
-
typeCheckConfig$
|
|
5463
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackSearchConversation_ConfigPropertyMetadata);
|
|
5464
5464
|
return config;
|
|
5465
5465
|
}
|
|
5466
|
-
function validateAdapterConfig$
|
|
5466
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
5467
5467
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5468
5468
|
return null;
|
|
5469
5469
|
}
|
|
5470
5470
|
if (process.env.NODE_ENV !== 'production') {
|
|
5471
5471
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5472
5472
|
}
|
|
5473
|
-
const config = typeCheckConfig$
|
|
5473
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
5474
5474
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5475
5475
|
return null;
|
|
5476
5476
|
}
|
|
5477
5477
|
return config;
|
|
5478
5478
|
}
|
|
5479
|
-
function adapterFragment$
|
|
5480
|
-
createResourceParams$
|
|
5481
|
-
return select$
|
|
5479
|
+
function adapterFragment$3(luvio, config) {
|
|
5480
|
+
createResourceParams$3(config);
|
|
5481
|
+
return select$7();
|
|
5482
5482
|
}
|
|
5483
|
-
function onFetchResponseSuccess$
|
|
5484
|
-
const snapshot = ingestSuccess$
|
|
5483
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
5484
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
5485
5485
|
config,
|
|
5486
|
-
resolve: () => buildNetworkSnapshot$
|
|
5486
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
5487
5487
|
});
|
|
5488
5488
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5489
5489
|
}
|
|
5490
|
-
function onFetchResponseError$
|
|
5491
|
-
const snapshot = ingestError$
|
|
5490
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
5491
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
5492
5492
|
config,
|
|
5493
|
-
resolve: () => buildNetworkSnapshot$
|
|
5493
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
5494
5494
|
});
|
|
5495
5495
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5496
5496
|
}
|
|
5497
|
-
function buildNetworkSnapshot$
|
|
5498
|
-
const resourceParams = createResourceParams$
|
|
5499
|
-
const request = createResourceRequest$
|
|
5497
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
5498
|
+
const resourceParams = createResourceParams$3(config);
|
|
5499
|
+
const request = createResourceRequest$3(resourceParams);
|
|
5500
5500
|
return luvio.dispatchResourceRequest(request, options)
|
|
5501
5501
|
.then((response) => {
|
|
5502
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5502
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
5503
5503
|
const cache = new StoreKeyMap();
|
|
5504
|
-
getResponseCacheKeys$
|
|
5504
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
5505
5505
|
return cache;
|
|
5506
5506
|
});
|
|
5507
5507
|
}, (response) => {
|
|
5508
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5508
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
5509
5509
|
});
|
|
5510
5510
|
}
|
|
5511
|
-
function buildNetworkSnapshotCachePolicy$
|
|
5512
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5511
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
5512
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
5513
5513
|
}
|
|
5514
|
-
function buildCachedSnapshotCachePolicy$
|
|
5514
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
5515
5515
|
const { luvio, config } = context;
|
|
5516
5516
|
const selector = {
|
|
5517
|
-
recordId: keyBuilder$
|
|
5518
|
-
node: adapterFragment$
|
|
5517
|
+
recordId: keyBuilder$7(luvio, config),
|
|
5518
|
+
node: adapterFragment$3(luvio, config),
|
|
5519
5519
|
variables: {},
|
|
5520
5520
|
};
|
|
5521
5521
|
const cacheSnapshot = storeLookup(selector, {
|
|
5522
5522
|
config,
|
|
5523
|
-
resolve: () => buildNetworkSnapshot$
|
|
5523
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
5524
5524
|
});
|
|
5525
5525
|
return cacheSnapshot;
|
|
5526
5526
|
}
|
|
5527
5527
|
const getSlackSearchConversationAdapterFactory = (luvio) => function Slack__getSlackSearchConversation(untrustedConfig, requestContext) {
|
|
5528
|
-
const config = validateAdapterConfig$
|
|
5528
|
+
const config = validateAdapterConfig$3(untrustedConfig, getSlackSearchConversation_ConfigPropertyNames);
|
|
5529
5529
|
// Invalid or incomplete config
|
|
5530
5530
|
if (config === null) {
|
|
5531
5531
|
return null;
|
|
5532
5532
|
}
|
|
5533
5533
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5534
|
-
buildCachedSnapshotCachePolicy$
|
|
5534
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
5535
5535
|
};
|
|
5536
5536
|
|
|
5537
|
-
const VERSION$
|
|
5538
|
-
function validate$
|
|
5537
|
+
const VERSION$3 = "2ad40e0839bf44d82044e12fdedaa355";
|
|
5538
|
+
function validate$3(obj, path = 'SlackEmojisOutputRepresentation') {
|
|
5539
5539
|
const v_error = (() => {
|
|
5540
5540
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5541
5541
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5548,7 +5548,7 @@ function validate$1(obj, path = 'SlackEmojisOutputRepresentation') {
|
|
|
5548
5548
|
for (let i = 0; i < obj_emojis.length; i++) {
|
|
5549
5549
|
const obj_emojis_item = obj_emojis[i];
|
|
5550
5550
|
const path_emojis_item = path_emojis + '[' + i + ']';
|
|
5551
|
-
const referencepath_emojis_itemValidationError = validate$
|
|
5551
|
+
const referencepath_emojis_itemValidationError = validate$c(obj_emojis_item, path_emojis_item);
|
|
5552
5552
|
if (referencepath_emojis_itemValidationError !== null) {
|
|
5553
5553
|
let message = 'Object doesn\'t match SlackEmojiOutputRepresentation (at "' + path_emojis_item + '")\n';
|
|
5554
5554
|
message += referencepath_emojis_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5584,15 +5584,15 @@ function validate$1(obj, path = 'SlackEmojisOutputRepresentation') {
|
|
|
5584
5584
|
})();
|
|
5585
5585
|
return v_error === undefined ? null : v_error;
|
|
5586
5586
|
}
|
|
5587
|
-
const RepresentationType$
|
|
5588
|
-
function normalize$
|
|
5587
|
+
const RepresentationType$3 = 'SlackEmojisOutputRepresentation';
|
|
5588
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
5589
5589
|
return input;
|
|
5590
5590
|
}
|
|
5591
|
-
const select$
|
|
5592
|
-
const { selections: SlackEmojiOutputRepresentation__selections, opaque: SlackEmojiOutputRepresentation__opaque, } = select$
|
|
5591
|
+
const select$6 = function SlackEmojisOutputRepresentationSelect() {
|
|
5592
|
+
const { selections: SlackEmojiOutputRepresentation__selections, opaque: SlackEmojiOutputRepresentation__opaque, } = select$n();
|
|
5593
5593
|
return {
|
|
5594
5594
|
kind: 'Fragment',
|
|
5595
|
-
version: VERSION$
|
|
5595
|
+
version: VERSION$3,
|
|
5596
5596
|
private: [],
|
|
5597
5597
|
selections: [
|
|
5598
5598
|
{
|
|
@@ -5608,11 +5608,11 @@ const select$3 = function SlackEmojisOutputRepresentationSelect() {
|
|
|
5608
5608
|
]
|
|
5609
5609
|
};
|
|
5610
5610
|
};
|
|
5611
|
-
function equals$
|
|
5611
|
+
function equals$3(existing, incoming) {
|
|
5612
5612
|
const existing_emojis = existing.emojis;
|
|
5613
5613
|
const incoming_emojis = incoming.emojis;
|
|
5614
5614
|
const equals_emojis_items = equalsArray(existing_emojis, incoming_emojis, (existing_emojis_item, incoming_emojis_item) => {
|
|
5615
|
-
if (!(equals$
|
|
5615
|
+
if (!(equals$c(existing_emojis_item, incoming_emojis_item))) {
|
|
5616
5616
|
return false;
|
|
5617
5617
|
}
|
|
5618
5618
|
});
|
|
@@ -5626,44 +5626,44 @@ function equals$1(existing, incoming) {
|
|
|
5626
5626
|
}
|
|
5627
5627
|
return true;
|
|
5628
5628
|
}
|
|
5629
|
-
const ingest$
|
|
5629
|
+
const ingest$3 = function SlackEmojisOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5630
5630
|
if (process.env.NODE_ENV !== 'production') {
|
|
5631
|
-
const validateError = validate$
|
|
5631
|
+
const validateError = validate$3(input);
|
|
5632
5632
|
if (validateError !== null) {
|
|
5633
5633
|
throw validateError;
|
|
5634
5634
|
}
|
|
5635
5635
|
}
|
|
5636
5636
|
const key = path.fullPath;
|
|
5637
5637
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
5638
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
5638
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "Slack", VERSION$3, RepresentationType$3, equals$3);
|
|
5639
5639
|
return createLink(key);
|
|
5640
5640
|
};
|
|
5641
|
-
function getTypeCacheKeys$
|
|
5641
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
5642
5642
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5643
5643
|
const rootKey = fullPathFactory();
|
|
5644
5644
|
rootKeySet.set(rootKey, {
|
|
5645
5645
|
namespace: keyPrefix,
|
|
5646
|
-
representationName: RepresentationType$
|
|
5646
|
+
representationName: RepresentationType$3,
|
|
5647
5647
|
mergeable: false
|
|
5648
5648
|
});
|
|
5649
5649
|
}
|
|
5650
5650
|
|
|
5651
|
-
function select$
|
|
5652
|
-
return select$
|
|
5651
|
+
function select$5(luvio, params) {
|
|
5652
|
+
return select$6();
|
|
5653
5653
|
}
|
|
5654
|
-
function keyBuilder$
|
|
5654
|
+
function keyBuilder$6(luvio, params) {
|
|
5655
5655
|
return keyPrefix + '::SlackEmojisOutputRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'search:' + params.queryParams.search + ',' + 'teamId:' + params.queryParams.teamId + ')';
|
|
5656
5656
|
}
|
|
5657
|
-
function getResponseCacheKeys$
|
|
5658
|
-
getTypeCacheKeys$
|
|
5657
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
5658
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
5659
5659
|
}
|
|
5660
|
-
function ingestSuccess$
|
|
5660
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
5661
5661
|
const { body } = response;
|
|
5662
|
-
const key = keyBuilder$
|
|
5663
|
-
luvio.storeIngest(key, ingest$
|
|
5662
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
5663
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
5664
5664
|
const snapshot = luvio.storeLookup({
|
|
5665
5665
|
recordId: key,
|
|
5666
|
-
node: select$
|
|
5666
|
+
node: select$5(),
|
|
5667
5667
|
variables: {},
|
|
5668
5668
|
}, snapshotRefresh);
|
|
5669
5669
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5674,13 +5674,13 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5674
5674
|
deepFreeze(snapshot.data);
|
|
5675
5675
|
return snapshot;
|
|
5676
5676
|
}
|
|
5677
|
-
function ingestError$
|
|
5678
|
-
const key = keyBuilder$
|
|
5677
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
5678
|
+
const key = keyBuilder$6(luvio, params);
|
|
5679
5679
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5680
5680
|
luvio.storeIngestError(key, errorSnapshot);
|
|
5681
5681
|
return errorSnapshot;
|
|
5682
5682
|
}
|
|
5683
|
-
function createResourceRequest$
|
|
5683
|
+
function createResourceRequest$2(config) {
|
|
5684
5684
|
const headers = {};
|
|
5685
5685
|
return {
|
|
5686
5686
|
baseUri: '/services/data/v64.0',
|
|
@@ -5694,96 +5694,96 @@ function createResourceRequest$1(config) {
|
|
|
5694
5694
|
};
|
|
5695
5695
|
}
|
|
5696
5696
|
|
|
5697
|
-
const adapterName$
|
|
5697
|
+
const adapterName$2 = 'getSlackSearchEmoji';
|
|
5698
5698
|
const getSlackSearchEmoji_ConfigPropertyMetadata = [
|
|
5699
5699
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5700
5700
|
generateParamConfigMetadata('search', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5701
5701
|
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5702
5702
|
];
|
|
5703
|
-
const getSlackSearchEmoji_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
5704
|
-
const createResourceParams$
|
|
5705
|
-
function keyBuilder$
|
|
5706
|
-
const resourceParams = createResourceParams$
|
|
5707
|
-
return keyBuilder$
|
|
5703
|
+
const getSlackSearchEmoji_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getSlackSearchEmoji_ConfigPropertyMetadata);
|
|
5704
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$g(getSlackSearchEmoji_ConfigPropertyMetadata);
|
|
5705
|
+
function keyBuilder$5(luvio, config) {
|
|
5706
|
+
const resourceParams = createResourceParams$2(config);
|
|
5707
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
5708
5708
|
}
|
|
5709
|
-
function typeCheckConfig$
|
|
5709
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
5710
5710
|
const config = {};
|
|
5711
|
-
typeCheckConfig$
|
|
5711
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackSearchEmoji_ConfigPropertyMetadata);
|
|
5712
5712
|
return config;
|
|
5713
5713
|
}
|
|
5714
|
-
function validateAdapterConfig$
|
|
5714
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
5715
5715
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5716
5716
|
return null;
|
|
5717
5717
|
}
|
|
5718
5718
|
if (process.env.NODE_ENV !== 'production') {
|
|
5719
5719
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5720
5720
|
}
|
|
5721
|
-
const config = typeCheckConfig$
|
|
5721
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
5722
5722
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5723
5723
|
return null;
|
|
5724
5724
|
}
|
|
5725
5725
|
return config;
|
|
5726
5726
|
}
|
|
5727
|
-
function adapterFragment$
|
|
5728
|
-
createResourceParams$
|
|
5729
|
-
return select$
|
|
5727
|
+
function adapterFragment$2(luvio, config) {
|
|
5728
|
+
createResourceParams$2(config);
|
|
5729
|
+
return select$5();
|
|
5730
5730
|
}
|
|
5731
|
-
function onFetchResponseSuccess$
|
|
5732
|
-
const snapshot = ingestSuccess$
|
|
5731
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
5732
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
5733
5733
|
config,
|
|
5734
|
-
resolve: () => buildNetworkSnapshot$
|
|
5734
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
5735
5735
|
});
|
|
5736
5736
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5737
5737
|
}
|
|
5738
|
-
function onFetchResponseError$
|
|
5739
|
-
const snapshot = ingestError$
|
|
5738
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
5739
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
5740
5740
|
config,
|
|
5741
|
-
resolve: () => buildNetworkSnapshot$
|
|
5741
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
5742
5742
|
});
|
|
5743
5743
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5744
5744
|
}
|
|
5745
|
-
function buildNetworkSnapshot$
|
|
5746
|
-
const resourceParams = createResourceParams$
|
|
5747
|
-
const request = createResourceRequest$
|
|
5745
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
5746
|
+
const resourceParams = createResourceParams$2(config);
|
|
5747
|
+
const request = createResourceRequest$2(resourceParams);
|
|
5748
5748
|
return luvio.dispatchResourceRequest(request, options)
|
|
5749
5749
|
.then((response) => {
|
|
5750
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5750
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
5751
5751
|
const cache = new StoreKeyMap();
|
|
5752
|
-
getResponseCacheKeys$
|
|
5752
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
5753
5753
|
return cache;
|
|
5754
5754
|
});
|
|
5755
5755
|
}, (response) => {
|
|
5756
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5756
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
5757
5757
|
});
|
|
5758
5758
|
}
|
|
5759
|
-
function buildNetworkSnapshotCachePolicy$
|
|
5760
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5759
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
5760
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
5761
5761
|
}
|
|
5762
|
-
function buildCachedSnapshotCachePolicy$
|
|
5762
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
5763
5763
|
const { luvio, config } = context;
|
|
5764
5764
|
const selector = {
|
|
5765
|
-
recordId: keyBuilder$
|
|
5766
|
-
node: adapterFragment$
|
|
5765
|
+
recordId: keyBuilder$5(luvio, config),
|
|
5766
|
+
node: adapterFragment$2(luvio, config),
|
|
5767
5767
|
variables: {},
|
|
5768
5768
|
};
|
|
5769
5769
|
const cacheSnapshot = storeLookup(selector, {
|
|
5770
5770
|
config,
|
|
5771
|
-
resolve: () => buildNetworkSnapshot$
|
|
5771
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
5772
5772
|
});
|
|
5773
5773
|
return cacheSnapshot;
|
|
5774
5774
|
}
|
|
5775
5775
|
const getSlackSearchEmojiAdapterFactory = (luvio) => function Slack__getSlackSearchEmoji(untrustedConfig, requestContext) {
|
|
5776
|
-
const config = validateAdapterConfig$
|
|
5776
|
+
const config = validateAdapterConfig$2(untrustedConfig, getSlackSearchEmoji_ConfigPropertyNames);
|
|
5777
5777
|
// Invalid or incomplete config
|
|
5778
5778
|
if (config === null) {
|
|
5779
5779
|
return null;
|
|
5780
5780
|
}
|
|
5781
5781
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5782
|
-
buildCachedSnapshotCachePolicy$
|
|
5782
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
5783
5783
|
};
|
|
5784
5784
|
|
|
5785
|
-
const VERSION = "a63b46e1ce1ae5776406a41eb3182812";
|
|
5786
|
-
function validate(obj, path = 'SlackUserInfosOutputRepresentation') {
|
|
5785
|
+
const VERSION$2 = "a63b46e1ce1ae5776406a41eb3182812";
|
|
5786
|
+
function validate$2(obj, path = 'SlackUserInfosOutputRepresentation') {
|
|
5787
5787
|
const v_error = (() => {
|
|
5788
5788
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5789
5789
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5829,14 +5829,14 @@ function validate(obj, path = 'SlackUserInfosOutputRepresentation') {
|
|
|
5829
5829
|
})();
|
|
5830
5830
|
return v_error === undefined ? null : v_error;
|
|
5831
5831
|
}
|
|
5832
|
-
const RepresentationType = 'SlackUserInfosOutputRepresentation';
|
|
5833
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5832
|
+
const RepresentationType$2 = 'SlackUserInfosOutputRepresentation';
|
|
5833
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
5834
5834
|
const input_userInfos = input.userInfos;
|
|
5835
5835
|
const input_userInfos_id = path.fullPath + '__userInfos';
|
|
5836
5836
|
for (let i = 0; i < input_userInfos.length; i++) {
|
|
5837
5837
|
const input_userInfos_item = input_userInfos[i];
|
|
5838
5838
|
let input_userInfos_item_id = input_userInfos_id + '__' + i;
|
|
5839
|
-
input_userInfos[i] = ingest$
|
|
5839
|
+
input_userInfos[i] = ingest$b(input_userInfos_item, {
|
|
5840
5840
|
fullPath: input_userInfos_item_id,
|
|
5841
5841
|
propertyName: i,
|
|
5842
5842
|
parent: {
|
|
@@ -5849,10 +5849,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
5849
5849
|
}
|
|
5850
5850
|
return input;
|
|
5851
5851
|
}
|
|
5852
|
-
const select$
|
|
5852
|
+
const select$4 = function SlackUserInfosOutputRepresentationSelect() {
|
|
5853
5853
|
return {
|
|
5854
5854
|
kind: 'Fragment',
|
|
5855
|
-
version: VERSION,
|
|
5855
|
+
version: VERSION$2,
|
|
5856
5856
|
private: [],
|
|
5857
5857
|
selections: [
|
|
5858
5858
|
{
|
|
@@ -5863,12 +5863,12 @@ const select$1 = function SlackUserInfosOutputRepresentationSelect() {
|
|
|
5863
5863
|
name: 'userInfos',
|
|
5864
5864
|
kind: 'Link',
|
|
5865
5865
|
plural: true,
|
|
5866
|
-
fragment: select$
|
|
5866
|
+
fragment: select$m()
|
|
5867
5867
|
}
|
|
5868
5868
|
]
|
|
5869
5869
|
};
|
|
5870
5870
|
};
|
|
5871
|
-
function equals(existing, incoming) {
|
|
5871
|
+
function equals$2(existing, incoming) {
|
|
5872
5872
|
const existing_searchString = existing.searchString;
|
|
5873
5873
|
const incoming_searchString = incoming.searchString;
|
|
5874
5874
|
if (!(existing_searchString === incoming_searchString)) {
|
|
@@ -5886,7 +5886,320 @@ function equals(existing, incoming) {
|
|
|
5886
5886
|
}
|
|
5887
5887
|
return true;
|
|
5888
5888
|
}
|
|
5889
|
-
const ingest = function SlackUserInfosOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5889
|
+
const ingest$2 = function SlackUserInfosOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5890
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5891
|
+
const validateError = validate$2(input);
|
|
5892
|
+
if (validateError !== null) {
|
|
5893
|
+
throw validateError;
|
|
5894
|
+
}
|
|
5895
|
+
}
|
|
5896
|
+
const key = path.fullPath;
|
|
5897
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
5898
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "Slack", VERSION$2, RepresentationType$2, equals$2);
|
|
5899
|
+
return createLink(key);
|
|
5900
|
+
};
|
|
5901
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
5902
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5903
|
+
const rootKey = fullPathFactory();
|
|
5904
|
+
rootKeySet.set(rootKey, {
|
|
5905
|
+
namespace: keyPrefix,
|
|
5906
|
+
representationName: RepresentationType$2,
|
|
5907
|
+
mergeable: false
|
|
5908
|
+
});
|
|
5909
|
+
const input_userInfos_length = input.userInfos.length;
|
|
5910
|
+
for (let i = 0; i < input_userInfos_length; i++) {
|
|
5911
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.userInfos[i]);
|
|
5912
|
+
}
|
|
5913
|
+
}
|
|
5914
|
+
|
|
5915
|
+
function select$3(luvio, params) {
|
|
5916
|
+
return select$4();
|
|
5917
|
+
}
|
|
5918
|
+
function keyBuilder$4(luvio, params) {
|
|
5919
|
+
return keyPrefix + '::SlackUserInfosOutputRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'search:' + params.queryParams.search + ',' + 'teamId:' + params.queryParams.teamId + ')';
|
|
5920
|
+
}
|
|
5921
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
5922
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
5923
|
+
}
|
|
5924
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
5925
|
+
const { body } = response;
|
|
5926
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
5927
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5928
|
+
const snapshot = luvio.storeLookup({
|
|
5929
|
+
recordId: key,
|
|
5930
|
+
node: select$3(),
|
|
5931
|
+
variables: {},
|
|
5932
|
+
}, snapshotRefresh);
|
|
5933
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5934
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5935
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5938
|
+
deepFreeze(snapshot.data);
|
|
5939
|
+
return snapshot;
|
|
5940
|
+
}
|
|
5941
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
5942
|
+
const key = keyBuilder$4(luvio, params);
|
|
5943
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5944
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
5945
|
+
return errorSnapshot;
|
|
5946
|
+
}
|
|
5947
|
+
function createResourceRequest$1(config) {
|
|
5948
|
+
const headers = {};
|
|
5949
|
+
return {
|
|
5950
|
+
baseUri: '/services/data/v64.0',
|
|
5951
|
+
basePath: '/connect/swarming/slack/search/user',
|
|
5952
|
+
method: 'get',
|
|
5953
|
+
body: null,
|
|
5954
|
+
urlParams: {},
|
|
5955
|
+
queryParams: config.queryParams,
|
|
5956
|
+
headers,
|
|
5957
|
+
priority: 'normal',
|
|
5958
|
+
};
|
|
5959
|
+
}
|
|
5960
|
+
|
|
5961
|
+
const adapterName$1 = 'getSlackSearchUser';
|
|
5962
|
+
const getSlackSearchUser_ConfigPropertyMetadata = [
|
|
5963
|
+
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5964
|
+
generateParamConfigMetadata('search', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5965
|
+
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5966
|
+
];
|
|
5967
|
+
const getSlackSearchUser_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getSlackSearchUser_ConfigPropertyMetadata);
|
|
5968
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$g(getSlackSearchUser_ConfigPropertyMetadata);
|
|
5969
|
+
function keyBuilder$3(luvio, config) {
|
|
5970
|
+
const resourceParams = createResourceParams$1(config);
|
|
5971
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
5972
|
+
}
|
|
5973
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
5974
|
+
const config = {};
|
|
5975
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackSearchUser_ConfigPropertyMetadata);
|
|
5976
|
+
return config;
|
|
5977
|
+
}
|
|
5978
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
5979
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5980
|
+
return null;
|
|
5981
|
+
}
|
|
5982
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5983
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5984
|
+
}
|
|
5985
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
5986
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5987
|
+
return null;
|
|
5988
|
+
}
|
|
5989
|
+
return config;
|
|
5990
|
+
}
|
|
5991
|
+
function adapterFragment$1(luvio, config) {
|
|
5992
|
+
createResourceParams$1(config);
|
|
5993
|
+
return select$3();
|
|
5994
|
+
}
|
|
5995
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
5996
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
5997
|
+
config,
|
|
5998
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
5999
|
+
});
|
|
6000
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6001
|
+
}
|
|
6002
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
6003
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
6004
|
+
config,
|
|
6005
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
6006
|
+
});
|
|
6007
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6008
|
+
}
|
|
6009
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
6010
|
+
const resourceParams = createResourceParams$1(config);
|
|
6011
|
+
const request = createResourceRequest$1(resourceParams);
|
|
6012
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
6013
|
+
.then((response) => {
|
|
6014
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
6015
|
+
const cache = new StoreKeyMap();
|
|
6016
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
6017
|
+
return cache;
|
|
6018
|
+
});
|
|
6019
|
+
}, (response) => {
|
|
6020
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
6021
|
+
});
|
|
6022
|
+
}
|
|
6023
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
6024
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
6025
|
+
}
|
|
6026
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
6027
|
+
const { luvio, config } = context;
|
|
6028
|
+
const selector = {
|
|
6029
|
+
recordId: keyBuilder$3(luvio, config),
|
|
6030
|
+
node: adapterFragment$1(luvio, config),
|
|
6031
|
+
variables: {},
|
|
6032
|
+
};
|
|
6033
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
6034
|
+
config,
|
|
6035
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
6036
|
+
});
|
|
6037
|
+
return cacheSnapshot;
|
|
6038
|
+
}
|
|
6039
|
+
const getSlackSearchUserAdapterFactory = (luvio) => function Slack__getSlackSearchUser(untrustedConfig, requestContext) {
|
|
6040
|
+
const config = validateAdapterConfig$1(untrustedConfig, getSlackSearchUser_ConfigPropertyNames);
|
|
6041
|
+
// Invalid or incomplete config
|
|
6042
|
+
if (config === null) {
|
|
6043
|
+
return null;
|
|
6044
|
+
}
|
|
6045
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
6046
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
6047
|
+
};
|
|
6048
|
+
|
|
6049
|
+
const VERSION$1 = "6453ed899bced31c850a412b8852eba0";
|
|
6050
|
+
function validate$1(obj, path = 'SlackWorkspaceOutputRepresentation') {
|
|
6051
|
+
const v_error = (() => {
|
|
6052
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
6053
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
6054
|
+
}
|
|
6055
|
+
const obj_id = obj.id;
|
|
6056
|
+
const path_id = path + '.id';
|
|
6057
|
+
if (typeof obj_id !== 'string') {
|
|
6058
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
6059
|
+
}
|
|
6060
|
+
const obj_name = obj.name;
|
|
6061
|
+
const path_name = path + '.name';
|
|
6062
|
+
if (typeof obj_name !== 'string') {
|
|
6063
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
6064
|
+
}
|
|
6065
|
+
})();
|
|
6066
|
+
return v_error === undefined ? null : v_error;
|
|
6067
|
+
}
|
|
6068
|
+
const RepresentationType$1 = 'SlackWorkspaceOutputRepresentation';
|
|
6069
|
+
function keyBuilder$2(luvio, config) {
|
|
6070
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
6071
|
+
}
|
|
6072
|
+
function keyBuilderFromType(luvio, object) {
|
|
6073
|
+
const keyParams = {
|
|
6074
|
+
id: object.id
|
|
6075
|
+
};
|
|
6076
|
+
return keyBuilder$2(luvio, keyParams);
|
|
6077
|
+
}
|
|
6078
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
6079
|
+
return input;
|
|
6080
|
+
}
|
|
6081
|
+
const select$2 = function SlackWorkspaceOutputRepresentationSelect() {
|
|
6082
|
+
return {
|
|
6083
|
+
kind: 'Fragment',
|
|
6084
|
+
version: VERSION$1,
|
|
6085
|
+
private: [],
|
|
6086
|
+
selections: [
|
|
6087
|
+
{
|
|
6088
|
+
name: 'id',
|
|
6089
|
+
kind: 'Scalar'
|
|
6090
|
+
},
|
|
6091
|
+
{
|
|
6092
|
+
name: 'name',
|
|
6093
|
+
kind: 'Scalar'
|
|
6094
|
+
}
|
|
6095
|
+
]
|
|
6096
|
+
};
|
|
6097
|
+
};
|
|
6098
|
+
function equals$1(existing, incoming) {
|
|
6099
|
+
const existing_id = existing.id;
|
|
6100
|
+
const incoming_id = incoming.id;
|
|
6101
|
+
if (!(existing_id === incoming_id)) {
|
|
6102
|
+
return false;
|
|
6103
|
+
}
|
|
6104
|
+
const existing_name = existing.name;
|
|
6105
|
+
const incoming_name = incoming.name;
|
|
6106
|
+
if (!(existing_name === incoming_name)) {
|
|
6107
|
+
return false;
|
|
6108
|
+
}
|
|
6109
|
+
return true;
|
|
6110
|
+
}
|
|
6111
|
+
const ingest$1 = function SlackWorkspaceOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
6112
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6113
|
+
const validateError = validate$1(input);
|
|
6114
|
+
if (validateError !== null) {
|
|
6115
|
+
throw validateError;
|
|
6116
|
+
}
|
|
6117
|
+
}
|
|
6118
|
+
const key = keyBuilderFromType(luvio, input);
|
|
6119
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
6120
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "Slack", VERSION$1, RepresentationType$1, equals$1);
|
|
6121
|
+
return createLink(key);
|
|
6122
|
+
};
|
|
6123
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
6124
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
6125
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
6126
|
+
rootKeySet.set(rootKey, {
|
|
6127
|
+
namespace: keyPrefix,
|
|
6128
|
+
representationName: RepresentationType$1,
|
|
6129
|
+
mergeable: false
|
|
6130
|
+
});
|
|
6131
|
+
}
|
|
6132
|
+
|
|
6133
|
+
const VERSION = "d9c689c48bbf920db76831d7dd0de8b0";
|
|
6134
|
+
function validate(obj, path = 'SlackWorkspaceListOutputRepresentation') {
|
|
6135
|
+
const v_error = (() => {
|
|
6136
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
6137
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
6138
|
+
}
|
|
6139
|
+
const obj_slackWorkspaceList = obj.slackWorkspaceList;
|
|
6140
|
+
const path_slackWorkspaceList = path + '.slackWorkspaceList';
|
|
6141
|
+
if (!ArrayIsArray(obj_slackWorkspaceList)) {
|
|
6142
|
+
return new TypeError('Expected "array" but received "' + typeof obj_slackWorkspaceList + '" (at "' + path_slackWorkspaceList + '")');
|
|
6143
|
+
}
|
|
6144
|
+
for (let i = 0; i < obj_slackWorkspaceList.length; i++) {
|
|
6145
|
+
const obj_slackWorkspaceList_item = obj_slackWorkspaceList[i];
|
|
6146
|
+
const path_slackWorkspaceList_item = path_slackWorkspaceList + '[' + i + ']';
|
|
6147
|
+
if (typeof obj_slackWorkspaceList_item !== 'object') {
|
|
6148
|
+
return new TypeError('Expected "object" but received "' + typeof obj_slackWorkspaceList_item + '" (at "' + path_slackWorkspaceList_item + '")');
|
|
6149
|
+
}
|
|
6150
|
+
}
|
|
6151
|
+
})();
|
|
6152
|
+
return v_error === undefined ? null : v_error;
|
|
6153
|
+
}
|
|
6154
|
+
const RepresentationType = 'SlackWorkspaceListOutputRepresentation';
|
|
6155
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
6156
|
+
const input_slackWorkspaceList = input.slackWorkspaceList;
|
|
6157
|
+
const input_slackWorkspaceList_id = path.fullPath + '__slackWorkspaceList';
|
|
6158
|
+
for (let i = 0; i < input_slackWorkspaceList.length; i++) {
|
|
6159
|
+
const input_slackWorkspaceList_item = input_slackWorkspaceList[i];
|
|
6160
|
+
let input_slackWorkspaceList_item_id = input_slackWorkspaceList_id + '__' + i;
|
|
6161
|
+
input_slackWorkspaceList[i] = ingest$1(input_slackWorkspaceList_item, {
|
|
6162
|
+
fullPath: input_slackWorkspaceList_item_id,
|
|
6163
|
+
propertyName: i,
|
|
6164
|
+
parent: {
|
|
6165
|
+
data: input,
|
|
6166
|
+
key: path.fullPath,
|
|
6167
|
+
existing: existing,
|
|
6168
|
+
},
|
|
6169
|
+
ttl: path.ttl
|
|
6170
|
+
}, luvio, store, timestamp);
|
|
6171
|
+
}
|
|
6172
|
+
return input;
|
|
6173
|
+
}
|
|
6174
|
+
const select$1 = function SlackWorkspaceListOutputRepresentationSelect() {
|
|
6175
|
+
return {
|
|
6176
|
+
kind: 'Fragment',
|
|
6177
|
+
version: VERSION,
|
|
6178
|
+
private: [],
|
|
6179
|
+
selections: [
|
|
6180
|
+
{
|
|
6181
|
+
name: 'slackWorkspaceList',
|
|
6182
|
+
kind: 'Link',
|
|
6183
|
+
plural: true,
|
|
6184
|
+
fragment: select$2()
|
|
6185
|
+
}
|
|
6186
|
+
]
|
|
6187
|
+
};
|
|
6188
|
+
};
|
|
6189
|
+
function equals(existing, incoming) {
|
|
6190
|
+
const existing_slackWorkspaceList = existing.slackWorkspaceList;
|
|
6191
|
+
const incoming_slackWorkspaceList = incoming.slackWorkspaceList;
|
|
6192
|
+
const equals_slackWorkspaceList_items = equalsArray(existing_slackWorkspaceList, incoming_slackWorkspaceList, (existing_slackWorkspaceList_item, incoming_slackWorkspaceList_item) => {
|
|
6193
|
+
if (!(existing_slackWorkspaceList_item.__ref === incoming_slackWorkspaceList_item.__ref)) {
|
|
6194
|
+
return false;
|
|
6195
|
+
}
|
|
6196
|
+
});
|
|
6197
|
+
if (equals_slackWorkspaceList_items === false) {
|
|
6198
|
+
return false;
|
|
6199
|
+
}
|
|
6200
|
+
return true;
|
|
6201
|
+
}
|
|
6202
|
+
const ingest = function SlackWorkspaceListOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5890
6203
|
if (process.env.NODE_ENV !== 'production') {
|
|
5891
6204
|
const validateError = validate(input);
|
|
5892
6205
|
if (validateError !== null) {
|
|
@@ -5906,9 +6219,9 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
5906
6219
|
representationName: RepresentationType,
|
|
5907
6220
|
mergeable: false
|
|
5908
6221
|
});
|
|
5909
|
-
const
|
|
5910
|
-
for (let i = 0; i <
|
|
5911
|
-
getTypeCacheKeys$
|
|
6222
|
+
const input_slackWorkspaceList_length = input.slackWorkspaceList.length;
|
|
6223
|
+
for (let i = 0; i < input_slackWorkspaceList_length; i++) {
|
|
6224
|
+
getTypeCacheKeys$1(rootKeySet, luvio, input.slackWorkspaceList[i]);
|
|
5912
6225
|
}
|
|
5913
6226
|
}
|
|
5914
6227
|
|
|
@@ -5916,7 +6229,7 @@ function select(luvio, params) {
|
|
|
5916
6229
|
return select$1();
|
|
5917
6230
|
}
|
|
5918
6231
|
function keyBuilder$1(luvio, params) {
|
|
5919
|
-
return keyPrefix + '::
|
|
6232
|
+
return keyPrefix + '::SlackWorkspaceListOutputRepresentation:(' + 'appId:' + params.queryParams.appId + ')';
|
|
5920
6233
|
}
|
|
5921
6234
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
5922
6235
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
@@ -5948,7 +6261,7 @@ function createResourceRequest(config) {
|
|
|
5948
6261
|
const headers = {};
|
|
5949
6262
|
return {
|
|
5950
6263
|
baseUri: '/services/data/v64.0',
|
|
5951
|
-
basePath: '/connect/swarming/
|
|
6264
|
+
basePath: '/connect/swarming/workspaces',
|
|
5952
6265
|
method: 'get',
|
|
5953
6266
|
body: null,
|
|
5954
6267
|
urlParams: {},
|
|
@@ -5958,21 +6271,19 @@ function createResourceRequest(config) {
|
|
|
5958
6271
|
};
|
|
5959
6272
|
}
|
|
5960
6273
|
|
|
5961
|
-
const adapterName = '
|
|
5962
|
-
const
|
|
6274
|
+
const adapterName = 'getSlackWorkspace';
|
|
6275
|
+
const getSlackWorkspace_ConfigPropertyMetadata = [
|
|
5963
6276
|
generateParamConfigMetadata('appId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5964
|
-
generateParamConfigMetadata('search', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5965
|
-
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5966
6277
|
];
|
|
5967
|
-
const
|
|
5968
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
6278
|
+
const getSlackWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSlackWorkspace_ConfigPropertyMetadata);
|
|
6279
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$g(getSlackWorkspace_ConfigPropertyMetadata);
|
|
5969
6280
|
function keyBuilder(luvio, config) {
|
|
5970
6281
|
const resourceParams = createResourceParams(config);
|
|
5971
6282
|
return keyBuilder$1(luvio, resourceParams);
|
|
5972
6283
|
}
|
|
5973
6284
|
function typeCheckConfig(untrustedConfig) {
|
|
5974
6285
|
const config = {};
|
|
5975
|
-
typeCheckConfig$
|
|
6286
|
+
typeCheckConfig$g(untrustedConfig, config, getSlackWorkspace_ConfigPropertyMetadata);
|
|
5976
6287
|
return config;
|
|
5977
6288
|
}
|
|
5978
6289
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -6021,7 +6332,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
6021
6332
|
});
|
|
6022
6333
|
}
|
|
6023
6334
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
6024
|
-
return buildNetworkSnapshotCachePolicy$
|
|
6335
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
6025
6336
|
}
|
|
6026
6337
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
6027
6338
|
const { luvio, config } = context;
|
|
@@ -6036,8 +6347,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
6036
6347
|
});
|
|
6037
6348
|
return cacheSnapshot;
|
|
6038
6349
|
}
|
|
6039
|
-
const
|
|
6040
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
6350
|
+
const getSlackWorkspaceAdapterFactory = (luvio) => function Slack__getSlackWorkspace(untrustedConfig, requestContext) {
|
|
6351
|
+
const config = validateAdapterConfig(untrustedConfig, getSlackWorkspace_ConfigPropertyNames);
|
|
6041
6352
|
// Invalid or incomplete config
|
|
6042
6353
|
if (config === null) {
|
|
6043
6354
|
return null;
|
|
@@ -6046,4 +6357,4 @@ const getSlackSearchUserAdapterFactory = (luvio) => function Slack__getSlackSear
|
|
|
6046
6357
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
6047
6358
|
};
|
|
6048
6359
|
|
|
6049
|
-
export { deleteSlackMessageAdapterFactory, deleteSlackMessageReactionsAdapterFactory, getSlackConversationAdapterFactory, getSlackConversationInfoAdapterFactory, getSlackCustomEmojiAdapterFactory, getSlackMessageAdapterFactory, getSlackSalesforceAuthAdapterFactory, getSlackSearchConversationAdapterFactory, getSlackSearchEmojiAdapterFactory, getSlackSearchUserAdapterFactory, getSlackUserAdapterFactory, patchSlackMessageAdapterFactory, postSlackConversationAdapterFactory, postSlackFileAdapterFactory, postSlackMessageReactionsAdapterFactory };
|
|
6360
|
+
export { deleteSlackMessageAdapterFactory, deleteSlackMessageReactionsAdapterFactory, getSlackConversationAdapterFactory, getSlackConversationInfoAdapterFactory, getSlackCustomEmojiAdapterFactory, getSlackMessageAdapterFactory, getSlackSalesforceAuthAdapterFactory, getSlackSearchConversationAdapterFactory, getSlackSearchEmojiAdapterFactory, getSlackSearchUserAdapterFactory, getSlackUserAdapterFactory, getSlackWorkspaceAdapterFactory, patchSlackMessageAdapterFactory, postSlackConversationAdapterFactory, postSlackFileAdapterFactory, postSlackMessageReactionsAdapterFactory };
|