MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / serializeAccount

Function serializeAccount

packages/serializers/src/account.ts:34–96  ·  view source on GitHub ↗
(account?: any)

Source from the content-addressed store, hash-verified

32}
33
34export function serializeAccount(account?: any): SerializedAccount {
35 const {
36 description,
37 homeUrl,
38 docsUrl,
39 logoUrl,
40 logoSquareUrl,
41 faviconUrl,
42 redirectDomain,
43 brandColor,
44 premium,
45 featurePreview,
46 googleAnalyticsId,
47 syncStatus,
48 id,
49 type,
50 name,
51 anonymizeUsers,
52 anonymize,
53 slackDomain,
54 discordDomain,
55 discordServerId,
56 chat,
57 communityUrl,
58 newChannelsConfig,
59 redirectDomainPropagate,
60 searchSettings,
61 } = account;
62
63 const communityType = identifyCommunity(account);
64 const hasAuth = hasAuthFn(account);
65 const search: SerializedSearchSettings = tc(() => JSON.parse(searchSettings));
66
67 return {
68 description,
69 homeUrl,
70 docsUrl,
71 logoUrl,
72 logoSquareUrl,
73 faviconUrl,
74 redirectDomain,
75 brandColor,
76 premium,
77 featurePreview,
78 googleAnalyticsId,
79 syncStatus,
80 id,
81 type,
82 name,
83 communityType,
84 anonymizeUsers,
85 anonymize,
86 hasAuth,
87 slackDomain,
88 discordDomain,
89 discordServerId,
90 chat,
91 communityUrl,

Callers 6

account.test.tsFile · 0.90
handlerFunction · 0.90
getServerSidePropsFunction · 0.90
newSlackIntegrationFunction · 0.90
newDiscordIntegrationFunction · 0.90
fetchCommonFunction · 0.90

Calls 3

tcFunction · 0.90
identifyCommunityFunction · 0.85
hasAuthFnFunction · 0.85

Tested by

no test coverage detected