@salesforce/lds-adapters-platform-slack-bridge 1.332.0-dev3 → 1.332.0-dev5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/platform-slack-bridge.js +2068 -898
- package/dist/es/es2018/types/src/generated/adapters/deleteSlackConversationMember.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/adapters/getSlackConversationMember.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/getSlackConversationMembers.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/getSlackRecordChannelInfo.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/postSlackConversationMembers.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/adapters/postSlackRecordChannelInfos.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +6 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +13 -1
- package/dist/es/es2018/types/src/generated/resources/deleteConnectSlackbridgeTeamChannelMembersByChannelIdAndSlackUserIdAndTeamId.d.ts +14 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectSlackbridgeRecord_channelsByRelatedRecordId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectSlackbridgeTeamChannelMembersByChannelIdAndSlackUserIdAndTeamId.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectSlackbridgeTeamChannelMembersByChannelIdAndTeamId.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectSlackbridgeRecord_channels.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectSlackbridgeTeamChannelMembersByChannelIdAndTeamId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/SlackBridgeConversationInfoOutputRepresentation.d.ts +16 -4
- package/dist/es/es2018/types/src/generated/types/SlackBridgeConversationInfosOutputRepresentation.d.ts +12 -3
- package/dist/es/es2018/types/src/generated/types/SlackBridgeConversationInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/SlackBridgeConversationMemberOutputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/SlackBridgeConversationMembersInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/SlackBridgeConversationMembersOutputRepresentation.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/SlackBridgeConversationOutputRepresentation.d.ts +5 -3
- package/dist/es/es2018/types/src/generated/types/SlackBridgeMessageOutputRepresentation.d.ts +15 -1
- package/dist/es/es2018/types/src/generated/types/SlackBridgeRecordChannelInfoInputRepresentation.d.ts +36 -0
- package/dist/es/es2018/types/src/generated/types/SlackBridgeRecordChannelInfoOutputRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/SlackBridgeUserInfoOutputRepresentation.d.ts +1 -1
- package/package.json +3 -3
- package/sfdc/index.js +2468 -1139
- package/src/raml/api.raml +273 -88
- package/src/raml/luvio.raml +74 -26
|
@@ -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$9, typeCheckConfig as typeCheckConfig$i, StoreKeyMap, createResourceParams as createResourceParams$i } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -73,6 +73,7 @@ const keyPrefix = 'SlackBridge';
|
|
|
73
73
|
|
|
74
74
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
75
75
|
const { isArray: ArrayIsArray } = Array;
|
|
76
|
+
const { stringify: JSONStringify } = JSON;
|
|
76
77
|
function equalsArray(a, b, equalsItem) {
|
|
77
78
|
const aLength = a.length;
|
|
78
79
|
const bLength = b.length;
|
|
@@ -111,196 +112,73 @@ function createLink(ref) {
|
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
const VERSION$
|
|
115
|
-
function validate$
|
|
115
|
+
const VERSION$j = "a398e130daf23612644f70d0705347e8";
|
|
116
|
+
function validate$j(obj, path = 'SlackBridgeEmojiOutputRepresentation') {
|
|
116
117
|
const v_error = (() => {
|
|
117
118
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
118
119
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
119
120
|
}
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
if (typeof
|
|
123
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
124
|
-
}
|
|
125
|
-
const obj_isArchived = obj.isArchived;
|
|
126
|
-
const path_isArchived = path + '.isArchived';
|
|
127
|
-
if (typeof obj_isArchived !== 'boolean') {
|
|
128
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isArchived + '" (at "' + path_isArchived + '")');
|
|
129
|
-
}
|
|
130
|
-
const obj_isChannel = obj.isChannel;
|
|
131
|
-
const path_isChannel = path + '.isChannel';
|
|
132
|
-
if (typeof obj_isChannel !== 'boolean') {
|
|
133
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isChannel + '" (at "' + path_isChannel + '")');
|
|
121
|
+
const obj_altText = obj.altText;
|
|
122
|
+
const path_altText = path + '.altText';
|
|
123
|
+
if (typeof obj_altText !== 'string') {
|
|
124
|
+
return new TypeError('Expected "string" but received "' + typeof obj_altText + '" (at "' + path_altText + '")');
|
|
134
125
|
}
|
|
135
|
-
const
|
|
136
|
-
const
|
|
137
|
-
let
|
|
138
|
-
const
|
|
139
|
-
if (typeof
|
|
140
|
-
return new TypeError('Expected "boolean" but received "' + typeof
|
|
126
|
+
const obj_isCustom = obj.isCustom;
|
|
127
|
+
const path_isCustom = path + '.isCustom';
|
|
128
|
+
let obj_isCustom_union0 = null;
|
|
129
|
+
const obj_isCustom_union0_error = (() => {
|
|
130
|
+
if (typeof obj_isCustom !== 'boolean') {
|
|
131
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isCustom + '" (at "' + path_isCustom + '")');
|
|
141
132
|
}
|
|
142
133
|
})();
|
|
143
|
-
if (
|
|
144
|
-
|
|
134
|
+
if (obj_isCustom_union0_error != null) {
|
|
135
|
+
obj_isCustom_union0 = obj_isCustom_union0_error.message;
|
|
145
136
|
}
|
|
146
|
-
let
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
return new TypeError('Expected "null" but received "' + typeof
|
|
137
|
+
let obj_isCustom_union1 = null;
|
|
138
|
+
const obj_isCustom_union1_error = (() => {
|
|
139
|
+
if (obj_isCustom !== null) {
|
|
140
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isCustom + '" (at "' + path_isCustom + '")');
|
|
150
141
|
}
|
|
151
142
|
})();
|
|
152
|
-
if (
|
|
153
|
-
|
|
143
|
+
if (obj_isCustom_union1_error != null) {
|
|
144
|
+
obj_isCustom_union1 = obj_isCustom_union1_error.message;
|
|
154
145
|
}
|
|
155
|
-
if (
|
|
156
|
-
let message = 'Object doesn\'t match union (at "' +
|
|
157
|
-
message += '\n' +
|
|
158
|
-
message += '\n' +
|
|
146
|
+
if (obj_isCustom_union0 && obj_isCustom_union1) {
|
|
147
|
+
let message = 'Object doesn\'t match union (at "' + path_isCustom + '")';
|
|
148
|
+
message += '\n' + obj_isCustom_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
149
|
+
message += '\n' + obj_isCustom_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
159
150
|
return new TypeError(message);
|
|
160
151
|
}
|
|
161
|
-
const obj_isGroup = obj.isGroup;
|
|
162
|
-
const path_isGroup = path + '.isGroup';
|
|
163
|
-
if (typeof obj_isGroup !== 'boolean') {
|
|
164
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isGroup + '" (at "' + path_isGroup + '")');
|
|
165
|
-
}
|
|
166
|
-
const obj_isIm = obj.isIm;
|
|
167
|
-
const path_isIm = path + '.isIm';
|
|
168
|
-
if (typeof obj_isIm !== 'boolean') {
|
|
169
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isIm + '" (at "' + path_isIm + '")');
|
|
170
|
-
}
|
|
171
|
-
const obj_isMember = obj.isMember;
|
|
172
|
-
const path_isMember = path + '.isMember';
|
|
173
|
-
if (typeof obj_isMember !== 'boolean') {
|
|
174
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isMember + '" (at "' + path_isMember + '")');
|
|
175
|
-
}
|
|
176
|
-
const obj_isOpen = obj.isOpen;
|
|
177
|
-
const path_isOpen = path + '.isOpen';
|
|
178
|
-
if (typeof obj_isOpen !== 'boolean') {
|
|
179
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isOpen + '" (at "' + path_isOpen + '")');
|
|
180
|
-
}
|
|
181
|
-
const obj_isPrivate = obj.isPrivate;
|
|
182
|
-
const path_isPrivate = path + '.isPrivate';
|
|
183
|
-
if (typeof obj_isPrivate !== 'boolean') {
|
|
184
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isPrivate + '" (at "' + path_isPrivate + '")');
|
|
185
|
-
}
|
|
186
|
-
const obj_isReadOnly = obj.isReadOnly;
|
|
187
|
-
const path_isReadOnly = path + '.isReadOnly';
|
|
188
|
-
if (typeof obj_isReadOnly !== 'boolean') {
|
|
189
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isReadOnly + '" (at "' + path_isReadOnly + '")');
|
|
190
|
-
}
|
|
191
|
-
const obj_isThreadOnly = obj.isThreadOnly;
|
|
192
|
-
const path_isThreadOnly = path + '.isThreadOnly';
|
|
193
|
-
if (typeof obj_isThreadOnly !== 'boolean') {
|
|
194
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isThreadOnly + '" (at "' + path_isThreadOnly + '")');
|
|
195
|
-
}
|
|
196
152
|
const obj_name = obj.name;
|
|
197
153
|
const path_name = path + '.name';
|
|
198
154
|
if (typeof obj_name !== 'string') {
|
|
199
155
|
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
200
156
|
}
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
if (typeof obj_numOfMembers !== 'number' || (typeof obj_numOfMembers === 'number' && Math.floor(obj_numOfMembers) !== obj_numOfMembers)) {
|
|
206
|
-
return new TypeError('Expected "integer" but received "' + typeof obj_numOfMembers + '" (at "' + path_numOfMembers + '")');
|
|
207
|
-
}
|
|
208
|
-
})();
|
|
209
|
-
if (obj_numOfMembers_union0_error != null) {
|
|
210
|
-
obj_numOfMembers_union0 = obj_numOfMembers_union0_error.message;
|
|
211
|
-
}
|
|
212
|
-
let obj_numOfMembers_union1 = null;
|
|
213
|
-
const obj_numOfMembers_union1_error = (() => {
|
|
214
|
-
if (obj_numOfMembers !== null) {
|
|
215
|
-
return new TypeError('Expected "null" but received "' + typeof obj_numOfMembers + '" (at "' + path_numOfMembers + '")');
|
|
216
|
-
}
|
|
217
|
-
})();
|
|
218
|
-
if (obj_numOfMembers_union1_error != null) {
|
|
219
|
-
obj_numOfMembers_union1 = obj_numOfMembers_union1_error.message;
|
|
220
|
-
}
|
|
221
|
-
if (obj_numOfMembers_union0 && obj_numOfMembers_union1) {
|
|
222
|
-
let message = 'Object doesn\'t match union (at "' + path_numOfMembers + '")';
|
|
223
|
-
message += '\n' + obj_numOfMembers_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
224
|
-
message += '\n' + obj_numOfMembers_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
225
|
-
return new TypeError(message);
|
|
226
|
-
}
|
|
227
|
-
const obj_shouldCacheCustomEmoji = obj.shouldCacheCustomEmoji;
|
|
228
|
-
const path_shouldCacheCustomEmoji = path + '.shouldCacheCustomEmoji';
|
|
229
|
-
let obj_shouldCacheCustomEmoji_union0 = null;
|
|
230
|
-
const obj_shouldCacheCustomEmoji_union0_error = (() => {
|
|
231
|
-
if (typeof obj_shouldCacheCustomEmoji !== 'boolean') {
|
|
232
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_shouldCacheCustomEmoji + '" (at "' + path_shouldCacheCustomEmoji + '")');
|
|
233
|
-
}
|
|
234
|
-
})();
|
|
235
|
-
if (obj_shouldCacheCustomEmoji_union0_error != null) {
|
|
236
|
-
obj_shouldCacheCustomEmoji_union0 = obj_shouldCacheCustomEmoji_union0_error.message;
|
|
237
|
-
}
|
|
238
|
-
let obj_shouldCacheCustomEmoji_union1 = null;
|
|
239
|
-
const obj_shouldCacheCustomEmoji_union1_error = (() => {
|
|
240
|
-
if (obj_shouldCacheCustomEmoji !== null) {
|
|
241
|
-
return new TypeError('Expected "null" but received "' + typeof obj_shouldCacheCustomEmoji + '" (at "' + path_shouldCacheCustomEmoji + '")');
|
|
242
|
-
}
|
|
243
|
-
})();
|
|
244
|
-
if (obj_shouldCacheCustomEmoji_union1_error != null) {
|
|
245
|
-
obj_shouldCacheCustomEmoji_union1 = obj_shouldCacheCustomEmoji_union1_error.message;
|
|
157
|
+
const obj_unicode = obj.unicode;
|
|
158
|
+
const path_unicode = path + '.unicode';
|
|
159
|
+
if (typeof obj_unicode !== 'string') {
|
|
160
|
+
return new TypeError('Expected "string" but received "' + typeof obj_unicode + '" (at "' + path_unicode + '")');
|
|
246
161
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
return new TypeError(message);
|
|
162
|
+
const obj_url = obj.url;
|
|
163
|
+
const path_url = path + '.url';
|
|
164
|
+
if (typeof obj_url !== 'string') {
|
|
165
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
252
166
|
}
|
|
253
167
|
})();
|
|
254
168
|
return v_error === undefined ? null : v_error;
|
|
255
169
|
}
|
|
256
|
-
const select$
|
|
170
|
+
const select$y = function SlackBridgeEmojiOutputRepresentationSelect() {
|
|
257
171
|
return {
|
|
258
172
|
kind: 'Fragment',
|
|
259
|
-
version: VERSION$
|
|
173
|
+
version: VERSION$j,
|
|
260
174
|
private: [],
|
|
261
175
|
selections: [
|
|
262
176
|
{
|
|
263
|
-
name: '
|
|
264
|
-
kind: 'Scalar'
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
name: 'isArchived',
|
|
268
|
-
kind: 'Scalar'
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
name: 'isChannel',
|
|
272
|
-
kind: 'Scalar'
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
name: 'isCustomEmojiSupported',
|
|
276
|
-
kind: 'Scalar'
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
name: 'isGroup',
|
|
280
|
-
kind: 'Scalar'
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
name: 'isIm',
|
|
284
|
-
kind: 'Scalar'
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
name: 'isMember',
|
|
288
|
-
kind: 'Scalar'
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
name: 'isOpen',
|
|
292
|
-
kind: 'Scalar'
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
name: 'isPrivate',
|
|
296
|
-
kind: 'Scalar'
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
name: 'isReadOnly',
|
|
177
|
+
name: 'altText',
|
|
300
178
|
kind: 'Scalar'
|
|
301
179
|
},
|
|
302
180
|
{
|
|
303
|
-
name: '
|
|
181
|
+
name: 'isCustom',
|
|
304
182
|
kind: 'Scalar'
|
|
305
183
|
},
|
|
306
184
|
{
|
|
@@ -308,65 +186,20 @@ const select$q = function SlackBridgeConversationInfoOutputRepresentationSelect(
|
|
|
308
186
|
kind: 'Scalar'
|
|
309
187
|
},
|
|
310
188
|
{
|
|
311
|
-
name: '
|
|
189
|
+
name: 'unicode',
|
|
312
190
|
kind: 'Scalar'
|
|
313
191
|
},
|
|
314
192
|
{
|
|
315
|
-
name: '
|
|
193
|
+
name: 'url',
|
|
316
194
|
kind: 'Scalar'
|
|
317
195
|
}
|
|
318
196
|
]
|
|
319
197
|
};
|
|
320
198
|
};
|
|
321
|
-
function equals$
|
|
322
|
-
const
|
|
323
|
-
const
|
|
324
|
-
if (!(
|
|
325
|
-
return false;
|
|
326
|
-
}
|
|
327
|
-
const existing_isChannel = existing.isChannel;
|
|
328
|
-
const incoming_isChannel = incoming.isChannel;
|
|
329
|
-
if (!(existing_isChannel === incoming_isChannel)) {
|
|
330
|
-
return false;
|
|
331
|
-
}
|
|
332
|
-
const existing_isGroup = existing.isGroup;
|
|
333
|
-
const incoming_isGroup = incoming.isGroup;
|
|
334
|
-
if (!(existing_isGroup === incoming_isGroup)) {
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
const existing_isIm = existing.isIm;
|
|
338
|
-
const incoming_isIm = incoming.isIm;
|
|
339
|
-
if (!(existing_isIm === incoming_isIm)) {
|
|
340
|
-
return false;
|
|
341
|
-
}
|
|
342
|
-
const existing_isMember = existing.isMember;
|
|
343
|
-
const incoming_isMember = incoming.isMember;
|
|
344
|
-
if (!(existing_isMember === incoming_isMember)) {
|
|
345
|
-
return false;
|
|
346
|
-
}
|
|
347
|
-
const existing_isOpen = existing.isOpen;
|
|
348
|
-
const incoming_isOpen = incoming.isOpen;
|
|
349
|
-
if (!(existing_isOpen === incoming_isOpen)) {
|
|
350
|
-
return false;
|
|
351
|
-
}
|
|
352
|
-
const existing_isPrivate = existing.isPrivate;
|
|
353
|
-
const incoming_isPrivate = incoming.isPrivate;
|
|
354
|
-
if (!(existing_isPrivate === incoming_isPrivate)) {
|
|
355
|
-
return false;
|
|
356
|
-
}
|
|
357
|
-
const existing_isReadOnly = existing.isReadOnly;
|
|
358
|
-
const incoming_isReadOnly = incoming.isReadOnly;
|
|
359
|
-
if (!(existing_isReadOnly === incoming_isReadOnly)) {
|
|
360
|
-
return false;
|
|
361
|
-
}
|
|
362
|
-
const existing_isThreadOnly = existing.isThreadOnly;
|
|
363
|
-
const incoming_isThreadOnly = incoming.isThreadOnly;
|
|
364
|
-
if (!(existing_isThreadOnly === incoming_isThreadOnly)) {
|
|
365
|
-
return false;
|
|
366
|
-
}
|
|
367
|
-
const existing_id = existing.id;
|
|
368
|
-
const incoming_id = incoming.id;
|
|
369
|
-
if (!(existing_id === incoming_id)) {
|
|
199
|
+
function equals$j(existing, incoming) {
|
|
200
|
+
const existing_altText = existing.altText;
|
|
201
|
+
const incoming_altText = incoming.altText;
|
|
202
|
+
if (!(existing_altText === incoming_altText)) {
|
|
370
203
|
return false;
|
|
371
204
|
}
|
|
372
205
|
const existing_name = existing.name;
|
|
@@ -374,127 +207,14 @@ function equals$g(existing, incoming) {
|
|
|
374
207
|
if (!(existing_name === incoming_name)) {
|
|
375
208
|
return false;
|
|
376
209
|
}
|
|
377
|
-
const
|
|
378
|
-
const
|
|
379
|
-
if (!(
|
|
210
|
+
const existing_unicode = existing.unicode;
|
|
211
|
+
const incoming_unicode = incoming.unicode;
|
|
212
|
+
if (!(existing_unicode === incoming_unicode)) {
|
|
380
213
|
return false;
|
|
381
214
|
}
|
|
382
|
-
const
|
|
383
|
-
const
|
|
384
|
-
if (!(
|
|
385
|
-
return false;
|
|
386
|
-
}
|
|
387
|
-
const existing_shouldCacheCustomEmoji = existing.shouldCacheCustomEmoji;
|
|
388
|
-
const incoming_shouldCacheCustomEmoji = incoming.shouldCacheCustomEmoji;
|
|
389
|
-
if (!(existing_shouldCacheCustomEmoji === incoming_shouldCacheCustomEmoji)) {
|
|
390
|
-
return false;
|
|
391
|
-
}
|
|
392
|
-
return true;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
const VERSION$f = "a398e130daf23612644f70d0705347e8";
|
|
396
|
-
function validate$f(obj, path = 'SlackBridgeEmojiOutputRepresentation') {
|
|
397
|
-
const v_error = (() => {
|
|
398
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
399
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
400
|
-
}
|
|
401
|
-
const obj_altText = obj.altText;
|
|
402
|
-
const path_altText = path + '.altText';
|
|
403
|
-
if (typeof obj_altText !== 'string') {
|
|
404
|
-
return new TypeError('Expected "string" but received "' + typeof obj_altText + '" (at "' + path_altText + '")');
|
|
405
|
-
}
|
|
406
|
-
const obj_isCustom = obj.isCustom;
|
|
407
|
-
const path_isCustom = path + '.isCustom';
|
|
408
|
-
let obj_isCustom_union0 = null;
|
|
409
|
-
const obj_isCustom_union0_error = (() => {
|
|
410
|
-
if (typeof obj_isCustom !== 'boolean') {
|
|
411
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isCustom + '" (at "' + path_isCustom + '")');
|
|
412
|
-
}
|
|
413
|
-
})();
|
|
414
|
-
if (obj_isCustom_union0_error != null) {
|
|
415
|
-
obj_isCustom_union0 = obj_isCustom_union0_error.message;
|
|
416
|
-
}
|
|
417
|
-
let obj_isCustom_union1 = null;
|
|
418
|
-
const obj_isCustom_union1_error = (() => {
|
|
419
|
-
if (obj_isCustom !== null) {
|
|
420
|
-
return new TypeError('Expected "null" but received "' + typeof obj_isCustom + '" (at "' + path_isCustom + '")');
|
|
421
|
-
}
|
|
422
|
-
})();
|
|
423
|
-
if (obj_isCustom_union1_error != null) {
|
|
424
|
-
obj_isCustom_union1 = obj_isCustom_union1_error.message;
|
|
425
|
-
}
|
|
426
|
-
if (obj_isCustom_union0 && obj_isCustom_union1) {
|
|
427
|
-
let message = 'Object doesn\'t match union (at "' + path_isCustom + '")';
|
|
428
|
-
message += '\n' + obj_isCustom_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
429
|
-
message += '\n' + obj_isCustom_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
430
|
-
return new TypeError(message);
|
|
431
|
-
}
|
|
432
|
-
const obj_name = obj.name;
|
|
433
|
-
const path_name = path + '.name';
|
|
434
|
-
if (typeof obj_name !== 'string') {
|
|
435
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
436
|
-
}
|
|
437
|
-
const obj_unicode = obj.unicode;
|
|
438
|
-
const path_unicode = path + '.unicode';
|
|
439
|
-
if (typeof obj_unicode !== 'string') {
|
|
440
|
-
return new TypeError('Expected "string" but received "' + typeof obj_unicode + '" (at "' + path_unicode + '")');
|
|
441
|
-
}
|
|
442
|
-
const obj_url = obj.url;
|
|
443
|
-
const path_url = path + '.url';
|
|
444
|
-
if (typeof obj_url !== 'string') {
|
|
445
|
-
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
446
|
-
}
|
|
447
|
-
})();
|
|
448
|
-
return v_error === undefined ? null : v_error;
|
|
449
|
-
}
|
|
450
|
-
const select$p = function SlackBridgeEmojiOutputRepresentationSelect() {
|
|
451
|
-
return {
|
|
452
|
-
kind: 'Fragment',
|
|
453
|
-
version: VERSION$f,
|
|
454
|
-
private: [],
|
|
455
|
-
selections: [
|
|
456
|
-
{
|
|
457
|
-
name: 'altText',
|
|
458
|
-
kind: 'Scalar'
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
name: 'isCustom',
|
|
462
|
-
kind: 'Scalar'
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
name: 'name',
|
|
466
|
-
kind: 'Scalar'
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
name: 'unicode',
|
|
470
|
-
kind: 'Scalar'
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
name: 'url',
|
|
474
|
-
kind: 'Scalar'
|
|
475
|
-
}
|
|
476
|
-
]
|
|
477
|
-
};
|
|
478
|
-
};
|
|
479
|
-
function equals$f(existing, incoming) {
|
|
480
|
-
const existing_altText = existing.altText;
|
|
481
|
-
const incoming_altText = incoming.altText;
|
|
482
|
-
if (!(existing_altText === incoming_altText)) {
|
|
483
|
-
return false;
|
|
484
|
-
}
|
|
485
|
-
const existing_name = existing.name;
|
|
486
|
-
const incoming_name = incoming.name;
|
|
487
|
-
if (!(existing_name === incoming_name)) {
|
|
488
|
-
return false;
|
|
489
|
-
}
|
|
490
|
-
const existing_unicode = existing.unicode;
|
|
491
|
-
const incoming_unicode = incoming.unicode;
|
|
492
|
-
if (!(existing_unicode === incoming_unicode)) {
|
|
493
|
-
return false;
|
|
494
|
-
}
|
|
495
|
-
const existing_url = existing.url;
|
|
496
|
-
const incoming_url = incoming.url;
|
|
497
|
-
if (!(existing_url === incoming_url)) {
|
|
215
|
+
const existing_url = existing.url;
|
|
216
|
+
const incoming_url = incoming.url;
|
|
217
|
+
if (!(existing_url === incoming_url)) {
|
|
498
218
|
return false;
|
|
499
219
|
}
|
|
500
220
|
const existing_isCustom = existing.isCustom;
|
|
@@ -505,9 +225,9 @@ function equals$f(existing, incoming) {
|
|
|
505
225
|
return true;
|
|
506
226
|
}
|
|
507
227
|
|
|
508
|
-
const TTL =
|
|
509
|
-
const VERSION$
|
|
510
|
-
function validate$
|
|
228
|
+
const TTL = 600000;
|
|
229
|
+
const VERSION$i = "1c89c1c8379c0e55b8f94fecd03d8775";
|
|
230
|
+
function validate$i(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
|
|
511
231
|
const v_error = (() => {
|
|
512
232
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
513
233
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -702,7 +422,7 @@ function validate$e(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
|
|
|
702
422
|
const path_statusEmoji = path + '.statusEmoji';
|
|
703
423
|
let obj_statusEmoji_union0 = null;
|
|
704
424
|
const obj_statusEmoji_union0_error = (() => {
|
|
705
|
-
const referencepath_statusEmojiValidationError = validate$
|
|
425
|
+
const referencepath_statusEmojiValidationError = validate$j(obj_statusEmoji, path_statusEmoji);
|
|
706
426
|
if (referencepath_statusEmojiValidationError !== null) {
|
|
707
427
|
let message = 'Object doesn\'t match SlackBridgeEmojiOutputRepresentation (at "' + path_statusEmoji + '")\n';
|
|
708
428
|
message += referencepath_statusEmojiValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -740,25 +460,25 @@ function validate$e(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
|
|
|
740
460
|
})();
|
|
741
461
|
return v_error === undefined ? null : v_error;
|
|
742
462
|
}
|
|
743
|
-
const RepresentationType$
|
|
744
|
-
function keyBuilder$
|
|
745
|
-
return keyPrefix + '::' + RepresentationType$
|
|
463
|
+
const RepresentationType$e = 'SlackBridgeUserInfoOutputRepresentation';
|
|
464
|
+
function keyBuilder$t(luvio, config) {
|
|
465
|
+
return keyPrefix + '::' + RepresentationType$e + ':' + config.teamId + ':' + config.slackUserId;
|
|
746
466
|
}
|
|
747
|
-
function keyBuilderFromType$
|
|
467
|
+
function keyBuilderFromType$8(luvio, object) {
|
|
748
468
|
const keyParams = {
|
|
749
469
|
teamId: object.teamId,
|
|
750
470
|
slackUserId: object.slackUserId
|
|
751
471
|
};
|
|
752
|
-
return keyBuilder$
|
|
472
|
+
return keyBuilder$t(luvio, keyParams);
|
|
753
473
|
}
|
|
754
|
-
function normalize$
|
|
474
|
+
function normalize$e(input, existing, path, luvio, store, timestamp) {
|
|
755
475
|
return input;
|
|
756
476
|
}
|
|
757
|
-
const select$
|
|
758
|
-
const { selections: SlackBridgeEmojiOutputRepresentation__selections, opaque: SlackBridgeEmojiOutputRepresentation__opaque, } = select$
|
|
477
|
+
const select$x = function SlackBridgeUserInfoOutputRepresentationSelect() {
|
|
478
|
+
const { selections: SlackBridgeEmojiOutputRepresentation__selections, opaque: SlackBridgeEmojiOutputRepresentation__opaque, } = select$y();
|
|
759
479
|
return {
|
|
760
480
|
kind: 'Fragment',
|
|
761
|
-
version: VERSION$
|
|
481
|
+
version: VERSION$i,
|
|
762
482
|
private: [],
|
|
763
483
|
selections: [
|
|
764
484
|
{
|
|
@@ -826,7 +546,7 @@ const select$o = function SlackBridgeUserInfoOutputRepresentationSelect() {
|
|
|
826
546
|
]
|
|
827
547
|
};
|
|
828
548
|
};
|
|
829
|
-
function equals$
|
|
549
|
+
function equals$i(existing, incoming) {
|
|
830
550
|
const existing_bot = existing.bot;
|
|
831
551
|
const incoming_bot = incoming.bot;
|
|
832
552
|
if (!(existing_bot === incoming_bot)) {
|
|
@@ -902,98 +622,243 @@ function equals$e(existing, incoming) {
|
|
|
902
622
|
if (!(existing_statusEmoji === incoming_statusEmoji
|
|
903
623
|
|| (existing_statusEmoji != null &&
|
|
904
624
|
incoming_statusEmoji != null &&
|
|
905
|
-
equals$
|
|
625
|
+
equals$j(existing_statusEmoji, incoming_statusEmoji)))) {
|
|
906
626
|
return false;
|
|
907
627
|
}
|
|
908
628
|
return true;
|
|
909
629
|
}
|
|
910
|
-
const ingest$
|
|
630
|
+
const ingest$e = function SlackBridgeUserInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
911
631
|
if (process.env.NODE_ENV !== 'production') {
|
|
912
|
-
const validateError = validate$
|
|
632
|
+
const validateError = validate$i(input);
|
|
913
633
|
if (validateError !== null) {
|
|
914
634
|
throw validateError;
|
|
915
635
|
}
|
|
916
636
|
}
|
|
917
|
-
const key = keyBuilderFromType$
|
|
637
|
+
const key = keyBuilderFromType$8(luvio, input);
|
|
918
638
|
const ttlToUse = TTL;
|
|
919
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
639
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$e, "SlackBridge", VERSION$i, RepresentationType$e, equals$i);
|
|
920
640
|
return createLink(key);
|
|
921
641
|
};
|
|
922
|
-
function getTypeCacheKeys$
|
|
642
|
+
function getTypeCacheKeys$e(rootKeySet, luvio, input, fullPathFactory) {
|
|
923
643
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
924
|
-
const rootKey = keyBuilderFromType$
|
|
644
|
+
const rootKey = keyBuilderFromType$8(luvio, input);
|
|
925
645
|
rootKeySet.set(rootKey, {
|
|
926
646
|
namespace: keyPrefix,
|
|
927
|
-
representationName: RepresentationType$
|
|
647
|
+
representationName: RepresentationType$e,
|
|
928
648
|
mergeable: false
|
|
929
649
|
});
|
|
930
650
|
}
|
|
931
651
|
|
|
932
|
-
const VERSION$
|
|
933
|
-
function validate$
|
|
652
|
+
const VERSION$h = "462819d22d973a88a4f4a49267fd51bd";
|
|
653
|
+
function validate$h(obj, path = 'SlackBridgeConversationInfoOutputRepresentation') {
|
|
934
654
|
const v_error = (() => {
|
|
935
655
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
936
656
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
937
657
|
}
|
|
938
|
-
const
|
|
939
|
-
const
|
|
940
|
-
if (typeof
|
|
941
|
-
return new TypeError('Expected "
|
|
658
|
+
const obj_id = obj.id;
|
|
659
|
+
const path_id = path + '.id';
|
|
660
|
+
if (typeof obj_id !== 'string') {
|
|
661
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
662
|
+
}
|
|
663
|
+
const obj_isArchived = obj.isArchived;
|
|
664
|
+
const path_isArchived = path + '.isArchived';
|
|
665
|
+
if (typeof obj_isArchived !== 'boolean') {
|
|
666
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isArchived + '" (at "' + path_isArchived + '")');
|
|
667
|
+
}
|
|
668
|
+
const obj_isChannel = obj.isChannel;
|
|
669
|
+
const path_isChannel = path + '.isChannel';
|
|
670
|
+
if (typeof obj_isChannel !== 'boolean') {
|
|
671
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isChannel + '" (at "' + path_isChannel + '")');
|
|
672
|
+
}
|
|
673
|
+
const obj_isCustomEmojiSupported = obj.isCustomEmojiSupported;
|
|
674
|
+
const path_isCustomEmojiSupported = path + '.isCustomEmojiSupported';
|
|
675
|
+
let obj_isCustomEmojiSupported_union0 = null;
|
|
676
|
+
const obj_isCustomEmojiSupported_union0_error = (() => {
|
|
677
|
+
if (typeof obj_isCustomEmojiSupported !== 'boolean') {
|
|
678
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isCustomEmojiSupported + '" (at "' + path_isCustomEmojiSupported + '")');
|
|
679
|
+
}
|
|
680
|
+
})();
|
|
681
|
+
if (obj_isCustomEmojiSupported_union0_error != null) {
|
|
682
|
+
obj_isCustomEmojiSupported_union0 = obj_isCustomEmojiSupported_union0_error.message;
|
|
683
|
+
}
|
|
684
|
+
let obj_isCustomEmojiSupported_union1 = null;
|
|
685
|
+
const obj_isCustomEmojiSupported_union1_error = (() => {
|
|
686
|
+
if (obj_isCustomEmojiSupported !== null) {
|
|
687
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isCustomEmojiSupported + '" (at "' + path_isCustomEmojiSupported + '")');
|
|
688
|
+
}
|
|
689
|
+
})();
|
|
690
|
+
if (obj_isCustomEmojiSupported_union1_error != null) {
|
|
691
|
+
obj_isCustomEmojiSupported_union1 = obj_isCustomEmojiSupported_union1_error.message;
|
|
692
|
+
}
|
|
693
|
+
if (obj_isCustomEmojiSupported_union0 && obj_isCustomEmojiSupported_union1) {
|
|
694
|
+
let message = 'Object doesn\'t match union (at "' + path_isCustomEmojiSupported + '")';
|
|
695
|
+
message += '\n' + obj_isCustomEmojiSupported_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
696
|
+
message += '\n' + obj_isCustomEmojiSupported_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
697
|
+
return new TypeError(message);
|
|
698
|
+
}
|
|
699
|
+
const obj_isGroup = obj.isGroup;
|
|
700
|
+
const path_isGroup = path + '.isGroup';
|
|
701
|
+
if (typeof obj_isGroup !== 'boolean') {
|
|
702
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isGroup + '" (at "' + path_isGroup + '")');
|
|
703
|
+
}
|
|
704
|
+
const obj_isIm = obj.isIm;
|
|
705
|
+
const path_isIm = path + '.isIm';
|
|
706
|
+
if (typeof obj_isIm !== 'boolean') {
|
|
707
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isIm + '" (at "' + path_isIm + '")');
|
|
708
|
+
}
|
|
709
|
+
const obj_isMember = obj.isMember;
|
|
710
|
+
const path_isMember = path + '.isMember';
|
|
711
|
+
if (typeof obj_isMember !== 'boolean') {
|
|
712
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isMember + '" (at "' + path_isMember + '")');
|
|
713
|
+
}
|
|
714
|
+
const obj_isOpen = obj.isOpen;
|
|
715
|
+
const path_isOpen = path + '.isOpen';
|
|
716
|
+
if (typeof obj_isOpen !== 'boolean') {
|
|
717
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isOpen + '" (at "' + path_isOpen + '")');
|
|
718
|
+
}
|
|
719
|
+
const obj_isPrivate = obj.isPrivate;
|
|
720
|
+
const path_isPrivate = path + '.isPrivate';
|
|
721
|
+
if (typeof obj_isPrivate !== 'boolean') {
|
|
722
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isPrivate + '" (at "' + path_isPrivate + '")');
|
|
723
|
+
}
|
|
724
|
+
const obj_isReadOnly = obj.isReadOnly;
|
|
725
|
+
const path_isReadOnly = path + '.isReadOnly';
|
|
726
|
+
if (typeof obj_isReadOnly !== 'boolean') {
|
|
727
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isReadOnly + '" (at "' + path_isReadOnly + '")');
|
|
728
|
+
}
|
|
729
|
+
const obj_isThreadOnly = obj.isThreadOnly;
|
|
730
|
+
const path_isThreadOnly = path + '.isThreadOnly';
|
|
731
|
+
if (typeof obj_isThreadOnly !== 'boolean') {
|
|
732
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isThreadOnly + '" (at "' + path_isThreadOnly + '")');
|
|
942
733
|
}
|
|
943
734
|
const obj_name = obj.name;
|
|
944
735
|
const path_name = path + '.name';
|
|
945
736
|
if (typeof obj_name !== 'string') {
|
|
946
737
|
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
947
738
|
}
|
|
948
|
-
const
|
|
949
|
-
const
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
const obj_reactedUsers_item = obj_reactedUsers[i];
|
|
955
|
-
const path_reactedUsers_item = path_reactedUsers + '[' + i + ']';
|
|
956
|
-
if (typeof obj_reactedUsers_item !== 'string') {
|
|
957
|
-
return new TypeError('Expected "string" but received "' + typeof obj_reactedUsers_item + '" (at "' + path_reactedUsers_item + '")');
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
const obj_url = obj.url;
|
|
961
|
-
const path_url = path + '.url';
|
|
962
|
-
let obj_url_union0 = null;
|
|
963
|
-
const obj_url_union0_error = (() => {
|
|
964
|
-
if (typeof obj_url !== 'string') {
|
|
965
|
-
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
739
|
+
const obj_numOfMembers = obj.numOfMembers;
|
|
740
|
+
const path_numOfMembers = path + '.numOfMembers';
|
|
741
|
+
let obj_numOfMembers_union0 = null;
|
|
742
|
+
const obj_numOfMembers_union0_error = (() => {
|
|
743
|
+
if (typeof obj_numOfMembers !== 'number' || (typeof obj_numOfMembers === 'number' && Math.floor(obj_numOfMembers) !== obj_numOfMembers)) {
|
|
744
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_numOfMembers + '" (at "' + path_numOfMembers + '")');
|
|
966
745
|
}
|
|
967
746
|
})();
|
|
968
|
-
if (
|
|
969
|
-
|
|
747
|
+
if (obj_numOfMembers_union0_error != null) {
|
|
748
|
+
obj_numOfMembers_union0 = obj_numOfMembers_union0_error.message;
|
|
970
749
|
}
|
|
971
|
-
let
|
|
972
|
-
const
|
|
973
|
-
if (
|
|
974
|
-
return new TypeError('Expected "null" but received "' + typeof
|
|
750
|
+
let obj_numOfMembers_union1 = null;
|
|
751
|
+
const obj_numOfMembers_union1_error = (() => {
|
|
752
|
+
if (obj_numOfMembers !== null) {
|
|
753
|
+
return new TypeError('Expected "null" but received "' + typeof obj_numOfMembers + '" (at "' + path_numOfMembers + '")');
|
|
975
754
|
}
|
|
976
755
|
})();
|
|
977
|
-
if (
|
|
978
|
-
|
|
756
|
+
if (obj_numOfMembers_union1_error != null) {
|
|
757
|
+
obj_numOfMembers_union1 = obj_numOfMembers_union1_error.message;
|
|
979
758
|
}
|
|
980
|
-
if (
|
|
981
|
-
let message = 'Object doesn\'t match union (at "' +
|
|
982
|
-
message += '\n' +
|
|
983
|
-
message += '\n' +
|
|
759
|
+
if (obj_numOfMembers_union0 && obj_numOfMembers_union1) {
|
|
760
|
+
let message = 'Object doesn\'t match union (at "' + path_numOfMembers + '")';
|
|
761
|
+
message += '\n' + obj_numOfMembers_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
762
|
+
message += '\n' + obj_numOfMembers_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
984
763
|
return new TypeError(message);
|
|
985
764
|
}
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
const
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
765
|
+
const obj_shouldCacheCustomEmoji = obj.shouldCacheCustomEmoji;
|
|
766
|
+
const path_shouldCacheCustomEmoji = path + '.shouldCacheCustomEmoji';
|
|
767
|
+
let obj_shouldCacheCustomEmoji_union0 = null;
|
|
768
|
+
const obj_shouldCacheCustomEmoji_union0_error = (() => {
|
|
769
|
+
if (typeof obj_shouldCacheCustomEmoji !== 'boolean') {
|
|
770
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_shouldCacheCustomEmoji + '" (at "' + path_shouldCacheCustomEmoji + '")');
|
|
771
|
+
}
|
|
772
|
+
})();
|
|
773
|
+
if (obj_shouldCacheCustomEmoji_union0_error != null) {
|
|
774
|
+
obj_shouldCacheCustomEmoji_union0 = obj_shouldCacheCustomEmoji_union0_error.message;
|
|
775
|
+
}
|
|
776
|
+
let obj_shouldCacheCustomEmoji_union1 = null;
|
|
777
|
+
const obj_shouldCacheCustomEmoji_union1_error = (() => {
|
|
778
|
+
if (obj_shouldCacheCustomEmoji !== null) {
|
|
779
|
+
return new TypeError('Expected "null" but received "' + typeof obj_shouldCacheCustomEmoji + '" (at "' + path_shouldCacheCustomEmoji + '")');
|
|
780
|
+
}
|
|
781
|
+
})();
|
|
782
|
+
if (obj_shouldCacheCustomEmoji_union1_error != null) {
|
|
783
|
+
obj_shouldCacheCustomEmoji_union1 = obj_shouldCacheCustomEmoji_union1_error.message;
|
|
784
|
+
}
|
|
785
|
+
if (obj_shouldCacheCustomEmoji_union0 && obj_shouldCacheCustomEmoji_union1) {
|
|
786
|
+
let message = 'Object doesn\'t match union (at "' + path_shouldCacheCustomEmoji + '")';
|
|
787
|
+
message += '\n' + obj_shouldCacheCustomEmoji_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
788
|
+
message += '\n' + obj_shouldCacheCustomEmoji_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
789
|
+
return new TypeError(message);
|
|
790
|
+
}
|
|
791
|
+
if (obj.url !== undefined) {
|
|
792
|
+
const obj_url = obj.url;
|
|
793
|
+
const path_url = path + '.url';
|
|
794
|
+
if (typeof obj_url !== 'string') {
|
|
795
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
})();
|
|
799
|
+
return v_error === undefined ? null : v_error;
|
|
800
|
+
}
|
|
801
|
+
const RepresentationType$d = 'SlackBridgeConversationInfoOutputRepresentation';
|
|
802
|
+
function keyBuilder$s(luvio, config) {
|
|
803
|
+
return keyPrefix + '::' + RepresentationType$d + ':' + config.id;
|
|
804
|
+
}
|
|
805
|
+
function keyBuilderFromType$7(luvio, object) {
|
|
806
|
+
const keyParams = {
|
|
807
|
+
id: object.id
|
|
808
|
+
};
|
|
809
|
+
return keyBuilder$s(luvio, keyParams);
|
|
810
|
+
}
|
|
811
|
+
function normalize$d(input, existing, path, luvio, store, timestamp) {
|
|
812
|
+
return input;
|
|
813
|
+
}
|
|
814
|
+
const select$w = function SlackBridgeConversationInfoOutputRepresentationSelect() {
|
|
815
|
+
return {
|
|
816
|
+
kind: 'Fragment',
|
|
817
|
+
version: VERSION$h,
|
|
818
|
+
private: [],
|
|
819
|
+
selections: [
|
|
820
|
+
{
|
|
821
|
+
name: 'id',
|
|
822
|
+
kind: 'Scalar'
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
name: 'isArchived',
|
|
826
|
+
kind: 'Scalar'
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
name: 'isChannel',
|
|
830
|
+
kind: 'Scalar'
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
name: 'isCustomEmojiSupported',
|
|
834
|
+
kind: 'Scalar'
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
name: 'isGroup',
|
|
838
|
+
kind: 'Scalar'
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: 'isIm',
|
|
842
|
+
kind: 'Scalar'
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
name: 'isMember',
|
|
846
|
+
kind: 'Scalar'
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
name: 'isOpen',
|
|
850
|
+
kind: 'Scalar'
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
name: 'isPrivate',
|
|
854
|
+
kind: 'Scalar'
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
name: 'isReadOnly',
|
|
858
|
+
kind: 'Scalar'
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
name: 'isThreadOnly',
|
|
997
862
|
kind: 'Scalar'
|
|
998
863
|
},
|
|
999
864
|
{
|
|
@@ -1001,21 +866,70 @@ const select$n = function SlackBridgeReactionOutputRepresentationSelect() {
|
|
|
1001
866
|
kind: 'Scalar'
|
|
1002
867
|
},
|
|
1003
868
|
{
|
|
1004
|
-
name: '
|
|
1005
|
-
kind: 'Scalar'
|
|
1006
|
-
plural: true
|
|
869
|
+
name: 'numOfMembers',
|
|
870
|
+
kind: 'Scalar'
|
|
1007
871
|
},
|
|
1008
872
|
{
|
|
1009
|
-
name: '
|
|
873
|
+
name: 'shouldCacheCustomEmoji',
|
|
1010
874
|
kind: 'Scalar'
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
name: 'url',
|
|
878
|
+
kind: 'Scalar',
|
|
879
|
+
required: false
|
|
1011
880
|
}
|
|
1012
881
|
]
|
|
1013
882
|
};
|
|
1014
883
|
};
|
|
1015
|
-
function equals$
|
|
1016
|
-
const
|
|
1017
|
-
const
|
|
1018
|
-
if (!(
|
|
884
|
+
function equals$h(existing, incoming) {
|
|
885
|
+
const existing_isArchived = existing.isArchived;
|
|
886
|
+
const incoming_isArchived = incoming.isArchived;
|
|
887
|
+
if (!(existing_isArchived === incoming_isArchived)) {
|
|
888
|
+
return false;
|
|
889
|
+
}
|
|
890
|
+
const existing_isChannel = existing.isChannel;
|
|
891
|
+
const incoming_isChannel = incoming.isChannel;
|
|
892
|
+
if (!(existing_isChannel === incoming_isChannel)) {
|
|
893
|
+
return false;
|
|
894
|
+
}
|
|
895
|
+
const existing_isGroup = existing.isGroup;
|
|
896
|
+
const incoming_isGroup = incoming.isGroup;
|
|
897
|
+
if (!(existing_isGroup === incoming_isGroup)) {
|
|
898
|
+
return false;
|
|
899
|
+
}
|
|
900
|
+
const existing_isIm = existing.isIm;
|
|
901
|
+
const incoming_isIm = incoming.isIm;
|
|
902
|
+
if (!(existing_isIm === incoming_isIm)) {
|
|
903
|
+
return false;
|
|
904
|
+
}
|
|
905
|
+
const existing_isMember = existing.isMember;
|
|
906
|
+
const incoming_isMember = incoming.isMember;
|
|
907
|
+
if (!(existing_isMember === incoming_isMember)) {
|
|
908
|
+
return false;
|
|
909
|
+
}
|
|
910
|
+
const existing_isOpen = existing.isOpen;
|
|
911
|
+
const incoming_isOpen = incoming.isOpen;
|
|
912
|
+
if (!(existing_isOpen === incoming_isOpen)) {
|
|
913
|
+
return false;
|
|
914
|
+
}
|
|
915
|
+
const existing_isPrivate = existing.isPrivate;
|
|
916
|
+
const incoming_isPrivate = incoming.isPrivate;
|
|
917
|
+
if (!(existing_isPrivate === incoming_isPrivate)) {
|
|
918
|
+
return false;
|
|
919
|
+
}
|
|
920
|
+
const existing_isReadOnly = existing.isReadOnly;
|
|
921
|
+
const incoming_isReadOnly = incoming.isReadOnly;
|
|
922
|
+
if (!(existing_isReadOnly === incoming_isReadOnly)) {
|
|
923
|
+
return false;
|
|
924
|
+
}
|
|
925
|
+
const existing_isThreadOnly = existing.isThreadOnly;
|
|
926
|
+
const incoming_isThreadOnly = incoming.isThreadOnly;
|
|
927
|
+
if (!(existing_isThreadOnly === incoming_isThreadOnly)) {
|
|
928
|
+
return false;
|
|
929
|
+
}
|
|
930
|
+
const existing_id = existing.id;
|
|
931
|
+
const incoming_id = incoming.id;
|
|
932
|
+
if (!(existing_id === incoming_id)) {
|
|
1019
933
|
return false;
|
|
1020
934
|
}
|
|
1021
935
|
const existing_name = existing.name;
|
|
@@ -1023,61 +937,207 @@ function equals$d(existing, incoming) {
|
|
|
1023
937
|
if (!(existing_name === incoming_name)) {
|
|
1024
938
|
return false;
|
|
1025
939
|
}
|
|
1026
|
-
const
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1029
|
-
|
|
940
|
+
const existing_url = existing.url;
|
|
941
|
+
const incoming_url = incoming.url;
|
|
942
|
+
// if at least one of these optionals is defined
|
|
943
|
+
if (existing_url !== undefined || incoming_url !== undefined) {
|
|
944
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
945
|
+
// not equal
|
|
946
|
+
if (existing_url === undefined || incoming_url === undefined) {
|
|
1030
947
|
return false;
|
|
1031
948
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
949
|
+
if (!(existing_url === incoming_url)) {
|
|
950
|
+
return false;
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
const existing_isCustomEmojiSupported = existing.isCustomEmojiSupported;
|
|
954
|
+
const incoming_isCustomEmojiSupported = incoming.isCustomEmojiSupported;
|
|
955
|
+
if (!(existing_isCustomEmojiSupported === incoming_isCustomEmojiSupported)) {
|
|
1034
956
|
return false;
|
|
1035
957
|
}
|
|
1036
|
-
const
|
|
1037
|
-
const
|
|
1038
|
-
if (!(
|
|
958
|
+
const existing_numOfMembers = existing.numOfMembers;
|
|
959
|
+
const incoming_numOfMembers = incoming.numOfMembers;
|
|
960
|
+
if (!(existing_numOfMembers === incoming_numOfMembers)) {
|
|
961
|
+
return false;
|
|
962
|
+
}
|
|
963
|
+
const existing_shouldCacheCustomEmoji = existing.shouldCacheCustomEmoji;
|
|
964
|
+
const incoming_shouldCacheCustomEmoji = incoming.shouldCacheCustomEmoji;
|
|
965
|
+
if (!(existing_shouldCacheCustomEmoji === incoming_shouldCacheCustomEmoji)) {
|
|
1039
966
|
return false;
|
|
1040
967
|
}
|
|
1041
968
|
return true;
|
|
1042
969
|
}
|
|
970
|
+
const ingest$d = function SlackBridgeConversationInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
971
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
972
|
+
const validateError = validate$h(input);
|
|
973
|
+
if (validateError !== null) {
|
|
974
|
+
throw validateError;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
const key = keyBuilderFromType$7(luvio, input);
|
|
978
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
979
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$d, "SlackBridge", VERSION$h, RepresentationType$d, equals$h);
|
|
980
|
+
return createLink(key);
|
|
981
|
+
};
|
|
982
|
+
function getTypeCacheKeys$d(rootKeySet, luvio, input, fullPathFactory) {
|
|
983
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
984
|
+
const rootKey = keyBuilderFromType$7(luvio, input);
|
|
985
|
+
rootKeySet.set(rootKey, {
|
|
986
|
+
namespace: keyPrefix,
|
|
987
|
+
representationName: RepresentationType$d,
|
|
988
|
+
mergeable: false
|
|
989
|
+
});
|
|
990
|
+
}
|
|
1043
991
|
|
|
1044
|
-
const VERSION$
|
|
1045
|
-
function validate$
|
|
992
|
+
const VERSION$g = "c7dec6b60c7d567a7835fbdd84d3e67e";
|
|
993
|
+
function validate$g(obj, path = 'SlackBridgeReactionOutputRepresentation') {
|
|
1046
994
|
const v_error = (() => {
|
|
1047
995
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1048
996
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1049
997
|
}
|
|
1050
|
-
const
|
|
1051
|
-
const
|
|
1052
|
-
if (typeof
|
|
1053
|
-
return new TypeError('Expected "
|
|
998
|
+
const obj_count = obj.count;
|
|
999
|
+
const path_count = path + '.count';
|
|
1000
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
1001
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
1054
1002
|
}
|
|
1055
|
-
const
|
|
1056
|
-
const
|
|
1057
|
-
if (typeof
|
|
1058
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1003
|
+
const obj_name = obj.name;
|
|
1004
|
+
const path_name = path + '.name';
|
|
1005
|
+
if (typeof obj_name !== 'string') {
|
|
1006
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1007
|
+
}
|
|
1008
|
+
const obj_reactedUsers = obj.reactedUsers;
|
|
1009
|
+
const path_reactedUsers = path + '.reactedUsers';
|
|
1010
|
+
if (!ArrayIsArray(obj_reactedUsers)) {
|
|
1011
|
+
return new TypeError('Expected "array" but received "' + typeof obj_reactedUsers + '" (at "' + path_reactedUsers + '")');
|
|
1012
|
+
}
|
|
1013
|
+
for (let i = 0; i < obj_reactedUsers.length; i++) {
|
|
1014
|
+
const obj_reactedUsers_item = obj_reactedUsers[i];
|
|
1015
|
+
const path_reactedUsers_item = path_reactedUsers + '[' + i + ']';
|
|
1016
|
+
if (typeof obj_reactedUsers_item !== 'string') {
|
|
1017
|
+
return new TypeError('Expected "string" but received "' + typeof obj_reactedUsers_item + '" (at "' + path_reactedUsers_item + '")');
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
const obj_url = obj.url;
|
|
1021
|
+
const path_url = path + '.url';
|
|
1022
|
+
let obj_url_union0 = null;
|
|
1023
|
+
const obj_url_union0_error = (() => {
|
|
1024
|
+
if (typeof obj_url !== 'string') {
|
|
1025
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1026
|
+
}
|
|
1027
|
+
})();
|
|
1028
|
+
if (obj_url_union0_error != null) {
|
|
1029
|
+
obj_url_union0 = obj_url_union0_error.message;
|
|
1030
|
+
}
|
|
1031
|
+
let obj_url_union1 = null;
|
|
1032
|
+
const obj_url_union1_error = (() => {
|
|
1033
|
+
if (obj_url !== null) {
|
|
1034
|
+
return new TypeError('Expected "null" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1035
|
+
}
|
|
1036
|
+
})();
|
|
1037
|
+
if (obj_url_union1_error != null) {
|
|
1038
|
+
obj_url_union1 = obj_url_union1_error.message;
|
|
1039
|
+
}
|
|
1040
|
+
if (obj_url_union0 && obj_url_union1) {
|
|
1041
|
+
let message = 'Object doesn\'t match union (at "' + path_url + '")';
|
|
1042
|
+
message += '\n' + obj_url_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1043
|
+
message += '\n' + obj_url_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1044
|
+
return new TypeError(message);
|
|
1059
1045
|
}
|
|
1060
1046
|
})();
|
|
1061
1047
|
return v_error === undefined ? null : v_error;
|
|
1062
1048
|
}
|
|
1063
|
-
const select$
|
|
1049
|
+
const select$v = function SlackBridgeReactionOutputRepresentationSelect() {
|
|
1064
1050
|
return {
|
|
1065
1051
|
kind: 'Fragment',
|
|
1066
|
-
version: VERSION$
|
|
1052
|
+
version: VERSION$g,
|
|
1067
1053
|
private: [],
|
|
1068
1054
|
selections: [
|
|
1069
1055
|
{
|
|
1070
|
-
name: '
|
|
1056
|
+
name: 'count',
|
|
1071
1057
|
kind: 'Scalar'
|
|
1072
1058
|
},
|
|
1073
1059
|
{
|
|
1074
|
-
name: '
|
|
1060
|
+
name: 'name',
|
|
1061
|
+
kind: 'Scalar'
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
name: 'reactedUsers',
|
|
1065
|
+
kind: 'Scalar',
|
|
1066
|
+
plural: true
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
name: 'url',
|
|
1075
1070
|
kind: 'Scalar'
|
|
1076
1071
|
}
|
|
1077
1072
|
]
|
|
1078
1073
|
};
|
|
1079
1074
|
};
|
|
1080
|
-
function equals$
|
|
1075
|
+
function equals$g(existing, incoming) {
|
|
1076
|
+
const existing_count = existing.count;
|
|
1077
|
+
const incoming_count = incoming.count;
|
|
1078
|
+
if (!(existing_count === incoming_count)) {
|
|
1079
|
+
return false;
|
|
1080
|
+
}
|
|
1081
|
+
const existing_name = existing.name;
|
|
1082
|
+
const incoming_name = incoming.name;
|
|
1083
|
+
if (!(existing_name === incoming_name)) {
|
|
1084
|
+
return false;
|
|
1085
|
+
}
|
|
1086
|
+
const existing_reactedUsers = existing.reactedUsers;
|
|
1087
|
+
const incoming_reactedUsers = incoming.reactedUsers;
|
|
1088
|
+
const equals_reactedUsers_items = equalsArray(existing_reactedUsers, incoming_reactedUsers, (existing_reactedUsers_item, incoming_reactedUsers_item) => {
|
|
1089
|
+
if (!(existing_reactedUsers_item === incoming_reactedUsers_item)) {
|
|
1090
|
+
return false;
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
if (equals_reactedUsers_items === false) {
|
|
1094
|
+
return false;
|
|
1095
|
+
}
|
|
1096
|
+
const existing_url = existing.url;
|
|
1097
|
+
const incoming_url = incoming.url;
|
|
1098
|
+
if (!(existing_url === incoming_url)) {
|
|
1099
|
+
return false;
|
|
1100
|
+
}
|
|
1101
|
+
return true;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
const VERSION$f = "4634cd404d8392ac4ca9f0e1be03bfbd";
|
|
1105
|
+
function validate$f(obj, path = 'SlackBridgeFileTypeOutputRepresentation') {
|
|
1106
|
+
const v_error = (() => {
|
|
1107
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1108
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1109
|
+
}
|
|
1110
|
+
const obj_extension = obj.extension;
|
|
1111
|
+
const path_extension = path + '.extension';
|
|
1112
|
+
if (typeof obj_extension !== 'string') {
|
|
1113
|
+
return new TypeError('Expected "string" but received "' + typeof obj_extension + '" (at "' + path_extension + '")');
|
|
1114
|
+
}
|
|
1115
|
+
const obj_iconName = obj.iconName;
|
|
1116
|
+
const path_iconName = path + '.iconName';
|
|
1117
|
+
if (typeof obj_iconName !== 'string') {
|
|
1118
|
+
return new TypeError('Expected "string" but received "' + typeof obj_iconName + '" (at "' + path_iconName + '")');
|
|
1119
|
+
}
|
|
1120
|
+
})();
|
|
1121
|
+
return v_error === undefined ? null : v_error;
|
|
1122
|
+
}
|
|
1123
|
+
const select$u = function SlackBridgeFileTypeOutputRepresentationSelect() {
|
|
1124
|
+
return {
|
|
1125
|
+
kind: 'Fragment',
|
|
1126
|
+
version: VERSION$f,
|
|
1127
|
+
private: [],
|
|
1128
|
+
selections: [
|
|
1129
|
+
{
|
|
1130
|
+
name: 'extension',
|
|
1131
|
+
kind: 'Scalar'
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
name: 'iconName',
|
|
1135
|
+
kind: 'Scalar'
|
|
1136
|
+
}
|
|
1137
|
+
]
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
function equals$f(existing, incoming) {
|
|
1081
1141
|
const existing_extension = existing.extension;
|
|
1082
1142
|
const incoming_extension = incoming.extension;
|
|
1083
1143
|
if (!(existing_extension === incoming_extension)) {
|
|
@@ -1091,8 +1151,8 @@ function equals$c(existing, incoming) {
|
|
|
1091
1151
|
return true;
|
|
1092
1152
|
}
|
|
1093
1153
|
|
|
1094
|
-
const VERSION$
|
|
1095
|
-
function validate$
|
|
1154
|
+
const VERSION$e = "929dbada9eaca4bca26deee89f9d11b2";
|
|
1155
|
+
function validate$e(obj, path = 'SlackBridgeContentVersionOutputRepresentation') {
|
|
1096
1156
|
const v_error = (() => {
|
|
1097
1157
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1098
1158
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1104,7 +1164,7 @@ function validate$b(obj, path = 'SlackBridgeContentVersionOutputRepresentation')
|
|
|
1104
1164
|
}
|
|
1105
1165
|
const obj_filetype = obj.filetype;
|
|
1106
1166
|
const path_filetype = path + '.filetype';
|
|
1107
|
-
const referencepath_filetypeValidationError = validate$
|
|
1167
|
+
const referencepath_filetypeValidationError = validate$f(obj_filetype, path_filetype);
|
|
1108
1168
|
if (referencepath_filetypeValidationError !== null) {
|
|
1109
1169
|
let message = 'Object doesn\'t match SlackBridgeFileTypeOutputRepresentation (at "' + path_filetype + '")\n';
|
|
1110
1170
|
message += referencepath_filetypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1133,11 +1193,11 @@ function validate$b(obj, path = 'SlackBridgeContentVersionOutputRepresentation')
|
|
|
1133
1193
|
})();
|
|
1134
1194
|
return v_error === undefined ? null : v_error;
|
|
1135
1195
|
}
|
|
1136
|
-
const select$
|
|
1137
|
-
const { selections: SlackBridgeFileTypeOutputRepresentation__selections, opaque: SlackBridgeFileTypeOutputRepresentation__opaque, } = select$
|
|
1196
|
+
const select$t = function SlackBridgeContentVersionOutputRepresentationSelect() {
|
|
1197
|
+
const { selections: SlackBridgeFileTypeOutputRepresentation__selections, opaque: SlackBridgeFileTypeOutputRepresentation__opaque, } = select$u();
|
|
1138
1198
|
return {
|
|
1139
1199
|
kind: 'Fragment',
|
|
1140
|
-
version: VERSION$
|
|
1200
|
+
version: VERSION$e,
|
|
1141
1201
|
private: [],
|
|
1142
1202
|
selections: [
|
|
1143
1203
|
{
|
|
@@ -1168,7 +1228,7 @@ const select$l = function SlackBridgeContentVersionOutputRepresentationSelect()
|
|
|
1168
1228
|
]
|
|
1169
1229
|
};
|
|
1170
1230
|
};
|
|
1171
|
-
function equals$
|
|
1231
|
+
function equals$e(existing, incoming) {
|
|
1172
1232
|
const existing_size = existing.size;
|
|
1173
1233
|
const incoming_size = incoming.size;
|
|
1174
1234
|
if (!(existing_size === incoming_size)) {
|
|
@@ -1196,21 +1256,21 @@ function equals$b(existing, incoming) {
|
|
|
1196
1256
|
}
|
|
1197
1257
|
const existing_filetype = existing.filetype;
|
|
1198
1258
|
const incoming_filetype = incoming.filetype;
|
|
1199
|
-
if (!(equals$
|
|
1259
|
+
if (!(equals$f(existing_filetype, incoming_filetype))) {
|
|
1200
1260
|
return false;
|
|
1201
1261
|
}
|
|
1202
1262
|
return true;
|
|
1203
1263
|
}
|
|
1204
1264
|
|
|
1205
|
-
const VERSION$
|
|
1206
|
-
function validate$
|
|
1265
|
+
const VERSION$d = "effdd259bc622bee05493fc2a3ecd276";
|
|
1266
|
+
function validate$d(obj, path = 'SlackBridgeContentDocumentOutputRepresentation') {
|
|
1207
1267
|
const v_error = (() => {
|
|
1208
1268
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1209
1269
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1210
1270
|
}
|
|
1211
1271
|
const obj_filetype = obj.filetype;
|
|
1212
1272
|
const path_filetype = path + '.filetype';
|
|
1213
|
-
const referencepath_filetypeValidationError = validate$
|
|
1273
|
+
const referencepath_filetypeValidationError = validate$f(obj_filetype, path_filetype);
|
|
1214
1274
|
if (referencepath_filetypeValidationError !== null) {
|
|
1215
1275
|
let message = 'Object doesn\'t match SlackBridgeFileTypeOutputRepresentation (at "' + path_filetype + '")\n';
|
|
1216
1276
|
message += referencepath_filetypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1223,7 +1283,7 @@ function validate$a(obj, path = 'SlackBridgeContentDocumentOutputRepresentation'
|
|
|
1223
1283
|
}
|
|
1224
1284
|
const obj_latestPublishedVersion = obj.latestPublishedVersion;
|
|
1225
1285
|
const path_latestPublishedVersion = path + '.latestPublishedVersion';
|
|
1226
|
-
const referencepath_latestPublishedVersionValidationError = validate$
|
|
1286
|
+
const referencepath_latestPublishedVersionValidationError = validate$e(obj_latestPublishedVersion, path_latestPublishedVersion);
|
|
1227
1287
|
if (referencepath_latestPublishedVersionValidationError !== null) {
|
|
1228
1288
|
let message = 'Object doesn\'t match SlackBridgeContentVersionOutputRepresentation (at "' + path_latestPublishedVersion + '")\n';
|
|
1229
1289
|
message += referencepath_latestPublishedVersionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1242,12 +1302,12 @@ function validate$a(obj, path = 'SlackBridgeContentDocumentOutputRepresentation'
|
|
|
1242
1302
|
})();
|
|
1243
1303
|
return v_error === undefined ? null : v_error;
|
|
1244
1304
|
}
|
|
1245
|
-
const select$
|
|
1246
|
-
const { selections: SlackBridgeFileTypeOutputRepresentation__selections, opaque: SlackBridgeFileTypeOutputRepresentation__opaque, } = select$
|
|
1247
|
-
const { selections: SlackBridgeContentVersionOutputRepresentation__selections, opaque: SlackBridgeContentVersionOutputRepresentation__opaque, } = select$
|
|
1305
|
+
const select$s = function SlackBridgeContentDocumentOutputRepresentationSelect() {
|
|
1306
|
+
const { selections: SlackBridgeFileTypeOutputRepresentation__selections, opaque: SlackBridgeFileTypeOutputRepresentation__opaque, } = select$u();
|
|
1307
|
+
const { selections: SlackBridgeContentVersionOutputRepresentation__selections, opaque: SlackBridgeContentVersionOutputRepresentation__opaque, } = select$t();
|
|
1248
1308
|
return {
|
|
1249
1309
|
kind: 'Fragment',
|
|
1250
|
-
version: VERSION$
|
|
1310
|
+
version: VERSION$d,
|
|
1251
1311
|
private: [],
|
|
1252
1312
|
selections: [
|
|
1253
1313
|
{
|
|
@@ -1275,7 +1335,7 @@ const select$k = function SlackBridgeContentDocumentOutputRepresentationSelect()
|
|
|
1275
1335
|
]
|
|
1276
1336
|
};
|
|
1277
1337
|
};
|
|
1278
|
-
function equals$
|
|
1338
|
+
function equals$d(existing, incoming) {
|
|
1279
1339
|
const existing_size = existing.size;
|
|
1280
1340
|
const incoming_size = incoming.size;
|
|
1281
1341
|
if (!(existing_size === incoming_size)) {
|
|
@@ -1293,26 +1353,26 @@ function equals$a(existing, incoming) {
|
|
|
1293
1353
|
}
|
|
1294
1354
|
const existing_filetype = existing.filetype;
|
|
1295
1355
|
const incoming_filetype = incoming.filetype;
|
|
1296
|
-
if (!(equals$
|
|
1356
|
+
if (!(equals$f(existing_filetype, incoming_filetype))) {
|
|
1297
1357
|
return false;
|
|
1298
1358
|
}
|
|
1299
1359
|
const existing_latestPublishedVersion = existing.latestPublishedVersion;
|
|
1300
1360
|
const incoming_latestPublishedVersion = incoming.latestPublishedVersion;
|
|
1301
|
-
if (!(equals$
|
|
1361
|
+
if (!(equals$e(existing_latestPublishedVersion, incoming_latestPublishedVersion))) {
|
|
1302
1362
|
return false;
|
|
1303
1363
|
}
|
|
1304
1364
|
return true;
|
|
1305
1365
|
}
|
|
1306
1366
|
|
|
1307
|
-
const VERSION$
|
|
1308
|
-
function validate$
|
|
1367
|
+
const VERSION$c = "3f1a7f34ee73f6a8d9677314d88bad78";
|
|
1368
|
+
function validate$c(obj, path = 'SlackBridgeFileOutputRepresentation') {
|
|
1309
1369
|
const v_error = (() => {
|
|
1310
1370
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1311
1371
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1312
1372
|
}
|
|
1313
1373
|
const obj_contentDocument = obj.contentDocument;
|
|
1314
1374
|
const path_contentDocument = path + '.contentDocument';
|
|
1315
|
-
const referencepath_contentDocumentValidationError = validate$
|
|
1375
|
+
const referencepath_contentDocumentValidationError = validate$d(obj_contentDocument, path_contentDocument);
|
|
1316
1376
|
if (referencepath_contentDocumentValidationError !== null) {
|
|
1317
1377
|
let message = 'Object doesn\'t match SlackBridgeContentDocumentOutputRepresentation (at "' + path_contentDocument + '")\n';
|
|
1318
1378
|
message += referencepath_contentDocumentValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1371,24 +1431,24 @@ function validate$9(obj, path = 'SlackBridgeFileOutputRepresentation') {
|
|
|
1371
1431
|
})();
|
|
1372
1432
|
return v_error === undefined ? null : v_error;
|
|
1373
1433
|
}
|
|
1374
|
-
const RepresentationType$
|
|
1375
|
-
function keyBuilder$
|
|
1376
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1434
|
+
const RepresentationType$c = 'SlackBridgeFileOutputRepresentation';
|
|
1435
|
+
function keyBuilder$r(luvio, config) {
|
|
1436
|
+
return keyPrefix + '::' + RepresentationType$c + ':' + config.uniqueKey;
|
|
1377
1437
|
}
|
|
1378
|
-
function keyBuilderFromType$
|
|
1438
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
1379
1439
|
const keyParams = {
|
|
1380
1440
|
uniqueKey: object.uniqueKey
|
|
1381
1441
|
};
|
|
1382
|
-
return keyBuilder$
|
|
1442
|
+
return keyBuilder$r(luvio, keyParams);
|
|
1383
1443
|
}
|
|
1384
|
-
function normalize$
|
|
1444
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
1385
1445
|
return input;
|
|
1386
1446
|
}
|
|
1387
|
-
const select$
|
|
1388
|
-
const { selections: SlackBridgeContentDocumentOutputRepresentation__selections, opaque: SlackBridgeContentDocumentOutputRepresentation__opaque, } = select$
|
|
1447
|
+
const select$r = function SlackBridgeFileOutputRepresentationSelect() {
|
|
1448
|
+
const { selections: SlackBridgeContentDocumentOutputRepresentation__selections, opaque: SlackBridgeContentDocumentOutputRepresentation__opaque, } = select$s();
|
|
1389
1449
|
return {
|
|
1390
1450
|
kind: 'Fragment',
|
|
1391
|
-
version: VERSION$
|
|
1451
|
+
version: VERSION$c,
|
|
1392
1452
|
private: [],
|
|
1393
1453
|
selections: [
|
|
1394
1454
|
{
|
|
@@ -1439,7 +1499,7 @@ const select$j = function SlackBridgeFileOutputRepresentationSelect() {
|
|
|
1439
1499
|
]
|
|
1440
1500
|
};
|
|
1441
1501
|
};
|
|
1442
|
-
function equals$
|
|
1502
|
+
function equals$c(existing, incoming) {
|
|
1443
1503
|
const existing_size = existing.size;
|
|
1444
1504
|
const incoming_size = incoming.size;
|
|
1445
1505
|
if (!(existing_size === incoming_size)) {
|
|
@@ -1492,39 +1552,81 @@ function equals$9(existing, incoming) {
|
|
|
1492
1552
|
}
|
|
1493
1553
|
const existing_contentDocument = existing.contentDocument;
|
|
1494
1554
|
const incoming_contentDocument = incoming.contentDocument;
|
|
1495
|
-
if (!(equals$
|
|
1555
|
+
if (!(equals$d(existing_contentDocument, incoming_contentDocument))) {
|
|
1496
1556
|
return false;
|
|
1497
1557
|
}
|
|
1498
1558
|
return true;
|
|
1499
1559
|
}
|
|
1500
|
-
const ingest$
|
|
1560
|
+
const ingest$c = function SlackBridgeFileOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1501
1561
|
if (process.env.NODE_ENV !== 'production') {
|
|
1502
|
-
const validateError = validate$
|
|
1562
|
+
const validateError = validate$c(input);
|
|
1503
1563
|
if (validateError !== null) {
|
|
1504
1564
|
throw validateError;
|
|
1505
1565
|
}
|
|
1506
1566
|
}
|
|
1507
|
-
const key = keyBuilderFromType$
|
|
1567
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
1508
1568
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1509
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1569
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "SlackBridge", VERSION$c, RepresentationType$c, equals$c);
|
|
1510
1570
|
return createLink(key);
|
|
1511
1571
|
};
|
|
1512
|
-
function getTypeCacheKeys$
|
|
1572
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
1513
1573
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1514
|
-
const rootKey = keyBuilderFromType$
|
|
1574
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
1515
1575
|
rootKeySet.set(rootKey, {
|
|
1516
1576
|
namespace: keyPrefix,
|
|
1517
|
-
representationName: RepresentationType$
|
|
1577
|
+
representationName: RepresentationType$c,
|
|
1518
1578
|
mergeable: false
|
|
1519
1579
|
});
|
|
1520
1580
|
}
|
|
1521
1581
|
|
|
1522
|
-
const VERSION$
|
|
1523
|
-
function validate$
|
|
1582
|
+
const VERSION$b = "d4fb2fb522a777fd831f500fea806ebe";
|
|
1583
|
+
function validate$b(obj, path = 'SlackBridgeMessageOutputRepresentation') {
|
|
1524
1584
|
const v_error = (() => {
|
|
1525
1585
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1526
1586
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1527
1587
|
}
|
|
1588
|
+
const obj_attachments = obj.attachments;
|
|
1589
|
+
const path_attachments = path + '.attachments';
|
|
1590
|
+
if (!ArrayIsArray(obj_attachments)) {
|
|
1591
|
+
return new TypeError('Expected "array" but received "' + typeof obj_attachments + '" (at "' + path_attachments + '")');
|
|
1592
|
+
}
|
|
1593
|
+
for (let i = 0; i < obj_attachments.length; i++) {
|
|
1594
|
+
const obj_attachments_item = obj_attachments[i];
|
|
1595
|
+
const path_attachments_item = path_attachments + '[' + i + ']';
|
|
1596
|
+
if (typeof obj_attachments_item !== 'object' || ArrayIsArray(obj_attachments_item) || obj_attachments_item === null) {
|
|
1597
|
+
return new TypeError('Expected "object" but received "' + typeof obj_attachments_item + '" (at "' + path_attachments_item + '")');
|
|
1598
|
+
}
|
|
1599
|
+
const obj_attachments_item_keys = ObjectKeys(obj_attachments_item);
|
|
1600
|
+
for (let i = 0; i < obj_attachments_item_keys.length; i++) {
|
|
1601
|
+
const key = obj_attachments_item_keys[i];
|
|
1602
|
+
const obj_attachments_item_prop = obj_attachments_item[key];
|
|
1603
|
+
const path_attachments_item_prop = path_attachments_item + '["' + key + '"]';
|
|
1604
|
+
if (obj_attachments_item_prop === undefined) {
|
|
1605
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_attachments_item_prop + '" (at "' + path_attachments_item_prop + '")');
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
const obj_blocks = obj.blocks;
|
|
1610
|
+
const path_blocks = path + '.blocks';
|
|
1611
|
+
if (!ArrayIsArray(obj_blocks)) {
|
|
1612
|
+
return new TypeError('Expected "array" but received "' + typeof obj_blocks + '" (at "' + path_blocks + '")');
|
|
1613
|
+
}
|
|
1614
|
+
for (let i = 0; i < obj_blocks.length; i++) {
|
|
1615
|
+
const obj_blocks_item = obj_blocks[i];
|
|
1616
|
+
const path_blocks_item = path_blocks + '[' + i + ']';
|
|
1617
|
+
if (typeof obj_blocks_item !== 'object' || ArrayIsArray(obj_blocks_item) || obj_blocks_item === null) {
|
|
1618
|
+
return new TypeError('Expected "object" but received "' + typeof obj_blocks_item + '" (at "' + path_blocks_item + '")');
|
|
1619
|
+
}
|
|
1620
|
+
const obj_blocks_item_keys = ObjectKeys(obj_blocks_item);
|
|
1621
|
+
for (let i = 0; i < obj_blocks_item_keys.length; i++) {
|
|
1622
|
+
const key = obj_blocks_item_keys[i];
|
|
1623
|
+
const obj_blocks_item_prop = obj_blocks_item[key];
|
|
1624
|
+
const path_blocks_item_prop = path_blocks_item + '["' + key + '"]';
|
|
1625
|
+
if (obj_blocks_item_prop === undefined) {
|
|
1626
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_blocks_item_prop + '" (at "' + path_blocks_item_prop + '")');
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1528
1630
|
const obj_files = obj.files;
|
|
1529
1631
|
const path_files = path + '.files';
|
|
1530
1632
|
if (!ArrayIsArray(obj_files)) {
|
|
@@ -1622,7 +1724,7 @@ function validate$8(obj, path = 'SlackBridgeMessageOutputRepresentation') {
|
|
|
1622
1724
|
for (let i = 0; i < obj_reactions.length; i++) {
|
|
1623
1725
|
const obj_reactions_item = obj_reactions[i];
|
|
1624
1726
|
const path_reactions_item = path_reactions + '[' + i + ']';
|
|
1625
|
-
const referencepath_reactions_itemValidationError = validate$
|
|
1727
|
+
const referencepath_reactions_itemValidationError = validate$g(obj_reactions_item, path_reactions_item);
|
|
1626
1728
|
if (referencepath_reactions_itemValidationError !== null) {
|
|
1627
1729
|
let message = 'Object doesn\'t match SlackBridgeReactionOutputRepresentation (at "' + path_reactions_item + '")\n';
|
|
1628
1730
|
message += referencepath_reactions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1763,14 +1865,14 @@ function validate$8(obj, path = 'SlackBridgeMessageOutputRepresentation') {
|
|
|
1763
1865
|
})();
|
|
1764
1866
|
return v_error === undefined ? null : v_error;
|
|
1765
1867
|
}
|
|
1766
|
-
const RepresentationType$
|
|
1767
|
-
function normalize$
|
|
1868
|
+
const RepresentationType$b = 'SlackBridgeMessageOutputRepresentation';
|
|
1869
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
1768
1870
|
const input_files = input.files;
|
|
1769
1871
|
const input_files_id = path.fullPath + '__files';
|
|
1770
1872
|
for (let i = 0; i < input_files.length; i++) {
|
|
1771
1873
|
const input_files_item = input_files[i];
|
|
1772
1874
|
let input_files_item_id = input_files_id + '__' + i;
|
|
1773
|
-
input_files[i] = ingest$
|
|
1875
|
+
input_files[i] = ingest$c(input_files_item, {
|
|
1774
1876
|
fullPath: input_files_item_id,
|
|
1775
1877
|
propertyName: i,
|
|
1776
1878
|
parent: {
|
|
@@ -1783,18 +1885,28 @@ function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
|
1783
1885
|
}
|
|
1784
1886
|
return input;
|
|
1785
1887
|
}
|
|
1786
|
-
const select$
|
|
1787
|
-
const { selections: SlackBridgeReactionOutputRepresentation__selections, opaque: SlackBridgeReactionOutputRepresentation__opaque, } = select$
|
|
1888
|
+
const select$q = function SlackBridgeMessageOutputRepresentationSelect() {
|
|
1889
|
+
const { selections: SlackBridgeReactionOutputRepresentation__selections, opaque: SlackBridgeReactionOutputRepresentation__opaque, } = select$v();
|
|
1788
1890
|
return {
|
|
1789
1891
|
kind: 'Fragment',
|
|
1790
|
-
version: VERSION$
|
|
1892
|
+
version: VERSION$b,
|
|
1791
1893
|
private: [],
|
|
1792
1894
|
selections: [
|
|
1895
|
+
{
|
|
1896
|
+
name: 'attachments',
|
|
1897
|
+
kind: 'Object',
|
|
1898
|
+
// any
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
name: 'blocks',
|
|
1902
|
+
kind: 'Object',
|
|
1903
|
+
// any
|
|
1904
|
+
},
|
|
1793
1905
|
{
|
|
1794
1906
|
name: 'files',
|
|
1795
1907
|
kind: 'Link',
|
|
1796
1908
|
plural: true,
|
|
1797
|
-
fragment: select$
|
|
1909
|
+
fragment: select$r()
|
|
1798
1910
|
},
|
|
1799
1911
|
{
|
|
1800
1912
|
name: 'includesCustomEmoji',
|
|
@@ -1866,7 +1978,7 @@ const select$i = function SlackBridgeMessageOutputRepresentationSelect() {
|
|
|
1866
1978
|
]
|
|
1867
1979
|
};
|
|
1868
1980
|
};
|
|
1869
|
-
function equals$
|
|
1981
|
+
function equals$b(existing, incoming) {
|
|
1870
1982
|
const existing_isBroadcast = existing.isBroadcast;
|
|
1871
1983
|
const incoming_isBroadcast = incoming.isBroadcast;
|
|
1872
1984
|
if (!(existing_isBroadcast === incoming_isBroadcast)) {
|
|
@@ -1907,6 +2019,36 @@ function equals$8(existing, incoming) {
|
|
|
1907
2019
|
if (!(existing_url === incoming_url)) {
|
|
1908
2020
|
return false;
|
|
1909
2021
|
}
|
|
2022
|
+
const existing_attachments = existing.attachments;
|
|
2023
|
+
const incoming_attachments = incoming.attachments;
|
|
2024
|
+
const equals_attachments_items = equalsArray(existing_attachments, incoming_attachments, (existing_attachments_item, incoming_attachments_item) => {
|
|
2025
|
+
const equals_attachments_items_props = equalsObject(existing_attachments_item, incoming_attachments_item, (existing_attachments_item_prop, incoming_attachments_item_prop) => {
|
|
2026
|
+
if (JSONStringify(incoming_attachments_item_prop) !== JSONStringify(existing_attachments_item_prop)) {
|
|
2027
|
+
return false;
|
|
2028
|
+
}
|
|
2029
|
+
});
|
|
2030
|
+
if (equals_attachments_items_props === false) {
|
|
2031
|
+
return false;
|
|
2032
|
+
}
|
|
2033
|
+
});
|
|
2034
|
+
if (equals_attachments_items === false) {
|
|
2035
|
+
return false;
|
|
2036
|
+
}
|
|
2037
|
+
const existing_blocks = existing.blocks;
|
|
2038
|
+
const incoming_blocks = incoming.blocks;
|
|
2039
|
+
const equals_blocks_items = equalsArray(existing_blocks, incoming_blocks, (existing_blocks_item, incoming_blocks_item) => {
|
|
2040
|
+
const equals_blocks_items_props = equalsObject(existing_blocks_item, incoming_blocks_item, (existing_blocks_item_prop, incoming_blocks_item_prop) => {
|
|
2041
|
+
if (JSONStringify(incoming_blocks_item_prop) !== JSONStringify(existing_blocks_item_prop)) {
|
|
2042
|
+
return false;
|
|
2043
|
+
}
|
|
2044
|
+
});
|
|
2045
|
+
if (equals_blocks_items_props === false) {
|
|
2046
|
+
return false;
|
|
2047
|
+
}
|
|
2048
|
+
});
|
|
2049
|
+
if (equals_blocks_items === false) {
|
|
2050
|
+
return false;
|
|
2051
|
+
}
|
|
1910
2052
|
const existing_files = existing.files;
|
|
1911
2053
|
const incoming_files = incoming.files;
|
|
1912
2054
|
const equals_files_items = equalsArray(existing_files, incoming_files, (existing_files_item, incoming_files_item) => {
|
|
@@ -1930,7 +2072,7 @@ function equals$8(existing, incoming) {
|
|
|
1930
2072
|
const existing_reactions = existing.reactions;
|
|
1931
2073
|
const incoming_reactions = incoming.reactions;
|
|
1932
2074
|
const equals_reactions_items = equalsArray(existing_reactions, incoming_reactions, (existing_reactions_item, incoming_reactions_item) => {
|
|
1933
|
-
if (!(equals$
|
|
2075
|
+
if (!(equals$g(existing_reactions_item, incoming_reactions_item))) {
|
|
1934
2076
|
return false;
|
|
1935
2077
|
}
|
|
1936
2078
|
});
|
|
@@ -1969,34 +2111,34 @@ function equals$8(existing, incoming) {
|
|
|
1969
2111
|
}
|
|
1970
2112
|
return true;
|
|
1971
2113
|
}
|
|
1972
|
-
const ingest$
|
|
2114
|
+
const ingest$b = function SlackBridgeMessageOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1973
2115
|
if (process.env.NODE_ENV !== 'production') {
|
|
1974
|
-
const validateError = validate$
|
|
2116
|
+
const validateError = validate$b(input);
|
|
1975
2117
|
if (validateError !== null) {
|
|
1976
2118
|
throw validateError;
|
|
1977
2119
|
}
|
|
1978
2120
|
}
|
|
1979
2121
|
const key = path.fullPath;
|
|
1980
2122
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1981
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2123
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "SlackBridge", VERSION$b, RepresentationType$b, equals$b);
|
|
1982
2124
|
return createLink(key);
|
|
1983
2125
|
};
|
|
1984
|
-
function getTypeCacheKeys$
|
|
2126
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
1985
2127
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1986
2128
|
const rootKey = fullPathFactory();
|
|
1987
2129
|
rootKeySet.set(rootKey, {
|
|
1988
2130
|
namespace: keyPrefix,
|
|
1989
|
-
representationName: RepresentationType$
|
|
2131
|
+
representationName: RepresentationType$b,
|
|
1990
2132
|
mergeable: false
|
|
1991
2133
|
});
|
|
1992
2134
|
const input_files_length = input.files.length;
|
|
1993
2135
|
for (let i = 0; i < input_files_length; i++) {
|
|
1994
|
-
getTypeCacheKeys$
|
|
2136
|
+
getTypeCacheKeys$c(rootKeySet, luvio, input.files[i]);
|
|
1995
2137
|
}
|
|
1996
2138
|
}
|
|
1997
2139
|
|
|
1998
|
-
const VERSION$
|
|
1999
|
-
function validate$
|
|
2140
|
+
const VERSION$a = "5145ac2c241c561e4baa29b3884748dc";
|
|
2141
|
+
function validate$a(obj, path = 'SlackBridgeConversationHistoryOutputRepresentation') {
|
|
2000
2142
|
const v_error = (() => {
|
|
2001
2143
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2002
2144
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2047,14 +2189,14 @@ function validate$7(obj, path = 'SlackBridgeConversationHistoryOutputRepresentat
|
|
|
2047
2189
|
})();
|
|
2048
2190
|
return v_error === undefined ? null : v_error;
|
|
2049
2191
|
}
|
|
2050
|
-
const RepresentationType$
|
|
2051
|
-
function normalize$
|
|
2192
|
+
const RepresentationType$a = 'SlackBridgeConversationHistoryOutputRepresentation';
|
|
2193
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
2052
2194
|
const input_messages = input.messages;
|
|
2053
2195
|
const input_messages_id = path.fullPath + '__messages';
|
|
2054
2196
|
for (let i = 0; i < input_messages.length; i++) {
|
|
2055
2197
|
const input_messages_item = input_messages[i];
|
|
2056
2198
|
let input_messages_item_id = input_messages_id + '__' + i;
|
|
2057
|
-
input_messages[i] = ingest$
|
|
2199
|
+
input_messages[i] = ingest$b(input_messages_item, {
|
|
2058
2200
|
fullPath: input_messages_item_id,
|
|
2059
2201
|
propertyName: i,
|
|
2060
2202
|
parent: {
|
|
@@ -2067,10 +2209,10 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
2067
2209
|
}
|
|
2068
2210
|
return input;
|
|
2069
2211
|
}
|
|
2070
|
-
const select$
|
|
2212
|
+
const select$p = function SlackBridgeConversationHistoryOutputRepresentationSelect() {
|
|
2071
2213
|
return {
|
|
2072
2214
|
kind: 'Fragment',
|
|
2073
|
-
version: VERSION$
|
|
2215
|
+
version: VERSION$a,
|
|
2074
2216
|
private: [],
|
|
2075
2217
|
selections: [
|
|
2076
2218
|
{
|
|
@@ -2081,7 +2223,7 @@ const select$h = function SlackBridgeConversationHistoryOutputRepresentationSele
|
|
|
2081
2223
|
name: 'messages',
|
|
2082
2224
|
kind: 'Link',
|
|
2083
2225
|
plural: true,
|
|
2084
|
-
fragment: select$
|
|
2226
|
+
fragment: select$q()
|
|
2085
2227
|
},
|
|
2086
2228
|
{
|
|
2087
2229
|
name: 'nextCursor',
|
|
@@ -2090,7 +2232,7 @@ const select$h = function SlackBridgeConversationHistoryOutputRepresentationSele
|
|
|
2090
2232
|
]
|
|
2091
2233
|
};
|
|
2092
2234
|
};
|
|
2093
|
-
function equals$
|
|
2235
|
+
function equals$a(existing, incoming) {
|
|
2094
2236
|
const existing_hasMore = existing.hasMore;
|
|
2095
2237
|
const incoming_hasMore = incoming.hasMore;
|
|
2096
2238
|
if (!(existing_hasMore === incoming_hasMore)) {
|
|
@@ -2113,34 +2255,34 @@ function equals$7(existing, incoming) {
|
|
|
2113
2255
|
}
|
|
2114
2256
|
return true;
|
|
2115
2257
|
}
|
|
2116
|
-
const ingest$
|
|
2258
|
+
const ingest$a = function SlackBridgeConversationHistoryOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2117
2259
|
if (process.env.NODE_ENV !== 'production') {
|
|
2118
|
-
const validateError = validate$
|
|
2260
|
+
const validateError = validate$a(input);
|
|
2119
2261
|
if (validateError !== null) {
|
|
2120
2262
|
throw validateError;
|
|
2121
2263
|
}
|
|
2122
2264
|
}
|
|
2123
2265
|
const key = path.fullPath;
|
|
2124
2266
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2125
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2267
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "SlackBridge", VERSION$a, RepresentationType$a, equals$a);
|
|
2126
2268
|
return createLink(key);
|
|
2127
2269
|
};
|
|
2128
|
-
function getTypeCacheKeys$
|
|
2270
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
2129
2271
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2130
2272
|
const rootKey = fullPathFactory();
|
|
2131
2273
|
rootKeySet.set(rootKey, {
|
|
2132
2274
|
namespace: keyPrefix,
|
|
2133
|
-
representationName: RepresentationType$
|
|
2275
|
+
representationName: RepresentationType$a,
|
|
2134
2276
|
mergeable: false
|
|
2135
2277
|
});
|
|
2136
2278
|
const input_messages_length = input.messages.length;
|
|
2137
2279
|
for (let i = 0; i < input_messages_length; i++) {
|
|
2138
|
-
getTypeCacheKeys$
|
|
2280
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.messages[i], () => '');
|
|
2139
2281
|
}
|
|
2140
2282
|
}
|
|
2141
2283
|
|
|
2142
|
-
const VERSION$
|
|
2143
|
-
function validate$
|
|
2284
|
+
const VERSION$9 = "7ec6cbca3e2948ff5ef00e4034f365d5";
|
|
2285
|
+
function validate$9(obj, path = 'SlackBridgeConversationOutputRepresentation') {
|
|
2144
2286
|
const v_error = (() => {
|
|
2145
2287
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2146
2288
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2185,11 +2327,8 @@ function validate$6(obj, path = 'SlackBridgeConversationOutputRepresentation') {
|
|
|
2185
2327
|
const path_conversationInfo = path + '.conversationInfo';
|
|
2186
2328
|
let obj_conversationInfo_union0 = null;
|
|
2187
2329
|
const obj_conversationInfo_union0_error = (() => {
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
let message = 'Object doesn\'t match SlackBridgeConversationInfoOutputRepresentation (at "' + path_conversationInfo + '")\n';
|
|
2191
|
-
message += referencepath_conversationInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2192
|
-
return new TypeError(message);
|
|
2330
|
+
if (typeof obj_conversationInfo !== 'object') {
|
|
2331
|
+
return new TypeError('Expected "object" but received "' + typeof obj_conversationInfo + '" (at "' + path_conversationInfo + '")');
|
|
2193
2332
|
}
|
|
2194
2333
|
})();
|
|
2195
2334
|
if (obj_conversationInfo_union0_error != null) {
|
|
@@ -2269,72 +2408,1090 @@ function validate$6(obj, path = 'SlackBridgeConversationOutputRepresentation') {
|
|
|
2269
2408
|
if (obj_websocketUrl_union0_error != null) {
|
|
2270
2409
|
obj_websocketUrl_union0 = obj_websocketUrl_union0_error.message;
|
|
2271
2410
|
}
|
|
2272
|
-
let obj_websocketUrl_union1 = null;
|
|
2273
|
-
const obj_websocketUrl_union1_error = (() => {
|
|
2274
|
-
if (obj_websocketUrl !== null) {
|
|
2275
|
-
return new TypeError('Expected "null" but received "' + typeof obj_websocketUrl + '" (at "' + path_websocketUrl + '")');
|
|
2411
|
+
let obj_websocketUrl_union1 = null;
|
|
2412
|
+
const obj_websocketUrl_union1_error = (() => {
|
|
2413
|
+
if (obj_websocketUrl !== null) {
|
|
2414
|
+
return new TypeError('Expected "null" but received "' + typeof obj_websocketUrl + '" (at "' + path_websocketUrl + '")');
|
|
2415
|
+
}
|
|
2416
|
+
})();
|
|
2417
|
+
if (obj_websocketUrl_union1_error != null) {
|
|
2418
|
+
obj_websocketUrl_union1 = obj_websocketUrl_union1_error.message;
|
|
2419
|
+
}
|
|
2420
|
+
if (obj_websocketUrl_union0 && obj_websocketUrl_union1) {
|
|
2421
|
+
let message = 'Object doesn\'t match union (at "' + path_websocketUrl + '")';
|
|
2422
|
+
message += '\n' + obj_websocketUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2423
|
+
message += '\n' + obj_websocketUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2424
|
+
return new TypeError(message);
|
|
2425
|
+
}
|
|
2426
|
+
})();
|
|
2427
|
+
return v_error === undefined ? null : v_error;
|
|
2428
|
+
}
|
|
2429
|
+
const RepresentationType$9 = 'SlackBridgeConversationOutputRepresentation';
|
|
2430
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
2431
|
+
const input_contextUserInfo = input.contextUserInfo;
|
|
2432
|
+
const input_contextUserInfo_id = path.fullPath + '__contextUserInfo';
|
|
2433
|
+
if (input_contextUserInfo !== null && typeof input_contextUserInfo === 'object') {
|
|
2434
|
+
input.contextUserInfo = ingest$e(input_contextUserInfo, {
|
|
2435
|
+
fullPath: input_contextUserInfo_id,
|
|
2436
|
+
propertyName: 'contextUserInfo',
|
|
2437
|
+
parent: {
|
|
2438
|
+
data: input,
|
|
2439
|
+
key: path.fullPath,
|
|
2440
|
+
existing: existing,
|
|
2441
|
+
},
|
|
2442
|
+
ttl: path.ttl
|
|
2443
|
+
}, luvio, store, timestamp);
|
|
2444
|
+
}
|
|
2445
|
+
const input_conversationInfo = input.conversationInfo;
|
|
2446
|
+
const input_conversationInfo_id = path.fullPath + '__conversationInfo';
|
|
2447
|
+
if (input_conversationInfo !== null && typeof input_conversationInfo === 'object') {
|
|
2448
|
+
input.conversationInfo = ingest$d(input_conversationInfo, {
|
|
2449
|
+
fullPath: input_conversationInfo_id,
|
|
2450
|
+
propertyName: 'conversationInfo',
|
|
2451
|
+
parent: {
|
|
2452
|
+
data: input,
|
|
2453
|
+
key: path.fullPath,
|
|
2454
|
+
existing: existing,
|
|
2455
|
+
},
|
|
2456
|
+
ttl: path.ttl
|
|
2457
|
+
}, luvio, store, timestamp);
|
|
2458
|
+
}
|
|
2459
|
+
const input_history = input.history;
|
|
2460
|
+
const input_history_id = path.fullPath + '__history';
|
|
2461
|
+
input.history = ingest$a(input_history, {
|
|
2462
|
+
fullPath: input_history_id,
|
|
2463
|
+
propertyName: 'history',
|
|
2464
|
+
parent: {
|
|
2465
|
+
data: input,
|
|
2466
|
+
key: path.fullPath,
|
|
2467
|
+
existing: existing,
|
|
2468
|
+
},
|
|
2469
|
+
ttl: path.ttl
|
|
2470
|
+
}, luvio, store, timestamp);
|
|
2471
|
+
const input_userInfos = input.userInfos;
|
|
2472
|
+
const input_userInfos_id = path.fullPath + '__userInfos';
|
|
2473
|
+
for (let i = 0; i < input_userInfos.length; i++) {
|
|
2474
|
+
const input_userInfos_item = input_userInfos[i];
|
|
2475
|
+
let input_userInfos_item_id = input_userInfos_id + '__' + i;
|
|
2476
|
+
input_userInfos[i] = ingest$e(input_userInfos_item, {
|
|
2477
|
+
fullPath: input_userInfos_item_id,
|
|
2478
|
+
propertyName: i,
|
|
2479
|
+
parent: {
|
|
2480
|
+
data: input,
|
|
2481
|
+
key: path.fullPath,
|
|
2482
|
+
existing: existing,
|
|
2483
|
+
},
|
|
2484
|
+
ttl: path.ttl
|
|
2485
|
+
}, luvio, store, timestamp);
|
|
2486
|
+
}
|
|
2487
|
+
return input;
|
|
2488
|
+
}
|
|
2489
|
+
const select$o = function SlackBridgeConversationOutputRepresentationSelect() {
|
|
2490
|
+
return {
|
|
2491
|
+
kind: 'Fragment',
|
|
2492
|
+
version: VERSION$9,
|
|
2493
|
+
private: [],
|
|
2494
|
+
selections: [
|
|
2495
|
+
{
|
|
2496
|
+
name: 'channelId',
|
|
2497
|
+
kind: 'Scalar'
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
name: 'channelUrl',
|
|
2501
|
+
kind: 'Scalar'
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
name: 'contextUserInfo',
|
|
2505
|
+
kind: 'Link',
|
|
2506
|
+
nullable: true,
|
|
2507
|
+
fragment: select$x()
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
name: 'conversationInfo',
|
|
2511
|
+
kind: 'Link',
|
|
2512
|
+
nullable: true,
|
|
2513
|
+
fragment: select$w()
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
name: 'history',
|
|
2517
|
+
kind: 'Link',
|
|
2518
|
+
fragment: select$p()
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
name: 'teamId',
|
|
2522
|
+
kind: 'Scalar'
|
|
2523
|
+
},
|
|
2524
|
+
{
|
|
2525
|
+
name: 'threadTs',
|
|
2526
|
+
kind: 'Scalar'
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
name: 'userInfos',
|
|
2530
|
+
kind: 'Link',
|
|
2531
|
+
plural: true,
|
|
2532
|
+
fragment: select$x()
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
name: 'websocketUrl',
|
|
2536
|
+
kind: 'Scalar'
|
|
2537
|
+
}
|
|
2538
|
+
]
|
|
2539
|
+
};
|
|
2540
|
+
};
|
|
2541
|
+
function equals$9(existing, incoming) {
|
|
2542
|
+
const existing_channelId = existing.channelId;
|
|
2543
|
+
const incoming_channelId = incoming.channelId;
|
|
2544
|
+
if (!(existing_channelId === incoming_channelId)) {
|
|
2545
|
+
return false;
|
|
2546
|
+
}
|
|
2547
|
+
const existing_channelUrl = existing.channelUrl;
|
|
2548
|
+
const incoming_channelUrl = incoming.channelUrl;
|
|
2549
|
+
if (!(existing_channelUrl === incoming_channelUrl)) {
|
|
2550
|
+
return false;
|
|
2551
|
+
}
|
|
2552
|
+
const existing_teamId = existing.teamId;
|
|
2553
|
+
const incoming_teamId = incoming.teamId;
|
|
2554
|
+
if (!(existing_teamId === incoming_teamId)) {
|
|
2555
|
+
return false;
|
|
2556
|
+
}
|
|
2557
|
+
const existing_contextUserInfo = existing.contextUserInfo;
|
|
2558
|
+
const incoming_contextUserInfo = incoming.contextUserInfo;
|
|
2559
|
+
if (!(existing_contextUserInfo === incoming_contextUserInfo
|
|
2560
|
+
|| (existing_contextUserInfo != null &&
|
|
2561
|
+
incoming_contextUserInfo != null &&
|
|
2562
|
+
existing_contextUserInfo.__ref != null &&
|
|
2563
|
+
incoming_contextUserInfo.__ref != null &&
|
|
2564
|
+
existing_contextUserInfo.__ref === incoming_contextUserInfo.__ref))) {
|
|
2565
|
+
return false;
|
|
2566
|
+
}
|
|
2567
|
+
const existing_conversationInfo = existing.conversationInfo;
|
|
2568
|
+
const incoming_conversationInfo = incoming.conversationInfo;
|
|
2569
|
+
if (!(existing_conversationInfo === incoming_conversationInfo
|
|
2570
|
+
|| (existing_conversationInfo != null &&
|
|
2571
|
+
incoming_conversationInfo != null &&
|
|
2572
|
+
existing_conversationInfo.__ref != null &&
|
|
2573
|
+
incoming_conversationInfo.__ref != null &&
|
|
2574
|
+
existing_conversationInfo.__ref === incoming_conversationInfo.__ref))) {
|
|
2575
|
+
return false;
|
|
2576
|
+
}
|
|
2577
|
+
const existing_history = existing.history;
|
|
2578
|
+
const incoming_history = incoming.history;
|
|
2579
|
+
if (!(existing_history.__ref === incoming_history.__ref)) {
|
|
2580
|
+
return false;
|
|
2581
|
+
}
|
|
2582
|
+
const existing_threadTs = existing.threadTs;
|
|
2583
|
+
const incoming_threadTs = incoming.threadTs;
|
|
2584
|
+
if (!(existing_threadTs === incoming_threadTs)) {
|
|
2585
|
+
return false;
|
|
2586
|
+
}
|
|
2587
|
+
const existing_userInfos = existing.userInfos;
|
|
2588
|
+
const incoming_userInfos = incoming.userInfos;
|
|
2589
|
+
const equals_userInfos_items = equalsArray(existing_userInfos, incoming_userInfos, (existing_userInfos_item, incoming_userInfos_item) => {
|
|
2590
|
+
if (!(existing_userInfos_item.__ref === incoming_userInfos_item.__ref)) {
|
|
2591
|
+
return false;
|
|
2592
|
+
}
|
|
2593
|
+
});
|
|
2594
|
+
if (equals_userInfos_items === false) {
|
|
2595
|
+
return false;
|
|
2596
|
+
}
|
|
2597
|
+
const existing_websocketUrl = existing.websocketUrl;
|
|
2598
|
+
const incoming_websocketUrl = incoming.websocketUrl;
|
|
2599
|
+
if (!(existing_websocketUrl === incoming_websocketUrl)) {
|
|
2600
|
+
return false;
|
|
2601
|
+
}
|
|
2602
|
+
return true;
|
|
2603
|
+
}
|
|
2604
|
+
const ingest$9 = function SlackBridgeConversationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2605
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2606
|
+
const validateError = validate$9(input);
|
|
2607
|
+
if (validateError !== null) {
|
|
2608
|
+
throw validateError;
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
const key = path.fullPath;
|
|
2612
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2613
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "SlackBridge", VERSION$9, RepresentationType$9, equals$9);
|
|
2614
|
+
return createLink(key);
|
|
2615
|
+
};
|
|
2616
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
2617
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2618
|
+
const rootKey = fullPathFactory();
|
|
2619
|
+
rootKeySet.set(rootKey, {
|
|
2620
|
+
namespace: keyPrefix,
|
|
2621
|
+
representationName: RepresentationType$9,
|
|
2622
|
+
mergeable: false
|
|
2623
|
+
});
|
|
2624
|
+
if (input.contextUserInfo !== null && typeof input.contextUserInfo === 'object') {
|
|
2625
|
+
getTypeCacheKeys$e(rootKeySet, luvio, input.contextUserInfo);
|
|
2626
|
+
}
|
|
2627
|
+
if (input.conversationInfo !== null && typeof input.conversationInfo === 'object') {
|
|
2628
|
+
getTypeCacheKeys$d(rootKeySet, luvio, input.conversationInfo);
|
|
2629
|
+
}
|
|
2630
|
+
getTypeCacheKeys$a(rootKeySet, luvio, input.history, () => rootKey + "__" + "history");
|
|
2631
|
+
const input_userInfos_length = input.userInfos.length;
|
|
2632
|
+
for (let i = 0; i < input_userInfos_length; i++) {
|
|
2633
|
+
getTypeCacheKeys$e(rootKeySet, luvio, input.userInfos[i]);
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
function select$n(luvio, params) {
|
|
2638
|
+
return select$o();
|
|
2639
|
+
}
|
|
2640
|
+
function keyBuilder$q(luvio, params) {
|
|
2641
|
+
return keyPrefix + '::SlackBridgeConversationOutputRepresentation:(' + 'channelId:' + params.queryParams.channelId + ',' + 'includeView:' + params.queryParams.includeView + ',' + 'inclusive:' + params.queryParams.inclusive + ',' + 'latestMessageTs:' + params.queryParams.latestMessageTs + ',' + 'limit:' + params.queryParams.limit + ',' + 'oldestMessageTs:' + params.queryParams.oldestMessageTs + ',' + 'parentMessageTs:' + params.queryParams.parentMessageTs + ',' + 'relatedRecordId:' + params.queryParams.relatedRecordId + ',' + 'teamId:' + params.queryParams.teamId + ')';
|
|
2642
|
+
}
|
|
2643
|
+
function getResponseCacheKeys$h(storeKeyMap, luvio, resourceParams, response) {
|
|
2644
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$q(luvio, resourceParams));
|
|
2645
|
+
}
|
|
2646
|
+
function ingestSuccess$e(luvio, resourceParams, response, snapshotRefresh) {
|
|
2647
|
+
const { body } = response;
|
|
2648
|
+
const key = keyBuilder$q(luvio, resourceParams);
|
|
2649
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
2650
|
+
const snapshot = luvio.storeLookup({
|
|
2651
|
+
recordId: key,
|
|
2652
|
+
node: select$n(),
|
|
2653
|
+
variables: {},
|
|
2654
|
+
}, snapshotRefresh);
|
|
2655
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2656
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2657
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
deepFreeze(snapshot.data);
|
|
2661
|
+
return snapshot;
|
|
2662
|
+
}
|
|
2663
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
2664
|
+
const key = keyBuilder$q(luvio, params);
|
|
2665
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2666
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
2667
|
+
return errorSnapshot;
|
|
2668
|
+
}
|
|
2669
|
+
function createResourceRequest$h(config) {
|
|
2670
|
+
const headers = {};
|
|
2671
|
+
return {
|
|
2672
|
+
baseUri: '/services/data/v63.0',
|
|
2673
|
+
basePath: '/connect/slackbridge/conversation/messages',
|
|
2674
|
+
method: 'get',
|
|
2675
|
+
body: null,
|
|
2676
|
+
urlParams: {},
|
|
2677
|
+
queryParams: config.queryParams,
|
|
2678
|
+
headers,
|
|
2679
|
+
priority: 'normal',
|
|
2680
|
+
};
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
const adapterName$h = 'getSlackConversation';
|
|
2684
|
+
const getSlackConversation_ConfigPropertyMetadata = [
|
|
2685
|
+
generateParamConfigMetadata('channelId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2686
|
+
generateParamConfigMetadata('includeView', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
2687
|
+
generateParamConfigMetadata('inclusive', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
2688
|
+
generateParamConfigMetadata('latestMessageTs', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2689
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2690
|
+
generateParamConfigMetadata('oldestMessageTs', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2691
|
+
generateParamConfigMetadata('parentMessageTs', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2692
|
+
generateParamConfigMetadata('relatedRecordId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2693
|
+
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2694
|
+
];
|
|
2695
|
+
const getSlackConversation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$h, getSlackConversation_ConfigPropertyMetadata);
|
|
2696
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$i(getSlackConversation_ConfigPropertyMetadata);
|
|
2697
|
+
function keyBuilder$p(luvio, config) {
|
|
2698
|
+
const resourceParams = createResourceParams$h(config);
|
|
2699
|
+
return keyBuilder$q(luvio, resourceParams);
|
|
2700
|
+
}
|
|
2701
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
2702
|
+
const config = {};
|
|
2703
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackConversation_ConfigPropertyMetadata);
|
|
2704
|
+
return config;
|
|
2705
|
+
}
|
|
2706
|
+
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
2707
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2708
|
+
return null;
|
|
2709
|
+
}
|
|
2710
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2711
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2712
|
+
}
|
|
2713
|
+
const config = typeCheckConfig$h(untrustedConfig);
|
|
2714
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2715
|
+
return null;
|
|
2716
|
+
}
|
|
2717
|
+
return config;
|
|
2718
|
+
}
|
|
2719
|
+
function adapterFragment$8(luvio, config) {
|
|
2720
|
+
createResourceParams$h(config);
|
|
2721
|
+
return select$n();
|
|
2722
|
+
}
|
|
2723
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
2724
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response, {
|
|
2725
|
+
config,
|
|
2726
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
2727
|
+
});
|
|
2728
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2729
|
+
}
|
|
2730
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
2731
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
2732
|
+
config,
|
|
2733
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
2734
|
+
});
|
|
2735
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2736
|
+
}
|
|
2737
|
+
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
2738
|
+
const resourceParams = createResourceParams$h(config);
|
|
2739
|
+
const request = createResourceRequest$h(resourceParams);
|
|
2740
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2741
|
+
.then((response) => {
|
|
2742
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
2743
|
+
const cache = new StoreKeyMap();
|
|
2744
|
+
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
2745
|
+
return cache;
|
|
2746
|
+
});
|
|
2747
|
+
}, (response) => {
|
|
2748
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
2749
|
+
});
|
|
2750
|
+
}
|
|
2751
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
2752
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$h, undefined, false);
|
|
2753
|
+
}
|
|
2754
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
2755
|
+
const { luvio, config } = context;
|
|
2756
|
+
const selector = {
|
|
2757
|
+
recordId: keyBuilder$p(luvio, config),
|
|
2758
|
+
node: adapterFragment$8(luvio, config),
|
|
2759
|
+
variables: {},
|
|
2760
|
+
};
|
|
2761
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2762
|
+
config,
|
|
2763
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
2764
|
+
});
|
|
2765
|
+
return cacheSnapshot;
|
|
2766
|
+
}
|
|
2767
|
+
const getSlackConversationAdapterFactory = (luvio) => function SlackBridge__getSlackConversation(untrustedConfig, requestContext) {
|
|
2768
|
+
const config = validateAdapterConfig$h(untrustedConfig, getSlackConversation_ConfigPropertyNames);
|
|
2769
|
+
// Invalid or incomplete config
|
|
2770
|
+
if (config === null) {
|
|
2771
|
+
return null;
|
|
2772
|
+
}
|
|
2773
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2774
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
2775
|
+
};
|
|
2776
|
+
|
|
2777
|
+
const VERSION$8 = "769b5b0ed94219341e9be74c08e63aed";
|
|
2778
|
+
function validate$8(obj, path = 'SlackBridgePostMessageOutputRepresentation') {
|
|
2779
|
+
const v_error = (() => {
|
|
2780
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2781
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2782
|
+
}
|
|
2783
|
+
const obj_channelId = obj.channelId;
|
|
2784
|
+
const path_channelId = path + '.channelId';
|
|
2785
|
+
if (typeof obj_channelId !== 'string') {
|
|
2786
|
+
return new TypeError('Expected "string" but received "' + typeof obj_channelId + '" (at "' + path_channelId + '")');
|
|
2787
|
+
}
|
|
2788
|
+
const obj_postedMessage = obj.postedMessage;
|
|
2789
|
+
const path_postedMessage = path + '.postedMessage';
|
|
2790
|
+
if (typeof obj_postedMessage !== 'object') {
|
|
2791
|
+
return new TypeError('Expected "object" but received "' + typeof obj_postedMessage + '" (at "' + path_postedMessage + '")');
|
|
2792
|
+
}
|
|
2793
|
+
const obj_timestamp = obj.timestamp;
|
|
2794
|
+
const path_timestamp = path + '.timestamp';
|
|
2795
|
+
if (typeof obj_timestamp !== 'string') {
|
|
2796
|
+
return new TypeError('Expected "string" but received "' + typeof obj_timestamp + '" (at "' + path_timestamp + '")');
|
|
2797
|
+
}
|
|
2798
|
+
})();
|
|
2799
|
+
return v_error === undefined ? null : v_error;
|
|
2800
|
+
}
|
|
2801
|
+
const RepresentationType$8 = 'SlackBridgePostMessageOutputRepresentation';
|
|
2802
|
+
function keyBuilder$o(luvio, config) {
|
|
2803
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.channelId;
|
|
2804
|
+
}
|
|
2805
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
2806
|
+
const keyParams = {
|
|
2807
|
+
channelId: object.channelId
|
|
2808
|
+
};
|
|
2809
|
+
return keyBuilder$o(luvio, keyParams);
|
|
2810
|
+
}
|
|
2811
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
2812
|
+
const input_postedMessage = input.postedMessage;
|
|
2813
|
+
const input_postedMessage_id = path.fullPath + '__postedMessage';
|
|
2814
|
+
input.postedMessage = ingest$b(input_postedMessage, {
|
|
2815
|
+
fullPath: input_postedMessage_id,
|
|
2816
|
+
propertyName: 'postedMessage',
|
|
2817
|
+
parent: {
|
|
2818
|
+
data: input,
|
|
2819
|
+
key: path.fullPath,
|
|
2820
|
+
existing: existing,
|
|
2821
|
+
},
|
|
2822
|
+
ttl: path.ttl
|
|
2823
|
+
}, luvio, store, timestamp);
|
|
2824
|
+
return input;
|
|
2825
|
+
}
|
|
2826
|
+
const select$m = function SlackBridgePostMessageOutputRepresentationSelect() {
|
|
2827
|
+
return {
|
|
2828
|
+
kind: 'Fragment',
|
|
2829
|
+
version: VERSION$8,
|
|
2830
|
+
private: [],
|
|
2831
|
+
selections: [
|
|
2832
|
+
{
|
|
2833
|
+
name: 'channelId',
|
|
2834
|
+
kind: 'Scalar'
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
name: 'postedMessage',
|
|
2838
|
+
kind: 'Link',
|
|
2839
|
+
fragment: select$q()
|
|
2840
|
+
},
|
|
2841
|
+
{
|
|
2842
|
+
name: 'timestamp',
|
|
2843
|
+
kind: 'Scalar'
|
|
2844
|
+
}
|
|
2845
|
+
]
|
|
2846
|
+
};
|
|
2847
|
+
};
|
|
2848
|
+
function equals$8(existing, incoming) {
|
|
2849
|
+
const existing_channelId = existing.channelId;
|
|
2850
|
+
const incoming_channelId = incoming.channelId;
|
|
2851
|
+
if (!(existing_channelId === incoming_channelId)) {
|
|
2852
|
+
return false;
|
|
2853
|
+
}
|
|
2854
|
+
const existing_timestamp = existing.timestamp;
|
|
2855
|
+
const incoming_timestamp = incoming.timestamp;
|
|
2856
|
+
if (!(existing_timestamp === incoming_timestamp)) {
|
|
2857
|
+
return false;
|
|
2858
|
+
}
|
|
2859
|
+
const existing_postedMessage = existing.postedMessage;
|
|
2860
|
+
const incoming_postedMessage = incoming.postedMessage;
|
|
2861
|
+
if (!(existing_postedMessage.__ref === incoming_postedMessage.__ref)) {
|
|
2862
|
+
return false;
|
|
2863
|
+
}
|
|
2864
|
+
return true;
|
|
2865
|
+
}
|
|
2866
|
+
const ingest$8 = function SlackBridgePostMessageOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2867
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2868
|
+
const validateError = validate$8(input);
|
|
2869
|
+
if (validateError !== null) {
|
|
2870
|
+
throw validateError;
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
2874
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2875
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "SlackBridge", VERSION$8, RepresentationType$8, equals$8);
|
|
2876
|
+
return createLink(key);
|
|
2877
|
+
};
|
|
2878
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
2879
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2880
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
2881
|
+
rootKeySet.set(rootKey, {
|
|
2882
|
+
namespace: keyPrefix,
|
|
2883
|
+
representationName: RepresentationType$8,
|
|
2884
|
+
mergeable: false
|
|
2885
|
+
});
|
|
2886
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.postedMessage, () => rootKey + "__" + "postedMessage");
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
function select$l(luvio, params) {
|
|
2890
|
+
return select$m();
|
|
2891
|
+
}
|
|
2892
|
+
function getResponseCacheKeys$g(storeKeyMap, luvio, resourceParams, response) {
|
|
2893
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
2894
|
+
}
|
|
2895
|
+
function ingestSuccess$d(luvio, resourceParams, response) {
|
|
2896
|
+
const { body } = response;
|
|
2897
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
2898
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
2899
|
+
const snapshot = luvio.storeLookup({
|
|
2900
|
+
recordId: key,
|
|
2901
|
+
node: select$l(),
|
|
2902
|
+
variables: {},
|
|
2903
|
+
});
|
|
2904
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2905
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2906
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
deepFreeze(snapshot.data);
|
|
2910
|
+
return snapshot;
|
|
2911
|
+
}
|
|
2912
|
+
function createResourceRequest$g(config) {
|
|
2913
|
+
const headers = {};
|
|
2914
|
+
return {
|
|
2915
|
+
baseUri: '/services/data/v63.0',
|
|
2916
|
+
basePath: '/connect/slackbridge/conversation/messages',
|
|
2917
|
+
method: 'post',
|
|
2918
|
+
body: config.body,
|
|
2919
|
+
urlParams: {},
|
|
2920
|
+
queryParams: {},
|
|
2921
|
+
headers,
|
|
2922
|
+
priority: 'normal',
|
|
2923
|
+
};
|
|
2924
|
+
}
|
|
2925
|
+
|
|
2926
|
+
const adapterName$g = 'postSlackConversation';
|
|
2927
|
+
const postSlackConversation_ConfigPropertyMetadata = [
|
|
2928
|
+
generateParamConfigMetadata('channelId', true, 2 /* Body */, 0 /* String */),
|
|
2929
|
+
generateParamConfigMetadata('linkNames', false, 2 /* Body */, 1 /* Boolean */),
|
|
2930
|
+
generateParamConfigMetadata('replyBroadcast', false, 2 /* Body */, 1 /* Boolean */),
|
|
2931
|
+
generateParamConfigMetadata('teamId', true, 2 /* Body */, 0 /* String */),
|
|
2932
|
+
generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
|
|
2933
|
+
generateParamConfigMetadata('threadTs', false, 2 /* Body */, 0 /* String */),
|
|
2934
|
+
];
|
|
2935
|
+
const postSlackConversation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$g, postSlackConversation_ConfigPropertyMetadata);
|
|
2936
|
+
const createResourceParams$g = /*#__PURE__*/ createResourceParams$i(postSlackConversation_ConfigPropertyMetadata);
|
|
2937
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
2938
|
+
const config = {};
|
|
2939
|
+
typeCheckConfig$i(untrustedConfig, config, postSlackConversation_ConfigPropertyMetadata);
|
|
2940
|
+
return config;
|
|
2941
|
+
}
|
|
2942
|
+
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
2943
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2944
|
+
return null;
|
|
2945
|
+
}
|
|
2946
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2947
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2948
|
+
}
|
|
2949
|
+
const config = typeCheckConfig$g(untrustedConfig);
|
|
2950
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2951
|
+
return null;
|
|
2952
|
+
}
|
|
2953
|
+
return config;
|
|
2954
|
+
}
|
|
2955
|
+
function buildNetworkSnapshot$g(luvio, config, options) {
|
|
2956
|
+
const resourceParams = createResourceParams$g(config);
|
|
2957
|
+
const request = createResourceRequest$g(resourceParams);
|
|
2958
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2959
|
+
.then((response) => {
|
|
2960
|
+
return luvio.handleSuccessResponse(() => {
|
|
2961
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response);
|
|
2962
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2963
|
+
}, () => {
|
|
2964
|
+
const cache = new StoreKeyMap();
|
|
2965
|
+
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
2966
|
+
return cache;
|
|
2967
|
+
});
|
|
2968
|
+
}, (response) => {
|
|
2969
|
+
deepFreeze(response);
|
|
2970
|
+
throw response;
|
|
2971
|
+
});
|
|
2972
|
+
}
|
|
2973
|
+
const postSlackConversationAdapterFactory = (luvio) => {
|
|
2974
|
+
return function postSlackConversation(untrustedConfig) {
|
|
2975
|
+
const config = validateAdapterConfig$g(untrustedConfig, postSlackConversation_ConfigPropertyNames);
|
|
2976
|
+
// Invalid or incomplete config
|
|
2977
|
+
if (config === null) {
|
|
2978
|
+
throw new Error('Invalid config for "postSlackConversation"');
|
|
2979
|
+
}
|
|
2980
|
+
return buildNetworkSnapshot$g(luvio, config);
|
|
2981
|
+
};
|
|
2982
|
+
};
|
|
2983
|
+
|
|
2984
|
+
function select$k(luvio, params) {
|
|
2985
|
+
return select$r();
|
|
2986
|
+
}
|
|
2987
|
+
function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
|
|
2988
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response);
|
|
2989
|
+
}
|
|
2990
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
2991
|
+
const { body } = response;
|
|
2992
|
+
const key = keyBuilderFromType$6(luvio, body);
|
|
2993
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
2994
|
+
const snapshot = luvio.storeLookup({
|
|
2995
|
+
recordId: key,
|
|
2996
|
+
node: select$k(),
|
|
2997
|
+
variables: {},
|
|
2998
|
+
});
|
|
2999
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3000
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3001
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
deepFreeze(snapshot.data);
|
|
3005
|
+
return snapshot;
|
|
3006
|
+
}
|
|
3007
|
+
function createResourceRequest$f(config) {
|
|
3008
|
+
const headers = {};
|
|
3009
|
+
return {
|
|
3010
|
+
baseUri: '/services/data/v63.0',
|
|
3011
|
+
basePath: '/connect/slackbridge/files',
|
|
3012
|
+
method: 'post',
|
|
3013
|
+
body: config.body,
|
|
3014
|
+
urlParams: {},
|
|
3015
|
+
queryParams: {},
|
|
3016
|
+
headers,
|
|
3017
|
+
priority: 'normal',
|
|
3018
|
+
};
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
const adapterName$f = 'postSlackFile';
|
|
3022
|
+
const postSlackFile_ConfigPropertyMetadata = [
|
|
3023
|
+
generateParamConfigMetadata('base64EncodedFileData', true, 2 /* Body */, 0 /* String */),
|
|
3024
|
+
generateParamConfigMetadata('channels', true, 2 /* Body */, 0 /* String */, true),
|
|
3025
|
+
generateParamConfigMetadata('fileName', true, 2 /* Body */, 0 /* String */),
|
|
3026
|
+
generateParamConfigMetadata('fileType', true, 2 /* Body */, 0 /* String */),
|
|
3027
|
+
generateParamConfigMetadata('initialComment', true, 2 /* Body */, 0 /* String */),
|
|
3028
|
+
generateParamConfigMetadata('teamId', true, 2 /* Body */, 0 /* String */),
|
|
3029
|
+
generateParamConfigMetadata('threadTs', true, 2 /* Body */, 0 /* String */),
|
|
3030
|
+
generateParamConfigMetadata('title', true, 2 /* Body */, 0 /* String */),
|
|
3031
|
+
];
|
|
3032
|
+
const postSlackFile_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, postSlackFile_ConfigPropertyMetadata);
|
|
3033
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$i(postSlackFile_ConfigPropertyMetadata);
|
|
3034
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
3035
|
+
const config = {};
|
|
3036
|
+
typeCheckConfig$i(untrustedConfig, config, postSlackFile_ConfigPropertyMetadata);
|
|
3037
|
+
return config;
|
|
3038
|
+
}
|
|
3039
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
3040
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3041
|
+
return null;
|
|
3042
|
+
}
|
|
3043
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3044
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3045
|
+
}
|
|
3046
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
3047
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3048
|
+
return null;
|
|
3049
|
+
}
|
|
3050
|
+
return config;
|
|
3051
|
+
}
|
|
3052
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
3053
|
+
const resourceParams = createResourceParams$f(config);
|
|
3054
|
+
const request = createResourceRequest$f(resourceParams);
|
|
3055
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3056
|
+
.then((response) => {
|
|
3057
|
+
return luvio.handleSuccessResponse(() => {
|
|
3058
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response);
|
|
3059
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3060
|
+
}, () => {
|
|
3061
|
+
const cache = new StoreKeyMap();
|
|
3062
|
+
getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
|
|
3063
|
+
return cache;
|
|
3064
|
+
});
|
|
3065
|
+
}, (response) => {
|
|
3066
|
+
deepFreeze(response);
|
|
3067
|
+
throw response;
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3070
|
+
const postSlackFileAdapterFactory = (luvio) => {
|
|
3071
|
+
return function postSlackFile(untrustedConfig) {
|
|
3072
|
+
const config = validateAdapterConfig$f(untrustedConfig, postSlackFile_ConfigPropertyNames);
|
|
3073
|
+
// Invalid or incomplete config
|
|
3074
|
+
if (config === null) {
|
|
3075
|
+
throw new Error('Invalid config for "postSlackFile"');
|
|
3076
|
+
}
|
|
3077
|
+
return buildNetworkSnapshot$f(luvio, config);
|
|
3078
|
+
};
|
|
3079
|
+
};
|
|
3080
|
+
|
|
3081
|
+
const VERSION$7 = "ed15e6ba6e9dd618e72c6eea210ee7a8";
|
|
3082
|
+
function validate$7(obj, path = 'SlackBridgeRecordChannelInfoOutputRepresentation') {
|
|
3083
|
+
const v_error = (() => {
|
|
3084
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3085
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3086
|
+
}
|
|
3087
|
+
const obj_conversationInfo = obj.conversationInfo;
|
|
3088
|
+
const path_conversationInfo = path + '.conversationInfo';
|
|
3089
|
+
if (typeof obj_conversationInfo !== 'object') {
|
|
3090
|
+
return new TypeError('Expected "object" but received "' + typeof obj_conversationInfo + '" (at "' + path_conversationInfo + '")');
|
|
3091
|
+
}
|
|
3092
|
+
const obj_relatedRecordId = obj.relatedRecordId;
|
|
3093
|
+
const path_relatedRecordId = path + '.relatedRecordId';
|
|
3094
|
+
if (typeof obj_relatedRecordId !== 'string') {
|
|
3095
|
+
return new TypeError('Expected "string" but received "' + typeof obj_relatedRecordId + '" (at "' + path_relatedRecordId + '")');
|
|
3096
|
+
}
|
|
3097
|
+
const obj_teamId = obj.teamId;
|
|
3098
|
+
const path_teamId = path + '.teamId';
|
|
3099
|
+
if (typeof obj_teamId !== 'string') {
|
|
3100
|
+
return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
|
|
3101
|
+
}
|
|
3102
|
+
})();
|
|
3103
|
+
return v_error === undefined ? null : v_error;
|
|
3104
|
+
}
|
|
3105
|
+
const RepresentationType$7 = 'SlackBridgeRecordChannelInfoOutputRepresentation';
|
|
3106
|
+
function keyBuilder$n(luvio, config) {
|
|
3107
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.relatedRecordId;
|
|
3108
|
+
}
|
|
3109
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
3110
|
+
const keyParams = {
|
|
3111
|
+
relatedRecordId: object.relatedRecordId
|
|
3112
|
+
};
|
|
3113
|
+
return keyBuilder$n(luvio, keyParams);
|
|
3114
|
+
}
|
|
3115
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
3116
|
+
const input_conversationInfo = input.conversationInfo;
|
|
3117
|
+
const input_conversationInfo_id = path.fullPath + '__conversationInfo';
|
|
3118
|
+
input.conversationInfo = ingest$d(input_conversationInfo, {
|
|
3119
|
+
fullPath: input_conversationInfo_id,
|
|
3120
|
+
propertyName: 'conversationInfo',
|
|
3121
|
+
parent: {
|
|
3122
|
+
data: input,
|
|
3123
|
+
key: path.fullPath,
|
|
3124
|
+
existing: existing,
|
|
3125
|
+
},
|
|
3126
|
+
ttl: path.ttl
|
|
3127
|
+
}, luvio, store, timestamp);
|
|
3128
|
+
return input;
|
|
3129
|
+
}
|
|
3130
|
+
const select$j = function SlackBridgeRecordChannelInfoOutputRepresentationSelect() {
|
|
3131
|
+
return {
|
|
3132
|
+
kind: 'Fragment',
|
|
3133
|
+
version: VERSION$7,
|
|
3134
|
+
private: [],
|
|
3135
|
+
selections: [
|
|
3136
|
+
{
|
|
3137
|
+
name: 'conversationInfo',
|
|
3138
|
+
kind: 'Link',
|
|
3139
|
+
fragment: select$w()
|
|
3140
|
+
},
|
|
3141
|
+
{
|
|
3142
|
+
name: 'relatedRecordId',
|
|
3143
|
+
kind: 'Scalar'
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
name: 'teamId',
|
|
3147
|
+
kind: 'Scalar'
|
|
3148
|
+
}
|
|
3149
|
+
]
|
|
3150
|
+
};
|
|
3151
|
+
};
|
|
3152
|
+
function equals$7(existing, incoming) {
|
|
3153
|
+
const existing_relatedRecordId = existing.relatedRecordId;
|
|
3154
|
+
const incoming_relatedRecordId = incoming.relatedRecordId;
|
|
3155
|
+
if (!(existing_relatedRecordId === incoming_relatedRecordId)) {
|
|
3156
|
+
return false;
|
|
3157
|
+
}
|
|
3158
|
+
const existing_teamId = existing.teamId;
|
|
3159
|
+
const incoming_teamId = incoming.teamId;
|
|
3160
|
+
if (!(existing_teamId === incoming_teamId)) {
|
|
3161
|
+
return false;
|
|
3162
|
+
}
|
|
3163
|
+
const existing_conversationInfo = existing.conversationInfo;
|
|
3164
|
+
const incoming_conversationInfo = incoming.conversationInfo;
|
|
3165
|
+
if (!(existing_conversationInfo.__ref === incoming_conversationInfo.__ref)) {
|
|
3166
|
+
return false;
|
|
3167
|
+
}
|
|
3168
|
+
return true;
|
|
3169
|
+
}
|
|
3170
|
+
const ingest$7 = function SlackBridgeRecordChannelInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3171
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3172
|
+
const validateError = validate$7(input);
|
|
3173
|
+
if (validateError !== null) {
|
|
3174
|
+
throw validateError;
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
3178
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
3179
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "SlackBridge", VERSION$7, RepresentationType$7, equals$7);
|
|
3180
|
+
return createLink(key);
|
|
3181
|
+
};
|
|
3182
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
3183
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3184
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
3185
|
+
rootKeySet.set(rootKey, {
|
|
3186
|
+
namespace: keyPrefix,
|
|
3187
|
+
representationName: RepresentationType$7,
|
|
3188
|
+
mergeable: false
|
|
3189
|
+
});
|
|
3190
|
+
getTypeCacheKeys$d(rootKeySet, luvio, input.conversationInfo);
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
function select$i(luvio, params) {
|
|
3194
|
+
return select$j();
|
|
3195
|
+
}
|
|
3196
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
3197
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
3198
|
+
}
|
|
3199
|
+
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
3200
|
+
const { body } = response;
|
|
3201
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
3202
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3203
|
+
const snapshot = luvio.storeLookup({
|
|
3204
|
+
recordId: key,
|
|
3205
|
+
node: select$i(),
|
|
3206
|
+
variables: {},
|
|
3207
|
+
});
|
|
3208
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3209
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3210
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
deepFreeze(snapshot.data);
|
|
3214
|
+
return snapshot;
|
|
3215
|
+
}
|
|
3216
|
+
function createResourceRequest$e(config) {
|
|
3217
|
+
const headers = {};
|
|
3218
|
+
return {
|
|
3219
|
+
baseUri: '/services/data/v63.0',
|
|
3220
|
+
basePath: '/connect/slackbridge/record_channels',
|
|
3221
|
+
method: 'post',
|
|
3222
|
+
body: config.body,
|
|
3223
|
+
urlParams: {},
|
|
3224
|
+
queryParams: {},
|
|
3225
|
+
headers,
|
|
3226
|
+
priority: 'normal',
|
|
3227
|
+
};
|
|
3228
|
+
}
|
|
3229
|
+
|
|
3230
|
+
const adapterName$e = 'postSlackRecordChannelInfos';
|
|
3231
|
+
const postSlackRecordChannelInfos_ConfigPropertyMetadata = [
|
|
3232
|
+
generateParamConfigMetadata('conversationInfo', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3233
|
+
generateParamConfigMetadata('relatedRecordId', true, 2 /* Body */, 0 /* String */),
|
|
3234
|
+
];
|
|
3235
|
+
const postSlackRecordChannelInfos_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, postSlackRecordChannelInfos_ConfigPropertyMetadata);
|
|
3236
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$i(postSlackRecordChannelInfos_ConfigPropertyMetadata);
|
|
3237
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
3238
|
+
const config = {};
|
|
3239
|
+
typeCheckConfig$i(untrustedConfig, config, postSlackRecordChannelInfos_ConfigPropertyMetadata);
|
|
3240
|
+
const untrustedConfig_conversationInfo = untrustedConfig.conversationInfo;
|
|
3241
|
+
if (untrustedIsObject(untrustedConfig_conversationInfo)) {
|
|
3242
|
+
const untrustedConfig_conversationInfo_object = {};
|
|
3243
|
+
const untrustedConfig_conversationInfo_isPrivate = untrustedConfig_conversationInfo.isPrivate;
|
|
3244
|
+
if (typeof untrustedConfig_conversationInfo_isPrivate === 'boolean') {
|
|
3245
|
+
untrustedConfig_conversationInfo_object.isPrivate = untrustedConfig_conversationInfo_isPrivate;
|
|
3246
|
+
}
|
|
3247
|
+
if (untrustedConfig_conversationInfo_object !== undefined && Object.keys(untrustedConfig_conversationInfo_object).length >= 0) {
|
|
3248
|
+
config.conversationInfo = untrustedConfig_conversationInfo_object;
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3251
|
+
return config;
|
|
3252
|
+
}
|
|
3253
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
3254
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3255
|
+
return null;
|
|
3256
|
+
}
|
|
3257
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3258
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3259
|
+
}
|
|
3260
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
3261
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3262
|
+
return null;
|
|
3263
|
+
}
|
|
3264
|
+
return config;
|
|
3265
|
+
}
|
|
3266
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
3267
|
+
const resourceParams = createResourceParams$e(config);
|
|
3268
|
+
const request = createResourceRequest$e(resourceParams);
|
|
3269
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3270
|
+
.then((response) => {
|
|
3271
|
+
return luvio.handleSuccessResponse(() => {
|
|
3272
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response);
|
|
3273
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3274
|
+
}, () => {
|
|
3275
|
+
const cache = new StoreKeyMap();
|
|
3276
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
3277
|
+
return cache;
|
|
3278
|
+
});
|
|
3279
|
+
}, (response) => {
|
|
3280
|
+
deepFreeze(response);
|
|
3281
|
+
throw response;
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3284
|
+
const postSlackRecordChannelInfosAdapterFactory = (luvio) => {
|
|
3285
|
+
return function postSlackRecordChannelInfos(untrustedConfig) {
|
|
3286
|
+
const config = validateAdapterConfig$e(untrustedConfig, postSlackRecordChannelInfos_ConfigPropertyNames);
|
|
3287
|
+
// Invalid or incomplete config
|
|
3288
|
+
if (config === null) {
|
|
3289
|
+
throw new Error('Invalid config for "postSlackRecordChannelInfos"');
|
|
3290
|
+
}
|
|
3291
|
+
return buildNetworkSnapshot$e(luvio, config);
|
|
3292
|
+
};
|
|
3293
|
+
};
|
|
3294
|
+
|
|
3295
|
+
function select$h(luvio, params) {
|
|
3296
|
+
return select$j();
|
|
3297
|
+
}
|
|
3298
|
+
function keyBuilder$m(luvio, params) {
|
|
3299
|
+
return keyBuilder$n(luvio, {
|
|
3300
|
+
relatedRecordId: params.urlParams.relatedRecordId
|
|
3301
|
+
});
|
|
3302
|
+
}
|
|
3303
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
3304
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
3305
|
+
}
|
|
3306
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
3307
|
+
const { body } = response;
|
|
3308
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
3309
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3310
|
+
const snapshot = luvio.storeLookup({
|
|
3311
|
+
recordId: key,
|
|
3312
|
+
node: select$h(),
|
|
3313
|
+
variables: {},
|
|
3314
|
+
}, snapshotRefresh);
|
|
3315
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3316
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3317
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3318
|
+
}
|
|
3319
|
+
}
|
|
3320
|
+
deepFreeze(snapshot.data);
|
|
3321
|
+
return snapshot;
|
|
3322
|
+
}
|
|
3323
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
3324
|
+
const key = keyBuilder$m(luvio, params);
|
|
3325
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3326
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
3327
|
+
return errorSnapshot;
|
|
3328
|
+
}
|
|
3329
|
+
function createResourceRequest$d(config) {
|
|
3330
|
+
const headers = {};
|
|
3331
|
+
return {
|
|
3332
|
+
baseUri: '/services/data/v63.0',
|
|
3333
|
+
basePath: '/connect/slackbridge/record_channels/' + config.urlParams.relatedRecordId + '',
|
|
3334
|
+
method: 'get',
|
|
3335
|
+
body: null,
|
|
3336
|
+
urlParams: config.urlParams,
|
|
3337
|
+
queryParams: {},
|
|
3338
|
+
headers,
|
|
3339
|
+
priority: 'normal',
|
|
3340
|
+
};
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
const adapterName$d = 'getSlackRecordChannelInfo';
|
|
3344
|
+
const getSlackRecordChannelInfo_ConfigPropertyMetadata = [
|
|
3345
|
+
generateParamConfigMetadata('relatedRecordId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3346
|
+
];
|
|
3347
|
+
const getSlackRecordChannelInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, getSlackRecordChannelInfo_ConfigPropertyMetadata);
|
|
3348
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$i(getSlackRecordChannelInfo_ConfigPropertyMetadata);
|
|
3349
|
+
function keyBuilder$l(luvio, config) {
|
|
3350
|
+
const resourceParams = createResourceParams$d(config);
|
|
3351
|
+
return keyBuilder$m(luvio, resourceParams);
|
|
3352
|
+
}
|
|
3353
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
3354
|
+
const config = {};
|
|
3355
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackRecordChannelInfo_ConfigPropertyMetadata);
|
|
3356
|
+
return config;
|
|
3357
|
+
}
|
|
3358
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
3359
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3360
|
+
return null;
|
|
3361
|
+
}
|
|
3362
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3363
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3364
|
+
}
|
|
3365
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
3366
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3367
|
+
return null;
|
|
3368
|
+
}
|
|
3369
|
+
return config;
|
|
3370
|
+
}
|
|
3371
|
+
function adapterFragment$7(luvio, config) {
|
|
3372
|
+
createResourceParams$d(config);
|
|
3373
|
+
return select$h();
|
|
3374
|
+
}
|
|
3375
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
3376
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
3377
|
+
config,
|
|
3378
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3379
|
+
});
|
|
3380
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3381
|
+
}
|
|
3382
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
3383
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
3384
|
+
config,
|
|
3385
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3386
|
+
});
|
|
3387
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3388
|
+
}
|
|
3389
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
3390
|
+
const resourceParams = createResourceParams$d(config);
|
|
3391
|
+
const request = createResourceRequest$d(resourceParams);
|
|
3392
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3393
|
+
.then((response) => {
|
|
3394
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
3395
|
+
const cache = new StoreKeyMap();
|
|
3396
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
3397
|
+
return cache;
|
|
3398
|
+
});
|
|
3399
|
+
}, (response) => {
|
|
3400
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3403
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
3404
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$d, undefined, false);
|
|
3405
|
+
}
|
|
3406
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
3407
|
+
const { luvio, config } = context;
|
|
3408
|
+
const selector = {
|
|
3409
|
+
recordId: keyBuilder$l(luvio, config),
|
|
3410
|
+
node: adapterFragment$7(luvio, config),
|
|
3411
|
+
variables: {},
|
|
3412
|
+
};
|
|
3413
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3414
|
+
config,
|
|
3415
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3416
|
+
});
|
|
3417
|
+
return cacheSnapshot;
|
|
3418
|
+
}
|
|
3419
|
+
const getSlackRecordChannelInfoAdapterFactory = (luvio) => function SlackBridge__getSlackRecordChannelInfo(untrustedConfig, requestContext) {
|
|
3420
|
+
const config = validateAdapterConfig$d(untrustedConfig, getSlackRecordChannelInfo_ConfigPropertyNames);
|
|
3421
|
+
// Invalid or incomplete config
|
|
3422
|
+
if (config === null) {
|
|
3423
|
+
return null;
|
|
3424
|
+
}
|
|
3425
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3426
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
3427
|
+
};
|
|
3428
|
+
|
|
3429
|
+
const VERSION$6 = "30b0f3c5bd175b72d9b304944fd9d682";
|
|
3430
|
+
function validate$6(obj, path = 'SlackBridgeConversationMembersOutputRepresentation') {
|
|
3431
|
+
const v_error = (() => {
|
|
3432
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3433
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3434
|
+
}
|
|
3435
|
+
const obj_channelId = obj.channelId;
|
|
3436
|
+
const path_channelId = path + '.channelId';
|
|
3437
|
+
if (typeof obj_channelId !== 'string') {
|
|
3438
|
+
return new TypeError('Expected "string" but received "' + typeof obj_channelId + '" (at "' + path_channelId + '")');
|
|
3439
|
+
}
|
|
3440
|
+
const obj_nextCursor = obj.nextCursor;
|
|
3441
|
+
const path_nextCursor = path + '.nextCursor';
|
|
3442
|
+
let obj_nextCursor_union0 = null;
|
|
3443
|
+
const obj_nextCursor_union0_error = (() => {
|
|
3444
|
+
if (typeof obj_nextCursor !== 'string') {
|
|
3445
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextCursor + '" (at "' + path_nextCursor + '")');
|
|
3446
|
+
}
|
|
3447
|
+
})();
|
|
3448
|
+
if (obj_nextCursor_union0_error != null) {
|
|
3449
|
+
obj_nextCursor_union0 = obj_nextCursor_union0_error.message;
|
|
3450
|
+
}
|
|
3451
|
+
let obj_nextCursor_union1 = null;
|
|
3452
|
+
const obj_nextCursor_union1_error = (() => {
|
|
3453
|
+
if (obj_nextCursor !== null) {
|
|
3454
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nextCursor + '" (at "' + path_nextCursor + '")');
|
|
2276
3455
|
}
|
|
2277
3456
|
})();
|
|
2278
|
-
if (
|
|
2279
|
-
|
|
3457
|
+
if (obj_nextCursor_union1_error != null) {
|
|
3458
|
+
obj_nextCursor_union1 = obj_nextCursor_union1_error.message;
|
|
2280
3459
|
}
|
|
2281
|
-
if (
|
|
2282
|
-
let message = 'Object doesn\'t match union (at "' +
|
|
2283
|
-
message += '\n' +
|
|
2284
|
-
message += '\n' +
|
|
3460
|
+
if (obj_nextCursor_union0 && obj_nextCursor_union1) {
|
|
3461
|
+
let message = 'Object doesn\'t match union (at "' + path_nextCursor + '")';
|
|
3462
|
+
message += '\n' + obj_nextCursor_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3463
|
+
message += '\n' + obj_nextCursor_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2285
3464
|
return new TypeError(message);
|
|
2286
3465
|
}
|
|
3466
|
+
const obj_slackUserIds = obj.slackUserIds;
|
|
3467
|
+
const path_slackUserIds = path + '.slackUserIds';
|
|
3468
|
+
if (!ArrayIsArray(obj_slackUserIds)) {
|
|
3469
|
+
return new TypeError('Expected "array" but received "' + typeof obj_slackUserIds + '" (at "' + path_slackUserIds + '")');
|
|
3470
|
+
}
|
|
3471
|
+
for (let i = 0; i < obj_slackUserIds.length; i++) {
|
|
3472
|
+
const obj_slackUserIds_item = obj_slackUserIds[i];
|
|
3473
|
+
const path_slackUserIds_item = path_slackUserIds + '[' + i + ']';
|
|
3474
|
+
if (typeof obj_slackUserIds_item !== 'string') {
|
|
3475
|
+
return new TypeError('Expected "string" but received "' + typeof obj_slackUserIds_item + '" (at "' + path_slackUserIds_item + '")');
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
2287
3478
|
})();
|
|
2288
3479
|
return v_error === undefined ? null : v_error;
|
|
2289
3480
|
}
|
|
2290
|
-
const RepresentationType$6 = '
|
|
3481
|
+
const RepresentationType$6 = 'SlackBridgeConversationMembersOutputRepresentation';
|
|
3482
|
+
function keyBuilder$k(luvio, config) {
|
|
3483
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.channelId;
|
|
3484
|
+
}
|
|
3485
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
3486
|
+
const keyParams = {
|
|
3487
|
+
channelId: object.channelId
|
|
3488
|
+
};
|
|
3489
|
+
return keyBuilder$k(luvio, keyParams);
|
|
3490
|
+
}
|
|
2291
3491
|
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2292
|
-
const input_contextUserInfo = input.contextUserInfo;
|
|
2293
|
-
const input_contextUserInfo_id = path.fullPath + '__contextUserInfo';
|
|
2294
|
-
if (input_contextUserInfo !== null && typeof input_contextUserInfo === 'object') {
|
|
2295
|
-
input.contextUserInfo = ingest$a(input_contextUserInfo, {
|
|
2296
|
-
fullPath: input_contextUserInfo_id,
|
|
2297
|
-
propertyName: 'contextUserInfo',
|
|
2298
|
-
parent: {
|
|
2299
|
-
data: input,
|
|
2300
|
-
key: path.fullPath,
|
|
2301
|
-
existing: existing,
|
|
2302
|
-
},
|
|
2303
|
-
ttl: path.ttl
|
|
2304
|
-
}, luvio, store, timestamp);
|
|
2305
|
-
}
|
|
2306
|
-
const input_history = input.history;
|
|
2307
|
-
const input_history_id = path.fullPath + '__history';
|
|
2308
|
-
input.history = ingest$7(input_history, {
|
|
2309
|
-
fullPath: input_history_id,
|
|
2310
|
-
propertyName: 'history',
|
|
2311
|
-
parent: {
|
|
2312
|
-
data: input,
|
|
2313
|
-
key: path.fullPath,
|
|
2314
|
-
existing: existing,
|
|
2315
|
-
},
|
|
2316
|
-
ttl: path.ttl
|
|
2317
|
-
}, luvio, store, timestamp);
|
|
2318
|
-
const input_userInfos = input.userInfos;
|
|
2319
|
-
const input_userInfos_id = path.fullPath + '__userInfos';
|
|
2320
|
-
for (let i = 0; i < input_userInfos.length; i++) {
|
|
2321
|
-
const input_userInfos_item = input_userInfos[i];
|
|
2322
|
-
let input_userInfos_item_id = input_userInfos_id + '__' + i;
|
|
2323
|
-
input_userInfos[i] = ingest$a(input_userInfos_item, {
|
|
2324
|
-
fullPath: input_userInfos_item_id,
|
|
2325
|
-
propertyName: i,
|
|
2326
|
-
parent: {
|
|
2327
|
-
data: input,
|
|
2328
|
-
key: path.fullPath,
|
|
2329
|
-
existing: existing,
|
|
2330
|
-
},
|
|
2331
|
-
ttl: path.ttl
|
|
2332
|
-
}, luvio, store, timestamp);
|
|
2333
|
-
}
|
|
2334
3492
|
return input;
|
|
2335
3493
|
}
|
|
2336
|
-
const select$g = function
|
|
2337
|
-
const { selections: SlackBridgeConversationInfoOutputRepresentation__selections, opaque: SlackBridgeConversationInfoOutputRepresentation__opaque, } = select$q();
|
|
3494
|
+
const select$g = function SlackBridgeConversationMembersOutputRepresentationSelect() {
|
|
2338
3495
|
return {
|
|
2339
3496
|
kind: 'Fragment',
|
|
2340
3497
|
version: VERSION$6,
|
|
@@ -2345,43 +3502,13 @@ const select$g = function SlackBridgeConversationOutputRepresentationSelect() {
|
|
|
2345
3502
|
kind: 'Scalar'
|
|
2346
3503
|
},
|
|
2347
3504
|
{
|
|
2348
|
-
name: '
|
|
2349
|
-
kind: 'Scalar'
|
|
2350
|
-
},
|
|
2351
|
-
{
|
|
2352
|
-
name: 'contextUserInfo',
|
|
2353
|
-
kind: 'Link',
|
|
2354
|
-
nullable: true,
|
|
2355
|
-
fragment: select$o()
|
|
2356
|
-
},
|
|
2357
|
-
{
|
|
2358
|
-
name: 'conversationInfo',
|
|
2359
|
-
kind: 'Object',
|
|
2360
|
-
nullable: true,
|
|
2361
|
-
selections: SlackBridgeConversationInfoOutputRepresentation__selections
|
|
2362
|
-
},
|
|
2363
|
-
{
|
|
2364
|
-
name: 'history',
|
|
2365
|
-
kind: 'Link',
|
|
2366
|
-
fragment: select$h()
|
|
2367
|
-
},
|
|
2368
|
-
{
|
|
2369
|
-
name: 'teamId',
|
|
2370
|
-
kind: 'Scalar'
|
|
2371
|
-
},
|
|
2372
|
-
{
|
|
2373
|
-
name: 'threadTs',
|
|
3505
|
+
name: 'nextCursor',
|
|
2374
3506
|
kind: 'Scalar'
|
|
2375
3507
|
},
|
|
2376
3508
|
{
|
|
2377
|
-
name: '
|
|
2378
|
-
kind: '
|
|
2379
|
-
plural: true
|
|
2380
|
-
fragment: select$o()
|
|
2381
|
-
},
|
|
2382
|
-
{
|
|
2383
|
-
name: 'websocketUrl',
|
|
2384
|
-
kind: 'Scalar'
|
|
3509
|
+
name: 'slackUserIds',
|
|
3510
|
+
kind: 'Scalar',
|
|
3511
|
+
plural: true
|
|
2385
3512
|
}
|
|
2386
3513
|
]
|
|
2387
3514
|
};
|
|
@@ -2392,109 +3519,195 @@ function equals$6(existing, incoming) {
|
|
|
2392
3519
|
if (!(existing_channelId === incoming_channelId)) {
|
|
2393
3520
|
return false;
|
|
2394
3521
|
}
|
|
2395
|
-
const
|
|
2396
|
-
const
|
|
2397
|
-
if (!(
|
|
2398
|
-
return false;
|
|
2399
|
-
}
|
|
2400
|
-
const existing_teamId = existing.teamId;
|
|
2401
|
-
const incoming_teamId = incoming.teamId;
|
|
2402
|
-
if (!(existing_teamId === incoming_teamId)) {
|
|
2403
|
-
return false;
|
|
2404
|
-
}
|
|
2405
|
-
const existing_contextUserInfo = existing.contextUserInfo;
|
|
2406
|
-
const incoming_contextUserInfo = incoming.contextUserInfo;
|
|
2407
|
-
if (!(existing_contextUserInfo === incoming_contextUserInfo
|
|
2408
|
-
|| (existing_contextUserInfo != null &&
|
|
2409
|
-
incoming_contextUserInfo != null &&
|
|
2410
|
-
existing_contextUserInfo.__ref != null &&
|
|
2411
|
-
incoming_contextUserInfo.__ref != null &&
|
|
2412
|
-
existing_contextUserInfo.__ref === incoming_contextUserInfo.__ref))) {
|
|
2413
|
-
return false;
|
|
2414
|
-
}
|
|
2415
|
-
const existing_conversationInfo = existing.conversationInfo;
|
|
2416
|
-
const incoming_conversationInfo = incoming.conversationInfo;
|
|
2417
|
-
if (!(existing_conversationInfo === incoming_conversationInfo
|
|
2418
|
-
|| (existing_conversationInfo != null &&
|
|
2419
|
-
incoming_conversationInfo != null &&
|
|
2420
|
-
equals$g(existing_conversationInfo, incoming_conversationInfo)))) {
|
|
2421
|
-
return false;
|
|
2422
|
-
}
|
|
2423
|
-
const existing_history = existing.history;
|
|
2424
|
-
const incoming_history = incoming.history;
|
|
2425
|
-
if (!(existing_history.__ref === incoming_history.__ref)) {
|
|
2426
|
-
return false;
|
|
2427
|
-
}
|
|
2428
|
-
const existing_threadTs = existing.threadTs;
|
|
2429
|
-
const incoming_threadTs = incoming.threadTs;
|
|
2430
|
-
if (!(existing_threadTs === incoming_threadTs)) {
|
|
3522
|
+
const existing_nextCursor = existing.nextCursor;
|
|
3523
|
+
const incoming_nextCursor = incoming.nextCursor;
|
|
3524
|
+
if (!(existing_nextCursor === incoming_nextCursor)) {
|
|
2431
3525
|
return false;
|
|
2432
3526
|
}
|
|
2433
|
-
const
|
|
2434
|
-
const
|
|
2435
|
-
const
|
|
2436
|
-
if (!(
|
|
3527
|
+
const existing_slackUserIds = existing.slackUserIds;
|
|
3528
|
+
const incoming_slackUserIds = incoming.slackUserIds;
|
|
3529
|
+
const equals_slackUserIds_items = equalsArray(existing_slackUserIds, incoming_slackUserIds, (existing_slackUserIds_item, incoming_slackUserIds_item) => {
|
|
3530
|
+
if (!(existing_slackUserIds_item === incoming_slackUserIds_item)) {
|
|
2437
3531
|
return false;
|
|
2438
3532
|
}
|
|
2439
3533
|
});
|
|
2440
|
-
if (
|
|
2441
|
-
return false;
|
|
2442
|
-
}
|
|
2443
|
-
const existing_websocketUrl = existing.websocketUrl;
|
|
2444
|
-
const incoming_websocketUrl = incoming.websocketUrl;
|
|
2445
|
-
if (!(existing_websocketUrl === incoming_websocketUrl)) {
|
|
3534
|
+
if (equals_slackUserIds_items === false) {
|
|
2446
3535
|
return false;
|
|
2447
3536
|
}
|
|
2448
3537
|
return true;
|
|
2449
3538
|
}
|
|
2450
|
-
const ingest$6 = function
|
|
3539
|
+
const ingest$6 = function SlackBridgeConversationMembersOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2451
3540
|
if (process.env.NODE_ENV !== 'production') {
|
|
2452
3541
|
const validateError = validate$6(input);
|
|
2453
3542
|
if (validateError !== null) {
|
|
2454
3543
|
throw validateError;
|
|
2455
3544
|
}
|
|
2456
3545
|
}
|
|
2457
|
-
const key =
|
|
3546
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
2458
3547
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2459
3548
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "SlackBridge", VERSION$6, RepresentationType$6, equals$6);
|
|
2460
3549
|
return createLink(key);
|
|
2461
3550
|
};
|
|
2462
3551
|
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2463
3552
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2464
|
-
const rootKey =
|
|
3553
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
2465
3554
|
rootKeySet.set(rootKey, {
|
|
2466
3555
|
namespace: keyPrefix,
|
|
2467
3556
|
representationName: RepresentationType$6,
|
|
2468
3557
|
mergeable: false
|
|
2469
3558
|
});
|
|
2470
|
-
if (input.contextUserInfo !== null && typeof input.contextUserInfo === 'object') {
|
|
2471
|
-
getTypeCacheKeys$a(rootKeySet, luvio, input.contextUserInfo);
|
|
2472
|
-
}
|
|
2473
|
-
getTypeCacheKeys$7(rootKeySet, luvio, input.history, () => rootKey + "__" + "history");
|
|
2474
|
-
const input_userInfos_length = input.userInfos.length;
|
|
2475
|
-
for (let i = 0; i < input_userInfos_length; i++) {
|
|
2476
|
-
getTypeCacheKeys$a(rootKeySet, luvio, input.userInfos[i]);
|
|
2477
|
-
}
|
|
2478
3559
|
}
|
|
2479
3560
|
|
|
2480
3561
|
function select$f(luvio, params) {
|
|
2481
3562
|
return select$g();
|
|
2482
3563
|
}
|
|
2483
|
-
function keyBuilder$
|
|
2484
|
-
return
|
|
3564
|
+
function keyBuilder$j(luvio, params) {
|
|
3565
|
+
return keyBuilder$k(luvio, {
|
|
3566
|
+
channelId: params.urlParams.channelId
|
|
3567
|
+
});
|
|
2485
3568
|
}
|
|
2486
|
-
function getResponseCacheKeys$
|
|
2487
|
-
getTypeCacheKeys$6(storeKeyMap, luvio, response
|
|
3569
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
3570
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
2488
3571
|
}
|
|
2489
3572
|
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
2490
3573
|
const { body } = response;
|
|
2491
|
-
const key = keyBuilder$
|
|
3574
|
+
const key = keyBuilder$j(luvio, resourceParams);
|
|
3575
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
3576
|
+
const snapshot = luvio.storeLookup({
|
|
3577
|
+
recordId: key,
|
|
3578
|
+
node: select$f(),
|
|
3579
|
+
variables: {},
|
|
3580
|
+
}, snapshotRefresh);
|
|
3581
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3582
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3583
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3584
|
+
}
|
|
3585
|
+
}
|
|
3586
|
+
deepFreeze(snapshot.data);
|
|
3587
|
+
return snapshot;
|
|
3588
|
+
}
|
|
3589
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
3590
|
+
const key = keyBuilder$j(luvio, params);
|
|
3591
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3592
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
3593
|
+
return errorSnapshot;
|
|
3594
|
+
}
|
|
3595
|
+
function createResourceRequest$c(config) {
|
|
3596
|
+
const headers = {};
|
|
3597
|
+
return {
|
|
3598
|
+
baseUri: '/services/data/v63.0',
|
|
3599
|
+
basePath: '/connect/slackbridge/team/' + config.urlParams.teamId + '/channel/' + config.urlParams.channelId + '/members',
|
|
3600
|
+
method: 'get',
|
|
3601
|
+
body: null,
|
|
3602
|
+
urlParams: config.urlParams,
|
|
3603
|
+
queryParams: {},
|
|
3604
|
+
headers,
|
|
3605
|
+
priority: 'normal',
|
|
3606
|
+
};
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3609
|
+
const adapterName$c = 'getSlackConversationMembers';
|
|
3610
|
+
const getSlackConversationMembers_ConfigPropertyMetadata = [
|
|
3611
|
+
generateParamConfigMetadata('channelId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3612
|
+
generateParamConfigMetadata('teamId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3613
|
+
];
|
|
3614
|
+
const getSlackConversationMembers_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getSlackConversationMembers_ConfigPropertyMetadata);
|
|
3615
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$i(getSlackConversationMembers_ConfigPropertyMetadata);
|
|
3616
|
+
function keyBuilder$i(luvio, config) {
|
|
3617
|
+
const resourceParams = createResourceParams$c(config);
|
|
3618
|
+
return keyBuilder$j(luvio, resourceParams);
|
|
3619
|
+
}
|
|
3620
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
3621
|
+
const config = {};
|
|
3622
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackConversationMembers_ConfigPropertyMetadata);
|
|
3623
|
+
return config;
|
|
3624
|
+
}
|
|
3625
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
3626
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3627
|
+
return null;
|
|
3628
|
+
}
|
|
3629
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3630
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3631
|
+
}
|
|
3632
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
3633
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3634
|
+
return null;
|
|
3635
|
+
}
|
|
3636
|
+
return config;
|
|
3637
|
+
}
|
|
3638
|
+
function adapterFragment$6(luvio, config) {
|
|
3639
|
+
createResourceParams$c(config);
|
|
3640
|
+
return select$f();
|
|
3641
|
+
}
|
|
3642
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
3643
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
3644
|
+
config,
|
|
3645
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3646
|
+
});
|
|
3647
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3648
|
+
}
|
|
3649
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
3650
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
3651
|
+
config,
|
|
3652
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3653
|
+
});
|
|
3654
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3655
|
+
}
|
|
3656
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
3657
|
+
const resourceParams = createResourceParams$c(config);
|
|
3658
|
+
const request = createResourceRequest$c(resourceParams);
|
|
3659
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3660
|
+
.then((response) => {
|
|
3661
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
3662
|
+
const cache = new StoreKeyMap();
|
|
3663
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
3664
|
+
return cache;
|
|
3665
|
+
});
|
|
3666
|
+
}, (response) => {
|
|
3667
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
3668
|
+
});
|
|
3669
|
+
}
|
|
3670
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
3671
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
3672
|
+
}
|
|
3673
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
3674
|
+
const { luvio, config } = context;
|
|
3675
|
+
const selector = {
|
|
3676
|
+
recordId: keyBuilder$i(luvio, config),
|
|
3677
|
+
node: adapterFragment$6(luvio, config),
|
|
3678
|
+
variables: {},
|
|
3679
|
+
};
|
|
3680
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3681
|
+
config,
|
|
3682
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3683
|
+
});
|
|
3684
|
+
return cacheSnapshot;
|
|
3685
|
+
}
|
|
3686
|
+
const getSlackConversationMembersAdapterFactory = (luvio) => function SlackBridge__getSlackConversationMembers(untrustedConfig, requestContext) {
|
|
3687
|
+
const config = validateAdapterConfig$c(untrustedConfig, getSlackConversationMembers_ConfigPropertyNames);
|
|
3688
|
+
// Invalid or incomplete config
|
|
3689
|
+
if (config === null) {
|
|
3690
|
+
return null;
|
|
3691
|
+
}
|
|
3692
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3693
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
3694
|
+
};
|
|
3695
|
+
|
|
3696
|
+
function select$e(luvio, params) {
|
|
3697
|
+
return select$g();
|
|
3698
|
+
}
|
|
3699
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
3700
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
3701
|
+
}
|
|
3702
|
+
function ingestSuccess$8(luvio, resourceParams, response) {
|
|
3703
|
+
const { body } = response;
|
|
3704
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
2492
3705
|
luvio.storeIngest(key, ingest$6, body);
|
|
2493
3706
|
const snapshot = luvio.storeLookup({
|
|
2494
3707
|
recordId: key,
|
|
2495
|
-
node: select$
|
|
3708
|
+
node: select$e(),
|
|
2496
3709
|
variables: {},
|
|
2497
|
-
}
|
|
3710
|
+
});
|
|
2498
3711
|
if (process.env.NODE_ENV !== 'production') {
|
|
2499
3712
|
if (snapshot.state !== 'Fulfilled') {
|
|
2500
3713
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -2503,47 +3716,31 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2503
3716
|
deepFreeze(snapshot.data);
|
|
2504
3717
|
return snapshot;
|
|
2505
3718
|
}
|
|
2506
|
-
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
2507
|
-
const key = keyBuilder$g(luvio, params);
|
|
2508
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2509
|
-
luvio.storeIngestError(key, errorSnapshot);
|
|
2510
|
-
return errorSnapshot;
|
|
2511
|
-
}
|
|
2512
3719
|
function createResourceRequest$b(config) {
|
|
2513
3720
|
const headers = {};
|
|
2514
3721
|
return {
|
|
2515
3722
|
baseUri: '/services/data/v63.0',
|
|
2516
|
-
basePath: '/connect/slackbridge/
|
|
2517
|
-
method: '
|
|
2518
|
-
body:
|
|
2519
|
-
urlParams:
|
|
2520
|
-
queryParams:
|
|
3723
|
+
basePath: '/connect/slackbridge/team/' + config.urlParams.teamId + '/channel/' + config.urlParams.channelId + '/members',
|
|
3724
|
+
method: 'post',
|
|
3725
|
+
body: config.body,
|
|
3726
|
+
urlParams: config.urlParams,
|
|
3727
|
+
queryParams: {},
|
|
2521
3728
|
headers,
|
|
2522
3729
|
priority: 'normal',
|
|
2523
3730
|
};
|
|
2524
3731
|
}
|
|
2525
3732
|
|
|
2526
|
-
const adapterName$b = '
|
|
2527
|
-
const
|
|
2528
|
-
generateParamConfigMetadata('channelId',
|
|
2529
|
-
generateParamConfigMetadata('
|
|
2530
|
-
generateParamConfigMetadata('
|
|
2531
|
-
generateParamConfigMetadata('latestMessageTs', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2532
|
-
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2533
|
-
generateParamConfigMetadata('oldestMessageTs', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2534
|
-
generateParamConfigMetadata('parentMessageTs', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2535
|
-
generateParamConfigMetadata('relatedRecordId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2536
|
-
generateParamConfigMetadata('teamId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3733
|
+
const adapterName$b = 'postSlackConversationMembers';
|
|
3734
|
+
const postSlackConversationMembers_ConfigPropertyMetadata = [
|
|
3735
|
+
generateParamConfigMetadata('channelId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3736
|
+
generateParamConfigMetadata('teamId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3737
|
+
generateParamConfigMetadata('slackUserIds', true, 2 /* Body */, 0 /* String */, true),
|
|
2537
3738
|
];
|
|
2538
|
-
const
|
|
2539
|
-
const createResourceParams$b = /*#__PURE__*/ createResourceParams$
|
|
2540
|
-
function keyBuilder$f(luvio, config) {
|
|
2541
|
-
const resourceParams = createResourceParams$b(config);
|
|
2542
|
-
return keyBuilder$g(luvio, resourceParams);
|
|
2543
|
-
}
|
|
3739
|
+
const postSlackConversationMembers_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, postSlackConversationMembers_ConfigPropertyMetadata);
|
|
3740
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$i(postSlackConversationMembers_ConfigPropertyMetadata);
|
|
2544
3741
|
function typeCheckConfig$b(untrustedConfig) {
|
|
2545
3742
|
const config = {};
|
|
2546
|
-
typeCheckConfig$
|
|
3743
|
+
typeCheckConfig$i(untrustedConfig, config, postSlackConversationMembers_ConfigPropertyMetadata);
|
|
2547
3744
|
return config;
|
|
2548
3745
|
}
|
|
2549
3746
|
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
@@ -2559,66 +3756,37 @@ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
|
2559
3756
|
}
|
|
2560
3757
|
return config;
|
|
2561
3758
|
}
|
|
2562
|
-
function adapterFragment$5(luvio, config) {
|
|
2563
|
-
createResourceParams$b(config);
|
|
2564
|
-
return select$f();
|
|
2565
|
-
}
|
|
2566
|
-
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
2567
|
-
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
2568
|
-
config,
|
|
2569
|
-
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2570
|
-
});
|
|
2571
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
2572
|
-
}
|
|
2573
|
-
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
2574
|
-
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
2575
|
-
config,
|
|
2576
|
-
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2577
|
-
});
|
|
2578
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
2579
|
-
}
|
|
2580
3759
|
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
2581
3760
|
const resourceParams = createResourceParams$b(config);
|
|
2582
3761
|
const request = createResourceRequest$b(resourceParams);
|
|
2583
3762
|
return luvio.dispatchResourceRequest(request, options)
|
|
2584
3763
|
.then((response) => {
|
|
2585
|
-
return luvio.handleSuccessResponse(() =>
|
|
3764
|
+
return luvio.handleSuccessResponse(() => {
|
|
3765
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response);
|
|
3766
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3767
|
+
}, () => {
|
|
2586
3768
|
const cache = new StoreKeyMap();
|
|
2587
3769
|
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
2588
3770
|
return cache;
|
|
2589
3771
|
});
|
|
2590
3772
|
}, (response) => {
|
|
2591
|
-
|
|
3773
|
+
deepFreeze(response);
|
|
3774
|
+
throw response;
|
|
2592
3775
|
});
|
|
2593
3776
|
}
|
|
2594
|
-
|
|
2595
|
-
return
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
variables: {},
|
|
3777
|
+
const postSlackConversationMembersAdapterFactory = (luvio) => {
|
|
3778
|
+
return function postSlackConversationMembers(untrustedConfig) {
|
|
3779
|
+
const config = validateAdapterConfig$b(untrustedConfig, postSlackConversationMembers_ConfigPropertyNames);
|
|
3780
|
+
// Invalid or incomplete config
|
|
3781
|
+
if (config === null) {
|
|
3782
|
+
throw new Error('Invalid config for "postSlackConversationMembers"');
|
|
3783
|
+
}
|
|
3784
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
2603
3785
|
};
|
|
2604
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
2605
|
-
config,
|
|
2606
|
-
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2607
|
-
});
|
|
2608
|
-
return cacheSnapshot;
|
|
2609
|
-
}
|
|
2610
|
-
const getSlackConversationAdapterFactory = (luvio) => function SlackBridge__getSlackConversation(untrustedConfig, requestContext) {
|
|
2611
|
-
const config = validateAdapterConfig$b(untrustedConfig, getSlackConversation_ConfigPropertyNames);
|
|
2612
|
-
// Invalid or incomplete config
|
|
2613
|
-
if (config === null) {
|
|
2614
|
-
return null;
|
|
2615
|
-
}
|
|
2616
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2617
|
-
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
2618
3786
|
};
|
|
2619
3787
|
|
|
2620
|
-
const VERSION$5 = "
|
|
2621
|
-
function validate$5(obj, path = '
|
|
3788
|
+
const VERSION$5 = "5ea9ee9da9dcb5309c4f35bb4bf5def2";
|
|
3789
|
+
function validate$5(obj, path = 'SlackBridgeConversationMemberOutputRepresentation') {
|
|
2622
3790
|
const v_error = (() => {
|
|
2623
3791
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2624
3792
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2628,45 +3796,28 @@ function validate$5(obj, path = 'SlackBridgePostMessageOutputRepresentation') {
|
|
|
2628
3796
|
if (typeof obj_channelId !== 'string') {
|
|
2629
3797
|
return new TypeError('Expected "string" but received "' + typeof obj_channelId + '" (at "' + path_channelId + '")');
|
|
2630
3798
|
}
|
|
2631
|
-
const
|
|
2632
|
-
const
|
|
2633
|
-
if (typeof
|
|
2634
|
-
return new TypeError('Expected "
|
|
2635
|
-
}
|
|
2636
|
-
const obj_timestamp = obj.timestamp;
|
|
2637
|
-
const path_timestamp = path + '.timestamp';
|
|
2638
|
-
if (typeof obj_timestamp !== 'string') {
|
|
2639
|
-
return new TypeError('Expected "string" but received "' + typeof obj_timestamp + '" (at "' + path_timestamp + '")');
|
|
3799
|
+
const obj_slackUserId = obj.slackUserId;
|
|
3800
|
+
const path_slackUserId = path + '.slackUserId';
|
|
3801
|
+
if (typeof obj_slackUserId !== 'string') {
|
|
3802
|
+
return new TypeError('Expected "string" but received "' + typeof obj_slackUserId + '" (at "' + path_slackUserId + '")');
|
|
2640
3803
|
}
|
|
2641
3804
|
})();
|
|
2642
3805
|
return v_error === undefined ? null : v_error;
|
|
2643
3806
|
}
|
|
2644
|
-
const RepresentationType$5 = '
|
|
2645
|
-
function keyBuilder$
|
|
3807
|
+
const RepresentationType$5 = 'SlackBridgeConversationMemberOutputRepresentation';
|
|
3808
|
+
function keyBuilder$h(luvio, config) {
|
|
2646
3809
|
return keyPrefix + '::' + RepresentationType$5 + ':' + config.channelId;
|
|
2647
3810
|
}
|
|
2648
3811
|
function keyBuilderFromType$2(luvio, object) {
|
|
2649
3812
|
const keyParams = {
|
|
2650
3813
|
channelId: object.channelId
|
|
2651
3814
|
};
|
|
2652
|
-
return keyBuilder$
|
|
3815
|
+
return keyBuilder$h(luvio, keyParams);
|
|
2653
3816
|
}
|
|
2654
3817
|
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2655
|
-
const input_postedMessage = input.postedMessage;
|
|
2656
|
-
const input_postedMessage_id = path.fullPath + '__postedMessage';
|
|
2657
|
-
input.postedMessage = ingest$8(input_postedMessage, {
|
|
2658
|
-
fullPath: input_postedMessage_id,
|
|
2659
|
-
propertyName: 'postedMessage',
|
|
2660
|
-
parent: {
|
|
2661
|
-
data: input,
|
|
2662
|
-
key: path.fullPath,
|
|
2663
|
-
existing: existing,
|
|
2664
|
-
},
|
|
2665
|
-
ttl: path.ttl
|
|
2666
|
-
}, luvio, store, timestamp);
|
|
2667
3818
|
return input;
|
|
2668
3819
|
}
|
|
2669
|
-
const select$
|
|
3820
|
+
const select$d = function SlackBridgeConversationMemberOutputRepresentationSelect() {
|
|
2670
3821
|
return {
|
|
2671
3822
|
kind: 'Fragment',
|
|
2672
3823
|
version: VERSION$5,
|
|
@@ -2677,12 +3828,7 @@ const select$e = function SlackBridgePostMessageOutputRepresentationSelect() {
|
|
|
2677
3828
|
kind: 'Scalar'
|
|
2678
3829
|
},
|
|
2679
3830
|
{
|
|
2680
|
-
name: '
|
|
2681
|
-
kind: 'Link',
|
|
2682
|
-
fragment: select$i()
|
|
2683
|
-
},
|
|
2684
|
-
{
|
|
2685
|
-
name: 'timestamp',
|
|
3831
|
+
name: 'slackUserId',
|
|
2686
3832
|
kind: 'Scalar'
|
|
2687
3833
|
}
|
|
2688
3834
|
]
|
|
@@ -2694,19 +3840,14 @@ function equals$5(existing, incoming) {
|
|
|
2694
3840
|
if (!(existing_channelId === incoming_channelId)) {
|
|
2695
3841
|
return false;
|
|
2696
3842
|
}
|
|
2697
|
-
const
|
|
2698
|
-
const
|
|
2699
|
-
if (!(
|
|
2700
|
-
return false;
|
|
2701
|
-
}
|
|
2702
|
-
const existing_postedMessage = existing.postedMessage;
|
|
2703
|
-
const incoming_postedMessage = incoming.postedMessage;
|
|
2704
|
-
if (!(existing_postedMessage.__ref === incoming_postedMessage.__ref)) {
|
|
3843
|
+
const existing_slackUserId = existing.slackUserId;
|
|
3844
|
+
const incoming_slackUserId = incoming.slackUserId;
|
|
3845
|
+
if (!(existing_slackUserId === incoming_slackUserId)) {
|
|
2705
3846
|
return false;
|
|
2706
3847
|
}
|
|
2707
3848
|
return true;
|
|
2708
3849
|
}
|
|
2709
|
-
const ingest$5 = function
|
|
3850
|
+
const ingest$5 = function SlackBridgeConversationMemberOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2710
3851
|
if (process.env.NODE_ENV !== 'production') {
|
|
2711
3852
|
const validateError = validate$5(input);
|
|
2712
3853
|
if (validateError !== null) {
|
|
@@ -2726,60 +3867,50 @@ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2726
3867
|
representationName: RepresentationType$5,
|
|
2727
3868
|
mergeable: false
|
|
2728
3869
|
});
|
|
2729
|
-
getTypeCacheKeys$8(rootKeySet, luvio, input.postedMessage, () => rootKey + "__" + "postedMessage");
|
|
2730
3870
|
}
|
|
2731
3871
|
|
|
2732
|
-
function
|
|
2733
|
-
return
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
3872
|
+
function keyBuilder$g(luvio, params) {
|
|
3873
|
+
return keyBuilder$h(luvio, {
|
|
3874
|
+
channelId: params.urlParams.channelId
|
|
3875
|
+
});
|
|
2737
3876
|
}
|
|
2738
|
-
function
|
|
2739
|
-
const
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
node: select$d(),
|
|
2745
|
-
variables: {},
|
|
3877
|
+
function getResponseCacheKeys$a(cacheKeyMap, luvio, resourceParams) {
|
|
3878
|
+
const key = keyBuilder$g(luvio, resourceParams);
|
|
3879
|
+
cacheKeyMap.set(key, {
|
|
3880
|
+
namespace: keyPrefix,
|
|
3881
|
+
representationName: RepresentationType$5,
|
|
3882
|
+
mergeable: false
|
|
2746
3883
|
});
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
}
|
|
2752
|
-
deepFreeze(snapshot.data);
|
|
2753
|
-
return snapshot;
|
|
3884
|
+
}
|
|
3885
|
+
function evictSuccess$2(luvio, resourceParams) {
|
|
3886
|
+
const key = keyBuilder$g(luvio, resourceParams);
|
|
3887
|
+
luvio.storeEvict(key);
|
|
2754
3888
|
}
|
|
2755
3889
|
function createResourceRequest$a(config) {
|
|
2756
3890
|
const headers = {};
|
|
2757
3891
|
return {
|
|
2758
3892
|
baseUri: '/services/data/v63.0',
|
|
2759
|
-
basePath: '/connect/slackbridge/
|
|
2760
|
-
method: '
|
|
2761
|
-
body:
|
|
2762
|
-
urlParams:
|
|
3893
|
+
basePath: '/connect/slackbridge/team/' + config.urlParams.teamId + '/channel/' + config.urlParams.channelId + '/members/' + config.urlParams.slackUserId + '',
|
|
3894
|
+
method: 'delete',
|
|
3895
|
+
body: null,
|
|
3896
|
+
urlParams: config.urlParams,
|
|
2763
3897
|
queryParams: {},
|
|
2764
3898
|
headers,
|
|
2765
3899
|
priority: 'normal',
|
|
2766
3900
|
};
|
|
2767
3901
|
}
|
|
2768
3902
|
|
|
2769
|
-
const adapterName$a = '
|
|
2770
|
-
const
|
|
2771
|
-
generateParamConfigMetadata('channelId', true,
|
|
2772
|
-
generateParamConfigMetadata('
|
|
2773
|
-
generateParamConfigMetadata('
|
|
2774
|
-
generateParamConfigMetadata('teamId', true, 2 /* Body */, 0 /* String */),
|
|
2775
|
-
generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
|
|
2776
|
-
generateParamConfigMetadata('threadTs', false, 2 /* Body */, 0 /* String */),
|
|
3903
|
+
const adapterName$a = 'deleteSlackConversationMember';
|
|
3904
|
+
const deleteSlackConversationMember_ConfigPropertyMetadata = [
|
|
3905
|
+
generateParamConfigMetadata('channelId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3906
|
+
generateParamConfigMetadata('slackUserId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3907
|
+
generateParamConfigMetadata('teamId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2777
3908
|
];
|
|
2778
|
-
const
|
|
2779
|
-
const createResourceParams$a = /*#__PURE__*/ createResourceParams$
|
|
3909
|
+
const deleteSlackConversationMember_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, deleteSlackConversationMember_ConfigPropertyMetadata);
|
|
3910
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$i(deleteSlackConversationMember_ConfigPropertyMetadata);
|
|
2780
3911
|
function typeCheckConfig$a(untrustedConfig) {
|
|
2781
3912
|
const config = {};
|
|
2782
|
-
typeCheckConfig$
|
|
3913
|
+
typeCheckConfig$i(untrustedConfig, config, deleteSlackConversationMember_ConfigPropertyMetadata);
|
|
2783
3914
|
return config;
|
|
2784
3915
|
}
|
|
2785
3916
|
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
@@ -2799,13 +3930,13 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
2799
3930
|
const resourceParams = createResourceParams$a(config);
|
|
2800
3931
|
const request = createResourceRequest$a(resourceParams);
|
|
2801
3932
|
return luvio.dispatchResourceRequest(request, options)
|
|
2802
|
-
.then((
|
|
3933
|
+
.then(() => {
|
|
2803
3934
|
return luvio.handleSuccessResponse(() => {
|
|
2804
|
-
|
|
2805
|
-
return luvio.storeBroadcast()
|
|
3935
|
+
evictSuccess$2(luvio, resourceParams);
|
|
3936
|
+
return luvio.storeBroadcast();
|
|
2806
3937
|
}, () => {
|
|
2807
3938
|
const cache = new StoreKeyMap();
|
|
2808
|
-
getResponseCacheKeys$a(cache, luvio, resourceParams
|
|
3939
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams);
|
|
2809
3940
|
return cache;
|
|
2810
3941
|
});
|
|
2811
3942
|
}, (response) => {
|
|
@@ -2813,32 +3944,37 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
2813
3944
|
throw response;
|
|
2814
3945
|
});
|
|
2815
3946
|
}
|
|
2816
|
-
const
|
|
2817
|
-
return function
|
|
2818
|
-
const config = validateAdapterConfig$a(untrustedConfig,
|
|
3947
|
+
const deleteSlackConversationMemberAdapterFactory = (luvio) => {
|
|
3948
|
+
return function SlackBridgedeleteSlackConversationMember(untrustedConfig) {
|
|
3949
|
+
const config = validateAdapterConfig$a(untrustedConfig, deleteSlackConversationMember_ConfigPropertyNames);
|
|
2819
3950
|
// Invalid or incomplete config
|
|
2820
3951
|
if (config === null) {
|
|
2821
|
-
throw new Error(
|
|
3952
|
+
throw new Error(`Invalid config for "${adapterName$a}"`);
|
|
2822
3953
|
}
|
|
2823
3954
|
return buildNetworkSnapshot$a(luvio, config);
|
|
2824
3955
|
};
|
|
2825
3956
|
};
|
|
2826
3957
|
|
|
2827
3958
|
function select$c(luvio, params) {
|
|
2828
|
-
return select$
|
|
3959
|
+
return select$d();
|
|
3960
|
+
}
|
|
3961
|
+
function keyBuilder$f(luvio, params) {
|
|
3962
|
+
return keyBuilder$h(luvio, {
|
|
3963
|
+
channelId: params.urlParams.channelId
|
|
3964
|
+
});
|
|
2829
3965
|
}
|
|
2830
3966
|
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
2831
|
-
getTypeCacheKeys$
|
|
3967
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
2832
3968
|
}
|
|
2833
|
-
function ingestSuccess$7(luvio, resourceParams, response) {
|
|
3969
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
2834
3970
|
const { body } = response;
|
|
2835
|
-
const key =
|
|
2836
|
-
luvio.storeIngest(key, ingest$
|
|
3971
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
3972
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
2837
3973
|
const snapshot = luvio.storeLookup({
|
|
2838
3974
|
recordId: key,
|
|
2839
3975
|
node: select$c(),
|
|
2840
3976
|
variables: {},
|
|
2841
|
-
});
|
|
3977
|
+
}, snapshotRefresh);
|
|
2842
3978
|
if (process.env.NODE_ENV !== 'production') {
|
|
2843
3979
|
if (snapshot.state !== 'Fulfilled') {
|
|
2844
3980
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -2847,36 +3983,41 @@ function ingestSuccess$7(luvio, resourceParams, response) {
|
|
|
2847
3983
|
deepFreeze(snapshot.data);
|
|
2848
3984
|
return snapshot;
|
|
2849
3985
|
}
|
|
3986
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
3987
|
+
const key = keyBuilder$f(luvio, params);
|
|
3988
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3989
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
3990
|
+
return errorSnapshot;
|
|
3991
|
+
}
|
|
2850
3992
|
function createResourceRequest$9(config) {
|
|
2851
3993
|
const headers = {};
|
|
2852
3994
|
return {
|
|
2853
3995
|
baseUri: '/services/data/v63.0',
|
|
2854
|
-
basePath: '/connect/slackbridge/
|
|
2855
|
-
method: '
|
|
2856
|
-
body:
|
|
2857
|
-
urlParams:
|
|
3996
|
+
basePath: '/connect/slackbridge/team/' + config.urlParams.teamId + '/channel/' + config.urlParams.channelId + '/members/' + config.urlParams.slackUserId + '',
|
|
3997
|
+
method: 'get',
|
|
3998
|
+
body: null,
|
|
3999
|
+
urlParams: config.urlParams,
|
|
2858
4000
|
queryParams: {},
|
|
2859
4001
|
headers,
|
|
2860
4002
|
priority: 'normal',
|
|
2861
4003
|
};
|
|
2862
4004
|
}
|
|
2863
4005
|
|
|
2864
|
-
const adapterName$9 = '
|
|
2865
|
-
const
|
|
2866
|
-
generateParamConfigMetadata('
|
|
2867
|
-
generateParamConfigMetadata('
|
|
2868
|
-
generateParamConfigMetadata('
|
|
2869
|
-
generateParamConfigMetadata('fileType', true, 2 /* Body */, 0 /* String */),
|
|
2870
|
-
generateParamConfigMetadata('initialComment', true, 2 /* Body */, 0 /* String */),
|
|
2871
|
-
generateParamConfigMetadata('teamId', true, 2 /* Body */, 0 /* String */),
|
|
2872
|
-
generateParamConfigMetadata('threadTs', true, 2 /* Body */, 0 /* String */),
|
|
2873
|
-
generateParamConfigMetadata('title', true, 2 /* Body */, 0 /* String */),
|
|
4006
|
+
const adapterName$9 = 'getSlackConversationMember';
|
|
4007
|
+
const getSlackConversationMember_ConfigPropertyMetadata = [
|
|
4008
|
+
generateParamConfigMetadata('channelId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4009
|
+
generateParamConfigMetadata('slackUserId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4010
|
+
generateParamConfigMetadata('teamId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2874
4011
|
];
|
|
2875
|
-
const
|
|
2876
|
-
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$
|
|
4012
|
+
const getSlackConversationMember_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getSlackConversationMember_ConfigPropertyMetadata);
|
|
4013
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$i(getSlackConversationMember_ConfigPropertyMetadata);
|
|
4014
|
+
function keyBuilder$e(luvio, config) {
|
|
4015
|
+
const resourceParams = createResourceParams$9(config);
|
|
4016
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
4017
|
+
}
|
|
2877
4018
|
function typeCheckConfig$9(untrustedConfig) {
|
|
2878
4019
|
const config = {};
|
|
2879
|
-
typeCheckConfig$
|
|
4020
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackConversationMember_ConfigPropertyMetadata);
|
|
2880
4021
|
return config;
|
|
2881
4022
|
}
|
|
2882
4023
|
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
@@ -2892,33 +4033,62 @@ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
|
2892
4033
|
}
|
|
2893
4034
|
return config;
|
|
2894
4035
|
}
|
|
4036
|
+
function adapterFragment$5(luvio, config) {
|
|
4037
|
+
createResourceParams$9(config);
|
|
4038
|
+
return select$c();
|
|
4039
|
+
}
|
|
4040
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
4041
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
4042
|
+
config,
|
|
4043
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4044
|
+
});
|
|
4045
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4046
|
+
}
|
|
4047
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
4048
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
4049
|
+
config,
|
|
4050
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4051
|
+
});
|
|
4052
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4053
|
+
}
|
|
2895
4054
|
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
2896
4055
|
const resourceParams = createResourceParams$9(config);
|
|
2897
4056
|
const request = createResourceRequest$9(resourceParams);
|
|
2898
4057
|
return luvio.dispatchResourceRequest(request, options)
|
|
2899
4058
|
.then((response) => {
|
|
2900
|
-
return luvio.handleSuccessResponse(() => {
|
|
2901
|
-
const snapshot = ingestSuccess$7(luvio, resourceParams, response);
|
|
2902
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
2903
|
-
}, () => {
|
|
4059
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
2904
4060
|
const cache = new StoreKeyMap();
|
|
2905
4061
|
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
2906
4062
|
return cache;
|
|
2907
4063
|
});
|
|
2908
4064
|
}, (response) => {
|
|
2909
|
-
|
|
2910
|
-
throw response;
|
|
4065
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
2911
4066
|
});
|
|
2912
4067
|
}
|
|
2913
|
-
|
|
2914
|
-
return
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
4068
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
4069
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
4070
|
+
}
|
|
4071
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
4072
|
+
const { luvio, config } = context;
|
|
4073
|
+
const selector = {
|
|
4074
|
+
recordId: keyBuilder$e(luvio, config),
|
|
4075
|
+
node: adapterFragment$5(luvio, config),
|
|
4076
|
+
variables: {},
|
|
2921
4077
|
};
|
|
4078
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
4079
|
+
config,
|
|
4080
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4081
|
+
});
|
|
4082
|
+
return cacheSnapshot;
|
|
4083
|
+
}
|
|
4084
|
+
const getSlackConversationMemberAdapterFactory = (luvio) => function SlackBridge__getSlackConversationMember(untrustedConfig, requestContext) {
|
|
4085
|
+
const config = validateAdapterConfig$9(untrustedConfig, getSlackConversationMember_ConfigPropertyNames);
|
|
4086
|
+
// Invalid or incomplete config
|
|
4087
|
+
if (config === null) {
|
|
4088
|
+
return null;
|
|
4089
|
+
}
|
|
4090
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4091
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
2922
4092
|
};
|
|
2923
4093
|
|
|
2924
4094
|
const VERSION$4 = "605674abcbc0dad7e2707e4e00e8d4cd";
|
|
@@ -3057,10 +4227,10 @@ const deleteSlackMessage_ConfigPropertyMetadata = [
|
|
|
3057
4227
|
generateParamConfigMetadata('teamId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3058
4228
|
];
|
|
3059
4229
|
const deleteSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, deleteSlackMessage_ConfigPropertyMetadata);
|
|
3060
|
-
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$
|
|
4230
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$i(deleteSlackMessage_ConfigPropertyMetadata);
|
|
3061
4231
|
function typeCheckConfig$8(untrustedConfig) {
|
|
3062
4232
|
const config = {};
|
|
3063
|
-
typeCheckConfig$
|
|
4233
|
+
typeCheckConfig$i(untrustedConfig, config, deleteSlackMessage_ConfigPropertyMetadata);
|
|
3064
4234
|
return config;
|
|
3065
4235
|
}
|
|
3066
4236
|
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
@@ -3160,14 +4330,14 @@ const getSlackMessage_ConfigPropertyMetadata = [
|
|
|
3160
4330
|
generateParamConfigMetadata('teamId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3161
4331
|
];
|
|
3162
4332
|
const getSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getSlackMessage_ConfigPropertyMetadata);
|
|
3163
|
-
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$
|
|
4333
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$i(getSlackMessage_ConfigPropertyMetadata);
|
|
3164
4334
|
function keyBuilder$a(luvio, config) {
|
|
3165
4335
|
const resourceParams = createResourceParams$7(config);
|
|
3166
4336
|
return keyBuilder$b(luvio, resourceParams);
|
|
3167
4337
|
}
|
|
3168
4338
|
function typeCheckConfig$7(untrustedConfig) {
|
|
3169
4339
|
const config = {};
|
|
3170
|
-
typeCheckConfig$
|
|
4340
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackMessage_ConfigPropertyMetadata);
|
|
3171
4341
|
return config;
|
|
3172
4342
|
}
|
|
3173
4343
|
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
@@ -3216,7 +4386,7 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
3216
4386
|
});
|
|
3217
4387
|
}
|
|
3218
4388
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
3219
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4389
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
3220
4390
|
}
|
|
3221
4391
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
3222
4392
|
const { luvio, config } = context;
|
|
@@ -3286,10 +4456,10 @@ const patchSlackMessage_ConfigPropertyMetadata = [
|
|
|
3286
4456
|
generateParamConfigMetadata('text', true, 2 /* Body */, 0 /* String */),
|
|
3287
4457
|
];
|
|
3288
4458
|
const patchSlackMessage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, patchSlackMessage_ConfigPropertyMetadata);
|
|
3289
|
-
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$
|
|
4459
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$i(patchSlackMessage_ConfigPropertyMetadata);
|
|
3290
4460
|
function typeCheckConfig$6(untrustedConfig) {
|
|
3291
4461
|
const config = {};
|
|
3292
|
-
typeCheckConfig$
|
|
4462
|
+
typeCheckConfig$i(untrustedConfig, config, patchSlackMessage_ConfigPropertyMetadata);
|
|
3293
4463
|
return config;
|
|
3294
4464
|
}
|
|
3295
4465
|
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
@@ -3358,7 +4528,7 @@ function validate$3(obj, path = 'SlackBridgeReactionsOutputRepresentation') {
|
|
|
3358
4528
|
for (let i = 0; i < obj_reactions.length; i++) {
|
|
3359
4529
|
const obj_reactions_item = obj_reactions[i];
|
|
3360
4530
|
const path_reactions_item = path_reactions + '[' + i + ']';
|
|
3361
|
-
const referencepath_reactions_itemValidationError = validate$
|
|
4531
|
+
const referencepath_reactions_itemValidationError = validate$g(obj_reactions_item, path_reactions_item);
|
|
3362
4532
|
if (referencepath_reactions_itemValidationError !== null) {
|
|
3363
4533
|
let message = 'Object doesn\'t match SlackBridgeReactionOutputRepresentation (at "' + path_reactions_item + '")\n';
|
|
3364
4534
|
message += referencepath_reactions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3387,7 +4557,7 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
3387
4557
|
return input;
|
|
3388
4558
|
}
|
|
3389
4559
|
const select$8 = function SlackBridgeReactionsOutputRepresentationSelect() {
|
|
3390
|
-
const { selections: SlackBridgeReactionOutputRepresentation__selections, opaque: SlackBridgeReactionOutputRepresentation__opaque, } = select$
|
|
4560
|
+
const { selections: SlackBridgeReactionOutputRepresentation__selections, opaque: SlackBridgeReactionOutputRepresentation__opaque, } = select$v();
|
|
3391
4561
|
return {
|
|
3392
4562
|
kind: 'Fragment',
|
|
3393
4563
|
version: VERSION$3,
|
|
@@ -3433,7 +4603,7 @@ function equals$3(existing, incoming) {
|
|
|
3433
4603
|
const existing_reactions = existing.reactions;
|
|
3434
4604
|
const incoming_reactions = incoming.reactions;
|
|
3435
4605
|
const equals_reactions_items = equalsArray(existing_reactions, incoming_reactions, (existing_reactions_item, incoming_reactions_item) => {
|
|
3436
|
-
if (!(equals$
|
|
4606
|
+
if (!(equals$g(existing_reactions_item, incoming_reactions_item))) {
|
|
3437
4607
|
return false;
|
|
3438
4608
|
}
|
|
3439
4609
|
});
|
|
@@ -3503,10 +4673,10 @@ const deleteSlackMessageReactions_ConfigPropertyMetadata = [
|
|
|
3503
4673
|
generateParamConfigMetadata('name', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3504
4674
|
];
|
|
3505
4675
|
const deleteSlackMessageReactions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, deleteSlackMessageReactions_ConfigPropertyMetadata);
|
|
3506
|
-
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$
|
|
4676
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$i(deleteSlackMessageReactions_ConfigPropertyMetadata);
|
|
3507
4677
|
function typeCheckConfig$5(untrustedConfig) {
|
|
3508
4678
|
const config = {};
|
|
3509
|
-
typeCheckConfig$
|
|
4679
|
+
typeCheckConfig$i(untrustedConfig, config, deleteSlackMessageReactions_ConfigPropertyMetadata);
|
|
3510
4680
|
return config;
|
|
3511
4681
|
}
|
|
3512
4682
|
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
@@ -3596,10 +4766,10 @@ const postSlackMessageReactions_ConfigPropertyMetadata = [
|
|
|
3596
4766
|
generateParamConfigMetadata('name', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3597
4767
|
];
|
|
3598
4768
|
const postSlackMessageReactions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, postSlackMessageReactions_ConfigPropertyMetadata);
|
|
3599
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
4769
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$i(postSlackMessageReactions_ConfigPropertyMetadata);
|
|
3600
4770
|
function typeCheckConfig$4(untrustedConfig) {
|
|
3601
4771
|
const config = {};
|
|
3602
|
-
typeCheckConfig$
|
|
4772
|
+
typeCheckConfig$i(untrustedConfig, config, postSlackMessageReactions_ConfigPropertyMetadata);
|
|
3603
4773
|
return config;
|
|
3604
4774
|
}
|
|
3605
4775
|
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
@@ -3785,14 +4955,14 @@ const getSlackCustomEmoji_ConfigPropertyMetadata = [
|
|
|
3785
4955
|
generateParamConfigMetadata('teamId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3786
4956
|
];
|
|
3787
4957
|
const getSlackCustomEmoji_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getSlackCustomEmoji_ConfigPropertyMetadata);
|
|
3788
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
4958
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$i(getSlackCustomEmoji_ConfigPropertyMetadata);
|
|
3789
4959
|
function keyBuilder$6(luvio, config) {
|
|
3790
4960
|
const resourceParams = createResourceParams$3(config);
|
|
3791
4961
|
return keyBuilder$7(luvio, resourceParams);
|
|
3792
4962
|
}
|
|
3793
4963
|
function typeCheckConfig$3(untrustedConfig) {
|
|
3794
4964
|
const config = {};
|
|
3795
|
-
typeCheckConfig$
|
|
4965
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackCustomEmoji_ConfigPropertyMetadata);
|
|
3796
4966
|
return config;
|
|
3797
4967
|
}
|
|
3798
4968
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -3841,7 +5011,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
3841
5011
|
});
|
|
3842
5012
|
}
|
|
3843
5013
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
3844
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5014
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
3845
5015
|
}
|
|
3846
5016
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3847
5017
|
const { luvio, config } = context;
|
|
@@ -3880,7 +5050,7 @@ function validate$1(obj, path = 'SlackBridgeEmojisOutputRepresentation') {
|
|
|
3880
5050
|
for (let i = 0; i < obj_emojis.length; i++) {
|
|
3881
5051
|
const obj_emojis_item = obj_emojis[i];
|
|
3882
5052
|
const path_emojis_item = path_emojis + '[' + i + ']';
|
|
3883
|
-
const referencepath_emojis_itemValidationError = validate$
|
|
5053
|
+
const referencepath_emojis_itemValidationError = validate$j(obj_emojis_item, path_emojis_item);
|
|
3884
5054
|
if (referencepath_emojis_itemValidationError !== null) {
|
|
3885
5055
|
let message = 'Object doesn\'t match SlackBridgeEmojiOutputRepresentation (at "' + path_emojis_item + '")\n';
|
|
3886
5056
|
message += referencepath_emojis_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3900,7 +5070,7 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
|
3900
5070
|
return input;
|
|
3901
5071
|
}
|
|
3902
5072
|
const select$4 = function SlackBridgeEmojisOutputRepresentationSelect() {
|
|
3903
|
-
const { selections: SlackBridgeEmojiOutputRepresentation__selections, opaque: SlackBridgeEmojiOutputRepresentation__opaque, } = select$
|
|
5073
|
+
const { selections: SlackBridgeEmojiOutputRepresentation__selections, opaque: SlackBridgeEmojiOutputRepresentation__opaque, } = select$y();
|
|
3904
5074
|
return {
|
|
3905
5075
|
kind: 'Fragment',
|
|
3906
5076
|
version: VERSION$1,
|
|
@@ -3928,7 +5098,7 @@ function equals$1(existing, incoming) {
|
|
|
3928
5098
|
const existing_emojis = existing.emojis;
|
|
3929
5099
|
const incoming_emojis = incoming.emojis;
|
|
3930
5100
|
const equals_emojis_items = equalsArray(existing_emojis, incoming_emojis, (existing_emojis_item, incoming_emojis_item) => {
|
|
3931
|
-
if (!(equals$
|
|
5101
|
+
if (!(equals$j(existing_emojis_item, incoming_emojis_item))) {
|
|
3932
5102
|
return false;
|
|
3933
5103
|
}
|
|
3934
5104
|
});
|
|
@@ -4011,14 +5181,14 @@ const getSlackSearchEmoji_ConfigPropertyMetadata = [
|
|
|
4011
5181
|
generateParamConfigMetadata('search', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4012
5182
|
];
|
|
4013
5183
|
const getSlackSearchEmoji_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getSlackSearchEmoji_ConfigPropertyMetadata);
|
|
4014
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
5184
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$i(getSlackSearchEmoji_ConfigPropertyMetadata);
|
|
4015
5185
|
function keyBuilder$4(luvio, config) {
|
|
4016
5186
|
const resourceParams = createResourceParams$2(config);
|
|
4017
5187
|
return keyBuilder$5(luvio, resourceParams);
|
|
4018
5188
|
}
|
|
4019
5189
|
function typeCheckConfig$2(untrustedConfig) {
|
|
4020
5190
|
const config = {};
|
|
4021
|
-
typeCheckConfig$
|
|
5191
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackSearchEmoji_ConfigPropertyMetadata);
|
|
4022
5192
|
return config;
|
|
4023
5193
|
}
|
|
4024
5194
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -4067,7 +5237,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
4067
5237
|
});
|
|
4068
5238
|
}
|
|
4069
5239
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
4070
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5240
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
4071
5241
|
}
|
|
4072
5242
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
4073
5243
|
const { luvio, config } = context;
|
|
@@ -4125,7 +5295,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
4125
5295
|
for (let i = 0; i < input_userInfos.length; i++) {
|
|
4126
5296
|
const input_userInfos_item = input_userInfos[i];
|
|
4127
5297
|
let input_userInfos_item_id = input_userInfos_id + '__' + i;
|
|
4128
|
-
input_userInfos[i] = ingest$
|
|
5298
|
+
input_userInfos[i] = ingest$e(input_userInfos_item, {
|
|
4129
5299
|
fullPath: input_userInfos_item_id,
|
|
4130
5300
|
propertyName: i,
|
|
4131
5301
|
parent: {
|
|
@@ -4152,7 +5322,7 @@ const select$2 = function SlackBridgeUserInfosOutputRepresentationSelect() {
|
|
|
4152
5322
|
name: 'userInfos',
|
|
4153
5323
|
kind: 'Link',
|
|
4154
5324
|
plural: true,
|
|
4155
|
-
fragment: select$
|
|
5325
|
+
fragment: select$x()
|
|
4156
5326
|
}
|
|
4157
5327
|
]
|
|
4158
5328
|
};
|
|
@@ -4197,7 +5367,7 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
4197
5367
|
});
|
|
4198
5368
|
const input_userInfos_length = input.userInfos.length;
|
|
4199
5369
|
for (let i = 0; i < input_userInfos_length; i++) {
|
|
4200
|
-
getTypeCacheKeys$
|
|
5370
|
+
getTypeCacheKeys$e(rootKeySet, luvio, input.userInfos[i]);
|
|
4201
5371
|
}
|
|
4202
5372
|
}
|
|
4203
5373
|
|
|
@@ -4253,14 +5423,14 @@ const getSlackSearchUser_ConfigPropertyMetadata = [
|
|
|
4253
5423
|
generateParamConfigMetadata('search', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4254
5424
|
];
|
|
4255
5425
|
const getSlackSearchUser_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getSlackSearchUser_ConfigPropertyMetadata);
|
|
4256
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
5426
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$i(getSlackSearchUser_ConfigPropertyMetadata);
|
|
4257
5427
|
function keyBuilder$2(luvio, config) {
|
|
4258
5428
|
const resourceParams = createResourceParams$1(config);
|
|
4259
5429
|
return keyBuilder$3(luvio, resourceParams);
|
|
4260
5430
|
}
|
|
4261
5431
|
function typeCheckConfig$1(untrustedConfig) {
|
|
4262
5432
|
const config = {};
|
|
4263
|
-
typeCheckConfig$
|
|
5433
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackSearchUser_ConfigPropertyMetadata);
|
|
4264
5434
|
return config;
|
|
4265
5435
|
}
|
|
4266
5436
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -4309,7 +5479,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
4309
5479
|
});
|
|
4310
5480
|
}
|
|
4311
5481
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
4312
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5482
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
4313
5483
|
}
|
|
4314
5484
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
4315
5485
|
const { luvio, config } = context;
|
|
@@ -4335,21 +5505,21 @@ const getSlackSearchUserAdapterFactory = (luvio) => function SlackBridge__getSla
|
|
|
4335
5505
|
};
|
|
4336
5506
|
|
|
4337
5507
|
function select(luvio, params) {
|
|
4338
|
-
return select$
|
|
5508
|
+
return select$x();
|
|
4339
5509
|
}
|
|
4340
5510
|
function keyBuilder$1(luvio, params) {
|
|
4341
|
-
return keyBuilder$
|
|
5511
|
+
return keyBuilder$t(luvio, {
|
|
4342
5512
|
slackUserId: params.urlParams.slackUserId,
|
|
4343
5513
|
teamId: params.urlParams.teamId
|
|
4344
5514
|
});
|
|
4345
5515
|
}
|
|
4346
5516
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4347
|
-
getTypeCacheKeys$
|
|
5517
|
+
getTypeCacheKeys$e(storeKeyMap, luvio, response);
|
|
4348
5518
|
}
|
|
4349
5519
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
4350
5520
|
const { body } = response;
|
|
4351
5521
|
const key = keyBuilder$1(luvio, resourceParams);
|
|
4352
|
-
luvio.storeIngest(key, ingest$
|
|
5522
|
+
luvio.storeIngest(key, ingest$e, body);
|
|
4353
5523
|
const snapshot = luvio.storeLookup({
|
|
4354
5524
|
recordId: key,
|
|
4355
5525
|
node: select(),
|
|
@@ -4369,8 +5539,8 @@ function ingestError(luvio, params, error, snapshotRefresh) {
|
|
|
4369
5539
|
const storeMetadataParams = {
|
|
4370
5540
|
ttl: TTL,
|
|
4371
5541
|
namespace: keyPrefix,
|
|
4372
|
-
version: VERSION$
|
|
4373
|
-
representationName: RepresentationType$
|
|
5542
|
+
version: VERSION$i,
|
|
5543
|
+
representationName: RepresentationType$e
|
|
4374
5544
|
};
|
|
4375
5545
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4376
5546
|
return errorSnapshot;
|
|
@@ -4395,14 +5565,14 @@ const getSlackUser_ConfigPropertyMetadata = [
|
|
|
4395
5565
|
generateParamConfigMetadata('teamId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4396
5566
|
];
|
|
4397
5567
|
const getSlackUser_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSlackUser_ConfigPropertyMetadata);
|
|
4398
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
5568
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$i(getSlackUser_ConfigPropertyMetadata);
|
|
4399
5569
|
function keyBuilder(luvio, config) {
|
|
4400
5570
|
const resourceParams = createResourceParams(config);
|
|
4401
5571
|
return keyBuilder$1(luvio, resourceParams);
|
|
4402
5572
|
}
|
|
4403
5573
|
function typeCheckConfig(untrustedConfig) {
|
|
4404
5574
|
const config = {};
|
|
4405
|
-
typeCheckConfig$
|
|
5575
|
+
typeCheckConfig$i(untrustedConfig, config, getSlackUser_ConfigPropertyMetadata);
|
|
4406
5576
|
return config;
|
|
4407
5577
|
}
|
|
4408
5578
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -4451,7 +5621,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
4451
5621
|
});
|
|
4452
5622
|
}
|
|
4453
5623
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
4454
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5624
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
4455
5625
|
}
|
|
4456
5626
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
4457
5627
|
const { luvio, config } = context;
|
|
@@ -4476,4 +5646,4 @@ const getSlackUserAdapterFactory = (luvio) => function SlackBridge__getSlackUser
|
|
|
4476
5646
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
4477
5647
|
};
|
|
4478
5648
|
|
|
4479
|
-
export { deleteSlackMessageAdapterFactory, deleteSlackMessageReactionsAdapterFactory, getSlackConversationAdapterFactory, getSlackCustomEmojiAdapterFactory, getSlackMessageAdapterFactory, getSlackSearchEmojiAdapterFactory, getSlackSearchUserAdapterFactory, getSlackUserAdapterFactory, patchSlackMessageAdapterFactory, postSlackConversationAdapterFactory, postSlackFileAdapterFactory, postSlackMessageReactionsAdapterFactory };
|
|
5649
|
+
export { deleteSlackConversationMemberAdapterFactory, deleteSlackMessageAdapterFactory, deleteSlackMessageReactionsAdapterFactory, getSlackConversationAdapterFactory, getSlackConversationMemberAdapterFactory, getSlackConversationMembersAdapterFactory, getSlackCustomEmojiAdapterFactory, getSlackMessageAdapterFactory, getSlackRecordChannelInfoAdapterFactory, getSlackSearchEmojiAdapterFactory, getSlackSearchUserAdapterFactory, getSlackUserAdapterFactory, patchSlackMessageAdapterFactory, postSlackConversationAdapterFactory, postSlackConversationMembersAdapterFactory, postSlackFileAdapterFactory, postSlackMessageReactionsAdapterFactory, postSlackRecordChannelInfosAdapterFactory };
|