@jsb188/graphql 1.1.11 → 1.1.12
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/audience.d.ts +343 -0
- package/cache/config.ts +58 -24
- package/cache/index.chat-activity.test.ts +119 -0
- package/cache/index.chat.test.ts +92 -0
- package/cache/index.helpers.ts +96 -0
- package/cache/index.regression.test.ts +149 -0
- package/cache/index.test.ts +370 -42
- package/cache/index.ts +326 -799
- package/cache/optimistic-ui-runtime.ts +46 -0
- package/cache/optimistic-ui.ts +401 -0
- package/cache/persist.ts +98 -19
- 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} +5 -2
- package/client/index.ts +3 -2
- package/client/request.helpers.ts +14 -0
- package/client/request.ts +130 -215
- package/deno.lock +17 -0
- package/deno.test.json +2 -0
- package/gql/fragments/agentMemoryFragments.ts +5 -1
- package/gql/fragments/agentNoteFragments.ts +150 -0
- package/gql/fragments/aiChatFragments.ts +36 -10
- package/gql/fragments/audienceFragments.ts +141 -0
- package/gql/fragments/campaignFragments.ts +415 -126
- package/gql/fragments/dataTableFragments.ts +48 -80
- package/gql/fragments/emailFragments.ts +28 -23
- package/gql/fragments/fieldDocFragments.ts +222 -40
- package/gql/fragments/inboundContactFragments.ts +2 -0
- package/gql/fragments/logFragments.ts +93 -2
- package/gql/fragments/organizationFragments.ts +10 -0
- package/gql/fragments/qrCodeFragments.ts +29 -0
- package/gql/fragments/scheduleFragments.ts +652 -140
- package/gql/fragments/sheetFragments.ts +84 -373
- package/gql/fragments/storageFragments.ts +25 -1
- package/gql/fragments/workflowFragments.ts +13 -1
- package/gql/mutations/agentMemoryMutations.ts +32 -0
- package/gql/mutations/agentNoteMutations.ts +62 -0
- package/gql/mutations/aiChatMutations.ts +36 -4
- package/gql/mutations/audienceMutations.ts +71 -0
- package/gql/mutations/authMutations.ts +45 -1
- package/gql/mutations/billingMutations.ts +24 -0
- package/gql/mutations/campaignMutations.ts +170 -127
- package/gql/mutations/contactMutations.ts +23 -0
- package/gql/mutations/dataTableMutations.ts +18 -75
- package/gql/mutations/fieldDocMutations.ts +162 -13
- package/gql/mutations/index.ts +8 -5
- package/gql/mutations/organizationMutations.ts +6 -0
- package/gql/mutations/qrCodeMutations.ts +20 -0
- package/gql/mutations/scheduleMutations.ts +1052 -354
- package/gql/mutations/sheetMutations.ts +62 -118
- package/gql/mutations/storageMutations.ts +0 -1
- package/gql/mutations/workflowMutations.ts +18 -0
- package/gql/queries/agentMemoryQueries.ts +6 -0
- package/gql/queries/agentNoteQueries.ts +89 -0
- package/gql/queries/aiChatQueries.ts +56 -4
- package/gql/queries/audienceQueries.ts +128 -0
- package/gql/queries/authQueries.ts +6 -0
- package/gql/queries/billingQueries.ts +95 -6
- package/gql/queries/campaignQueries.ts +132 -23
- package/gql/queries/dataTableQueries.ts +24 -65
- package/gql/queries/emailQueries.ts +18 -61
- package/gql/queries/emailReplyReportQueries.ts +76 -0
- package/gql/queries/fieldDocQueries.ts +100 -92
- package/gql/queries/inboundContactQueries.ts +4 -0
- package/gql/queries/index.ts +3 -1
- package/gql/queries/logQueries.ts +62 -7
- package/gql/queries/organizationQueries.ts +13 -0
- package/gql/queries/qrCodeQueries.ts +20 -0
- package/gql/queries/scheduleQueries.ts +633 -257
- package/gql/queries/sheetQueries.ts +59 -152
- package/gql/queries/workflowQueries.ts +10 -4
- package/hooks/index.helpers.test.ts +50 -0
- package/hooks/index.helpers.ts +52 -0
- package/hooks/index.ts +863 -685
- package/hooks/use-agentMemory-mtn.ts +29 -31
- package/hooks/use-agentMemory-qry.ts +15 -3
- package/hooks/use-agentNote-mtn.ts +82 -0
- package/hooks/use-agentNote-qry.ts +190 -0
- package/hooks/use-agentNote-recovery.helpers.test.ts +68 -0
- package/hooks/use-agentNote-recovery.helpers.ts +58 -0
- package/hooks/use-agentNote-recovery.ts +72 -0
- package/hooks/use-aiChat-mtn.ts +96 -112
- package/hooks/use-aiChat-qry.helpers.test.ts +63 -0
- package/hooks/use-aiChat-qry.helpers.ts +124 -0
- package/hooks/use-aiChat-qry.ts +229 -383
- package/hooks/use-aiChat-stream-mtn.ts +14 -0
- package/hooks/use-audience-mtn.ts +194 -0
- package/hooks/use-audience-qry.helpers.test.ts +80 -0
- package/hooks/use-audience-qry.helpers.ts +63 -0
- package/hooks/use-audience-qry.ts +330 -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-campaign-generation-recovery.ts +53 -0
- package/hooks/use-campaign-mtn.ts +224 -165
- package/hooks/use-campaign-qry.helpers.ts +40 -0
- package/hooks/use-campaign-qry.ts +631 -54
- package/hooks/use-dataTable-mtn.ts +23 -115
- package/hooks/use-dataTable-qry.ts +66 -916
- package/hooks/use-email-qry.helpers.ts +37 -0
- package/hooks/use-email-qry.ts +33 -178
- package/hooks/use-emailCampaignReplyReport-qry.ts +27 -0
- package/hooks/use-fieldDoc-mtn.ts +244 -32
- package/hooks/use-fieldDoc-qry.helpers.test.ts +65 -0
- 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-log-mtn.ts +25 -12
- package/hooks/use-log-qry.ts +99 -46
- package/hooks/use-organization-qry.ts +16 -60
- package/hooks/use-publicFormEmail-mtn.ts +27 -0
- package/hooks/use-qrCode-mtn.ts +40 -0
- package/hooks/use-qrCode-qry.ts +78 -0
- package/hooks/use-schedule-mtn.ts +506 -333
- package/hooks/use-schedule-qry.ts +682 -101
- package/hooks/use-schedule-reactive.ts +486 -0
- package/hooks/use-sheet-mtn.ts +91 -199
- package/hooks/use-sheet-qry.ts +84 -238
- package/hooks/use-storage-qry.ts +84 -61
- package/hooks/use-workflow-mtn.ts +39 -22
- package/hooks/use-workflow-qry.ts +40 -61
- 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/fragment-realtime-sequence.ts +55 -0
- package/libs/fragment-recovery.test.ts +326 -0
- package/libs/fragment-recovery.ts +325 -0
- package/libs/open-sheet.ts +138 -0
- package/libs/orchestrator-realtime.helpers.test.ts +229 -0
- package/libs/orchestrator-realtime.helpers.ts +317 -0
- package/libs/orchestrator-realtime.ts +433 -0
- package/libs/request-cache-regression.test.ts +122 -0
- package/{client → libs}/request-managed-session.test.ts +1 -1
- package/libs/request-no-store.test.ts +419 -0
- package/libs/sheet-command-batch.ts +44 -0
- package/libs/sheet-view-realtime-router.test.ts +214 -0
- package/libs/sheet-view-realtime-router.ts +99 -0
- package/loaders/campaign.test.ts +186 -0
- package/loaders/campaign.ts +56 -83
- package/loaders/emailPreference.ts +75 -0
- package/loaders/rest.ts +12 -0
- package/package.json +42 -17
- package/schedule.d.ts +1790 -0
- package/sse.helpers.ts +19 -0
- package/sse.ts +26 -115
- package/tests/agent-note-detail-cache.test.ts +120 -0
- package/tests/agent-note-search.test.ts +444 -0
- package/types.d.ts +46 -25
- 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-no-store.test.ts +0 -157
- package/gql/fragments/agentDocFragments.ts +0 -46
- package/gql/fragments/billingFragments.ts +0 -14
- package/gql/mutations/agentDocMutations.ts +0 -177
- package/gql/queries/agentDocQueries.ts +0 -120
- package/hooks/use-agentDoc-mtn.ts +0 -285
- package/hooks/use-agentDoc-qry.ts +0 -208
- /package/{client → libs}/sse-ticket.test.ts +0 -0
|
@@ -3,78 +3,44 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Each fragment NAME is the realtime contract: the cache keys one of these
|
|
5
5
|
* spreads as `$<fragmentName>:<id>`, which is byte-identical to what the
|
|
6
|
-
* server pushes through FRAGMENT_NAMES.campaignTemplate / campaign
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* server pushes through FRAGMENT_NAMES.campaignTemplate / campaign. Renaming a
|
|
7
|
+
* fragment here silently stops websocket patches from landing on the cached
|
|
8
|
+
* row.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Org-side campaign template core selection. Edit-session queries inline this
|
|
13
|
+
* selection so fragment cache updates cannot pair a newer revision with an
|
|
14
|
+
* older editor definition from the query response.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
|
-
export const
|
|
17
|
-
id
|
|
18
|
-
parentId
|
|
19
|
-
kind
|
|
20
|
-
type
|
|
21
|
-
key
|
|
22
|
-
order
|
|
23
|
-
label
|
|
24
|
-
description
|
|
25
|
-
placeholder
|
|
26
|
-
required
|
|
27
|
-
options {
|
|
28
|
-
value
|
|
29
|
-
label
|
|
30
|
-
}
|
|
31
|
-
validation {
|
|
32
|
-
minLength
|
|
33
|
-
maxLength
|
|
34
|
-
min
|
|
35
|
-
max
|
|
36
|
-
pattern
|
|
37
|
-
maxFiles
|
|
38
|
-
acceptedContentTypes
|
|
39
|
-
}
|
|
40
|
-
visibleWhen {
|
|
41
|
-
elementKey
|
|
42
|
-
operator
|
|
43
|
-
values
|
|
44
|
-
}
|
|
45
|
-
settings {
|
|
46
|
-
numbered
|
|
47
|
-
fullWidth
|
|
48
|
-
}
|
|
49
|
-
files {
|
|
50
|
-
id
|
|
51
|
-
uri
|
|
52
|
-
contentType
|
|
53
|
-
}
|
|
54
|
-
}`;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Org-side reusable campaign template, with its element tree.
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
export const campaignTemplateFragment = `fragment campaignTemplateFragment on CampaignTemplate {
|
|
17
|
+
export const campaignTemplateFieldsSelection = `
|
|
61
18
|
id
|
|
62
19
|
organizationId
|
|
20
|
+
editVersion
|
|
63
21
|
kind
|
|
64
22
|
status
|
|
65
23
|
generationError
|
|
66
24
|
title
|
|
67
25
|
description
|
|
68
|
-
responseWorkflowId
|
|
69
|
-
siteId
|
|
70
26
|
settings {
|
|
71
27
|
__typename
|
|
72
28
|
... on EmailCampaignSettings {
|
|
73
29
|
subject
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
replyToAgentDomain
|
|
30
|
+
preheader
|
|
31
|
+
aiAgentDomain
|
|
77
32
|
secondaryReplyToEmail
|
|
33
|
+
sendAt
|
|
34
|
+
design {
|
|
35
|
+
canvasColor
|
|
36
|
+
contentColor
|
|
37
|
+
contentWidth
|
|
38
|
+
fontFamily
|
|
39
|
+
textColor
|
|
40
|
+
linkColor
|
|
41
|
+
padding
|
|
42
|
+
}
|
|
43
|
+
trackOpens
|
|
78
44
|
}
|
|
79
45
|
... on FormCampaignSettings {
|
|
80
46
|
color
|
|
@@ -86,14 +52,146 @@ export const campaignTemplateFragment = `fragment campaignTemplateFragment on Ca
|
|
|
86
52
|
id
|
|
87
53
|
uri
|
|
88
54
|
contentType
|
|
55
|
+
imageData {
|
|
56
|
+
averageColor
|
|
57
|
+
}
|
|
89
58
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
59
|
+
__deleted: deleted
|
|
60
|
+
archivedAt
|
|
93
61
|
createdAt
|
|
94
|
-
updatedAt
|
|
62
|
+
updatedAt`;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Reusable normalized campaign template core for non-atomic consumers.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
export const campaignTemplateFragment = `fragment campaignTemplateFragment on CampaignTemplate {
|
|
69
|
+
${campaignTemplateFieldsSelection}
|
|
95
70
|
}`;
|
|
96
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Canonical editor fields. CampaignEditor has no id, so this remains a direct
|
|
74
|
+
* reusable selection rather than a fragment/cache identity.
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
export const campaignEditorFieldsSelection = `reservedQuestionKeys
|
|
78
|
+
definition {
|
|
79
|
+
sections {
|
|
80
|
+
key
|
|
81
|
+
order
|
|
82
|
+
label
|
|
83
|
+
description
|
|
84
|
+
settings {
|
|
85
|
+
numbered
|
|
86
|
+
fullWidth
|
|
87
|
+
}
|
|
88
|
+
files {
|
|
89
|
+
id
|
|
90
|
+
order
|
|
91
|
+
uri
|
|
92
|
+
contentType
|
|
93
|
+
size
|
|
94
|
+
name
|
|
95
|
+
}
|
|
96
|
+
elements {
|
|
97
|
+
key
|
|
98
|
+
kind
|
|
99
|
+
type
|
|
100
|
+
order
|
|
101
|
+
label
|
|
102
|
+
description
|
|
103
|
+
placeholder
|
|
104
|
+
options {
|
|
105
|
+
value
|
|
106
|
+
label
|
|
107
|
+
}
|
|
108
|
+
required
|
|
109
|
+
validation {
|
|
110
|
+
minLength
|
|
111
|
+
maxLength
|
|
112
|
+
min
|
|
113
|
+
max
|
|
114
|
+
maxFiles
|
|
115
|
+
acceptedContentTypes
|
|
116
|
+
}
|
|
117
|
+
visibleWhen {
|
|
118
|
+
elementKey
|
|
119
|
+
operator
|
|
120
|
+
values
|
|
121
|
+
}
|
|
122
|
+
settings {
|
|
123
|
+
numbered
|
|
124
|
+
fullWidth
|
|
125
|
+
}
|
|
126
|
+
files {
|
|
127
|
+
id
|
|
128
|
+
order
|
|
129
|
+
uri
|
|
130
|
+
contentType
|
|
131
|
+
size
|
|
132
|
+
name
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
emailDefinition {
|
|
138
|
+
schemaVersion
|
|
139
|
+
rows {
|
|
140
|
+
key
|
|
141
|
+
order
|
|
142
|
+
settings {
|
|
143
|
+
backgroundColor
|
|
144
|
+
padding
|
|
145
|
+
}
|
|
146
|
+
columns {
|
|
147
|
+
key
|
|
148
|
+
order
|
|
149
|
+
width
|
|
150
|
+
blocks {
|
|
151
|
+
key
|
|
152
|
+
order
|
|
153
|
+
type
|
|
154
|
+
content {
|
|
155
|
+
text
|
|
156
|
+
richText
|
|
157
|
+
url
|
|
158
|
+
altText
|
|
159
|
+
heading
|
|
160
|
+
headingLevel
|
|
161
|
+
buttonLabel
|
|
162
|
+
buttonUrl
|
|
163
|
+
links {
|
|
164
|
+
label
|
|
165
|
+
url
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
settings {
|
|
169
|
+
alignment
|
|
170
|
+
textColor
|
|
171
|
+
backgroundColor
|
|
172
|
+
fontSize
|
|
173
|
+
padding
|
|
174
|
+
height
|
|
175
|
+
buttonStyle
|
|
176
|
+
}
|
|
177
|
+
files {
|
|
178
|
+
id
|
|
179
|
+
order
|
|
180
|
+
uri
|
|
181
|
+
contentType
|
|
182
|
+
size
|
|
183
|
+
name
|
|
184
|
+
imageData {
|
|
185
|
+
width
|
|
186
|
+
height
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
`;
|
|
194
|
+
|
|
97
195
|
/**
|
|
98
196
|
* Template list row. Deliberately omits the element tree so a list page does
|
|
99
197
|
* not pull every definition in the organization.
|
|
@@ -102,6 +200,8 @@ export const campaignTemplateFragment = `fragment campaignTemplateFragment on Ca
|
|
|
102
200
|
export const campaignTemplateSummaryFragment = `fragment campaignTemplateSummaryFragment on CampaignTemplateSummary {
|
|
103
201
|
id
|
|
104
202
|
organizationId
|
|
203
|
+
editable
|
|
204
|
+
editVersion
|
|
105
205
|
kind
|
|
106
206
|
status
|
|
107
207
|
generationError
|
|
@@ -112,86 +212,75 @@ export const campaignTemplateSummaryFragment = `fragment campaignTemplateSummary
|
|
|
112
212
|
uri
|
|
113
213
|
contentType
|
|
114
214
|
}
|
|
215
|
+
preview {
|
|
216
|
+
uri
|
|
217
|
+
width
|
|
218
|
+
height
|
|
219
|
+
updatedAt
|
|
220
|
+
}
|
|
221
|
+
__deleted: deleted
|
|
222
|
+
archivedAt
|
|
115
223
|
createdAt
|
|
116
224
|
updatedAt
|
|
117
225
|
cursor
|
|
118
226
|
}`;
|
|
119
227
|
|
|
228
|
+
/*
|
|
229
|
+
* Narrow template lifecycle patch returned by archive operations. It is
|
|
230
|
+
* mapped into campaignTemplateFragment by the cache without pretending that
|
|
231
|
+
* an UPDATE ... RETURNING row contains joined header storage metadata.
|
|
232
|
+
*/
|
|
233
|
+
export const campaignTemplateLifecycleFragment = `fragment campaignTemplateLifecycleFragment on CampaignTemplate {
|
|
234
|
+
id
|
|
235
|
+
status
|
|
236
|
+
__deleted: deleted
|
|
237
|
+
archivedAt
|
|
238
|
+
generationError
|
|
239
|
+
updatedAt
|
|
240
|
+
}`;
|
|
241
|
+
|
|
120
242
|
/**
|
|
121
|
-
*
|
|
243
|
+
* Campaign core selection, including unpublished public-form drafts.
|
|
244
|
+
* Edit-session queries inline this selection to keep it atomic with the editor
|
|
245
|
+
* definition returned by the same response.
|
|
122
246
|
*/
|
|
123
247
|
|
|
124
|
-
export const
|
|
248
|
+
export const campaignFieldsSelection = `
|
|
125
249
|
id
|
|
126
250
|
organizationId
|
|
251
|
+
editVersion
|
|
252
|
+
publishedEditVersion
|
|
127
253
|
templateId
|
|
128
254
|
kind
|
|
129
255
|
status
|
|
256
|
+
generationStatus
|
|
257
|
+
generationError
|
|
258
|
+
generationProgress
|
|
259
|
+
generationProgressStage
|
|
130
260
|
publicId
|
|
131
261
|
audience
|
|
262
|
+
emailRecipientSelectionMode
|
|
263
|
+
audienceFrozenAt
|
|
132
264
|
title
|
|
133
265
|
description
|
|
134
|
-
definitionSnapshot {
|
|
135
|
-
schemaVersion
|
|
136
|
-
snapshotSource
|
|
137
|
-
sections {
|
|
138
|
-
key
|
|
139
|
-
order
|
|
140
|
-
label
|
|
141
|
-
description
|
|
142
|
-
settings {
|
|
143
|
-
numbered
|
|
144
|
-
fullWidth
|
|
145
|
-
}
|
|
146
|
-
elements {
|
|
147
|
-
key
|
|
148
|
-
kind
|
|
149
|
-
type
|
|
150
|
-
order
|
|
151
|
-
label
|
|
152
|
-
description
|
|
153
|
-
placeholder
|
|
154
|
-
options {
|
|
155
|
-
value
|
|
156
|
-
label
|
|
157
|
-
}
|
|
158
|
-
required
|
|
159
|
-
validation {
|
|
160
|
-
minLength
|
|
161
|
-
maxLength
|
|
162
|
-
min
|
|
163
|
-
max
|
|
164
|
-
pattern
|
|
165
|
-
maxFiles
|
|
166
|
-
acceptedContentTypes
|
|
167
|
-
}
|
|
168
|
-
visibleWhen {
|
|
169
|
-
elementKey
|
|
170
|
-
operator
|
|
171
|
-
values
|
|
172
|
-
}
|
|
173
|
-
settings {
|
|
174
|
-
numbered
|
|
175
|
-
fullWidth
|
|
176
|
-
}
|
|
177
|
-
files {
|
|
178
|
-
id
|
|
179
|
-
order
|
|
180
|
-
uri
|
|
181
|
-
contentType
|
|
182
|
-
size
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
266
|
settings {
|
|
188
267
|
__typename
|
|
189
268
|
... on EmailCampaignSettings {
|
|
190
269
|
subject
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
replyToAgentDomain
|
|
270
|
+
preheader
|
|
271
|
+
aiAgentDomain
|
|
194
272
|
secondaryReplyToEmail
|
|
273
|
+
sendAt
|
|
274
|
+
design {
|
|
275
|
+
canvasColor
|
|
276
|
+
contentColor
|
|
277
|
+
contentWidth
|
|
278
|
+
fontFamily
|
|
279
|
+
textColor
|
|
280
|
+
linkColor
|
|
281
|
+
padding
|
|
282
|
+
}
|
|
283
|
+
trackOpens
|
|
195
284
|
}
|
|
196
285
|
... on FormCampaignSettings {
|
|
197
286
|
color
|
|
@@ -199,20 +288,132 @@ export const campaignFragment = `fragment campaignFragment on Campaign {
|
|
|
199
288
|
confirmationMessage
|
|
200
289
|
}
|
|
201
290
|
}
|
|
202
|
-
siteId
|
|
203
291
|
headerImage {
|
|
204
292
|
id
|
|
205
293
|
uri
|
|
206
294
|
contentType
|
|
295
|
+
imageData {
|
|
296
|
+
averageColor
|
|
297
|
+
}
|
|
207
298
|
}
|
|
208
299
|
scheduledAt
|
|
209
|
-
opensAt
|
|
210
300
|
closesAt
|
|
211
|
-
|
|
301
|
+
startedAt
|
|
212
302
|
completedAt
|
|
213
303
|
errorMessage
|
|
304
|
+
__deleted: deleted
|
|
305
|
+
archivedAt
|
|
214
306
|
isOpen
|
|
215
307
|
createdAt
|
|
308
|
+
updatedAt`;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Reusable normalized campaign core for non-atomic consumers.
|
|
312
|
+
*/
|
|
313
|
+
|
|
314
|
+
export const campaignFragment = `fragment campaignFragment on Campaign {
|
|
315
|
+
${campaignFieldsSelection}
|
|
316
|
+
}`;
|
|
317
|
+
|
|
318
|
+
/*
|
|
319
|
+
* Narrow campaign generation lifecycle patch returned by retry operations.
|
|
320
|
+
*/
|
|
321
|
+
export const campaignGenerationLifecycleFragment = `fragment campaignGenerationLifecycleFragment on Campaign {
|
|
322
|
+
id
|
|
323
|
+
organizationId
|
|
324
|
+
editVersion
|
|
325
|
+
generationStatus
|
|
326
|
+
generationError
|
|
327
|
+
generationProgress
|
|
328
|
+
generationProgressStage
|
|
329
|
+
updatedAt
|
|
330
|
+
}`;
|
|
331
|
+
|
|
332
|
+
/*
|
|
333
|
+
* Narrow access policy returned after changing one public-form audience.
|
|
334
|
+
*/
|
|
335
|
+
export const campaignAccessFragment = `fragment campaignAccessFragment on Campaign {
|
|
336
|
+
id
|
|
337
|
+
organizationId
|
|
338
|
+
editVersion
|
|
339
|
+
publishedEditVersion
|
|
340
|
+
audience
|
|
341
|
+
updatedAt
|
|
342
|
+
}`;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Lifecycle-only campaign mutation payload. Keeping media and definition fields
|
|
346
|
+
* absent prevents a bare server row from clearing richer cached campaign data.
|
|
347
|
+
*/
|
|
348
|
+
|
|
349
|
+
export const campaignLifecycleFragment = `fragment campaignLifecycleFragment on Campaign {
|
|
350
|
+
id
|
|
351
|
+
organizationId
|
|
352
|
+
publishedEditVersion
|
|
353
|
+
status
|
|
354
|
+
publicId
|
|
355
|
+
audience
|
|
356
|
+
emailRecipientSelectionMode
|
|
357
|
+
audienceFrozenAt
|
|
358
|
+
scheduledAt
|
|
359
|
+
closesAt
|
|
360
|
+
startedAt
|
|
361
|
+
completedAt
|
|
362
|
+
errorMessage
|
|
363
|
+
__deleted: deleted
|
|
364
|
+
archivedAt
|
|
365
|
+
isOpen
|
|
366
|
+
updatedAt
|
|
367
|
+
}`;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Campaign settings mutation payload. It carries the editor revision alongside
|
|
371
|
+
* lifecycle and form appearance fields without returning media or definition data.
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
export const campaignSettingsFragment = `fragment campaignSettingsFragment on Campaign {
|
|
375
|
+
id
|
|
376
|
+
organizationId
|
|
377
|
+
editVersion
|
|
378
|
+
publishedEditVersion
|
|
379
|
+
status
|
|
380
|
+
publicId
|
|
381
|
+
audience
|
|
382
|
+
emailRecipientSelectionMode
|
|
383
|
+
audienceFrozenAt
|
|
384
|
+
settings {
|
|
385
|
+
__typename
|
|
386
|
+
... on EmailCampaignSettings {
|
|
387
|
+
subject
|
|
388
|
+
preheader
|
|
389
|
+
aiAgentDomain
|
|
390
|
+
secondaryReplyToEmail
|
|
391
|
+
sendAt
|
|
392
|
+
design {
|
|
393
|
+
canvasColor
|
|
394
|
+
contentColor
|
|
395
|
+
contentWidth
|
|
396
|
+
fontFamily
|
|
397
|
+
textColor
|
|
398
|
+
linkColor
|
|
399
|
+
padding
|
|
400
|
+
}
|
|
401
|
+
trackOpens
|
|
402
|
+
}
|
|
403
|
+
... on FormCampaignSettings {
|
|
404
|
+
color
|
|
405
|
+
backgroundFillStyle
|
|
406
|
+
confirmationMessage
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
scheduledAt
|
|
410
|
+
closesAt
|
|
411
|
+
startedAt
|
|
412
|
+
completedAt
|
|
413
|
+
errorMessage
|
|
414
|
+
__deleted: deleted
|
|
415
|
+
archivedAt
|
|
416
|
+
isOpen
|
|
216
417
|
updatedAt
|
|
217
418
|
}`;
|
|
218
419
|
|
|
@@ -221,20 +422,38 @@ export const campaignFragment = `fragment campaignFragment on Campaign {
|
|
|
221
422
|
*/
|
|
222
423
|
|
|
223
424
|
export const campaignSummaryFragment = `fragment campaignSummaryFragment on CampaignSummary {
|
|
425
|
+
preview { uri width height updatedAt }
|
|
224
426
|
id
|
|
225
427
|
organizationId
|
|
226
428
|
templateId
|
|
227
429
|
kind
|
|
228
430
|
status
|
|
431
|
+
generationStatus
|
|
432
|
+
generationError
|
|
433
|
+
generationProgress
|
|
434
|
+
generationProgressStage
|
|
229
435
|
publicId
|
|
230
436
|
audience
|
|
437
|
+
emailRecipientSelectionMode
|
|
438
|
+
audienceFrozenAt
|
|
439
|
+
audienceCount
|
|
440
|
+
audiencePreview
|
|
231
441
|
title
|
|
232
|
-
|
|
442
|
+
scheduledAt
|
|
233
443
|
closesAt
|
|
234
|
-
|
|
444
|
+
startedAt
|
|
235
445
|
completedAt
|
|
446
|
+
__deleted: deleted
|
|
447
|
+
archivedAt
|
|
448
|
+
metrics {
|
|
449
|
+
responseCount
|
|
450
|
+
recipientCount
|
|
451
|
+
deliveredCount
|
|
452
|
+
openedCount
|
|
453
|
+
}
|
|
236
454
|
isOpen
|
|
237
455
|
createdAt
|
|
456
|
+
updatedAt
|
|
238
457
|
cursor
|
|
239
458
|
}`;
|
|
240
459
|
|
|
@@ -243,21 +462,55 @@ export const campaignSummaryFragment = `fragment campaignSummaryFragment on Camp
|
|
|
243
462
|
* of this projection until a response detail surface needs them.
|
|
244
463
|
*/
|
|
245
464
|
|
|
246
|
-
export const
|
|
465
|
+
export const campaignResponseSummaryFragment = `fragment campaignResponseSummaryFragment on CampaignResponseSummary {
|
|
466
|
+
aiAnswersComplete
|
|
467
|
+
aiFinishedAt
|
|
247
468
|
id
|
|
248
469
|
cursor
|
|
249
470
|
campaignId
|
|
250
|
-
templateId
|
|
251
471
|
respondentName
|
|
252
472
|
respondentEmail
|
|
253
473
|
childOrgId
|
|
254
474
|
childOrgName
|
|
255
|
-
status
|
|
256
475
|
submittedAt
|
|
257
476
|
activityAt
|
|
258
477
|
createdAt
|
|
259
478
|
}`;
|
|
260
479
|
|
|
480
|
+
/**
|
|
481
|
+
* One complete submitted form response for the organization-side detail modal.
|
|
482
|
+
*/
|
|
483
|
+
|
|
484
|
+
export const campaignResponseFragment = `fragment campaignResponseFragment on CampaignResponse {
|
|
485
|
+
aiAnswersComplete
|
|
486
|
+
aiFinishedAt
|
|
487
|
+
id
|
|
488
|
+
campaignId
|
|
489
|
+
campaignTitle
|
|
490
|
+
respondentName
|
|
491
|
+
respondentEmail
|
|
492
|
+
childOrgId
|
|
493
|
+
childOrgName
|
|
494
|
+
childOrgOperation
|
|
495
|
+
answers {
|
|
496
|
+
elementKey
|
|
497
|
+
question
|
|
498
|
+
values
|
|
499
|
+
}
|
|
500
|
+
submittedAt
|
|
501
|
+
activityAt
|
|
502
|
+
createdAt
|
|
503
|
+
}`;
|
|
504
|
+
|
|
505
|
+
/*
|
|
506
|
+
* Aggregate response metrics for one public-form campaign.
|
|
507
|
+
*/
|
|
508
|
+
export const campaignResponseOverviewFragment = `fragment campaignResponseOverviewFragment on CampaignResponseOverview {
|
|
509
|
+
id
|
|
510
|
+
submittedCount
|
|
511
|
+
responseRate
|
|
512
|
+
}`;
|
|
513
|
+
|
|
261
514
|
/**
|
|
262
515
|
* One email campaign recipient snapshot, as the organization sees it.
|
|
263
516
|
*/
|
|
@@ -267,11 +520,47 @@ export const campaignRecipientFragment = `fragment campaignRecipientFragment on
|
|
|
267
520
|
cursor
|
|
268
521
|
campaignId
|
|
269
522
|
inboundContactId
|
|
523
|
+
emailAddressId
|
|
524
|
+
outboundEmailId
|
|
270
525
|
emailAddress
|
|
271
526
|
personName
|
|
527
|
+
deliveryStatus
|
|
528
|
+
sentAt
|
|
529
|
+
deliveredAt
|
|
530
|
+
openedAt
|
|
272
531
|
invitedAt
|
|
273
532
|
firstOpenedAt
|
|
274
533
|
respondedAt
|
|
275
|
-
|
|
534
|
+
bouncedAt
|
|
535
|
+
bounceType
|
|
536
|
+
spamComplaintAt
|
|
537
|
+
errorMessage
|
|
538
|
+
suppressionReason
|
|
276
539
|
createdAt
|
|
277
540
|
}`;
|
|
541
|
+
|
|
542
|
+
/*
|
|
543
|
+
* Aggregate delivery and engagement metrics for one email campaign.
|
|
544
|
+
*/
|
|
545
|
+
export const campaignRecipientOverviewFragment = `fragment campaignRecipientOverviewFragment on CampaignRecipientOverview {
|
|
546
|
+
id
|
|
547
|
+
totalCount
|
|
548
|
+
selectedCount
|
|
549
|
+
queuedCount
|
|
550
|
+
processingCount
|
|
551
|
+
sentCount
|
|
552
|
+
deliveredCount
|
|
553
|
+
openedCount
|
|
554
|
+
respondedCount
|
|
555
|
+
bouncedCount
|
|
556
|
+
spamComplaintCount
|
|
557
|
+
failedCount
|
|
558
|
+
retryableCount
|
|
559
|
+
unknownCount
|
|
560
|
+
suppressedCount
|
|
561
|
+
excludedCount
|
|
562
|
+
audienceLists {
|
|
563
|
+
id
|
|
564
|
+
name
|
|
565
|
+
}
|
|
566
|
+
}`;
|