@messenger-box/platform-client 10.0.3-alpha.7 → 10.0.3-alpha.72
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/CHANGELOG.md +88 -0
- package/lib/graphql/fragments/post-message.gql +36 -0
- package/lib/graphql/policies/channel-policies.d.ts.map +1 -1
- package/lib/graphql/policies/channel-policies.js +150 -2
- package/lib/graphql/policies/channel-policies.js.map +1 -1
- package/lib/graphql/policies/messages-policies.d.ts.map +1 -1
- package/lib/graphql/policies/messages-policies.js +229 -37
- package/lib/graphql/policies/messages-policies.js.map +1 -1
- package/lib/graphql/policies/post-thread-policies.d.ts.map +1 -1
- package/lib/graphql/policies/post-thread-policies.js +136 -31
- package/lib/graphql/policies/post-thread-policies.js.map +1 -1
- package/lib/graphql/policies/teams-policies.d.ts.map +1 -1
- package/lib/graphql/policies/teams-policies.js +13 -1
- package/lib/graphql/policies/teams-policies.js.map +1 -1
- package/lib/graphql/queries/channels-by-user.gql +26 -0
- package/lib/graphql/queries/organization-query.gql +78 -35
- package/lib/graphql/queries/post-thread-message.gql +4 -0
- package/lib/graphql/queries/teams-query.gql +79 -29
- package/lib/graphql/queries/user-account.gql +1 -1
- package/lib/graphql/queries/users.gql +1 -1
- package/lib/hooks/use-upload-file.hook.d.ts.map +1 -1
- package/lib/hooks/use-upload-file.hook.js +1 -1
- package/lib/hooks/use-upload-file.hook.js.map +1 -1
- package/lib/hooks/use-upload-file.hook.native.d.ts.map +1 -1
- package/lib/hooks/use-upload-file.hook.native.js +1 -1
- package/lib/hooks/use-upload-file.hook.native.js.map +1 -1
- package/lib/hooks/use-upload-files.hook.d.ts.map +1 -1
- package/lib/hooks/use-upload-files.hook.js +1 -1
- package/lib/hooks/use-upload-files.hook.js.map +1 -1
- package/lib/hooks/use-upload-files.hook.native.d.ts.map +1 -1
- package/lib/hooks/use-upload-files.hook.native.js +1 -1
- package/lib/hooks/use-upload-files.hook.native.js.map +1 -1
- package/package.json +4 -4
- package/src/graphql/fragments/post-message.gql +36 -0
- package/src/graphql/policies/channel-policies.ts +148 -2
- package/src/graphql/policies/messages-policies.ts +251 -39
- package/src/graphql/policies/post-thread-policies.ts +151 -31
- package/src/graphql/policies/teams-policies.ts +13 -1
- package/src/graphql/queries/channels-by-user.gql +26 -0
- package/src/graphql/queries/organization-query.gql +78 -35
- package/src/graphql/queries/post-thread-message.gql +4 -0
- package/src/graphql/queries/teams-query.gql +79 -29
- package/src/graphql/queries/user-account.gql +1 -1
- package/src/graphql/queries/users.gql +1 -1
- package/src/hooks/use-upload-file.hook.native.ts +1 -4
- package/src/hooks/use-upload-file.hook.ts +1 -4
- package/src/hooks/use-upload-files.hook.native.ts +1 -4
- package/src/hooks/use-upload-files.hook.ts +1 -4
|
@@ -1,57 +1,162 @@
|
|
|
1
|
+
import {gql}from'@apollo/client/index.js';// Define the fragment we'll use for cache operations
|
|
2
|
+
gql`
|
|
3
|
+
fragment PostThreadInfo on PostThread {
|
|
4
|
+
replies
|
|
5
|
+
replyCount
|
|
6
|
+
lastReplyAt
|
|
7
|
+
updatedAt
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
1
10
|
const postThreadPolicies = {
|
|
2
11
|
ThreadMessages: {
|
|
3
|
-
// keyFields: ['messagesRefId'],
|
|
4
|
-
//keyFields: [],
|
|
5
12
|
keyFields: ['data', ['channel', ['id']]],
|
|
6
13
|
fields: {
|
|
7
14
|
data: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
merge: (existing = [], incoming = [], {
|
|
16
|
+
readField
|
|
17
|
+
}) => {
|
|
18
|
+
// Create a map for efficient lookups
|
|
19
|
+
const threadMap = new Map();
|
|
20
|
+
// Store existing threads
|
|
21
|
+
if (existing && existing.length > 0) {
|
|
22
|
+
for (const item of existing) {
|
|
23
|
+
const id = readField('id', item);
|
|
24
|
+
if (id) threadMap.set(id, item);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
// Add or update with incoming threads
|
|
28
|
+
if (incoming && incoming.length > 0) {
|
|
29
|
+
for (const item of incoming) {
|
|
30
|
+
const id = readField('id', item);
|
|
31
|
+
if (id) threadMap.set(id, item);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// Convert back to array
|
|
35
|
+
return Array.from(threadMap.values());
|
|
36
|
+
}
|
|
24
37
|
},
|
|
25
38
|
totalCount: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
merge(existing, incoming) {
|
|
40
|
+
// Take the higher of the two counts
|
|
41
|
+
return incoming !== undefined ? Math.max(existing || 0, incoming) : existing;
|
|
42
|
+
}
|
|
30
43
|
}
|
|
31
44
|
}
|
|
32
45
|
},
|
|
33
46
|
Query: {
|
|
34
47
|
fields: {
|
|
35
48
|
threadMessages: {
|
|
36
|
-
// keyArgs: ['channelId', 'parentId', 'limit', 'skip'],
|
|
37
49
|
keyArgs: ['channelId'],
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
merge(existing, incoming, {
|
|
51
|
+
readField
|
|
52
|
+
}) {
|
|
53
|
+
if (!existing) return incoming;
|
|
54
|
+
if (!incoming) return existing;
|
|
41
55
|
return {
|
|
42
56
|
...incoming,
|
|
43
|
-
data: [...(existing?.data
|
|
57
|
+
data: [...(existing?.data || []), ...(incoming.data || [])].filter((item, index, self) =>
|
|
58
|
+
// Filter out duplicates
|
|
59
|
+
index === self.findIndex(t => readField('id', t) === readField('id', item)))
|
|
44
60
|
};
|
|
45
61
|
}
|
|
46
62
|
},
|
|
47
63
|
getPostThread: {
|
|
48
|
-
|
|
49
|
-
keyArgs: ['channelId', 'postParentId', 'limit', 'skip', 'role'],
|
|
64
|
+
keyArgs: ['channelId', 'postParentId', 'role'],
|
|
50
65
|
merge(existing, incoming, {
|
|
51
66
|
mergeObjects
|
|
52
67
|
}) {
|
|
53
|
-
|
|
54
|
-
|
|
68
|
+
if (!existing) return incoming;
|
|
69
|
+
if (!incoming) return existing;
|
|
70
|
+
// Carefully merge the two objects
|
|
71
|
+
const result = mergeObjects(existing, incoming);
|
|
72
|
+
// Special handling for replies to avoid duplicates
|
|
73
|
+
if (existing.replies && incoming.replies) {
|
|
74
|
+
const uniqueReplies = new Map();
|
|
75
|
+
// Add existing replies
|
|
76
|
+
for (const reply of existing.replies) {
|
|
77
|
+
uniqueReplies.set(reply.id, reply);
|
|
78
|
+
}
|
|
79
|
+
// Add incoming replies, overwriting existing ones
|
|
80
|
+
for (const reply of incoming.replies) {
|
|
81
|
+
uniqueReplies.set(reply.id, reply);
|
|
82
|
+
}
|
|
83
|
+
// Replace replies with deduplicated list
|
|
84
|
+
result.replies = Array.from(uniqueReplies.values());
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
// Mutation: {
|
|
92
|
+
// fields: {
|
|
93
|
+
// createPostThread: {
|
|
94
|
+
// merge(existing, incoming, { cache, args, readField }) {
|
|
95
|
+
// // Early return if not enough data
|
|
96
|
+
// if (!incoming?.lastMessage || !incoming?.data || !args?.channelId || !args?.postParentId) {
|
|
97
|
+
// return incoming;
|
|
98
|
+
// }
|
|
99
|
+
// try {
|
|
100
|
+
// // Use type policies to handle the cache update instead of direct manipulation
|
|
101
|
+
// const queryRef = cache.identify({
|
|
102
|
+
// __typename: 'Query',
|
|
103
|
+
// getPostThread: {
|
|
104
|
+
// channelId: args.channelId,
|
|
105
|
+
// postParentId: args.postParentId,
|
|
106
|
+
// role: args.threadMessageInput?.role
|
|
107
|
+
// }
|
|
108
|
+
// });
|
|
109
|
+
// // Use cache.modify which doesn't require fragments
|
|
110
|
+
// if (queryRef) {
|
|
111
|
+
// cache.modify({
|
|
112
|
+
// id: queryRef,
|
|
113
|
+
// fields: {
|
|
114
|
+
// getPostThread(existingThread = {}) {
|
|
115
|
+
// if (!existingThread) return existingThread;
|
|
116
|
+
// // Create a new object with the updated properties
|
|
117
|
+
// return {
|
|
118
|
+
// ...existingThread,
|
|
119
|
+
// replies: [incoming.lastMessage, ...(existingThread.replies || [])],
|
|
120
|
+
// replyCount: (existingThread.replyCount || 0) + 1,
|
|
121
|
+
// lastReplyAt: incoming.lastMessage.createdAt,
|
|
122
|
+
// updatedAt: incoming.lastMessage.createdAt
|
|
123
|
+
// };
|
|
124
|
+
// }
|
|
125
|
+
// }
|
|
126
|
+
// });
|
|
127
|
+
// }
|
|
128
|
+
// } catch (error) {
|
|
129
|
+
// console.error('Error updating cache in createPostThread policy:', error);
|
|
130
|
+
// }
|
|
131
|
+
// return incoming;
|
|
132
|
+
// },
|
|
133
|
+
// },
|
|
134
|
+
// },
|
|
135
|
+
// },
|
|
136
|
+
PostThread: {
|
|
137
|
+
fields: {
|
|
138
|
+
replies: {
|
|
139
|
+
merge(existing = [], incoming = [], {
|
|
140
|
+
readField
|
|
141
|
+
}) {
|
|
142
|
+
// Use a map for fast deduplication
|
|
143
|
+
const replyMap = new Map();
|
|
144
|
+
// Add existing replies
|
|
145
|
+
if (existing && existing.length > 0) {
|
|
146
|
+
for (const reply of existing) {
|
|
147
|
+
const id = readField('id', reply);
|
|
148
|
+
if (id) replyMap.set(id, reply);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// Add or update with incoming replies
|
|
152
|
+
if (incoming && incoming.length > 0) {
|
|
153
|
+
for (const reply of incoming) {
|
|
154
|
+
const id = readField('id', reply);
|
|
155
|
+
if (id) replyMap.set(id, reply);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
// Convert back to array
|
|
159
|
+
return Array.from(replyMap.values());
|
|
55
160
|
}
|
|
56
161
|
}
|
|
57
162
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-thread-policies.js","sources":["../../../src/graphql/policies/post-thread-policies.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post-thread-policies.js","sources":["../../../src/graphql/policies/post-thread-policies.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams-policies.d.ts","sourceRoot":"","sources":["../../../src/graphql/policies/teams-policies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"teams-policies.d.ts","sourceRoot":"","sources":["../../../src/graphql/policies/teams-policies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,YAAY,EAAE,YAgB1B,CAAC"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
const teamPolicies = {
|
|
2
2
|
Query: {
|
|
3
|
-
fields: {
|
|
3
|
+
fields: {
|
|
4
|
+
getOrganizationTeams: {
|
|
5
|
+
merge(existing = [], incoming) {
|
|
6
|
+
return incoming;
|
|
7
|
+
},
|
|
8
|
+
read(existing) {
|
|
9
|
+
return existing;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
AccountTeam: {
|
|
15
|
+
keyFields: ['_id']
|
|
4
16
|
}
|
|
5
17
|
};export{teamPolicies};//# sourceMappingURL=teams-policies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams-policies.js","sources":["../../../src/graphql/policies/teams-policies.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEa,MAAA,YAAY,GAAiB;AACtC,EAAA,KAAA,EAAK;AACD,IAAA,MAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"teams-policies.js","sources":["../../../src/graphql/policies/teams-policies.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEa,MAAA,YAAY,GAAiB;AACtC,EAAA,KAAA,EAAK;AACD,IAAA,MAAA,EAAA;AACI,MAAA,oBAAA,EAAA;AACI,QAAA,KAAA,CAAA,QAAM,GAAA,EAAA,EAAA,QAAe,EAAQ;AACzB,UAAA,OAAA,QAAA;;AAEJ,QAAA,IAAA,CAAA,QAAK,EAAQ;AACT,UAAA,OAAA,QAAA;;AAEP;AACJ;AACJ,GAAA;AACD,EAAA,WAAA,EAAW;aACE,EAAA,CAAA,KAAG;AACf;"}
|
|
@@ -14,6 +14,32 @@ query GetChannelsByUser($role: String, $criteria: AnyObject, $limit: Int, $skip:
|
|
|
14
14
|
creator {
|
|
15
15
|
...MessengerUser
|
|
16
16
|
}
|
|
17
|
+
lastPostAt
|
|
18
|
+
createdAt
|
|
19
|
+
updatedAt
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
query GetChannelsByUserWithLastMessage($role: String, $criteria: AnyObject, $limit: Int, $skip: Int, $sort: Sort) {
|
|
25
|
+
channelsByUser(role: $role, criteria: $criteria, limit: $limit, skip: $skip, sort: $sort) {
|
|
26
|
+
id
|
|
27
|
+
title
|
|
28
|
+
description
|
|
29
|
+
type
|
|
30
|
+
displayName
|
|
31
|
+
members {
|
|
32
|
+
id
|
|
33
|
+
user {
|
|
34
|
+
...MessengerUser
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
creator {
|
|
38
|
+
...MessengerUser
|
|
39
|
+
}
|
|
40
|
+
lastMessage {
|
|
41
|
+
...Post
|
|
42
|
+
}
|
|
17
43
|
createdAt
|
|
18
44
|
updatedAt
|
|
19
45
|
}
|
|
@@ -1,56 +1,99 @@
|
|
|
1
1
|
query GetOrganizationDetail($where: OrgDetailWhere!) {
|
|
2
2
|
getOrganizationDetail(where: $where) {
|
|
3
|
-
createdAt
|
|
4
|
-
description
|
|
5
3
|
id
|
|
4
|
+
name
|
|
5
|
+
title
|
|
6
|
+
description
|
|
7
|
+
picture
|
|
8
|
+
orgUserCount
|
|
9
|
+
status
|
|
10
|
+
periodStart
|
|
11
|
+
periodStop
|
|
12
|
+
createdAt
|
|
13
|
+
updatedAt
|
|
14
|
+
billingEmail
|
|
15
|
+
stripeId
|
|
16
|
+
stripeSubscription
|
|
17
|
+
erpId
|
|
18
|
+
costCenter
|
|
19
|
+
legalEntityName
|
|
20
|
+
taxId
|
|
21
|
+
organizationType
|
|
22
|
+
organizationCategory
|
|
23
|
+
resources
|
|
24
|
+
settings
|
|
25
|
+
contributionRoles {
|
|
26
|
+
id
|
|
27
|
+
name
|
|
28
|
+
target
|
|
29
|
+
description
|
|
30
|
+
}
|
|
6
31
|
invitations {
|
|
7
|
-
|
|
8
|
-
acceptedAt
|
|
9
|
-
createdAt
|
|
32
|
+
id
|
|
10
33
|
email
|
|
34
|
+
roles
|
|
35
|
+
status
|
|
11
36
|
fullName
|
|
12
|
-
id
|
|
13
|
-
invitedBy
|
|
14
|
-
teamId
|
|
15
|
-
updatedAt
|
|
16
|
-
tokenExpiration
|
|
17
|
-
role
|
|
18
37
|
inviteCount
|
|
38
|
+
invitedBy {
|
|
39
|
+
id
|
|
40
|
+
email
|
|
41
|
+
username
|
|
42
|
+
givenName
|
|
43
|
+
familyName
|
|
44
|
+
picture
|
|
45
|
+
}
|
|
46
|
+
inviteLink
|
|
47
|
+
createdAt
|
|
48
|
+
updatedAt
|
|
49
|
+
acceptedAt
|
|
50
|
+
sent
|
|
51
|
+
expiresAt
|
|
52
|
+
team {
|
|
53
|
+
id
|
|
54
|
+
name
|
|
55
|
+
title
|
|
56
|
+
}
|
|
19
57
|
}
|
|
20
|
-
|
|
21
|
-
|
|
58
|
+
members {
|
|
59
|
+
id
|
|
60
|
+
email
|
|
61
|
+
displayName
|
|
62
|
+
roles
|
|
63
|
+
status
|
|
64
|
+
lastVisited
|
|
65
|
+
joinedAt
|
|
66
|
+
isBillingLeader
|
|
67
|
+
createdAt
|
|
68
|
+
updatedAt
|
|
22
69
|
crossCheckEmail
|
|
23
|
-
inactive
|
|
24
|
-
orgName
|
|
25
70
|
user {
|
|
71
|
+
id
|
|
26
72
|
email
|
|
73
|
+
username
|
|
74
|
+
givenName
|
|
75
|
+
familyName
|
|
76
|
+
picture
|
|
27
77
|
alias
|
|
28
78
|
emailVerified
|
|
29
|
-
id
|
|
30
|
-
username
|
|
31
79
|
}
|
|
32
|
-
roles
|
|
33
|
-
userId
|
|
34
80
|
}
|
|
35
|
-
orgUserCount
|
|
36
|
-
periodStart
|
|
37
|
-
periodStop
|
|
38
|
-
picture
|
|
39
|
-
status
|
|
40
|
-
title
|
|
41
|
-
updatedAt
|
|
42
81
|
}
|
|
43
82
|
}
|
|
44
83
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
query GetOrganizationMembersWithChannels($orgName: String,$role: String, $channelCriteria: AnyObject,$offset: Int, $limit: Int, $sort: Sort) {
|
|
49
|
-
getOrganizationMembers(offset: $offset, limit: $limit, orgName: $orgName) {
|
|
84
|
+
query GetOrganizationMembersWithChannels($orgId: ID, $orgName: String, $role: String, $channelCriteria: AnyObject, $offset: Int, $limit: Int, $sort: Sort) {
|
|
85
|
+
getOrganizationMembers(offset: $offset, limit: $limit, orgId: $orgId, orgName: $orgName) {
|
|
50
86
|
totalCount
|
|
51
87
|
data {
|
|
88
|
+
_id
|
|
52
89
|
userId
|
|
53
90
|
roles
|
|
91
|
+
inactive
|
|
92
|
+
orgName
|
|
93
|
+
crossCheckEmail
|
|
94
|
+
teamNames
|
|
95
|
+
lastVisited
|
|
96
|
+
isSelf
|
|
54
97
|
user {
|
|
55
98
|
id
|
|
56
99
|
givenName
|
|
@@ -59,11 +102,11 @@ query GetOrganizationMembersWithChannels($orgName: String,$role: String, $channe
|
|
|
59
102
|
username
|
|
60
103
|
email
|
|
61
104
|
alias
|
|
105
|
+
emailVerified
|
|
62
106
|
}
|
|
63
|
-
teamNames
|
|
64
107
|
}
|
|
65
|
-
|
|
66
|
-
|
|
108
|
+
}
|
|
109
|
+
channelsByUser(role: $role, criteria: $channelCriteria, limit: $limit, skip: $offset, sort: $sort) {
|
|
67
110
|
id
|
|
68
111
|
title
|
|
69
112
|
description
|
|
@@ -85,6 +128,6 @@ query GetOrganizationMembersWithChannels($orgName: String,$role: String, $channe
|
|
|
85
128
|
}
|
|
86
129
|
|
|
87
130
|
query GetOrganizationSharableLink($teamId: String) {
|
|
88
|
-
|
|
131
|
+
getOrganizationSharableLink(teamId: $teamId)
|
|
89
132
|
}
|
|
90
133
|
|
|
@@ -18,3 +18,7 @@ query GetPostThread($postThreadId: ID, $channelId: ID, $postParentId: ID, $role:
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
query ThreadMessagesCount($channelId: ID, $postParentId: ID, $role: String, $participantsIds: [String], $selectedFields: String, $isServiceThreads: Boolean) {
|
|
23
|
+
threadMessagesCount(channelId: $channelId, postParentId: $postParentId, role: $role, participantsIds: $participantsIds, selectedFields: $selectedFields, isServiceThreads: $isServiceThreads)
|
|
24
|
+
}
|
|
@@ -1,32 +1,82 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
query GetOrganizationTeam($orgName: String!, $
|
|
4
|
-
getTeam(orgName: $orgName,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
query GetOrganizationTeam($orgName: String!, $teamId: ID!) {
|
|
4
|
+
getTeam(orgName: $orgName, teamId: $teamId) {
|
|
5
|
+
id
|
|
6
|
+
name
|
|
7
|
+
title
|
|
8
|
+
description
|
|
9
|
+
tags
|
|
10
|
+
status
|
|
11
|
+
visibility
|
|
12
|
+
joinMethod
|
|
13
|
+
inviteCode
|
|
14
|
+
isCommunity
|
|
15
|
+
verificationLevel
|
|
16
|
+
defaultNotifications
|
|
17
|
+
guidelines
|
|
18
|
+
welcomeMessage
|
|
19
|
+
connectionId
|
|
20
|
+
metadata
|
|
21
|
+
createdAt
|
|
22
|
+
updatedAt
|
|
23
|
+
updatedBy {
|
|
24
|
+
id
|
|
25
|
+
email
|
|
26
|
+
username
|
|
27
|
+
givenName
|
|
28
|
+
familyName
|
|
29
|
+
picture
|
|
30
|
+
}
|
|
31
|
+
organization {
|
|
32
|
+
id
|
|
33
|
+
name
|
|
34
|
+
title
|
|
35
|
+
description
|
|
36
|
+
picture
|
|
37
|
+
}
|
|
38
|
+
parentTeam {
|
|
39
|
+
id
|
|
40
|
+
name
|
|
41
|
+
title
|
|
42
|
+
description
|
|
43
|
+
}
|
|
44
|
+
teamMembers:members {
|
|
45
|
+
id
|
|
46
|
+
roles
|
|
47
|
+
status
|
|
48
|
+
joinedAt
|
|
49
|
+
lastActiveAt
|
|
50
|
+
memberOrigin
|
|
51
|
+
connectionId
|
|
52
|
+
user {
|
|
53
|
+
id
|
|
54
|
+
email
|
|
55
|
+
username
|
|
56
|
+
givenName
|
|
57
|
+
familyName
|
|
58
|
+
picture
|
|
59
|
+
alias
|
|
60
|
+
emailVerified
|
|
61
|
+
}
|
|
62
|
+
orgMember {
|
|
63
|
+
id
|
|
64
|
+
email
|
|
65
|
+
displayName
|
|
66
|
+
roles
|
|
67
|
+
status
|
|
68
|
+
lastVisited
|
|
69
|
+
joinedAt
|
|
70
|
+
isBillingLeader
|
|
71
|
+
crossCheckEmail
|
|
72
|
+
}
|
|
73
|
+
originOrg {
|
|
74
|
+
id
|
|
75
|
+
name
|
|
76
|
+
title
|
|
77
|
+
description
|
|
78
|
+
picture
|
|
79
|
+
}
|
|
80
|
+
}
|
|
20
81
|
}
|
|
21
|
-
|
|
22
|
-
id
|
|
23
|
-
name
|
|
24
|
-
email
|
|
25
|
-
username
|
|
26
|
-
userId
|
|
27
|
-
status
|
|
28
|
-
role
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
82
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-file.hook.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-file.hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,gEAAgE,CAAC;
|
|
1
|
+
{"version":3,"file":"use-upload-file.hook.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-file.hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,gEAAgE,CAAC;AAGpH,eAAO,MAAM,aAAa,QAAO,UAAU,CAAC,OAAO,iBAAiB,CAkB9D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {useUploadFile as useUploadFile$1}from'@container-stack/file-info-client/lib/hooks/use-upload-file.js';import {useAttachUploadedFileToMessageMutation,useCreateMessageFileUploadLinkMutation}from'common/
|
|
1
|
+
import {useUploadFile as useUploadFile$1}from'@container-stack/file-info-client/lib/hooks/use-upload-file.js';import {useAttachUploadedFileToMessageMutation,useCreateMessageFileUploadLinkMutation}from'common/graphql';const useUploadFile = () => useUploadFile$1({
|
|
2
2
|
createUploadLink: {
|
|
3
3
|
name: 'createMessageFileUploadLink',
|
|
4
4
|
mutation: useCreateMessageFileUploadLinkMutation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-file.hook.js","sources":["../../src/hooks/use-upload-file.hook.ts"],"sourcesContent":[null],"names":["useBaseUploadFile"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-upload-file.hook.js","sources":["../../src/hooks/use-upload-file.hook.ts"],"sourcesContent":[null],"names":["useBaseUploadFile"],"mappings":"+NAGa,aAAa,GAAG,MACzBA,eAAiB,CAAC;AACd,EAAA,gBAAA,EAAgB;AACZ,IAAA,IAAA,EAAA,6BAAmC;AACnC,IAAA,QAAA,EAAA,sCAAgD;oBAChC,EAAA,CAAA,IAAG,EAAI,eAAa;cACxB,EAAA,KAAA,CAAE,OAAM,CAAA,IAAA,CAAO,GAAK,IAAE,CAAC,CAAC,OAAO,GAAE,IAAK,CAAC,IAAK;AACpD,MAAA,IAAA,OAAI,SAAgB,KAAA,QAAa,GAAA,SAAY,GAAA,EAAA;;AAEpD,GAAA;AACD,EAAA,gBAAA,EAAgB;AACZ,IAAA,IAAA,EAAA,6BAAmC;AACnC,IAAA,QAAA,EAAA,sCAAgD;oBAChC,EAAA,CAAA,IAAG,EAAI,eAAa;;AAEhC,MAAA,IAAA,OAAI,SAAgB,KAAA,QAAa,GAAA,SAAY,GAAA,EAAA;;AAEpD;AACJ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-file.hook.native.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-file.hook.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,uEAAuE,CAAC;
|
|
1
|
+
{"version":3,"file":"use-upload-file.hook.native.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-file.hook.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,uEAAuE,CAAC;AAG3H,eAAO,MAAM,aAAa,QAAO,UAAU,CAAC,OAAO,iBAAiB,CAkB9D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {useUploadFile as useUploadFile$1}from'@container-stack/file-info-client/lib/hooks/use-file-upload.native.js';import {useAttachUploadedFileToMessageMutation,useCreateMessageFileUploadLinkMutation}from'common/
|
|
1
|
+
import {useUploadFile as useUploadFile$1}from'@container-stack/file-info-client/lib/hooks/use-file-upload.native.js';import {useAttachUploadedFileToMessageMutation,useCreateMessageFileUploadLinkMutation}from'common/graphql';const useUploadFile = () => useUploadFile$1({
|
|
2
2
|
createUploadLink: {
|
|
3
3
|
name: 'createMessageFileUploadLink',
|
|
4
4
|
mutation: useCreateMessageFileUploadLinkMutation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-file.hook.native.js","sources":["../../src/hooks/use-upload-file.hook.native.ts"],"sourcesContent":[null],"names":["useBaseUploadFile"],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-upload-file.hook.native.js","sources":["../../src/hooks/use-upload-file.hook.native.ts"],"sourcesContent":[null],"names":["useBaseUploadFile"],"mappings":"sOAGa,aAAa,GAAG,MACzBA,eAAiB,CAAC;AACd,EAAA,gBAAA,EAAgB;AACZ,IAAA,IAAA,EAAA,6BAAmC;AACnC,IAAA,QAAA,EAAA,sCAAgD;oBAChC,EAAA,CAAA,IAAG,EAAI,eAAa;cACxB,EAAA,KAAA,CAAE,OAAM,CAAA,IAAA,CAAO,GAAK,IAAE,CAAC,CAAC,OAAO,GAAE,IAAK,CAAC,IAAK;AACpD,MAAA,IAAA,OAAI,SAAgB,KAAA,QAAa,GAAA,SAAY,GAAA,EAAA;;AAEpD,GAAA;AACD,EAAA,gBAAA,EAAgB;AACZ,IAAA,IAAA,EAAA,6BAAmC;AACnC,IAAA,QAAA,EAAA,sCAAgD;oBAChC,EAAA,CAAA,IAAG,EAAI,eAAa;;AAEhC,MAAA,IAAA,OAAI,SAAgB,KAAA,QAAa,GAAA,SAAY,GAAA,EAAA;;AAEpD;AACJ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-files.hook.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-files.hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gEAAgE,CAAC;
|
|
1
|
+
{"version":3,"file":"use-upload-files.hook.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-files.hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gEAAgE,CAAC;AAG/F,eAAO,MAAM,cAAc,QAAO,UAAU,CAAC,OAAO,aAAa,CAkB3D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {useUploadFile}from'@container-stack/file-info-client/lib/hooks/use-upload-file.js';import {useAttachUploadedFilesToMessageMutation,useCreateMessageFilesUploadLinkMutation}from'common/
|
|
1
|
+
import {useUploadFile}from'@container-stack/file-info-client/lib/hooks/use-upload-file.js';import {useAttachUploadedFilesToMessageMutation,useCreateMessageFilesUploadLinkMutation}from'common/graphql';const useUploadFiles = () => useUploadFile({
|
|
2
2
|
createUploadLink: {
|
|
3
3
|
name: 'createMessageFilesUploadLink',
|
|
4
4
|
mutation: useCreateMessageFilesUploadLinkMutation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-files.hook.js","sources":["../../src/hooks/use-upload-files.hook.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-upload-files.hook.js","sources":["../../src/hooks/use-upload-files.hook.ts"],"sourcesContent":[null],"names":[],"mappings":"8MAGa,cAAc,GAAG,MAC1B,aAAa,CAAC;AACV,EAAA,gBAAA,EAAgB;AACZ,IAAA,IAAA,EAAA,8BAAoC;AACpC,IAAA,QAAA,EAAA,uCAAiD;oBACjC,EAAA,CAAA,KAAQ,EAAA,eAAa;AACjC,MAAA,SAAA,EAAA,KAAW,CAAA,OAAM,CAAA,KAAO,CAAC,GAAA,KAAQ,CAAC,GAAK,CAAA,QAAU,IAAA,CAAE,IAAO,CAAA,GAAC,CAAI,KAAE,CAAC,IAAO,CAAA;AACzE,MAAA,IAAA,OAAI,SAAgB,KAAA,QAAa,GAAA,SAAY,GAAA,EAAA;;AAEpD,GAAA;AACD,EAAA,gBAAA,EAAgB;AACZ,IAAA,IAAA,EAAA,8BAAoC;AACpC,IAAA,QAAA,EAAA,uCAAiD;oBACjC,EAAA,CAAA,KAAQ,EAAA,eAAa;;AAEjC,MAAA,IAAA,OAAI,SAAgB,KAAA,QAAa,GAAA,SAAY,GAAA,EAAA;;AAEpD;AACJ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-files.hook.native.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-files.hook.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uEAAuE,CAAC;
|
|
1
|
+
{"version":3,"file":"use-upload-files.hook.native.d.ts","sourceRoot":"","sources":["../../src/hooks/use-upload-files.hook.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uEAAuE,CAAC;AAGtG,eAAO,MAAM,cAAc,QAAO,UAAU,CAAC,OAAO,aAAa,CAkB3D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {useUploadFile}from'@container-stack/file-info-client/lib/hooks/use-file-upload.native.js';import {useAttachUploadedFilesToMessageMutation,useCreateMessageFilesUploadLinkMutation}from'common/
|
|
1
|
+
import {useUploadFile}from'@container-stack/file-info-client/lib/hooks/use-file-upload.native.js';import {useAttachUploadedFilesToMessageMutation,useCreateMessageFilesUploadLinkMutation}from'common/graphql';const useUploadFiles = () => useUploadFile({
|
|
2
2
|
createUploadLink: {
|
|
3
3
|
name: 'createMessageFilesUploadLink',
|
|
4
4
|
mutation: useCreateMessageFilesUploadLinkMutation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-upload-files.hook.native.js","sources":["../../src/hooks/use-upload-files.hook.native.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-upload-files.hook.native.js","sources":["../../src/hooks/use-upload-files.hook.native.ts"],"sourcesContent":[null],"names":[],"mappings":"qNAGa,cAAc,GAAG,MAC1B,aAAa,CAAC;AACV,EAAA,gBAAA,EAAgB;AACZ,IAAA,IAAA,EAAA,8BAAoC;AACpC,IAAA,QAAA,EAAA,uCAAiD;oBACjC,EAAA,CAAA,KAAQ,EAAA,eAAa;AACjC,MAAA,SAAA,EAAA,KAAW,CAAA,OAAM,CAAA,KAAO,CAAC,GAAA,KAAQ,CAAC,GAAK,CAAA,QAAU,IAAA,CAAE,IAAO,CAAA,GAAC,CAAI,KAAE,CAAC,IAAO,CAAA;AACzE,MAAA,IAAA,OAAI,SAAgB,KAAA,QAAa,GAAA,SAAY,GAAA,EAAA;;AAEpD,GAAA;AACD,EAAA,gBAAA,EAAgB;AACZ,IAAA,IAAA,EAAA,8BAAoC;AACpC,IAAA,QAAA,EAAA,uCAAiD;oBACjC,EAAA,CAAA,KAAQ,EAAA,eAAa;;AAEjC,MAAA,IAAA,OAAI,SAAgB,KAAA,QAAa,GAAA,SAAY,GAAA,EAAA;;AAEpD;AACJ,CAAA"}
|