@jsb188/graphql 1.1.11 → 1.1.13
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/LICENSE +21 -0
- package/audience.d.ts +205 -0
- package/cache/config.ts +65 -28
- package/cache/index.helpers.ts +96 -0
- package/cache/index.ts +364 -808
- package/cache/mounted-queries.ts +33 -0
- package/cache/optimistic-ui-runtime.ts +46 -0
- package/cache/optimistic-ui.ts +401 -0
- package/cache/persist.ts +107 -22
- package/cache/realtime-fence.ts +47 -0
- package/cache/realtime-live.ts +17 -0
- package/cache/store.ts +22 -64
- package/cache/value.helpers.ts +17 -0
- package/{drafts/store.ts → client/draft-persistence-indexed-db.ts} +19 -3
- package/{drafts/index.ts → client/draft-persistence.ts} +13 -39
- package/client/index.ts +4 -2
- package/client/request.helpers.ts +14 -0
- package/client/request.ts +122 -232
- package/client/storage-asset.ts +58 -0
- package/gql/fragments/accountAuthFragments.ts +0 -4
- package/gql/fragments/agentMemoryFragments.ts +5 -1
- package/gql/fragments/agentNoteFragments.ts +156 -0
- package/gql/fragments/aiChatFragments.ts +35 -11
- package/gql/fragments/aiChatLinkFragments.ts +8 -0
- package/gql/fragments/audienceFragments.ts +76 -0
- package/gql/fragments/dataTableFragments.ts +48 -80
- package/gql/fragments/emailFragments.ts +49 -21
- package/gql/fragments/emailOutreachFragments.ts +281 -0
- package/gql/fragments/fieldDocFragments.ts +222 -40
- package/gql/fragments/inboundContactFragments.ts +2 -0
- package/gql/fragments/libraryFragments.ts +120 -0
- package/gql/fragments/logFragments.ts +93 -2
- package/gql/fragments/organizationFragments.ts +12 -0
- package/gql/fragments/qrCodeFragments.ts +29 -0
- package/gql/fragments/scheduleFragments.ts +574 -145
- package/gql/fragments/sheetFragments.ts +86 -424
- package/gql/fragments/storageFragments.ts +25 -1
- package/gql/fragments/workWaitFragments.ts +13 -0
- package/gql/fragments/workflowFragments.ts +32 -4
- package/gql/mutations/agentMemoryMutations.ts +32 -0
- package/gql/mutations/agentNoteMutations.ts +64 -0
- package/gql/mutations/aiChatLinkMutations.ts +13 -0
- package/gql/mutations/aiChatMutations.ts +34 -4
- package/gql/mutations/audienceMutations.ts +58 -0
- package/gql/mutations/authMutations.ts +24 -28
- package/gql/mutations/billingMutations.ts +24 -0
- package/gql/mutations/contactMutations.ts +23 -0
- package/gql/mutations/dataTableMutations.ts +18 -75
- package/gql/mutations/emailMutations.ts +22 -0
- package/gql/mutations/emailOutreachMutations.ts +139 -0
- package/gql/mutations/fieldDocMutations.ts +162 -13
- package/gql/mutations/index.ts +10 -5
- package/gql/mutations/organizationMutations.ts +6 -0
- package/gql/mutations/qrCodeMutations.ts +20 -0
- package/gql/mutations/scheduleMutations.ts +389 -417
- package/gql/mutations/sheetMutations.ts +62 -118
- package/gql/mutations/storageMutations.ts +1 -1
- package/gql/mutations/workflowMutations.ts +94 -0
- package/gql/queries/agentMemoryQueries.ts +12 -2
- package/gql/queries/agentNoteQueries.ts +86 -0
- package/gql/queries/aiChatQueries.ts +63 -12
- package/gql/queries/audienceQueries.ts +104 -0
- package/gql/queries/authQueries.ts +20 -4
- package/gql/queries/billingQueries.ts +114 -9
- package/gql/queries/dataTableQueries.ts +43 -75
- package/gql/queries/emailOutreachQueries.ts +282 -0
- package/gql/queries/emailQueries.ts +48 -64
- package/gql/queries/emailReplyReportQueries.ts +127 -0
- package/gql/queries/fieldDocQueries.ts +128 -98
- package/gql/queries/inboundContactQueries.ts +15 -4
- package/gql/queries/index.ts +5 -3
- package/gql/queries/libraryQueries.ts +112 -0
- package/gql/queries/logQueries.ts +86 -12
- package/gql/queries/organizationQueries.ts +44 -12
- package/gql/queries/qrCodeQueries.ts +27 -0
- package/gql/queries/scheduleQueries.ts +401 -278
- package/gql/queries/sheetQueries.ts +94 -165
- package/gql/queries/storageQueries.ts +11 -4
- package/gql/queries/workflowQueries.ts +61 -12
- package/gql/reactivity.ts +98 -0
- package/gql/recordReads.ts +171 -0
- package/hooks/index.helpers.ts +52 -0
- package/hooks/index.ts +920 -715
- package/hooks/use-agentMemory-mtn.ts +29 -31
- package/hooks/use-agentMemory-qry.ts +15 -3
- package/hooks/use-agentNote-mtn.ts +89 -0
- package/hooks/use-agentNote-qry.ts +162 -0
- package/hooks/use-agentNote-recovery.helpers.ts +58 -0
- package/hooks/use-agentNote-recovery.ts +57 -0
- package/hooks/use-aiChat-mtn.ts +104 -115
- package/hooks/use-aiChat-qry.helpers.ts +124 -0
- package/hooks/use-aiChat-qry.ts +254 -387
- package/hooks/use-aiChat-stream-mtn.ts +14 -0
- package/hooks/use-audience-mtn.ts +170 -0
- package/hooks/use-audience-qry.helpers.ts +39 -0
- package/hooks/use-audience-qry.ts +245 -0
- package/hooks/use-auth-mtn.ts +30 -1
- package/hooks/use-billing-mtn.ts +31 -0
- package/hooks/use-billing-qry.ts +76 -0
- package/hooks/use-dataTable-mtn.ts +23 -115
- package/hooks/use-dataTable-qry.ts +69 -914
- package/hooks/use-email-mtn.ts +26 -0
- package/hooks/use-email-qry.helpers.ts +37 -0
- package/hooks/use-email-qry.ts +44 -174
- package/hooks/use-emailOutreach-mtn.ts +211 -0
- package/hooks/use-emailOutreach-qry.helpers.ts +25 -0
- package/hooks/use-emailOutreach-qry.ts +367 -0
- package/hooks/use-emailOutreachReplyReport-qry.ts +46 -0
- package/hooks/use-fieldDoc-mtn.ts +244 -32
- package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
- package/hooks/use-fieldDoc-qry.ts +134 -102
- package/hooks/use-inboundContact-qry.ts +7 -9
- package/hooks/use-library-qry.ts +233 -0
- package/hooks/use-log-mtn.ts +25 -12
- package/hooks/use-log-qry.ts +99 -46
- package/hooks/use-organization-qry.ts +16 -60
- package/hooks/use-qrCode-mtn.ts +40 -0
- package/hooks/use-qrCode-qry.ts +78 -0
- package/hooks/use-schedule-mtn.ts +231 -348
- package/hooks/use-schedule-qry.ts +208 -139
- package/hooks/use-schedule-reactive.ts +218 -0
- package/hooks/use-sheet-mtn.ts +91 -199
- package/hooks/use-sheet-qry.ts +88 -237
- package/hooks/use-storage-qry.ts +84 -61
- package/hooks/use-workflow-mtn.ts +84 -23
- package/hooks/use-workflow-qry.ts +60 -61
- package/libs/ai-chat-link-events.ts +78 -0
- package/libs/ai-chat-outgoing.helpers.ts +153 -0
- package/libs/ai-chat-outgoing.ts +11 -0
- package/libs/ai-chat-outgoing.types.ts +25 -0
- package/libs/ai-chat-run-realtime.ts +20 -0
- package/libs/ai-chat-submission-realtime.ts +150 -0
- package/libs/data-changes.helpers.ts +161 -0
- package/libs/data-changes.ts +382 -0
- package/libs/fragment-realtime-sequence.ts +55 -0
- package/libs/open-sheet.ts +138 -0
- package/libs/record-read.ts +327 -0
- package/libs/sheet-command-batch.ts +45 -0
- package/libs/sheet-realtime-packet.ts +53 -0
- package/libs/sheet-view-realtime-router.ts +99 -0
- package/loaders/emailPreference.ts +69 -0
- package/loaders/rest.ts +12 -0
- package/package.json +77 -25
- package/schedule.d.ts +1183 -0
- package/sse.helpers.ts +19 -0
- package/sse.ts +26 -115
- package/types.d.ts +48 -25
- package/cache/index.test.ts +0 -881
- package/client/data-table-realtime-subscriptions.test.ts +0 -740
- package/client/data-table-realtime-subscriptions.ts +0 -955
- package/client/data-table-realtime.test.ts +0 -792
- package/client/data-table-realtime.ts +0 -1218
- package/client/fragment-realtime-sequence.ts +0 -52
- package/client/open-sheet.ts +0 -137
- package/client/request-managed-session.test.ts +0 -574
- package/client/request-no-store.test.ts +0 -157
- package/client/sse-ticket.test.ts +0 -26
- package/deno.lock +0 -170
- package/deno.test.json +0 -10
- package/gql/fragments/agentDocFragments.ts +0 -46
- package/gql/fragments/billingFragments.ts +0 -14
- package/gql/fragments/campaignFragments.ts +0 -277
- package/gql/mutations/agentDocMutations.ts +0 -177
- package/gql/mutations/campaignMutations.ts +0 -215
- package/gql/queries/agentDocQueries.ts +0 -120
- package/gql/queries/appQueries.ts +0 -14
- package/gql/queries/campaignQueries.ts +0 -127
- package/hooks/use-agentDoc-mtn.ts +0 -285
- package/hooks/use-agentDoc-qry.ts +0 -208
- package/hooks/use-app-qry.ts +0 -22
- package/hooks/use-campaign-mtn.ts +0 -377
- package/hooks/use-campaign-qry.ts +0 -257
- package/loaders/campaign.ts +0 -137
- package/tsconfig.json +0 -13
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { makeSecureAssetsUrl } from '@jsb188/app/utils/url_client.ts';
|
|
2
|
+
import { getAuthToken, getStorageToken, managedAccessTokensShareBinding } from '@jsb188/app/utils/api.ts';
|
|
3
|
+
import { refreshBrowserAccessToken } from './request.ts';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Accept private library object URLs only on the configured assets origin.
|
|
7
|
+
* Cached signed URLs and redirects must never receive a managed storage credential.
|
|
8
|
+
*/
|
|
9
|
+
export function isLibraryAssetUrl(value: string): boolean {
|
|
10
|
+
return Boolean(makeSecureAssetsUrl(value));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Fetch protected bytes with the current storage credential. Share a single session
|
|
15
|
+
* renewal with other images, GraphQL and sockets, and retry an expired bearer once.
|
|
16
|
+
*/
|
|
17
|
+
export async function fetchLibraryAsset(path: string, signal: AbortSignal) {
|
|
18
|
+
const url = makeSecureAssetsUrl(path);
|
|
19
|
+
if (!url) throw new Error('Invalid library asset URL');
|
|
20
|
+
const accessToken = getAuthToken();
|
|
21
|
+
if (!accessToken) throw new Error('20900');
|
|
22
|
+
const storageToken = getStorageToken();
|
|
23
|
+
/* Send only the storage credential, including on the retry. */
|
|
24
|
+
const read = (token: string) =>
|
|
25
|
+
fetch(url, {
|
|
26
|
+
headers: { Authorization: 'Bearer ' + token },
|
|
27
|
+
cache: 'no-store',
|
|
28
|
+
credentials: 'omit',
|
|
29
|
+
redirect: 'error',
|
|
30
|
+
referrerPolicy: 'no-referrer',
|
|
31
|
+
signal,
|
|
32
|
+
});
|
|
33
|
+
let response = storageToken ? await read(storageToken) : null;
|
|
34
|
+
if (!response || response.status === 401) {
|
|
35
|
+
await response?.body?.cancel();
|
|
36
|
+
signal.throwIfAborted();
|
|
37
|
+
if (!managedAccessTokensShareBinding(accessToken, getAuthToken() || '')) throw new Error('Storage session changed');
|
|
38
|
+
// A delayed 401 may arrive after another thumbnail has already replaced this bearer.
|
|
39
|
+
if (!getStorageToken() || getStorageToken() === storageToken) {
|
|
40
|
+
const refresh = await refreshBrowserAccessToken(accessToken);
|
|
41
|
+
if (refresh.status !== 'REFRESHED') throw new Error('Storage session unavailable');
|
|
42
|
+
}
|
|
43
|
+
signal.throwIfAborted();
|
|
44
|
+
const renewed = getStorageToken();
|
|
45
|
+
if (!renewed || !managedAccessTokensShareBinding(accessToken, getAuthToken() || ''))
|
|
46
|
+
throw new Error('Storage session unavailable');
|
|
47
|
+
response = await read(renewed);
|
|
48
|
+
}
|
|
49
|
+
if (!response.ok) {
|
|
50
|
+
await response.body?.cancel();
|
|
51
|
+
throw new Error(response.status === 404 || response.status === 403 ? '20900' : 'Storage request failed');
|
|
52
|
+
}
|
|
53
|
+
const blob = await response.blob();
|
|
54
|
+
signal.throwIfAborted();
|
|
55
|
+
if (!managedAccessTokensShareBinding(accessToken, getAuthToken() || '')) throw new Error('Storage session changed');
|
|
56
|
+
const encodedName = response.headers.get('Content-Disposition')?.match(/filename\*=UTF-8''([^;]+)/i)?.[1];
|
|
57
|
+
return { blob, filename: encodedName ? decodeURIComponent(encodedName) : undefined };
|
|
58
|
+
}
|
|
@@ -2,17 +2,21 @@ export const agentMemoryFragment = `fragment agentMemoryFragment on AgentMemory
|
|
|
2
2
|
id
|
|
3
3
|
organizationId
|
|
4
4
|
scope
|
|
5
|
+
accountId
|
|
6
|
+
accountName
|
|
7
|
+
counterpartyId
|
|
8
|
+
inboundContactId
|
|
5
9
|
category
|
|
6
10
|
content
|
|
7
11
|
status
|
|
8
12
|
permanent
|
|
9
13
|
observedCount
|
|
10
14
|
surface
|
|
11
|
-
surfaceKey
|
|
12
15
|
createdVia
|
|
13
16
|
createdByName
|
|
14
17
|
counterpartyName
|
|
15
18
|
sourceMessageId
|
|
19
|
+
sourceInboundEmailId
|
|
16
20
|
expiresAt
|
|
17
21
|
createdAt
|
|
18
22
|
updatedAt
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { linkedEntitySummaryFields } from './aiChatLinkFragments.ts';
|
|
2
|
+
// The list and detail projections share this normalized cache identity.
|
|
3
|
+
// Realtime fragments update shared note content and metadata; viewer-specific
|
|
4
|
+
// canManage and canPin permissions remain supplied by authorized GraphQL reads.
|
|
5
|
+
// priority is the effective homepage priority computed when the note was read;
|
|
6
|
+
// the client uses it only to restore homepage order after a fragment change.
|
|
7
|
+
// resultBlocks are the server-rendered saved query results shown below the
|
|
8
|
+
// body; ownedDataTableId is the listed table an INSIGHT note links to.
|
|
9
|
+
export const agentNoteFragment = `fragment agentNoteFragment on AgentNote {
|
|
10
|
+
id
|
|
11
|
+
organizationId
|
|
12
|
+
kind
|
|
13
|
+
canManage
|
|
14
|
+
canRefreshWithoutCooldown
|
|
15
|
+
canPin
|
|
16
|
+
emailOutreachId
|
|
17
|
+
fieldDocId
|
|
18
|
+
fieldDocProgramId
|
|
19
|
+
reminderWorkflowId
|
|
20
|
+
emoji
|
|
21
|
+
title
|
|
22
|
+
headline
|
|
23
|
+
focus
|
|
24
|
+
needsAttention
|
|
25
|
+
pinned
|
|
26
|
+
importance
|
|
27
|
+
priority
|
|
28
|
+
archivedAt
|
|
29
|
+
archiveReason
|
|
30
|
+
publishedAt
|
|
31
|
+
dataChangedAt
|
|
32
|
+
refreshing
|
|
33
|
+
refreshAvailableAt
|
|
34
|
+
refreshedAt
|
|
35
|
+
refreshOutcome {
|
|
36
|
+
lastAttempt {
|
|
37
|
+
status
|
|
38
|
+
completedAt
|
|
39
|
+
error
|
|
40
|
+
}
|
|
41
|
+
published {
|
|
42
|
+
status
|
|
43
|
+
completedAt
|
|
44
|
+
truncated
|
|
45
|
+
queries {
|
|
46
|
+
total
|
|
47
|
+
succeeded
|
|
48
|
+
failed
|
|
49
|
+
errors {
|
|
50
|
+
name
|
|
51
|
+
code
|
|
52
|
+
message
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
resultBlocks {
|
|
58
|
+
name
|
|
59
|
+
title
|
|
60
|
+
display
|
|
61
|
+
markdown
|
|
62
|
+
computedAt
|
|
63
|
+
timeZone
|
|
64
|
+
shownCount
|
|
65
|
+
matchedCount
|
|
66
|
+
dataTableId
|
|
67
|
+
truncated
|
|
68
|
+
error
|
|
69
|
+
}
|
|
70
|
+
ownedDataTableId
|
|
71
|
+
createdAt
|
|
72
|
+
updatedAt
|
|
73
|
+
}`;
|
|
74
|
+
|
|
75
|
+
// Full note for its detail view. PARTIALS_MAP stores it under the same cache
|
|
76
|
+
// identity as agentNoteFragment. Links have no id, so they stay inline.
|
|
77
|
+
export const agentNoteDetailFragment = `fragment agentNoteDetailFragment on AgentNote {
|
|
78
|
+
id
|
|
79
|
+
organizationId
|
|
80
|
+
kind
|
|
81
|
+
canManage
|
|
82
|
+
canRefreshWithoutCooldown
|
|
83
|
+
canPin
|
|
84
|
+
emailOutreachId
|
|
85
|
+
fieldDocId
|
|
86
|
+
fieldDocProgramId
|
|
87
|
+
reminderWorkflowId
|
|
88
|
+
emoji
|
|
89
|
+
title
|
|
90
|
+
headline
|
|
91
|
+
body
|
|
92
|
+
focus
|
|
93
|
+
focusUpdatedAt
|
|
94
|
+
needsAttention
|
|
95
|
+
pinned
|
|
96
|
+
importance
|
|
97
|
+
priority
|
|
98
|
+
archivedAt
|
|
99
|
+
archiveReason
|
|
100
|
+
lastReadAt
|
|
101
|
+
retainedAt
|
|
102
|
+
publishedAt
|
|
103
|
+
dataChangedAt
|
|
104
|
+
refreshing
|
|
105
|
+
refreshAvailableAt
|
|
106
|
+
refreshedAt
|
|
107
|
+
refreshOutcome {
|
|
108
|
+
lastAttempt {
|
|
109
|
+
status
|
|
110
|
+
completedAt
|
|
111
|
+
error
|
|
112
|
+
}
|
|
113
|
+
published {
|
|
114
|
+
status
|
|
115
|
+
completedAt
|
|
116
|
+
truncated
|
|
117
|
+
queries {
|
|
118
|
+
total
|
|
119
|
+
succeeded
|
|
120
|
+
failed
|
|
121
|
+
errors {
|
|
122
|
+
name
|
|
123
|
+
code
|
|
124
|
+
message
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
resultBlocks {
|
|
130
|
+
name
|
|
131
|
+
title
|
|
132
|
+
display
|
|
133
|
+
markdown
|
|
134
|
+
computedAt
|
|
135
|
+
timeZone
|
|
136
|
+
shownCount
|
|
137
|
+
matchedCount
|
|
138
|
+
dataTableId
|
|
139
|
+
truncated
|
|
140
|
+
error
|
|
141
|
+
}
|
|
142
|
+
ownedDataTableId
|
|
143
|
+
createdAt
|
|
144
|
+
updatedAt
|
|
145
|
+
links {
|
|
146
|
+
linkedFrom
|
|
147
|
+
linkedFromAIChatId
|
|
148
|
+
entity { ${linkedEntitySummaryFields} }
|
|
149
|
+
entityType
|
|
150
|
+
entityId
|
|
151
|
+
watch
|
|
152
|
+
owned
|
|
153
|
+
title
|
|
154
|
+
fieldDocProgramId
|
|
155
|
+
}
|
|
156
|
+
}`;
|
|
@@ -1,37 +1,61 @@
|
|
|
1
1
|
export const aiChatFragment = `fragment aiChatFragment on AIChat {
|
|
2
2
|
id
|
|
3
3
|
organizationId
|
|
4
|
+
agentNoteId
|
|
4
5
|
accountId
|
|
5
6
|
calDate
|
|
6
7
|
summary
|
|
7
|
-
userManagedSummary
|
|
8
8
|
archivedAt
|
|
9
9
|
createdAt
|
|
10
10
|
updatedAt
|
|
11
|
+
activityOrder
|
|
11
12
|
}`;
|
|
12
13
|
|
|
14
|
+
// Note: Normally "...fragment" spread inside a a fragment spread is forbidden;
|
|
15
|
+
// But this is the only way we can get file attachments to show properly.
|
|
13
16
|
export const aiChatMessageFragment = `fragment aiChatMessageFragment on AIChatMessage {
|
|
14
17
|
id
|
|
18
|
+
clientRequestId
|
|
15
19
|
accountId
|
|
16
20
|
type
|
|
17
21
|
cursor
|
|
18
22
|
text
|
|
19
23
|
photoUri
|
|
24
|
+
runId
|
|
25
|
+
sequence
|
|
26
|
+
run {
|
|
27
|
+
id
|
|
28
|
+
sourceMessageIds
|
|
29
|
+
status
|
|
30
|
+
inProgress
|
|
31
|
+
createdAt
|
|
32
|
+
claimedAt
|
|
33
|
+
finishedAt
|
|
34
|
+
updatedAt
|
|
35
|
+
}
|
|
36
|
+
phase
|
|
37
|
+
generationStatus
|
|
38
|
+
revision
|
|
39
|
+
updatedAt
|
|
20
40
|
finished
|
|
41
|
+
errorType
|
|
21
42
|
at
|
|
43
|
+
qrCodes
|
|
22
44
|
attachments {
|
|
23
45
|
ordinal
|
|
24
46
|
file {
|
|
25
|
-
|
|
26
|
-
uri
|
|
27
|
-
size
|
|
28
|
-
contentType
|
|
29
|
-
at
|
|
30
|
-
intent
|
|
31
|
-
name
|
|
32
|
-
description
|
|
33
|
-
aiNote
|
|
34
|
-
uploadStatus
|
|
47
|
+
...storageFileFragment
|
|
35
48
|
}
|
|
36
49
|
}
|
|
37
50
|
}`;
|
|
51
|
+
|
|
52
|
+
export const aiChatRunFragment = `fragment aiChatRunFragment on AIChatRun {
|
|
53
|
+
id
|
|
54
|
+
sourceMessageIds
|
|
55
|
+
status
|
|
56
|
+
inProgress
|
|
57
|
+
createdAt
|
|
58
|
+
claimedAt
|
|
59
|
+
finishedAt
|
|
60
|
+
updatedAt
|
|
61
|
+
}`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Summary values have no cache id; reuse the complete selection inline in each containing fragment.
|
|
2
|
+
export const linkedEntitySummaryFields = `
|
|
3
|
+
entityType entityId title archived deleted canEdit fieldDocProgramId workflowActive workflowKind workflowPublished hasDraft fileName fileContentType emailOutreachStatus logActivityKey logActivityGroupKey
|
|
4
|
+
`;
|
|
5
|
+
export const aiChatLinkFragment = `fragment aiChatLinkFragment on AIChatLink {
|
|
6
|
+
id aiChatId organizationId entityType entityId sheetTabId createdInChat lastAction touchCount firstRunId lastRunId lastTouchedAt hiddenAt noteLinkState
|
|
7
|
+
entity { ${linkedEntitySummaryFields} }
|
|
8
|
+
}`;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Reusable list metadata; each list has its own cache identity.
|
|
3
|
+
*/
|
|
4
|
+
export const audienceListFragment = `fragment audienceListFragment on AudienceList {
|
|
5
|
+
id
|
|
6
|
+
cursor
|
|
7
|
+
organizationId
|
|
8
|
+
name
|
|
9
|
+
description
|
|
10
|
+
archivedAt
|
|
11
|
+
editVersion
|
|
12
|
+
createdByAccountId
|
|
13
|
+
createdAt
|
|
14
|
+
updatedAt
|
|
15
|
+
}`;
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* Current organization preference and delivery health for one immutable address.
|
|
19
|
+
*/
|
|
20
|
+
export const audienceEmailAddressFragment = `fragment audienceEmailAddressFragment on AudienceEmailAddress {
|
|
21
|
+
id
|
|
22
|
+
organizationId
|
|
23
|
+
normalizedEmail
|
|
24
|
+
inboundContactId
|
|
25
|
+
campaignStatus
|
|
26
|
+
campaignStatusAt
|
|
27
|
+
deliveryStatus
|
|
28
|
+
deliveryStatusAt
|
|
29
|
+
cleanedReason
|
|
30
|
+
lastDeliveredAt
|
|
31
|
+
lastBounceAt
|
|
32
|
+
consecutiveSoftBounceCount
|
|
33
|
+
complaintSuppressedAt
|
|
34
|
+
manuallySuppressedAt
|
|
35
|
+
details
|
|
36
|
+
createdAt
|
|
37
|
+
updatedAt
|
|
38
|
+
}`;
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
* Membership state excludes nested spreads so callers explicitly select address health.
|
|
42
|
+
*/
|
|
43
|
+
export const audienceListMemberFragment = `fragment audienceListMemberFragment on AudienceListMember {
|
|
44
|
+
id
|
|
45
|
+
cursor
|
|
46
|
+
organizationId
|
|
47
|
+
audienceListId
|
|
48
|
+
emailAddressId
|
|
49
|
+
subscriptionStatus
|
|
50
|
+
subscriptionStatusAt
|
|
51
|
+
subscriptionVersion
|
|
52
|
+
removedAt
|
|
53
|
+
details
|
|
54
|
+
createdAt
|
|
55
|
+
updatedAt
|
|
56
|
+
}`;
|
|
57
|
+
|
|
58
|
+
/*
|
|
59
|
+
* Append-only audience history, including migrated preference events.
|
|
60
|
+
*/
|
|
61
|
+
export const audienceEventFragment = `fragment audienceEventFragment on AudienceEvent {
|
|
62
|
+
id
|
|
63
|
+
organizationId
|
|
64
|
+
normalizedEmail
|
|
65
|
+
emailAddressId
|
|
66
|
+
audienceListId
|
|
67
|
+
audienceListMemberId
|
|
68
|
+
eventType
|
|
69
|
+
source
|
|
70
|
+
actorAccountId
|
|
71
|
+
emailOutreachId
|
|
72
|
+
outboundEmailId
|
|
73
|
+
metadata
|
|
74
|
+
occurredAt
|
|
75
|
+
createdAt
|
|
76
|
+
}`;
|
|
@@ -1,102 +1,70 @@
|
|
|
1
|
+
// The one DataTable fragment: every listing, detail and mutation selects it,
|
|
2
|
+
// and the server's $dataTableFragment realtime updates patch it.
|
|
1
3
|
export const dataTableFragment = `fragment dataTableFragment on DataTable {
|
|
2
4
|
id
|
|
3
5
|
cursor
|
|
4
6
|
organizationId
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
kind
|
|
9
|
+
source
|
|
7
10
|
title
|
|
8
11
|
description
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
rowCount
|
|
13
|
+
revision
|
|
14
|
+
syncState
|
|
15
|
+
syncError
|
|
16
|
+
syncedAt
|
|
17
|
+
derivePausedAt
|
|
18
|
+
derivePauseReason
|
|
19
|
+
canManage
|
|
20
|
+
archivedAt
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cells {
|
|
22
|
-
key
|
|
23
|
-
label
|
|
24
|
-
humanLabel
|
|
25
|
-
iconName
|
|
26
|
-
fieldType
|
|
27
|
-
format
|
|
28
|
-
instructions
|
|
29
|
-
openLink
|
|
30
|
-
humansOnly
|
|
31
|
-
humansCannotEdit
|
|
32
|
-
hidden
|
|
33
|
-
indexed
|
|
34
|
-
width
|
|
22
|
+
columns {
|
|
23
|
+
key
|
|
24
|
+
label
|
|
25
|
+
type
|
|
26
|
+
origin
|
|
27
|
+
unit
|
|
28
|
+
currency
|
|
29
|
+
retired
|
|
30
|
+
}
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
coverageWarnings {
|
|
33
|
+
code
|
|
34
|
+
columnKey
|
|
35
|
+
message
|
|
36
|
+
}
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
}
|
|
38
|
+
ownerNote {
|
|
39
|
+
id
|
|
40
|
+
headline
|
|
41
|
+
emoji
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
createdAt
|
|
50
45
|
updatedAt
|
|
51
46
|
}`;
|
|
52
47
|
|
|
53
|
-
export const dataTablePartialFragment = `fragment dataTablePartialFragment on DataTable {
|
|
54
|
-
id
|
|
55
|
-
name
|
|
56
|
-
title
|
|
57
|
-
description
|
|
58
|
-
deletedAt
|
|
59
|
-
}`;
|
|
60
|
-
|
|
61
|
-
export const dataTableMetadataFragment = `fragment dataTableMetadataFragment on DataTableMetadata {
|
|
62
|
-
id
|
|
63
|
-
name
|
|
64
|
-
title
|
|
65
|
-
description
|
|
66
|
-
}`;
|
|
67
|
-
|
|
68
48
|
export const dataTableRowFragment = `fragment dataTableRowFragment on DataTableRow {
|
|
69
49
|
id
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
key
|
|
51
|
+
cells
|
|
52
|
+
sourceReadableId
|
|
53
|
+
derivePending
|
|
54
|
+
deriveError
|
|
55
|
+
changedAt
|
|
76
56
|
}`;
|
|
77
57
|
|
|
78
|
-
export const
|
|
58
|
+
export const dataTableRunFragment = `fragment dataTableRunFragment on DataTableRun {
|
|
79
59
|
id
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
datetimeValue
|
|
91
|
-
relatedTable
|
|
92
|
-
relatedId
|
|
93
|
-
reference {
|
|
94
|
-
dataTableId
|
|
95
|
-
dataTableRowId
|
|
96
|
-
cellKey
|
|
97
|
-
}
|
|
98
|
-
referenceStatus
|
|
99
|
-
|
|
100
|
-
createdAt
|
|
101
|
-
updatedAt
|
|
60
|
+
cause
|
|
61
|
+
added
|
|
62
|
+
changed
|
|
63
|
+
removed
|
|
64
|
+
derived
|
|
65
|
+
llmCalls
|
|
66
|
+
reason
|
|
67
|
+
error
|
|
68
|
+
startedAt
|
|
69
|
+
finishedAt
|
|
102
70
|
}`;
|
|
@@ -1,36 +1,64 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const emailMessageFragment = `fragment emailMessageFragment on EmailMessage {
|
|
2
2
|
id
|
|
3
3
|
cursor
|
|
4
4
|
organizationId
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
subject
|
|
8
|
-
postmarkMessageId
|
|
5
|
+
direction
|
|
6
|
+
kind
|
|
9
7
|
status
|
|
8
|
+
statusGroup
|
|
10
9
|
statusSummary
|
|
10
|
+
fromEmail
|
|
11
|
+
fromName
|
|
12
|
+
toEmail
|
|
13
|
+
toName
|
|
14
|
+
subject
|
|
11
15
|
previewText
|
|
12
|
-
|
|
16
|
+
providerMessageId
|
|
17
|
+
emailOutreachId
|
|
18
|
+
hasConversation
|
|
19
|
+
relatedEmailMessageId
|
|
20
|
+
occurredAt
|
|
21
|
+
}`;
|
|
22
|
+
|
|
23
|
+
export const emailMessageDetailsFragment = `fragment emailMessageDetailsFragment on EmailMessageDetails {
|
|
24
|
+
id
|
|
13
25
|
bodyText
|
|
14
|
-
|
|
26
|
+
bodyFormat
|
|
15
27
|
processingStartedAt
|
|
16
28
|
processingCompletedAt
|
|
29
|
+
senderBlocked
|
|
30
|
+
replyToEmail
|
|
31
|
+
cc
|
|
32
|
+
replyToName
|
|
33
|
+
suppressionReason
|
|
34
|
+
sentAt
|
|
35
|
+
deliveredAt
|
|
36
|
+
firstOpenedAt
|
|
37
|
+
bouncedAt
|
|
38
|
+
bounceType
|
|
39
|
+
spamComplaintAt
|
|
40
|
+
broadcast
|
|
41
|
+
relatedLogIds
|
|
42
|
+
updatedAt
|
|
17
43
|
}`;
|
|
18
44
|
|
|
19
|
-
export const
|
|
45
|
+
export const emailConversationMessageFragment = `fragment emailConversationMessageFragment on EmailConversationMessage {
|
|
46
|
+
status
|
|
47
|
+
statusSummary
|
|
48
|
+
fromName
|
|
49
|
+
toName
|
|
50
|
+
processingStartedAt
|
|
51
|
+
processingCompletedAt
|
|
52
|
+
sentAt
|
|
53
|
+
deliveredAt
|
|
54
|
+
firstOpenedAt
|
|
55
|
+
bouncedAt
|
|
56
|
+
spamComplaintAt
|
|
20
57
|
id
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
sourceInboundEmailId
|
|
58
|
+
direction
|
|
59
|
+
fromEmail
|
|
24
60
|
toEmail
|
|
25
|
-
replyToEmail
|
|
26
|
-
replyToName
|
|
27
61
|
subject
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
postmarkMessageId
|
|
31
|
-
errorMessage
|
|
32
|
-
sentAt
|
|
33
|
-
createdAt
|
|
34
|
-
updatedAt
|
|
35
|
-
relatedLogIds
|
|
62
|
+
occurredAt
|
|
63
|
+
bodyText
|
|
36
64
|
}`;
|