@connectedxm/client 0.0.4 → 0.0.55
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/.vscode/settings.json +4 -0
- package/CHANGELOG.md +12 -0
- package/package.json +9 -6
- package/dist/index.d.mts +0 -1108
- package/dist/index.d.ts +0 -1108
- package/dist/index.js +0 -731
- package/dist/index.mjs +0 -442
package/dist/index.js
DELETED
|
@@ -1,731 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function _array_like_to_array(arr, len) {
|
|
3
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
-
return arr2;
|
|
6
|
-
}
|
|
7
|
-
function _array_with_holes(arr) {
|
|
8
|
-
if (Array.isArray(arr)) return arr;
|
|
9
|
-
}
|
|
10
|
-
function _array_without_holes(arr) {
|
|
11
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
12
|
-
}
|
|
13
|
-
function _iterable_to_array(iter) {
|
|
14
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
15
|
-
}
|
|
16
|
-
function _iterable_to_array_limit(arr, i) {
|
|
17
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
18
|
-
if (_i == null) return;
|
|
19
|
-
var _arr = [];
|
|
20
|
-
var _n = true;
|
|
21
|
-
var _d = false;
|
|
22
|
-
var _s, _e;
|
|
23
|
-
try {
|
|
24
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
25
|
-
_arr.push(_s.value);
|
|
26
|
-
if (i && _arr.length === i) break;
|
|
27
|
-
}
|
|
28
|
-
} catch (err) {
|
|
29
|
-
_d = true;
|
|
30
|
-
_e = err;
|
|
31
|
-
} finally{
|
|
32
|
-
try {
|
|
33
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
34
|
-
} finally{
|
|
35
|
-
if (_d) throw _e;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return _arr;
|
|
39
|
-
}
|
|
40
|
-
function _non_iterable_rest() {
|
|
41
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
42
|
-
}
|
|
43
|
-
function _non_iterable_spread() {
|
|
44
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
45
|
-
}
|
|
46
|
-
function _sliced_to_array(arr, i) {
|
|
47
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
48
|
-
}
|
|
49
|
-
function _to_consumable_array(arr) {
|
|
50
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
51
|
-
}
|
|
52
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
53
|
-
if (!o) return;
|
|
54
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
55
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
56
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
57
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
58
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
59
|
-
}
|
|
60
|
-
var __create = Object.create;
|
|
61
|
-
var __defProp = Object.defineProperty;
|
|
62
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
63
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
64
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
65
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
66
|
-
var __export = function(target, all) {
|
|
67
|
-
for(var name in all)__defProp(target, name, {
|
|
68
|
-
get: all[name],
|
|
69
|
-
enumerable: true
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
var __copyProps = function(to, from, except, desc) {
|
|
73
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
74
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
75
|
-
try {
|
|
76
|
-
var _loop = function() {
|
|
77
|
-
var key = _step.value;
|
|
78
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
79
|
-
get: function() {
|
|
80
|
-
return from[key];
|
|
81
|
-
},
|
|
82
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
86
|
-
} catch (err) {
|
|
87
|
-
_didIteratorError = true;
|
|
88
|
-
_iteratorError = err;
|
|
89
|
-
} finally{
|
|
90
|
-
try {
|
|
91
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
92
|
-
_iterator.return();
|
|
93
|
-
}
|
|
94
|
-
} finally{
|
|
95
|
-
if (_didIteratorError) {
|
|
96
|
-
throw _iteratorError;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return to;
|
|
102
|
-
};
|
|
103
|
-
var __toESM = function(mod, isNodeMode, target) {
|
|
104
|
-
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
105
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
106
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
107
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
108
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
109
|
-
value: mod,
|
|
110
|
-
enumerable: true
|
|
111
|
-
}) : target, mod);
|
|
112
|
-
};
|
|
113
|
-
var __toCommonJS = function(mod) {
|
|
114
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
115
|
-
value: true
|
|
116
|
-
}), mod);
|
|
117
|
-
};
|
|
118
|
-
// src/index.ts
|
|
119
|
-
var src_exports = {};
|
|
120
|
-
__export(src_exports, {
|
|
121
|
-
AccountType: function() {
|
|
122
|
-
return AccountType;
|
|
123
|
-
},
|
|
124
|
-
AdvertisementType: function() {
|
|
125
|
-
return AdvertisementType;
|
|
126
|
-
},
|
|
127
|
-
AppendInfiniteQuery: function() {
|
|
128
|
-
return AppendInfiniteQuery_exports;
|
|
129
|
-
},
|
|
130
|
-
CacheIndividualQueries: function() {
|
|
131
|
-
return CacheIndividualQueries_exports;
|
|
132
|
-
},
|
|
133
|
-
CommunityAccess: function() {
|
|
134
|
-
return CommunityAccess;
|
|
135
|
-
},
|
|
136
|
-
CommunityMembershipRole: function() {
|
|
137
|
-
return CommunityMembershipRole;
|
|
138
|
-
},
|
|
139
|
-
ConnectedXM: function() {
|
|
140
|
-
return ConnectedXM;
|
|
141
|
-
},
|
|
142
|
-
ContentTypeFormat: function() {
|
|
143
|
-
return ContentTypeFormat;
|
|
144
|
-
},
|
|
145
|
-
CouponType: function() {
|
|
146
|
-
return CouponType;
|
|
147
|
-
},
|
|
148
|
-
Currency: function() {
|
|
149
|
-
return Currency;
|
|
150
|
-
},
|
|
151
|
-
EventSource: function() {
|
|
152
|
-
return EventSource;
|
|
153
|
-
},
|
|
154
|
-
EventType: function() {
|
|
155
|
-
return EventType;
|
|
156
|
-
},
|
|
157
|
-
GetErrorMessage: function() {
|
|
158
|
-
return GetErrorMessage_exports;
|
|
159
|
-
},
|
|
160
|
-
ImageType: function() {
|
|
161
|
-
return ImageType;
|
|
162
|
-
},
|
|
163
|
-
MergeInfinitePages: function() {
|
|
164
|
-
return MergeInfinitePages_exports;
|
|
165
|
-
},
|
|
166
|
-
NotificationType: function() {
|
|
167
|
-
return NotificationType;
|
|
168
|
-
},
|
|
169
|
-
PushDeviceAppType: function() {
|
|
170
|
-
return PushDeviceAppType;
|
|
171
|
-
},
|
|
172
|
-
PushService: function() {
|
|
173
|
-
return PushService;
|
|
174
|
-
},
|
|
175
|
-
RegistrationQuestionType: function() {
|
|
176
|
-
return RegistrationQuestionType;
|
|
177
|
-
},
|
|
178
|
-
RegistrationStatus: function() {
|
|
179
|
-
return RegistrationStatus;
|
|
180
|
-
},
|
|
181
|
-
SupportTicketType: function() {
|
|
182
|
-
return SupportTicketType;
|
|
183
|
-
},
|
|
184
|
-
TicketEventAccessLevel: function() {
|
|
185
|
-
return TicketEventAccessLevel;
|
|
186
|
-
},
|
|
187
|
-
TicketVisibility: function() {
|
|
188
|
-
return TicketVisibility;
|
|
189
|
-
},
|
|
190
|
-
isListing: function() {
|
|
191
|
-
return isListing;
|
|
192
|
-
},
|
|
193
|
-
isManagedCoupon: function() {
|
|
194
|
-
return isManagedCoupon;
|
|
195
|
-
},
|
|
196
|
-
isSelf: function() {
|
|
197
|
-
return isSelf;
|
|
198
|
-
},
|
|
199
|
-
isTypeAccount: function() {
|
|
200
|
-
return isTypeAccount;
|
|
201
|
-
},
|
|
202
|
-
isTypeAccountTier: function() {
|
|
203
|
-
return isTypeAccountTier;
|
|
204
|
-
},
|
|
205
|
-
isTypeActivity: function() {
|
|
206
|
-
return isTypeActivity;
|
|
207
|
-
},
|
|
208
|
-
isTypeAdvertisement: function() {
|
|
209
|
-
return isTypeAdvertisement;
|
|
210
|
-
},
|
|
211
|
-
isTypeAnnouncement: function() {
|
|
212
|
-
return isTypeAnnouncement;
|
|
213
|
-
},
|
|
214
|
-
isTypeBenefit: function() {
|
|
215
|
-
return isTypeBenefit;
|
|
216
|
-
},
|
|
217
|
-
isTypeCommunity: function() {
|
|
218
|
-
return isTypeCommunity;
|
|
219
|
-
},
|
|
220
|
-
isTypeCommunityMembership: function() {
|
|
221
|
-
return isTypeCommunityMembership;
|
|
222
|
-
},
|
|
223
|
-
isTypeContent: function() {
|
|
224
|
-
return isTypeContent;
|
|
225
|
-
},
|
|
226
|
-
isTypeContentType: function() {
|
|
227
|
-
return isTypeContentType;
|
|
228
|
-
},
|
|
229
|
-
isTypeCoupon: function() {
|
|
230
|
-
return isTypeCoupon;
|
|
231
|
-
},
|
|
232
|
-
isTypeEvent: function() {
|
|
233
|
-
return isTypeEvent;
|
|
234
|
-
},
|
|
235
|
-
isTypeEventActivation: function() {
|
|
236
|
-
return isTypeEventActivation;
|
|
237
|
-
},
|
|
238
|
-
isTypeEventActivationCompletion: function() {
|
|
239
|
-
return isTypeEventActivationCompletion;
|
|
240
|
-
},
|
|
241
|
-
isTypeEventPage: function() {
|
|
242
|
-
return isTypeEventPage;
|
|
243
|
-
},
|
|
244
|
-
isTypeFaq: function() {
|
|
245
|
-
return isTypeFaq;
|
|
246
|
-
},
|
|
247
|
-
isTypeFaqSection: function() {
|
|
248
|
-
return isTypeFaqSection;
|
|
249
|
-
},
|
|
250
|
-
isTypeImage: function() {
|
|
251
|
-
return isTypeImage;
|
|
252
|
-
},
|
|
253
|
-
isTypeInstance: function() {
|
|
254
|
-
return isTypeInstance;
|
|
255
|
-
},
|
|
256
|
-
isTypeIntegrations: function() {
|
|
257
|
-
return isTypeIntegrations;
|
|
258
|
-
},
|
|
259
|
-
isTypeLead: function() {
|
|
260
|
-
return isTypeLead;
|
|
261
|
-
},
|
|
262
|
-
isTypeNotification: function() {
|
|
263
|
-
return isTypeNotification;
|
|
264
|
-
},
|
|
265
|
-
isTypeOrganization: function() {
|
|
266
|
-
return isTypeOrganization;
|
|
267
|
-
},
|
|
268
|
-
isTypePurchase: function() {
|
|
269
|
-
return isTypePurchase;
|
|
270
|
-
},
|
|
271
|
-
isTypeScan: function() {
|
|
272
|
-
return isTypeScan;
|
|
273
|
-
},
|
|
274
|
-
isTypeSession: function() {
|
|
275
|
-
return isTypeSession;
|
|
276
|
-
},
|
|
277
|
-
isTypeSpeaker: function() {
|
|
278
|
-
return isTypeSpeaker;
|
|
279
|
-
},
|
|
280
|
-
isTypeSponsorshipLevel: function() {
|
|
281
|
-
return isTypeSponsorshipLevel;
|
|
282
|
-
},
|
|
283
|
-
isTypeSupportTicket: function() {
|
|
284
|
-
return isTypeSupportTicket;
|
|
285
|
-
},
|
|
286
|
-
isTypeSupportTicketNote: function() {
|
|
287
|
-
return isTypeSupportTicketNote;
|
|
288
|
-
},
|
|
289
|
-
isTypeTeamMember: function() {
|
|
290
|
-
return isTypeTeamMember;
|
|
291
|
-
},
|
|
292
|
-
isTypeTicket: function() {
|
|
293
|
-
return isTypeTicket;
|
|
294
|
-
},
|
|
295
|
-
isTypeTrack: function() {
|
|
296
|
-
return isTypeTrack;
|
|
297
|
-
},
|
|
298
|
-
isTypeTransfer: function() {
|
|
299
|
-
return isTypeTransfer;
|
|
300
|
-
},
|
|
301
|
-
useSetAuthToken: function() {
|
|
302
|
-
return useSetAuthToken;
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
module.exports = __toCommonJS(src_exports);
|
|
306
|
-
// src/interfaces.ts
|
|
307
|
-
var RegistrationStatus = /* @__PURE__ */ function(RegistrationStatus2) {
|
|
308
|
-
RegistrationStatus2["registered"] = "registered";
|
|
309
|
-
RegistrationStatus2["checkedIn"] = "checkedIn";
|
|
310
|
-
RegistrationStatus2["checkedOut"] = "checkedOut";
|
|
311
|
-
RegistrationStatus2["waitlisted"] = "waitlisted";
|
|
312
|
-
RegistrationStatus2["cancelled"] = "cancelled";
|
|
313
|
-
RegistrationStatus2["transferred"] = "transferred";
|
|
314
|
-
RegistrationStatus2["invited"] = "invited";
|
|
315
|
-
RegistrationStatus2["rejected"] = "rejected";
|
|
316
|
-
RegistrationStatus2["draft"] = "draft";
|
|
317
|
-
return RegistrationStatus2;
|
|
318
|
-
}(RegistrationStatus || {});
|
|
319
|
-
var ImageType = /* @__PURE__ */ function(ImageType2) {
|
|
320
|
-
ImageType2["admin"] = "admin";
|
|
321
|
-
ImageType2["people"] = "people";
|
|
322
|
-
ImageType2["activity"] = "activity";
|
|
323
|
-
ImageType2["banner"] = "banner";
|
|
324
|
-
return ImageType2;
|
|
325
|
-
}(ImageType || {});
|
|
326
|
-
var isTypeImage = function(image) {
|
|
327
|
-
return image.name !== void 0;
|
|
328
|
-
};
|
|
329
|
-
var isTypeIntegrations = function(integrations) {
|
|
330
|
-
return integrations.ghost !== void 0;
|
|
331
|
-
};
|
|
332
|
-
var Currency = /* @__PURE__ */ function(Currency2) {
|
|
333
|
-
Currency2["USD"] = "USD";
|
|
334
|
-
return Currency2;
|
|
335
|
-
}(Currency || {});
|
|
336
|
-
var isTypeOrganization = function(organization) {
|
|
337
|
-
return organization.email !== void 0;
|
|
338
|
-
};
|
|
339
|
-
var isTypeAccountTier = function(accountTier) {
|
|
340
|
-
return accountTier.description !== void 0;
|
|
341
|
-
};
|
|
342
|
-
var AccountType = /* @__PURE__ */ function(AccountType2) {
|
|
343
|
-
AccountType2["account"] = "account";
|
|
344
|
-
AccountType2["team"] = "team";
|
|
345
|
-
return AccountType2;
|
|
346
|
-
}(AccountType || {});
|
|
347
|
-
var isTypeAccount = function(account) {
|
|
348
|
-
return account._count !== void 0;
|
|
349
|
-
};
|
|
350
|
-
var isSelf = function(account) {
|
|
351
|
-
return account.email !== void 0;
|
|
352
|
-
};
|
|
353
|
-
var isTypeActivity = function(activity) {
|
|
354
|
-
return activity._count !== void 0;
|
|
355
|
-
};
|
|
356
|
-
var CommunityAccess = /* @__PURE__ */ function(CommunityAccess2) {
|
|
357
|
-
CommunityAccess2["public"] = "public";
|
|
358
|
-
CommunityAccess2["private"] = "private";
|
|
359
|
-
return CommunityAccess2;
|
|
360
|
-
}(CommunityAccess || {});
|
|
361
|
-
var isTypeCommunity = function(community) {
|
|
362
|
-
return community._count !== void 0;
|
|
363
|
-
};
|
|
364
|
-
var EventSource = /* @__PURE__ */ function(EventSource2) {
|
|
365
|
-
EventSource2["admin"] = "admin";
|
|
366
|
-
EventSource2["moderator"] = "moderator";
|
|
367
|
-
EventSource2["account"] = "account";
|
|
368
|
-
return EventSource2;
|
|
369
|
-
}(EventSource || {});
|
|
370
|
-
var EventType = /* @__PURE__ */ function(EventType2) {
|
|
371
|
-
EventType2["physical"] = "physical";
|
|
372
|
-
EventType2["virtual"] = "virtual";
|
|
373
|
-
EventType2["hybrid"] = "hybrid";
|
|
374
|
-
return EventType2;
|
|
375
|
-
}(EventType || {});
|
|
376
|
-
var isTypeEvent = function(event) {
|
|
377
|
-
return event._count !== void 0;
|
|
378
|
-
};
|
|
379
|
-
var RegistrationQuestionType = /* @__PURE__ */ function(RegistrationQuestionType2) {
|
|
380
|
-
RegistrationQuestionType2["text"] = "text";
|
|
381
|
-
RegistrationQuestionType2["textarea"] = "textarea";
|
|
382
|
-
RegistrationQuestionType2["number"] = "number";
|
|
383
|
-
RegistrationQuestionType2["time"] = "time";
|
|
384
|
-
RegistrationQuestionType2["date"] = "date";
|
|
385
|
-
RegistrationQuestionType2["toggle"] = "toggle";
|
|
386
|
-
RegistrationQuestionType2["select"] = "select";
|
|
387
|
-
RegistrationQuestionType2["radio"] = "radio";
|
|
388
|
-
RegistrationQuestionType2["checkbox"] = "checkbox";
|
|
389
|
-
RegistrationQuestionType2["search"] = "search";
|
|
390
|
-
return RegistrationQuestionType2;
|
|
391
|
-
}(RegistrationQuestionType || {});
|
|
392
|
-
var isListing = function(event) {
|
|
393
|
-
return event.newActivityCreatorEmailNotification !== void 0;
|
|
394
|
-
};
|
|
395
|
-
var TicketVisibility = /* @__PURE__ */ function(TicketVisibility2) {
|
|
396
|
-
TicketVisibility2["public"] = "public";
|
|
397
|
-
TicketVisibility2["private"] = "private";
|
|
398
|
-
return TicketVisibility2;
|
|
399
|
-
}(TicketVisibility || {});
|
|
400
|
-
var TicketEventAccessLevel = /* @__PURE__ */ function(TicketEventAccessLevel2) {
|
|
401
|
-
TicketEventAccessLevel2["regular"] = "regular";
|
|
402
|
-
TicketEventAccessLevel2["virtual"] = "virtual";
|
|
403
|
-
TicketEventAccessLevel2["vip"] = "vip";
|
|
404
|
-
return TicketEventAccessLevel2;
|
|
405
|
-
}(TicketEventAccessLevel || {});
|
|
406
|
-
var isTypeTicket = function(ticket) {
|
|
407
|
-
return ticket.visibility !== void 0;
|
|
408
|
-
};
|
|
409
|
-
var isTypePurchase = function(purchase) {
|
|
410
|
-
return purchase.createdAt !== void 0;
|
|
411
|
-
};
|
|
412
|
-
var isTypeTransfer = function(transfer) {
|
|
413
|
-
return transfer.createdAt !== void 0;
|
|
414
|
-
};
|
|
415
|
-
var NotificationType = /* @__PURE__ */ function(NotificationType2) {
|
|
416
|
-
NotificationType2["ANNOUNCEMENT"] = "ANNOUNCEMENT";
|
|
417
|
-
NotificationType2["FOLLOW"] = "FOLLOW";
|
|
418
|
-
NotificationType2["INVITATION"] = "INVITATION";
|
|
419
|
-
NotificationType2["TRANSFER"] = "TRANSFER";
|
|
420
|
-
NotificationType2["LIKE"] = "LIKE";
|
|
421
|
-
NotificationType2["COMMENT"] = "COMMENT";
|
|
422
|
-
NotificationType2["RESHARE"] = "RESHARE";
|
|
423
|
-
NotificationType2["EVENT"] = "EVENT";
|
|
424
|
-
NotificationType2["ACTIVITY"] = "ACTIVITY";
|
|
425
|
-
return NotificationType2;
|
|
426
|
-
}(NotificationType || {});
|
|
427
|
-
var isTypeNotification = function(notification) {
|
|
428
|
-
return notification.createdAt !== void 0;
|
|
429
|
-
};
|
|
430
|
-
var CouponType = /* @__PURE__ */ function(CouponType2) {
|
|
431
|
-
CouponType2["order"] = "order";
|
|
432
|
-
CouponType2["ticket"] = "ticket";
|
|
433
|
-
return CouponType2;
|
|
434
|
-
}(CouponType || {});
|
|
435
|
-
var isTypeCoupon = function(coupon) {
|
|
436
|
-
return coupon.description !== void 0;
|
|
437
|
-
};
|
|
438
|
-
var isManagedCoupon = function(coupon) {
|
|
439
|
-
return coupon.active !== void 0;
|
|
440
|
-
};
|
|
441
|
-
var isTypeInstance = function(instance) {
|
|
442
|
-
return instance.coupon !== void 0;
|
|
443
|
-
};
|
|
444
|
-
var isTypeTrack = function(track) {
|
|
445
|
-
return track.description !== void 0;
|
|
446
|
-
};
|
|
447
|
-
var isTypeSpeaker = function(speaker) {
|
|
448
|
-
return speaker.website !== void 0;
|
|
449
|
-
};
|
|
450
|
-
var isTypeSession = function(session) {
|
|
451
|
-
return session.longDescription !== void 0;
|
|
452
|
-
};
|
|
453
|
-
var isTypeEventPage = function(page) {
|
|
454
|
-
return page.html !== void 0;
|
|
455
|
-
};
|
|
456
|
-
var isTypeScan = function(scan) {
|
|
457
|
-
return scan.createdAt !== void 0;
|
|
458
|
-
};
|
|
459
|
-
var isTypeSponsorshipLevel = function(sponsorshipLevel) {
|
|
460
|
-
return sponsorshipLevel.description !== void 0;
|
|
461
|
-
};
|
|
462
|
-
var isTypeFaq = function(faq) {
|
|
463
|
-
return faq.section !== void 0;
|
|
464
|
-
};
|
|
465
|
-
var isTypeFaqSection = function(faqSection) {
|
|
466
|
-
return faqSection.faqs !== void 0;
|
|
467
|
-
};
|
|
468
|
-
var SupportTicketType = /* @__PURE__ */ function(SupportTicketType2) {
|
|
469
|
-
SupportTicketType2["support"] = "support";
|
|
470
|
-
SupportTicketType2["inquiry"] = "inquiry";
|
|
471
|
-
return SupportTicketType2;
|
|
472
|
-
}(SupportTicketType || {});
|
|
473
|
-
var isTypeSupportTicket = function(supportTicket) {
|
|
474
|
-
return supportTicket.email !== void 0;
|
|
475
|
-
};
|
|
476
|
-
var isTypeSupportTicketNote = function(supportTicketNote) {
|
|
477
|
-
return supportTicketNote.createdAt !== void 0;
|
|
478
|
-
};
|
|
479
|
-
var AdvertisementType = /* @__PURE__ */ function(AdvertisementType2) {
|
|
480
|
-
AdvertisementType2["square"] = "square";
|
|
481
|
-
AdvertisementType2["rectangle"] = "rectangle";
|
|
482
|
-
return AdvertisementType2;
|
|
483
|
-
}(AdvertisementType || {});
|
|
484
|
-
var isTypeAdvertisement = function(advertisement) {
|
|
485
|
-
return advertisement.title !== void 0;
|
|
486
|
-
};
|
|
487
|
-
var isTypeTeamMember = function(teamMember) {
|
|
488
|
-
return teamMember.email !== void 0;
|
|
489
|
-
};
|
|
490
|
-
var CommunityMembershipRole = /* @__PURE__ */ function(CommunityMembershipRole2) {
|
|
491
|
-
CommunityMembershipRole2["member"] = "member";
|
|
492
|
-
CommunityMembershipRole2["moderator"] = "moderator";
|
|
493
|
-
return CommunityMembershipRole2;
|
|
494
|
-
}(CommunityMembershipRole || {});
|
|
495
|
-
var isTypeCommunityMembership = function(communityMembership) {
|
|
496
|
-
return communityMembership.createdAt !== void 0;
|
|
497
|
-
};
|
|
498
|
-
var ContentTypeFormat = /* @__PURE__ */ function(ContentTypeFormat2) {
|
|
499
|
-
ContentTypeFormat2["article"] = "article";
|
|
500
|
-
ContentTypeFormat2["podcast"] = "podcast";
|
|
501
|
-
ContentTypeFormat2["video"] = "video";
|
|
502
|
-
return ContentTypeFormat2;
|
|
503
|
-
}(ContentTypeFormat || {});
|
|
504
|
-
var isTypeContentType = function(contentType) {
|
|
505
|
-
return contentType.priority !== void 0;
|
|
506
|
-
};
|
|
507
|
-
var isTypeContent = function(content) {
|
|
508
|
-
return content.body !== void 0;
|
|
509
|
-
};
|
|
510
|
-
var isTypeLead = function(lead) {
|
|
511
|
-
return lead.email !== void 0;
|
|
512
|
-
};
|
|
513
|
-
var PushDeviceAppType = /* @__PURE__ */ function(PushDeviceAppType2) {
|
|
514
|
-
PushDeviceAppType2["EVENTXM"] = "EVENTXM";
|
|
515
|
-
PushDeviceAppType2["COMMUNITYXM"] = "COMMUNITYXM";
|
|
516
|
-
return PushDeviceAppType2;
|
|
517
|
-
}(PushDeviceAppType || {});
|
|
518
|
-
var PushService = /* @__PURE__ */ function(PushService2) {
|
|
519
|
-
PushService2["apn"] = "apn";
|
|
520
|
-
PushService2["firebase"] = "firebase";
|
|
521
|
-
PushService2["huawei"] = "huawei";
|
|
522
|
-
PushService2["xiaomi"] = "xiaomi";
|
|
523
|
-
return PushService2;
|
|
524
|
-
}(PushService || {});
|
|
525
|
-
var isTypeAnnouncement = function(announcement) {
|
|
526
|
-
return announcement.updatedAt !== void 0;
|
|
527
|
-
};
|
|
528
|
-
var isTypeBenefit = function(benefit) {
|
|
529
|
-
return benefit.createdAt !== void 0;
|
|
530
|
-
};
|
|
531
|
-
var isTypeEventActivation = function(eventActivation) {
|
|
532
|
-
return eventActivation.createdAt !== void 0;
|
|
533
|
-
};
|
|
534
|
-
var isTypeEventActivationCompletion = function(eventActivationCompletion) {
|
|
535
|
-
return eventActivationCompletion.updatedAt !== void 0;
|
|
536
|
-
};
|
|
537
|
-
// src/utilities/AppendInfiniteQuery.ts
|
|
538
|
-
var AppendInfiniteQuery_exports = {};
|
|
539
|
-
__export(AppendInfiniteQuery_exports, {
|
|
540
|
-
default: function() {
|
|
541
|
-
return AppendInfiniteQuery_default;
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
var AppendInfiniteQuery = function(queryClient, key, newData) {
|
|
545
|
-
queryClient.setQueriesData(key, function(data) {
|
|
546
|
-
var _data_pages_, _data_pages;
|
|
547
|
-
if (data === null || data === void 0 ? void 0 : (_data_pages = data.pages) === null || _data_pages === void 0 ? void 0 : (_data_pages_ = _data_pages[0]) === null || _data_pages_ === void 0 ? void 0 : _data_pages_.data) {
|
|
548
|
-
var _data_pages_1, _data_pages1, _data_pages__data, _data_pages_2, _data_pages2;
|
|
549
|
-
if ((data === null || data === void 0 ? void 0 : (_data_pages1 = data.pages) === null || _data_pages1 === void 0 ? void 0 : (_data_pages_1 = _data_pages1[0]) === null || _data_pages_1 === void 0 ? void 0 : _data_pages_1.data) && (data === null || data === void 0 ? void 0 : (_data_pages2 = data.pages) === null || _data_pages2 === void 0 ? void 0 : (_data_pages_2 = _data_pages2[0]) === null || _data_pages_2 === void 0 ? void 0 : (_data_pages__data = _data_pages_2.data) === null || _data_pages__data === void 0 ? void 0 : _data_pages__data.length) > 0 && newData) {
|
|
550
|
-
var _data_pages__data1, _data_pages_3, _data_pages3;
|
|
551
|
-
data === null || data === void 0 ? void 0 : (_data_pages3 = data.pages) === null || _data_pages3 === void 0 ? void 0 : (_data_pages_3 = _data_pages3[0]) === null || _data_pages_3 === void 0 ? void 0 : (_data_pages__data1 = _data_pages_3.data) === null || _data_pages__data1 === void 0 ? void 0 : _data_pages__data1.unshift(newData);
|
|
552
|
-
} else {
|
|
553
|
-
data.pages[0].data = [
|
|
554
|
-
newData
|
|
555
|
-
];
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
return data;
|
|
559
|
-
});
|
|
560
|
-
};
|
|
561
|
-
var AppendInfiniteQuery_default = AppendInfiniteQuery;
|
|
562
|
-
// src/utilities/CacheIndividualQueries.ts
|
|
563
|
-
var CacheIndividualQueries_exports = {};
|
|
564
|
-
__export(CacheIndividualQueries_exports, {
|
|
565
|
-
default: function() {
|
|
566
|
-
return CacheIndividualQueries_default;
|
|
567
|
-
}
|
|
568
|
-
});
|
|
569
|
-
var CacheIndividualQueries = function(response, queryClient, queryKeyFn, SET_FUNCTION, itemMap) {
|
|
570
|
-
response.pages.forEach(function(page) {
|
|
571
|
-
page.data.forEach(function(item) {
|
|
572
|
-
item = itemMap ? itemMap(item) : item;
|
|
573
|
-
if (item.id) {
|
|
574
|
-
var SudoResponse = {
|
|
575
|
-
status: page.status,
|
|
576
|
-
message: "Cached From: ".concat(page.message),
|
|
577
|
-
data: item
|
|
578
|
-
};
|
|
579
|
-
SET_FUNCTION(queryClient, queryKeyFn(item.id), SudoResponse);
|
|
580
|
-
if (item.slug) {
|
|
581
|
-
SET_FUNCTION(queryClient, queryKeyFn(item.slug), SudoResponse);
|
|
582
|
-
}
|
|
583
|
-
if (item.username) {
|
|
584
|
-
SET_FUNCTION(queryClient, queryKeyFn(item.username), SudoResponse);
|
|
585
|
-
}
|
|
586
|
-
if (item.code) {
|
|
587
|
-
SET_FUNCTION(queryClient, queryKeyFn(item.code), SudoResponse);
|
|
588
|
-
}
|
|
589
|
-
if (item.name) {
|
|
590
|
-
SET_FUNCTION(queryClient, queryKeyFn(item.name), SudoResponse);
|
|
591
|
-
}
|
|
592
|
-
if (item.alternateId) {
|
|
593
|
-
SET_FUNCTION(queryClient, queryKeyFn(item.alternateId.toString()), SudoResponse);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
});
|
|
597
|
-
});
|
|
598
|
-
};
|
|
599
|
-
var CacheIndividualQueries_default = CacheIndividualQueries;
|
|
600
|
-
// src/utilities/GetErrorMessage.ts
|
|
601
|
-
var GetErrorMessage_exports = {};
|
|
602
|
-
__export(GetErrorMessage_exports, {
|
|
603
|
-
default: function() {
|
|
604
|
-
return GetErrorMessage_default;
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
var import_axios = __toESM(require("axios"));
|
|
608
|
-
var GetErrorMessage = function(error) {
|
|
609
|
-
var fallback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Something went wrong";
|
|
610
|
-
var message = fallback;
|
|
611
|
-
if (import_axios.default.isAxiosError(error)) {
|
|
612
|
-
var _error_response_data, _error_response;
|
|
613
|
-
message = ((_error_response = error.response) === null || _error_response === void 0 ? void 0 : (_error_response_data = _error_response.data) === null || _error_response_data === void 0 ? void 0 : _error_response_data.message) || message;
|
|
614
|
-
} else {
|
|
615
|
-
message = error.message;
|
|
616
|
-
}
|
|
617
|
-
return message;
|
|
618
|
-
};
|
|
619
|
-
var GetErrorMessage_default = GetErrorMessage;
|
|
620
|
-
// src/utilities/MergeInfinitePages.ts
|
|
621
|
-
var MergeInfinitePages_exports = {};
|
|
622
|
-
__export(MergeInfinitePages_exports, {
|
|
623
|
-
default: function() {
|
|
624
|
-
return MergeInfinitePages_default;
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
function MergeInfinitePages(data) {
|
|
628
|
-
return data.pages.reduce(function(sessions, page) {
|
|
629
|
-
return _to_consumable_array(sessions).concat(_to_consumable_array(page.data));
|
|
630
|
-
}, []);
|
|
631
|
-
}
|
|
632
|
-
var MergeInfinitePages_default = MergeInfinitePages;
|
|
633
|
-
// src/hooks/useConnectedXM.ts
|
|
634
|
-
var import_react2 = __toESM(require("react"));
|
|
635
|
-
// src/Context.ts
|
|
636
|
-
var import_react = __toESM(require("react"));
|
|
637
|
-
var Context = import_react.default.createContext({});
|
|
638
|
-
var Context_default = Context;
|
|
639
|
-
// src/hooks/useConnectedXM.ts
|
|
640
|
-
var useConnectedXM = function() {
|
|
641
|
-
var context = import_react2.default.useContext(Context_default);
|
|
642
|
-
if (!context) {
|
|
643
|
-
throw new Error("useConnectedXM must be used within a ConnectedXMProvider");
|
|
644
|
-
}
|
|
645
|
-
return context;
|
|
646
|
-
};
|
|
647
|
-
// src/hooks/useSetAuthToken.ts
|
|
648
|
-
var useSetAuthToken = function() {
|
|
649
|
-
var setAuthToken = useConnectedXM().setAuthToken;
|
|
650
|
-
return setAuthToken;
|
|
651
|
-
};
|
|
652
|
-
// src/ConnectedXM.tsx
|
|
653
|
-
var import_react3 = __toESM(require("react"));
|
|
654
|
-
var ConnectedXM = function(param) {
|
|
655
|
-
var organizationId = param.organizationId, _param_apiUrl = param.apiUrl, apiUrl = _param_apiUrl === void 0 ? "https://api.connectedxm.app" : _param_apiUrl, token = param.token, executeAs = param.executeAs, _param_locale = param.locale, locale = _param_locale === void 0 ? "en" : _param_locale, children = param.children;
|
|
656
|
-
var _import_react3_default_useState = _sliced_to_array(import_react3.default.useState(token), 2), authToken = _import_react3_default_useState[0], setAuthToken = _import_react3_default_useState[1];
|
|
657
|
-
return /* @__PURE__ */ import_react3.default.createElement(Context_default.Provider, {
|
|
658
|
-
value: {
|
|
659
|
-
organizationId: organizationId,
|
|
660
|
-
apiUrl: apiUrl,
|
|
661
|
-
token: authToken,
|
|
662
|
-
setAuthToken: setAuthToken,
|
|
663
|
-
executeAs: executeAs,
|
|
664
|
-
locale: locale
|
|
665
|
-
}
|
|
666
|
-
}, children);
|
|
667
|
-
};
|
|
668
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
669
|
-
0 && (module.exports = {
|
|
670
|
-
AccountType: AccountType,
|
|
671
|
-
AdvertisementType: AdvertisementType,
|
|
672
|
-
AppendInfiniteQuery: AppendInfiniteQuery,
|
|
673
|
-
CacheIndividualQueries: CacheIndividualQueries,
|
|
674
|
-
CommunityAccess: CommunityAccess,
|
|
675
|
-
CommunityMembershipRole: CommunityMembershipRole,
|
|
676
|
-
ConnectedXM: ConnectedXM,
|
|
677
|
-
ContentTypeFormat: ContentTypeFormat,
|
|
678
|
-
CouponType: CouponType,
|
|
679
|
-
Currency: Currency,
|
|
680
|
-
EventSource: EventSource,
|
|
681
|
-
EventType: EventType,
|
|
682
|
-
GetErrorMessage: GetErrorMessage,
|
|
683
|
-
ImageType: ImageType,
|
|
684
|
-
MergeInfinitePages: MergeInfinitePages,
|
|
685
|
-
NotificationType: NotificationType,
|
|
686
|
-
PushDeviceAppType: PushDeviceAppType,
|
|
687
|
-
PushService: PushService,
|
|
688
|
-
RegistrationQuestionType: RegistrationQuestionType,
|
|
689
|
-
RegistrationStatus: RegistrationStatus,
|
|
690
|
-
SupportTicketType: SupportTicketType,
|
|
691
|
-
TicketEventAccessLevel: TicketEventAccessLevel,
|
|
692
|
-
TicketVisibility: TicketVisibility,
|
|
693
|
-
isListing: isListing,
|
|
694
|
-
isManagedCoupon: isManagedCoupon,
|
|
695
|
-
isSelf: isSelf,
|
|
696
|
-
isTypeAccount: isTypeAccount,
|
|
697
|
-
isTypeAccountTier: isTypeAccountTier,
|
|
698
|
-
isTypeActivity: isTypeActivity,
|
|
699
|
-
isTypeAdvertisement: isTypeAdvertisement,
|
|
700
|
-
isTypeAnnouncement: isTypeAnnouncement,
|
|
701
|
-
isTypeBenefit: isTypeBenefit,
|
|
702
|
-
isTypeCommunity: isTypeCommunity,
|
|
703
|
-
isTypeCommunityMembership: isTypeCommunityMembership,
|
|
704
|
-
isTypeContent: isTypeContent,
|
|
705
|
-
isTypeContentType: isTypeContentType,
|
|
706
|
-
isTypeCoupon: isTypeCoupon,
|
|
707
|
-
isTypeEvent: isTypeEvent,
|
|
708
|
-
isTypeEventActivation: isTypeEventActivation,
|
|
709
|
-
isTypeEventActivationCompletion: isTypeEventActivationCompletion,
|
|
710
|
-
isTypeEventPage: isTypeEventPage,
|
|
711
|
-
isTypeFaq: isTypeFaq,
|
|
712
|
-
isTypeFaqSection: isTypeFaqSection,
|
|
713
|
-
isTypeImage: isTypeImage,
|
|
714
|
-
isTypeInstance: isTypeInstance,
|
|
715
|
-
isTypeIntegrations: isTypeIntegrations,
|
|
716
|
-
isTypeLead: isTypeLead,
|
|
717
|
-
isTypeNotification: isTypeNotification,
|
|
718
|
-
isTypeOrganization: isTypeOrganization,
|
|
719
|
-
isTypePurchase: isTypePurchase,
|
|
720
|
-
isTypeScan: isTypeScan,
|
|
721
|
-
isTypeSession: isTypeSession,
|
|
722
|
-
isTypeSpeaker: isTypeSpeaker,
|
|
723
|
-
isTypeSponsorshipLevel: isTypeSponsorshipLevel,
|
|
724
|
-
isTypeSupportTicket: isTypeSupportTicket,
|
|
725
|
-
isTypeSupportTicketNote: isTypeSupportTicketNote,
|
|
726
|
-
isTypeTeamMember: isTypeTeamMember,
|
|
727
|
-
isTypeTicket: isTypeTicket,
|
|
728
|
-
isTypeTrack: isTypeTrack,
|
|
729
|
-
isTypeTransfer: isTypeTransfer,
|
|
730
|
-
useSetAuthToken: useSetAuthToken
|
|
731
|
-
});
|